diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2 | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2')
514 files changed, 20126 insertions, 19926 deletions
diff --git a/kmymoney2/converter/convertertest.cpp b/kmymoney2/converter/convertertest.cpp index aef63d9..70124ad 100644 --- a/kmymoney2/converter/convertertest.cpp +++ b/kmymoney2/converter/convertertest.cpp @@ -19,10 +19,10 @@ #include <config.h> #endif -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qdom.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kdeversion.h> @@ -64,7 +64,7 @@ void ConverterTest::setUp () { file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$")); file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$")); - file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1)); + file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1)); file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#")); file->setBaseCurrency(file->currency("USD")); @@ -77,12 +77,12 @@ void ConverterTest::setUp () { acLiability = (MyMoneyFile::instance()->liability().id()); acExpense = (MyMoneyFile::instance()->expense().id()); acIncome = (MyMoneyFile::instance()->income().id()); - acChecking = makeAccount("Checking Account",MyMoneyAccount::Checkings,moConverterCheckingOpen,QDate(2004,5,15),acAsset); - acCredit = makeAccount("Credit Card",MyMoneyAccount::CreditCard,moConverterCreditOpen,QDate(2004,7,15),acLiability); - acSolo = makeAccount("Solo",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acParent = makeAccount("Parent",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acChild = makeAccount("Child",MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acForeign = makeAccount("Foreign",MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); + acChecking = makeAccount("Checking Account",MyMoneyAccount::Checkings,moConverterCheckingOpen,TQDate(2004,5,15),acAsset); + acCredit = makeAccount("Credit Card",MyMoneyAccount::CreditCard,moConverterCreditOpen,TQDate(2004,7,15),acLiability); + acSolo = makeAccount("Solo",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acParent = makeAccount("Parent",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acChild = makeAccount("Child",MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acForeign = makeAccount("Foreign",MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); MyMoneyInstitution i("Bank of the World","","","","","",""); file->addInstitution(i); @@ -112,8 +112,8 @@ void ConverterTest::testWebQuotes() CPPUNIT_ASSERT(qr.m_errors.count() == 0); // Quote date should be within the last week, or something bad is going on. - CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate()); - CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7)); + CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7)); // Quote value should at least be positive CPPUNIT_ASSERT(qr.m_price.isPositive()); @@ -123,8 +123,8 @@ void ConverterTest::testWebQuotes() // kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl; CPPUNIT_ASSERT(qr.m_errors.count() == 0); - CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1)); - CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7)); + CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1)); + CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7)); CPPUNIT_ASSERT(qr.m_price.isPositive()); q.launch("EUR > USD","Yahoo Currency"); @@ -132,8 +132,8 @@ void ConverterTest::testWebQuotes() // kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl; CPPUNIT_ASSERT(qr.m_errors.count() == 0); - CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1)); - CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7)); + CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1)); + CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7)); CPPUNIT_ASSERT(qr.m_price.isPositive()); q.launch("50492","Globe & Mail"); @@ -141,8 +141,8 @@ void ConverterTest::testWebQuotes() // kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl; CPPUNIT_ASSERT(qr.m_errors.count() == 0); - CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1)); - CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7)); + CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1)); + CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7)); CPPUNIT_ASSERT(qr.m_price.isPositive()); q.launch("TDB647","MSN.CA"); @@ -150,8 +150,8 @@ void ConverterTest::testWebQuotes() // kdDebug(2) << "ConverterTest::testWebQuotes(): quote for " << q.m_symbol << " on " << qr.m_date.toString() << " is " << qr.m_price.toString() << " errors(" << qr.m_errors.count() << "): " << qr.m_errors.join(" /// ") << endl; CPPUNIT_ASSERT(qr.m_errors.count() == 0); - CPPUNIT_ASSERT(qr.m_date <= QDate::currentDate().addDays(1)); - CPPUNIT_ASSERT(qr.m_date >= QDate::currentDate().addDays(-7)); + CPPUNIT_ASSERT(qr.m_date <= TQDate::tqcurrentDate().addDays(1)); + CPPUNIT_ASSERT(qr.m_date >= TQDate::tqcurrentDate().addDays(-7)); CPPUNIT_ASSERT(qr.m_price.isPositive()); } @@ -168,39 +168,39 @@ void ConverterTest::testDateFormat() { MyMoneyDateFormat format("%mm-%dd-%yyyy"); - CPPUNIT_ASSERT(format.convertString("1-5-2005") == QDate(2005,1,5)); - CPPUNIT_ASSERT(format.convertString("jan-15-2005") == QDate(2005,1,15)); - CPPUNIT_ASSERT(format.convertString("august-25-2005") == QDate(2005,8,25)); + CPPUNIT_ASSERT(format.convertString("1-5-2005") == TQDate(2005,1,5)); + CPPUNIT_ASSERT(format.convertString("jan-15-2005") == TQDate(2005,1,15)); + CPPUNIT_ASSERT(format.convertString("august-25-2005") == TQDate(2005,8,25)); format = MyMoneyDateFormat("%mm/%dd/%yy"); - CPPUNIT_ASSERT(format.convertString("1/5/05") == QDate(2005,1,5)); - CPPUNIT_ASSERT(format.convertString("jan/15/05") == QDate(2005,1,15)); - CPPUNIT_ASSERT(format.convertString("august/25/05") == QDate(2005,8,25)); + CPPUNIT_ASSERT(format.convertString("1/5/05") == TQDate(2005,1,5)); + CPPUNIT_ASSERT(format.convertString("jan/15/05") == TQDate(2005,1,15)); + CPPUNIT_ASSERT(format.convertString("august/25/05") == TQDate(2005,8,25)); format = MyMoneyDateFormat("%d\\.%m\\.%yy"); - CPPUNIT_ASSERT(format.convertString("1.5.05") == QDate(2005,5,1)); - CPPUNIT_ASSERT(format.convertString("15.jan.05") == QDate(2005,1,15)); - CPPUNIT_ASSERT(format.convertString("25.august.05") == QDate(2005,8,25)); + CPPUNIT_ASSERT(format.convertString("1.5.05") == TQDate(2005,5,1)); + CPPUNIT_ASSERT(format.convertString("15.jan.05") == TQDate(2005,1,15)); + CPPUNIT_ASSERT(format.convertString("25.august.05") == TQDate(2005,8,25)); format = MyMoneyDateFormat("%yyyy\\\\%dddd\\\\%mmmmmmmmmmm"); - CPPUNIT_ASSERT(format.convertString("2005\\31\\12") == QDate(2005,12,31)); - CPPUNIT_ASSERT(format.convertString("2005\\15\\jan") == QDate(2005,1,15)); - CPPUNIT_ASSERT(format.convertString("2005\\25\\august") == QDate(2005,8,25)); + CPPUNIT_ASSERT(format.convertString("2005\\31\\12") == TQDate(2005,12,31)); + CPPUNIT_ASSERT(format.convertString("2005\\15\\jan") == TQDate(2005,1,15)); + CPPUNIT_ASSERT(format.convertString("2005\\25\\august") == TQDate(2005,8,25)); format = MyMoneyDateFormat("%m %dd, %yyyy"); - CPPUNIT_ASSERT(format.convertString("jan 15, 2005") == QDate(2005,1,15)); - CPPUNIT_ASSERT(format.convertString("august 25, 2005") == QDate(2005,8,25)); - CPPUNIT_ASSERT(format.convertString("january 1st, 2005") == QDate(2005,1,1)); + CPPUNIT_ASSERT(format.convertString("jan 15, 2005") == TQDate(2005,1,15)); + CPPUNIT_ASSERT(format.convertString("august 25, 2005") == TQDate(2005,8,25)); + CPPUNIT_ASSERT(format.convertString("january 1st, 2005") == TQDate(2005,1,1)); format = MyMoneyDateFormat("%m %d %y"); - CPPUNIT_ASSERT(format.convertString("12/31/50",false,2000) == QDate(1950,12,31)); - CPPUNIT_ASSERT(format.convertString("1/1/90",false,2000) == QDate(1990,1,1)); - CPPUNIT_ASSERT(format.convertString("december 31st, 5",false) == QDate(2005,12,31)); + CPPUNIT_ASSERT(format.convertString("12/31/50",false,2000) == TQDate(1950,12,31)); + CPPUNIT_ASSERT(format.convertString("1/1/90",false,2000) == TQDate(1990,1,1)); + CPPUNIT_ASSERT(format.convertString("december 31st, 5",false) == TQDate(2005,12,31)); } catch (MyMoneyException* e) { diff --git a/kmymoney2/converter/imymoneyreader.h b/kmymoney2/converter/imymoneyreader.h index 6222af5..6fa530d 100644 --- a/kmymoney2/converter/imymoneyreader.h +++ b/kmymoney2/converter/imymoneyreader.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -45,13 +45,14 @@ * @author Kevin Tambascio */ -class IMyMoneyReader : public QObject +class IMyMoneyReader : public TQObject { public: IMyMoneyReader() {} virtual ~IMyMoneyReader() {} Q_OBJECT + TQ_OBJECT /** * This method is used to store the filename into the object. @@ -62,7 +63,7 @@ public: * * @param name path and name of the file to be imported */ - virtual void setFilename(const QString& name)=0; + virtual void setFilename(const TQString& name)=0; /** * This method is used to store the name of the profile into the object. @@ -71,16 +72,16 @@ public: * the file is send through this filter and the result * is stored in the m_tempFile file. * - * @param name QString reference to the name of the profile + * @param name TQString reference to the name of the profile */ - virtual void setProfile(const QString& name)=0; + virtual void setProfile(const TQString& name)=0; /** * This method actually starts the import of data from the selected file * into the MyMoney engine. * * This method also starts the user defined import filter program - * defined in the QIF profile(when a QIF file is selected). If none is + * defined in the TQIF profile(when a TQIF file is selected). If none is * defined, the file is read as is (actually the UNIX command * 'cat -' is used as the filter). * @@ -123,12 +124,12 @@ public: virtual void setAskPayeeCategory(const bool ask)=0; virtual const MyMoneyAccount& account() const { return m_account; }; - virtual void setProgressCallback(void(*callback)(int, int, const QString&)) { m_progressCallback = callback; } + virtual void setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; } private: MyMoneyAccount m_account; - void (*m_progressCallback)(int, int, const QString&); - QString m_filename; + void (*m_progressCallback)(int, int, const TQString&); + TQString m_filename; }; diff --git a/kmymoney2/converter/mymoneygncreader.cpp b/kmymoney2/converter/mymoneygncreader.cpp index 40933e3..79f6e89 100644 --- a/kmymoney2/converter/mymoneygncreader.cpp +++ b/kmymoney2/converter/mymoneygncreader.cpp @@ -22,12 +22,12 @@ email : mte@users.sourceforge.net // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qmap.h> -#include <qobject.h> -#include <qfiledialog.h> -#include <qinputdialog.h> -#include <qdatetime.h> +#include <tqfile.h> +#include <tqmap.h> +#include <tqobject.h> +#include <tqfiledialog.h> +#include <tqinputdialog.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -58,13 +58,13 @@ email : mte@users.sourceforge.net #define PASS } catch (MyMoneyException *e) { throw e; } #else #include "mymoneymoney.h" - #include <qtextedit.h> - #define i18n QObject::tr + #include <tqtextedit.h> + #define i18n TQObject::tr #define TRY #define CATCH #define PASS - #define MYMONEYEXCEPTION QString - #define MyMoneyException QString + #define MYMONEYEXCEPTION TQString + #define MyMoneyException TQString #define PACKAGE "KMyMoney" #endif // _GNCFILEANON @@ -112,12 +112,12 @@ GncObject::GncObject () { } // Check that the current element is of a version we are coded for -void GncObject::checkVersion (const QString& elName, const QXmlAttributes& elAttrs, const map_elementVersions& map) { +void GncObject::checkVersion (const TQString& elName, const TQXmlAttributes& elAttrs, const map_elementVersions& map) { TRY - if (map.contains(elName)) { // if it's not in the map, there's nothing to check - if (!map[elName].contains(elAttrs.value("version"))) { - QString em = i18n("%1: Sorry. This importer cannot handle version %2 of element %3") - .arg(__func__).arg(elAttrs.value("version")).arg(elName); + if (map.tqcontains(elName)) { // if it's not in the map, there's nothing to check + if (!map[elName].tqcontains(elAttrs.value("version"))) { + TQString em = i18n("%1: Sorry. This importer cannot handle version %2 of element %3") + .tqarg(__func__).tqarg(elAttrs.value("version")).tqarg(elName); throw new MYMONEYEXCEPTION (em); } } @@ -126,7 +126,7 @@ void GncObject::checkVersion (const QString& elName, const QXmlAttributes& elAtt } // Check if this element is in the current object's sub element list -GncObject *GncObject::isSubElement (const QString& elName, const QXmlAttributes& elAttrs) { +GncObject *GncObject::isSubElement (const TQString& elName, const TQXmlAttributes& elAttrs) { TRY uint i; GncObject *next = 0; @@ -146,7 +146,7 @@ GncObject *GncObject::isSubElement (const QString& elName, const QXmlAttributes& } // Check if this element is in the current object's data element list -bool GncObject::isDataElement (const QString &elName, const QXmlAttributes& elAttrs) { +bool GncObject::isDataElement (const TQString &elName, const TQXmlAttributes& elAttrs) { TRY uint i; for (i = 0; i < m_dataElementListCount; i++) { @@ -162,7 +162,7 @@ bool GncObject::isDataElement (const QString &elName, const QXmlAttributes& elAt } // return the variable string, decoded if required -QString GncObject::var (int i) const { +TQString GncObject::var (int i) const { return (pMain->m_decoder == 0 ? *(m_v.at(i)) : pMain->m_decoder->toUnicode (*(m_v.at(i)))); @@ -173,7 +173,7 @@ void GncObject::adjustHideFactor () { } // data anonymizer -QString GncObject::hide (QString data, unsigned int anonClass) { +TQString GncObject::hide (TQString data, unsigned int anonClass) { TRY if (!pMain->bAnonymize) return (data); // no anonymizing required // counters used to generate names for anonymizer @@ -181,35 +181,35 @@ QString GncObject::hide (QString data, unsigned int anonClass) { static int nextEquity; static int nextPayee; static int nextSched; - static QMap<QString, QString> anonPayees; // to check for duplicate payee names - static QMap<QString, QString> anonStocks; // for reference to equities + static TQMap<TQString, TQString> anonPayees; // to check for duplicate payee names + static TQMap<TQString, TQString> anonStocks; // for reference to equities - QString result (data); - QMap<QString, QString>::Iterator it; + TQString result (data); + TQMap<TQString, TQString>::Iterator it; MyMoneyMoney in, mresult; switch (anonClass) { case ASIS: break; // this is not personal data case SUPPRESS: result = ""; break; // this is personal and is not essential - case NXTACC: result = i18n("Account%1").arg(++nextAccount, -6); break; // generate account name + case NXTACC: result = i18n("Account%1").tqarg(++nextAccount, -6); break; // generate account name case NXTEQU: // generate/return an equity name - it = anonStocks.find (data); + it = anonStocks.tqfind (data); if (it == anonStocks.end()) { - result = i18n("Stock%1").arg(++nextEquity, -6); + result = i18n("Stock%1").tqarg(++nextEquity, -6); anonStocks.insert (data, result); } else { - result = (*it).data(); + result = (*it); } break; case NXTPAY: // genearet/return a payee name - it = anonPayees.find (data); + it = anonPayees.tqfind (data); if (it == anonPayees.end()) { - result = i18n("Payee%1").arg(++nextPayee, -6); + result = i18n("Payee%1").tqarg(++nextPayee, -6); anonPayees.insert (data, result); } else { - result = (*it).data(); + result = (*it); } break; - case NXTSCHD: result = i18n("Schedule%1").arg(++nextSched, -6); break; // generate a schedule name + case NXTSCHD: result = i18n("Schedule%1").tqarg(++nextSched, -6); break; // generate a schedule name case MONEY1: in = MyMoneyMoney(data); if (data == "-1/0") in = MyMoneyMoney (0); // spurious gnucash data - causes a crash sometimes @@ -240,7 +240,7 @@ void GncObject::debugDump () { } //***************************************************************** GncFile::GncFile () { - static const QString subEls[] = {"gnc:book", "gnc:count-data", "gnc:commodity", "price", + static const TQString subEls[] = {"gnc:book", "gnc:count-data", "gnc:commodity", "price", "gnc:account", "gnc:transaction", "gnc:template-transactions", "gnc:schedxaction" }; @@ -287,29 +287,29 @@ void GncFile::endSubEl(GncObject *subObj) { //****************************************** GncDate ********************************************* GncDate::GncDate () { m_subElementListCount = 0; - static const QString dEls[] = {"ts:date", "gdate"}; + static const TQString dEls[] = {"ts:date", "gdate"}; m_dataElementList = dEls; m_dataElementListCount = END_Date_DELS; static const unsigned int anonClasses[] = {ASIS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); } GncDate::~GncDate() {} //*************************************GncCmdtySpec*************************************** GncCmdtySpec::GncCmdtySpec () { m_subElementListCount = 0; - static const QString dEls[] = {"cmdty:space", "cmdty:id"}; + static const TQString dEls[] = {"cmdty:space", "cmdty:id"}; m_dataElementList = dEls; m_dataElementListCount = END_CmdtySpec_DELS; static const unsigned int anonClasses[] = {ASIS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); } GncCmdtySpec::~GncCmdtySpec () {} -QString GncCmdtySpec::hide(QString data, unsigned int) { +TQString GncCmdtySpec::hide(TQString data, unsigned int) { // hide equity names, but not currency names unsigned int newClass = ASIS; switch (m_state) { @@ -321,26 +321,26 @@ QString GncCmdtySpec::hide(QString data, unsigned int) { //************* GncKvp******************************************** GncKvp::GncKvp () { m_subElementListCount = END_Kvp_SELS; - static const QString subEls[] = {"slot"}; // kvp's may be nested + static const TQString subEls[] = {"slot"}; // kvp's may be nested m_subElementList = subEls; m_dataElementListCount = END_Kvp_DELS; - static const QString dataEls[] = {"slot:key", "slot:value"}; + static const TQString dataEls[] = {"slot:key", "slot:value"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_kvpList.setAutoDelete (true); } GncKvp::~GncKvp () {} -void GncKvp::dataEl (const QXmlAttributes& elAttrs) { +void GncKvp::dataEl (const TQXmlAttributes& elAttrs) { switch (m_state) { case VALUE: m_kvpType = elAttrs.value("type"); } m_dataPtr = m_v.at(m_state); - if (key().contains ("formula")) { + if (key().tqcontains ("formula")) { m_anonClass = MONEY2; } else { m_anonClass = ASIS; @@ -378,12 +378,12 @@ GncLot::~GncLot() {} GncCountData::GncCountData() { m_subElementListCount = 0; m_dataElementListCount = 0; - m_v.append (new QString ("")); // only 1 data item + m_v.append (new TQString ("")); // only 1 data item } GncCountData::~GncCountData () {} -void GncCountData::initiate (const QString&, const QXmlAttributes& elAttrs) { +void GncCountData::initiate (const TQString&, const TQXmlAttributes& elAttrs) { m_countType = elAttrs.value ("cd:type"); m_dataPtr = m_v.at(0); return ; @@ -413,12 +413,12 @@ void GncCountData::terminate () { //*********************************GncCommodity*************************************** GncCommodity::GncCommodity () { m_subElementListCount = 0; - static const QString dEls[] = {"cmdty:space", "cmdty:id", "cmdty:name", "cmdty:fraction"}; + static const TQString dEls[] = {"cmdty:space", "cmdty:id", "cmdty:name", "cmdty:fraction"}; m_dataElementList = dEls; m_dataElementListCount = END_Commodity_DELS; static const unsigned int anonClasses[] = {ASIS, NXTEQU, SUPPRESS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); } GncCommodity::~GncCommodity () {} @@ -431,15 +431,15 @@ void GncCommodity::terminate() { } //************* GncPrice******************************************** GncPrice::GncPrice () { - static const QString subEls[] = {"price:commodity", "price:currency", "price:time"}; + static const TQString subEls[] = {"price:commodity", "price:currency", "price:time"}; m_subElementList = subEls; m_subElementListCount = END_Price_SELS; m_dataElementListCount = END_Price_DELS; - static const QString dataEls[] = {"price:value"}; + static const TQString dataEls[] = {"price:value"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_vpCommodity = NULL; m_vpCurrency = NULL; m_vpPriceDate = NULL; @@ -483,16 +483,16 @@ void GncPrice::terminate() { //************* GncAccount******************************************** GncAccount::GncAccount () { m_subElementListCount = END_Account_SELS; - static const QString subEls[] = {"act:commodity", "slot", "act:lots"}; + static const TQString subEls[] = {"act:commodity", "slot", "act:lots"}; m_subElementList = subEls; m_dataElementListCount = END_Account_DELS; - static const QString dataEls[] = {"act:id", "act:name", "act:description", - "act:type", "act:parent"}; + static const TQString dataEls[] = {"act:id", "act:name", "act:description", + "act:type", "act:tqparent"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, NXTACC, SUPPRESS, ASIS, ASIS}; m_anonClassList = anonClasses; m_kvpList.setAutoDelete (true); - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_vpCommodity = NULL; } @@ -534,18 +534,18 @@ void GncAccount::terminate() { //************* GncTransaction******************************************** GncTransaction::GncTransaction (bool processingTemplates) { m_subElementListCount = END_Transaction_SELS; - static const QString subEls[] = {"trn:currency", "trn:date-posted", "trn:date-entered", + static const TQString subEls[] = {"trn:currency", "trn:date-posted", "trn:date-entered", "trn:split", "slot"}; m_subElementList = subEls; m_dataElementListCount = END_Transaction_DELS; - static const QString dataEls[] = {"trn:id", "trn:num", "trn:description"}; + static const TQString dataEls[] = {"trn:id", "trn:num", "trn:description"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, SUPPRESS, NXTPAY}; m_anonClassList = anonClasses; adjustHideFactor(); m_template = processingTemplates; m_splitList.setAutoDelete (true); - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_vpCurrency = NULL; m_vpDateEntered = m_vpDatePosted = NULL; } @@ -602,15 +602,15 @@ void GncTransaction::terminate() { //************* GncSplit******************************************** GncSplit::GncSplit () { m_subElementListCount = END_Split_SELS; - static const QString subEls[] = {"split:reconcile-date"}; + static const TQString subEls[] = {"split:reconcile-date"}; m_subElementList = subEls; m_dataElementListCount = END_Split_DELS; - static const QString dataEls[] = {"split:id", "split:memo", "split:reconciled-state", "split:value", + static const TQString dataEls[] = {"split:id", "split:memo", "split:reconciled-state", "split:value", "split:quantity", "split:account"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, SUPPRESS, ASIS, MONEY1, MONEY1, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_vpDateReconciled = NULL; } @@ -639,15 +639,15 @@ void GncSplit::endSubEl(GncObject *subObj) { //************* GncTemplateSplit******************************************** GncTemplateSplit::GncTemplateSplit () { m_subElementListCount = END_TemplateSplit_SELS; - static const QString subEls[] = {"slot"}; + static const TQString subEls[] = {"slot"}; m_subElementList = subEls; m_dataElementListCount = END_TemplateSplit_DELS; - static const QString dataEls[] = {"split:id", "split:memo", "split:reconciled-state", "split:value", + static const TQString dataEls[] = {"split:id", "split:memo", "split:reconciled-state", "split:value", "split:quantity", "split:account"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, SUPPRESS, ASIS, MONEY1, MONEY1, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_kvpList.setAutoDelete (true); } @@ -674,17 +674,17 @@ void GncTemplateSplit::endSubEl(GncObject *subObj) { //************* GncSchedule******************************************** GncSchedule::GncSchedule () { m_subElementListCount = END_Schedule_SELS; - static const QString subEls[] = {"sx:start", "sx:last", "sx:end", "gnc:freqspec", "gnc:recurrence","sx:deferredInstance"}; + static const TQString subEls[] = {"sx:start", "sx:last", "sx:end", "gnc:freqspec", "gnc:recurrence","sx:deferredInstance"}; m_subElementList = subEls; m_dataElementListCount = END_Schedule_DELS; - static const QString dataEls[] = {"sx:name", "sx:enabled", "sx:autoCreate", "sx:autoCreateNotify", + static const TQString dataEls[] = {"sx:name", "sx:enabled", "sx:autoCreate", "sx:autoCreateNotify", "sx:autoCreateDays", "sx:advanceCreateDays", "sx:advanceRemindDays", "sx:instanceCount", "sx:num-occur", "sx:rem-occur", "sx:templ-acct"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {NXTSCHD, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_vpStartDate = m_vpLastDate = m_vpEndDate = NULL; m_vpFreqSpec = NULL; m_vpRecurrence.clear(); @@ -735,15 +735,15 @@ void GncSchedule::terminate() { //************* GncFreqSpec******************************************** GncFreqSpec::GncFreqSpec () { m_subElementListCount = END_FreqSpec_SELS; - static const QString subEls[] = {"gnc:freqspec"}; + static const TQString subEls[] = {"gnc:freqspec"}; m_subElementList = subEls; m_dataElementListCount = END_FreqSpec_DELS; - static const QString dataEls[] = {"fs:ui_type", "fs:monthly", "fs:daily", "fs:weekly", "fs:interval", + static const TQString dataEls[] = {"fs:ui_type", "fs:monthly", "fs:daily", "fs:weekly", "fs:interval", "fs:offset", "fs:day"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, ASIS, ASIS, ASIS, ASIS, ASIS, ASIS }; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); m_fsList.setAutoDelete (true); } @@ -778,14 +778,14 @@ void GncFreqSpec::terminate() { //************* GncRecurrence******************************************** GncRecurrence::GncRecurrence () { m_subElementListCount = END_Recurrence_SELS; - static const QString subEls[] = {"recurrence:start"}; + static const TQString subEls[] = {"recurrence:start"}; m_subElementList = subEls; m_dataElementListCount = END_Recurrence_DELS; - static const QString dataEls[] = {"recurrence:mult", "recurrence:period_type"}; + static const TQString dataEls[] = {"recurrence:mult", "recurrence:period_type"}; m_dataElementList = dataEls; static const unsigned int anonClasses[] = {ASIS, ASIS}; m_anonClassList = anonClasses; - for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new QString ("")); + for (uint i = 0; i < m_dataElementListCount; i++) m_v.append (new TQString ("")); } GncRecurrence::~GncRecurrence () { @@ -819,7 +819,7 @@ void GncRecurrence::terminate() { return ; } -QString GncRecurrence::getFrequency() const { +TQString GncRecurrence::getFrequency() const { // This function converts a gnucash 2.2 recurrence specification into it's previous equivalent // This will all need re-writing when MTE finishes the schedule re-write if (periodType() == "once") return("once"); @@ -853,9 +853,9 @@ GncSchedDef::~GncSchedDef () {} /************************************************************************************************ XML Reader ************************************************************************************************/ -void XmlReader::processFile (QIODevice* pDevice) { - m_source = new QXmlInputSource (pDevice); // set up the Qt XML reader - m_reader = new QXmlSimpleReader; +void XmlReader::processFile (TQIODevice* pDevice) { + m_source = new TQXmlInputSource (pDevice); // set up the TQt XML reader + m_reader = new TQXmlSimpleReader; m_reader->setContentHandler (this); // go read the file if (!m_reader->parse (m_source)) { @@ -881,13 +881,13 @@ bool XmlReader::startDocument() { return (true); } -bool XmlReader::startElement (const QString&, const QString&, const QString& elName , - const QXmlAttributes& elAttrs) { +bool XmlReader::startElement (const TQString&, const TQString&, const TQString& elName , + const TQXmlAttributes& elAttrs) { try { if (pMain->gncdebug) qDebug ("XML start - %s", elName.latin1()); #ifdef _GNCFILEANON int i; - QString spaces; + TQString spaces; // anonymizer - write data if (elName == "gnc:book" || elName == "gnc:count-data" || elName == "book:id") lastType = -1; pMain->oStream << endl; @@ -934,7 +934,7 @@ bool XmlReader::startElement (const QString&, const QString&, const QString& elN } catch (MyMoneyException *e) { #ifndef _GNCFILEANON // we can't pass on exceptions here coz the XML reader won't catch them and we just abort - KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE); + KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE); qFatal ("%s", e->what().latin1()); #else qFatal ("%s", e->latin1()); @@ -943,11 +943,11 @@ bool XmlReader::startElement (const QString&, const QString&, const QString& elN return true; // to keep compiler happy } -bool XmlReader::endElement( const QString&, const QString&, const QString&elName ) { +bool XmlReader::endElement( const TQString&, const TQString&, const TQString&elName ) { try { if (pMain->xmldebug) qDebug ("XML end - %s", elName.latin1()); #ifdef _GNCFILEANON - QString spaces; + TQString spaces; switch (lastType) { case 2: indentCount -= 2; spaces.fill (' ', indentCount); pMain->oStream << endl << spaces.latin1(); break; @@ -958,7 +958,7 @@ bool XmlReader::endElement( const QString&, const QString&, const QString&elName m_co->resetDataPtr(); // so we don't get extraneous data loaded into the variables if (elName == m_co->getElName()) { // check if this is the end of the current object if (pMain->gncdebug) m_co->debugDump(); // dump the object data (temp) - // call the terminate routine, pop the stack, and advise the parent that it's done + // call the terminate routine, pop the stack, and advise the tqparent that it's done m_co->terminate(); GncObject *temp = m_co; m_os.pop(); @@ -969,7 +969,7 @@ bool XmlReader::endElement( const QString&, const QString&, const QString&elName } catch (MyMoneyException *e) { #ifndef _GNCFILEANON // we can't pass on exceptions here coz the XML reader won't catch them and we just abort - KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE); + KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE); qFatal ("%s", e->what().latin1()); #else qFatal ("%s", e->latin1()); @@ -978,19 +978,19 @@ bool XmlReader::endElement( const QString&, const QString&, const QString&elName return (true); // to keep compiler happy } -bool XmlReader::characters (const QString &data) { +bool XmlReader::characters (const TQString &data) { if (pMain->xmldebug) qDebug ("XML Data received - %d bytes", data.length()); - QString pData = data.stripWhiteSpace(); // data may contain line feeds and indentation spaces + TQString pData = data.stripWhiteSpace(); // data may contain line feeds and indentation spaces if (!pData.isEmpty()) { if (pMain->developerDebug) qDebug ("XML Data - %s", pData.latin1()); m_co->storeData (pData); //go store it #ifdef _GNCFILEANON - QString anonData = m_co->getData (); + TQString anonData = m_co->getData (); if (anonData.isEmpty()) anonData = pData; - // there must be a Qt standard way of doing the following but I can't ... find it - anonData.replace ('<', "<"); - anonData.replace ('>', ">"); - anonData.replace ('&', "&"); + // there must be a TQt standard way of doing the following but I can't ... find it + anonData.tqreplace ('<', "<"); + anonData.tqreplace ('>', ">"); + anonData.tqreplace ('&', "&"); pMain->oStream << anonData; // write original data lastType = 1; #endif // _GNCFILEANON @@ -1025,7 +1025,7 @@ MyMoneyGncReader::MyMoneyGncReader() { m_commodityCount = m_priceCount = m_accountCount = m_transactionCount = m_templateCount = m_scheduleCount = 0; m_decoder = 0; // build a list of valid versions - static const QString versionList[] = {"gnc:book 2.0.0", "gnc:commodity 2.0.0", "gnc:pricedb 1", + static const TQString versionList[] = {"gnc:book 2.0.0", "gnc:commodity 2.0.0", "gnc:pricedb 1", "gnc:account 2.0.0", "gnc:transaction 2.0.0", "gnc:schedxaction 1.0.0", "gnc:schedxaction 2.0.0", // for gnucash 2.2 onward "gnc:freqspec 1.0.0", "zzz" // zzz = stopper @@ -1040,7 +1040,7 @@ MyMoneyGncReader::~MyMoneyGncReader() {} //**************************** Main Entry Point ************************************ #ifndef _GNCFILEANON -void MyMoneyGncReader::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) { +void MyMoneyGncReader::readFile(TQIODevice* pDevice, IMyMoneySerialize* storage) { Q_CHECK_PTR (pDevice); Q_CHECK_PTR (storage); @@ -1059,7 +1059,7 @@ void MyMoneyGncReader::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) terminate (); // do all the wind-up things ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::error(0, i18n("Import failed:\n\n%1").arg(e->what()), PACKAGE); + KMessageBox::error(0, i18n("Import failed:\n\n%1").tqarg(e->what()), PACKAGE); qFatal ("%s", e->what().latin1()); } // end catch signalProgress (0, 1, i18n("Import complete")); // switch off progress bar @@ -1069,10 +1069,10 @@ void MyMoneyGncReader::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) } #else // Control code for the file anonymizer -void MyMoneyGncReader::readFile(QString in, QString out) { - QFile pDevice (in); +void MyMoneyGncReader::readFile(TQString in, TQString out) { + TQFile pDevice (in); if (!pDevice.open (IO_ReadOnly)) qFatal ("Can't open input file"); - QFile outFile (out); + TQFile outFile (out); if (!outFile.open (IO_WriteOnly)) qFatal ("Can't open output file"); oStream.setDevice (&outFile); bAnonymize = true; @@ -1090,16 +1090,16 @@ void MyMoneyGncReader::readFile(QString in, QString out) { return ; } -#include <qapplication.h> +#include <tqapplication.h> int main (int argc, char ** argv) { - QApplication a (argc, argv); + TQApplication a (argc, argv); MyMoneyGncReader m; - QString inFile, outFile; + TQString inFile, outFile; if (argc > 0) inFile = a.argv()[1]; if (argc > 1) outFile = a.argv()[2]; if (inFile.isEmpty()) { - inFile = QFileDialog::getOpenFileName("", + inFile = TQFileDialog::getOpenFileName("", "Gnucash files(*.nc *)", 0); } @@ -1113,15 +1113,15 @@ int main (int argc, char ** argv) { void MyMoneyGncReader::setFileHideFactor () { #define MINFILEHIDEF 0.01 #define MAXFILEHIDEF 99.99 - srand (QTime::currentTime().second()); // seed randomizer for anonymize + srand (TQTime::currentTime().second()); // seed randomizer for anonymize m_fileHideFactor = 0.0; while (m_fileHideFactor == 0.0) { - m_fileHideFactor = QInputDialog::getDouble ( + m_fileHideFactor = TQInputDialog::getDouble ( i18n ("Disguise your wealth"), i18n ("Each monetary value on your file will be multiplied by a random number between 0.01 and 1.99\n" "with a different value used for each transaction. In addition, to further disguise the true\n" "values, you may enter a number between %1 and %2 which will be applied to all values.\n" - "These numbers will not be stored in the file.").arg(MINFILEHIDEF).arg(MAXFILEHIDEF), + "These numbers will not be stored in the file.").tqarg(MINFILEHIDEF).tqarg(MAXFILEHIDEF), (1.0 + (int)(1000.0 * rand() / (RAND_MAX + 1.0))) / 100.0, MINFILEHIDEF, MAXFILEHIDEF, 2); } @@ -1192,22 +1192,22 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { acc.setDescription(gac->desc()); - QDate currentDate = QDate::currentDate(); - acc.setOpeningDate(currentDate); - acc.setLastModified(currentDate); - acc.setLastReconciliationDate(currentDate); + TQDate tqcurrentDate = TQDate::tqcurrentDate(); + acc.setOpeningDate(tqcurrentDate); + acc.setLastModified(tqcurrentDate); + acc.setLastReconciliationDate(tqcurrentDate); if (gac->commodity()->isCurrency()) { acc.setCurrencyId (gac->commodity()->id().utf8()); m_currencyCount[gac->commodity()->id()]++; } - acc.setParentAccountId (gac->parent().utf8()); - // now determine the account type and its parent id + acc.setParentAccountId (gac->tqparent().utf8()); + // now determine the account type and its tqparent id /* This list taken from # Feb 2006: A RELAX NG Compact schema for gnucash "v2" XML files. # Copyright (C) 2006 Joshua Sled <jsled@asynchronous.org> "NO_TYPE" "BANK" "CASH" "CREDIT" "ASSET" "LIABILITY" "STOCK" "MUTUAL" "CURRENCY" -"INCOME" "EXPENSE" "EQUITY" "RECEIVABLE" "PAYABLE" "CHECKING" "SAVINGS" "MONEYMRKT" "CREDITLINE" +"INCOME" "EXPENSE" "ETQUITY" "RECEIVABLE" "PAYABLE" "CHECKING" "SAVINGS" "MONEYMRKT" "CREDITLINE" Some don't seem to be used in practice. Not sure what CREDITLINE s/be converted as. */ if ("BANK" == gac->type() || "CHECKING" == gac->type()) { @@ -1230,7 +1230,7 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { } else { acc.setAccountType(MyMoneyAccount::Stock); } - } else if ("EQUITY" == gac->type()) { + } else if ("ETQUITY" == gac->type()) { acc.setAccountType(MyMoneyAccount::Equity); } else if ("LIABILITY" == gac->type()) { acc.setAccountType(MyMoneyAccount::Liability); @@ -1247,12 +1247,12 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { } else if ("MONEYMRKT" == gac->type()) { acc.setAccountType(MyMoneyAccount::MoneyMarket); } else { // we have here an account type we can't currently handle - QString em = - i18n("Current importer does not recognize GnuCash account type %1").arg(gac->type()); + TQString em = + i18n("Current importer does not recognize GnuCash account type %1").tqarg(gac->type()); throw new MYMONEYEXCEPTION (em); } - // if no parent account is present, assign to one of our standard accounts - if ((acc.parentAccountId().isEmpty()) || (acc.parentAccountId() == m_rootId)) { + // if no tqparent account is present, assign to one of our standard accounts + if ((acc.tqparentAccountId().isEmpty()) || (acc.tqparentAccountId() == m_rootId)) { switch (acc.accountGroup()) { case MyMoneyAccount::Asset: acc.setParentAccountId (m_storage->asset().id()); break; case MyMoneyAccount::Liability: acc.setParentAccountId (m_storage->liability().id()); break; @@ -1281,10 +1281,10 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { // NB: In gnc, this selection is per account, in KMM, per security // This is unlikely to cause problems in practice. If it does, // we probably need to introduce a 'pricing basis' in the account class - QPtrListIterator<GncObject> kvpi (gac->m_kvpList); + TQPtrListIterator<GncObject> kvpi (gac->m_kvpList); GncKvp *k; while ((k = static_cast<GncKvp *>(kvpi.current())) != 0) { - if (k->key().contains("price-source") && k->type() == "string") { + if (k->key().tqcontains("price-source") && k->type() == "string") { getPriceSource (e, k->value()); break; } else { @@ -1294,10 +1294,10 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { } // check for tax-related status - QPtrListIterator<GncObject> kvpi (gac->m_kvpList); + TQPtrListIterator<GncObject> kvpi (gac->m_kvpList); GncKvp *k; while ((k = static_cast<GncKvp *>(kvpi.current())) != 0) { - if (k->key().contains("tax-related") && k->type() == "integer" && k->value() == "1") { + if (k->key().tqcontains("tax-related") && k->type() == "integer" && k->value() == "1") { acc.setValue ("Tax", "Yes"); break; } else { @@ -1310,9 +1310,9 @@ void MyMoneyGncReader::convertAccount (const GncAccount* gac) { m_storage->addAccount(acc); m_mapIds[gac->id().utf8()] = acc.id(); // to link gnucash id to ours for tx posting - if (gncdebug) qDebug("Gnucash account %s has id of %s, type of %s, parent is %s", + if (gncdebug) qDebug("Gnucash account %s has id of %s, type of %s, tqparent is %s", gac->id().latin1(), acc.id().data(), - KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.parentAccountId().data()); + KMyMoneyUtils::accountTypeToString(acc.accountType()).latin1(), acc.tqparentAccountId().data()); signalProgress (++m_accountCount, 0); return ; @@ -1365,7 +1365,7 @@ void MyMoneyGncReader::convertTransaction (const GncTransaction *gtx) { const GncKvp *slot = gtx->getKvp(i); if (slot->key() == "notes") tx.setMemo(slot->value()); } - QValueList<MyMoneySplit>::iterator it = m_splitList.begin(); + TQValueList<MyMoneySplit>::iterator it = m_splitList.begin(); while (!m_splitList.isEmpty()) { split = *it; // at this point, if m_potentialTransfer is still true, it is actually one! @@ -1389,8 +1389,8 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { MyMoneySplit split; MyMoneyAccount splitAccount; // find the kmm account id coresponding to the gnc id - QString kmmAccountId; - map_accountIds::Iterator id = m_mapIds.find(gsp->acct().utf8()); + TQString kmmAccountId; + map_accountIds::Iterator id = m_mapIds.tqfind(gsp->acct().utf8()); if (id != m_mapIds.end()) { kmmAccountId = id.data(); } else { // for the case where the acs not found (which shouldn't happen?), create an account with gnc name @@ -1406,7 +1406,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { // payee id split.setPayeeId (m_txPayeeId.utf8()); // reconciled state and date - switch (gsp->recon().at(0).latin1()) { + switch (gsp->recon().tqat(0).latin1()) { case 'n': split.setReconcileFlag(MyMoneySplit::NotReconciled); break; case 'c': @@ -1425,7 +1425,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { MyMoneyMoney splitValue (convBadValue (gsp->value())); if (gsp->value() == "-1/0") { // treat gnc invalid value as zero // it's not quite a consistency check, but easier to treat it as such - postMessage ("CC", 4, splitAccount.name().latin1(), m_txDatePosted.toString(Qt::ISODate).latin1()); + postMessage ("CC", 4, splitAccount.name().latin1(), TQString(m_txDatePosted.toString(Qt::ISODate)).latin1()); } MyMoneyMoney splitQuantity(convBadValue(gsp->qty())); split.setValue (splitValue); @@ -1466,7 +1466,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { e.setTradingCurrency (m_txCommodity); if (gncdebug) qDebug ("added price for %s, %s date %s", e.name().latin1(), newPrice.toString().latin1(), - m_txDatePosted.toString(Qt::ISODate).latin1()); + TQString(m_txDatePosted.toString(Qt::ISODate)).latin1()); m_storage->modifySecurity(e); MyMoneyPrice dealPrice (e.id(), m_txCommodity, m_txDatePosted, newPrice, i18n("Imported Transaction")); m_storage->addPrice (dealPrice); @@ -1479,7 +1479,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { if (split.value().isNegative()) { bool isNumeric = false; if (!split.number().isEmpty()) { - split.number().toLong(&isNumeric); // No QString.isNumeric()?? + split.number().toLong(&isNumeric); // No TQString.isNumeric()?? } if (isNumeric) { split.setAction (MyMoneySplit::ActionCheck); @@ -1510,7 +1510,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) { return ; } //********************************* convertTemplateTransaction ********************************************** -MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const QString& schedName, const GncTransaction *gtx) { +MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const TQString& schedName, const GncTransaction *gtx) { Q_CHECK_PTR (gtx); MyMoneyTransaction tx; @@ -1540,7 +1540,7 @@ MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const QString& convertTemplateSplit (schedName, static_cast<const GncTemplateSplit *>(gtx->getSplit (i))); } // determine the action type for the splits and link them to the template tx - /*QString negativeActionType, positiveActionType; + /*TQString negativeActionType, positiveActionType; if (!m_splitList.isEmpty()) { // if there are asset splits positiveActionType = MyMoneySplit::ActionDeposit; negativeActionType = MyMoneySplit::ActionWithdrawal; @@ -1554,8 +1554,8 @@ MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const QString& // also, determine the action type. first off, is it a transfer (can only have 2 splits?) if (m_splitList.count() != 2) m_potentialTransfer = false; // at this point, if m_potentialTransfer is still true, it is actually one! - QString txMemo = ""; - QValueList<MyMoneySplit>::iterator it = m_splitList.begin(); + TQString txMemo = ""; + TQValueList<MyMoneySplit>::iterator it = m_splitList.begin(); while (!m_splitList.isEmpty()) { split = *it; if (m_potentialTransfer) { @@ -1583,7 +1583,7 @@ MyMoneyTransaction MyMoneyGncReader::convertTemplateTransaction (const QString& return (tx); } //********************************* convertTemplateSplit **************************************************** -void MyMoneyGncReader::convertTemplateSplit (const QString& schedName, const GncTemplateSplit *gsp) { +void MyMoneyGncReader::convertTemplateSplit (const TQString& schedName, const GncTemplateSplit *gsp) { Q_CHECK_PTR (gsp); // convertTemplateSplit MyMoneySplit split; @@ -1601,14 +1601,14 @@ void MyMoneyGncReader::convertTemplateSplit (const QString& schedName, const Gnc // read split slots (KVPs) int xactionCount = 0; int validSlotCount = 0; - QString gncAccountId; + TQString gncAccountId; for (i = 0; i < gsp->kvpCount(); i++ ) { const GncKvp *slot = gsp->getKvp(i); if ((slot->key() == "sched-xaction") && (slot->type() == "frame")) { bool bFoundStringCreditFormula = false; bool bFoundStringDebitFormula = false; bool bFoundGuidAccountId = false; - QString gncCreditFormula, gncDebitFormula; + TQString gncCreditFormula, gncDebitFormula; for (j = 0; j < slot->kvpCount(); j++) { const GncKvp *subSlot = slot->getKvp (j); // again, see comments above. when we have a full specification @@ -1635,7 +1635,7 @@ void MyMoneyGncReader::convertTemplateSplit (const QString& schedName, const Gnc // validate numeric, work out sign MyMoneyMoney exFormula (0); exFormula.setNegativeMonetarySignPosition (MyMoneyMoney::BeforeQuantityMoney); - QString numericTest; + TQString numericTest; char crdr=0 ; if (!gncCreditFormula.isEmpty()) { crdr = 'C'; @@ -1646,10 +1646,10 @@ void MyMoneyGncReader::convertTemplateSplit (const QString& schedName, const Gnc } kMyMoneyMoneyValidator v (0); int pos; // useless, but required for validator - if (v.validate (numericTest, pos) == QValidator::Acceptable) { + if (v.validate (numericTest, pos) == TQValidator::Acceptable) { switch (crdr) { case 'C': - exFormula = QString ("-" + numericTest); break; + exFormula = TQString ("-" + numericTest); break; case 'D': exFormula = numericTest; } @@ -1678,8 +1678,8 @@ void MyMoneyGncReader::convertTemplateSplit (const QString& schedName, const Gnc m_suspectSchedule = true; } // find the kmm account id coresponding to the gnc id - QString kmmAccountId; - map_accountIds::Iterator id = m_mapIds.find(gncAccountId.utf8()); + TQString kmmAccountId; + map_accountIds::Iterator id = m_mapIds.tqfind(gncAccountId.utf8()); if (id != m_mapIds.end()) { kmmAccountId = id.data(); } else { // for the case where the acs not found (which shouldn't happen?), create an account with gnc name @@ -1716,15 +1716,15 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { MyMoneySchedule sc; MyMoneyTransaction tx; m_suspectSchedule = false; - QDate startDate, nextDate, lastDate, endDate; // for date calculations - QDate today = QDate::currentDate(); + TQDate startDate, nextDate, lastDate, endDate; // for date calculations + TQDate today = TQDate::tqcurrentDate(); int numOccurs, remOccurs; if (m_scheduleCount == 0) signalProgress (0, m_gncScheduleCount, i18n("Loading schedules...")); // schedule name sc.setName(gsc->name()); // find the transaction template as stored earlier - QPtrListIterator<GncTransaction> itt (m_templateList); + TQPtrListIterator<GncTransaction> itt (m_templateList); GncTransaction *ttx; while ((ttx = itt.current()) != 0) { // the id to match against is the split:account value in the splits @@ -1732,7 +1732,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { ++itt; } if (itt == 0) { - throw new MYMONEYEXCEPTION (i18n("Can't find template transaction for schedule %1").arg(sc.name())); + throw new MYMONEYEXCEPTION (i18n("Can't find template transaction for schedule %1").tqarg(sc.name())); } else { tx = convertTemplateTransaction (sc.name(), *itt); } @@ -1740,7 +1740,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { // define the conversion table for intervals struct convIntvl { - QString gncType; // the gnucash name + TQString gncType; // the gnucash name unsigned char interval; // for date calculation unsigned int intervalCount; MyMoneySchedule::occurenceE occ; // equivalent occurence code @@ -1765,7 +1765,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { {"monthly", 'm', 1, MyMoneySchedule::OCCUR_MONTHLY, MyMoneySchedule::MoveNothing }, {"two-monthly", 'm', 2, MyMoneySchedule::OCCUR_EVERYOTHERMONTH, MyMoneySchedule::MoveNothing }, - {"quarterly", 'm', 3, MyMoneySchedule::OCCUR_QUARTERLY, MyMoneySchedule::MoveNothing }, + {"quarterly", 'm', 3, MyMoneySchedule::OCCUR_TQUARTERLY, MyMoneySchedule::MoveNothing }, {"tri_annually", 'm', 4, MyMoneySchedule::OCCUR_EVERYFOURMONTHS, MyMoneySchedule::MoveNothing }, {"semi_yearly", 'm', 6, MyMoneySchedule::OCCUR_TWICEYEARLY, MyMoneySchedule::MoveNothing }, {"yearly", 'y', 1, MyMoneySchedule::OCCUR_YEARLY, MyMoneySchedule::MoveNothing }, @@ -1775,16 +1775,16 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { // zzz = stopper, may cause problems. what else can we do? }; - QString frequency = "unknown"; // set default to unknown frequency + TQString frequency = "unknown"; // set default to unknown frequency bool unknownOccurs = false; // may have zero, or more than one frequency/recurrence spec - QString schedEnabled; + TQString schedEnabled; if (gsc->version() == "2.0.0") { if (gsc->m_vpRecurrence.count() != 1) { unknownOccurs = true; } else { const GncRecurrence *gre = gsc->m_vpRecurrence.first(); - //qDebug (QString("Sched %1, pt %2, mu %3, sd %4").arg(gsc->name()).arg(gre->periodType()) - // .arg(gre->mult()).arg(gre->startDate().toString(Qt::ISODate))); + //qDebug (TQString("Sched %1, pt %2, mu %3, sd %4").tqarg(gsc->name()).tqarg(gre->periodType()) + // .tqarg(gre->mult()).tqarg(gre->startDate().toString(Qt::ISODate))); frequency = gre->getFrequency(); schedEnabled = gsc->enabled(); } @@ -1821,7 +1821,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { // if a last date was specified, use it, otherwise try to work out the last date sc.setLastPayment(gsc->lastDate()); numOccurs = gsc->numOccurs().toInt(); - if (sc.lastPayment() == QDate()) { + if (sc.lastPayment() == TQDate()) { nextDate = lastDate = gsc->startDate(); while ((nextDate < today) && (numOccurs-- != 0)) { lastDate = nextDate; @@ -1837,7 +1837,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { sc.setEndDate(gsc->endDate()); numOccurs = gsc->numOccurs().toInt(); remOccurs = gsc->remOccurs().toInt(); - if ((sc.endDate() == QDate()) && (remOccurs > 0)) { + if ((sc.endDate() == TQDate()) && (remOccurs > 0)) { endDate = sc.lastPayment(); while (remOccurs-- > 0) { endDate = incrDate (endDate, vi[i].interval, vi[i].intervalCount); @@ -1853,11 +1853,11 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) { sc.setPaymentType((MyMoneySchedule::paymentTypeE)MyMoneySchedule::STYPE_OTHER); sc.setFixed (!m_suspectSchedule); // if any probs were found, set it as variable so user will always be prompted // we don't currently have a 'disable' option, but just make sure auto-enter is off if not enabled - //qDebug(QString("%1 and %2").arg(gsc->autoCreate()).arg(schedEnabled)); + //qDebug(TQString("%1 and %2").tqarg(gsc->autoCreate()).tqarg(schedEnabled)); sc.setAutoEnter ((gsc->autoCreate() == "y") && (schedEnabled == "y")); - //qDebug(QString("autoEnter set to %1").arg(sc.autoEnter())); + //qDebug(TQString("autoEnter set to %1").tqarg(sc.autoEnter())); // type - QString actionType = tx.splits().first().action(); + TQString actionType = tx.splits().first().action(); if (actionType == MyMoneySplit::ActionDeposit) { sc.setType((MyMoneySchedule::typeE)MyMoneySchedule::TYPE_DEPOSIT); } else if (actionType == MyMoneySplit::ActionTransfer) { @@ -1902,51 +1902,51 @@ void MyMoneyGncReader::terminate () { } // first step is to implement the users investment option, now we // have all the accounts available - QValueList<QString>::iterator stocks; + TQValueList<TQString>::iterator stocks; for (stocks = m_stockList.begin(); stocks != m_stockList.end(); ++stocks) { checkInvestmentOption (*stocks); } - // Next step is to walk the list and assign the parent/child relationship between the objects. + // Next step is to walk the list and assign the tqparent/child relationship between the objects. unsigned int i = 0; signalProgress (0, m_accountCount, i18n ("Reorganizing accounts...")); - QValueList<MyMoneyAccount> list; - QValueList<MyMoneyAccount>::Iterator acc; + TQValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::Iterator acc; m_storage->accountList(list); for (acc = list.begin(); acc != list.end(); ++acc) { - if ((*acc).parentAccountId() == m_storage->asset().id()) { + if ((*acc).tqparentAccountId() == m_storage->asset().id()) { MyMoneyAccount assets = m_storage->asset(); m_storage->addAccount(assets, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main asset account", (*acc).id().data()); - } else if ((*acc).parentAccountId() == m_storage->liability().id()) { + } else if ((*acc).tqparentAccountId() == m_storage->liability().id()) { MyMoneyAccount liabilities = m_storage->liability(); m_storage->addAccount(liabilities, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main liability account", (*acc).id().data()); - } else if ((*acc).parentAccountId() == m_storage->income().id()) { + } else if ((*acc).tqparentAccountId() == m_storage->income().id()) { MyMoneyAccount incomes = m_storage->income(); m_storage->addAccount(incomes, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main income account", (*acc).id().data()); - } else if ((*acc).parentAccountId() == m_storage->expense().id()) { + } else if ((*acc).tqparentAccountId() == m_storage->expense().id()) { MyMoneyAccount expenses = m_storage->expense(); m_storage->addAccount(expenses, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main expense account", (*acc).id().data()); - } else if ((*acc).parentAccountId() == m_storage->equity().id()) { + } else if ((*acc).tqparentAccountId() == m_storage->equity().id()) { MyMoneyAccount equity = m_storage->equity(); m_storage->addAccount(equity, (*acc)); if (gncdebug) qDebug("Account id %s is a child of the main equity account", (*acc).id().data()); - } else if ((*acc).parentAccountId() == m_rootId) { + } else if ((*acc).tqparentAccountId() == m_rootId) { if (gncdebug) qDebug("Account id %s is a child of root", (*acc).id().data()); } else { - // it is not under one of the main accounts, so find gnucash parent - QString parentKey = (*acc).parentAccountId(); - if (gncdebug) qDebug ("acc %s, parent %s", (*acc).id().data(), - (*acc).parentAccountId().data()); - map_accountIds::Iterator id = m_mapIds.find(parentKey); + // it is not under one of the main accounts, so find gnucash tqparent + TQString tqparentKey = (*acc).tqparentAccountId(); + if (gncdebug) qDebug ("acc %s, tqparent %s", (*acc).id().data(), + (*acc).tqparentAccountId().data()); + map_accountIds::Iterator id = m_mapIds.tqfind(tqparentKey); if (id != m_mapIds.end()) { - if (gncdebug) qDebug("Setting account id %s's parent account id to %s", + if (gncdebug) qDebug("Setting account id %s's tqparent account id to %s", (*acc).id().data(), id.data().data()); - MyMoneyAccount parent = m_storage->account(id.data()); - parent = checkConsistency (parent, (*acc)); - m_storage->addAccount (parent, (*acc)); + MyMoneyAccount tqparent = m_storage->account(id.data()); + tqparent = checkConsistency (tqparent, (*acc)); + m_storage->addAccount (tqparent, (*acc)); } else { throw new MYMONEYEXCEPTION ("terminate() could not find account id"); } @@ -1955,9 +1955,9 @@ void MyMoneyGncReader::terminate () { } // end for account signalProgress (0, 1, (".")); // debug - get rid of reorg message // offer the most common account currency as a default - QString mainCurrency = ""; + TQString mainCurrency = ""; unsigned int maxCount = 0; - QMap<QString, unsigned int>::ConstIterator it; + TQMap<TQString, unsigned int>::ConstIterator it; for (it = m_currencyCount.begin(); it != m_currencyCount.end(); ++it) { if (it.data() > maxCount) { maxCount = it.data(); @@ -1966,12 +1966,12 @@ void MyMoneyGncReader::terminate () { } if (mainCurrency != "") { - /* fix for qt3.3.4?. According to Qt docs, this should return the enum id of the button pressed, and + /* fix for qt3.3.4?. According to TQt docs, this should return the enum id of the button pressed, and indeed it used to do so. However now it seems to return the index of the button. In this case it doesn't matter, since for Yes, the id is 3 and the index is 0, whereas the No button will return 4 or 1. So we test for either Yes case */ /* and now it seems to have changed again, returning 259 for a Yes??? so use KMessagebox */ - QString question = i18n("Your main currency seems to be %1 (%2); do you want to set this as your base currency?") - .arg(mainCurrency).arg(m_storage->currency(mainCurrency.utf8()).name()); + TQString question = i18n("Your main currency seems to be %1 (%2); do you want to set this as your base currency?") + .tqarg(mainCurrency).tqarg(m_storage->currency(mainCurrency.utf8()).name()); if(KMessageBox::questionYesNo(0, question, PACKAGE) == KMessageBox::Yes) { m_storage->setValue ("kmm-baseCurrency", mainCurrency); } @@ -1983,7 +1983,7 @@ void MyMoneyGncReader::terminate () { if ((*m_messageList.at(i)).source == "OR") m_orCount++; if ((*m_messageList.at(i)).source == "SC") m_scCount++; } - QValueList<QString> sectionsToReport; // list of sections needing report + TQValueList<TQString> sectionsToReport; // list of sections needing report sectionsToReport.append ("MN"); // always build the main section if (m_ccCount > 0) sectionsToReport.append ("CC"); if (m_orCount > 0) sectionsToReport.append ("OR"); @@ -1991,11 +1991,11 @@ void MyMoneyGncReader::terminate () { // produce the sections in message boxes bool exit = false; for (i = 0; (i < sectionsToReport.count()) && !exit; i++) { - QString button0Text = i18n("More"); + TQString button0Text = i18n("More"); if (i + 1 == sectionsToReport.count()) button0Text = i18n("Done"); // last section - KGuiItem yesItem(button0Text, QIconSet(), "", ""); - KGuiItem noItem(i18n("Save Report"), QIconSet(), "", ""); + KGuiItem yesItem(button0Text, TQIconSet(), "", ""); + KGuiItem noItem(i18n("Save Report"), TQIconSet(), "", ""); switch(KMessageBox::questionYesNoCancel(0, buildReportSection (*sectionsToReport.at(i)), @@ -2015,7 +2015,7 @@ void MyMoneyGncReader::terminate () { for (i = 0; i < m_suspectList.count(); i++) { MyMoneySchedule sc = m_storage->schedule(m_suspectList[i]); KEditScheduleDlg *s; - switch(KMessageBox::warningYesNo(0, i18n("Problems were encountered in converting schedule '%1'.\nDo you want to review or edit it now?").arg(sc.name()), PACKAGE)) { + switch(KMessageBox::warningYesNo(0, i18n("Problems were encountered in converting schedule '%1'.\nDo you want to review or edit it now?").tqarg(sc.name()), PACKAGE)) { case KMessageBox::Yes: s = new KEditScheduleDlg (sc); // FIXME: connect newCategory to something useful, so that we @@ -2032,36 +2032,36 @@ void MyMoneyGncReader::terminate () { PASS } //************************************ buildReportSection************************************ -QString MyMoneyGncReader::buildReportSection (const QString& source) { +TQString MyMoneyGncReader::buildReportSection (const TQString& source) { TRY - QString s = ""; + TQString s = ""; bool more = false; if (source == "MN") { s.append (i18n("Found:\n\n")); - s.append (QString::number(m_commodityCount) + i18n(" commodities (equities)\n")); - s.append (QString::number(m_priceCount) + i18n(" prices\n")); - s.append (QString::number(m_accountCount) + i18n(" accounts\n")); - s.append (QString::number(m_transactionCount) + i18n(" transactions\n")); - s.append (QString::number(m_scheduleCount) + i18n(" schedules\n")); + s.append (TQString::number(m_commodityCount) + i18n(" commodities (equities)\n")); + s.append (TQString::number(m_priceCount) + i18n(" prices\n")); + s.append (TQString::number(m_accountCount) + i18n(" accounts\n")); + s.append (TQString::number(m_transactionCount) + i18n(" transactions\n")); + s.append (TQString::number(m_scheduleCount) + i18n(" schedules\n")); s.append ("\n\n"); if (m_ccCount == 0) { s.append (i18n("No inconsistencies were detected")); } else { - s.append (QString::number(m_ccCount) + i18n(" inconsistencies were detected and corrected\n")); + s.append (TQString::number(m_ccCount) + i18n(" inconsistencies were detected and corrected\n")); more = true; } if (m_orCount > 0) { s.append ("\n\n"); - s.append (QString::number(m_orCount) + i18n(" orphan accounts were created\n")); + s.append (TQString::number(m_orCount) + i18n(" orphan accounts were created\n")); more = true; } if (m_scCount > 0) { s.append ("\n\n"); - s.append (QString::number(m_scCount) + i18n(" possible schedule problems were noted\n")); + s.append (TQString::number(m_scCount) + i18n(" possible schedule problems were noted\n")); more = true; } - QString unsupported (""); - QString lineSep ("\n - "); + TQString unsupported (""); + TQString lineSep ("\n - "); if (m_smallBusinessFound) unsupported.append(lineSep + i18n("Small Business Features (Customers, Invoices, etc.)")); if (m_budgetsFound) unsupported.append(lineSep + i18n("Budgets")); if (m_lotsFound) unsupported.append(lineSep + i18n("Lots")); @@ -2076,9 +2076,9 @@ QString MyMoneyGncReader::buildReportSection (const QString& source) { for (i = 0; i < m_messageList.count(); i++) { GncMessageArgs *m = m_messageList.at(i); if (m->source == source) { - if (gncdebug) qDebug("%s", QString("build text source %1, code %2, argcount %3") - .arg(m->source).arg(m->code).arg(m->args.count()).data()); - QString ss = GncMessages::text (m->source, m->code); + if (gncdebug) qDebug("%s", TQString("build text source %1, code %2, argcount %3") + .tqarg(m->source).tqarg(m->code).tqarg(m->args.count()).data()); + TQString ss = GncMessages::text (m->source, m->code); // add variable args. the .arg function seems always to replace the // lowest numbered placeholder it finds, so translating messages // with variables in a different order should still work okay (I think...) @@ -2088,26 +2088,26 @@ QString MyMoneyGncReader::buildReportSection (const QString& source) { } } if (gncdebug) qDebug ("%s", s.latin1()); - return (static_cast<const QString>(s)); + return (static_cast<const TQString>(s)); PASS } //************************ writeReportToFile********************************* -bool MyMoneyGncReader::writeReportToFile (const QValueList<QString>& sectionsToReport) { +bool MyMoneyGncReader::writeReportToFile (const TQValueList<TQString>& sectionsToReport) { TRY unsigned int i; - QFileDialog* fd = new QFileDialog (0, "Save report as", TRUE); - fd->setMode (QFileDialog::AnyFile); - if (fd->exec() != QDialog::Accepted) { + TQFileDialog* fd = new TQFileDialog (0, "Save report as", TRUE); + fd->setMode (TQFileDialog::AnyFile); + if (fd->exec() != TQDialog::Accepted) { delete fd; return (false); } - QFile reportFile(fd->selectedFile()); - QFileInfo fi (reportFile); + TQFile reportFile(fd->selectedFile()); + TQFileInfo fi (reportFile); if (!reportFile.open (IO_WriteOnly)) { delete fd; return (false); } - QTextStream stream (&reportFile); + TQTextStream stream (&reportFile); for (i = 0; i < sectionsToReport.count(); i++) { stream << buildReportSection (*sectionsToReport.at(i)).latin1() << endl; } @@ -2121,7 +2121,7 @@ bool MyMoneyGncReader::writeReportToFile (const QValueList<QString>& sectionsToR *****************************************************************************/ //************************ createPayee *************************** -QString MyMoneyGncReader::createPayee (const QString& gncDescription) { +TQString MyMoneyGncReader::createPayee (const TQString& gncDescription) { MyMoneyPayee payee; try { payee = m_storage->payeeByName (gncDescription); @@ -2133,13 +2133,13 @@ QString MyMoneyGncReader::createPayee (const QString& gncDescription) { return (payee.id()); } //************************************** createOrphanAccount ******************************* -QString MyMoneyGncReader::createOrphanAccount (const QString& gncName) { +TQString MyMoneyGncReader::createOrphanAccount (const TQString& gncName) { MyMoneyAccount acc; acc.setName ("orphan_" + gncName); acc.setDescription (i18n("Orphan created from unknown gnucash account")); - QDate today = QDate::currentDate(); + TQDate today = TQDate::tqcurrentDate(); acc.setOpeningDate (today); acc.setLastModified (today); @@ -2150,11 +2150,11 @@ QString MyMoneyGncReader::createOrphanAccount (const QString& gncName) { m_storage->addAccount (acc); // assign the gnucash id as the key into the map to find our id m_mapIds[gncName.utf8()] = acc.id(); - postMessage ("OR", 1, acc.name().data()); + postMessage (TQString("OR"), 1, acc.name().ascii()); return (acc.id()); } //****************************** incrDate ********************************************* -QDate MyMoneyGncReader::incrDate (QDate lastDate, unsigned char interval, unsigned int intervalCount) { +TQDate MyMoneyGncReader::incrDate (TQDate lastDate, unsigned char interval, unsigned int intervalCount) { TRY switch (interval) { case 'd': @@ -2169,79 +2169,79 @@ QDate MyMoneyGncReader::incrDate (QDate lastDate, unsigned char interval, unsign return (lastDate); } throw new MYMONEYEXCEPTION (i18n("Internal error - invalid interval char in incrDate")); - QDate r = QDate(); return (r); // to keep compiler happy + TQDate r = TQDate(); return (r); // to keep compiler happy PASS } //********************************* checkConsistency ********************************** -MyMoneyAccount MyMoneyGncReader::checkConsistency (MyMoneyAccount& parent, MyMoneyAccount& child) { +MyMoneyAccount MyMoneyGncReader::checkConsistency (MyMoneyAccount& tqparent, MyMoneyAccount& child) { TRY // gnucash is flexible/weird enough to allow various inconsistencies // these are a couple I found in my file, no doubt more will be discovered if ((child.accountType() == MyMoneyAccount::Investment) && - (parent.accountType() != MyMoneyAccount::Asset)) { + (tqparent.accountType() != MyMoneyAccount::Asset)) { postMessage ("CC", 1, child.name().latin1()); return m_storage->asset(); } if ((child.accountType() == MyMoneyAccount::Income) && - (parent.accountType() != MyMoneyAccount::Income)) { + (tqparent.accountType() != MyMoneyAccount::Income)) { postMessage ("CC", 2, child.name().latin1()); return m_storage->income(); } if ((child.accountType() == MyMoneyAccount::Expense) && - (parent.accountType() != MyMoneyAccount::Expense)) { + (tqparent.accountType() != MyMoneyAccount::Expense)) { postMessage ("CC", 3, child.name().latin1()); return m_storage->expense(); } - return (parent); + return (tqparent); PASS } //*********************************** checkInvestmentOption ************************* -void MyMoneyGncReader::checkInvestmentOption (QString stockId) { +void MyMoneyGncReader::checkInvestmentOption (TQString stockId) { // implement the investment option for stock accounts - // first check whether the parent account (gnucash id) is actually an + // first check whether the tqparent account (gnucash id) is actually an // investment account. if it is, no further action is needed MyMoneyAccount stockAcc = m_storage->account (m_mapIds[stockId.utf8()]); - MyMoneyAccount parent; - QString parentKey = stockAcc.parentAccountId(); - map_accountIds::Iterator id = m_mapIds.find (parentKey); + MyMoneyAccount tqparent; + TQString tqparentKey = stockAcc.tqparentAccountId(); + map_accountIds::Iterator id = m_mapIds.tqfind (tqparentKey); if (id != m_mapIds.end()) { - parent = m_storage->account (id.data()); - if (parent.accountType() == MyMoneyAccount::Investment) return ; + tqparent = m_storage->account (id.data()); + if (tqparent.accountType() == MyMoneyAccount::Investment) return ; } // so now, check the investment option requested by the user // option 0 creates a separate investment account for each stock account if (m_investmentOption == 0) { MyMoneyAccount invAcc (stockAcc); invAcc.setAccountType (MyMoneyAccount::Investment); - invAcc.setCurrencyId (QString("")); // we don't know what currency it is!! - invAcc.setParentAccountId (parentKey); // intersperse it between old parent and child stock acct + invAcc.setCurrencyId (TQString("")); // we don't know what currency it is!! + invAcc.setParentAccountId (tqparentKey); // intersperse it between old tqparent and child stock acct m_storage->addAccount (invAcc); - m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets parented (again) to investment account later - if (gncdebug) qDebug ("Created investment account %s as id %s, parent %s", invAcc.name().data(), invAcc.id().data(), - invAcc.parentAccountId().data()); + m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets tqparented (again) to investment account later + if (gncdebug) qDebug ("Created investment account %s as id %s, tqparent %s", invAcc.name().data(), invAcc.id().data(), + invAcc.tqparentAccountId().data()); if (gncdebug) qDebug ("Setting stock %s, id %s, as child of %s", stockAcc.name().data(), stockAcc.id().data(), invAcc.id().data()); stockAcc.setParentAccountId (invAcc.id()); m_storage->addAccount(invAcc, stockAcc); // investment option 1 creates a single investment account for all stocks } else if (m_investmentOption == 1) { - static QString singleInvAccId = ""; + static TQString singleInvAccId = ""; MyMoneyAccount singleInvAcc; bool ok = false; if (singleInvAccId.isEmpty()) { // if the account has not yet been created - QString invAccName; + TQString invAccName; while (!ok) { - invAccName = QInputDialog::getText (PACKAGE, - i18n("Enter the investment account name "), QLineEdit::Normal, + invAccName = TQInputDialog::getText (PACKAGE, + i18n("Enter the investment account name "), TQLineEdit::Normal, i18n("My Investments"), &ok); } singleInvAcc.setName (invAccName); singleInvAcc.setAccountType (MyMoneyAccount::Investment); - singleInvAcc.setCurrencyId (QString("")); + singleInvAcc.setCurrencyId (TQString("")); singleInvAcc.setParentAccountId (m_storage->asset().id()); m_storage->addAccount (singleInvAcc); - m_mapIds [singleInvAcc.id()] = singleInvAcc.id(); // so stock account gets parented (again) to investment account later - if (gncdebug) qDebug ("Created investment account %s as id %s, parent %s, reparenting stock", - singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.parentAccountId().data()); + m_mapIds [singleInvAcc.id()] = singleInvAcc.id(); // so stock account gets tqparented (again) to investment account later + if (gncdebug) qDebug ("Created investment account %s as id %s, tqparent %s, reparenting stock", + singleInvAcc.name().data(), singleInvAcc.id().data(), singleInvAcc.tqparentAccountId().data()); singleInvAccId = singleInvAcc.id(); } else { // the account has already been created singleInvAcc = m_storage->account (singleInvAccId); @@ -2254,9 +2254,9 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } else if (m_investmentOption == 2) { static int lastSelected = 0; MyMoneyAccount invAcc (stockAcc); - QStringList accList; - QValueList<MyMoneyAccount> list; - QValueList<MyMoneyAccount>::Iterator acc; + TQStringList accList; + TQValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::Iterator acc; m_storage->accountList(list); // build a list of candidates for the input box for (acc = list.begin(); acc != list.end(); ++acc) { @@ -2265,12 +2265,12 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } //if (accList.isEmpty()) qFatal ("No available accounts"); bool ok = false; - while (!ok) { // keep going till we have a valid investment parent - QString invAccName = QInputDialog::getItem ( - PACKAGE, i18n("Select parent investment account or enter new name. Stock %1").arg(stockAcc.name ()), + while (!ok) { // keep going till we have a valid investment tqparent + TQString invAccName = TQInputDialog::getItem ( + PACKAGE, i18n("Select tqparent investment account or enter new name. Stock %1").tqarg(stockAcc.name ()), accList, lastSelected, true, &ok); if (ok) { - lastSelected = accList.findIndex (invAccName); // preserve selection for next time + lastSelected = accList.tqfindIndex (invAccName); // preserve selection for next time for (acc = list.begin(); acc != list.end(); ++acc) { if ((*acc).name() == invAccName) break; } @@ -2279,7 +2279,7 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } else { // a new account name was entered invAcc.setAccountType (MyMoneyAccount::Investment); invAcc.setName (invAccName); - invAcc.setCurrencyId (QString("")); + invAcc.setCurrencyId (TQString("")); invAcc.setParentAccountId (m_storage->asset().id()); m_storage->addAccount (invAcc); ok = true; @@ -2289,14 +2289,14 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } else { // this code is probably not going to be implemented coz we can't change account types (??) #if 0 - QMessageBox mb (PACKAGE, - i18n ("%1 is not an Investment Account. Do you wish to make it one?").arg(invAcc.name()), - QMessageBox::Question, - QMessageBox::Yes | QMessageBox::Default, - QMessageBox::No | QMessageBox::Escape, - QMessageBox::NoButton); + TQMessageBox mb (PACKAGE, + i18n ("%1 is not an Investment Account. Do you wish to make it one?").tqarg(invAcc.name()), + TQMessageBox::Question, + TQMessageBox::Yes | TQMessageBox::Default, + TQMessageBox::No | TQMessageBox::Escape, + TQMessageBox::NoButton); switch (mb.exec()) { - case QMessageBox::No : + case TQMessageBox::No : ok = false; break; default: // convert it - but what if it has splits??? @@ -2305,7 +2305,7 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { break; } #endif - switch(KMessageBox::questionYesNo(0, i18n ("%1 is not an Investment Account. Do you wish to make it one?").arg(invAcc.name(), PACKAGE))) { + switch(KMessageBox::questionYesNo(0, i18n ("%1 is not an Investment Account. Do you wish to make it one?").tqarg(invAcc.name(), PACKAGE))) { case KMessageBox::Yes: // convert it - but what if it has splits??? qFatal ("Not yet implemented"); @@ -2318,7 +2318,7 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } } // end if ok - user pressed Cancel } // end while !ok - m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets parented (again) to investment account later + m_mapIds [invAcc.id()] = invAcc.id(); // so stock account gets tqparented (again) to investment account later m_storage->addAccount(invAcc, stockAcc); } else { // investment option != 0, 1, 2 qFatal ("Invalid investment option %d", m_investmentOption); @@ -2326,7 +2326,7 @@ void MyMoneyGncReader::checkInvestmentOption (QString stockId) { } // get the price source for a stock (gnc account) where online quotes are requested -void MyMoneyGncReader::getPriceSource (MyMoneySecurity stock, QString gncSource) { +void MyMoneyGncReader::getPriceSource (MyMoneySecurity stock, TQString gncSource) { // if he wants to use Finance::Quote, no conversion of source name is needed if (m_useFinanceQuote) { stock.setValue ("kmm-online-quote-system", "Finance::Quote"); @@ -2337,7 +2337,7 @@ void MyMoneyGncReader::getPriceSource (MyMoneySecurity stock, QString gncSource) // first check if we have already asked about this source // (mapSources is initialy empty. We may be able to pre-fill it with some equivalent // sources, if such things do exist. User feedback may help here.) - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for (it = m_mapSources.begin(); it != m_mapSources.end(); it++) { if (it.key() == gncSource) { stock.setValue("kmm-online-source", it.data()); @@ -2348,7 +2348,7 @@ void MyMoneyGncReader::getPriceSource (MyMoneySecurity stock, QString gncSource) // not found in map, so ask the user KGncPriceSourceDlg *dlg = new KGncPriceSourceDlg (stock.name(), gncSource); dlg->exec(); - QString s = dlg->selectedSource(); + TQString s = dlg->selectedSource(); if (!s.isEmpty()) { stock.setValue("kmm-online-source", s); m_storage->modifySecurity(stock); @@ -2360,32 +2360,32 @@ void MyMoneyGncReader::getPriceSource (MyMoneySecurity stock, QString gncSource) // functions to control the progress bar //*********************** setProgressCallback ***************************** -void MyMoneyGncReader::setProgressCallback(void(*callback)(int, int, const QString&)) { +void MyMoneyGncReader::setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; return ; } //************************** signalProgress ******************************* -void MyMoneyGncReader::signalProgress(int current, int total, const QString& msg) { +void MyMoneyGncReader::signalProgress(int current, int total, const TQString& msg) { if (m_progressCallback != 0) (*m_progressCallback)(current, total, msg); return ; } // error and information reporting //***************************** Information and error messages ********************* -void MyMoneyGncReader::postMessage (const QString& source, const unsigned int code, const char* arg1) { - postMessage (source, code, QStringList(arg1)); +void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int code, const char* arg1) { + postMessage (source, code, TQStringList(arg1)); } -void MyMoneyGncReader::postMessage (const QString& source, const unsigned int code, const char* arg1, const char* arg2) { - QStringList argList(arg1); +void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int code, const char* arg1, const char* arg2) { + TQStringList argList(arg1); argList.append(arg2); postMessage(source, code, argList); } -void MyMoneyGncReader::postMessage (const QString& source, const unsigned int code, const char* arg1, const char* arg2, const char* arg3) { - QStringList argList(arg1); +void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int code, const char* arg1, const char* arg2, const char* arg3) { + TQStringList argList(arg1); argList.append(arg2); argList.append(arg3); postMessage(source, code, argList); } -void MyMoneyGncReader::postMessage (const QString& source, const unsigned int code, const QStringList& argList) { +void MyMoneyGncReader::postMessage (const TQString& source, const unsigned int code, const TQStringList& argList) { unsigned int i; GncMessageArgs *m = new GncMessageArgs; @@ -2394,11 +2394,11 @@ void MyMoneyGncReader::postMessage (const QString& source, const unsigned int co // get the number of args this message requires const unsigned int argCount = GncMessages::argCount (source, code); if ((gncdebug) && (argCount != argList.count())) - qDebug("%s", QString("MyMoneyGncReader::postMessage debug: Message %1, code %2, requires %3 arguments, got %4") - .arg(source).arg(code).arg(argCount).arg(argList.count()).data()); + qDebug("%s", TQString("MyMoneyGncReader::postMessage debug: Message %1, code %2, requires %3 arguments, got %4") + .tqarg(source).tqarg(code).tqarg(argCount).tqarg(argList.count()).data()); // store the arguments for (i = 0; i < argCount; i++) { - if (i > argList.count()) m->args.append(QString()); + if (i > argList.count()) m->args.append(TQString()); else m->args.append (argList[i]); //Adds the next argument to the list } m_messageList.append (m); @@ -2426,31 +2426,31 @@ GncMessages::messText GncMessages::texts [] = { {"ZZ", 0, ""} // stopper }; // -QString GncMessages::text (const QString source, const unsigned int code) { +TQString GncMessages::text (const TQString source, const unsigned int code) { TRY unsigned int i; for (i = 0; texts[i].source != "ZZ"; i++) { if ((source == texts[i].source) && (code == texts[i].code)) break; } if (texts[i].source == "ZZ") { - QString mess = QString().sprintf("Internal error - unknown message - source %s, code %d", source.latin1(), code); + TQString mess = TQString().sprintf("Internal error - unknown message - source %s, code %d", source.latin1(), code); throw new MYMONEYEXCEPTION (mess); } return (texts[i].text); PASS } // -unsigned int GncMessages::argCount (const QString source, const unsigned int code) { +unsigned int GncMessages::argCount (const TQString source, const unsigned int code) { TRY unsigned int i; for (i = 0; texts[i].source != "ZZ"; i++) { if ((source == texts[i].source) && (code == texts[i].code)) break; } if (texts[i].source == "ZZ") { - QString mess = QString().sprintf("Internal error - unknown message - source %s, code %d", source.latin1(), code); + TQString mess = TQString().sprintf("Internal error - unknown message - source %s, code %d", source.latin1(), code); throw new MYMONEYEXCEPTION (mess); } - QRegExp argConst ("%\\d"); + TQRegExp argConst ("%\\d"); int offset = 0; unsigned int argCount = 0; while ((offset = argConst.search (texts[i].text, offset)) != -1) { diff --git a/kmymoney2/converter/mymoneygncreader.h b/kmymoney2/converter/mymoneygncreader.h index df08913..fcda8ea 100644 --- a/kmymoney2/converter/mymoneygncreader.h +++ b/kmymoney2/converter/mymoneygncreader.h @@ -24,7 +24,7 @@ The main class of this module, MyMoneyGncReader, contains only a readFile() function, which controls the import of data from an XML file created by the current GnuCash version (1.8.8). -The XML is processed in class XmlReader, which is an implementation of the Qt +The XML is processed in class XmlReader, which is an implementation of the TQt SAX2 reader class. Data in the input file is processed as a set of objects which fortunately, @@ -48,7 +48,7 @@ the 'container' elements are ignored. XmlReader -This is an implementation of the Qt QXmlDefaultHandler class, which provides +This is an implementation of the TQt TQXmlDefaultHandler class, which provides three main function calls in addition to start and end of document. The startElement() and endElement() calls are self-explanatory, the characters() function provides data strings. Thus in the above example, the sequence of calls @@ -96,14 +96,14 @@ element name which started the current object. If so, the object's terminate() function is called. If the object represents a similar KMM object, this will normally result in a call to a conversion routine in the main (MyMoneyGncReader) class to convert the data to native format and place it in -storage. The stack is then popped, and the parent (now current) object notified +storage. The stack is then popped, and the tqparent (now current) object notified by a call to its endSubEl() function. Again depending on the type of object, this will either delete the instance, or save it in its own storage for later processing. For example, a GncSplit object makes little sense outside the context of its transaction, so will be saved by the transaction. A GncTransaction object on the other hand will be converted, along with its attendant splits, and then deleted -by its parent. +by its tqparent. Since at any one time an object will only be processing either a subobject or a data element, a single object variable, m_state, is used to determine the actual @@ -149,15 +149,15 @@ allow us to test the structure, if not the data content, of the file. // ---------------------------------------------------------------------------- // QT Includes -#include <qdatastream.h> -class QIODevice; -#include <qobject.h> -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qptrstack.h> -#include <qxml.h> -#include <qdatetime.h> -#include <qtextcodec.h> +#include <tqdatastream.h> +class TQIODevice; +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqptrstack.h> +#include <tqxml.h> +#include <tqdatetime.h> +#include <tqtextcodec.h> // ---------------------------------------------------------------------------- // Project Includes @@ -175,11 +175,11 @@ class QIODevice; #define VERSION_0_61_XML 0x10000011 // use 8 bytes for MyMoneyMoney objects #define GNUCASH_ID_KEY "GNUCASH_ID" -typedef QMap<QString, QString> map_accountIds; +typedef TQMap<TQString, TQString> map_accountIds; typedef map_accountIds::iterator map_accountIds_iter; typedef map_accountIds::const_iterator map_accountIds_citer; -typedef QMap<QString, QStringList> map_elementVersions; +typedef TQMap<TQString, TQStringList> map_elementVersions; class MyMoneyGncReader; @@ -199,29 +199,29 @@ protected: friend class MyMoneyGncReader; // check for sub object element; if it is, create the object - GncObject *isSubElement (const QString &elName, const QXmlAttributes& elAttrs); + GncObject *isSubElement (const TQString &elName, const TQXmlAttributes& elAttrs); // check for data element; if so, set data pointer - bool isDataElement (const QString &elName, const QXmlAttributes& elAttrs); + bool isDataElement (const TQString &elName, const TQXmlAttributes& elAttrs); // process start element for 'this'; normally for attribute checking; other initialization done in constructor - virtual void initiate (const QString&, const QXmlAttributes&) { return ;}; + virtual void initiate (const TQString&, const TQXmlAttributes&) { return ;}; // a sub object has completed; process the data it gathered virtual void endSubEl(GncObject *) {m_dataPtr = 0; return ;}; // store data for data element - void storeData (const QString& pData) // NB - data MAY come in chunks, and may need to be anonymized + void storeData (const TQString& pData) // NB - data MAY come in chunks, and may need to be anonymized {if (m_dataPtr != 0) m_dataPtr->append (hide (pData, m_anonClass)); return ;} // following is provided only for a future file anonymizer - QString getData () const { return ((m_dataPtr != 0) ? *m_dataPtr : "");}; + TQString getData () const { return ((m_dataPtr != 0) ? *m_dataPtr : "");}; void resetDataPtr() {m_dataPtr = 0;}; // process end element for 'this'; usually to convert to KMM format virtual void terminate() { return ;}; - void setVersion (const QString& v) {m_version = v; return; }; - QString version() const {return (m_version);}; + void setVersion (const TQString& v) {m_version = v; return; }; + TQString version() const {return (m_version);}; // some gnucash elements have version attribute; check it - void checkVersion (const QString&, const QXmlAttributes&, const map_elementVersions&); + void checkVersion (const TQString&, const TQXmlAttributes&, const map_elementVersions&); // get name of element processed by 'this' - QString getElName () const { return (m_elementName);}; + TQString getElName () const { return (m_elementName);}; // pass 'main' pointer to object void setPm (MyMoneyGncReader *pM) {pMain = pM;}; // debug only @@ -230,24 +230,24 @@ protected: // called by isSubElement to create appropriate sub object virtual GncObject *startSubEl() { return (0);}; // called by isDataElement to set variable pointer - virtual void dataEl(const QXmlAttributes&) {m_dataPtr = m_v.at(m_state); m_anonClass = m_anonClassList[m_state];}; + virtual void dataEl(const TQXmlAttributes&) {m_dataPtr = m_v.at(m_state); m_anonClass = m_anonClassList[m_state];}; // return gnucash data string variable pointer - virtual QString var (int i) const; + virtual TQString var (int i) const; // anonymize data - virtual QString hide (QString, unsigned int); + virtual TQString hide (TQString, unsigned int); MyMoneyGncReader *pMain; // pointer to 'main' class // used at start of each transaction so same money hide factor is applied to all splits void adjustHideFactor(); - QString m_elementName; // save 'this' element's name - QString m_version; // and it's gnucash version - const QString *m_subElementList; // list of sub object element names for 'this' + TQString m_elementName; // save 'this' element's name + TQString m_version; // and it's gnucash version + const TQString *m_subElementList; // list of sub object element names for 'this' unsigned int m_subElementListCount; // count of above - const QString *m_dataElementList; // ditto for data elements + const TQString *m_dataElementList; // ditto for data elements unsigned int m_dataElementListCount; - QString *m_dataPtr; // pointer to m_v variable for current data item - mutable QPtrList<QString> m_v; // storage for variable pointers + TQString *m_dataPtr; // pointer to m_v variable for current data item + mutable TQPtrList<TQString> m_v; // storage for variable pointers unsigned int m_state; // effectively, the index to subElementList or dataElementList, whichever is currently in use @@ -283,13 +283,13 @@ public: protected: friend class MyMoneyGncReader; friend class GncTransaction; - bool isCurrency() const { return (*m_v.at(CMDTYSPC) == QString("ISO4217"));}; - QString id() const { return (*m_v.at(CMDTYID));}; - QString space() const { return (*m_v.at(CMDTYSPC));}; + bool isCurrency() const { return (*m_v.at(CMDTYSPC) == TQString("ISO4217"));}; + TQString id() const { return (*m_v.at(CMDTYID));}; + TQString space() const { return (*m_v.at(CMDTYSPC));}; private: // data elements enum CmdtySpecDataEls {CMDTYSPC, CMDTYID, END_CmdtySpec_DELS}; - virtual QString hide (QString, unsigned int); + virtual TQString hide (TQString, unsigned int); }; // ********************************************************************* // date; maybe one of two types, ts:date which is date/time, gdate which is date only @@ -305,11 +305,11 @@ protected: friend class GncSplit; friend class GncSchedule; friend class GncRecurrence; - const QDate date() const { return (QDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), Qt::ISODate));}; + const TQDate date() const { return (TQDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), Qt::ISODate));}; private: // data elements enum DateDataEls {TSDATE, GDATE, END_Date_DELS}; - virtual void dataEl(const QXmlAttributes&) {m_dataPtr = m_v.at(TSDATE); m_anonClass = GncObject::ASIS;} + virtual void dataEl(const TQXmlAttributes&) {m_dataPtr = m_v.at(TSDATE); m_anonClass = GncObject::ASIS;} ; // treat both date types the same }; // ************* GncKvp******************************************** @@ -324,9 +324,9 @@ public: protected: friend class MyMoneyGncReader; - QString key() const { return (var(KEY));}; - QString value() const { return (var(VALUE));}; - QString type() const { return (m_kvpType);}; + TQString key() const { return (var(KEY));}; + TQString value() const { return (var(VALUE));}; + TQString type() const { return (m_kvpType);}; unsigned int kvpCount() const { return (m_kvpList.count());}; const GncKvp *getKvp(unsigned int i) const { return (static_cast<GncKvp *>(m_kvpList.at(i)));}; private: @@ -336,9 +336,9 @@ private: virtual void endSubEl(GncObject *); // data elements enum KvpDataEls {KEY, VALUE, END_Kvp_DELS }; - virtual void dataEl (const QXmlAttributes&); - mutable QPtrList<GncObject> m_kvpList; - QString m_kvpType; // type is an XML attribute + virtual void dataEl (const TQXmlAttributes&); + mutable TQPtrList<GncObject> m_kvpList; + TQString m_kvpType; // type is an XML attribute }; // ************* GncLot******************************************** // KMM doesn't have support for lots as yet @@ -361,9 +361,9 @@ public: GncCountData (); ~GncCountData (); private: - virtual void initiate (const QString&, const QXmlAttributes&); + virtual void initiate (const TQString&, const TQXmlAttributes&); virtual void terminate(); - QString m_countType; // type of element being counted + TQString m_countType; // type of element being counted }; //******************************************************************** class GncCommodity : public GncObject { @@ -373,11 +373,11 @@ public: protected: friend class MyMoneyGncReader; // access data values - bool isCurrency() const { return (var(SPACE) == QString("ISO4217"));}; - QString space() const { return (var(SPACE));}; - QString id() const { return (var(ID));}; - QString name() const { return (var(NAME));}; - QString fraction() const { return (var(FRACTION));}; + bool isCurrency() const { return (var(SPACE) == TQString("ISO4217"));}; + TQString space() const { return (var(SPACE));}; + TQString id() const { return (var(ID));}; + TQString name() const { return (var(NAME));}; + TQString fraction() const { return (var(FRACTION));}; private: virtual void terminate(); // data elements @@ -393,8 +393,8 @@ protected: // access data values const GncCmdtySpec *commodity() const { return (m_vpCommodity);}; const GncCmdtySpec *currency() const { return (m_vpCurrency);}; - QString value() const { return (var(VALUE));}; - QDate priceDate () const { return (m_vpPriceDate->date());}; + TQString value() const { return (var(VALUE));}; + TQDate priceDate () const { return (m_vpPriceDate->date());}; private: virtual void terminate(); // sub object elements @@ -415,11 +415,11 @@ protected: friend class MyMoneyGncReader; // access data values GncCmdtySpec *commodity() const { return (m_vpCommodity);}; - QString id () const { return (var(ID));}; - QString name () const { return (var(NAME));}; - QString desc () const { return (var(DESC));}; - QString type () const { return (var(TYPE));}; - QString parent () const { return (var(PARENT));}; + TQString id () const { return (var(ID));}; + TQString name () const { return (var(NAME));}; + TQString desc () const { return (var(DESC));}; + TQString type () const { return (var(TYPE));}; + TQString tqparent () const { return (var(PARENT));}; private: // subsidiary objects/elements enum AccountSubEls {CMDTY, KVP, LOTS, END_Account_SELS }; @@ -429,7 +429,7 @@ private: // data elements enum AccountDataEls {ID, NAME, DESC, TYPE, PARENT, END_Account_DELS }; GncCmdtySpec *m_vpCommodity; - QPtrList<GncObject> m_kvpList; + TQPtrList<GncObject> m_kvpList; }; // ************* GncSplit******************************************** class GncSplit : public GncObject { @@ -439,20 +439,20 @@ public: protected: friend class MyMoneyGncReader; // access data values - QString id() const { return (var(ID));}; - QString memo() const { return (var(MEMO));}; - QString recon() const { return (var(RECON));}; - QString value() const { return (var(VALUE));}; - QString qty() const { return (var(QTY));}; - QString acct() const { return (var(ACCT));}; -const QDate reconDate() const {QDate x = QDate(); return (m_vpDateReconciled == NULL ? x : m_vpDateReconciled->date());}; + TQString id() const { return (var(ID));}; + TQString memo() const { return (var(MEMO));}; + TQString recon() const { return (var(RECON));}; + TQString value() const { return (var(VALUE));}; + TQString qty() const { return (var(TQTY));}; + TQString acct() const { return (var(ACCT));}; +const TQDate reconDate() const {TQDate x = TQDate(); return (m_vpDateReconciled == NULL ? x : m_vpDateReconciled->date());}; private: // subsidiary objects/elements enum TransactionSubEls {RECDATE, END_Split_SELS }; virtual GncObject *startSubEl(); virtual void endSubEl(GncObject *); // data elements - enum SplitDataEls {ID, MEMO, RECON, VALUE, QTY, ACCT, END_Split_DELS }; + enum SplitDataEls {ID, MEMO, RECON, VALUE, TQTY, ACCT, END_Split_DELS }; GncDate *m_vpDateReconciled; }; // ************* GncTransaction******************************************** @@ -463,12 +463,12 @@ public: protected: friend class MyMoneyGncReader; // access data values - QString id() const { return (var(ID));}; - QString no() const { return (var(NO));}; - QString desc() const { return (var(DESC));}; - QString currency() const { return (m_vpCurrency == NULL ? QString () : m_vpCurrency->id());}; - QDate dateEntered() const { return (m_vpDateEntered->date());}; - QDate datePosted() const { return (m_vpDatePosted->date());}; + TQString id() const { return (var(ID));}; + TQString no() const { return (var(NO));}; + TQString desc() const { return (var(DESC));}; + TQString currency() const { return (m_vpCurrency == NULL ? TQString () : m_vpCurrency->id());}; + TQDate dateEntered() const { return (m_vpDateEntered->date());}; + TQDate datePosted() const { return (m_vpDatePosted->date());}; bool isTemplate() const { return (m_template);}; unsigned int splitCount() const { return (m_splitList.count());}; unsigned int kvpCount() const { return (m_kvpList.count());}; @@ -484,9 +484,9 @@ private: enum TransactionDataEls {ID, NO, DESC, END_Transaction_DELS }; GncCmdtySpec *m_vpCurrency; GncDate *m_vpDateEntered, *m_vpDatePosted; - mutable QPtrList<GncObject> m_splitList; + mutable TQPtrList<GncObject> m_splitList; bool m_template; // true if this is a template for scheduled transaction - mutable QPtrList<GncObject> m_kvpList; + mutable TQPtrList<GncObject> m_kvpList; }; // ************* GncTemplateSplit******************************************** @@ -497,12 +497,12 @@ public: protected: friend class MyMoneyGncReader; // access data values - QString id() const { return (var(ID));}; - QString memo() const { return (var(MEMO));}; - QString recon() const { return (var(RECON));}; - QString value() const { return (var(VALUE));}; - QString qty() const { return (var(QTY));}; - QString acct() const { return (var(ACCT));}; + TQString id() const { return (var(ID));}; + TQString memo() const { return (var(MEMO));}; + TQString recon() const { return (var(RECON));}; + TQString value() const { return (var(VALUE));}; + TQString qty() const { return (var(TQTY));}; + TQString acct() const { return (var(ACCT));}; unsigned int kvpCount() const { return (m_kvpList.count());}; const GncKvp *getKvp(unsigned int i) const { return (static_cast<GncKvp *>(m_kvpList.at(i)));}; private: @@ -511,8 +511,8 @@ private: virtual GncObject *startSubEl(); virtual void endSubEl(GncObject *); // data elements - enum TemplateSplitDataEls {ID, MEMO, RECON, VALUE, QTY, ACCT, END_TemplateSplit_DELS }; - mutable QPtrList<GncObject> m_kvpList; + enum TemplateSplitDataEls {ID, MEMO, RECON, VALUE, TQTY, ACCT, END_TemplateSplit_DELS }; + mutable TQPtrList<GncObject> m_kvpList; }; // ************* GncSchedule******************************************** class GncFreqSpec; @@ -525,23 +525,23 @@ public: protected: friend class MyMoneyGncReader; // access data values - QString name() const { return (var(NAME));}; - QString enabled() const {return var(ENABLED);}; - QString autoCreate() const { return (var(AUTOC));}; - QString autoCrNotify() const { return (var(AUTOCN));}; - QString autoCrDays() const { return (var(AUTOCD));}; - QString advCrDays() const { return (var(ADVCD));}; - QString advCrRemindDays() const { return (var(ADVRD));}; - QString instanceCount() const { return (var(INSTC));}; - QString numOccurs() const { return (var(NUMOCC));}; - QString remOccurs() const { return (var(REMOCC));}; - QString templId() const { return (var(TEMPLID));}; - QDate startDate () const - {QDate x = QDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());}; - QDate lastDate () const - {QDate x = QDate(); return (m_vpLastDate == NULL ? x : m_vpLastDate->date());}; - QDate endDate() const - {QDate x = QDate(); return (m_vpEndDate == NULL ? x : m_vpEndDate->date());}; + TQString name() const { return (var(NAME));}; + TQString enabled() const {return var(ENABLED);}; + TQString autoCreate() const { return (var(AUTOC));}; + TQString autoCrNotify() const { return (var(AUTOCN));}; + TQString autoCrDays() const { return (var(AUTOCD));}; + TQString advCrDays() const { return (var(ADVCD));}; + TQString advCrRemindDays() const { return (var(ADVRD));}; + TQString instanceCount() const { return (var(INSTC));}; + TQString numOccurs() const { return (var(NUTQMOCC));}; + TQString remOccurs() const { return (var(RETQMOCC));}; + TQString templId() const { return (var(TEMPLID));}; + TQDate startDate () const + {TQDate x = TQDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());}; + TQDate lastDate () const + {TQDate x = TQDate(); return (m_vpLastDate == NULL ? x : m_vpLastDate->date());}; + TQDate endDate() const + {TQDate x = TQDate(); return (m_vpEndDate == NULL ? x : m_vpEndDate->date());}; const GncFreqSpec *getFreqSpec() const { return (m_vpFreqSpec);}; const GncSchedDef *getSchedDef() const { return (m_vpSchedDef);}; private: @@ -552,10 +552,10 @@ private: virtual void terminate(); // data elements enum ScheduleDataEls {NAME, ENABLED, AUTOC, AUTOCN, AUTOCD, ADVCD, ADVRD, INSTC, - NUMOCC, REMOCC, TEMPLID, END_Schedule_DELS }; + NUTQMOCC, RETQMOCC, TEMPLID, END_Schedule_DELS }; GncDate *m_vpStartDate, *m_vpLastDate, *m_vpEndDate; GncFreqSpec *m_vpFreqSpec; - mutable QPtrList<GncRecurrence> m_vpRecurrence; // gnc handles multiple occurrences + mutable TQPtrList<GncRecurrence> m_vpRecurrence; // gnc handles multiple occurrences GncSchedDef *m_vpSchedDef; }; // ************* GncFreqSpec******************************************** @@ -566,7 +566,7 @@ public: protected: friend class MyMoneyGncReader; // access data values (only interval type used at present) - QString intervalType() const { return (var(INTVT));}; + TQString intervalType() const { return (var(INTVT));}; private: // subsidiary objects/elements enum FreqSpecSubEls {COMPO, END_FreqSpec_SELS }; @@ -575,7 +575,7 @@ private: // data elements enum FreqSpecDataEls {INTVT, MONTHLY, DAILY, WEEKLY, INTVI, INTVO, INTVD, END_FreqSpec_DELS}; virtual void terminate(); - mutable QPtrList<GncObject> m_fsList; + mutable TQPtrList<GncObject> m_fsList; }; // ************* GncRecurrence******************************************** @@ -587,11 +587,11 @@ public: protected: friend class MyMoneyGncReader; // access data values - QDate startDate () const - {QDate x = QDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());}; - QString mult() const {return (var(MULT));}; - QString periodType() const {return (var(PERIODTYPE));}; - QString getFrequency() const; + TQDate startDate () const + {TQDate x = TQDate(); return (m_vpStartDate == NULL ? x : m_vpStartDate->date());}; + TQString mult() const {return (var(MULT));}; + TQString periodType() const {return (var(PERIODTYPE));}; + TQString getFrequency() const; private: // subsidiary objects/elements enum RecurrenceSubEls {STARTDATE, END_Recurrence_SELS }; @@ -618,25 +618,25 @@ class GncSchedDef : public GncObject { // **************************************************************************************** /** XML Reader - The XML reader is an implementation of the Qt SAX2 XML parser. It determines the type + The XML reader is an implementation of the TQt SAX2 XML parser. It determines the type of object represented by the XMl, and calls the appropriate object functions */ // ***************************************************************************************** -class XmlReader : public QXmlDefaultHandler { +class XmlReader : public TQXmlDefaultHandler { protected: friend class MyMoneyGncReader; XmlReader (MyMoneyGncReader *pM) : pMain(pM) {} // keep pointer to 'main' - void processFile (QIODevice*); // main entry point of reader + void processFile (TQIODevice*); // main entry point of reader // define xml content handler functions bool startDocument (); - bool startElement (const QString&, const QString&, const QString&, const QXmlAttributes&); - bool endElement (const QString&, const QString&, const QString&); - bool characters (const QString &); + bool startElement (const TQString&, const TQString&, const TQString&, const TQXmlAttributes&); + bool endElement (const TQString&, const TQString&, const TQString&); + bool characters (const TQString &); bool endDocument(); private: - QXmlInputSource *m_source; - QXmlSimpleReader *m_reader; - QPtrStack<GncObject> m_os; // stack of sub objects + TQXmlInputSource *m_source; + TQXmlSimpleReader *m_reader; + TQPtrStack<GncObject> m_os; // stack of sub objects GncObject *m_co; // current object, for ease of coding (=== m_os.top) MyMoneyGncReader *pMain; // the 'main' pointer, to pass on to objects bool m_headerFound; // check for gnc-v2 header @@ -652,21 +652,21 @@ private: class GncMessageArgs { protected: friend class MyMoneyGncReader; - QString source; // 'type of message + TQString source; // 'type of message unsigned int code; // to identify actual message - QValueList<QString> args; // variable arguments + TQValueList<TQString> args; // variable arguments }; class GncMessages { protected: friend class MyMoneyGncReader; - static QString text (const QString, const unsigned int); // returns text of identified message - static unsigned int argCount (const QString, const unsigned int); // returns no. of args required + static TQString text (const TQString, const unsigned int); // returns text of identified message + static unsigned int argCount (const TQString, const unsigned int); // returns no. of args required private: typedef struct { - const QString source; + const TQString source; const unsigned int code; - QString text; + TQString text; } messText; static messText texts []; @@ -695,12 +695,12 @@ public: * */ #ifndef _GNCFILEANON - void readFile (QIODevice* pDevice, IMyMoneySerialize* storage); // main entry point, IODevice is gnucash file - void writeFile (QIODevice*, IMyMoneySerialize*) { return ;}; // dummy entry needed by kmymoneywiew. we will not be writing + void readFile (TQIODevice* pDevice, IMyMoneySerialize* storage); // main entry point, IODevice is gnucash file + void writeFile (TQIODevice*, IMyMoneySerialize*) { return ;}; // dummy entry needed by kmymoneywiew. we will not be writing #else - void readFile (QString, QString); + void readFile (TQString, TQString); #endif // _GNCFILEANON - QTextCodec *m_decoder; + TQTextCodec *m_decoder; protected: friend class GncObject; // pity we can't just say GncObject. And compiler doesn't like multiple friends on one line... friend class GncFile; // there must be a better way... @@ -743,12 +743,12 @@ protected: void convertFreqSpec (const GncFreqSpec *) {return;}; #endif // _GNCFILEANON /** to post messages for final report */ - void postMessage (const QString&, const unsigned int, const char *); - void postMessage (const QString&, const unsigned int, const char *, const char *); - void postMessage (const QString&, const unsigned int, const char *, const char *, const char *); - void postMessage (const QString&, const unsigned int, const QStringList&); - void setProgressCallback (void(*callback)(int, int, const QString&)); - void signalProgress (int current, int total, const QString& = ""); + void postMessage (const TQString&, const unsigned int, const char *); + void postMessage (const TQString&, const unsigned int, const char *, const char *); + void postMessage (const TQString&, const unsigned int, const char *, const char *, const char *); + void postMessage (const TQString&, const unsigned int, const TQStringList&); + void setProgressCallback (void(*callback)(int, int, const TQString&)); + void signalProgress (int current, int total, const TQString& = ""); /** user options */ /** Scheduled Transactions @@ -809,24 +809,24 @@ private: void setOptions (); // to set user options from dialog void setFileHideFactor (); // the following handles the gnucash indicator for a bad value (-1/0) which causes us probs - QString convBadValue (QString gncValue) const {return (gncValue == "-1/0" ? "0/1" : gncValue); }; + TQString convBadValue (TQString gncValue) const {return (gncValue == "-1/0" ? "0/1" : gncValue); }; #ifndef _GNCFILEANON - MyMoneyTransaction convertTemplateTransaction (const QString&, const GncTransaction *); - void convertTemplateSplit (const QString&, const GncTemplateSplit *); + MyMoneyTransaction convertTemplateTransaction (const TQString&, const GncTransaction *); + void convertTemplateSplit (const TQString&, const GncTemplateSplit *); #endif // _GNCFILEANON // wind up when all done void terminate(); - QString buildReportSection (const QString&); - bool writeReportToFile (const QValueList<QString>&); + TQString buildReportSection (const TQString&); + bool writeReportToFile (const TQValueList<TQString>&); // main storage #ifndef _GNCFILEANON IMyMoneyStorage *m_storage; #else - QTextStream oStream; + TQTextStream oStream; #endif // _GNCFILEANON XmlReader *m_xr; /** to hold the callback pointer for the progress bar */ - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); // a map of which versions of the various elements (objects) we can import map_elementVersions m_versionList; // counters holding count data from the Gnc 'count-data' section @@ -851,53 +851,53 @@ private: // counters for error reporting int m_ccCount, m_orCount, m_scCount; // currency counter - QMap<QString, unsigned int> m_currencyCount; + TQMap<TQString, unsigned int> m_currencyCount; /** * Map gnucash vs. Kmm ids for accounts, equities, schedules, price sources */ - QMap<QString, QString> m_mapIds; - QString m_rootId; // save the root id for terminate() - QMap<QString, QString> m_mapEquities; - QMap<QString, QString> m_mapSchedules; - QMap<QString, QString> m_mapSources; + TQMap<TQString, TQString> m_mapIds; + TQString m_rootId; // save the root id for terminate() + TQMap<TQString, TQString> m_mapEquities; + TQMap<TQString, TQString> m_mapSchedules; + TQMap<TQString, TQString> m_mapSources; /** * A list of stock accounts (gnc ids) which will be held till the end so we can implement the user's investment option */ - QValueList<QString> m_stockList; + TQValueList<TQString> m_stockList; /** * Temporary storage areas for transaction processing */ - QString m_txCommodity; // save commodity for current transaction - QString m_txPayeeId; // gnc has payee at tx level, we need it at split level - QDate m_txDatePosted; // ditto for post date - QString m_txChequeNo; // ditto for cheque number + TQString m_txCommodity; // save commodity for current transaction + TQString m_txPayeeId; // gnc has payee at tx level, we need it at split level + TQDate m_txDatePosted; // ditto for post date + TQString m_txChequeNo; // ditto for cheque number /** In kmm, the order of splits is critical to some operations. These * areas will hold the splits until we've read them all */ - QValueList<MyMoneySplit> m_splitList, m_liabilitySplitList, m_otherSplitList; + TQValueList<MyMoneySplit> m_splitList, m_liabilitySplitList, m_otherSplitList; bool m_potentialTransfer; // to determine whether this might be a transfer /** Schedules are processed through 3 different functions, any of which may set this flag */ bool m_suspectSchedule; /** * A holding area for template txs while we're waiting for the schedules */ - QPtrList<GncTransaction> m_templateList; + TQPtrList<GncTransaction> m_templateList; /** Hold a list of suspect schedule ids for later processing? */ - QValueList<QString> m_suspectList; + TQValueList<TQString> m_suspectList; /** * To hold message data till final report */ - QPtrList<GncMessageArgs> m_messageList; + TQPtrList<GncMessageArgs> m_messageList; GncMessages *m_messageTexts; /** * Internal utility functions */ - QString createPayee (const QString&); // create a payee and return it's id - QString createOrphanAccount (const QString&); // create unknown account and return the id - QDate incrDate (QDate lastDate, unsigned char interval, unsigned int intervalCount); // for date calculations - MyMoneyAccount checkConsistency (MyMoneyAccount& parent, MyMoneyAccount& child); // gnucash is sometimes TOO flexible - void checkInvestmentOption (QString stockId); // implement user investment option - void getPriceSource (MyMoneySecurity stock, QString gncSource); + TQString createPayee (const TQString&); // create a payee and return it's id + TQString createOrphanAccount (const TQString&); // create unknown account and return the id + TQDate incrDate (TQDate lastDate, unsigned char interval, unsigned int intervalCount); // for date calculations + MyMoneyAccount checkConsistency (MyMoneyAccount& tqparent, MyMoneyAccount& child); // gnucash is sometimes TOO flexible + void checkInvestmentOption (TQString stockId); // implement user investment option + void getPriceSource (MyMoneySecurity stock, TQString gncSource); #endif // _GNCFILEANON }; diff --git a/kmymoney2/converter/mymoneyqifprofile.cpp b/kmymoney2/converter/mymoneyqifprofile.cpp index b8fe97c..3093941 100644 --- a/kmymoney2/converter/mymoneyqifprofile.cpp +++ b/kmymoney2/converter/mymoneyqifprofile.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> -#include <qvaluevector.h> +#include <tqregexp.h> +#include <tqvaluevector.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -58,17 +58,17 @@ class MyMoneyQifProfile::Private { } void getThirdPosition(void); - void dissectDate(QValueVector<QString>& parts, const QString& txt) const; + void dissectDate(TQValueVector<TQString>& parts, const TQString& txt) const; - QValueVector<int> m_changeCount; - QValueVector<int> m_lastValue; - QValueVector<int> m_largestValue; - QMap<QChar, int> m_partPos; + TQValueVector<int> m_changeCount; + TQValueVector<int> m_lastValue; + TQValueVector<int> m_largestValue; + TQMap<TQChar, int> m_partPos; }; -void MyMoneyQifProfile::Private::dissectDate(QValueVector<QString>& parts, const QString& txt) const +void MyMoneyQifProfile::Private::dissectDate(TQValueVector<TQString>& parts, const TQString& txt) const { - QRegExp nonDelimChars("[ 0-9a-zA-Z]"); + TQRegExp nonDelimChars("[ 0-9a-zA-Z]"); int part = 0; // the current part we scan unsigned int pos; // the current scan position unsigned int maxPartSize = txt.length() > 6 ? 4 : 2; @@ -114,12 +114,12 @@ void MyMoneyQifProfile::Private::getThirdPosition(void) { // if we have detected two parts we can calculate the third and its position if(m_partPos.count() == 2) { - QValueList<QChar> partsPresent = m_partPos.keys(); - QStringList partsAvail = QStringList::split(",", "d,m,y"); + TQValueList<TQChar> partsPresent = m_partPos.keys(); + TQStringList partsAvail = TQStringList::split(",", "d,m,y"); int missingIndex = -1; int value = 0; for(int i = 0; i < 3; ++i) { - if(!partsPresent.contains(partsAvail[i][0])) { + if(!partsPresent.tqcontains(partsAvail[i][0])) { missingIndex = i; } else { value += m_partPos[partsAvail[i][0]]; @@ -138,7 +138,7 @@ MyMoneyQifProfile::MyMoneyQifProfile() : clear(); } -MyMoneyQifProfile::MyMoneyQifProfile(const QString& name) : +MyMoneyQifProfile::MyMoneyQifProfile(const TQString& name) : d(new Private), m_isDirty(false) { @@ -184,7 +184,7 @@ void MyMoneyQifProfile::clear(void) m_attemptMatchDuplicates = true; } -void MyMoneyQifProfile::loadProfile(const QString& name) +void MyMoneyQifProfile::loadProfile(const TQString& name) { KConfig* config = KGlobal::config(); config->setGroup(name); @@ -208,7 +208,7 @@ void MyMoneyQifProfile::loadProfile(const QString& name) // make sure, we remove any old stuff for now config->deleteEntry("FilterScript"); - QString tmp = QString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] + + TQString tmp = TQString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] + m_decimal['$'] + m_decimal['O']; tmp = config->readEntry("Decimal", tmp); m_decimal['Q'] = tmp[0]; @@ -217,7 +217,7 @@ void MyMoneyQifProfile::loadProfile(const QString& name) m_decimal['$'] = tmp[3]; m_decimal['O'] = tmp[4]; - tmp = QString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] + + tmp = TQString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] + m_thousands['$'] + m_thousands['O']; tmp = config->readEntry("Thousand", tmp); m_thousands['Q'] = tmp[0]; @@ -247,19 +247,19 @@ void MyMoneyQifProfile::saveProfile(void) config->writeEntry("FilterFileType", m_filterFileType); config->writeEntry("AttemptMatchDuplicates", m_attemptMatchDuplicates); - QString tmp; + TQString tmp; - tmp = QString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] + + tmp = TQString(m_decimal['Q']) + m_decimal['T'] + m_decimal['I'] + m_decimal['$'] + m_decimal['O']; config->writeEntry("Decimal", tmp); - tmp = QString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] + + tmp = TQString(m_thousands['Q']) + m_thousands['T'] + m_thousands['I'] + m_thousands['$'] + m_thousands['O']; config->writeEntry("Thousand", tmp); } m_isDirty = false; } -void MyMoneyQifProfile::setProfileName(const QString& name) +void MyMoneyQifProfile::setProfileName(const TQString& name) { if(m_profileName != name) m_isDirty = true; @@ -267,7 +267,7 @@ void MyMoneyQifProfile::setProfileName(const QString& name) m_profileName = name; } -void MyMoneyQifProfile::setProfileDescription(const QString& desc) +void MyMoneyQifProfile::setProfileDescription(const TQString& desc) { if(m_profileDescription != desc) m_isDirty = true; @@ -275,14 +275,14 @@ void MyMoneyQifProfile::setProfileDescription(const QString& desc) m_profileDescription = desc; } -void MyMoneyQifProfile::setProfileType(const QString& type) +void MyMoneyQifProfile::setProfileType(const TQString& type) { if(m_profileType != type) m_isDirty = true; m_profileType = type; } -void MyMoneyQifProfile::setOutputDateFormat(const QString& dateFormat) +void MyMoneyQifProfile::setOutputDateFormat(const TQString& dateFormat) { if(m_dateFormat != dateFormat) m_isDirty = true; @@ -290,7 +290,7 @@ void MyMoneyQifProfile::setOutputDateFormat(const QString& dateFormat) m_dateFormat = dateFormat; } -void MyMoneyQifProfile::setInputDateFormat(const QString& dateFormat) +void MyMoneyQifProfile::setInputDateFormat(const TQString& dateFormat) { int j = -1; if(dateFormat.length() > 0) { @@ -302,7 +302,7 @@ void MyMoneyQifProfile::setInputDateFormat(const QString& dateFormat) } } -void MyMoneyQifProfile::setApostropheFormat(const QString& apostropheFormat) +void MyMoneyQifProfile::setApostropheFormat(const TQString& apostropheFormat) { if(m_apostropheFormat != apostropheFormat) m_isDirty = true; @@ -310,10 +310,10 @@ void MyMoneyQifProfile::setApostropheFormat(const QString& apostropheFormat) m_apostropheFormat = apostropheFormat; } -void MyMoneyQifProfile::setAmountDecimal(const QChar& def, const QChar& chr) +void MyMoneyQifProfile::setAmountDecimal(const TQChar& def, const TQChar& chr) { - QChar ch(chr); - if(ch == QChar()) + TQChar ch(chr); + if(ch == TQChar()) ch = ' '; if(m_decimal[def] != ch) @@ -322,10 +322,10 @@ void MyMoneyQifProfile::setAmountDecimal(const QChar& def, const QChar& chr) m_decimal[def] = ch; } -void MyMoneyQifProfile::setAmountThousands(const QChar& def, const QChar& chr) +void MyMoneyQifProfile::setAmountThousands(const TQChar& def, const TQChar& chr) { - QChar ch(chr); - if(ch == QChar()) + TQChar ch(chr); + if(ch == TQChar()) ch = ' '; if(m_thousands[def] != ch) @@ -334,21 +334,21 @@ void MyMoneyQifProfile::setAmountThousands(const QChar& def, const QChar& chr) m_thousands[def] = ch; } -QChar MyMoneyQifProfile::amountDecimal(const QChar& def) const +TQChar MyMoneyQifProfile::amountDecimal(const TQChar& def) const { - QChar chr = m_decimal[def]; + TQChar chr = m_decimal[def]; return chr; } -QChar MyMoneyQifProfile::amountThousands(const QChar& def) const +TQChar MyMoneyQifProfile::amountThousands(const TQChar& def) const { - QChar chr = m_thousands[def]; + TQChar chr = m_thousands[def]; return chr; } -void MyMoneyQifProfile::setAccountDelimiter(const QString& delim) +void MyMoneyQifProfile::setAccountDelimiter(const TQString& delim) { - QString txt(delim); + TQString txt(delim); if(txt.isEmpty()) txt = " "; @@ -360,23 +360,23 @@ void MyMoneyQifProfile::setAccountDelimiter(const QString& delim) m_accountDelimiter = txt[0]; } -void MyMoneyQifProfile::setOpeningBalanceText(const QString& txt) +void MyMoneyQifProfile::setOpeningBalanceText(const TQString& txt) { if(m_openingBalanceText != txt) m_isDirty = true; m_openingBalanceText = txt; } -void MyMoneyQifProfile::setVoidMark(const QString& txt) +void MyMoneyQifProfile::setVoidMark(const TQString& txt) { if(m_voidMark != txt) m_isDirty = true; m_voidMark = txt; } -QString MyMoneyQifProfile::accountDelimiter(void) const +TQString MyMoneyQifProfile::accountDelimiter(void) const { - QString rc; + TQString rc; switch(m_accountDelimiter[0]) { case ' ': @@ -389,47 +389,47 @@ QString MyMoneyQifProfile::accountDelimiter(void) const return rc; } -QString MyMoneyQifProfile::date(const QDate& datein) const +TQString MyMoneyQifProfile::date(const TQDate& datein) const { const char* format = m_dateFormat.latin1(); - QString buffer; - QChar delim; - int maskLen; - char maskChar; + TQString buffer; + TQChar delim; + int tqmaskLen; + char tqmaskChar; while(*format) { switch(*format) { case '%': - maskLen = 0; - maskChar = *++format; - while(*format && *format == maskChar) { - ++maskLen; + tqmaskLen = 0; + tqmaskChar = *++format; + while(*format && *format == tqmaskChar) { + ++tqmaskLen; ++format; } - switch(maskChar) { + switch(tqmaskChar) { case 'd': if(delim) buffer += delim; - buffer += QString::number(datein.day()).rightJustify(2, '0'); + buffer += TQString::number(datein.day()).rightJustify(2, '0'); break; case 'm': if(delim) buffer += delim; - if(maskLen == 3) + if(tqmaskLen == 3) buffer += KGlobal::locale()->calendar()->monthName(datein.month(), datein.year(), true); else - buffer += QString::number(datein.month()).rightJustify(2, '0'); + buffer += TQString::number(datein.month()).rightJustify(2, '0'); break; case 'y': - if(maskLen == 2) { + if(tqmaskLen == 2) { buffer += twoDigitYear(delim, datein.year()); } else { if(delim) buffer += delim; - buffer += QString::number(datein.year()); + buffer += TQString::number(datein.year()); } break; default: @@ -449,13 +449,13 @@ QString MyMoneyQifProfile::date(const QDate& datein) const return buffer; } -const QDate MyMoneyQifProfile::date(const QString& datein) const +const TQDate MyMoneyQifProfile::date(const TQString& datein) const { // in case we don't know the format, we return an invalid date if(d->m_partPos.count() != 3) - return QDate(); + return TQDate(); - QValueVector<QString> scannedParts(3); + TQValueVector<TQString> scannedParts(3); d->dissectDate(scannedParts, datein); int yr, mon, day; @@ -463,7 +463,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const yr = scannedParts[d->m_partPos['y']].toInt(); mon = scannedParts[d->m_partPos['m']].toInt(&ok); if(!ok) { - QStringList monthNames = QStringList::split(",", "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec"); + TQStringList monthNames = TQStringList::split(",", "jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec"); int j; for(j = 1; j <= 12; ++j) { if((KGlobal::locale()->calendar()->monthName(j, 2000, true).lower() == scannedParts[d->m_partPos['m']].lower()) @@ -474,7 +474,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const } if(j == 13) { qWarning("Unknown month '%s'", scannedParts[d->m_partPos['m']].data()); - return QDate(); + return TQDate(); } } @@ -485,12 +485,12 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const else yr += 1900; } - return QDate(yr, mon, day); + return TQDate(yr, mon, day); #if 0 - QString scannedDelim[2]; - QString formatParts[3]; - QString formatDelim[2]; + TQString scannedDelim[2]; + TQString formatParts[3]; + TQString formatDelim[2]; int part; int delim; unsigned int i,j; @@ -501,8 +501,8 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const if(m_dateFormat[i] == '%') { ++part; if(part == 3) { - qWarning("MyMoneyQifProfile::date(const QString& datein) Too many parts in date format"); - return QDate(); + qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many parts in date format"); + return TQDate(); } ++i; } @@ -517,15 +517,15 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const case '.': case '\'': if(delim == 2) { - qWarning("MyMoneyQifProfile::date(const QString& datein) Too many delimiters in date format"); - return QDate(); + qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many delimiters in date format"); + return TQDate(); } formatDelim[delim] = m_dateFormat[i]; ++delim; break; default: - qWarning("MyMoneyQifProfile::date(const QString& datein) Invalid char in date format"); - return QDate(); + qWarning("MyMoneyQifProfile::date(const TQString& datein) Invalid char in date format"); + return TQDate(); } } @@ -540,8 +540,8 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const case '-': case '\'': if(delim == 2) { - qWarning("MyMoneyQifProfile::date(const QString& datein) Too many delimiters in date field"); - return QDate(); + qWarning("MyMoneyQifProfile::date(const TQString& datein) Too many delimiters in date field"); + return TQDate(); } scannedDelim[delim] = datein[i]; ++delim; @@ -557,7 +557,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const if(datein[i].isLetter()) prevWasChar = true; // replace blank with 0 - scannedParts[part] += (datein[i] == ' ') ? QChar('0') : datein[i]; + scannedParts[part] += (datein[i] == ' ') ? TQChar('0') : datein[i]; break; } } @@ -568,14 +568,14 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const bool ok = false; for(i = 0; i < 2; ++i) { if(scannedDelim[i] != formatDelim[i] - && scannedDelim[i] != QChar('\'')) { - qWarning("MyMoneyQifProfile::date(const QString& datein) Invalid delimiter '%s' when '%s' was expected", + && scannedDelim[i] != TQChar('\'')) { + qWarning("MyMoneyQifProfile::date(const TQString& datein) Invalid delimiter '%s' when '%s' was expected", scannedDelim[i].latin1(), formatDelim[i].latin1()); - return QDate(); + return TQDate(); } } - QString msg; + TQString msg; for(i = 0; i < 3; ++i) { switch(formatParts[i][0].latin1()) { case 'd': @@ -610,7 +610,7 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const if(yr < 100) { // two digit year info if(i > 1) { ok = true; - if(scannedDelim[i-1] == QChar('\'')) { + if(scannedDelim[i-1] == TQChar('\'')) { if(m_apostropheFormat == "1900-1949") { if(yr < 50) yr += 1900; @@ -648,24 +648,24 @@ const QDate MyMoneyQifProfile::date(const QString& datein) const ok = true; } } else { - msg = QString("Length of year (%1) does not match expected length (%2).") - .arg(scannedParts[i].length()).arg(formatParts[i].length()); + msg = TQString("Length of year (%1) does not match expected length (%2).") + .tqarg(scannedParts[i].length()).tqarg(formatParts[i].length()); } break; } if(!msg.isEmpty()) { - qWarning("MyMoneyQifProfile::date(const QString& datein) %s",msg.latin1()); - return QDate(); + qWarning("MyMoneyQifProfile::date(const TQString& datein) %s",msg.latin1()); + return TQDate(); } } - return QDate(yr, mon, day); + return TQDate(yr, mon, day); #endif } -QString MyMoneyQifProfile::twoDigitYear(const QChar delim, int yr) const +TQString MyMoneyQifProfile::twoDigitYear(const TQChar delim, int yr) const { - QChar realDelim = delim; - QString buffer; + TQChar realDelim = delim; + TQString buffer; if(delim) { if((m_apostropheFormat == "1900-1949" && yr <= 1949) @@ -681,15 +681,15 @@ QString MyMoneyQifProfile::twoDigitYear(const QChar delim, int yr) const if(yr < 10) buffer += "0"; - buffer += QString::number(yr); + buffer += TQString::number(yr); return buffer; } -QString MyMoneyQifProfile::value(const QChar& def, const MyMoneyMoney& valuein) const +TQString MyMoneyQifProfile::value(const TQChar& def, const MyMoneyMoney& valuein) const { unsigned char _decimalSeparator; unsigned char _thousandsSeparator; - QString res; + TQString res; _decimalSeparator = MyMoneyMoney::decimalSeparator(); _thousandsSeparator = MyMoneyMoney::thousandSeparator(); @@ -708,7 +708,7 @@ QString MyMoneyQifProfile::value(const QChar& def, const MyMoneyMoney& valuein) return res; } -MyMoneyMoney MyMoneyQifProfile::value(const QChar& def, const QString& valuein) const +MyMoneyMoney MyMoneyQifProfile::value(const TQChar& def, const TQString& valuein) const { unsigned char _decimalSeparator; unsigned char _thousandsSeparator; @@ -731,7 +731,7 @@ MyMoneyMoney MyMoneyQifProfile::value(const QChar& def, const QString& valuein) return res; } -void MyMoneyQifProfile::setFilterScriptImport(const QString& script) +void MyMoneyQifProfile::setFilterScriptImport(const TQString& script) { if(m_filterScriptImport != script) m_isDirty = true; @@ -739,7 +739,7 @@ void MyMoneyQifProfile::setFilterScriptImport(const QString& script) m_filterScriptImport = script; } -void MyMoneyQifProfile::setFilterScriptExport(const QString& script) +void MyMoneyQifProfile::setFilterScriptExport(const TQString& script) { if(m_filterScriptExport != script) m_isDirty = true; @@ -747,7 +747,7 @@ void MyMoneyQifProfile::setFilterScriptExport(const QString& script) m_filterScriptExport = script; } -void MyMoneyQifProfile::setFilterFileType(const QString& txt) +void MyMoneyQifProfile::setFilterFileType(const TQString& txt) { if(m_filterFileType != txt) m_isDirty = true; @@ -763,25 +763,25 @@ void MyMoneyQifProfile::setAttemptMatchDuplicates(bool f) m_attemptMatchDuplicates = f; } -QString MyMoneyQifProfile::inputDateFormat(void) const +TQString MyMoneyQifProfile::inputDateFormat(void) const { - QStringList list; + TQStringList list; possibleDateFormats(list); if(list.count() == 1) return list.first(); - return QString(); + return TQString(); } -void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const +void MyMoneyQifProfile::possibleDateFormats(TQStringList& list) const { - QStringList defaultList = QStringList::split(":", "y,m,d:y,d,m:m,d,y:m,y,d:d,m,y:d,y,m"); + TQStringList defaultList = TQStringList::split(":", "y,m,d:y,d,m:m,d,y:m,y,d:d,m,y:d,y,m"); list.clear(); - QStringList::const_iterator it_d; + TQStringList::const_iterator it_d; for(it_d = defaultList.begin(); it_d != defaultList.end(); ++it_d) { - QStringList parts = QStringList::split(",", *it_d); + TQStringList parts = TQStringList::split(",", *it_d); int i; for(i = 0; i < 3; ++i) { - if(d->m_partPos.contains(parts[i][0])) { + if(d->m_partPos.tqcontains(parts[i][0])) { if(d->m_partPos[parts[i][0]] != i) break; } @@ -794,11 +794,11 @@ void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const } // matches all tests if(i == 3) { - QString format = *it_d; - format.replace('y', "%y"); - format.replace('m', "%m"); - format.replace('d', "%d"); - format.replace(',', " "); + TQString format = *it_d; + format.tqreplace('y', "%y"); + format.tqreplace('m', "%m"); + format.tqreplace('d', "%d"); + format.tqreplace(',', " "); list << format; } } @@ -806,26 +806,26 @@ void MyMoneyQifProfile::possibleDateFormats(QStringList& list) const // in this case, we present the full list and let the user decide if(list.count() == 0) { for(it_d = defaultList.begin(); it_d != defaultList.end(); ++it_d) { - QString format = *it_d; - format.replace('y', "%y"); - format.replace('m', "%m"); - format.replace('d', "%d"); - format.replace(',', " "); + TQString format = *it_d; + format.tqreplace('y', "%y"); + format.tqreplace('m', "%m"); + format.tqreplace('d', "%d"); + format.tqreplace(',', " "); list << format; } } } -void MyMoneyQifProfile::autoDetect(const QStringList& lines) +void MyMoneyQifProfile::autoDetect(const TQStringList& lines) { - m_dateFormat = QString(); + m_dateFormat = TQString(); m_decimal.clear(); m_thousands.clear(); - QString numericRecords = "BT$OIQ"; - QStringList::const_iterator it; + TQString numericRecords = "BT$OIQ"; + TQStringList::const_iterator it; int datesScanned = 0; - // section: used to switch between different QIF sections, + // section: used to switch between different TQIF sections, // because the Record identifiers are ambigous between sections // eg. in transaction records, T identifies a total amount, in // account sections it's the type. @@ -835,11 +835,11 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) // 2 - transactions // 3 - prices int section = 0; - QRegExp price("\"(.*)\",(.*),\"(.*)\""); + TQRegExp price("\"(.*)\",(.*),\"(.*)\""); for(it = lines.begin(); it != lines.end(); ++it) { - QChar c((*it)[0]); + TQChar c((*it)[0]); if(c == '!') { - QString sname = (*it).lower(); + TQString sname = (*it).lower(); section = 0; if(sname.startsWith("!account")) section = 1; @@ -863,7 +863,7 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) } break; case 2: - if(numericRecords.contains(c)) { + if(numericRecords.tqcontains(c)) { scanNumeric((*it).mid(1), m_decimal[c], m_thousands[c]); } else if((c == 'D') && (m_dateFormat.isEmpty())) { if(d->m_partPos.count() != 3) { @@ -891,9 +891,9 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) // results are inaccurate which leads to a reduced number of // date formats presented to choose from. if(d->m_partPos.count() != 3 && datesScanned > 20) { - QMap<int, int> sortedPos; + TQMap<int, int> sortedPos; // make sure to reset the known parts for the following algorithm - if(d->m_partPos.contains('y')) { + if(d->m_partPos.tqcontains('y')) { d->m_changeCount[d->m_partPos['y']] = -1; for(int i = 0; i < 3; ++i) { if(d->m_partPos['y'] == i) @@ -904,9 +904,9 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) } } } - if(d->m_partPos.contains('d')) + if(d->m_partPos.tqcontains('d')) d->m_changeCount[d->m_partPos['d']] = -1; - if(d->m_partPos.contains('m')) + if(d->m_partPos.tqcontains('m')) d->m_changeCount[d->m_partPos['m']] = -1; for(int i = 0; i < 3; ++i) { @@ -915,8 +915,8 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) } } - QMap<int, int>::const_iterator it_a; - QMap<int, int>::const_iterator it_b; + TQMap<int, int>::const_iterator it_a; + TQMap<int, int>::const_iterator it_b; switch(sortedPos.count()) { case 1: // all the same // let the user decide, we can't figure it out @@ -962,10 +962,10 @@ void MyMoneyQifProfile::autoDetect(const QStringList& lines) } } -void MyMoneyQifProfile::scanNumeric(const QString& txt, QChar& decimal, QChar& thousands) const +void MyMoneyQifProfile::scanNumeric(const TQString& txt, TQChar& decimal, TQChar& thousands) const { - QChar first, second; - QRegExp numericChars("[0-9-()]"); + TQChar first, second; + TQRegExp numericChars("[0-9-()]"); for(unsigned int i = 0; i < txt.length(); ++i) { if(numericChars.search(txt[i]) == -1) { first = second; @@ -978,10 +978,10 @@ void MyMoneyQifProfile::scanNumeric(const QString& txt, QChar& decimal, QChar& t thousands = first; } -void MyMoneyQifProfile::scanDate(const QString& txt) const +void MyMoneyQifProfile::scanDate(const TQString& txt) const { // extract the parts from the txt - QValueVector<QString> parts(3); // the various parts of the date + TQValueVector<TQString> parts(3); // the various parts of the date d->dissectDate(parts, txt); // now analyse the parts @@ -1003,7 +1003,7 @@ void MyMoneyQifProfile::scanDate(const QString& txt) const } // and if it's in between 12 and 32 and we already identified the // position for the year it must be days - if((value > 12) && (value < 32) && d->m_partPos.contains('y')) { + if((value > 12) && (value < 32) && d->m_partPos.tqcontains('y')) { d->m_partPos['d'] = i; } } diff --git a/kmymoney2/converter/mymoneyqifprofile.h b/kmymoney2/converter/mymoneyqifprofile.h index bd6b328..5df8c41 100644 --- a/kmymoney2/converter/mymoneyqifprofile.h +++ b/kmymoney2/converter/mymoneyqifprofile.h @@ -15,15 +15,15 @@ * * ***************************************************************************/ -#ifndef MYMONEYQIFPROFILE_H -#define MYMONEYQIFPROFILE_H +#ifndef MYMONEYTQIFPROFILE_H +#define MYMONEYTQIFPROFILE_H // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qstring.h> -class QDate; +#include <tqobject.h> +#include <tqstring.h> +class TQDate; // ---------------------------------------------------------------------------- // KDE Includes @@ -37,47 +37,48 @@ class MyMoneyMoney; * @author Thomas Baumgart */ -class MyMoneyQifProfile : public QObject +class MyMoneyQifProfile : public TQObject { Q_OBJECT + TQ_OBJECT public: MyMoneyQifProfile(); - MyMoneyQifProfile(const QString& name); + MyMoneyQifProfile(const TQString& name); ~MyMoneyQifProfile(); - const QString& profileName(void) const { return m_profileName; } - void setProfileName(const QString& name); + const TQString& profileName(void) const { return m_profileName; } + void setProfileName(const TQString& name); - void loadProfile(const QString& name); + void loadProfile(const TQString& name); void saveProfile(void); - const QDate date(const QString& datein) const; - QString date(const QDate& datein) const; - - MyMoneyMoney value(const QChar& def, const QString& valuein) const; - QString value(const QChar& def, const MyMoneyMoney& valuein) const; - - const QString& outputDateFormat(void) const { return m_dateFormat; } - QString inputDateFormat(void) const; - const QString& apostropheFormat(void) const { return m_apostropheFormat; } - QChar amountDecimal(const QChar& def) const; - QChar amountThousands(const QChar& def) const; - const QString& profileDescription(void) const { return m_profileDescription; } - const QString& profileType(void) const { return m_profileType; } - const QString& openingBalanceText(void) const { return m_openingBalanceText; } - QString accountDelimiter(void) const; - const QString& voidMark(void) const { return m_voidMark; } - const QString& filterScriptImport(void) const { return m_filterScriptImport; } - const QString& filterScriptExport(void) const { return m_filterScriptExport; } - const QString& filterFileType(void) const { return m_filterFileType; } + const TQDate date(const TQString& datein) const; + TQString date(const TQDate& datein) const; + + MyMoneyMoney value(const TQChar& def, const TQString& valuein) const; + TQString value(const TQChar& def, const MyMoneyMoney& valuein) const; + + const TQString& outputDateFormat(void) const { return m_dateFormat; } + TQString inputDateFormat(void) const; + const TQString& apostropheFormat(void) const { return m_apostropheFormat; } + TQChar amountDecimal(const TQChar& def) const; + TQChar amountThousands(const TQChar& def) const; + const TQString& profileDescription(void) const { return m_profileDescription; } + const TQString& profileType(void) const { return m_profileType; } + const TQString& openingBalanceText(void) const { return m_openingBalanceText; } + TQString accountDelimiter(void) const; + const TQString& voidMark(void) const { return m_voidMark; } + const TQString& filterScriptImport(void) const { return m_filterScriptImport; } + const TQString& filterScriptExport(void) const { return m_filterScriptExport; } + const TQString& filterFileType(void) const { return m_filterFileType; } bool attemptMatchDuplicates(void) const { return m_attemptMatchDuplicates; } /** * This method scans all strings contained in @a lines and tries to figure * out the settings for m_decimal, m_thousands and m_dateFormat */ - void autoDetect(const QStringList& lines); + void autoDetect(const TQStringList& lines); /** * This method returns a list of possible date formats the user @@ -85,7 +86,7 @@ public: * contains all possible date formats, in the other case, the @a list * is adjusted to those that will match the data scanned. */ - void possibleDateFormats(QStringList& list) const; + void possibleDateFormats(TQStringList& list) const; /** * This method presets the member variables with the default values. @@ -98,25 +99,25 @@ public: bool isDirty(void) const { return m_isDirty; }; public slots: - void setProfileDescription(const QString& desc); - void setProfileType(const QString& type); - void setOutputDateFormat(const QString& dateFormat); - void setInputDateFormat(const QString& dateFormat); - void setApostropheFormat(const QString& apostropheFormat); - void setAmountDecimal(const QChar& def, const QChar& chr); - void setAmountThousands(const QChar& def, const QChar& chr); - void setAccountDelimiter(const QString& delim); - void setOpeningBalanceText(const QString& text); - void setVoidMark(const QString& txt); - void setFilterScriptImport(const QString& txt); - void setFilterScriptExport(const QString& txt); - void setFilterFileType(const QString& txt); + void setProfileDescription(const TQString& desc); + void setProfileType(const TQString& type); + void setOutputDateFormat(const TQString& dateFormat); + void setInputDateFormat(const TQString& dateFormat); + void setApostropheFormat(const TQString& apostropheFormat); + void setAmountDecimal(const TQChar& def, const TQChar& chr); + void setAmountThousands(const TQChar& def, const TQChar& chr); + void setAccountDelimiter(const TQString& delim); + void setOpeningBalanceText(const TQString& text); + void setVoidMark(const TQString& txt); + void setFilterScriptImport(const TQString& txt); + void setFilterScriptExport(const TQString& txt); + void setFilterFileType(const TQString& txt); void setAttemptMatchDuplicates(bool); private: - QString twoDigitYear(const QChar delim, int yr) const; - void scanNumeric(const QString& txt, QChar& decimal, QChar& thousands) const; - void scanDate(const QString& txt) const; + TQString twoDigitYear(const TQChar delim, int yr) const; + void scanNumeric(const TQString& txt, TQChar& decimal, TQChar& thousands) const; + void scanDate(const TQString& txt) const; private: /// \internal d-pointer class. @@ -124,20 +125,20 @@ private: /// \internal d-pointer instance. Private* const d; bool m_isDirty; - QString m_profileName; - QString m_profileDescription; - QString m_dateFormat; - QString m_apostropheFormat; - QString m_valueMode; - QString m_profileType; - QString m_openingBalanceText; - QString m_voidMark; - QString m_accountDelimiter; - QString m_filterScriptImport; - QString m_filterScriptExport; - QString m_filterFileType; /*< The kind of input files the filter will expect, e.g. "*.qif" */ - QMap<QChar, QChar> m_decimal; - QMap<QChar, QChar> m_thousands; + TQString m_profileName; + TQString m_profileDescription; + TQString m_dateFormat; + TQString m_apostropheFormat; + TQString m_valueMode; + TQString m_profileType; + TQString m_openingBalanceText; + TQString m_voidMark; + TQString m_accountDelimiter; + TQString m_filterScriptImport; + TQString m_filterScriptExport; + TQString m_filterFileType; /*< The kind of input files the filter will expect, e.g. "*.qif" */ + TQMap<TQChar, TQChar> m_decimal; + TQMap<TQChar, TQChar> m_thousands; bool m_attemptMatchDuplicates; }; diff --git a/kmymoney2/converter/mymoneyqifreader.cpp b/kmymoney2/converter/mymoneyqifreader.cpp index 60b0604..fde43a4 100644 --- a/kmymoney2/converter/mymoneyqifreader.cpp +++ b/kmymoney2/converter/mymoneyqifreader.cpp @@ -26,12 +26,12 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qfile.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qtextedit.h> -#include <qregexp.h> -#include <qbuffer.h> +#include <tqfile.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqtextedit.h> +#include <tqregexp.h> +#include <tqbuffer.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -72,29 +72,29 @@ class MyMoneyQifReader::Private { mapCategories(true) {} - QString accountTypeToQif(MyMoneyAccount::accountTypeE type) const; + TQString accountTypeToQif(MyMoneyAccount::accountTypeE type) const; /** * finalize the current statement and add it to the statement list */ void finishStatement(void); - bool isTransfer(QString& name, const QString& leftDelim, const QString& rightDelim); + bool isTransfer(TQString& name, const TQString& leftDelim, const TQString& rightDelim); /** - * Converts the QIF specific N-record of investment transactions into + * Converts the TQIF specific N-record of investment transactions into * a category name */ - QString typeToAccountName(const QString& type) const; + TQString typeToAccountName(const TQString& type) const; /** - * Converts the QIF reconcile state to the KMyMoney reconcile state + * Converts the TQIF reconcile state to the KMyMoney reconcile state */ - MyMoneySplit::reconcileFlagE reconcileState(const QString& state) const; + MyMoneySplit::reconcileFlagE reconcileState(const TQString& state) const; /** */ - void fixMultiLineMemo(QString& memo) const; + void fixMultiLineMemo(TQString& memo) const; public: /** @@ -104,24 +104,24 @@ class MyMoneyQifReader::Private { /** * the list of all statements to be sent to MyMoneyStatementReader */ - QValueList<MyMoneyStatement> statements; + TQValueList<MyMoneyStatement> statements; /** * a list of already used hashes in this file */ - QMap<QString, bool> m_hashMap; + TQMap<TQString, bool> m_hashMap; - QString st_AccountName; - QString st_AccountId; + TQString st_AccountName; + TQString st_AccountId; MyMoneyAccount::accountTypeE accountType; bool firstTransaction; bool mapCategories; MyMoneyQifReader::QifEntryTypeE transactionType; }; -void MyMoneyQifReader::Private::fixMultiLineMemo(QString& memo) const +void MyMoneyQifReader::Private::fixMultiLineMemo(TQString& memo) const { - memo.replace("\\n", "\n"); + memo.tqreplace("\\n", "\n"); } void MyMoneyQifReader::Private::finishStatement(void) @@ -138,9 +138,9 @@ void MyMoneyQifReader::Private::finishStatement(void) st.m_eType = (transactionType == MyMoneyQifReader::EntryTransaction) ? MyMoneyStatement::etCheckings : MyMoneyStatement::etInvestment; } -QString MyMoneyQifReader::Private::accountTypeToQif(MyMoneyAccount::accountTypeE type) const +TQString MyMoneyQifReader::Private::accountTypeToQif(MyMoneyAccount::accountTypeE type) const { - QString rc = "Bank"; + TQString rc = "Bank"; switch(type) { default: @@ -164,7 +164,7 @@ QString MyMoneyQifReader::Private::accountTypeToQif(MyMoneyAccount::accountTypeE return rc; } -QString MyMoneyQifReader::Private::typeToAccountName(const QString& type) const +TQString MyMoneyQifReader::Private::typeToAccountName(const TQString& type) const { if(type == "reinvdiv") return i18n("Category name", "Reinvested dividend"); @@ -202,10 +202,10 @@ QString MyMoneyQifReader::Private::typeToAccountName(const QString& type) const if(type == "sell" || type == "buy") return i18n("Category name", "Investment fees"); - return i18n("Unknown QIF type %1").arg(type); + return i18n("Unknown TQIF type %1").tqarg(type); } -bool MyMoneyQifReader::Private::isTransfer(QString& tmp, const QString& leftDelim, const QString& rightDelim) +bool MyMoneyQifReader::Private::isTransfer(TQString& tmp, const TQString& leftDelim, const TQString& rightDelim) { // it's a transfer, extract the account name // I've seen entries like this @@ -213,7 +213,7 @@ bool MyMoneyQifReader::Private::isTransfer(QString& tmp, const QString& leftDeli // S[Mehrwertsteuer]/_VATCode_N_I // // so extracting is a bit more complex and we use a regexp for it - QRegExp exp(QString("\\%1(.*)\\%2(.*)").arg(leftDelim, rightDelim)); + TQRegExp exp(TQString("\\%1(.*)\\%2(.*)").tqarg(leftDelim, rightDelim)); bool rc; if((rc = (exp.search(tmp) != -1)) == true) { @@ -223,7 +223,7 @@ bool MyMoneyQifReader::Private::isTransfer(QString& tmp, const QString& leftDeli return rc; } -MyMoneySplit::reconcileFlagE MyMoneyQifReader::Private::reconcileState(const QString& state) const +MyMoneySplit::reconcileFlagE MyMoneyQifReader::Private::reconcileState(const TQString& state) const { if(state == "X" || state == "R") // Reconciled return MyMoneySplit::Reconciled; @@ -250,10 +250,10 @@ MyMoneyQifReader::MyMoneyQifReader() : m_warnedSecurity = false; m_warnedPrice = false; - connect(&m_filter, SIGNAL(wroteStdin(KProcess*)), this, SLOT(slotSendDataToFilter())); - connect(&m_filter, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); - connect(&m_filter, SIGNAL(processExited(KProcess*)), this, SLOT(slotImportFinished())); - connect(&m_filter, SIGNAL(receivedStderr(KProcess*, char*, int)), this, SLOT(slotReceivedErrorFromFilter(KProcess*, char*, int))); + connect(&m_filter, TQT_SIGNAL(wroteStdin(KProcess*)), this, TQT_SLOT(slotSendDataToFilter())); + connect(&m_filter, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); + connect(&m_filter, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotImportFinished())); + connect(&m_filter, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedErrorFromFilter(KProcess*, char*, int))); } MyMoneyQifReader::~MyMoneyQifReader() @@ -273,14 +273,14 @@ void MyMoneyQifReader::setURL(const KURL& url) m_url = url; } -void MyMoneyQifReader::setProfile(const QString& profile) +void MyMoneyQifReader::setProfile(const TQString& profile) { m_qifProfile.loadProfile("Profile-" + profile); } void MyMoneyQifReader::slotSendDataToFilter(void) { - Q_LONG len; + TQ_LONG len; if(m_file->atEnd()) { // m_filter.flushStdin(); @@ -288,7 +288,7 @@ void MyMoneyQifReader::slotSendDataToFilter(void) } else { len = m_file->readBlock(m_buffer, sizeof(m_buffer)); if(len == -1) { - qWarning("Failed to read block from QIF import file"); + qWarning("Failed to read block from TQIF import file"); m_filter.closeStdin(); m_filter.kill(); } else { @@ -299,7 +299,7 @@ void MyMoneyQifReader::slotSendDataToFilter(void) void MyMoneyQifReader::slotReceivedErrorFromFilter(KProcess* /* proc */, char *buff, int len) { - QByteArray data; + TQByteArray data; data.duplicate(buff, len); qWarning("%s",static_cast<const char*>(data)); } @@ -314,9 +314,9 @@ void MyMoneyQifReader::slotReceivedDataFromFilter(KProcess* /* proc */, char *bu if(*buff == '\n' || *buff == '\r') { // found EOL if(!m_lineBuffer.isEmpty()) { - m_qifLines << QString::fromUtf8(m_lineBuffer.stripWhiteSpace()); + m_qifLines << TQString::fromUtf8(m_lineBuffer.stripWhiteSpace()); } - m_lineBuffer = QCString(); + m_lineBuffer = TQCString(); } else { // collect all others m_lineBuffer += (*buff); @@ -330,10 +330,10 @@ void MyMoneyQifReader::slotImportFinished(void) { // check if the last EOL char was missing and add the trailing line if(!m_lineBuffer.isEmpty()) { - m_qifLines << QString::fromUtf8(m_lineBuffer.stripWhiteSpace()); + m_qifLines << TQString::fromUtf8(m_lineBuffer.stripWhiteSpace()); } qDebug("Read %d bytes", m_pos); - QTimer::singleShot(0, this, SLOT(slotProcessData())); + TQTimer::singleShot(0, this, TQT_SLOT(slotProcessData())); } void MyMoneyQifReader::slotProcessData(void) @@ -346,9 +346,9 @@ void MyMoneyQifReader::slotProcessData(void) // the detection is accurate for numeric values, but it could be // that the dates were too ambiguous so that we have to let the user // decide which one to pick. - QStringList dateFormats; + TQStringList dateFormats; m_qifProfile.possibleDateFormats(dateFormats); - QStringList list; + TQStringList list; if(dateFormats.count() > 1) { list << dateFormats.first(); bool ok; @@ -363,8 +363,8 @@ void MyMoneyQifReader::slotProcessData(void) qDebug("Selected date format: '%s'", list.first().data()); - signalProgress(0, m_qifLines.count(), i18n("Importing QIF ...")); - QStringList::iterator it; + signalProgress(0, m_qifLines.count(), i18n("Importing TQIF ...")); + TQStringList::iterator it; for(it = m_qifLines.begin(); m_userAbort == false && it != m_qifLines.end(); ++it) { ++m_linenumber; // qDebug("Proc: '%s'", (*it).data()); @@ -399,27 +399,27 @@ bool MyMoneyQifReader::startImport(void) m_userAbort = false; m_pos = 0; m_linenumber = 0; - m_filename = QString::null; + m_filename = TQString(); m_data.clear(); if(!KIO::NetAccess::download(m_url, m_filename, NULL)) { KMessageBox::detailedError(0, - i18n("Error while loading file '%1'!").arg(m_url.prettyURL()), + i18n("Error while loading file '%1'!").tqarg(m_url.prettyURL()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; } - m_file = new QFile(m_filename); + m_file = new TQFile(m_filename); if(m_file->open(IO_ReadOnly)) { #ifdef DEBUG_IMPORT - Q_LONG len; + TQ_LONG len; while(!m_file->atEnd()) { len = m_file->readBlock(m_buffer, sizeof(m_buffer)); if(len == -1) { - qWarning("Failed to read block from QIF import file"); + qWarning("Failed to read block from TQIF import file"); } else { slotReceivedDataFromFilter(0, m_buffer, len); } @@ -433,13 +433,13 @@ bool MyMoneyQifReader::startImport(void) m_filter << "cat"; m_filter << "-"; } else { - m_filter << QStringList::split(" ", m_qifProfile.filterScriptImport(), true); + m_filter << TQStringList::split(" ", m_qifProfile.filterScriptImport(), true); } m_entryType = EntryUnknown; if(m_filter.start(KProcess::NotifyOnExit, KProcess::All)) { m_filter.resume(); - signalProgress(0, m_file->size(), i18n("Reading QIF ...")); + signalProgress(0, m_file->size(), i18n("Reading TQIF ...")); slotSendDataToFilter(); rc = true; } else { @@ -460,8 +460,8 @@ bool MyMoneyQifReader::finishImport(void) // remove the Don't ask again entries KConfig* config = KGlobal::config(); - config->setGroup(QString::fromLatin1("Notification Messages")); - QStringList::ConstIterator it; + config->setGroup(TQString::tqfromLatin1("Notification Messages")); + TQStringList::ConstIterator it; for(it = m_dontAskAgain.begin(); it != m_dontAskAgain.end(); ++it) { config->deleteEntry(*it); @@ -480,8 +480,8 @@ bool MyMoneyQifReader::finishImport(void) // remove the Don't ask again entries KConfig* config = KGlobal::config(); - config->setGroup(QString::fromLatin1("Notification Messages")); - QStringList::ConstIterator it; + config->setGroup(TQString::tqfromLatin1("Notification Messages")); + TQStringList::ConstIterator it; for(it = m_dontAskAgain.begin(); it != m_dontAskAgain.end(); ++it) { config->deleteEntry(*it); @@ -511,7 +511,7 @@ bool MyMoneyQifReader::finishImport(void) dlg.show(); kapp->processEvents(); MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyTransaction>::iterator it = m_transactionCache.begin(); + TQValueList<MyMoneyTransaction>::iterator it = m_transactionCache.begin(); MyMoneyFileTransaction ft; try { @@ -531,55 +531,55 @@ bool MyMoneyQifReader::finishImport(void) ft.commit(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to add transactions"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; rc = false; } #endif // Now to import the statements - QValueList<MyMoneyStatement>::const_iterator it_st; + TQValueList<MyMoneyStatement>::const_iterator it_st; for(it_st = d->statements.begin(); it_st != d->statements.end(); ++it_st) kmymoney2->slotStatementImport(*it_st); return rc; } -void MyMoneyQifReader::processQifSpecial(const QString& _line) +void MyMoneyQifReader::processQifSpecial(const TQString& _line) { - QString line = _line.mid(1); // get rid of exclamation mark - // QString test = line.left(5).lower(); - if(line.left(5).lower() == QString("type:")) { + TQString line = _line.mid(1); // get rid of exclamation mark + // TQString test = line.left(5).lower(); + if(line.left(5).lower() == TQString("type:")) { line = line.mid(5); // exportable accounts - if(line.lower() == "ccard" || KMyMoneyGlobalSettings::qifCreditCard().lower().contains(line.lower())) { + if(line.lower() == "ccard" || KMyMoneyGlobalSettings::qifCreditCard().lower().tqcontains(line.lower())) { d->accountType = MyMoneyAccount::CreditCard; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "bank" || KMyMoneyGlobalSettings::qifBank().lower().contains(line.lower())) { + } else if(line.lower() == "bank" || KMyMoneyGlobalSettings::qifBank().lower().tqcontains(line.lower())) { d->accountType = MyMoneyAccount::Checkings; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "cash" || KMyMoneyGlobalSettings::qifCash().lower().contains(line.lower())) { + } else if(line.lower() == "cash" || KMyMoneyGlobalSettings::qifCash().lower().tqcontains(line.lower())) { d->accountType = MyMoneyAccount::Cash; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "oth a" || KMyMoneyGlobalSettings::qifAsset().lower().contains(line.lower())) { + } else if(line.lower() == "oth a" || KMyMoneyGlobalSettings::qifAsset().lower().tqcontains(line.lower())) { d->accountType = MyMoneyAccount::Asset; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "oth l" || line.lower() == i18n("QIF tag for liability account", "Oth L").lower()) { + } else if(line.lower() == "oth l" || line.lower() == i18n("TQIF tag for liability account", "Oth L").lower()) { d->accountType = MyMoneyAccount::Liability; d->firstTransaction = true; d->transactionType = m_entryType = EntryTransaction; - } else if(line.lower() == "invst" || line.lower() == i18n("QIF tag for investment account", "Invst").lower()) { + } else if(line.lower() == "invst" || line.lower() == i18n("TQIF tag for investment account", "Invst").lower()) { d->transactionType = m_entryType = EntryInvestmentTransaction; - } else if(line.lower() == "invoice" || KMyMoneyGlobalSettings::qifInvoice().lower().contains(line.lower())) { + } else if(line.lower() == "invoice" || KMyMoneyGlobalSettings::qifInvoice().lower().tqcontains(line.lower())) { m_entryType = EntrySkip; } else if(line.lower() == "tax") { @@ -589,19 +589,19 @@ void MyMoneyQifReader::processQifSpecial(const QString& _line) m_entryType = EntrySkip; // exportable lists - } else if(line.lower() == "cat" || line.lower() == i18n("QIF tag for category", "Cat").lower()) { + } else if(line.lower() == "cat" || line.lower() == i18n("TQIF tag for category", "Cat").lower()) { m_entryType = EntryCategory; - } else if(line.lower() == "security" || line.lower() == i18n("QIF tag for security", "Security").lower()) { + } else if(line.lower() == "security" || line.lower() == i18n("TQIF tag for security", "Security").lower()) { m_entryType = EntrySecurity; - } else if(line.lower() == "prices" || line.lower() == i18n("QIF tag for prices", "Prices").lower()) { + } else if(line.lower() == "prices" || line.lower() == i18n("TQIF tag for prices", "Prices").lower()) { m_entryType = EntryPrice; } else if(line.lower() == "payee") { m_entryType = EntryPayee; - } else if(line.lower() == "class" || line.lower() == i18n("QIF tag for a class", "Class").lower()) { + } else if(line.lower() == "class" || line.lower() == i18n("TQIF tag for a class", "Class").lower()) { m_entryType = EntryClass; } else if(line.lower() == "memorized") { @@ -617,7 +617,7 @@ void MyMoneyQifReader::processQifSpecial(const QString& _line) m_entryType = EntrySkip; } else { - qWarning("Unknown export header '!Type:%s' in QIF file on line %d: Skipping section.", line.data(), m_linenumber); + qWarning("Unknown export header '!Type:%s' in TQIF file on line %d: Skipping section.", line.data(), m_linenumber); m_entryType = EntrySkip; } @@ -635,7 +635,7 @@ void MyMoneyQifReader::processQifSpecial(const QString& _line) void MyMoneyQifReader::processQifEntry(void) { - // This method processes a 'QIF Entry' which is everything between two caret + // This method processes a 'TQIF Entry' which is everything between two caret // signs // try { @@ -698,9 +698,9 @@ void MyMoneyQifReader::processQifEntry(void) } } -const QString MyMoneyQifReader::extractLine(const QChar id, int cnt) +const TQString MyMoneyQifReader::extractLine(const TQChar id, int cnt) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; m_extractedLine = -1; for(it = m_qifEntry.begin(); it != m_qifEntry.end(); ++it) { @@ -708,20 +708,20 @@ const QString MyMoneyQifReader::extractLine(const QChar id, int cnt) if((*it)[0] == id) { if(cnt-- == 1) { if((*it).mid(1).isEmpty()) - return QString(" "); + return TQString(" "); return (*it).mid(1); } } } m_extractedLine = -1; - return QString(); + return TQString(); } -void MyMoneyQifReader::extractSplits(QValueList<qSplit>& listqSplits) const +void MyMoneyQifReader::extractSplits(TQValueList<qSplit>& listqSplits) const { -// *** With apologies to QString MyMoneyQifReader::extractLine *** +// *** With apologies to TQString MyMoneyQifReader::extractLine *** - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = m_qifEntry.begin(); it != m_qifEntry.end(); ++it) { if((*it)[0] == "S") { @@ -744,13 +744,13 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE if(extractLine('P').lower() == m_qifProfile.openingBalanceText().lower()) { m_account = MyMoneyAccount(); m_account.setAccountType(accountType); - QString txt = extractLine('T'); + TQString txt = extractLine('T'); MyMoneyMoney balance = m_qifProfile.value('T', txt); - QDate date = m_qifProfile.date(extractLine('D')); + TQDate date = m_qifProfile.date(extractLine('D')); m_account.setOpeningDate(date); - QString name = extractLine('L'); + TQString name = extractLine('L'); if(name.left(1) == m_qifProfile.accountDelimiter().left(1)) { name = name.mid(1, name.length()-2); } @@ -761,7 +761,7 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE if ( ! balance.isZero() ) { MyMoneyFile* file = MyMoneyFile::instance(); - QString openingtxid = file->openingBalanceTransaction(m_account); + TQString openingtxid = file->openingBalanceTransaction(m_account); MyMoneyFileTransaction ft; if ( ! openingtxid.isEmpty() ) { @@ -772,8 +772,8 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE { const MyMoneySecurity& sec = file->security(m_account.currencyId()); if ( KMessageBox::questionYesNo( - qApp->mainWidget(), - i18n("The %1 account currently has an opening balance of %2. This QIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the QIF file?").arg(m_account.name(), split.shares().formatMoney(m_account, sec),balance.formatMoney(m_account, sec)), + tqApp->mainWidget(), + i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").tqarg(m_account.name(), split.shares().formatMoney(m_account, sec),balance.formatMoney(m_account, sec)), i18n("Overwrite opening balance"), KStdGuiItem::yes(), KStdGuiItem::no(), @@ -817,7 +817,7 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE // Lines 1-5 are processed via processQifEntry() and processAccountEntry() // Then Quicken issues line 6 but since the account does not carry any // transaction does not write an end delimiter. Arrrgh! So we end up with - // a QIF entry comprising of lines 6-11 and end up in this routine. Actually, + // a TQIF entry comprising of lines 6-11 and end up in this routine. Actually, // lines 7-11 are the leadin for the next account. So we check here if // the !Type:xxx record also contains an !Account line and process the // entry as required. @@ -832,7 +832,7 @@ void MyMoneyQifReader::processMSAccountEntry(const MyMoneyAccount::accountTypeE // Line 12 would set the mode to "cc transaction entries" // Lines 13+ would be interpreted as cc transaction entries, and life is good int exclamationCnt = 1; - QString category; + TQString category; do { category = extractLine('!', exclamationCnt++); } while(!category.isEmpty() && category != "Account"); @@ -870,13 +870,13 @@ void MyMoneyQifReader::processCategoryEntry(void) account.setName(extractLine('N')); account.setDescription(extractLine('D')); - MyMoneyAccount parentAccount; + MyMoneyAccount tqparentAccount; if(!extractLine('I').isEmpty()) { account.setAccountType(MyMoneyAccount::Income); - parentAccount = file->income(); + tqparentAccount = file->income(); } else if(!extractLine('E').isEmpty()) { account.setAccountType(MyMoneyAccount::Expense); - parentAccount = file->expense(); + tqparentAccount = file->expense(); } // check if we can find the account already in the file @@ -886,20 +886,20 @@ void MyMoneyQifReader::processCategoryEntry(void) if(acc.id().isEmpty()) { MyMoneyAccount brokerage; MyMoneyMoney balance; - kmymoney2->createAccount(account, parentAccount, brokerage, balance); + kmymoney2->createAccount(account, tqparentAccount, brokerage, balance); } } -QString MyMoneyQifReader::transferAccount(QString name, bool useBrokerage) +TQString MyMoneyQifReader::transferAccount(TQString name, bool useBrokerage) { - QString accountId; - QStringList tmpEntry = m_qifEntry; // keep temp copies + TQString accountId; + TQStringList tmpEntry = m_qifEntry; // keep temp copies MyMoneyAccount tmpAccount = m_account; m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << QString("N%1").arg(name); - m_qifEntry << QString("Tunknown"); - m_qifEntry << QString("D%1").arg(i18n("Autogenerated by QIF importer")); + m_qifEntry << TQString("N%1").tqarg(name); + m_qifEntry << TQString("Tunknown"); + m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); accountId = processAccountEntry(false); // in case we found a reference to an investment account, we need @@ -908,9 +908,9 @@ QString MyMoneyQifReader::transferAccount(QString name, bool useBrokerage) if(useBrokerage && (acc.accountType() == MyMoneyAccount::Investment)) { name = acc.brokerageName(); m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << QString("N%1").arg(name); - m_qifEntry << QString("Tunknown"); - m_qifEntry << QString("D%1").arg(i18n("Autogenerated by QIF importer")); + m_qifEntry << TQString("N%1").tqarg(name); + m_qifEntry << TQString("Tunknown"); + m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); accountId = processAccountEntry(false); } m_qifEntry = tmpEntry; // restore local copies @@ -925,16 +925,16 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp // if we don't have a name for the current account we need to extract the name from the L-record if(m_account.name().isEmpty()) { - QString name = extractLine('L'); + TQString name = extractLine('L'); if(name.isEmpty()) { - name = i18n("QIF imported, no account name supplied"); + name = i18n("TQIF imported, no account name supplied"); } d->isTransfer(name, m_qifProfile.accountDelimiter().left(1), m_qifProfile.accountDelimiter().mid(1,1)); - QStringList entry = m_qifEntry; // keep a temp copy + TQStringList entry = m_qifEntry; // keep a temp copy m_qifEntry.clear(); // and construct a temp entry to create/search the account - m_qifEntry << QString("N%1").arg(name); - m_qifEntry << QString("T%1").arg(d->accountTypeToQif(accType)); - m_qifEntry << QString("D%1").arg(i18n("Autogenerated by QIF importer")); + m_qifEntry << TQString("N%1").tqarg(name); + m_qifEntry << TQString("T%1").tqarg(d->accountTypeToQif(accType)); + m_qifEntry << TQString("D%1").tqarg(i18n("Autogenerated by TQIF importer")); processAccountEntry(); m_qifEntry = entry; // restore local copy } @@ -949,7 +949,7 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp acc = file->accountByName(m_account.brokerageName()); // check if we already have an opening balance transaction - QString tid = file->openingBalanceTransaction(acc); + TQString tid = file->openingBalanceTransaction(acc); MyMoneyTransaction ot; if(!tid.isEmpty()) { ot = file->transaction(tid); @@ -960,7 +960,7 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp } if(needCreate) { // in case we create it anyway, we issue a warning to the user to check it manually - KMessageBox::sorry(0, QString("<qt>%1</qt>").arg(i18n("KMyMoney has imported a second opening balance transaction into account <b>%1</b> which differs from the one found already on file. Please correct this manually once the import is done.").arg(acc.name())), i18n("Opening balance problem")); + KMessageBox::sorry(0, TQString("<qt>%1</qt>").tqarg(i18n("KMyMoney has imported a second opening balance transaction into account <b>%1</b> which differs from the one found already on file. Please correct this manually once the import is done.").tqarg(acc.name())), i18n("Opening balance problem")); } } @@ -984,7 +984,7 @@ void MyMoneyQifReader::createOpeningBalance(MyMoneyAccount::_accountTypeE accTyp } catch(MyMoneyException* e) { KMessageBox::detailedError(0, i18n("Error while creating opening balance transaction"), - QString("%1(%2):%3").arg(e->file()).arg(e->line()).arg(e->what()), + TQString("%1(%2):%3").tqarg(e->file()).tqarg(e->line()).tqarg(e->what()), i18n("File access error")); delete e; } @@ -1004,22 +1004,22 @@ void MyMoneyQifReader::processTransactionEntry(void) MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyStatement::Split s1; MyMoneyStatement::Transaction tr; - QString tmp; - QString accountId; + TQString tmp; + TQString accountId; int pos; - QString payee = extractLine('P'); + TQString payee = extractLine('P'); unsigned long h; h = MyMoneyTransaction::hash(m_qifEntry.join(";")); - QString hashBase; + TQString hashBase; hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).data(), h); int idx = 1; - QString hash; + TQString hash; for(;;) { - hash = QString("%1-%2").arg(hashBase).arg(idx); - QMap<QString, bool>::const_iterator it; - it = d->m_hashMap.find(hash); + hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); + TQMap<TQString, bool>::const_iterator it; + it = d->m_hashMap.tqfind(hash); if(it == d->m_hashMap.end()) { d->m_hashMap[hash] = true; break; @@ -1030,7 +1030,7 @@ void MyMoneyQifReader::processTransactionEntry(void) if(d->firstTransaction) { // check if this is an opening balance transaction and process it out of the statement - if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().contains(payee.lower()))) { + if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().tqcontains(payee.lower()))) { createOpeningBalance(); d->firstTransaction = false; return; @@ -1053,12 +1053,12 @@ void MyMoneyQifReader::processTransactionEntry(void) "date profile setting of \"%2\".\n\nPressing \"Continue\" will " "assign todays date to the transaction. Pressing \"Cancel\" will abort " "the import operation. You can then restart the import and select a different " - "QIF profile or create a new one.") - .arg(extractLine('D')).arg(m_qifProfile.inputDateFormat()), + "TQIF profile or create a new one.") + .tqarg(extractLine('D')).tqarg(m_qifProfile.inputDateFormat()), i18n("Invalid date format")); switch(rc) { case KMessageBox::Continue: - tr.m_datePosted = (QDate::currentDate()); + tr.m_datePosted = (TQDate::tqcurrentDate()); break; case KMessageBox::Cancel: @@ -1068,7 +1068,7 @@ void MyMoneyQifReader::processTransactionEntry(void) } tmp = extractLine('L'); - pos = tmp.findRev("--"); + pos = tmp.tqfindRev("--"); if(tmp.left(1) == m_qifProfile.accountDelimiter().left(1)) { // it's a transfer, so we wipe the memo // tmp = ""; why?? @@ -1081,18 +1081,18 @@ void MyMoneyQifReader::processTransactionEntry(void) // t.setMemo(tmp); // Assign the "#" field to the transaction's bank id - // This is the custom KMM extension to QIF for a unique ID + // This is the custom KMM extension to TQIF for a unique ID tmp = extractLine('#'); if(!tmp.isEmpty()) { - tr.m_strBankID = QString("ID %1").arg(tmp); + tr.m_strBankID = TQString("ID %1").tqarg(tmp); } #if 0 // Collect data for the account's split s1.m_accountId = m_account.id(); tmp = extractLine('S'); - pos = tmp.findRev("--"); + pos = tmp.tqfindRev("--"); if(pos != -1) { tmp = tmp.left(pos); } @@ -1101,7 +1101,7 @@ void MyMoneyQifReader::processTransactionEntry(void) tmp = tmp.mid(1, tmp.length()-2); s1.m_strCategoryName = tmp; #endif - // TODO (Ace) Deal with currencies more gracefully. QIF cannot deal with multiple + // TODO (Ace) Deal with currencies more gracefully. TQIF cannot deal with multiple // currencies, so we should assume that transactions imported into a given // account are in THAT ACCOUNT's currency. If one of those involves a transfer // to an account with a different currency, value and shares should be @@ -1140,7 +1140,7 @@ void MyMoneyQifReader::processTransactionEntry(void) accountId = transferAccount(tmp, false); } else { -/* pos = tmp.findRev("--"); +/* pos = tmp.tqfindRev("--"); if(pos != -1) { t.setValue("Dialog", tmp.mid(pos+2)); tmp = tmp.left(pos); @@ -1164,12 +1164,12 @@ void MyMoneyQifReader::processTransactionEntry(void) if ( account.id() == m_account.id() ) { kdDebug(0) << "Line " << m_linenumber << ": Cannot transfer to the same account. Transfer ignored." << endl; - accountId = QString(); + accountId = TQString(); } } catch (MyMoneyException *e) { kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId.data() << " not found" << endl; - accountId = QString(); + accountId = TQString(); delete e; } } @@ -1182,7 +1182,7 @@ void MyMoneyQifReader::processTransactionEntry(void) } else { // split transaction - QValueList<qSplit> listqSplits; + TQValueList<qSplit> listqSplits; extractSplits(listqSplits); // ****** ensure each field is ****** // * attached to correct split * @@ -1200,7 +1200,7 @@ void MyMoneyQifReader::processTransactionEntry(void) accountId = transferAccount(tmp, false); } else { - pos = tmp.findRev("--"); + pos = tmp.tqfindRev("--"); if(pos != -1) { /// t.setValue("Dialog", tmp.mid(pos+2)); tmp = tmp.left(pos); @@ -1223,12 +1223,12 @@ void MyMoneyQifReader::processTransactionEntry(void) if ( account.id() == m_account.id() ) { kdDebug(0) << "Line " << m_linenumber << ": Cannot transfer to the same account. Transfer ignored." << endl; - accountId = QString(); + accountId = TQString(); } } catch (MyMoneyException *e) { kdDebug(0) << "Line " << m_linenumber << ": Account with id " << accountId.data() << " not found" << endl; - accountId = QString(); + accountId = TQString(); delete e; } } @@ -1290,7 +1290,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // t.setCommodity(m_account.currencyId()); // 'D' field: Date - QDate date = m_qifProfile.date(extractLine('D')); + TQDate date = m_qifProfile.date(extractLine('D')); if(date.isValid()) tr.m_datePosted = date; else @@ -1300,12 +1300,12 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) "date profile setting of \"%2\".\n\nPressing \"Continue\" will " "assign todays date to the transaction. Pressing \"Cancel\" will abort " "the import operation. You can then restart the import and select a different " - "QIF profile or create a new one.") - .arg(extractLine('D')).arg(m_qifProfile.inputDateFormat()), + "TQIF profile or create a new one.") + .tqarg(extractLine('D')).tqarg(m_qifProfile.inputDateFormat()), i18n("Invalid date format")); switch(rc) { case KMessageBox::Continue: - tr.m_datePosted = QDate::currentDate(); + tr.m_datePosted = TQDate::tqcurrentDate(); break; case KMessageBox::Cancel: @@ -1315,21 +1315,21 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) } // 'M' field: Memo - QString memo = extractLine('M'); + TQString memo = extractLine('M'); d->fixMultiLineMemo(memo); tr.m_strMemo = memo; unsigned long h; h = MyMoneyTransaction::hash(m_qifEntry.join(";")); - QString hashBase; + TQString hashBase; hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).data(), h); int idx = 1; - QString hash; + TQString hash; for(;;) { - hash = QString("%1-%2").arg(hashBase).arg(idx); - QMap<QString, bool>::const_iterator it; - it = d->m_hashMap.find(hash); + hash = TQString("%1-%2").tqarg(hashBase).tqarg(idx); + TQMap<TQString, bool>::const_iterator it; + it = d->m_hashMap.tqfind(hash); if(it == d->m_hashMap.end()) { d->m_hashMap[hash] = true; break; @@ -1339,9 +1339,9 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) tr.m_strBankID = hash; // '#' field: BankID - QString tmp = extractLine('#'); + TQString tmp = extractLine('#'); if ( ! tmp.isEmpty() ) - tr.m_strBankID = QString("ID %1").arg(tmp); + tr.m_strBankID = TQString("ID %1").tqarg(tmp); // Reconciliation flag tr.m_reconcile = d->reconcileState(extractLine('C')); @@ -1361,7 +1361,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) #if 0 // we must check for that later, because certain activities don't need a security // 'Y' field: Security name - QString securityname = extractLine('Y').lower(); + TQString securityname = extractLine('Y').lower(); if ( securityname.isEmpty() ) { kdDebug(2) << "Line " << m_linenumber << ": Investment transaction without a security is not supported." << endl; @@ -1379,13 +1379,13 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // abbreviations or ordered words differently, etc. // // If there is a perfect name match with a subordinate stock account, great. - // More likely, we have to rely on the QIF file containing !Type:Security + // More likely, we have to rely on the TQIF file containing !Type:Security // records, which tell us the mapping from name to symbol. // - // Therefore, generally it is not recommended to import a QIF file containing + // Therefore, generally it is not recommended to import a TQIF file containing // investment transactions but NOT containing security records. - QString securitysymbol = m_investmentMap[securityname]; + TQString securitysymbol = m_investmentMap[securityname]; // the correct account is the stock account which matches two criteria: // (1) it is a sub-account of the selected investment account, and either @@ -1395,14 +1395,14 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // search through each subordinate account bool found = false; MyMoneyAccount thisaccount = m_account; - QStringList accounts = thisaccount.accountList(); - QStringList::const_iterator it_account = accounts.begin(); + TQStringList accounts = thisaccount.accountList(); + TQStringList::const_iterator it_account = accounts.begin(); while( !found && it_account != accounts.end() ) { - QString currencyid = file->account(*it_account).currencyId(); + TQString currencyid = file->account(*it_account).currencyId(); MyMoneySecurity security = file->security( currencyid ); - QString symbol = security.tradingSymbol().lower(); - QString name = security.name().lower(); + TQString symbol = security.tradingSymbol().lower(); + TQString name = security.name().lower(); if ( securityname == name || securitysymbol == symbol ) { @@ -1414,7 +1414,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) #if 0 // update the price, while we're here. in the future, this should be // an option - QString basecurrencyid = file->baseCurrency().id(); + TQString basecurrencyid = file->baseCurrency().id(); MyMoneyPrice price = file->price( currencyid, basecurrencyid, t_in.m_datePosted, true ); if ( !price.isValid() ) { @@ -1434,9 +1434,9 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) // If the security is not known, notify the user // TODO (Ace) A "SelectOrCreateAccount" interface for investments KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. " - "Transactions involving this security will be ignored.").arg(securityname), + "Transactions involving this security will be ignored.").tqarg(securityname), i18n("Security not found"), - QString("MissingSecurity%1").arg(securityname.stripWhiteSpace())); + TQString("MissingSecurity%1").tqarg(securityname.stripWhiteSpace())); return; } #endif @@ -1448,7 +1448,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) MyMoneyMoney quantity = m_qifProfile.value('T', extractLine('Q')); // 'N' field: Action - QString action = extractLine('N').lower(); + TQString action = extractLine('N').lower(); // remove trailing X, which seems to have no purpose (?!) bool xAction = false; @@ -1458,7 +1458,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) } // Whether to create a cash split for the other side of the value - QString accountname ;//= extractLine('L'); + TQString accountname ;//= extractLine('L'); if ( action == "reinvdiv" || action == "reinvlg" || action == "reinvsh" ) { d->st.m_listPrices += price; @@ -1475,7 +1475,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) { tr.m_eAction = (MyMoneyStatement::Transaction::eaCashDividend); - QString tmp = extractLine('L'); + TQString tmp = extractLine('L'); // if the action ends in an X, the L-Record contains the asset account // to which the dividend should be transferred. In the other cases, it // may contain a category that identifies the income category for the @@ -1512,7 +1512,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) if(action == "miscexp") tr.m_eAction = (MyMoneyStatement::Transaction::eaFees); - QString tmp = extractLine('L'); + TQString tmp = extractLine('L'); // if the action ends in an X, the L-Record contains the asset account // to which the dividend should be transferred. In the other cases, it // may contain a category that identifies the income category for the @@ -1538,19 +1538,19 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) tr.m_amount = -(amount - tr.m_fees); if(tr.m_strMemo.isEmpty()) - tr.m_strMemo = (QString("%1 %2").arg(extractLine('Y')).arg(d->typeToAccountName(action))).stripWhiteSpace(); + tr.m_strMemo = (TQString("%1 %2").tqarg(extractLine('Y')).tqarg(d->typeToAccountName(action))).stripWhiteSpace(); } else if (action == "xin" || action == "xout") { - QString payee = extractLine('P'); - if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().contains(payee.lower()))) { + TQString payee = extractLine('P'); + if(!payee.isEmpty() && ((payee.lower() == "opening balance") || KMyMoneyGlobalSettings::qifOpeningBalance().lower().tqcontains(payee.lower()))) { createOpeningBalance(MyMoneyAccount::Investment); return; } tr.m_eAction = (MyMoneyStatement::Transaction::eaNone); MyMoneyStatement::Split s2; - QString tmp = extractLine('L'); + TQString tmp = extractLine('L'); if(d->isTransfer(tmp, m_qifProfile.accountDelimiter().left(1), m_qifProfile.accountDelimiter().mid(1, 1))) { s2.m_accountId = transferAccount(tmp); s2.m_strCategoryName = tmp; @@ -1569,7 +1569,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) } else if (action == "buy") { - QString tmp = extractLine('L'); + TQString tmp = extractLine('L'); if(d->isTransfer(tmp, m_qifProfile.accountDelimiter().left(1), m_qifProfile.accountDelimiter().mid(1, 1)) == true) { tr.m_strBrokerageAccount = tmp; transferAccount(tmp); // make sure the account exists @@ -1581,7 +1581,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) } else if (action == "sell") { - QString tmp = extractLine('L'); + TQString tmp = extractLine('L'); if(d->isTransfer(tmp, m_qifProfile.accountDelimiter().left(1), m_qifProfile.accountDelimiter().mid(1, 1)) == true) { tr.m_strBrokerageAccount = tmp; transferAccount(tmp); // make sure the account exists @@ -1844,16 +1844,16 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void) */ } -const QString MyMoneyQifReader::findOrCreateIncomeAccount(const QString& searchname) +const TQString MyMoneyQifReader::findOrCreateIncomeAccount(const TQString& searchname) { - QString result; + TQString result; MyMoneyFile *file = MyMoneyFile::instance(); // First, try to find this account as an income account MyMoneyAccount acc = file->income(); - QStringList list = acc.accountList(); - QStringList::ConstIterator it_accid = list.begin(); + TQStringList list = acc.accountList(); + TQStringList::ConstIterator it_accid = list.begin(); while ( it_accid != list.end() ) { acc = file->account(*it_accid); @@ -1883,16 +1883,16 @@ const QString MyMoneyQifReader::findOrCreateIncomeAccount(const QString& searchn // TODO (Ace) Combine this and the previous function -const QString MyMoneyQifReader::findOrCreateExpenseAccount(const QString& searchname) +const TQString MyMoneyQifReader::findOrCreateExpenseAccount(const TQString& searchname) { - QString result; + TQString result; MyMoneyFile *file = MyMoneyFile::instance(); // First, try to find this account as an income account MyMoneyAccount acc = file->expense(); - QStringList list = acc.accountList(); - QStringList::ConstIterator it_accid = list.begin(); + TQStringList list = acc.accountList(); + TQStringList::ConstIterator it_accid = list.begin(); while ( it_accid != list.end() ) { acc = file->account(*it_accid); @@ -1920,16 +1920,16 @@ const QString MyMoneyQifReader::findOrCreateExpenseAccount(const QString& search return result; } -QString MyMoneyQifReader::checkCategory(const QString& name, const MyMoneyMoney value, const MyMoneyMoney value2) +TQString MyMoneyQifReader::checkCategory(const TQString& name, const MyMoneyMoney value, const MyMoneyMoney value2) { - QString accountId; + TQString accountId; MyMoneyFile *file = MyMoneyFile::instance(); MyMoneyAccount account; bool found = true; if(!name.isEmpty()) { // The category might be constructed with an arbitraty depth (number of - // colon delimited fields). We try to find a parent account within this + // colon delimited fields). We try to find a tqparent account within this // hierarchy by searching the following sequence: // // aaaa:bbbb:cccc:ddddd @@ -1941,40 +1941,40 @@ QString MyMoneyQifReader::checkCategory(const QString& name, const MyMoneyMoney // 5. don't search , create aaaa:bbbb:cccc:dddd account.setName(name); - QString accName; // part to be created (right side in above list) - QString parent(name); // a possible parent part (left side in above list) + TQString accName; // part to be created (right side in above list) + TQString tqparent(name); // a possible tqparent part (left side in above list) do { - accountId = file->categoryToAccount(parent); + accountId = file->categoryToAccount(tqparent); if(accountId.isEmpty()) { found = false; // prepare next step if(!accName.isEmpty()) accName.prepend(':'); - accName.prepend(parent.section(':', -1)); + accName.prepend(tqparent.section(':', -1)); account.setName(accName); - parent = parent.section(':', 0, -2); + tqparent = tqparent.section(':', 0, -2); } else if(!accName.isEmpty()) { account.setParentAccountId(accountId); } } - while(!parent.isEmpty() && accountId.isEmpty()); + while(!tqparent.isEmpty() && accountId.isEmpty()); // if we did not find the category, we create it if(!found) { - MyMoneyAccount parent; - if(account.parentAccountId().isEmpty()) { + MyMoneyAccount tqparent; + if(account.tqparentAccountId().isEmpty()) { if(!value.isNegative() && value2.isNegative()) - parent = file->income(); + tqparent = file->income(); else - parent = file->expense(); + tqparent = file->expense(); } else { - parent = file->account(account.parentAccountId()); + tqparent = file->account(account.tqparentAccountId()); } account.setAccountType((!value.isNegative() && value2.isNegative()) ? MyMoneyAccount::Income : MyMoneyAccount::Expense); MyMoneyAccount brokerage; - // clear out the parent id, because createAccount() does not like that - account.setParentAccountId(QString()); - kmymoney2->createAccount(account, parent, brokerage, MyMoneyMoney()); + // clear out the tqparent id, because createAccount() does not like that + account.setParentAccountId(TQString()); + kmymoney2->createAccount(account, tqparent, brokerage, MyMoneyMoney()); accountId = account.id(); } } @@ -1982,12 +1982,12 @@ QString MyMoneyQifReader::checkCategory(const QString& name, const MyMoneyMoney return accountId; } -QString MyMoneyQifReader::processAccountEntry(bool resetAccountId) +TQString MyMoneyQifReader::processAccountEntry(bool resetAccountId) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount account; - QString tmp; + TQString tmp; account.setName(extractLine('N')); // qDebug("Process account '%s'", account.name().data()); @@ -2003,8 +2003,8 @@ QString MyMoneyQifReader::processAccountEntry(bool resetAccountId) account.setValue("lastStatementDate", m_qifProfile.date(tmp).toString("yyyy-MM-dd")); QifEntryTypeE transactionType = EntryTransaction; - QString type = extractLine('T').lower().remove(QRegExp("\\s+")); - if(type == m_qifProfile.profileType().lower().remove(QRegExp("\\s+"))) { + TQString type = extractLine('T').lower().remove(TQRegExp("\\s+")); + if(type == m_qifProfile.profileType().lower().remove(TQRegExp("\\s+"))) { account.setAccountType(MyMoneyAccount::Checkings); } else if(type == "ccard" || type == "creditcard") { account.setAccountType(MyMoneyAccount::CreditCard); @@ -2036,30 +2036,30 @@ QString MyMoneyQifReader::processAccountEntry(bool resetAccountId) if(account.accountType() == MyMoneyAccount::UnknownAccountType) account.setAccountType(MyMoneyAccount::Checkings); - MyMoneyAccount parentAccount; + MyMoneyAccount tqparentAccount; MyMoneyAccount brokerage; MyMoneyMoney balance; // in case it's a stock account, we need to setup a fix investment account if(account.isInvest()) { - acc.setName(i18n("%1 (Investment)").arg(account.name())); // use the same name for the investment account - acc.setDescription(i18n("Autogenerated by QIF importer from type Mutual account entry")); + acc.setName(i18n("%1 (Investment)").tqarg(account.name())); // use the same name for the investment account + acc.setDescription(i18n("Autogenerated by TQIF importer from type Mutual account entry")); acc.setAccountType(MyMoneyAccount::Investment); - parentAccount = file->asset(); - kmymoney2->createAccount(acc, parentAccount, brokerage, MyMoneyMoney()); - parentAccount = acc; + tqparentAccount = file->asset(); + kmymoney2->createAccount(acc, tqparentAccount, brokerage, MyMoneyMoney()); + tqparentAccount = acc; qDebug("We still need to create the stock account in MyMoneyQifReader::processAccountEntry()"); } else { - // setup parent according the type of the account + // setup tqparent according the type of the account switch(account.accountGroup()) { case MyMoneyAccount::Asset: default: - parentAccount = file->asset(); + tqparentAccount = file->asset(); break; case MyMoneyAccount::Liability: - parentAccount = file->liability(); + tqparentAccount = file->liability(); break; case MyMoneyAccount::Equity: - parentAccount = file->equity(); + tqparentAccount = file->equity(); break; } } @@ -2071,7 +2071,7 @@ QString MyMoneyQifReader::processAccountEntry(bool resetAccountId) brokerage.setAccountType(MyMoneyAccount::Checkings); brokerage.setCurrencyId(MyMoneyFile::instance()->baseCurrency().id()); } - kmymoney2->createAccount(account, parentAccount, brokerage, balance); + kmymoney2->createAccount(account, tqparentAccount, brokerage, balance); acc = account; // qDebug("Account created"); } else { @@ -2092,13 +2092,13 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone { MyMoneyFile* file = MyMoneyFile::instance(); - QString accountId; - QString msg; - QString typeStr; - QString leadIn; + TQString accountId; + TQString msg; + TQString typeStr; + TQString leadIn; KMyMoneyUtils::categoryTypeE type; - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; type = KMyMoneyUtils::none; switch(account.accountGroup()) { @@ -2123,14 +2123,14 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone if(!msg.isEmpty()) accountSelect.setCaption(msg); - it = m_accountTranslation.find((leadIn + MyMoneyFile::AccountSeperator + account.name()).lower()); + it = m_accountTranslation.tqfind((leadIn + MyMoneyFile::AccountSeperator + account.name()).lower()); if(it != m_accountTranslation.end()) { try { account = file->account(*it); return; } catch (MyMoneyException *e) { - QString message(i18n("Account \"%1\" disappeared: ").arg(account.name())); + TQString message(i18n("Account \"%1\" disappeared: ").tqarg(account.name())); message += e->what(); KMessageBox::error(0, message); delete e; @@ -2152,7 +2152,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone } else { switch(KMessageBox::questionYesNo(0, i18n("The %1 '%2' does not exist. Do you " - "want to create it?").arg(typeStr).arg(account.name()))) { + "want to create it?").tqarg(typeStr).tqarg(account.name()))) { case KMessageBox::Yes: break; case KMessageBox::No: @@ -2160,25 +2160,25 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone } } } else { - accountSelect.setHeader(i18n("Select %1").arg(typeStr)); + accountSelect.setHeader(i18n("Select %1").tqarg(typeStr)); if(!accountId.isEmpty()) { msg = i18n("The %1 <b>%2</b> currently exists. Do you want " "to import transactions to this account?") - .arg(typeStr).arg(account.name()); + .tqarg(typeStr).tqarg(account.name()); } else { msg = i18n("The %1 <b>%2</b> currently does not exist. You can " "create a new %3 by pressing the <b>Create</b> button " "or select another %4 manually from the selection box.") - .arg(typeStr).arg(account.name()).arg(typeStr).arg(typeStr); + .tqarg(typeStr).tqarg(account.name()).tqarg(typeStr).tqarg(typeStr); } } } else { - accountSelect.setHeader(i18n("Import transactions to %1").arg(typeStr)); - msg = i18n("No %1 information has been found in the selected QIF file. " + accountSelect.setHeader(i18n("Import transactions to %1").tqarg(typeStr)); + msg = i18n("No %1 information has been found in the selected TQIF file. " "Please select an account using the selection box in the dialog or " "create a new %2 by pressing the <b>Create</b> button.") - .arg(typeStr).arg(typeStr); + .tqarg(typeStr).tqarg(typeStr); } accountSelect.setDescription(msg); @@ -2187,18 +2187,18 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone accountSelect.showAbortButton(true); // display current entry in widget, the offending line (if any) will be shown in red - QStringList::Iterator it_e; + TQStringList::Iterator it_e; int i = 0; for(it_e = m_qifEntry.begin(); it_e != m_qifEntry.end(); ++it_e) { if(m_extractedLine == i) - accountSelect.m_qifEntry->setColor(QColor("red")); + accountSelect.m_qifEntry->setColor(TQColor("red")); accountSelect.m_qifEntry->append(*it_e); - accountSelect.m_qifEntry->setColor(QColor("black")); + accountSelect.m_qifEntry->setColor(TQColor("black")); ++i; } for(;;) { - if(accountSelect.exec() == QDialog::Accepted) { + if(accountSelect.exec() == TQDialog::Accepted) { if(!accountSelect.selectedAccount().isEmpty()) { accountId = accountSelect.selectedAccount(); @@ -2211,7 +2211,7 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone account = file->account(accountId); if ( ! balance.isZero() ) { - QString openingtxid = file->openingBalanceTransaction(account); + TQString openingtxid = file->openingBalanceTransaction(account); MyMoneyFileTransaction ft; if ( ! openingtxid.isEmpty() ) { @@ -2222,8 +2222,8 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone { const MyMoneySecurity& sec = file->security(account.currencyId()); if ( KMessageBox::questionYesNo( - qApp->mainWidget(), - i18n("The %1 account currently has an opening balance of %2. This QIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the QIF file?").arg(account.name(), split.shares().formatMoney(account, sec), balance.formatMoney(account, sec)), + tqApp->mainWidget(), + i18n("The %1 account currently has an opening balance of %2. This TQIF file reports an opening balance of %3. Would you like to overwrite the current balance with the one from the TQIF file?").tqarg(account.name(), split.shares().formatMoney(account, sec), balance.formatMoney(account, sec)), i18n("Overwrite opening balance"), KStdGuiItem::yes(), KStdGuiItem::no(), @@ -2256,12 +2256,12 @@ void MyMoneyQifReader::selectOrCreateAccount(const SelectCreateMode mode, MyMone } } -void MyMoneyQifReader::setProgressCallback(void(*callback)(int, int, const QString&)) +void MyMoneyQifReader::setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; } -void MyMoneyQifReader::signalProgress(int current, int total, const QString& msg) +void MyMoneyQifReader::signalProgress(int current, int total, const TQString& msg) { if(m_progressCallback != 0) (*m_progressCallback)(current, total, msg); @@ -2287,23 +2287,23 @@ void MyMoneyQifReader::processPriceEntry(void) */ - QStringList::const_iterator it_line = m_qifEntry.begin(); + TQStringList::const_iterator it_line = m_qifEntry.begin(); // Make a price for each line - QRegExp priceExp("\"(.*)\",(.*),\"(.*)\""); + TQRegExp priceExp("\"(.*)\",(.*),\"(.*)\""); while ( it_line != m_qifEntry.end() ) { if(priceExp.search(*it_line) != -1) { MyMoneyStatement::Price price; price.m_strSecurity = priceExp.cap(1); - QString pricestr = priceExp.cap(2); - QString datestr = priceExp.cap(3); + TQString pricestr = priceExp.cap(2); + TQString datestr = priceExp.cap(3); kdDebug(0) << "Price:" << price.m_strSecurity << " / " << pricestr << " / " << datestr << endl; // Only add the price if the date is valid. If invalid, fail silently. See note above. // Also require the price value to not have any slashes. Old prices will be something like // "25 9/16", which we do not support. So we'll skip the price for now. - QDate date = m_qifProfile.date(datestr); + TQDate date = m_qifProfile.date(datestr); MyMoneyMoney rate(m_qifProfile.value('P', pricestr)); if(date.isValid() && !rate.isZero()) { diff --git a/kmymoney2/converter/mymoneyqifreader.h b/kmymoney2/converter/mymoneyqifreader.h index 77bf5ad..385b1ff 100644 --- a/kmymoney2/converter/mymoneyqifreader.h +++ b/kmymoney2/converter/mymoneyqifreader.h @@ -20,15 +20,15 @@ * * ***************************************************************************/ -#ifndef MYMONEYQIFREADER_H -#define MYMONEYQIFREADER_H +#ifndef MYMONEYTQIFREADER_H +#define MYMONEYTQIFREADER_H // ---------------------------------------------------------------------------- // QT Headers -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -49,9 +49,10 @@ class MyMoneyFileTransaction; /** * @author Thomas Baumgart */ -class MyMoneyQifReader : public QObject +class MyMoneyQifReader : public TQObject { Q_OBJECT + TQ_OBJECT friend class Private; private: @@ -71,9 +72,9 @@ private: struct qSplit { - QString m_strCategoryName; - QString m_strMemo; - QString m_amount; + TQString m_strCategoryName; + TQString m_strMemo; + TQString m_amount; }; @@ -99,16 +100,16 @@ public: * the file is send through this filter and the result * is stored in the m_tempFile file. * - * @param name QString reference to the name of the profile + * @param name TQString reference to the name of the profile */ - void setProfile(const QString& name); + void setProfile(const TQString& name); /** * This method actually starts the import of data from the selected file * into the MyMoney engine. * * This method also starts the user defined import filter program - * defined in the QIF profile. If none is defined, the file is read + * defined in the TQIF profile. If none is defined, the file is read * as is (actually the UNIX command 'cat -' is used as the filter). * * If data from the filter program is available, the slot @@ -138,7 +139,7 @@ public: const MyMoneyAccount& account() const { return m_account; }; - void setProgressCallback(void(*callback)(int, int, const QString&)); + void setProgressCallback(void(*callback)(int, int, const TQString&)); private: /** @@ -147,11 +148,11 @@ private: * * For a parameter description see KMyMoneyView::progressCallback(). */ - void signalProgress(int current, int total, const QString& = ""); + void signalProgress(int current, int total, const TQString& = ""); /** * This method scans a transaction contained in - * a QIF file formatted as an account record. This + * a TQIF file formatted as an account record. This * format is used by MS-Money. If the specific data * is not found, then the data in the entry is treated * as a transaction. In this case, the user will be asked to @@ -174,7 +175,7 @@ private: * * The id of the account will be returned. */ - QString processAccountEntry(bool resetAccountId = true); + TQString processAccountEntry(bool resetAccountId = true); /** * This method scans the m_qifEntry object as a category record specified @@ -217,15 +218,15 @@ private: /** * This method process a line starting with an exclamation mark */ - void processQifSpecial(const QString& _line); + void processQifSpecial(const TQString& _line); /** * This method is used to get the account id of the split for - * a transaction from the text found in the QIF $ or L record. + * a transaction from the text found in the TQIF $ or L record. * If an account with the name is not found, the user is asked * if it should be created. * - * @param name name of account as found in the QIF file + * @param name name of account as found in the TQIF file * @param value value found in the T record * @param value2 value found in the $ record for splitted transactions * @@ -233,27 +234,27 @@ private: * or the account was not found and not created the * return value will be "". */ - QString checkCategory(const QString& name, const MyMoneyMoney value, const MyMoneyMoney value2); + TQString checkCategory(const TQString& name, const MyMoneyMoney value, const MyMoneyMoney value2); /** * This method extracts the line beginning with the letter @p id - * from the lines contained in the QStringList object @p m_qifEntry. - * An empty QString is returned, if the line is not found. + * from the lines contained in the TQStringList object @p m_qifEntry. + * An empty TQString is returned, if the line is not found. * - * @param id QChar containing the letter to be found + * @param id TQChar containing the letter to be found * @param cnt return cnt'th of occurance of id in lines. cnt defaults to 1. * - * @return QString with the remainder of the line or empty if + * @return TQString with the remainder of the line or empty if * @p id is not found in @p lines */ - const QString extractLine(const QChar id, int cnt = 1); + const TQString extractLine(const TQChar id, int cnt = 1); /** - * This method examines each line in the QStringList object @p m_qifEntry, + * This method examines each line in the TQStringList object @p m_qifEntry, * searching for split entries, which it extracts into a struct qSplit and * stores all splits found in @p listqSplits . */ - void extractSplits(QValueList<qSplit>& listqSplits) const; + void extractSplits(TQValueList<qSplit>& listqSplits) const; enum SelectCreateMode { Create = 0, @@ -303,9 +304,9 @@ private: * @p searchname as a name, and returns the id if the newly created account * * @param searchname The name of the account to find or create - * @return QString id of the found or created account + * @return TQString id of the found or created account */ - static const QString findOrCreateIncomeAccount(const QString& searchname); + static const TQString findOrCreateIncomeAccount(const TQString& searchname); /** * This method looks up the @p searchname account by name and returns its id @@ -313,9 +314,9 @@ private: * @p searchname as a name, and returns the id if the newly created account * * @param searchname The name of the account to find or create - * @return QString id of the found or created account + * @return TQString id of the found or created account */ - static const QString findOrCreateExpenseAccount(const QString& searchname); + static const TQString findOrCreateExpenseAccount(const TQString& searchname); /** * This method returns the account id for a given account @a name. In @@ -323,7 +324,7 @@ private: * (the default), the id of the corresponding brokerage account will be * returned. In case an account is not existant, it will be created. */ - QString transferAccount(QString name, bool useBrokerage = true); + TQString transferAccount(TQString name, bool useBrokerage = true); // void processQifLine(void); void createOpeningBalance(MyMoneyAccount::_accountTypeE accType = MyMoneyAccount::Checkings); @@ -356,22 +357,22 @@ private: Private* const d; KProcess m_filter; - QString m_filename; + TQString m_filename; KURL m_url; MyMoneyQifProfile m_qifProfile; MyMoneyAccount m_account; unsigned long m_transactionsSkipped; unsigned long m_transactionsProcessed; - QStringList m_dontAskAgain; - QMap<QString, QString> m_accountTranslation; - QMap<QString, QString> m_investmentMap; - QFile *m_file; + TQStringList m_dontAskAgain; + TQMap<TQString, TQString> m_accountTranslation; + TQMap<TQString, TQString> m_investmentMap; + TQFile *m_file; char m_buffer[1024]; - QCString m_lineBuffer; - QStringList m_qifEntry; + TQCString m_lineBuffer; + TQStringList m_qifEntry; int m_extractedLine; - QString m_qifLine; - QStringList m_qifLines; + TQString m_qifLine; + TQStringList m_qifLines; QifEntryTypeE m_entryType; bool m_skipAccount; bool m_processingData; @@ -382,11 +383,11 @@ private: bool m_warnedInvestment; bool m_warnedSecurity; bool m_warnedPrice; - QValueList<MyMoneyTransaction> m_transactionCache; + TQValueList<MyMoneyTransaction> m_transactionCache; - QValueList<QByteArray> m_data; + TQValueList<TQByteArray> m_data; - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); MyMoneyFileTransaction* m_ft; }; diff --git a/kmymoney2/converter/mymoneyqifwriter.cpp b/kmymoney2/converter/mymoneyqifwriter.cpp index 9526acd..8ab5c0f 100644 --- a/kmymoney2/converter/mymoneyqifwriter.cpp +++ b/kmymoney2/converter/mymoneyqifwriter.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -45,16 +45,16 @@ MyMoneyQifWriter::~MyMoneyQifWriter() { } -void MyMoneyQifWriter::write(const QString& filename, const QString& profile, - const QString& accountId, const bool accountData, +void MyMoneyQifWriter::write(const TQString& filename, const TQString& profile, + const TQString& accountId, const bool accountData, const bool categoryData, - const QDate& startDate, const QDate& endDate) + const TQDate& startDate, const TQDate& endDate) { m_qifProfile.loadProfile("Profile-" + profile); - QFile qifFile(filename); + TQFile qifFile(filename); if(qifFile.open(IO_WriteOnly)) { - QTextStream s(&qifFile); + TQTextStream s(&qifFile); try { if(categoryData) { @@ -67,9 +67,9 @@ void MyMoneyQifWriter::write(const QString& filename, const QString& profile, emit signalProgress(-1, -1); } catch(MyMoneyException *e) { - QString errMsg = i18n("Unexpected exception '%1' thrown in %2, line %3 " + TQString errMsg = i18n("Unexpected exception '%1' thrown in %2, line %3 " "caught in MyMoneyQifWriter::write()") - .arg(e->what()).arg(e->file()).arg(e->line()); + .tqarg(e->what()).tqarg(e->file()).tqarg(e->line()); KMessageBox::error(0, errMsg); delete e; @@ -77,11 +77,11 @@ void MyMoneyQifWriter::write(const QString& filename, const QString& profile, qifFile.close(); } else { - KMessageBox::error(0, i18n("Unable to open file '%1' for writing").arg(filename)); + KMessageBox::error(0, i18n("Unable to open file '%1' for writing").tqarg(filename)); } } -void MyMoneyQifWriter::writeAccountEntry(QTextStream &s, const QString& accountId, const QDate& startDate, const QDate& endDate) +void MyMoneyQifWriter::writeAccountEntry(TQTextStream &s, const TQString& accountId, const TQDate& startDate, const TQDate& endDate) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount account; @@ -89,8 +89,8 @@ void MyMoneyQifWriter::writeAccountEntry(QTextStream &s, const QString& accountI account = file->account(accountId); MyMoneyTransactionFilter filter(accountId); filter.setDateFilter(startDate, endDate); - QValueList<MyMoneyTransaction> list = file->transactionList(filter); - QString openingBalanceTransactionId; + TQValueList<MyMoneyTransaction> list = file->transactionList(filter); + TQString openingBalanceTransactionId; s << "!Type:" << m_qifProfile.profileType() << endl; if(!startDate.isValid() || startDate <= account.openingDate()) { @@ -117,7 +117,7 @@ void MyMoneyQifWriter::writeAccountEntry(QTextStream &s, const QString& accountI s << endl; s << "^" << endl; - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; signalProgress(0, list.count()); int count = 0; for(it = list.begin(); it != list.end(); ++it) { @@ -128,7 +128,7 @@ void MyMoneyQifWriter::writeAccountEntry(QTextStream &s, const QString& accountI } } -void MyMoneyQifWriter::writeCategoryEntries(QTextStream &s) +void MyMoneyQifWriter::writeCategoryEntries(TQTextStream &s) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount income; @@ -138,9 +138,9 @@ void MyMoneyQifWriter::writeCategoryEntries(QTextStream &s) expense = file->expense(); s << "!Type:Cat" << endl; - QStringList list = income.accountList() + expense.accountList(); + TQStringList list = income.accountList() + expense.accountList(); emit signalProgress(0, list.count()); - QStringList::Iterator it; + TQStringList::Iterator it; int count = 0; for(it = list.begin(); it != list.end(); ++it) { writeCategoryEntry(s, *it, ""); @@ -148,24 +148,24 @@ void MyMoneyQifWriter::writeCategoryEntries(QTextStream &s) } } -void MyMoneyQifWriter::writeCategoryEntry(QTextStream &s, const QString& accountId, const QString& leadIn) +void MyMoneyQifWriter::writeCategoryEntry(TQTextStream &s, const TQString& accountId, const TQString& leadIn) { MyMoneyAccount acc = MyMoneyFile::instance()->account(accountId); - QString name = acc.name(); + TQString name = acc.name(); s << "N" << leadIn << name << endl; s << (MyMoneyAccount::accountGroup(acc.accountType()) == MyMoneyAccount::Expense ? "E" : "I") << endl; s << "^" << endl; - QStringList list = acc.accountList(); - QStringList::Iterator it; + TQStringList list = acc.accountList(); + TQStringList::Iterator it; name += ":"; for(it = list.begin(); it != list.end(); ++it) { writeCategoryEntry(s, *it, name); } } -void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransaction& t, const QString& accountId) +void MyMoneyQifWriter::writeTransactionEntry(TQTextStream &s, const MyMoneyTransaction& t, const TQString& accountId) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneySplit split = t.splitByAccount(accountId); @@ -187,8 +187,8 @@ void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransa } if(split.memo().length() > 0) { - QString m = split.memo(); - m.replace('\n', "\\n"); + TQString m = split.memo(); + m.tqreplace('\n', "\\n"); s << "M" << m << endl; } @@ -202,7 +202,7 @@ void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransa s << "P" << payee.name() << endl; } - QValueList<MyMoneySplit> list = t.splits(); + TQValueList<MyMoneySplit> list = t.splits(); if(list.count() > 1) { MyMoneySplit sp = t.splitByAccount(accountId, false); MyMoneyAccount acc = file->account(sp.accountId()); @@ -215,7 +215,7 @@ void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransa s << "L" << file->accountToCategory(sp.accountId()) << endl; } if(list.count() > 2) { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = list.begin(); it != list.end(); ++it) { if(!((*it) == split)) { writeSplitEntry(s, *it); @@ -226,7 +226,7 @@ void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransa s << "^" << endl; } -void MyMoneyQifWriter::writeSplitEntry(QTextStream& s, const MyMoneySplit& split) +void MyMoneyQifWriter::writeSplitEntry(TQTextStream& s, const MyMoneySplit& split) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -243,8 +243,8 @@ void MyMoneyQifWriter::writeSplitEntry(QTextStream& s, const MyMoneySplit& split s << endl; if(split.memo().length() > 0) { - QString m = split.memo(); - m.replace('\n', "\\n"); + TQString m = split.memo(); + m.tqreplace('\n', "\\n"); s << "E" << m << endl; } diff --git a/kmymoney2/converter/mymoneyqifwriter.h b/kmymoney2/converter/mymoneyqifwriter.h index f77e612..1398161 100644 --- a/kmymoney2/converter/mymoneyqifwriter.h +++ b/kmymoney2/converter/mymoneyqifwriter.h @@ -20,14 +20,14 @@ * * ***************************************************************************/ -#ifndef MYMONEYQIFWRITER_H -#define MYMONEYQIFWRITER_H +#ifndef MYMONEYTQIFWRITER_H +#define MYMONEYTQIFWRITER_H // ---------------------------------------------------------------------------- // QT Headers -#include <qobject.h> -#include <qdatetime.h> +#include <tqobject.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -44,14 +44,15 @@ class MyMoneySplit; */ /** - * This class represents the QIF writer. All conversion between the + * This class represents the TQIF writer. All conversion between the * internal representation of accounts, transactions is handled in this * object. The conversion is controlled using a MyMoneyQifProfile to allow * the user to control the conversion. */ -class MyMoneyQifWriter : public QObject +class MyMoneyQifWriter : public TQObject { Q_OBJECT + TQ_OBJECT public: MyMoneyQifWriter(); @@ -70,10 +71,10 @@ public: * @param startDate Transations before this date will not be exported * @param endDate Transactions after this date will not be exported */ - void write(const QString& filename, const QString& profile, - const QString& accountId, const bool accountData, + void write(const TQString& filename, const TQString& profile, + const TQString& accountId, const bool accountData, const bool categoryData, - const QDate& startDate, const QDate& endDate); + const TQDate& startDate, const TQDate& endDate); private: /** @@ -87,7 +88,7 @@ private: * @param startDate date from which entries are written * @param endDate date until which entries are written */ - void writeAccountEntry(QTextStream& s, const QString& accountId, const QDate& startDate, const QDate& endDate); + void writeAccountEntry(TQTextStream& s, const TQString& accountId, const TQDate& startDate, const TQDate& endDate); /** * This method writes the category entries to the stream @@ -96,7 +97,7 @@ private: * * @param s reference to textstream */ - void writeCategoryEntries(QTextStream& s); + void writeCategoryEntries(TQTextStream& s); /** * This method writes the category entry for account with @@ -107,10 +108,10 @@ private: * @param accountId id of the account to be written * @param leadIn constant text that will be prepended to the account's name */ - void writeCategoryEntry(QTextStream& s, const QString& accountId, const QString& leadIn); + void writeCategoryEntry(TQTextStream& s, const TQString& accountId, const TQString& leadIn); - void writeTransactionEntry(QTextStream &s, const MyMoneyTransaction& t, const QString& accountId); - void writeSplitEntry(QTextStream &s, const MyMoneySplit& t); + void writeTransactionEntry(TQTextStream &s, const MyMoneyTransaction& t, const TQString& accountId); + void writeSplitEntry(TQTextStream &s, const MyMoneySplit& t); signals: /** diff --git a/kmymoney2/converter/mymoneystatementreader.cpp b/kmymoney2/converter/mymoneystatementreader.cpp index b804a59..8268d89 100644 --- a/kmymoney2/converter/mymoneystatementreader.cpp +++ b/kmymoney2/converter/mymoneystatementreader.cpp @@ -26,10 +26,10 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qfile.h> -#include <qstringlist.h> -#include <qtimer.h> -#include <qtextedit.h> +#include <tqfile.h> +#include <tqstringlist.h> +#include <tqtimer.h> +#include <tqtextedit.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -39,8 +39,8 @@ #include <kconfig.h> #include <kdebug.h> #include <kdialogbase.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqvbox.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // Project Headers @@ -68,73 +68,73 @@ class MyMoneyStatementReader::Private scannedCategories(false) {} - const QString& feeId(const MyMoneyAccount& invAcc); - const QString& interestId(const MyMoneyAccount& invAcc); - QString interestId(const QString& name); - QString feeId(const QString& name); + const TQString& feeId(const MyMoneyAccount& invAcc); + const TQString& interestId(const MyMoneyAccount& invAcc); + TQString interestId(const TQString& name); + TQString feeId(const TQString& name); void assignUniqueBankID(MyMoneySplit& s, const MyMoneyStatement::Transaction& t_in); MyMoneyAccount lastAccount; - QValueList<MyMoneyTransaction> transactions; - QValueList<MyMoneyPayee> payees; + TQValueList<MyMoneyTransaction> transactions; + TQValueList<MyMoneyPayee> payees; int transactionsCount; int transactionsAdded; int transactionsMatched; int transactionsDuplicate; - QMap<QString, bool> uniqIds; - QMap<QString, MyMoneySecurity> securitiesBySymbol; - QMap<QString, MyMoneySecurity> securitiesByName; + TQMap<TQString, bool> uniqIds; + TQMap<TQString, MyMoneySecurity> securitiesBySymbol; + TQMap<TQString, MyMoneySecurity> securitiesByName; bool m_skipCategoryMatching; private: - void scanCategories(QString& id, const MyMoneyAccount& invAcc, const MyMoneyAccount& parentAccount, const QString& defaultName); - QString nameToId(const QString&name, MyMoneyAccount& parent); + void scanCategories(TQString& id, const MyMoneyAccount& invAcc, const MyMoneyAccount& tqparentAccount, const TQString& defaultName); + TQString nameToId(const TQString&name, MyMoneyAccount& tqparent); private: - QString m_feeId; - QString m_interestId; + TQString m_feeId; + TQString m_interestId; bool scannedCategories; }; -const QString& MyMoneyStatementReader::Private::feeId(const MyMoneyAccount& invAcc) +const TQString& MyMoneyStatementReader::Private::feeId(const MyMoneyAccount& invAcc) { scanCategories(m_feeId, invAcc, MyMoneyFile::instance()->expense(), i18n("_Fees")); return m_feeId; } -const QString& MyMoneyStatementReader::Private::interestId(const MyMoneyAccount& invAcc) +const TQString& MyMoneyStatementReader::Private::interestId(const MyMoneyAccount& invAcc) { scanCategories(m_interestId, invAcc, MyMoneyFile::instance()->income(), i18n("_Dividend")); return m_interestId; } -QString MyMoneyStatementReader::Private::nameToId(const QString&name, MyMoneyAccount& parent) +TQString MyMoneyStatementReader::Private::nameToId(const TQString&name, MyMoneyAccount& tqparent) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount acc = file->accountByName(name); // if it does not exist, we have to create it if(acc.id().isEmpty()) { acc.setName( name ); - acc.setAccountType( parent.accountType() ); - acc.setCurrencyId(parent.currencyId()); - file->addAccount(acc, parent); + acc.setAccountType( tqparent.accountType() ); + acc.setCurrencyId(tqparent.currencyId()); + file->addAccount(acc, tqparent); } return acc.id(); } -QString MyMoneyStatementReader::Private::interestId(const QString& name) +TQString MyMoneyStatementReader::Private::interestId(const TQString& name) { - MyMoneyAccount parent = MyMoneyFile::instance()->income(); - return nameToId(name, parent); + MyMoneyAccount tqparent = MyMoneyFile::instance()->income(); + return nameToId(name, tqparent); } -QString MyMoneyStatementReader::Private::feeId(const QString& name) +TQString MyMoneyStatementReader::Private::feeId(const TQString& name) { - MyMoneyAccount parent = MyMoneyFile::instance()->expense(); - return nameToId(name, parent); + MyMoneyAccount tqparent = MyMoneyFile::instance()->expense(); + return nameToId(name, tqparent); } -void MyMoneyStatementReader::Private::scanCategories(QString& id, const MyMoneyAccount& invAcc, const MyMoneyAccount& parentAccount, const QString& defaultName) +void MyMoneyStatementReader::Private::scanCategories(TQString& id, const MyMoneyAccount& invAcc, const MyMoneyAccount& tqparentAccount, const TQString& defaultName) { if(!scannedCategories) { KMyMoneyUtils::previouslyUsedCategories(invAcc.id(), m_feeId, m_interestId); @@ -146,11 +146,11 @@ void MyMoneyStatementReader::Private::scanCategories(QString& id, const MyMoneyA MyMoneyAccount acc = file->accountByName(defaultName); // if it does not exist, we have to create it if(acc.id().isEmpty()) { - MyMoneyAccount parent = parentAccount; + MyMoneyAccount tqparent = tqparentAccount; acc.setName( defaultName ); - acc.setAccountType( parent.accountType() ); - acc.setCurrencyId(parent.currencyId()); - file->addAccount(acc, parent); + acc.setAccountType( tqparent.accountType() ); + acc.setCurrencyId(tqparent.currencyId()); + file->addAccount(acc, tqparent); } id = acc.id(); } @@ -161,17 +161,17 @@ void MyMoneyStatementReader::Private::assignUniqueBankID(MyMoneySplit& s, const if( ! t_in.m_strBankID.isEmpty() ) { // make sure that id's are unique from this point on by appending a -# // postfix if needed - QString base(t_in.m_strBankID); - QString hash(base); + TQString base(t_in.m_strBankID); + TQString hash(base); int idx = 1; for(;;) { - QMap<QString, bool>::const_iterator it; - it = uniqIds.find(hash); + TQMap<TQString, bool>::const_iterator it; + it = uniqIds.tqfind(hash); if(it == uniqIds.end()) { uniqIds[hash] = true; break; } - hash = QString("%1-%2").arg(base).arg(idx); + hash = TQString("%1-%2").tqarg(base).tqarg(idx); ++idx; } @@ -210,7 +210,7 @@ void MyMoneyStatementReader::setAskPayeeCategory(bool ask) m_askPayeeCategory = ask; } -bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& messages) +bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& messages) { // // For testing, save the statement to an XML file @@ -291,7 +291,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess if(!m_account.name().isEmpty()) - messages += i18n("Importing statement for account %1").arg(m_account.name()); + messages += i18n("Importing statement for account %1").tqarg(m_account.name()); else if(s.m_listTransactions.count() == 0) messages += i18n("Importing statement without transactions"); @@ -302,7 +302,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess // signalProgress(0, s.m_listSecurities.count(), "Importing Statement ..."); int progress = 0; - QValueList<MyMoneyStatement::Security>::const_iterator it_s = s.m_listSecurities.begin(); + TQValueList<MyMoneyStatement::Security>::const_iterator it_s = s.m_listSecurities.begin(); while ( it_s != s.m_listSecurities.end() ) { processSecurityEntry(*it_s); @@ -321,7 +321,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess qDebug("Processing transactions (%s)", m_account.name().data()); signalProgress(0, s.m_listTransactions.count(), "Importing Statement ..."); int progress = 0; - QValueList<MyMoneyStatement::Transaction>::const_iterator it_t = s.m_listTransactions.begin(); + TQValueList<MyMoneyStatement::Transaction>::const_iterator it_t = s.m_listTransactions.begin(); while ( it_t != s.m_listTransactions.end() ) { processTransactionEntry(*it_t); @@ -347,15 +347,15 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess { try { signalProgress(0, s.m_listPrices.count(), "Importing Statement ..."); - QValueList<MyMoneySecurity> slist = MyMoneyFile::instance()->securityList(); - QValueList<MyMoneySecurity>::const_iterator it_s; + TQValueList<MyMoneySecurity> slist = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity>::const_iterator it_s; for(it_s = slist.begin(); it_s != slist.end(); ++it_s) { d->securitiesBySymbol[(*it_s).tradingSymbol()] = *it_s; d->securitiesByName[(*it_s).name()] = *it_s; } int progress = 0; - QValueList<MyMoneyStatement::Price>::const_iterator it_p = s.m_listPrices.begin(); + TQValueList<MyMoneyStatement::Price>::const_iterator it_p = s.m_listPrices.begin(); while(it_p != s.m_listPrices.end()) { processPriceEntry(*it_p); signalProgress(++progress, 0); @@ -375,7 +375,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess // delete all payees created in vain int payeeCount = d->payees.count(); - QValueList<MyMoneyPayee>::const_iterator it_p; + TQValueList<MyMoneyPayee>::const_iterator it_p; for(it_p = d->payees.begin(); it_p != d->payees.end(); ++it_p) { try { MyMoneyFile::instance()->removePayee(*it_p); @@ -389,21 +389,21 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess if(s.m_closingBalance.isAutoCalc()) { messages += i18n(" Statement balance is not contained in statement."); } else { - messages += i18n(" Statement balance on %1 is reported to be %2").arg(s.m_dateEnd.toString(Qt::ISODate)).arg(s.m_closingBalance.formatMoney("",2)); + messages += i18n(" Statement balance on %1 is reported to be %2").tqarg(s.m_dateEnd.toString(Qt::ISODate)).tqarg(s.m_closingBalance.formatMoney("",2)); } messages += i18n(" Transactions"); - messages += i18n(" %1 processed").arg(d->transactionsCount); - messages += i18n(" %1 added").arg(d->transactionsAdded); - messages += i18n(" %1 matched").arg(d->transactionsMatched); - messages += i18n(" %1 duplicates").arg(d->transactionsDuplicate); + messages += i18n(" %1 processed").tqarg(d->transactionsCount); + messages += i18n(" %1 added").tqarg(d->transactionsAdded); + messages += i18n(" %1 matched").tqarg(d->transactionsMatched); + messages += i18n(" %1 duplicates").tqarg(d->transactionsDuplicate); messages += i18n(" Payees"); - messages += i18n(" %1 created").arg(payeeCount); - messages += QString(); + messages += i18n(" %1 created").tqarg(payeeCount); + messages += TQString(); // remove the Don't ask again entries KConfig* config = KGlobal::config(); - config->setGroup(QString::fromLatin1("Notification Messages")); - QStringList::ConstIterator it; + config->setGroup(TQString::tqfromLatin1("Notification Messages")); + TQStringList::ConstIterator it; for(it = m_dontAskAgain.begin(); it != m_dontAskAgain.end(); ++it) { config->deleteEntry(*it); @@ -426,20 +426,20 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, QStringList& mess void MyMoneyStatementReader::processPriceEntry(const MyMoneyStatement::Price& p_in) { - if(d->securitiesBySymbol.contains(p_in.m_strSecurity)) { + if(d->securitiesBySymbol.tqcontains(p_in.m_strSecurity)) { MyMoneyPrice price(d->securitiesBySymbol[p_in.m_strSecurity].id(), MyMoneyFile::instance()->baseCurrency().id(), p_in.m_date, - p_in.m_amount, "QIF"); + p_in.m_amount, "TQIF"); MyMoneyFile::instance()->addPrice(price); - } else if(d->securitiesByName.contains(p_in.m_strSecurity)) { + } else if(d->securitiesByName.tqcontains(p_in.m_strSecurity)) { MyMoneyPrice price(d->securitiesByName[p_in.m_strSecurity].id(), MyMoneyFile::instance()->baseCurrency().id(), p_in.m_date, - p_in.m_amount, "QIF"); + p_in.m_amount, "TQIF"); MyMoneyFile::instance()->addPrice(price); } @@ -456,8 +456,8 @@ void MyMoneyStatementReader::processSecurityEntry(const MyMoneyStatement::Securi // In a statement, we do not know what type of security this is, so we will // not use type as a matching factor. MyMoneySecurity security; - QValueList<MyMoneySecurity> list = file->securityList(); - QValueList<MyMoneySecurity>::ConstIterator it = list.begin(); + TQValueList<MyMoneySecurity> list = file->securityList(); + TQValueList<MyMoneySecurity>::ConstIterator it = list.begin(); while ( it != list.end() && security.id().isEmpty() ) { if(sec_in.m_strSymbol.isEmpty()) { @@ -485,7 +485,7 @@ void MyMoneyStatementReader::processSecurityEntry(const MyMoneyStatement::Securi ft.commit(); kdDebug(0) << "Created " << security.name() << " with id " << security.id() << endl; } catch(MyMoneyException *e) { - KMessageBox::error(0, i18n("Error creating security record: %1").arg(e->what()), i18n("Error")); + KMessageBox::error(0, i18n("Error creating security record: %1").tqarg(e->what()), i18n("Error")); } } else { kdDebug(0) << "Found " << security.name() << " with id " << security.id() << endl; @@ -499,8 +499,8 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra MyMoneyTransaction t; #if 0 - QString dbgMsg; - dbgMsg = QString("Process %1, '%3', %2").arg(t_in.m_datePosted.toString(Qt::ISODate)).arg(t_in.m_amount.formatMoney("", 2)).arg(t_in.m_strBankID); + TQString dbgMsg; + dbgMsg = TQString("Process %1, '%3', %2").tqarg(t_in.m_datePosted.toString(Qt::ISODate)).tqarg(t_in.m_amount.formatMoney("", 2)).tqarg(t_in.m_strBankID); qDebug("%s", dbgMsg.data()); #endif @@ -540,7 +540,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // If the user has chosen to import into an investment account, determine the correct account to use MyMoneyAccount thisaccount = m_account; - QString brokerageactid; + TQString brokerageactid; if ( thisaccount.accountType() == MyMoneyAccount::Investment ) { @@ -565,11 +565,11 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // search through each subordinate account bool found = false; - QStringList accounts = thisaccount.accountList(); - QStringList::const_iterator it_account = accounts.begin(); + TQStringList accounts = thisaccount.accountList(); + TQStringList::const_iterator it_account = accounts.begin(); while( !found && it_account != accounts.end() ) { - QString currencyid = file->account(*it_account).currencyId(); + TQString currencyid = file->account(*it_account).currencyId(); MyMoneySecurity security = file->security( currencyid ); if((t_in.m_strSymbol.lower() == security.tradingSymbol().lower()) || (t_in.m_strSecurity.lower() == security.name().lower())) @@ -584,7 +584,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra { // update the price, while we're here. in the future, this should be // an option - QString basecurrencyid = file->baseCurrency().id(); + TQString basecurrencyid = file->baseCurrency().id(); MyMoneyPrice price = file->price( currencyid, basecurrencyid, t_in.m_datePosted, true ); if ( !price.isValid() && ((!t_in.m_amount.isZero() && !t_in.m_shares.isZero()) || !t_in.m_price.isZero())) { @@ -614,14 +614,14 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra if ( t_in.m_strSecurity.isEmpty() ) { - KMessageBox::information(0, i18n("This imported statement contains investment transactions with no security. These transactions will be ignored.").arg(t_in.m_strSecurity),i18n("Security not found"),QString("BlankSecurity")); + KMessageBox::information(0, i18n("This imported statement contains investment transactions with no security. These transactions will be ignored.").tqarg(t_in.m_strSecurity),i18n("Security not found"),TQString("BlankSecurity")); return; } else { MyMoneySecurity security; - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); - QValueList<MyMoneySecurity>::ConstIterator it = list.begin(); + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity>::ConstIterator it = list.begin(); while ( it != list.end() && security.id().isEmpty() ) { if(t_in.m_strSecurity.lower() == (*it).tradingSymbol().lower() @@ -646,7 +646,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // This should be rare. A statement should have a security entry for any // of the securities referred to in the transactions. The only way to get // here is if that's NOT the case. - KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. Transactions involving this security will be ignored.").arg(t_in.m_strSecurity),i18n("Security not found"),QString("MissingSecurity%1").arg(t_in.m_strSecurity.stripWhiteSpace())); + KMessageBox::information(0, i18n("This investment account does not contain the \"%1\" security. Transactions involving this security will be ignored.").tqarg(t_in.m_strSecurity),i18n("Security not found"),TQString("MissingSecurity%1").tqarg(t_in.m_strSecurity.stripWhiteSpace())); return; } } @@ -784,7 +784,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // written. However, if a user has an associated brokerage account, // we can stuff the transaction there. - QString brokerageactid = m_account.value("kmm-brokerage-account").utf8(); + TQString brokerageactid = m_account.value("kmm-brokerage-account").utf8(); if (brokerageactid.isEmpty() ) { brokerageactid = file->accountByName(m_account.brokerageName()).id(); @@ -823,29 +823,29 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } - QString payeename = t_in.m_strPayee; + TQString payeename = t_in.m_strPayee; if(!payeename.isEmpty()) { - QString payeeid; + TQString payeeid; try { - QValueList<MyMoneyPayee> pList = file->payeeList(); - QValueList<MyMoneyPayee>::const_iterator it_p; - QMap<int, QString> matchMap; + TQValueList<MyMoneyPayee> pList = file->payeeList(); + TQValueList<MyMoneyPayee>::const_iterator it_p; + TQMap<int, TQString> matchMap; for(it_p = pList.begin(); it_p != pList.end(); ++it_p) { bool ignoreCase; - QStringList keys; - QStringList::const_iterator it_s; + TQStringList keys; + TQStringList::const_iterator it_s; switch((*it_p).matchData(ignoreCase, keys)) { case MyMoneyPayee::matchDisabled: break; case MyMoneyPayee::matchName: - keys << QString("%1").arg(QRegExp::escape((*it_p).name())); + keys << TQString("%1").tqarg(TQRegExp::escape((*it_p).name())); // tricky fall through here case MyMoneyPayee::matchKey: for(it_s = keys.begin(); it_s != keys.end(); ++it_s) { - QRegExp exp(*it_s, !ignoreCase); + TQRegExp exp(*it_s, !ignoreCase); if(exp.search(payeename) != -1) { matchMap[exp.matchedLength()] = (*it_p).id(); } @@ -863,7 +863,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // in case of a) we take the one with the largest matchedLength() // which happens to be the last one in the map if(matchMap.count() > 1) { - QMap<int, QString>::const_iterator it_m = matchMap.end(); + TQMap<int, TQString>::const_iterator it_m = matchMap.end(); --it_m; payeeid = *it_m; } else if(matchMap.count() == 1) @@ -882,16 +882,16 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra if(m_autoCreatePayee == false) { // Ask the user if that is what he intended to do? - QString msg = i18n("Do you want to add \"%1\" as payee/receiver?\n\n").arg(payeename); + TQString msg = i18n("Do you want to add \"%1\" as payee/receiver?\n\n").tqarg(payeename); msg += i18n("Selecting \"Yes\" will create the payee, \"No\" will skip " "creation of a payee record and remove the payee information " "from this transaction. Selecting \"Cancel\" aborts the import " "operation.\n\nIf you select \"No\" here and mark the \"Don't ask " "again\" checkbox, the payee information for all following transactions " - "referencing \"%1\" will be removed.").arg(payeename); + "referencing \"%1\" will be removed.").tqarg(payeename); - QString askKey = QString("Statement-Import-Payee-")+payeename; - if(!m_dontAskAgain.contains(askKey)) { + TQString askKey = TQString("Statement-Import-Payee-")+payeename; + if(!m_dontAskAgain.tqcontains(askKey)) { m_dontAskAgain += askKey; } rc = KMessageBox::questionYesNoCancel(0, msg, i18n("New payee/receiver"), @@ -909,12 +909,12 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // is called in the context of an automatic procedure it // might distract the user. payee.setName(payeename); - payee.setMatchData(MyMoneyPayee::matchName, true, QStringList()); + payee.setMatchData(MyMoneyPayee::matchName, true, TQStringList()); if (m_askPayeeCategory) { - // We use a QGuardedPtr because the dialog may get deleted - // during exec() if the parent of the dialog gets deleted. + // We use a TQGuardedPtr because the dialog may get deleted + // during exec() if the tqparent of the dialog gets deleted. // In that case the guarded ptr will reset to 0. - QGuardedPtr<KDialogBase> dialog = new KDialogBase( + TQGuardedPtr<KDialogBase> dialog = new KDialogBase( "Default Category for Payee", KDialogBase::Yes | KDialogBase::No | KDialogBase::Cancel, KDialogBase::Yes, KDialogBase::Cancel, @@ -922,20 +922,20 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra KGuiItem(i18n("Save Category")), KGuiItem(i18n("No Category")), KGuiItem(i18n("Abort"))); - QVBox *topcontents = new QVBox (dialog); + TQVBox *topcontents = new TQVBox (dialog); topcontents->setSpacing(KDialog::spacingHint()*2); topcontents->setMargin(KDialog::marginHint()); //add in caption? and account combo here - QLabel *label1 = new QLabel( topcontents); - label1->setText(i18n("Please select a default category for payee '%1':").arg(payee.name().data())); + TQLabel *label1 = new TQLabel( topcontents); + label1->setText(i18n("Please select a default category for payee '%1':").tqarg(payee.name())); - QGuardedPtr<KMyMoneyAccountCombo> accountCombo = new KMyMoneyAccountCombo(topcontents); + TQGuardedPtr<KMyMoneyAccountCombo> accountCombo = new KMyMoneyAccountCombo(topcontents); dialog->setMainWidget(topcontents); int result = dialog->exec(); - QString accountId; + TQString accountId; if (accountCombo && !accountCombo->selectedAccounts().isEmpty()) { accountId = accountCombo->selectedAccounts().front(); } @@ -961,13 +961,13 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to add payee/receiver"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } else if(rc == KMessageBox::No) { - s1.setPayeeId(QString()); + s1.setPayeeId(TQString()); } else { throw new MYMONEYEXCEPTION("USERABORT"); @@ -995,7 +995,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra MyMoneySplit s; s.setReconcileFlag(MyMoneySplit::Cleared); s.clearId(); - s.setBankID(QString()); + s.setBankID(TQString()); s.setShares(-s1.shares()); s.setValue(-s1.value()); s.setAccountId(payeeObj.defaultAccountId()); @@ -1004,7 +1004,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra else if (t_in.m_listSplits.isEmpty() && !d->m_skipCategoryMatching) { MyMoneyTransactionFilter filter(thisaccount.id()); filter.addPayee(payeeid); - QValueList<MyMoneyTransaction> list = file->transactionList(filter); + TQValueList<MyMoneyTransaction> list = file->transactionList(filter); if(!list.empty()) { // Default to using the most recent transaction as the reference @@ -1015,7 +1015,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // with the same VALUE as our imported transaction, and if so take that one. if ( list.count() > 1 ) { - QValueList<MyMoneyTransaction>::ConstIterator it_trans = list.fromLast(); + TQValueList<MyMoneyTransaction>::ConstIterator it_trans = list.fromLast(); while ( it_trans != list.end() ) { MyMoneySplit s = (*it_trans).splitByAccount(thisaccount.id()); @@ -1028,7 +1028,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } } - QValueList<MyMoneySplit>::ConstIterator it_split; + TQValueList<MyMoneySplit>::ConstIterator it_split; for(it_split = t_old.splits().begin(); it_split != t_old.splits().end(); ++it_split) { // We don't need the split that covers this account, @@ -1038,7 +1038,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra MyMoneySplit s(*it_split); s.setReconcileFlag(MyMoneySplit::NotReconciled); s.clearId(); - s.setBankID(QString()); + s.setBankID(TQString()); if ( t_old.splits().count() == 2 ) { @@ -1085,7 +1085,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // process splits //****************************************** - QValueList<MyMoneyStatement::Split>::const_iterator it_s; + TQValueList<MyMoneyStatement::Split>::const_iterator it_s; for(it_s = t_in.m_listSplits.begin(); it_s != t_in.m_listSplits.end(); ++it_s) { MyMoneySplit s2; s2.setAccountId((*it_s).m_accountId); @@ -1101,7 +1101,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } #if 0 - QString accountId; + TQString accountId; int count; int cnt = 0; count = t_in.m_listSplits.count(); @@ -1113,7 +1113,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra s2.clearId(); s2.setValue(t_in.m_listSplits[cnt].m_amount); s2.setShares(t_in.m_listSplits[cnt].m_amount); - s2.setAccountId(QString(t_in.m_listSplits[cnt].m_accountId)); + s2.setAccountId(TQString(t_in.m_listSplits[cnt].m_accountId)); #if 0 accountId = file->nameToAccount(t_in.m_listSplits[cnt].m_strCategoryName); if (accountId.isEmpty()) @@ -1164,7 +1164,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra // to enter the schedule and match it agains the new transaction. Otherwise, we // just leave the transaction as imported. MyMoneySchedule schedule(*(dynamic_cast<const MyMoneySchedule*>(o))); - if(KMessageBox::questionYesNo(0, QString("<qt>%1</qt>").arg(i18n("KMyMoney has found a scheduled transaction named <b>%1</b> which matches an imported transaction. Do you want KMyMoney to enter this schedule now so that the transaction can be matched? ").arg(schedule.name())), i18n("Schedule found")) == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(0, TQString("<qt>%1</qt>").tqarg(i18n("KMyMoney has found a scheduled transaction named <b>%1</b> which matches an imported transaction. Do you want KMyMoney to enter this schedule now so that the transaction can be matched? ").tqarg(schedule.name())), i18n("Schedule found")) == KMessageBox::Yes) { KEnterScheduleDlg dlg(0, schedule); TransactionEditor* editor = dlg.startEdit(); if(editor) { @@ -1197,7 +1197,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } editor->createTransaction(torig, dlg.transaction(), dlg.transaction().splits()[0], true); - QString newId; + TQString newId; if(editor->enterTransactions(newId, false, true)) { if(!newId.isEmpty()) { torig = MyMoneyFile::instance()->transaction(newId); @@ -1221,7 +1221,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra } delete o; } catch (MyMoneyException *e) { - QString message(i18n("Problem adding or matching imported transaction with id '%1': %2").arg(t_in.m_strBankID).arg(e->what())); + TQString message(i18n("Problem adding or matching imported transaction with id '%1': %2").tqarg(t_in.m_strBankID).tqarg(e->what())); qDebug("%s", message.data()); delete e; @@ -1237,22 +1237,22 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode MyMoneyFile* file = MyMoneyFile::instance(); - QString accountId; + TQString accountId; // Try to find an existing account in the engine which matches this one. // There are two ways to be a "matching account". The account number can // match the statement account OR the "StatementKey" property can match. // Either way, we'll update the "StatementKey" property for next time. - QString accountNumber = account.number(); + TQString accountNumber = account.number(); if ( ! accountNumber.isEmpty() ) { // Get a list of all accounts - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); // Iterate through them - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { if ( @@ -1270,13 +1270,13 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode } } - QString msg = i18n("<b>You have downloaded a statement for the following account:</b><br><br>"); - msg += i18n(" - Account Name: %1").arg(account.name()) + "<br>"; - msg += i18n(" - Account Type: %1").arg(KMyMoneyUtils::accountTypeToString(account.accountType())) + "<br>"; - msg += i18n(" - Account Number: %1").arg(account.number()) + "<br>"; + TQString msg = i18n("<b>You have downloaded a statement for the following account:</b><br><br>"); + msg += i18n(" - Account Name: %1").tqarg(account.name()) + "<br>"; + msg += i18n(" - Account Type: %1").tqarg(KMyMoneyUtils::accountTypeToString(account.accountType())) + "<br>"; + msg += i18n(" - Account Number: %1").tqarg(account.number()) + "<br>"; msg += "<br>"; - QString header; + TQString header; if(!account.name().isEmpty()) { @@ -1302,11 +1302,11 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode accountSelect.setMode(false); accountSelect.showAbortButton(true); accountSelect.m_qifEntry->hide(); - QString accname; + TQString accname; bool done = false; while ( !done ) { - if ( accountSelect.exec() == QDialog::Accepted && !accountSelect.selectedAccount().isEmpty() ) + if ( accountSelect.exec() == TQDialog::Accepted && !accountSelect.selectedAccount().isEmpty() ) { result = true; done = true; @@ -1332,18 +1332,18 @@ bool MyMoneyStatementReader::selectOrCreateAccount(const SelectCreateMode /*mode //throw new MYMONEYEXCEPTION("USERABORT"); done = true; else - KMessageBox::error(0, QString("<qt>%1</qt>").arg(i18n("You must select an account, create a new one, or press the <b>Abort</b> button."))); + KMessageBox::error(0, TQString("<qt>%1</qt>").tqarg(i18n("You must select an account, create a new one, or press the <b>Abort</b> button."))); } } return result; } -void MyMoneyStatementReader::setProgressCallback(void(*callback)(int, int, const QString&)) +void MyMoneyStatementReader::setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; } -void MyMoneyStatementReader::signalProgress(int current, int total, const QString& msg) +void MyMoneyStatementReader::signalProgress(int current, int total, const TQString& msg) { if(m_progressCallback != 0) (*m_progressCallback)(current, total, msg); diff --git a/kmymoney2/converter/mymoneystatementreader.h b/kmymoney2/converter/mymoneystatementreader.h index 46d74d7..6ea2ef9 100644 --- a/kmymoney2/converter/mymoneystatementreader.h +++ b/kmymoney2/converter/mymoneystatementreader.h @@ -27,9 +27,9 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qobject.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -45,16 +45,17 @@ #include "../mymoney/mymoneystatement.h" class MyMoneyFileTransaction; -class QStringList; +class TQStringList; /** * This is a pared-down version of a MyMoneyQifReader object * * @author Ace Jones */ -class MyMoneyStatementReader : public QObject +class MyMoneyStatementReader : public TQObject { Q_OBJECT + TQ_OBJECT public: MyMoneyStatementReader(); @@ -68,7 +69,7 @@ public: * @retval true the import was processed successfully * @retval false the import resulted in a failure. */ - bool import(const MyMoneyStatement& s, QStringList& messages); + bool import(const MyMoneyStatement& s, TQStringList& messages); /** * This method is used to modify the auto payee creation flag. @@ -87,7 +88,7 @@ public: const MyMoneyAccount& account() const { return m_account; }; - void setProgressCallback(void(*callback)(int, int, const QString&)); + void setProgressCallback(void(*callback)(int, int, const TQString&)); /** * Returns true in case any transaction has been added to the engine @@ -103,7 +104,7 @@ private: * * For a parameter description see KMyMoneyView::progressCallback(). */ - void signalProgress(int current, int total, const QString& = ""); + void signalProgress(int current, int total, const TQString& = ""); void processTransactionEntry(const MyMoneyStatement::Transaction& t_in); void processSecurityEntry(const MyMoneyStatement::Security& s_in); @@ -138,14 +139,14 @@ private: /// \internal d-pointer instance. Private* const d; MyMoneyAccount m_account; - QStringList m_dontAskAgain; + TQStringList m_dontAskAgain; bool m_skipAccount; bool m_userAbort; bool m_autoCreatePayee; bool m_askPayeeCategory; MyMoneyFileTransaction* m_ft; - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); }; #endif diff --git a/kmymoney2/converter/mymoneytemplate.cpp b/kmymoney2/converter/mymoneytemplate.cpp index 63305c6..1a8860b 100644 --- a/kmymoney2/converter/mymoneytemplate.cpp +++ b/kmymoney2/converter/mymoneytemplate.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qfileinfo.h> -#include <qapplication.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,7 +54,7 @@ MyMoneyTemplate::~MyMoneyTemplate() bool MyMoneyTemplate::loadTemplate(const KURL& url) { - QString filename; + TQString filename; if(!url.isValid()) { qDebug("Invalid template URL '%s'", url.url().latin1()); @@ -67,10 +67,10 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url) } else { bool rc; - rc = KIO::NetAccess::download(url, filename, qApp->mainWidget()); + rc = KIO::NetAccess::download(url, filename, tqApp->mainWidget()); if(!rc) { - KMessageBox::detailedError(qApp->mainWidget(), - i18n("Error while loading file '%1'!").arg(url.url()), + KMessageBox::detailedError(tqApp->mainWidget(), + i18n("Error while loading file '%1'!").tqarg(url.url()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -78,27 +78,27 @@ bool MyMoneyTemplate::loadTemplate(const KURL& url) } bool rc = true; - QFile file(filename); - QFileInfo info(file); + TQFile file(filename); + TQFileInfo info(file); if(!info.isFile()) { - QString msg=i18n("<b>%1</b> is not a template file.").arg(filename); - KMessageBox::error(qApp->mainWidget(), QString("<p>")+msg, i18n("Filetype Error")); + TQString msg=i18n("<b>%1</b> is not a template file.").tqarg(filename); + KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+msg, i18n("Filetype Error")); return false; } if(file.open(IO_ReadOnly)) { - QString errMsg; + TQString errMsg; int errLine, errColumn; if(!m_doc.setContent(&file, &errMsg, &errLine, &errColumn)) { - QString msg=i18n("Error while reading template file <b>%1</b> in line %2, column %3").arg(filename).arg(errLine).arg(errColumn); - KMessageBox::detailedError(qApp->mainWidget(), QString("<p>")+msg, errMsg, i18n("Template Error")); + TQString msg=i18n("Error while reading template file <b>%1</b> in line %2, column %3").tqarg(filename).tqarg(errLine).tqarg(errColumn); + KMessageBox::detailedError(tqApp->mainWidget(), TQString("<p>")+msg, errMsg, i18n("Template Error")); rc = false; } else { rc = loadDescription(); } file.close(); } else { - KMessageBox::sorry(qApp->mainWidget(), i18n("File '%1' not found!").arg(filename)); + KMessageBox::sorry(tqApp->mainWidget(), i18n("File '%1' not found!").tqarg(filename)); rc = false; } @@ -119,12 +119,12 @@ bool MyMoneyTemplate::loadDescription(void) const int invalid = 0x10; const int validHeader = 0x0F; - QDomElement rootElement = m_doc.documentElement(); + TQDomElement rootElement = m_doc.documentElement(); if(!rootElement.isNull() && rootElement.tagName() == "kmymoney-account-template") { - QDomNode child = rootElement.firstChild(); + TQDomNode child = rootElement.firstChild(); while(!child.isNull() && child.isElement()) { - QDomElement childElement = child.toElement(); + TQDomElement childElement = child.toElement(); // qDebug("MyMoneyTemplate::import: Processing child node %s", childElement.tagName().data()); if(childElement.tagName() == "accounts") { m_accounts = childElement.firstChild(); @@ -139,7 +139,7 @@ bool MyMoneyTemplate::loadDescription(void) m_longDesc = childElement.text(); validMask |= validLong; } else { - KMessageBox::error(qApp->mainWidget(), QString("<p>")+i18n("Invalid tag <b>%1</b> in template file <b>%2</b>!").arg(childElement.tagName()).arg(m_source.prettyURL())); + KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid tag <b>%1</b> in template file <b>%2</b>!").tqarg(childElement.tagName()).tqarg(m_source.prettyURL())); validMask |= invalid; } child = child.nextSibling(); @@ -148,14 +148,14 @@ bool MyMoneyTemplate::loadDescription(void) return validMask == validHeader; } -bool MyMoneyTemplate::hierarchy(QMap<QString, QListViewItem*>& list, const QString& parent, QDomNode account) +bool MyMoneyTemplate::hierarchy(TQMap<TQString, TQListViewItem*>& list, const TQString& tqparent, TQDomNode account) { bool rc = true; while(rc == true && !account.isNull()) { if(account.isElement()) { - QDomElement accountElement = account.toElement(); + TQDomElement accountElement = account.toElement(); if(accountElement.tagName() == "account") { - QString name = QString("%1:%2").arg(parent).arg(accountElement.attribute("name")); + TQString name = TQString("%1:%2").tqarg(tqparent).tqarg(accountElement.attribute("name")); list[name] = 0; hierarchy(list, name, account.firstChild()); } @@ -165,12 +165,12 @@ bool MyMoneyTemplate::hierarchy(QMap<QString, QListViewItem*>& list, const QStri return rc; } -void MyMoneyTemplate::hierarchy(QMap<QString, QListViewItem*>& list) +void MyMoneyTemplate::hierarchy(TQMap<TQString, TQListViewItem*>& list) { bool rc = !m_accounts.isNull(); - QDomNode accounts = m_accounts; + TQDomNode accounts = m_accounts; while(rc == true && !accounts.isNull() && accounts.isElement()) { - QDomElement childElement = accounts.toElement(); + TQDomElement childElement = accounts.toElement(); if(childElement.tagName() == "account" && childElement.attribute("name") == "") { switch(childElement.attribute("type").toUInt()) { @@ -206,44 +206,44 @@ void MyMoneyTemplate::hierarchy(QMap<QString, QListViewItem*>& list) } } -bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const QString&)) +bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; bool rc = !m_accounts.isNull(); MyMoneyFile* file = MyMoneyFile::instance(); - signalProgress(0, m_doc.elementsByTagName("account").count(), i18n("Loading template %1").arg(m_source.url())); + signalProgress(0, m_doc.elementsByTagName("account").count(), i18n("Loading template %1").tqarg(m_source.url())); m_accountsRead = 0; while(rc == true && !m_accounts.isNull() && m_accounts.isElement()) { - QDomElement childElement = m_accounts.toElement(); + TQDomElement childElement = m_accounts.toElement(); if(childElement.tagName() == "account" && childElement.attribute("name") == "") { ++m_accountsRead; - MyMoneyAccount parent; + MyMoneyAccount tqparent; switch(childElement.attribute("type").toUInt()) { case MyMoneyAccount::Asset: - parent = file->asset(); + tqparent = file->asset(); break; case MyMoneyAccount::Liability: - parent = file->liability(); + tqparent = file->liability(); break; case MyMoneyAccount::Income: - parent = file->income(); + tqparent = file->income(); break; case MyMoneyAccount::Expense: - parent = file->expense(); + tqparent = file->expense(); break; case MyMoneyAccount::Equity: - parent = file->equity(); + tqparent = file->equity(); break; default: - KMessageBox::error(qApp->mainWidget(), QString("<p>")+i18n("Invalid top-level account type <b>%1</b> in template file <b>%2</b>!").arg(childElement.attribute("type")).arg(m_source.prettyURL())); + KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid top-level account type <b>%1</b> in template file <b>%2</b>!").tqarg(childElement.attribute("type")).tqarg(m_source.prettyURL())); rc = false; } if(rc == true) { - rc = createAccounts(parent, childElement.firstChild()); + rc = createAccounts(tqparent, childElement.firstChild()); } } else { rc = false; @@ -254,20 +254,20 @@ bool MyMoneyTemplate::importTemplate(void(*callback)(int, int, const QString&)) return rc; } -bool MyMoneyTemplate::createAccounts(MyMoneyAccount& parent, QDomNode account) +bool MyMoneyTemplate::createAccounts(MyMoneyAccount& tqparent, TQDomNode account) { bool rc = true; while(rc == true && !account.isNull()) { MyMoneyAccount acc; if(account.isElement()) { - QDomElement accountElement = account.toElement(); + TQDomElement accountElement = account.toElement(); if(accountElement.tagName() == "account") { signalProgress(++m_accountsRead, 0); - QValueList<MyMoneyAccount> subAccountList; - QValueList<MyMoneyAccount>::ConstIterator it; + TQValueList<MyMoneyAccount> subAccountList; + TQValueList<MyMoneyAccount>::ConstIterator it; it = subAccountList.end(); - if(!parent.accountList().isEmpty()) { - MyMoneyFile::instance()->accountList(subAccountList, parent.accountList()); + if(!tqparent.accountList().isEmpty()) { + MyMoneyFile::instance()->accountList(subAccountList, tqparent.accountList()); for(it = subAccountList.begin(); it != subAccountList.end(); ++it) { if((*it).name() == accountElement.attribute("name")) { acc = *it; @@ -281,7 +281,7 @@ bool MyMoneyTemplate::createAccounts(MyMoneyAccount& parent, QDomNode account) acc.setAccountType(static_cast<MyMoneyAccount::_accountTypeE>(accountElement.attribute("type").toUInt())); setFlags(acc, account.firstChild()); try { - MyMoneyFile::instance()->addAccount(acc, parent); + MyMoneyFile::instance()->addAccount(acc, tqparent); } catch(MyMoneyException *e) { delete e; } @@ -294,19 +294,19 @@ bool MyMoneyTemplate::createAccounts(MyMoneyAccount& parent, QDomNode account) return rc; } -bool MyMoneyTemplate::setFlags(MyMoneyAccount& acc, QDomNode flags) +bool MyMoneyTemplate::setFlags(MyMoneyAccount& acc, TQDomNode flags) { bool rc = true; while(rc == true && !flags.isNull()) { if(flags.isElement()) { - QDomElement flagElement = flags.toElement(); + TQDomElement flagElement = flags.toElement(); if(flagElement.tagName() == "flag") { // make sure, we only store flags we know! - QString value = flagElement.attribute("name"); + TQString value = flagElement.attribute("name"); if(value == "Tax") { acc.setValue(value.latin1(), "Yes"); } else { - KMessageBox::error(qApp->mainWidget(), QString("<p>")+i18n("Invalid flag type <b>%1</b> for account <b>%3</b> in template file <b>%2</b>!").arg(flagElement.attribute("name")).arg(m_source.prettyURL()).arg(acc.name())); + KMessageBox::error(tqApp->mainWidget(), TQString("<p>")+i18n("Invalid flag type <b>%1</b> for account <b>%3</b> in template file <b>%2</b>!").tqarg(flagElement.attribute("name")).tqarg(m_source.prettyURL()).tqarg(acc.name())); rc = false; } } @@ -316,34 +316,34 @@ bool MyMoneyTemplate::setFlags(MyMoneyAccount& acc, QDomNode flags) return rc; } -void MyMoneyTemplate::signalProgress(int current, int total, const QString& msg) +void MyMoneyTemplate::signalProgress(int current, int total, const TQString& msg) { if(m_progressCallback != 0) (*m_progressCallback)(current, total, msg); } -bool MyMoneyTemplate::exportTemplate(void(*callback)(int, int, const QString&)) +bool MyMoneyTemplate::exportTemplate(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; - m_doc = QDomDocument("KMYMONEY-TEMPLATE"); + m_doc = TQDomDocument("KMYMONEY-TEMPLATE"); - QDomProcessingInstruction instruct = m_doc.createProcessingInstruction(QString("xml"), QString("version=\"1.0\" encoding=\"utf-8\"")); + TQDomProcessingInstruction instruct = m_doc.createProcessingInstruction(TQString("xml"), TQString("version=\"1.0\" encoding=\"utf-8\"")); m_doc.appendChild(instruct); - QDomElement mainElement = m_doc.createElement("kmymoney-account-template"); + TQDomElement mainElement = m_doc.createElement("kmymoney-account-template"); m_doc.appendChild(mainElement); - QDomElement title = m_doc.createElement("title"); + TQDomElement title = m_doc.createElement("title"); mainElement.appendChild(title); - QDomElement shortDesc = m_doc.createElement("shortdesc"); + TQDomElement shortDesc = m_doc.createElement("shortdesc"); mainElement.appendChild(shortDesc); - QDomElement longDesc = m_doc.createElement("longdesc"); + TQDomElement longDesc = m_doc.createElement("longdesc"); mainElement.appendChild(longDesc); - QDomElement accounts = m_doc.createElement("accounts"); + TQDomElement accounts = m_doc.createElement("accounts"); mainElement.appendChild(accounts); // addAccountStructure(accounts, MyMoneyFile::instance()->asset()); @@ -355,24 +355,24 @@ bool MyMoneyTemplate::exportTemplate(void(*callback)(int, int, const QString&)) return true; } -bool MyMoneyTemplate::addAccountStructure(QDomElement& parent, const MyMoneyAccount& acc) +bool MyMoneyTemplate::addAccountStructure(TQDomElement& tqparent, const MyMoneyAccount& acc) { - QDomElement account = m_doc.createElement("account"); - parent.appendChild(account); + TQDomElement account = m_doc.createElement("account"); + tqparent.appendChild(account); if(MyMoneyFile::instance()->isStandardAccount(acc.id())) - account.setAttribute(QString("name"), QString()); + account.setAttribute(TQString("name"), TQString()); else - account.setAttribute(QString("name"), acc.name()); - account.setAttribute(QString("type"), acc.accountType()); + account.setAttribute(TQString("name"), acc.name()); + account.setAttribute(TQString("type"), acc.accountType()); // FIXME: add tax flag stuff // any child accounts? if(acc.accountList().count() > 0) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list, acc.accountList(), false); - QValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount>::Iterator it; for(it = list.begin(); it != list.end(); ++it) { addAccountStructure(account, *it); } @@ -382,7 +382,7 @@ bool MyMoneyTemplate::addAccountStructure(QDomElement& parent, const MyMoneyAcco bool MyMoneyTemplate::saveTemplate(const KURL& url) { - QString filename; + TQString filename; if(!url.isValid()) { qDebug("Invalid template URL '%s'", url.url().latin1()); @@ -395,25 +395,25 @@ bool MyMoneyTemplate::saveTemplate(const KURL& url) if(qfile.status() == 0) { saveToLocalFile(qfile.file()); if(!qfile.close()) { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } else { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } else { KTempFile tmpfile; saveToLocalFile(tmpfile.file()); if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL)) - throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url())); tmpfile.unlink(); } return true; } -bool MyMoneyTemplate::saveToLocalFile(QFile* qfile) +bool MyMoneyTemplate::saveToLocalFile(TQFile* qfile) { - QTextStream stream(qfile); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(qfile); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << m_doc.toString(); return true; diff --git a/kmymoney2/converter/mymoneytemplate.h b/kmymoney2/converter/mymoneytemplate.h index 5c96b1f..352fd4e 100644 --- a/kmymoney2/converter/mymoneytemplate.h +++ b/kmymoney2/converter/mymoneytemplate.h @@ -21,9 +21,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdom.h> -class QFile; -class QListViewItem; +#include <tqdom.h> +class TQFile; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -55,22 +55,22 @@ public: bool loadTemplate(const KURL& url); bool saveTemplate(const KURL& url); - bool importTemplate(void(*callback)(int, int, const QString&)); - bool exportTemplate(void(*callback)(int, int, const QString&)); + bool importTemplate(void(*callback)(int, int, const TQString&)); + bool exportTemplate(void(*callback)(int, int, const TQString&)); - const QString& title(void) const { return m_title; } - const QString& shortDescription(void) const { return m_shortDesc; } - const QString& longDescription(void) const { return m_longDesc; } + const TQString& title(void) const { return m_title; } + const TQString& shortDescription(void) const { return m_shortDesc; } + const TQString& longDescription(void) const { return m_longDesc; } - void hierarchy(QMap<QString, QListViewItem*>& list); + void hierarchy(TQMap<TQString, TQListViewItem*>& list); protected: bool loadDescription(void); - bool createAccounts(MyMoneyAccount& parent, QDomNode account); - bool setFlags(MyMoneyAccount& acc, QDomNode flags); - bool saveToLocalFile(QFile* qfile); - bool addAccountStructure(QDomElement& parent, const MyMoneyAccount& acc); - bool hierarchy(QMap<QString, QListViewItem*>& list, const QString& parent, QDomNode account); + bool createAccounts(MyMoneyAccount& tqparent, TQDomNode account); + bool setFlags(MyMoneyAccount& acc, TQDomNode flags); + bool saveToLocalFile(TQFile* qfile); + bool addAccountStructure(TQDomElement& tqparent, const MyMoneyAccount& acc); + bool hierarchy(TQMap<TQString, TQListViewItem*>& list, const TQString& tqparent, TQDomNode account); /** * This method is used to update the progress information. It @@ -78,16 +78,16 @@ protected: * * For a parameter description see KMyMoneyView::progressCallback(). */ - void signalProgress(int current, int total, const QString& = ""); + void signalProgress(int current, int total, const TQString& = ""); private: - QDomDocument m_doc; - QDomNode m_accounts; - QString m_title; - QString m_shortDesc; - QString m_longDesc; + TQDomDocument m_doc; + TQDomNode m_accounts; + TQString m_title; + TQString m_shortDesc; + TQString m_longDesc; KURL m_source; - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); int m_accountsRead; }; diff --git a/kmymoney2/converter/webpricequote.cpp b/kmymoney2/converter/webpricequote.cpp index de30963..325560b 100644 --- a/kmymoney2/converter/webpricequote.cpp +++ b/kmymoney2/converter/webpricequote.cpp @@ -18,10 +18,10 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qfile.h> -#include <qregexp.h> -#include <qtextstream.h> -#include <qprocess.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqtextstream.h> +#include <tqprocess.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -46,51 +46,51 @@ #include "webpricequote.h" // define static members -QString WebPriceQuote::m_financeQuoteScriptPath; -QStringList WebPriceQuote::m_financeQuoteSources; +TQString WebPriceQuote::m_financeQuoteScriptPath; +TQStringList WebPriceQuote::m_financeQuoteSources; -QString * WebPriceQuote::lastErrorMsg; +TQString * WebPriceQuote::lastErrorMsg; int WebPriceQuote::lastErrorCode = 0; -WebPriceQuote::WebPriceQuote( QObject* _parent, const char* _name ): - QObject( _parent, _name ) +WebPriceQuote::WebPriceQuote( TQObject* _parent, const char* _name ): + TQObject( _parent, _name ) { m_financeQuoteScriptPath = - KGlobal::dirs()->findResource("appdata", QString("misc/financequote.pl")); - connect(&m_filter,SIGNAL(processExited(const QString&)),this,SLOT(slotParseQuote(const QString&))); + KGlobal::dirs()->findResource("appdata", TQString("misc/financequote.pl")); + connect(&m_filter,TQT_SIGNAL(processExited(const TQString&)),this,TQT_SLOT(slotParseQuote(const TQString&))); } WebPriceQuote::~WebPriceQuote() { } -bool WebPriceQuote::launch( const QString& _symbol, const QString& _id, const QString& _sourcename ) +bool WebPriceQuote::launch( const TQString& _symbol, const TQString& _id, const TQString& _sourcename ) { - if (_sourcename.contains("Finance::Quote")) + if (_sourcename.tqcontains("Finance::Quote")) return (launchFinanceQuote (_symbol, _id, _sourcename)); else return (launchNative (_symbol, _id, _sourcename)); } -bool WebPriceQuote::launchNative( const QString& _symbol, const QString& _id, const QString& _sourcename ) { +bool WebPriceQuote::launchNative( const TQString& _symbol, const TQString& _id, const TQString& _sourcename ) { bool result = true; m_symbol = _symbol; m_id = _id; -// emit status(QString("(Debug) symbol=%1 id=%2...").arg(_symbol,_id)); +// emit status(TQString("(Debug) symbol=%1 id=%2...").tqarg(_symbol,_id)); // if we're running normally, with a UI, we can just get these the normal way, // from the config file if ( kapp ) { - QString sourcename = _sourcename; + TQString sourcename = _sourcename; if ( sourcename.isEmpty() ) sourcename = "Yahoo"; - if ( quoteSources().contains(sourcename) ) + if ( quoteSources().tqcontains(sourcename) ) m_source = WebPriceQuoteSource(sourcename); else - emit error(QString("Source <%1> does not exist.").arg(sourcename)); + emit error(TQString("Source <%1> does not exist.").tqarg(sourcename)); } // otherwise, if we have no kapp, we have no config. so we just get them from // the defaults @@ -105,21 +105,21 @@ bool WebPriceQuote::launchNative( const QString& _symbol, const QString& _id, co KURL url; // if the source has room for TWO symbols.. - if ( m_source.m_url.contains("%2") ) + if ( m_source.m_url.tqcontains("%2") ) { // this is a two-symbol quote. split the symbol into two. valid symbol // characters are: 0-9, A-Z and the dot. anything else is a separator - QRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); + TQRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); // if we've truly found 2 symbols delimited this way... if ( splitrx.search(m_symbol) != -1 ) - url = KURL::fromPathOrURL(m_source.m_url.arg(splitrx.cap(1),splitrx.cap(2))); + url = KURL::fromPathOrURL(m_source.m_url.tqarg(splitrx.cap(1),splitrx.cap(2))); else - kdDebug(2) << "WebPriceQuote::launch() did not find 2 symbols" << endl; + kdDebug(2) << "WebPriceQuote::launch() did not tqfind 2 symbols" << endl; } else // a regular one-symbol quote - url = KURL::fromPathOrURL(m_source.m_url.arg(m_symbol)); + url = KURL::fromPathOrURL(m_source.m_url.tqarg(m_symbol)); // If we're running a non-interactive session (with no UI), we can't // use KIO::NetAccess, so we have to get our web data the old-fashioned @@ -133,10 +133,10 @@ bool WebPriceQuote::launchNative( const QString& _symbol, const QString& _id, co if ( url.isLocalFile() ) { - emit status(QString("Executing %1...").arg(url.path())); + emit status(TQString("Executing %1...").tqarg(url.path())); m_filter.clearArguments(); - m_filter << QStringList::split(" ",url.path()); + m_filter << TQStringList::split(" ",url.path()); m_filter.setSymbol(m_symbol); // if we're running non-interactive, we'll need to block. @@ -152,52 +152,52 @@ bool WebPriceQuote::launchNative( const QString& _symbol, const QString& _id, co } else { - emit error(QString("Unable to launch: %1").arg(url.path())); - slotParseQuote(QString()); + emit error(TQString("Unable to launch: %1").tqarg(url.path())); + slotParseQuote(TQString()); } } else { - emit status(QString("Fetching URL %1...").arg(url.prettyURL())); + emit status(TQString("Fetching URL %1...").tqarg(url.prettyURL())); - QString tmpFile; + TQString tmpFile; if( download( url, tmpFile, NULL ) ) { kdDebug(2) << "Downloaded " << tmpFile << endl; - QFile f(tmpFile); + TQFile f(tmpFile); if ( f.open( IO_ReadOnly ) ) { result = true; - QString quote = QTextStream(&f).read(); + TQString quote = TQTextStream(&f).read(); f.close(); slotParseQuote(quote); } else { - slotParseQuote(QString()); + slotParseQuote(TQString()); } removeTempFile( tmpFile ); } else { emit error(KIO::NetAccess::lastErrorString()); - slotParseQuote(QString()); + slotParseQuote(TQString()); } } return result; } -void WebPriceQuote::removeTempFile(const QString& tmpFile) +void WebPriceQuote::removeTempFile(const TQString& tmpFile) { if(tmpFile == m_tmpFile) { unlink(tmpFile); - m_tmpFile = QString(); + m_tmpFile = TQString(); } } -bool WebPriceQuote::download(const KURL& u, QString & target, QWidget* window) +bool WebPriceQuote::download(const KURL& u, TQString & target, TQWidget* window) { - m_tmpFile = QString(); + m_tmpFile = TQString(); // the following code taken and adapted from KIO::NetAccess::download() if (target.isEmpty()) @@ -218,8 +218,8 @@ bool WebPriceQuote::download(const KURL& u, QString & target, QWidget* window) KIO::Job * job = KIO::file_copy( u, dest, -1, true, false, false ); job->setWindow (window); job->addMetaData("cache", "reload"); // bypass cache - connect( job, SIGNAL( result (KIO::Job *) ), - this, SLOT( slotResult (KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result (KIO::Job *) ), + this, TQT_SLOT( slotResult (KIO::Job *) ) ); enter_loop(); return bJobOK; @@ -229,15 +229,15 @@ bool WebPriceQuote::download(const KURL& u, QString & target, QWidget* window) // The following parts are copied and adjusted from KIO::NetAccess // If a troll sees this, he kills me -void qt_enter_modal( QWidget *widget ); -void qt_leave_modal( QWidget *widget ); +void qt_enter_modal( TQWidget *widget ); +void qt_leave_modal( TQWidget *widget ); void WebPriceQuote::enter_loop(void) { - QWidget dummy(0,0,WType_Dialog | WShowModal); - dummy.setFocusPolicy( QWidget::NoFocus ); + TQWidget dummy(0,0,WType_Dialog | WShowModal); + dummy.setFocusPolicy( TQ_NoFocus ); qt_enter_modal(&dummy); - qApp->enter_loop(); + tqApp->enter_loop(); qt_leave_modal(&dummy); } @@ -248,34 +248,34 @@ void WebPriceQuote::slotResult( KIO::Job * job ) if ( !bJobOK ) { if ( !lastErrorMsg ) - lastErrorMsg = new QString; + lastErrorMsg = new TQString; *lastErrorMsg = job->errorString(); } - qApp->exit_loop(); + tqApp->exit_loop(); } // The above parts are copied and adjusted from KIO::NetAccess -bool WebPriceQuote::launchFinanceQuote ( const QString& _symbol, const QString& _id, - const QString& _sourcename ) { +bool WebPriceQuote::launchFinanceQuote ( const TQString& _symbol, const TQString& _id, + const TQString& _sourcename ) { bool result = true; m_symbol = _symbol; m_id = _id; - QString FQSource = _sourcename.section (" ", 1); + TQString FTQSource = _sourcename.section (" ", 1); m_source = WebPriceQuoteSource (_sourcename, m_financeQuoteScriptPath, "\"([^,\"]*)\",.*", // symbol regexp "[^,]*,[^,]*,\"([^\"]*)\"", // price regexp "[^,]*,([^,]*),.*", // date regexp "%y-%m-%d"); // date format - //emit status(QString("(Debug) symbol=%1 id=%2...").arg(_symbol,_id)); + //emit status(TQString("(Debug) symbol=%1 id=%2...").tqarg(_symbol,_id)); m_filter.clearArguments(); - m_filter << "perl" << m_financeQuoteScriptPath << FQSource << KProcess::quote(_symbol); + m_filter << "perl" << m_financeQuoteScriptPath << FTQSource << KProcess::quote(_symbol); m_filter.setUseShell(true); m_filter.setSymbol(m_symbol); - emit status(QString("Executing %1 %2 %3...").arg(m_financeQuoteScriptPath).arg(FQSource).arg(_symbol)); + emit status(TQString("Executing %1 %2 %3...").tqarg(m_financeQuoteScriptPath).tqarg(FTQSource).tqarg(_symbol)); // if we're running non-interactive, we'll need to block. // otherwise, just let us know when it's done. @@ -290,16 +290,16 @@ bool WebPriceQuote::launchFinanceQuote ( const QString& _symbol, const QString& } else { - emit error(QString("Unable to launch: %1").arg(m_financeQuoteScriptPath)); - slotParseQuote(QString()); + emit error(TQString("Unable to launch: %1").tqarg(m_financeQuoteScriptPath)); + slotParseQuote(TQString()); } return result; } -void WebPriceQuote::slotParseQuote(const QString& _quotedata) +void WebPriceQuote::slotParseQuote(const TQString& _quotedata) { - QString quotedata = _quotedata; + TQString quotedata = _quotedata; bool gotprice = false; bool gotdate = false; @@ -313,10 +313,10 @@ void WebPriceQuote::slotParseQuote(const QString& _quotedata) // // HTML tags - quotedata.remove(QRegExp("<[^>]*>")); + quotedata.remove(TQRegExp("<[^>]*>")); // &...;'s - quotedata.replace(QRegExp("&\\w+;")," "); + quotedata.tqreplace(TQRegExp("&\\w+;")," "); // Extra white space quotedata = quotedata.simplifyWhiteSpace(); @@ -324,20 +324,20 @@ void WebPriceQuote::slotParseQuote(const QString& _quotedata) #if KMM_DEBUG // Enable to get a look at the data coming back from the source after it's stripped - QFile file("stripped.txt"); + TQFile file("stripped.txt"); if ( file.open( IO_WriteOnly ) ) { - QTextStream( &file ) << quotedata; + TQTextStream( &file ) << quotedata; file.close(); } #endif - QRegExp symbolRegExp(m_source.m_sym); - QRegExp dateRegExp(m_source.m_date); - QRegExp priceRegExp(m_source.m_price); + TQRegExp symbolRegExp(m_source.m_sym); + TQRegExp dateRegExp(m_source.m_date); + TQRegExp priceRegExp(m_source.m_price); if( symbolRegExp.search(quotedata) > -1) - emit status(i18n("Symbol found: %1").arg(symbolRegExp.cap(1))); + emit status(i18n("Symbol found: %1").tqarg(symbolRegExp.cap(1))); if(priceRegExp.search(quotedata)> -1) { @@ -350,39 +350,39 @@ void WebPriceQuote::slotParseQuote(const QString& _quotedata) // // Remove all non-digits from the price string except the last one, and // set the last one to a period. - QString pricestr = priceRegExp.cap(1); + TQString pricestr = priceRegExp.cap(1); - int pos = pricestr.findRev(QRegExp("\\D")); + int pos = pricestr.tqfindRev(TQRegExp("\\D")); if ( pos > 0 ) { pricestr[pos] = '.'; - pos = pricestr.findRev(QRegExp("\\D"),pos-1); + pos = pricestr.tqfindRev(TQRegExp("\\D"),pos-1); } while ( pos > 0 ) { pricestr.remove(pos,1); - pos = pricestr.findRev(QRegExp("\\D"),pos); + pos = pricestr.tqfindRev(TQRegExp("\\D"),pos); } m_price = pricestr.toDouble(); - emit status(i18n("Price found: %1 (%2)").arg(pricestr).arg(m_price)); + emit status(i18n("Price found: %1 (%2)").tqarg(pricestr).tqarg(m_price)); } if(dateRegExp.search(quotedata) > -1) { - QString datestr = dateRegExp.cap(1); + TQString datestr = dateRegExp.cap(1); MyMoneyDateFormat dateparse(m_source.m_dateformat); try { m_date = dateparse.convertString( datestr,false /*strict*/ ); gotdate = true; - emit status(i18n("Date found: %1").arg(m_date.toString()));; + emit status(i18n("Date found: %1").tqarg(m_date.toString()));; } catch (MyMoneyException* e) { - // emit error(i18n("Unable to parse date %1 using format %2: %3").arg(datestr,dateparse.format(),e->what())); - m_date = QDate::currentDate(); + // emit error(i18n("Unable to parse date %1 using format %2: %3").tqarg(datestr,dateparse.format(),e->what())); + m_date = TQDate::tqcurrentDate(); gotdate = true; delete e; } @@ -394,20 +394,20 @@ void WebPriceQuote::slotParseQuote(const QString& _quotedata) } else { - emit error(i18n("Unable to update price for %1").arg(m_symbol)); + emit error(i18n("Unable to update price for %1").tqarg(m_symbol)); emit failed( m_id, m_symbol ); } } else { - emit error(i18n("Unable to update price for %1").arg(m_symbol)); + emit error(i18n("Unable to update price for %1").tqarg(m_symbol)); emit failed( m_id, m_symbol ); } } -QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) +TQMap<TQString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) { - QMap<QString,WebPriceQuoteSource> result; + TQMap<TQString,WebPriceQuoteSource> result; result["Yahoo"] = WebPriceQuoteSource("Yahoo", "http://finance.yahoo.com/d/quotes.csv?s=%1&f=sl1d1", @@ -448,7 +448,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) result["Globe & Mail"] = WebPriceQuoteSource("Globe & Mail", "http://globefunddb.theglobeandmail.com/gishome/plsql/gis.price_history?pi_fund_id=%1", - QString(), // symbolregexp + TQString(), // symbolregexp "Reinvestment Price \\w+ \\d+, \\d+ (\\d+\\.\\d+)", // priceregexp "Reinvestment Price (\\w+ \\d+, \\d+)", // dateregexp "%m %d %y" // dateformat @@ -456,7 +456,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) result["MSN.CA"] = WebPriceQuoteSource("MSN.CA", "http://ca.moneycentral.msn.com/investor/quotes/quotes.asp?symbol=%1", - QString(), // symbolregexp + TQString(), // symbolregexp "Net Asset Value (\\d+\\.\\d+)", // priceregexp "NAV update (\\d+\\D+\\d+\\D+\\d+)", // dateregexp "%d %m %y" // dateformat @@ -464,7 +464,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) // Finanztreff (replaces VWD.DE) and boerseonline supplied by Micahel Zimmerman result["Finanztreff"] = WebPriceQuoteSource("Finanztreff", "http://finanztreff.de/kurse_einzelkurs_detail.htn?u=100&i=%1", - QString(), // symbolregexp + TQString(), // symbolregexp "([0-9]+,\\d+).+Gattung:Fonds", // priceregexp "\\).(\\d+\\D+\\d+\\D+\\d+)", // dateregexp (doesn't work; date in chart "%d.%m.%y" // dateformat @@ -472,7 +472,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) result["boerseonline"] = WebPriceQuoteSource("boerseonline", "http://www.boerse-online.de/tools/boerse/einzelkurs_kurse.htm?&s=%1", - QString(), // symbolregexp + TQString(), // symbolregexp "Akt\\. Kurs.(\\d+,\\d\\d)", // priceregexp "Datum.(\\d+\\.\\d+\\.\\d+)", // dateregexp (doesn't work; date in chart "%d.%m.%y" // dateformat @@ -538,7 +538,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) result["Gielda Papierow Wartosciowych (GPW)"] = WebPriceQuoteSource("Gielda Papierow Wartosciowych (GPW)", "http://stooq.com/q/?s=%1", - QString(), // symbol regexp + TQString(), // symbol regexp "Kurs.*(\\d+\\.\\d+).*Data", // price regexp "(\\d{4,4}-\\d{2,2}-\\d{2,2})", // date regexp "%y %m %d" // date format @@ -548,7 +548,7 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) // at OMX Baltic market. result["OMX Baltic funds"] = WebPriceQuoteSource("OMX Baltic funds", "http://www.baltic.omxgroup.com/market/?pg=nontradeddetails¤cy=0&instrument=%1", - QString(), // symbolregexp + TQString(), // symbolregexp "NAV (\\d+,\\d+)", // priceregexp "Kpv (\\d+.\\d+.\\d+)", // dateregexp "%d.%m.%y" // dateformat @@ -589,20 +589,20 @@ QMap<QString,WebPriceQuoteSource> WebPriceQuote::defaultQuoteSources(void) return result; } -QStringList WebPriceQuote::quoteSources (const _quoteSystemE _system) { +TQStringList WebPriceQuote::quoteSources (const _quoteSystemE _system) { if (_system == Native) return (quoteSourcesNative()); else return (quoteSourcesFinanceQuote()); } -QStringList WebPriceQuote::quoteSourcesNative() +TQStringList WebPriceQuote::quoteSourcesNative() { KConfig *kconfig = KGlobal::config(); - QStringList groups = kconfig->groupList(); + TQStringList groups = kconfig->groupList(); - QStringList::Iterator it; - QRegExp onlineQuoteSource(QString("^Online-Quote-Source-(.*)$")); + TQStringList::Iterator it; + TQRegExp onlineQuoteSource(TQString("^Online-Quote-Source-(.*)$")); // get rid of all 'non online quote source' entries for(it = groups.begin(); it != groups.end(); it = groups.remove(it)) { @@ -617,14 +617,14 @@ QStringList WebPriceQuote::quoteSourcesNative() if ( ! groups.count() && kconfig->hasGroup("Online Quotes Options") ) { kconfig->setGroup("Online Quotes Options"); - QString url(kconfig->readEntry("URL","http://finance.yahoo.com/d/quotes.csv?s=%1&f=sl1d1")); - QString symbolRegExp(kconfig->readEntry("SymbolRegex","\"([^,\"]*)\",.*")); - QString priceRegExp(kconfig->readEntry("PriceRegex","[^,]*,([^,]*),.*")); - QString dateRegExp(kconfig->readEntry("DateRegex","[^,]*,[^,]*,\"([^\"]*)\"")); + TQString url(kconfig->readEntry("URL","http://finance.yahoo.com/d/quotes.csv?s=%1&f=sl1d1")); + TQString symbolRegExp(kconfig->readEntry("SymbolRegex","\"([^,\"]*)\",.*")); + TQString priceRegExp(kconfig->readEntry("PriceRegex","[^,]*,([^,]*),.*")); + TQString dateRegExp(kconfig->readEntry("DateRegex","[^,]*,[^,]*,\"([^\"]*)\"")); kconfig->deleteGroup("Online Quotes Options"); groups += "Old Source"; - kconfig->setGroup(QString("Online-Quote-Source-%1").arg("Old Source")); + kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg("Old Source")); kconfig->writeEntry("URL", url); kconfig->writeEntry("SymbolRegex", symbolRegExp); kconfig->writeEntry("PriceRegex",priceRegExp); @@ -635,11 +635,11 @@ QStringList WebPriceQuote::quoteSourcesNative() // Set up each of the default sources. These are done piecemeal so that // when we add a new source, it's automatically picked up. - QMap<QString,WebPriceQuoteSource> defaults = defaultQuoteSources(); - QMap<QString,WebPriceQuoteSource>::const_iterator it_source = defaults.begin(); + TQMap<TQString,WebPriceQuoteSource> defaults = defaultQuoteSources(); + TQMap<TQString,WebPriceQuoteSource>::const_iterator it_source = defaults.begin(); while ( it_source != defaults.end() ) { - if ( ! groups.contains( (*it_source).m_name ) ) + if ( ! groups.tqcontains( (*it_source).m_name ) ) { groups += (*it_source).m_name; (*it_source).write(); @@ -651,15 +651,15 @@ QStringList WebPriceQuote::quoteSourcesNative() return groups; } -QStringList WebPriceQuote::quoteSourcesFinanceQuote() +TQStringList WebPriceQuote::quoteSourcesFinanceQuote() { if (m_financeQuoteSources.empty()) { // run the process one time only FinanceQuoteProcess getList; m_financeQuoteScriptPath = - KGlobal::dirs()->findResource("appdata", QString("misc/financequote.pl")); + KGlobal::dirs()->findResource("appdata", TQString("misc/financequote.pl")); getList.launch( m_financeQuoteScriptPath ); while (!getList.isFinished()) { - qApp->processEvents(); + tqApp->processEvents(); } m_financeQuoteSources = getList.getSourceList(); } @@ -670,7 +670,7 @@ QStringList WebPriceQuote::quoteSourcesFinanceQuote() // Helper class to load/save an individual source // -WebPriceQuoteSource::WebPriceQuoteSource(const QString& name, const QString& url, const QString& sym, const QString& price, const QString& date, const QString& dateformat): +WebPriceQuoteSource::WebPriceQuoteSource(const TQString& name, const TQString& url, const TQString& sym, const TQString& price, const TQString& date, const TQString& dateformat): m_name(name), m_url(url), m_sym(sym), @@ -680,11 +680,11 @@ WebPriceQuoteSource::WebPriceQuoteSource(const QString& name, const QString& url { } -WebPriceQuoteSource::WebPriceQuoteSource(const QString& name) +WebPriceQuoteSource::WebPriceQuoteSource(const TQString& name) { m_name = name; KConfig *kconfig = KGlobal::config(); - kconfig->setGroup(QString("Online-Quote-Source-%1").arg(m_name)); + kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg(m_name)); m_sym = kconfig->readEntry("SymbolRegex"); m_date = kconfig->readEntry("DateRegex"); m_dateformat = kconfig->readEntry("DateFormatRegex","%m %d %y"); @@ -696,7 +696,7 @@ WebPriceQuoteSource::WebPriceQuoteSource(const QString& name) void WebPriceQuoteSource::write(void) const { KConfig *kconfig = KGlobal::config(); - kconfig->setGroup(QString("Online-Quote-Source-%1").arg(m_name)); + kconfig->setGroup(TQString("Online-Quote-Source-%1").tqarg(m_name)); kconfig->writeEntry("URL", m_url); kconfig->writeEntry("PriceRegex", m_price); kconfig->writeEntry("DateRegex", m_date); @@ -708,7 +708,7 @@ void WebPriceQuoteSource::write(void) const kconfig->deleteEntry("SkipStripping"); } -void WebPriceQuoteSource::rename(const QString& name) +void WebPriceQuoteSource::rename(const TQString& name) { remove(); m_name = name; @@ -718,7 +718,7 @@ void WebPriceQuoteSource::rename(const QString& name) void WebPriceQuoteSource::remove(void) const { KConfig *kconfig = KGlobal::config(); - kconfig->deleteGroup(QString("Online-Quote-Source-%1").arg(m_name)); + kconfig->deleteGroup(TQString("Online-Quote-Source-%1").tqarg(m_name)); } // @@ -727,17 +727,17 @@ void WebPriceQuoteSource::remove(void) const WebPriceQuoteProcess::WebPriceQuoteProcess(void) { - connect(this, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); - connect(this, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*))); + connect(this, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); + connect(this, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*))); } void WebPriceQuoteProcess::slotReceivedDataFromFilter(KProcess* /*_process*/, char* _pcbuffer, int _nbufferlen) { - QByteArray data; + TQByteArray data; data.duplicate(_pcbuffer, _nbufferlen); -// kdDebug(2) << "WebPriceQuoteProcess::slotReceivedDataFromFilter(): " << QString(data) << endl; - m_string += QString(data); +// kdDebug(2) << "WebPriceQuoteProcess::slotReceivedDataFromFilter(): " << TQString(data) << endl; + m_string += TQString(data); } void WebPriceQuoteProcess::slotProcessExited(KProcess*) @@ -809,17 +809,17 @@ FinanceQuoteProcess::FinanceQuoteProcess(void) m_fqNames["yahoo_europe"] = "Yahoo Europe"; m_fqNames["yahoo_nz"] = "Yahoo New Zealand"; m_fqNames["zifunds"] = "Zuerich Investments"; - connect(this, SIGNAL(receivedStdout(KProcess*, char*, int)), this, SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); - connect(this, SIGNAL(processExited(KProcess*)), this, SLOT(slotProcessExited(KProcess*))); + connect(this, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), this, TQT_SLOT(slotReceivedDataFromFilter(KProcess*, char*, int))); + connect(this, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(slotProcessExited(KProcess*))); } void FinanceQuoteProcess::slotReceivedDataFromFilter(KProcess* /*_process*/, char* _pcbuffer, int _nbufferlen) { - QByteArray data; + TQByteArray data; data.duplicate(_pcbuffer, _nbufferlen); -// kdDebug(2) << "WebPriceQuoteProcess::slotReceivedDataFromFilter(): " << QString(data) << endl; - m_string += QString(data); +// kdDebug(2) << "WebPriceQuoteProcess::slotReceivedDataFromFilter(): " << TQString(data) << endl; + m_string += TQString(data); } void FinanceQuoteProcess::slotProcessExited(KProcess*) @@ -828,19 +828,19 @@ void FinanceQuoteProcess::slotProcessExited(KProcess*) m_isDone = true; } -void FinanceQuoteProcess::launch (const QString& scriptPath) { +void FinanceQuoteProcess::launch (const TQString& scriptPath) { clearArguments(); - arguments.append(QCString("perl")); - arguments.append (QCString(scriptPath)); - arguments.append (QCString("-l")); + arguments.append(TQCString("perl")); + arguments.append (TQCString(scriptPath)); + arguments.append (TQCString("-l")); if (!start(KProcess::NotifyOnExit, KProcess::Stdout)) qFatal ("Unable to start FQ script"); return; } -QStringList FinanceQuoteProcess::getSourceList() { - QStringList raw = QStringList::split(0x0A, m_string); - QStringList sources; - QStringList::iterator it; +TQStringList FinanceQuoteProcess::getSourceList() { + TQStringList raw = TQStringList::split(0x0A, m_string); + TQStringList sources; + TQStringList::iterator it; for (it = raw.begin(); it != raw.end(); ++it) { if (m_fqNames[*it].isEmpty()) sources.append(*it); else sources.append(m_fqNames[*it]); @@ -849,8 +849,8 @@ QStringList FinanceQuoteProcess::getSourceList() { return (sources); } -const QString FinanceQuoteProcess::crypticName(const QString& niceName) { - QString ret (niceName); +const TQString FinanceQuoteProcess::crypticName(const TQString& niceName) { + TQString ret (niceName); fqNameMap::iterator it; for (it = m_fqNames.begin(); it != m_fqNames.end(); ++it) { if (niceName == it.data()) { @@ -861,8 +861,8 @@ const QString FinanceQuoteProcess::crypticName(const QString& niceName) { return (ret); } -const QString FinanceQuoteProcess::niceName(const QString& crypticName) { - QString ret (m_fqNames[crypticName]); +const TQString FinanceQuoteProcess::niceName(const TQString& crypticName) { + TQString ret (m_fqNames[crypticName]); if (ret.isEmpty()) ret = crypticName; return (ret); } @@ -870,29 +870,29 @@ const QString FinanceQuoteProcess::niceName(const QString& crypticName) { // Universal date converter // -// In 'strict' mode, this is designed to be compatable with the QIF profile date +// In 'strict' mode, this is designed to be compatable with the TQIF profile date // converter. However, that converter deals with the concept of an apostrophe // format in a way I don't understand. So for the moment, they are 99% // compatable, waiting on that issue. (acejones) -QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigned _centurymidpoint) const +TQDate MyMoneyDateFormat::convertString(const TQString& _in, bool _strict, unsigned _centurymidpoint) const { // // Break date format string into component parts // - QRegExp formatrex("%([mdy]+)(\\W+)%([mdy]+)(\\W+)%([mdy]+)",false /* case sensitive */); + TQRegExp formatrex("%([mdy]+)(\\W+)%([mdy]+)(\\W+)%([mdy]+)",false /* case sensitive */); if ( formatrex.search(m_format) == -1 ) { throw new MYMONEYEXCEPTION("Invalid format string"); } - QStringList formatParts; + TQStringList formatParts; formatParts += formatrex.cap(1); formatParts += formatrex.cap(3); formatParts += formatrex.cap(5); - QStringList formatDelimiters; + TQStringList formatDelimiters; formatDelimiters += formatrex.cap(2); formatDelimiters += formatrex.cap(4); @@ -901,13 +901,13 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne // using the delimiters found in the format string // - QRegExp inputrex; + TQRegExp inputrex; inputrex.setCaseSensitive(false); // strict mode means we must enforce the delimiters as specified in the // format. non-strict allows any delimiters if ( _strict ) - inputrex.setPattern(QString("(\\w+)%1(\\w+)%2(\\w+)").arg(formatDelimiters[0],formatDelimiters[1])); + inputrex.setPattern(TQString("(\\w+)%1(\\w+)%2(\\w+)").tqarg(formatDelimiters[0],formatDelimiters[1])); else inputrex.setPattern("(\\w+)\\W+(\\w+)\\W+(\\w+)"); @@ -916,7 +916,7 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne throw new MYMONEYEXCEPTION("Invalid input string"); } - QStringList scannedParts; + TQStringList scannedParts; scannedParts += inputrex.cap(1).lower(); scannedParts += inputrex.cap(2).lower(); scannedParts += inputrex.cap(3).lower(); @@ -927,9 +927,9 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne unsigned day = 0, month = 0, year = 0; bool ok; - QRegExp digitrex("(\\d+)"); - QStringList::const_iterator it_scanned = scannedParts.begin(); - QStringList::const_iterator it_format = formatParts.begin(); + TQRegExp digitrex("(\\d+)"); + TQStringList::const_iterator it_scanned = scannedParts.begin(); + TQStringList::const_iterator it_format = formatParts.begin(); while ( it_scanned != scannedParts.end() ) { switch ( (*it_format)[0] ) @@ -940,7 +940,7 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne if ( digitrex.search(*it_scanned) != -1 ) day = digitrex.cap(1).toUInt(&ok); if ( !ok || day > 31 ) - throw new MYMONEYEXCEPTION(QString("Invalid day entry: %1").arg(*it_scanned)); + throw new MYMONEYEXCEPTION(TQString("Invalid day entry: %1").tqarg(*it_scanned)); break; case 'm': month = (*it_scanned).toUInt(&ok); @@ -958,18 +958,18 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne } if ( month < 1 || month > 12 ) - throw new MYMONEYEXCEPTION(QString("Invalid month entry: %1").arg(*it_scanned)); + throw new MYMONEYEXCEPTION(TQString("Invalid month entry: %1").tqarg(*it_scanned)); break; case 'y': if ( _strict && (*it_scanned).length() != (*it_format).length()) - throw new MYMONEYEXCEPTION(QString("Length of year (%1) does not match expected length (%2).") - .arg(*it_scanned,*it_format)); + throw new MYMONEYEXCEPTION(TQString("Length of year (%1) does not match expected length (%2).") + .tqarg(*it_scanned,*it_format)); year = (*it_scanned).toUInt(&ok); if (!ok) - throw new MYMONEYEXCEPTION(QString("Invalid year entry: %1").arg(*it_scanned)); + throw new MYMONEYEXCEPTION(TQString("Invalid year entry: %1").tqarg(*it_scanned)); // // 2-digit year case @@ -988,7 +988,7 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne } if ( year < 1900 ) - throw new MYMONEYEXCEPTION(QString("Invalid year (%1)").arg(year)); + throw new MYMONEYEXCEPTION(TQString("Invalid year (%1)").tqarg(year)); break; default: @@ -999,9 +999,9 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne ++it_format; } - QDate result(year,month,day); + TQDate result(year,month,day); if ( ! result.isValid() ) - throw new MYMONEYEXCEPTION(QString("Invalid date (yr%1 mo%2 dy%3)").arg(year).arg(month).arg(day)); + throw new MYMONEYEXCEPTION(TQString("Invalid date (yr%1 mo%2 dy%3)").tqarg(year).tqarg(month).tqarg(day)); return result; } @@ -1010,35 +1010,35 @@ QDate MyMoneyDateFormat::convertString(const QString& _in, bool _strict, unsigne // Unit test helpers // -convertertest::QuoteReceiver::QuoteReceiver(WebPriceQuote* q, QObject* parent, const char *name) : - QObject(parent,name) +convertertest::QuoteReceiver::QuoteReceiver(WebPriceQuote* q, TQObject* tqparent, const char *name) : + TQObject(tqparent,name) { - connect(q,SIGNAL(quote(const QString&,const QDate&, const double&)), - this,SLOT(slotGetQuote(const QString&,const QDate&, const double&))); - connect(q,SIGNAL(status(const QString&)), - this,SLOT(slotStatus(const QString&))); - connect(q,SIGNAL(error(const QString&)), - this,SLOT(slotError(const QString&))); + connect(q,TQT_SIGNAL(quote(const TQString&,const TQDate&, const double&)), + this,TQT_SLOT(slotGetQuote(const TQString&,const TQDate&, const double&))); + connect(q,TQT_SIGNAL(status(const TQString&)), + this,TQT_SLOT(slottqStatus(const TQString&))); + connect(q,TQT_SIGNAL(error(const TQString&)), + this,TQT_SLOT(slotError(const TQString&))); } convertertest::QuoteReceiver::~QuoteReceiver() { } -void convertertest::QuoteReceiver::slotGetQuote(const QString&,const QDate& d, const double& m) +void convertertest::QuoteReceiver::slotGetQuote(const TQString&,const TQDate& d, const double& m) { // kdDebug(2) << "test::QuoteReceiver::slotGetQuote( , " << d << " , " << m.toString() << " )" << endl; m_price = MyMoneyMoney(m); m_date = d; } -void convertertest::QuoteReceiver::slotStatus(const QString& msg) +void convertertest::QuoteReceiver::slottqStatus(const TQString& msg) { -// kdDebug(2) << "test::QuoteReceiver::slotStatus( " << msg << " )" << endl; +// kdDebug(2) << "test::QuoteReceiver::slottqStatus( " << msg << " )" << endl; m_statuses += msg; } -void convertertest::QuoteReceiver::slotError(const QString& msg) +void convertertest::QuoteReceiver::slotError(const TQString& msg) { // kdDebug(2) << "test::QuoteReceiver::slotError( " << msg << " )" << endl; diff --git a/kmymoney2/converter/webpricequote.h b/kmymoney2/converter/webpricequote.h index e25dfb8..ba8146b 100644 --- a/kmymoney2/converter/webpricequote.h +++ b/kmymoney2/converter/webpricequote.h @@ -15,16 +15,16 @@ * * ***************************************************************************/ -#ifndef WEBPRICEQUOTE_H -#define WEBPRICEQUOTE_H +#ifndef WEBPRICETQUOTE_H +#define WEBPRICETQUOTE_H // ---------------------------------------------------------------------------- // QT Headers -#include <qobject.h> -#include <qdatetime.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqdatetime.h> +#include <tqstringlist.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -48,20 +48,21 @@ of a local script being used to fetch the quote. class WebPriceQuoteProcess: public KProcess { Q_OBJECT + TQ_OBJECT public: WebPriceQuoteProcess(void); - void setSymbol(const QString& _symbol) { m_symbol = _symbol; m_string.truncate(0); } + void setSymbol(const TQString& _symbol) { m_symbol = _symbol; m_string.truncate(0); } public slots: void slotReceivedDataFromFilter(KProcess*, char*, int); void slotProcessExited(KProcess*); signals: - void processExited(const QString&); + void processExited(const TQString&); private: - QString m_symbol; - QString m_string; + TQString m_symbol; + TQString m_string; }; /** @@ -75,13 +76,14 @@ by the Finance::Quote package, and more user-friendly names. class FinanceQuoteProcess: public KProcess { Q_OBJECT + TQ_OBJECT public: FinanceQuoteProcess(void); - void launch (const QString& scriptPath); + void launch (const TQString& scriptPath); bool isFinished() { return(m_isDone);}; - QStringList getSourceList(); - const QString crypticName(const QString& niceName); - const QString niceName(const QString& crypticName); + TQStringList getSourceList(); + const TQString crypticName(const TQString& niceName); + const TQString niceName(const TQString& crypticName); public slots: void slotReceivedDataFromFilter(KProcess*, char*, int); @@ -89,8 +91,8 @@ class FinanceQuoteProcess: public KProcess private: bool m_isDone; - QString m_string; - typedef QMap<QString, QString> fqNameMap; + TQString m_string; + typedef TQMap<TQString, TQString> fqNameMap; fqNameMap m_fqNames; }; @@ -103,20 +105,20 @@ class FinanceQuoteProcess: public KProcess struct WebPriceQuoteSource { WebPriceQuoteSource() {} - WebPriceQuoteSource(const QString& name); - WebPriceQuoteSource(const QString& name, const QString& url, const QString& sym, const QString& price, const QString& date, const QString& dateformat); + WebPriceQuoteSource(const TQString& name); + WebPriceQuoteSource(const TQString& name, const TQString& url, const TQString& sym, const TQString& price, const TQString& date, const TQString& dateformat); ~WebPriceQuoteSource() {} void write(void) const; - void rename(const QString& name); + void rename(const TQString& name); void remove(void) const; - QString m_name; - QString m_url; - QString m_sym; - QString m_price; - QString m_date; - QString m_dateformat; + TQString m_name; + TQString m_url; + TQString m_sym; + TQString m_price; + TQString m_date; + TQString m_dateformat; bool m_skipStripping; }; @@ -125,11 +127,12 @@ Retrieves a price quote from a web-based quote source @author Ace Jones <acejones@users.sourceforge.net> */ -class WebPriceQuote: public QObject +class WebPriceQuote: public TQObject { Q_OBJECT + TQ_OBJECT public: - WebPriceQuote( QObject* = 0, const char* = 0 ); + WebPriceQuote( TQObject* = 0, const char* = 0 ); ~WebPriceQuote(); typedef enum _quoteSystemE { @@ -146,78 +149,78 @@ public: * @param _id an arbitrary identifier, which will be emitted in the quote * signal when a price is sent back. * @param _source the source of the quote (must be a valid value returned - * by quoteSources(). Send QString() to use the default + * by quoteSources(). Send TQString() to use the default * source. * @return bool Whether the quote fetch process was launched successfully */ - bool launch(const QString& _symbol, const QString& _id, const QString& _source=QString()); + bool launch(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString()); /** * This returns a list of the names of the quote sources * currently defined. * * @param _system whether to return Native or Finance::Quote source list - * @return QStringList of quote source names + * @return TQStringList of quote source names */ - static QStringList quoteSources(const _quoteSystemE _system=Native); + static TQStringList quoteSources(const _quoteSystemE _system=Native); signals: - void quote(const QString&, const QString&, const QDate&, const double&); - void failed(const QString&, const QString&); - void status(const QString&); - void error(const QString&); + void quote(const TQString&, const TQString&, const TQDate&, const double&); + void failed(const TQString&, const TQString&); + void status(const TQString&); + void error(const TQString&); protected slots: - void slotParseQuote(const QString&); + void slotParseQuote(const TQString&); protected: - static QMap<QString,WebPriceQuoteSource> defaultQuoteSources(void); + static TQMap<TQString,WebPriceQuoteSource> defaultQuoteSources(void); private: - bool download(const KURL& u, QString & target, QWidget* window); - void removeTempFile(const QString& tmpFile); + bool download(const KURL& u, TQString & target, TQWidget* window); + void removeTempFile(const TQString& tmpFile); private slots: void slotResult( KIO::Job * job ); private: - bool launchNative(const QString& _symbol, const QString& _id, const QString& _source=QString()); - bool launchFinanceQuote(const QString& _symbol, const QString& _id, const QString& _source=QString()); + bool launchNative(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString()); + bool launchFinanceQuote(const TQString& _symbol, const TQString& _id, const TQString& _source=TQString()); void enter_loop(void); - static QStringList quoteSourcesNative(); - static QStringList quoteSourcesFinanceQuote(); + static TQStringList quoteSourcesNative(); + static TQStringList quoteSourcesFinanceQuote(); WebPriceQuoteProcess m_filter; - QString m_symbol; - QString m_id; - QDate m_date; + TQString m_symbol; + TQString m_id; + TQDate m_date; double m_price; WebPriceQuoteSource m_source; - static QString m_financeQuoteScriptPath; - static QStringList m_financeQuoteSources; + static TQString m_financeQuoteScriptPath; + static TQStringList m_financeQuoteSources; /** * Whether the download succeeded or not. Taken from KIO::NetAccess */ bool bJobOK; - static QString* lastErrorMsg; + static TQString* lastErrorMsg; static int lastErrorCode; - QString m_tmpFile; + TQString m_tmpFile; }; class MyMoneyDateFormat { public: - MyMoneyDateFormat(const QString& _format): m_format(_format) {} - QString convertDate(const QDate& _in) const; - QDate convertString(const QString& _in, bool _strict=true, unsigned _centurymidpoint = QDate::currentDate().year() ) const; - const QString& format(void) const { return m_format; } + MyMoneyDateFormat(const TQString& _format): m_format(_format) {} + TQString convertDate(const TQDate& _in) const; + TQDate convertString(const TQString& _in, bool _strict=true, unsigned _centurymidpoint = TQDate::tqcurrentDate().year() ) const; + const TQString& format(void) const { return m_format; } private: - QString m_format; + TQString m_format; }; namespace convertertest { @@ -227,26 +230,27 @@ Simple class to handle signals/slots for unit tests @author Ace Jones <acejones@users.sourceforge.net> */ -class QuoteReceiver : public QObject +class QuoteReceiver : public TQObject { Q_OBJECT + TQ_OBJECT public: - QuoteReceiver(WebPriceQuote* q, QObject *parent = 0, const char *name = 0); + QuoteReceiver(WebPriceQuote* q, TQObject *tqparent = 0, const char *name = 0); ~QuoteReceiver(); public slots: - void slotGetQuote(const QString&,const QDate&, const double&); - void slotStatus(const QString&); - void slotError(const QString&); + void slotGetQuote(const TQString&,const TQDate&, const double&); + void slottqStatus(const TQString&); + void slotError(const TQString&); public: - QStringList m_statuses; - QStringList m_errors; + TQStringList m_statuses; + TQStringList m_errors; MyMoneyMoney m_price; - QDate m_date; + TQDate m_date; }; } // end namespace convertertest -#endif // WEBPRICEQUOTE_H +#endif // WEBPRICETQUOTE_H // vim:cin:si:ai:et:ts=2:sw=2: diff --git a/kmymoney2/dialogs/investactivities.cpp b/kmymoney2/dialogs/investactivities.cpp index d929c38..be0f6d1 100644 --- a/kmymoney2/dialogs/investactivities.cpp +++ b/kmymoney2/dialogs/investactivities.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -39,12 +39,12 @@ using namespace Invest; using namespace KMyMoneyRegister; -bool Activity::isComplete(QString& reason) const +bool Activity::isComplete(TQString& reason) const { bool rc = false; KMyMoneySecurity* security = dynamic_cast<KMyMoneySecurity*>(haveWidget("security")); if(!security->currentText().isEmpty()) { - rc = security->selector()->contains(security->currentText()); + rc = security->selector()->tqcontains(security->currentText()); } return rc; } @@ -58,12 +58,12 @@ bool Activity::haveAssetAccount(void) const rc = !cat->currentText().isEmpty(); if(rc && !cat->currentText().isEmpty()) { - rc = cat->selector()->contains(cat->currentText()); + rc = cat->selector()->tqcontains(cat->currentText()); } return rc; } -bool Activity::haveCategoryAndAmount(const QString& category, const QString& amount, bool optional) const +bool Activity::haveCategoryAndAmount(const TQString& category, const TQString& amount, bool optional) const { KMyMoneyCategory* cat = dynamic_cast<KMyMoneyCategory*>(haveWidget(category)); @@ -72,7 +72,7 @@ bool Activity::haveCategoryAndAmount(const QString& category, const QString& amo rc = !cat->currentText().isEmpty(); if(rc && !cat->currentText().isEmpty()) { - rc = cat->selector()->contains(cat->currentText()) || cat->isSplitTransaction(); + rc = cat->selector()->tqcontains(cat->currentText()) || cat->isSplitTransaction(); if(rc && !amount.isEmpty()) { MyMoneyMoney value = dynamic_cast<kMyMoneyEdit*>(haveWidget(amount))->value(); if(!isMultiSelection()) @@ -100,14 +100,14 @@ bool Activity::havePrice(void) const return !amount->value().isZero(); } -bool Activity::createCategorySplits(const MyMoneyTransaction& t, KMyMoneyCategory* cat, kMyMoneyEdit* amount, MyMoneyMoney factor, QValueList<MyMoneySplit>&splits, const QValueList<MyMoneySplit>& osplits ) const +bool Activity::createCategorySplits(const MyMoneyTransaction& t, KMyMoneyCategory* cat, kMyMoneyEdit* amount, MyMoneyMoney factor, TQValueList<MyMoneySplit>&splits, const TQValueList<MyMoneySplit>& osplits ) const { bool rc = true; if(!isMultiSelection() || (isMultiSelection() && !cat->currentText().isEmpty())) { if(!cat->isSplitTransaction()) { splits.clear(); MyMoneySplit s1; - QString categoryId; + TQString categoryId; categoryId = cat->selectedItem(); if(!categoryId.isEmpty()) { s1.setAccountId(categoryId); @@ -128,18 +128,18 @@ void Activity::createAssetAccountSplit(MyMoneySplit& split, const MyMoneySplit& { KMyMoneyCategory* cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("asset-account")); if(!isMultiSelection() || (isMultiSelection() && !cat->currentText().isEmpty())) { - QString categoryId; + TQString categoryId; categoryId = cat->selectedItem(); split.setAccountId(categoryId); } split.setMemo(stockSplit.memo()); } -MyMoneyMoney Activity::sumSplits(const MyMoneySplit& s0, const QValueList<MyMoneySplit>& feeSplits, const QValueList<MyMoneySplit>& interestSplits) const +MyMoneyMoney Activity::sumSplits(const MyMoneySplit& s0, const TQValueList<MyMoneySplit>& feeSplits, const TQValueList<MyMoneySplit>& interestSplits) const { MyMoneyMoney total; total = s0.value(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = feeSplits.begin(); it_s != feeSplits.end(); ++it_s) { total += (*it_s).value(); } @@ -149,13 +149,13 @@ MyMoneyMoney Activity::sumSplits(const MyMoneySplit& s0, const QValueList<MyMone return total; } -void Activity::setLabelText(const QString& idx, const QString& txt) const +void Activity::setLabelText(const TQString& idx, const TQString& txt) const { - QLabel* w = dynamic_cast<QLabel*>(haveWidget(idx)); + TQLabel* w = dynamic_cast<TQLabel*>(haveWidget(idx)); if(w) { w->setText(txt); } else { - qDebug("Unknown QLabel named '%s'", idx.data()); + qDebug("Unknown TQLabel named '%s'", idx.data()); } } @@ -165,7 +165,7 @@ void Activity::preloadAssetAccount(void) cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("asset-account")); if(cat->isVisible()) { if(cat->currentText().isEmpty()) { - MyMoneyAccount acc = MyMoneyFile::instance()->accountByName(i18n("%1 (Brokerage)").arg(m_parent->account().name())); + MyMoneyAccount acc = MyMoneyFile::instance()->accountByName(i18n("%1 (Brokerage)").tqarg(m_parent->account().name())); if(!acc.id().isEmpty()) { bool blocked = cat->signalsBlocked(); // block signals, so that the focus does not go crazy @@ -182,13 +182,13 @@ void Buy::showWidgets(void) const { KMyMoneyCategory* cat; cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("fee-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); kMyMoneyEdit* shareEdit = dynamic_cast<kMyMoneyEdit*>(haveWidget("shares")); shareEdit->show(); shareEdit->setPrecision(MyMoneyMoney::denomToPrec(m_parent->security().smallestAccountFraction())); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); haveWidget("asset-account")->show(); haveWidget("price")->show(); haveWidget("total")->show(); @@ -201,7 +201,7 @@ void Buy::showWidgets(void) const setLabelText("total-label", i18n("Total")); } -bool Buy::isComplete(QString& reason) const +bool Buy::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); rc &= haveAssetAccount(); @@ -213,13 +213,13 @@ bool Buy::isComplete(QString& reason) const return rc; } -bool Buy::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Buy::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(m_interestSplits); Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -271,9 +271,9 @@ void Sell::showWidgets(void) const { KMyMoneyCategory* cat; cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("fee-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); kMyMoneyEdit* shareEdit = dynamic_cast<kMyMoneyEdit*>(haveWidget("shares")); shareEdit->show(); shareEdit->setPrecision(MyMoneyMoney::denomToPrec(m_parent->security().smallestAccountFraction())); @@ -290,7 +290,7 @@ void Sell::showWidgets(void) const setLabelText("total-label", i18n("Total")); } -bool Sell::isComplete(QString& reason) const +bool Sell::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); rc &= haveAssetAccount(); @@ -301,12 +301,12 @@ bool Sell::isComplete(QString& reason) const return rc; } -bool Sell::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Sell::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -360,7 +360,7 @@ void Div::showWidgets(void) const { KMyMoneyCategory* cat; cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); haveWidget("asset-account")->show(); haveWidget("total")->show(); @@ -370,20 +370,20 @@ void Div::showWidgets(void) const setLabelText("total-label", i18n("Total")); } -bool Div::isComplete(QString& reason) const +bool Div::isComplete(TQString& reason) const { bool rc = haveAssetAccount(); rc &= haveInterest(false); return rc; } -bool Div::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Div::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(m_feeSplits); Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -413,9 +413,9 @@ void Reinvest::showWidgets(void) const { KMyMoneyCategory* cat; cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("fee-account")); - cat->parentWidget()->show(); + cat->tqparentWidget()->show(); kMyMoneyEdit* shareEdit = dynamic_cast<kMyMoneyEdit*>(haveWidget("shares")); shareEdit->show(); shareEdit->setPrecision(MyMoneyMoney::denomToPrec(m_parent->security().smallestAccountFraction())); @@ -429,23 +429,23 @@ void Reinvest::showWidgets(void) const setLabelText("total-label", i18n("Total")); } -bool Reinvest::isComplete(QString& reason) const +bool Reinvest::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); - rc &= haveCategoryAndAmount("interest-account", QString(), false); + rc &= haveCategoryAndAmount("interest-account", TQString(), false); rc &= haveFees(true); rc &= haveShares(); rc &= havePrice(); return rc; } -bool Reinvest::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Reinvest::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(assetAccountSplit); Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -490,7 +490,7 @@ bool Reinvest::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMone MyMoneySplit& s1 = interestSplits[0]; - MyMoneyMoney total = sumSplits(s0, feeSplits, QValueList<MyMoneySplit>()); + MyMoneyMoney total = sumSplits(s0, feeSplits, TQValueList<MyMoneySplit>()); s1.setValue(-total); if(!m_parent->setupPrice(t, s1)) @@ -508,14 +508,14 @@ void Add::showWidgets(void) const setLabelText("shares-label", i18n("Shares")); } -bool Add::isComplete(QString& reason) const +bool Add::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); rc &= haveShares(); return rc; } -bool Add::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Add::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(t); Q_UNUSED(assetAccountSplit); @@ -524,7 +524,7 @@ bool Add::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySpli Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -549,14 +549,14 @@ void Remove::showWidgets(void) const setLabelText("shares-label", i18n("Shares")); } -bool Remove::isComplete(QString& reason) const +bool Remove::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); rc &= haveShares(); return rc; } -bool Remove::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Remove::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(t); Q_UNUSED(assetAccountSplit); @@ -565,7 +565,7 @@ bool Remove::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneyS Q_UNUSED(security); Q_UNUSED(currency); - QString reason; + TQString reason; if(!isComplete(reason)) return false; @@ -592,14 +592,14 @@ void Split::showWidgets(void) const setLabelText("shares-label", i18n("Ratio 1/")); } -bool Split::isComplete(QString& reason) const +bool Split::isComplete(TQString& reason) const { bool rc = Activity::isComplete(reason); rc &= haveShares(); return rc; } -bool Split::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) +bool Split::createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) { Q_UNUSED(t); Q_UNUSED(assetAccountSplit); diff --git a/kmymoney2/dialogs/investactivities.h b/kmymoney2/dialogs/investactivities.h index 91b474d..49a33e3 100644 --- a/kmymoney2/dialogs/investactivities.h +++ b/kmymoney2/dialogs/investactivities.h @@ -37,7 +37,7 @@ class Activity public: virtual MyMoneySplit::investTransactionTypeE type(void) const = 0; virtual void showWidgets(void) const = 0; - virtual bool isComplete(QString& reason) const = 0; + virtual bool isComplete(TQString& reason) const = 0; /** * Create a transaction @p t based on the split @p s0 and the data contained @@ -47,30 +47,30 @@ public: * * @return @p true if creation was successful, @p false otherwise */ - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) = 0; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency) = 0; virtual void preloadAssetAccount(void); virtual ~Activity() {} protected: Activity(InvestTransactionEditor* editor) { m_parent = editor; } - QWidget* haveWidget(const QString& name) const { return m_parent->haveWidget(name); } + TQWidget* haveWidget(const TQString& name) const { return m_parent->haveWidget(name); } bool haveAssetAccount(void) const; bool haveFees(bool optional = false) const { return haveCategoryAndAmount("fee-account", "fee-amount", optional); } bool haveInterest(bool optional = false) const { return haveCategoryAndAmount("interest-account", "interest-amount", optional); } bool haveShares(void) const; bool havePrice(void) const; bool isMultiSelection(void) const { return m_parent->isMultiSelection(); } - bool createCategorySplits(const MyMoneyTransaction& t, KMyMoneyCategory* cat, kMyMoneyEdit* amount, MyMoneyMoney factor, QValueList<MyMoneySplit>&splits, const QValueList<MyMoneySplit>& osplits ) const; + bool createCategorySplits(const MyMoneyTransaction& t, KMyMoneyCategory* cat, kMyMoneyEdit* amount, MyMoneyMoney factor, TQValueList<MyMoneySplit>&splits, const TQValueList<MyMoneySplit>& osplits ) const; void createAssetAccountSplit(MyMoneySplit& split, const MyMoneySplit& stockSplit) const; - MyMoneyMoney sumSplits(const MyMoneySplit& s0, const QValueList<MyMoneySplit>& feeSplits, const QValueList<MyMoneySplit>& interestSplits) const; - bool haveCategoryAndAmount(const QString& category, const QString& amount, bool optional) const; - void setLabelText(const QString& idx, const QString& txt) const; + MyMoneyMoney sumSplits(const MyMoneySplit& s0, const TQValueList<MyMoneySplit>& feeSplits, const TQValueList<MyMoneySplit>& interestSplits) const; + bool haveCategoryAndAmount(const TQString& category, const TQString& amount, bool optional) const; + void setLabelText(const TQString& idx, const TQString& txt) const; InvestTransactionEditor::priceModeE priceMode(void) const { return m_parent->priceMode(); } protected: InvestTransactionEditor* m_parent; - QMap<QString, MyMoneyMoney> m_priceInfo; + TQMap<TQString, MyMoneyMoney> m_priceInfo; }; class Buy : public Activity @@ -80,8 +80,8 @@ public: virtual ~Buy() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::BuyShares; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Sell : public Activity @@ -91,8 +91,8 @@ public: virtual ~Sell() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::SellShares; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Div : public Activity @@ -102,8 +102,8 @@ public: virtual ~Div() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::Dividend; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Reinvest : public Activity @@ -113,8 +113,8 @@ public: virtual ~Reinvest() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::ReinvestDividend; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Add : public Activity @@ -124,8 +124,8 @@ public: virtual ~Add() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::AddShares; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Remove : public Activity @@ -135,8 +135,8 @@ public: virtual ~Remove() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::RemoveShares; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; class Split : public Activity @@ -146,8 +146,8 @@ public: virtual ~Split() {} virtual MyMoneySplit::investTransactionTypeE type(void) const { return MyMoneySplit::SplitShares; } virtual void showWidgets(void) const; - virtual bool isComplete(QString& reason) const; - virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& m_feeSplits, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); + virtual bool isComplete(TQString& reason) const; + virtual bool createTransaction(MyMoneyTransaction& t, MyMoneySplit& s0, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& m_feeSplits, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& m_interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency); }; } // namespace Invest diff --git a/kmymoney2/dialogs/investtransactioneditor.cpp b/kmymoney2/dialogs/investtransactioneditor.cpp index 5a62436..d235ae5 100644 --- a/kmymoney2/dialogs/investtransactioneditor.cpp +++ b/kmymoney2/dialogs/investtransactioneditor.cpp @@ -20,11 +20,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qapplication.h> -#include <qeventloop.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqlabel.h> +#include <tqapplication.h> +#include <tqeventloop.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -64,8 +64,8 @@ class InvestTransactionEditor::Private { friend class Invest::Activity; public: - Private(InvestTransactionEditor* parent) : - m_parent(parent), + Private(InvestTransactionEditor* tqparent) : + m_parent(tqparent), m_activity(0) { m_phonyAccount = MyMoneyAccount("Phony-ID", MyMoneyAccount()); @@ -75,7 +75,7 @@ public: delete m_activity; } - QWidget* haveWidget(const QString& name) { return m_parent->haveWidget(name); } + TQWidget* haveWidget(const TQString& name) { return m_parent->haveWidget(name); } InvestTransactionEditor* m_parent; Activity* m_activity; @@ -94,7 +94,7 @@ InvestTransactionEditor::~InvestTransactionEditor() delete d; } -InvestTransactionEditor::InvestTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::InvestTransaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) : +InvestTransactionEditor::InvestTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::InvestTransaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) : TransactionEditor(regForm, item, list, lastPostDate), d(new Private(this)) { @@ -143,14 +143,14 @@ void InvestTransactionEditor::activityFactory(MyMoneySplit::investTransactionTyp } } -void InvestTransactionEditor::dissectTransaction(const MyMoneyTransaction& transaction, const MyMoneySplit& split, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency, MyMoneySplit::investTransactionTypeE& transactionType) +void InvestTransactionEditor::dissectTransaction(const MyMoneyTransaction& transaction, const MyMoneySplit& split, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency, MyMoneySplit::investTransactionTypeE& transactionType) { // collect the splits. split references the stock account and should already // be set up. assetAccountSplit references the corresponding asset account (maybe // empty), feeSplits is the list of all expenses and interestSplits // the list of all incomes MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { MyMoneyAccount acc = file->account((*it_s).accountId()); if((*it_s).id() == split.id()) { @@ -194,45 +194,45 @@ void InvestTransactionEditor::createEditWidgets(void) { KMyMoneyActivityCombo* activity = new KMyMoneyActivityCombo(); m_editWidgets["activity"] = activity; - connect(activity, SIGNAL(activitySelected(MyMoneySplit::investTransactionTypeE)), this, SLOT(slotUpdateActivity(MyMoneySplit::investTransactionTypeE))); - connect(activity, SIGNAL(activitySelected(MyMoneySplit::investTransactionTypeE)), this, SLOT(slotUpdateButtonState())); + connect(activity, TQT_SIGNAL(activitySelected(MyMoneySplit::investTransactionTypeE)), this, TQT_SLOT(slotUpdateActivity(MyMoneySplit::investTransactionTypeE))); + connect(activity, TQT_SIGNAL(activitySelected(MyMoneySplit::investTransactionTypeE)), this, TQT_SLOT(slotUpdateButtonState())); m_editWidgets["postdate"] = new kMyMoneyDateInput; - connect(m_editWidgets["postdate"], SIGNAL(dateChanged(const QDate&)), this, SLOT(slotUpdateButtonState())); + connect(m_editWidgets["postdate"], TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotUpdateButtonState())); KMyMoneySecurity* security = new KMyMoneySecurity; security->setHint(i18n("Security")); m_editWidgets["security"] = security; - connect(security, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateSecurity(const QString&))); - connect(security, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(security, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateSecurity(const QString&, QString&))); - connect(security, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); + connect(security, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateSecurity(const TQString&))); + connect(security, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(security, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateSecurity(const TQString&, TQString&))); + connect(security, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); KMyMoneyCategory* asset = new KMyMoneyCategory(0, 0, false); asset->setHint(i18n("Asset account")); m_editWidgets["asset-account"] = asset; - connect(asset, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(asset, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); + connect(asset, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(asset, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); KMyMoneyCategory* fees = new KMyMoneyCategory(0, 0, true); fees->setHint(i18n("Fees")); m_editWidgets["fee-account"] = fees; - connect(fees, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateFeeCategory(const QString&))); - connect(fees, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(fees, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateFeeVisibility(const QString&))); - connect(fees, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateFeeCategory(const QString&, QString&))); - connect(fees, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); - connect(fees->splitButton(), SIGNAL(clicked()), this, SLOT(slotEditFeeSplits())); + connect(fees, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateFeeCategory(const TQString&))); + connect(fees, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(fees, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateFeeVisibility(const TQString&))); + connect(fees, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateFeeCategory(const TQString&, TQString&))); + connect(fees, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); + connect(fees->splitButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditFeeSplits())); KMyMoneyCategory* interest = new KMyMoneyCategory(0, 0, true); interest->setHint(i18n("Interest")); m_editWidgets["interest-account"] = interest; - connect(interest, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateInterestCategory(const QString&))); - connect(interest, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(interest, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateInterestVisibility(const QString&))); - connect(interest, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateInterestCategory(const QString&, QString&))); - connect(interest, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); - connect(interest->splitButton(), SIGNAL(clicked()), this, SLOT(slotEditInterestSplits())); + connect(interest, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateInterestCategory(const TQString&))); + connect(interest, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(interest, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateInterestVisibility(const TQString&))); + connect(interest, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateInterestCategory(const TQString&, TQString&))); + connect(interest, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); + connect(interest->splitButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditInterestSplits())); KTextEdit* memo = new KTextEdit; memo->setTabChangesFocus(true); @@ -242,76 +242,76 @@ void InvestTransactionEditor::createEditWidgets(void) value->setHint(i18n("Shares")); value->setResetButtonVisible(false); m_editWidgets["shares"] = value; - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateTotalAmount())); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateTotalAmount())); value = new kMyMoneyEdit; value->setHint(i18n("Price")); value->setResetButtonVisible(false); value->setPrecision(KMyMoneyGlobalSettings::pricePrecision()); m_editWidgets["price"] = value; - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateTotalAmount())); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateTotalAmount())); value = new kMyMoneyEdit; // TODO once we have the selected transactions as array of Transaction // we can allow multiple splits for fee and interest value->setResetButtonVisible(false); m_editWidgets["fee-amount"] = value; - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateTotalAmount())); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateTotalAmount())); value = new kMyMoneyEdit; // TODO once we have the selected transactions as array of Transaction // we can allow multiple splits for fee and interest value->setResetButtonVisible(false); m_editWidgets["interest-amount"] = value; - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateTotalAmount())); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateTotalAmount())); KMyMoneyReconcileCombo* reconcile = new KMyMoneyReconcileCombo; m_editWidgets["status"] = reconcile; - connect(reconcile, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateButtonState())); + connect(reconcile, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); - KMyMoneyRegister::QWidgetContainer::iterator it_w; + KMyMoneyRegister::TQWidgetContainer::iterator it_w; for(it_w = m_editWidgets.begin(); it_w != m_editWidgets.end(); ++it_w) { (*it_w)->installEventFilter(this); } - QLabel* label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::AlignRight | Qt::DontClip); + TQLabel* label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::AlignRight | TQt::DontClip); m_editWidgets["total"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["total-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["asset-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["fee-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["fee-amount-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["interest-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["interest-amount-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["price-label"] = label; - label = new QLabel("", 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel("", 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["shares-label"] = label; // if we don't have more than 1 selected transaction, we don't need @@ -323,17 +323,17 @@ void InvestTransactionEditor::createEditWidgets(void) int InvestTransactionEditor::slotEditFeeSplits(void) { - return editSplits("fee-account", "fee-amount", m_feeSplits, false, SLOT(slotEditFeeSplits())); + return editSplits("fee-account", "fee-amount", m_feeSplits, false, TQT_SLOT(slotEditFeeSplits())); } int InvestTransactionEditor::slotEditInterestSplits(void) { - return editSplits("interest-account", "interest-amount", m_interestSplits, true, SLOT(slotEditInterestSplits())); + return editSplits("interest-account", "interest-amount", m_interestSplits, true, TQT_SLOT(slotEditInterestSplits())); } -int InvestTransactionEditor::editSplits(const QString& categoryWidgetName, const QString& amountWidgetName, QValueList<MyMoneySplit>& splits, bool isIncome, const char* slotEditSplits) +int InvestTransactionEditor::editSplits(const TQString& categoryWidgetName, const TQString& amountWidgetName, TQValueList<MyMoneySplit>& splits, bool isIncome, const char* slotEditSplits) { - int rc = QDialog::Rejected; + int rc = TQDialog::Rejected; if(!m_openEditSplits) { // only get in here in a single instance @@ -341,7 +341,7 @@ int InvestTransactionEditor::editSplits(const QString& categoryWidgetName, const // force focus change to update all data KMyMoneyCategory* category = dynamic_cast<KMyMoneyCategory*>(m_editWidgets[categoryWidgetName]); - QWidget* w = category->splitButton(); + TQWidget* w = category->splitButton(); if(w) w->setFocus(); @@ -377,13 +377,13 @@ int InvestTransactionEditor::editSplits(const QString& categoryWidgetName, const 0, m_priceInfo, m_regForm); - // connect(dlg, SIGNAL(newCategory(MyMoneyAccount&)), this, SIGNAL(newCategory(MyMoneyAccount&))); + // connect(dlg, TQT_SIGNAL(newCategory(MyMoneyAccount&)), this, TQT_SIGNAL(newCategory(MyMoneyAccount&))); - if((rc = dlg->exec()) == QDialog::Accepted) { + if((rc = dlg->exec()) == TQDialog::Accepted) { transaction = dlg->transaction(); // collect splits out of the transaction splits.clear(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; MyMoneyMoney fees; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { if((*it_s).accountId() == d->m_phonyAccount.id()) @@ -394,7 +394,7 @@ int InvestTransactionEditor::editSplits(const QString& categoryWidgetName, const if(isIncome) fees = -fees; - QString categoryId; + TQString categoryId; setupCategoryWidget(category, splits, categoryId, slotEditSplits); amount->setValue(fees); slotUpdateTotalAmount(); @@ -413,7 +413,7 @@ int InvestTransactionEditor::editSplits(const QString& categoryWidgetName, const return rc; } -bool InvestTransactionEditor::createPseudoTransaction(MyMoneyTransaction& t, const QValueList<MyMoneySplit>& splits) +bool InvestTransactionEditor::createPseudoTransaction(MyMoneyTransaction& t, const TQValueList<MyMoneySplit>& splits) { t.removeSplits(); @@ -424,7 +424,7 @@ bool InvestTransactionEditor::createPseudoTransaction(MyMoneyTransaction& t, con t.addSplit(split); d->m_phonySplit = split; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { split = *it_s; split.clearId(); @@ -433,10 +433,10 @@ bool InvestTransactionEditor::createPseudoTransaction(MyMoneyTransaction& t, con return true; } -void InvestTransactionEditor::slotCreateSecurity(const QString& name, QString& id) +void InvestTransactionEditor::slotCreateSecurity(const TQString& name, TQString& id) { MyMoneyAccount acc; - QRegExp exp("([^:]+)"); + TQRegExp exp("([^:]+)"); if(exp.search(name) != -1) { acc.setName(exp.cap(1)); @@ -451,7 +451,7 @@ void InvestTransactionEditor::slotCreateSecurity(const QString& name, QString& i } } -void InvestTransactionEditor::slotCreateFeeCategory(const QString& name, QString& id) +void InvestTransactionEditor::slotCreateFeeCategory(const TQString& name, TQString& id) { MyMoneyAccount acc; acc.setName(name); @@ -462,28 +462,28 @@ void InvestTransactionEditor::slotCreateFeeCategory(const QString& name, QString id = acc.id(); } -void InvestTransactionEditor::slotUpdateFeeCategory(const QString& id) +void InvestTransactionEditor::slotUpdateFeeCategory(const TQString& id) { haveWidget("fee-amount")->setDisabled(id.isEmpty()); } -void InvestTransactionEditor::slotUpdateFeeVisibility(const QString& txt) +void InvestTransactionEditor::slotUpdateFeeVisibility(const TQString& txt) { haveWidget("fee-amount")->setHidden(txt.isEmpty()); - QWidget* w = haveWidget("fee-amount-label"); + TQWidget* w = haveWidget("fee-amount-label"); if(w) w->setShown(haveWidget("fee-amount")->isVisible()); } -void InvestTransactionEditor::slotUpdateInterestCategory(const QString& id) +void InvestTransactionEditor::slotUpdateInterestCategory(const TQString& id) { haveWidget("interest-amount")->setDisabled(id.isEmpty()); } -void InvestTransactionEditor::slotUpdateInterestVisibility(const QString& txt) +void InvestTransactionEditor::slotUpdateInterestVisibility(const TQString& txt) { KMyMoneyCategory* interest = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - QWidget* w = haveWidget("interest-amount-label"); + TQWidget* w = haveWidget("interest-amount-label"); if(dynamic_cast<Reinvest*>(d->m_activity)) { interest->splitButton()->hide(); @@ -501,7 +501,7 @@ void InvestTransactionEditor::slotUpdateInterestVisibility(const QString& txt) w->setShown(haveWidget("interest-amount")->isVisible()); } -void InvestTransactionEditor::slotCreateInterestCategory(const QString& name, QString& id) +void InvestTransactionEditor::slotCreateInterestCategory(const TQString& name, TQString& id) { MyMoneyAccount acc; acc.setName(name); @@ -519,19 +519,19 @@ void InvestTransactionEditor::slotReloadEditWidgets(void) KMyMoneySecurity* security = dynamic_cast<KMyMoneySecurity*>(haveWidget("security")); AccountSet aSet; - QString id; + TQString id; // interest-account aSet.clear(); aSet.addAccountGroup(MyMoneyAccount::Income); aSet.load(interest->selector()); - setupCategoryWidget(interest, m_interestSplits, id, SLOT(slotEditInterestSplits())); + setupCategoryWidget(interest, m_interestSplits, id, TQT_SLOT(slotEditInterestSplits())); // fee-account aSet.clear(); aSet.addAccountGroup(MyMoneyAccount::Expense); aSet.load(fees->selector()); - setupCategoryWidget(fees, m_feeSplits, id, SLOT(slotEditFeeSplits())); + setupCategoryWidget(fees, m_feeSplits, id, TQT_SLOT(slotEditFeeSplits())); // security aSet.clear(); @@ -540,7 +540,7 @@ void InvestTransactionEditor::slotReloadEditWidgets(void) void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action */) { - QString id; + TQString id; kMyMoneyDateInput* postDate = dynamic_cast<kMyMoneyDateInput*>(haveWidget("postdate")); KMyMoneyReconcileCombo* reconcile = dynamic_cast<KMyMoneyReconcileCombo*>(haveWidget("status")); @@ -554,7 +554,7 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action // check if the current transaction has a reference to an equity account bool haveEquityAccount = false; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_transaction.splits().begin(); !haveEquityAccount && it_s != m_transaction.splits().end(); ++it_s) { MyMoneyAccount acc = MyMoneyFile::instance()->account((*it_s).accountId()); if(acc.accountType() == MyMoneyAccount::Equity) @@ -586,7 +586,7 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action else if(m_lastPostDate.isValid()) postDate->setDate(m_lastPostDate); else - postDate->setDate(QDate::currentDate()); + postDate->setDate(TQDate::tqcurrentDate()); // security (but only if it's not the investment account) if(m_split.accountId() != m_account.id()) { @@ -605,14 +605,14 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action aSet.clear(); aSet.addAccountGroup(MyMoneyAccount::Income); aSet.load(interest->selector()); - setupCategoryWidget(interest, m_interestSplits, id, SLOT(slotEditInterestSplits())); + setupCategoryWidget(interest, m_interestSplits, id, TQT_SLOT(slotEditInterestSplits())); slotUpdateInterestVisibility(interest->currentText()); // fee-account aSet.clear(); aSet.addAccountGroup(MyMoneyAccount::Expense); aSet.load(fees->selector()); - setupCategoryWidget(fees, m_feeSplits, id, SLOT(slotEditFeeSplits())); + setupCategoryWidget(fees, m_feeSplits, id, TQT_SLOT(slotEditFeeSplits())); slotUpdateFeeVisibility(fees->currentText()); // memo @@ -650,9 +650,9 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action reconcile->setState(m_split.reconcileFlag()); } else { - postDate->loadDate(QDate()); + postDate->loadDate(TQDate()); reconcile->setState(MyMoneySplit::Unknown); - memo->setText(QString()); + memo->setText(TQString()); // We don't allow to change the activity activity->setActivity(d->m_activity->type()); @@ -662,16 +662,16 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action // scan the list of selected transactions and check that they have // the same activity. KMyMoneyRegister::SelectedTransactions::iterator it_t = m_transactions.begin(); - const QString& action = m_item->split().action(); + const TQString& action = m_item->split().action(); bool isNegative = m_item->split().shares().isNegative(); bool allSameActivity = true; for(it_t = m_transactions.begin(); allSameActivity && (it_t != m_transactions.end()); ++it_t) { allSameActivity = (action == (*it_t).split().action() && (*it_t).split().shares().isNegative() == isNegative); } - QStringList fields; + TQStringList fields; fields << "shares" << "price" << "fee-amount" << "interest-amount"; - QStringList::const_iterator it_f; + TQStringList::const_iterator it_f; for(it_f = fields.begin(); it_f != fields.end(); ++it_f) { value = dynamic_cast<kMyMoneyEdit*>(haveWidget((*it_f))); value->setText(""); @@ -681,7 +681,7 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action // if we have transactions with different activities, disable some more widgets if(!allSameActivity) { fields << "asset-account" << "fee-account" << "interest-account"; - QStringList::const_iterator it_f; + TQStringList::const_iterator it_f; for(it_f = fields.begin(); it_f != fields.end(); ++it_f) { haveWidget(*it_f)->setDisabled(true); } @@ -689,21 +689,21 @@ void InvestTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action /* action } } -QWidget* InvestTransactionEditor::firstWidget(void) const +TQWidget* InvestTransactionEditor::firstWidget(void) const { return 0; // let the creator use the first widget in the tab order } -bool InvestTransactionEditor::isComplete(QString& reason) const +bool InvestTransactionEditor::isComplete(TQString& reason) const { - reason = QString(); - // reason.clear(); // for Qt4 + reason = TQString(); + // reason.clear(); // for TQt4 return d->m_activity->isComplete(reason); } -MyMoneyMoney InvestTransactionEditor::subtotal(const QValueList<MyMoneySplit>& splits) const +MyMoneyMoney InvestTransactionEditor::subtotal(const TQValueList<MyMoneySplit>& splits) const { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; MyMoneyMoney sum; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { @@ -713,7 +713,7 @@ MyMoneyMoney InvestTransactionEditor::subtotal(const QValueList<MyMoneySplit>& s return sum; } -void InvestTransactionEditor::slotUpdateSecurity(const QString& stockId) +void InvestTransactionEditor::slotUpdateSecurity(const TQString& stockId) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount stock = file->account(stockId); @@ -785,7 +785,7 @@ void InvestTransactionEditor::totalAmount(MyMoneyMoney& amount) const void InvestTransactionEditor::slotUpdateTotalAmount(void) { - QLabel* total = dynamic_cast<QLabel*>(haveWidget("total")); + TQLabel* total = dynamic_cast<TQLabel*>(haveWidget("total")); if(total && total->isVisible()) { MyMoneyMoney amount; @@ -801,19 +801,19 @@ void InvestTransactionEditor::slotUpdateActivity(MyMoneySplit::investTransaction KMyMoneyCategory* cat; - // hide all dynamic widgets (make sure to use the parentWidget for the + // hide all dynamic widgets (make sure to use the tqparentWidget for the // category widgets) - haveWidget("interest-account")->parentWidget()->hide(); - haveWidget("fee-account")->parentWidget()->hide(); + haveWidget("interest-account")->tqparentWidget()->hide(); + haveWidget("fee-account")->tqparentWidget()->hide(); - QStringList dynwidgets; + TQStringList dynwidgets; dynwidgets << "total-label" << "asset-label" << "fee-label" << "fee-amount-label" << "interest-label" << "interest-amount-label" << "price-label" << "shares-label"; // hiding labels works by clearing them. hide() does not do the job - // as the underlying text in the QTable object will shine through - QStringList::const_iterator it_s; + // as the underlying text in the TQTable object will shine through + TQStringList::const_iterator it_s; for(it_s = dynwidgets.begin(); it_s != dynwidgets.end(); ++it_s) { - QLabel* w = dynamic_cast<QLabel*>(haveWidget(*it_s)); + TQLabel* w = dynamic_cast<TQLabel*>(haveWidget(*it_s)); if(w) w->setText(" "); } @@ -823,7 +823,7 @@ void InvestTransactionEditor::slotUpdateActivity(MyMoneySplit::investTransaction dynwidgets << "asset-account" << "interest-amount" << "fee-amount" << "shares" << "price" << "total"; for(it_s = dynwidgets.begin(); it_s != dynwidgets.end(); ++it_s) { - QWidget* w = haveWidget(*it_s); + TQWidget* w = haveWidget(*it_s); if(w) w->hide(); } @@ -833,11 +833,11 @@ void InvestTransactionEditor::slotUpdateActivity(MyMoneySplit::investTransaction d->m_activity->preloadAssetAccount(); cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("interest-account")); - if(cat->parentWidget()->isVisible()) + if(cat->tqparentWidget()->isVisible()) slotUpdateInterestVisibility(cat->currentText()); cat = dynamic_cast<KMyMoneyCategory*>(haveWidget("fee-account")); - if(cat->parentWidget()->isVisible()) + if(cat->tqparentWidget()->isVisible()) slotUpdateFeeVisibility(cat->currentText()); } @@ -845,7 +845,7 @@ InvestTransactionEditor::priceModeE InvestTransactionEditor::priceMode(void) con { priceModeE mode = static_cast<priceModeE>(0); KMyMoneySecurity* sec = dynamic_cast<KMyMoneySecurity*>(m_editWidgets["security"]); - QString accId; + TQString accId; if(!sec->currentText().isEmpty()) { accId = sec->selectedItem(); if(accId.isEmpty()) @@ -854,7 +854,7 @@ InvestTransactionEditor::priceModeE InvestTransactionEditor::priceMode(void) con while(!accId.isEmpty() && mode == 0) { MyMoneyAccount acc = MyMoneyFile::instance()->account(accId); if(acc.value("priceMode").isEmpty()) - accId = acc.parentAccountId(); + accId = acc.tqparentAccountId(); else mode = static_cast<priceModeE>(acc.value("priceMode").toInt()); } @@ -873,9 +873,9 @@ bool InvestTransactionEditor::setupPrice(const MyMoneyTransaction& t, MyMoneySpl int fract = acc.fraction(); if(acc.currencyId() != t.commodity()) { - QMap<QString, MyMoneyMoney>::Iterator it_p; - QString key = t.commodity() + "-" + acc.currencyId(); - it_p = m_priceInfo.find(key); + TQMap<TQString, MyMoneyMoney>::Iterator it_p; + TQString key = t.commodity() + "-" + acc.currencyId(); + it_p = m_priceInfo.tqfind(key); // if it's not found, then collect it from the user first MyMoneyMoney price; @@ -895,7 +895,7 @@ bool InvestTransactionEditor::setupPrice(const MyMoneyTransaction& t, MyMoneySpl fract, m_regForm, "currencyCalculator"); - if(calc.exec() == QDialog::Rejected) { + if(calc.exec() == TQDialog::Rejected) { return false; } price = calc.price(); @@ -924,11 +924,11 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM KMyMoneySecurity* sec = dynamic_cast<KMyMoneySecurity*>(m_editWidgets["security"]); if(!isMultiSelection() || (isMultiSelection() && !sec->currentText().isEmpty())) { - QString securityId = sec->selectedItem(); + TQString securityId = sec->selectedItem(); if(!securityId.isEmpty()) { s0.setAccountId(securityId); MyMoneyAccount stockAccount = file->account(securityId); - QString currencyId = stockAccount.currencyId(); + TQString currencyId = stockAccount.currencyId(); MyMoneySecurity security = file->security(currencyId); t.setCommodity(security.tradingCurrency()); @@ -940,7 +940,7 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM // extract price info from original transaction m_priceInfo.clear(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; if(!torig.id().isEmpty()) { for(it_s = torig.splits().begin(); it_s != torig.splits().end(); ++it_s) { if((*it_s).id() != sorig.id()) { @@ -973,8 +973,8 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM } MyMoneySplit assetAccountSplit; - QValueList<MyMoneySplit> feeSplits; - QValueList<MyMoneySplit> interestSplits; + TQValueList<MyMoneySplit> feeSplits; + TQValueList<MyMoneySplit> interestSplits; MyMoneySecurity security, currency; MyMoneySplit::investTransactionTypeE transactionType; @@ -1014,7 +1014,7 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM s0.setReconcileFlag(status->state()); if(s0.reconcileFlag() == MyMoneySplit::Reconciled && !s0.reconcileDate().isValid()) - s0.setReconcileDate(QDate::currentDate()); + s0.setReconcileDate(TQDate::tqcurrentDate()); // call the creation logic for the current selected activity bool rc = d->m_activity->createTransaction(t, s0, assetAccountSplit, feeSplits, m_feeSplits, interestSplits, m_interestSplits, security, currency); @@ -1032,7 +1032,7 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM t.addSplit(s0); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = feeSplits.begin(); it_s != feeSplits.end(); ++it_s) { (*it_s).clearId(); t.addSplit(*it_s); @@ -1057,7 +1057,7 @@ bool InvestTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyM void InvestTransactionEditor::updatePriceMode(const MyMoneySplit& split) { - QLabel* label = dynamic_cast<QLabel*>(haveWidget("price-label")); + TQLabel* label = dynamic_cast<TQLabel*>(haveWidget("price-label")); if(label) { kMyMoneyEdit* sharesEdit = dynamic_cast<kMyMoneyEdit*>(haveWidget("shares")); kMyMoneyEdit* priceEdit = dynamic_cast<kMyMoneyEdit*>(haveWidget("price")); diff --git a/kmymoney2/dialogs/investtransactioneditor.h b/kmymoney2/dialogs/investtransactioneditor.h index 4d56697..c943dc3 100644 --- a/kmymoney2/dialogs/investtransactioneditor.h +++ b/kmymoney2/dialogs/investtransactioneditor.h @@ -35,6 +35,7 @@ class InvestTransactionEditor : public TransactionEditor friend class InvestTransactionEditorPrivate; Q_OBJECT + TQ_OBJECT public: typedef enum { PricePerShare = 1, @@ -42,7 +43,7 @@ public: } priceModeE; InvestTransactionEditor(); - InvestTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::InvestTransaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate); + InvestTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::InvestTransaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate); virtual ~InvestTransactionEditor(); /** @@ -60,15 +61,15 @@ public: * * @sa transactionDataSufficient() */ - virtual bool isComplete(QString& reason) const; + virtual bool isComplete(TQString& reason) const; - virtual QWidget* firstWidget(void) const; + virtual TQWidget* firstWidget(void) const; virtual bool fixTransactionCommodity(const MyMoneyAccount& /* account */) { return true; } void totalAmount(MyMoneyMoney& amount) const; - static void dissectTransaction(const MyMoneyTransaction& transaction, const MyMoneySplit& split, MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& feeSplits, QValueList<MyMoneySplit>& interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency, MyMoneySplit::investTransactionTypeE& transactionType); + static void dissectTransaction(const MyMoneyTransaction& transaction, const MyMoneySplit& split, MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& feeSplits, TQValueList<MyMoneySplit>& interestSplits, MyMoneySecurity& security, MyMoneySecurity& currency, MyMoneySplit::investTransactionTypeE& transactionType); bool setupPrice(const MyMoneyTransaction& t, MyMoneySplit& split); @@ -98,20 +99,20 @@ public: const MyMoneySecurity& security(void) const { return m_security; } protected slots: - void slotCreateSecurity(const QString& name, QString& id); - void slotCreateFeeCategory(const QString& name, QString& id); - void slotCreateInterestCategory(const QString& name, QString& id); + void slotCreateSecurity(const TQString& name, TQString& id); + void slotCreateFeeCategory(const TQString& name, TQString& id); + void slotCreateInterestCategory(const TQString& name, TQString& id); int slotEditInterestSplits(void); int slotEditFeeSplits(void); void slotReloadEditWidgets(void); void slotUpdateActivity(MyMoneySplit::investTransactionTypeE); - void slotUpdateSecurity(const QString& stockId); - void slotUpdateInterestCategory(const QString& id); - void slotUpdateInterestVisibility(const QString&); - void slotUpdateFeeCategory(const QString& id); - void slotUpdateFeeVisibility(const QString&); + void slotUpdateSecurity(const TQString& stockId); + void slotUpdateInterestCategory(const TQString& id); + void slotUpdateInterestVisibility(const TQString&); + void slotUpdateFeeCategory(const TQString& id); + void slotUpdateFeeVisibility(const TQString&); void slotUpdateTotalAmount(void); protected: @@ -132,13 +133,13 @@ protected: void activityFactory(MyMoneySplit::investTransactionTypeE type); - MyMoneyMoney subtotal(const QValueList<MyMoneySplit>& splits) const; + MyMoneyMoney subtotal(const TQValueList<MyMoneySplit>& splits) const; /** * This method creates a transaction to be used for the split fee/interest editor. * It has a reference to a phony account and the splits contained in @a splits . */ - bool createPseudoTransaction(MyMoneyTransaction& t, const QValueList<MyMoneySplit>& splits); + bool createPseudoTransaction(MyMoneyTransaction& t, const TQValueList<MyMoneySplit>& splits); /** * Convenience method used by slotEditInterestSplits() and slotEditFeeSplits(). @@ -151,7 +152,7 @@ protected: * category widget named @p categoryWidgetName in case of multiple splits * in @p splits . */ - int editSplits(const QString& categoryWidgetName, const QString& amountWidgetName, QValueList<MyMoneySplit>& splits, bool isIncome, const char* slotEditSplits); + int editSplits(const TQString& categoryWidgetName, const TQString& amountWidgetName, TQValueList<MyMoneySplit>& splits, bool isIncome, const char* slotEditSplits); void updatePriceMode(const MyMoneySplit& split = MyMoneySplit()); @@ -159,8 +160,8 @@ protected: private: MyMoneySplit m_assetAccountSplit; - QValueList<MyMoneySplit> m_interestSplits; - QValueList<MyMoneySplit> m_feeSplits; + TQValueList<MyMoneySplit> m_interestSplits; + TQValueList<MyMoneySplit> m_feeSplits; MyMoneySecurity m_security; MyMoneySecurity m_currency; MyMoneySplit::investTransactionTypeE m_transactionType; diff --git a/kmymoney2/dialogs/kaccountselectdlg.cpp b/kmymoney2/dialogs/kaccountselectdlg.cpp index 0b172f0..48cef18 100644 --- a/kmymoney2/dialogs/kaccountselectdlg.cpp +++ b/kmymoney2/dialogs/kaccountselectdlg.cpp @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,8 +48,8 @@ #include <../kmymoney2.h> -KAccountSelectDlg::KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE accountType, const QString& purpose, QWidget *parent, const char *name ) - : KAccountSelectDlgDecl(parent, name), +KAccountSelectDlg::KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE accountType, const TQString& purpose, TQWidget *tqparent, const char *name ) + : KAccountSelectDlgDecl(tqparent, name), m_purpose(purpose), m_accountType(accountType), m_aborted(false) @@ -62,31 +62,31 @@ KAccountSelectDlg::KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE accountT KIconLoader* il = KGlobal::iconLoader(); KGuiItem skipButtonItem( i18n( "&Skip" ), - QIconSet(il->loadIcon("redo", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("redo", KIcon::Small, KIcon::SizeSmall)), i18n("Skip this transaction"), i18n("Use this to skip importing this transaction and proceed with the next one.")); m_qbuttonCancel->setGuiItem(skipButtonItem); KGuiItem createButtenItem( i18n( "&Create..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new account/category"), i18n("Use this to add a new account/category to the file")); m_createButton->setGuiItem(createButtenItem); m_qbuttonOk->setGuiItem(KStdGuiItem::ok()); KGuiItem abortButtenItem( i18n("&Abort" ), - QIconSet(il->loadIcon("stop", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("stop", KIcon::Small, KIcon::SizeSmall)), i18n("Abort the import operation and dismiss all changes"), - i18n("Use this to abort the import. Your financial data will be in the state before you started the QIF import.")); + i18n("Use this to abort the import. Your financial data will be in the state before you started the TQIF import.")); m_kButtonAbort->setGuiItem(abortButtenItem); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadWidget())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadWidget())); - connect(m_createButton, SIGNAL(clicked()), this, SLOT(slotCreateAccount())); - connect(m_qbuttonOk, SIGNAL(clicked()), this, SLOT(accept())); - connect(m_qbuttonCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_kButtonAbort, SIGNAL(clicked()), this, SLOT(abort())); + connect(m_createButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateAccount())); + connect(m_qbuttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(m_qbuttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_kButtonAbort, TQT_SIGNAL(clicked()), this, TQT_SLOT(abort())); } KAccountSelectDlg::~KAccountSelectDlg() @@ -110,17 +110,17 @@ void KAccountSelectDlg::slotReloadWidget(void) set.load(m_accountSelector->selector()); } -void KAccountSelectDlg::setDescription(const QString& msg) +void KAccountSelectDlg::setDescription(const TQString& msg) { m_descLabel->setText(msg); } -void KAccountSelectDlg::setHeader(const QString& msg) +void KAccountSelectDlg::setHeader(const TQString& msg) { m_headerLabel->setText(msg); } -void KAccountSelectDlg::setAccount(const MyMoneyAccount& account, const QString& id) +void KAccountSelectDlg::setAccount(const MyMoneyAccount& account, const TQString& id) { m_account = account; m_accountSelector->setSelectedItem(id); @@ -184,7 +184,7 @@ int KAccountSelectDlg::exec(void) return rc; } -const QString& KAccountSelectDlg::selectedAccount(void) const +const TQString& KAccountSelectDlg::selectedAccount(void) const { return m_accountSelector->selectedItem(); } diff --git a/kmymoney2/dialogs/kaccountselectdlg.h b/kmymoney2/dialogs/kaccountselectdlg.h index 271cd0f..180587e 100644 --- a/kmymoney2/dialogs/kaccountselectdlg.h +++ b/kmymoney2/dialogs/kaccountselectdlg.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,8 +47,9 @@ class KAccountSelectDlg : public KAccountSelectDlgDecl { Q_OBJECT + TQ_OBJECT public: - KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE type, const QString& purpose = "General", QWidget *parent=0, const char *name=0); + KAccountSelectDlg(const KMyMoneyUtils::categoryTypeE type, const TQString& purpose = "General", TQWidget *tqparent=0, const char *name=0); ~KAccountSelectDlg(); /** @@ -56,9 +57,9 @@ public: * selection dialog box. The @p msg should contain a descriptive * text about the purpose of the dialog and it's options. * - * @param msg const reference to QString object containing the text. + * @param msg const reference to TQString object containing the text. */ - void setDescription(const QString& msg); + void setDescription(const TQString& msg); /** * This method is used to setup the buddy text of the account @@ -66,9 +67,9 @@ public: * which is placed above the selection box with the account * names. * - * @param msg const reference to QString object containing the text. + * @param msg const reference to TQString object containing the text. */ - void setHeader(const QString& msg); + void setHeader(const TQString& msg); /** * This method is used to pass information to the account selection @@ -78,14 +79,14 @@ public: * @param account MyMoneyAccount filled with the relevant and available information * @param id account id to be used. */ - void setAccount(const MyMoneyAccount& account, const QString& id); + void setAccount(const MyMoneyAccount& account, const TQString& id); /** * This method returns the name of the selected account in the combo box. * - * @return QString containing the id of the selected account + * @return TQString containing the id of the selected account */ - const QString& selectedAccount(void) const; + const TQString& selectedAccount(void) const; /** * This method is used to set the mode of the dialog. Two modes @@ -117,7 +118,7 @@ public: public slots: /** - * Reimplemented from QDialog + * Reimplemented from TQDialog */ int exec(); @@ -145,7 +146,7 @@ protected slots: void slotReloadWidget(void); private: - QString m_purpose; + TQString m_purpose; MyMoneyAccount m_account; int m_mode; // 0 - select or create, 1 - create only KMyMoneyUtils::categoryTypeE m_accountType; diff --git a/kmymoney2/dialogs/kaccountselectdlgdecl.ui b/kmymoney2/dialogs/kaccountselectdlgdecl.ui index 1908339..09b8afb 100644 --- a/kmymoney2/dialogs/kaccountselectdlgdecl.ui +++ b/kmymoney2/dialogs/kaccountselectdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountSelectDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KAccountSelectDlgDecl</cstring> </property> @@ -28,15 +28,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_qifEntry</cstring> </property> @@ -56,17 +56,17 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <grid> <property name="name"> @@ -95,7 +95,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>20</height> @@ -107,7 +107,7 @@ <cstring>m_descLabel</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_headerLabel</cstring> </property> @@ -127,7 +127,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -152,9 +152,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -184,7 +184,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>160</width> <height>0</height> @@ -211,5 +211,8 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kbackupdlg.cpp b/kmymoney2/dialogs/kbackupdlg.cpp index d98aeaf..d975e46 100644 --- a/kmymoney2/dialogs/kbackupdlg.cpp +++ b/kmymoney2/dialogs/kbackupdlg.cpp @@ -20,21 +20,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif #include <kconfig.h> #include <kdirselectdialog.h> @@ -48,8 +44,8 @@ #include "kbackupdlg.h" -KBackupDlg::KBackupDlg( QWidget* parent, const char* name/*, bool modal*/) - : kbackupdlgdecl( parent, name , true) +KBackupDlg::KBackupDlg( TQWidget* tqparent, const char* name/*, bool modal*/) + : kbackupdlgdecl( tqparent, name , true) { readConfig(); @@ -59,14 +55,14 @@ KBackupDlg::KBackupDlg( QWidget* parent, const char* name/*, bool modal*/) btnCancel->setGuiItem(KStdGuiItem::cancel()); KGuiItem chooseButtenItem( i18n("C&hoose..."), - QIconSet(il->loadIcon("folder", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("folder", KIcon::Small, KIcon::SizeSmall)), i18n("Select mount point"), i18n("Use this to browse to the mount point.")); chooseButton->setGuiItem(chooseButtenItem); - connect(chooseButton, SIGNAL(clicked()), this, SLOT(chooseButtonClicked())); - connect(btnOK,SIGNAL(clicked()),this,SLOT(accept())); - connect(btnCancel,SIGNAL(clicked()),this,SLOT(reject())); + connect(chooseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseButtonClicked())); + connect(btnOK,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept())); + connect(btnCancel,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); } KBackupDlg::~KBackupDlg() diff --git a/kmymoney2/dialogs/kbackupdlg.h b/kmymoney2/dialogs/kbackupdlg.h index b275606..be2e749 100644 --- a/kmymoney2/dialogs/kbackupdlg.h +++ b/kmymoney2/dialogs/kbackupdlg.h @@ -20,7 +20,7 @@ #ifndef KBACKUPDIALOG_H #define KBACKUPDIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include "../dialogs/kbackupdlgdecl.h" /** @@ -29,6 +29,7 @@ class KBackupDlg : public kbackupdlgdecl { Q_OBJECT + TQ_OBJECT private: void readConfig(void); void writeConfig(void); @@ -37,7 +38,7 @@ protected slots: void chooseButtonClicked(); public: - KBackupDlg( QWidget* parent, const char* name/*, bool modal*/); + KBackupDlg( TQWidget* tqparent, const char* name/*, bool modal*/); ~KBackupDlg(); }; diff --git a/kmymoney2/dialogs/kbackupdlgdecl.ui b/kmymoney2/dialogs/kbackupdlgdecl.ui index ff9795f..ae7cce6 100644 --- a/kmymoney2/dialogs/kbackupdlgdecl.ui +++ b/kmymoney2/dialogs/kbackupdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kbackupdlgdecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kbackupdlgdecl</cstring> </property> @@ -17,7 +17,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout4</cstring> </property> @@ -31,7 +31,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -42,7 +42,7 @@ Please make sure you have a disk inserted and that the drive is ready. Then choo Click OK to perform the backup. If your system does not use an automounter, make sure you mark the checkbox below to "mount this directory before backing up."</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -62,7 +62,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <enum>Horizontal</enum> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -79,7 +79,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout42</cstring> </property> @@ -93,7 +93,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblMountPoint</cstring> </property> @@ -102,7 +102,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <comment>This is the mount point</comment> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>txtMountPoint</cstring> </property> @@ -117,7 +117,7 @@ Click OK to perform the backup. If your system does not use an automounter, make </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>mountCheckBox</cstring> </property> @@ -135,7 +135,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>24</height> @@ -144,7 +144,7 @@ Click OK to perform the backup. If your system does not use an automounter, make </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout44</cstring> </property> @@ -168,7 +168,7 @@ Click OK to perform the backup. If your system does not use an automounter, make <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>455</width> <height>0</height> @@ -206,5 +206,5 @@ Click OK to perform the backup. If your system does not use an automounter, make </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kbalancechartdlg.cpp b/kmymoney2/dialogs/kbalancechartdlg.cpp index 05eccf3..f1fcdda 100644 --- a/kmymoney2/dialogs/kbalancechartdlg.cpp +++ b/kmymoney2/dialogs/kbalancechartdlg.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qframe.h> +#include <tqlayout.h> +#include <tqframe.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -52,22 +52,22 @@ #define KMM_KDCHART_PROPSET_NORMAL_DATA KDCHART_PROPSET_NORMAL_DATA #endif -KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* parent, const char* name) : - KDialog(parent, name) +KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, TQWidget* tqparent, const char* name) : + KDialog(tqparent, name) { #ifdef HAVE_KDCHART - setCaption(i18n("Balance of %1").arg(account.name())); + setCaption(i18n("Balance of %1").tqarg(account.name())); setSizeGripEnabled( TRUE ); setModal( TRUE ); - QVBoxLayout* KBalanceChartDlgLayout = new QVBoxLayout( this, 11, 6, "KBalanceChartDlgLayout"); + TQVBoxLayout* KBalanceChartDlgLayout = new TQVBoxLayout( this, 11, 6, "KBalanceChartDlgLayout"); MyMoneyReport reportCfg = MyMoneyReport( MyMoneyReport::eAssetLiability, MyMoneyReport::eMonths, MyMoneyTransactionFilter::userDefined, // overridden by the setDateFilter() call below MyMoneyReport::eDetailTotal, - i18n("%1 Balance History").arg(account.name()), + i18n("%1 Balance History").tqarg(account.name()), i18n("Generated Report") ); reportCfg.setChartByDefault(true); @@ -76,14 +76,14 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren reportCfg.setChartType(MyMoneyReport::eChartLine); reportCfg.setIncludingSchedules( true ); if(account.accountType() == MyMoneyAccount::Investment) { - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = account.accountList().begin(); it_a != account.accountList().end(); ++it_a) reportCfg.addAccount(*it_a); } else reportCfg.addAccount(account.id()); reportCfg.setColumnsAreDays( true ); reportCfg.setConvertCurrency( false ); - reportCfg.setDateFilter(QDate::currentDate().addDays(-90),QDate::currentDate().addDays(+90)); + reportCfg.setDateFilter(TQDate::tqcurrentDate().addDays(-90),TQDate::tqcurrentDate().addDays(+90)); reports::PivotTable table(reportCfg); @@ -102,7 +102,7 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren int m_idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue); KDChartPropertySet propSetLastValue("last value", m_idPropFutureValue); - propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, Qt::AlignLeft | Qt::AlignBottom); + propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignBottom); propSetLastValue.setExtraLinesWidth(KDChartPropertySet::OwnID, -4); propSetLastValue.setExtraLinesColor(KDChartPropertySet::OwnID, KMyMoneyGlobalSettings::listGridColor()); @@ -110,7 +110,7 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren KDChartPropertySet propSetMinBalance("min balance", m_idPropFutureValue); propSetMinBalance.setLineStyle(KDChartPropertySet::OwnID, Qt::NoPen); - propSetMinBalance.setExtraLinesAlign(KDChartPropertySet::OwnID, Qt::AlignLeft | Qt::AlignRight); + propSetMinBalance.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignRight); int m_idPropMinBalance = chartWidget->params()->registerProperties(propSetMinBalance); KDChartPropertySet propSetMaxCredit("max credit", m_idPropMinBalance); @@ -180,13 +180,13 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren - QFrame* line1 = new QFrame( this, "line1" ); - line1->setFrameShape( QFrame::HLine ); - line1->setFrameShadow( QFrame::Sunken ); - line1->setFrameShape( QFrame::HLine ); + TQFrame* line1 = new TQFrame( this, "line1" ); + line1->setFrameShape( TQFrame::HLine ); + line1->setFrameShadow( TQFrame::Sunken ); + line1->setFrameShape( TQFrame::HLine ); KBalanceChartDlgLayout->addWidget(line1); - QHBoxLayout* Layout1 = new QHBoxLayout( KBalanceChartDlgLayout, 6, "Layout1"); + TQHBoxLayout* Layout1 = new TQHBoxLayout( KBalanceChartDlgLayout, 6, "Layout1"); #if 0 KPushButton* buttonHelp = new KPushButton( this, "buttonHelp" ); buttonHelp->setAutoDefault( TRUE ); @@ -194,8 +194,8 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren Layout1->addWidget( buttonHelp ); #endif - QSpacerItem* Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); - Layout1->addItem( Horizontal_Spacing2 ); + TQSpacerItem*Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); + Layout1->addItem(Horizontal_Spacing2 ); #if 0 KPushButton* buttonOk = new KPushButton( this, "buttonOk" ); @@ -210,10 +210,10 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, QWidget* paren buttonClose->setGuiItem(KStdGuiItem::Close); Layout1->addWidget( buttonClose ); - // connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); - connect( buttonClose, SIGNAL( clicked() ), this, SLOT( accept() ) ); + // connect( buttonOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); + connect( buttonClose, TQT_SIGNAL( clicked() ), this, TQT_SLOT( accept() ) ); - resize( QSize(700, 500).expandedTo(minimumSizeHint()) ); + resize( TQSize(700, 500).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); #endif } diff --git a/kmymoney2/dialogs/kbalancechartdlg.h b/kmymoney2/dialogs/kbalancechartdlg.h index 8fe2502..afb1b1d 100644 --- a/kmymoney2/dialogs/kbalancechartdlg.h +++ b/kmymoney2/dialogs/kbalancechartdlg.h @@ -37,8 +37,9 @@ class MyMoneyAccount; class KBalanceChartDlg : public KDialog { Q_OBJECT + TQ_OBJECT public: - KBalanceChartDlg(const MyMoneyAccount& account, QWidget* parent = 0, const char* name = 0); + KBalanceChartDlg(const MyMoneyAccount& account, TQWidget* tqparent = 0, const char* name = 0); ~KBalanceChartDlg(); }; diff --git a/kmymoney2/dialogs/kbalancewarning.cpp b/kmymoney2/dialogs/kbalancewarning.cpp index 16f3dc0..358210c 100644 --- a/kmymoney2/dialogs/kbalancewarning.cpp +++ b/kmymoney2/dialogs/kbalancewarning.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,12 +36,12 @@ class KBalanceWarning::Private { public: - QString dontShowAgain() const { return "BalanceWarning"; } - QMap<QString, bool> m_deselectedAccounts; + TQString dontShowAgain() const { return "BalanceWarning"; } + TQMap<TQString, bool> m_deselectedAccounts; }; -KBalanceWarning::KBalanceWarning(QObject* parent, const char* name) : - QObject(parent, name), +KBalanceWarning::KBalanceWarning(TQObject* tqparent, const char* name) : + TQObject(tqparent, name), d(new Private) { KMessageBox::enableMessage(d->dontShowAgain()); @@ -52,10 +52,10 @@ KBalanceWarning::~KBalanceWarning() delete d; } -void KBalanceWarning::slotShowMessage(QWidget* parent, const MyMoneyAccount& account, const QString& msg) +void KBalanceWarning::slotShowMessage(TQWidget* tqparent, const MyMoneyAccount& account, const TQString& msg) { - if(d->m_deselectedAccounts.find(account.id()) == d->m_deselectedAccounts.end()) { - KMessageBox::information(parent, msg, QString::null, d->dontShowAgain()); + if(d->m_deselectedAccounts.tqfind(account.id()) == d->m_deselectedAccounts.end()) { + KMessageBox::information(tqparent, msg, TQString(), d->dontShowAgain()); if(!KMessageBox::shouldBeShownContinue(d->dontShowAgain())) { d->m_deselectedAccounts[account.id()] = true; KMessageBox::enableMessage(d->dontShowAgain()); diff --git a/kmymoney2/dialogs/kbalancewarning.h b/kmymoney2/dialogs/kbalancewarning.h index 2e3c4d4..cb9848d 100644 --- a/kmymoney2/dialogs/kbalancewarning.h +++ b/kmymoney2/dialogs/kbalancewarning.h @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -class QString; -class QWidget; +#include <tqobject.h> +class TQString; +class TQWidget; // ---------------------------------------------------------------------------- // KDE Includes @@ -32,15 +32,16 @@ class QWidget; class MyMoneyAccount; -class KBalanceWarning : public QObject +class KBalanceWarning : public TQObject { Q_OBJECT + TQ_OBJECT public: - KBalanceWarning(QObject* parent, const char* name = 0); + KBalanceWarning(TQObject* tqparent, const char* name = 0); virtual ~KBalanceWarning(); public slots: - void slotShowMessage(QWidget* parent, const MyMoneyAccount& account, const QString& msg); + void slotShowMessage(TQWidget* tqparent, const MyMoneyAccount& account, const TQString& msg); private: class Private; diff --git a/kmymoney2/dialogs/kcategoryreassigndlg.cpp b/kmymoney2/dialogs/kcategoryreassigndlg.cpp index f457134..3bead48 100644 --- a/kmymoney2/dialogs/kcategoryreassigndlg.cpp +++ b/kmymoney2/dialogs/kcategoryreassigndlg.cpp @@ -36,12 +36,12 @@ #include <kmymoney/kmymoneyaccountselector.h> #include <kmymoney/kguiutils.h> -KCategoryReassignDlg::KCategoryReassignDlg( QWidget* parent, const char* name) : - KCategoryReassignDlgDecl( parent, name) +KCategoryReassignDlg::KCategoryReassignDlg( TQWidget* tqparent, const char* name) : + KCategoryReassignDlgDecl( tqparent, name) { buttonOk->setGuiItem(KStdGuiItem::ok()); buttonCancel->setGuiItem(KStdGuiItem::cancel()); - kMandatoryFieldGroup* mandatory = new kMandatoryFieldGroup(this); + kMandatoryFieldGroup* mandatory = new kMandatoryFieldGroup(TQT_TQOBJECT(this)); mandatory->add(m_category); mandatory->setOkButton(buttonOk); } @@ -50,10 +50,10 @@ KCategoryReassignDlg::~KCategoryReassignDlg() { } -QString KCategoryReassignDlg::show(const MyMoneyAccount& category) +TQString KCategoryReassignDlg::show(const MyMoneyAccount& category) { if (category.id().isEmpty()) - return QString(); // no payee available? nothing can be selected... + return TQString(); // no payee available? nothing can be selected... AccountSet set; set.addAccountGroup(MyMoneyAccount::Income); @@ -64,8 +64,8 @@ QString KCategoryReassignDlg::show(const MyMoneyAccount& category) m_category->selector()->removeItem(category.id()); // make sure the available categories have the same currency - QStringList list; - QStringList::const_iterator it_a; + TQStringList list; + TQStringList::const_iterator it_a; m_category->selector()->itemList(list); for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); @@ -78,13 +78,13 @@ QString KCategoryReassignDlg::show(const MyMoneyAccount& category) // if there is no category for reassignment left, we bail out if(list.isEmpty()) { - KMessageBox::sorry(this, QString("<qt>")+i18n("At least one transaction/schedule still references the category <b>%1</b>. However, at least one category with the same currency must exist so that the transactions/schedules can be reassigned.").arg(category.name())+QString("</qt>")); - return QString(); + KMessageBox::sorry(this, TQString("<qt>")+i18n("At least one transaction/schedule still references the category <b>%1</b>. However, at least one category with the same currency must exist so that the transactions/schedules can be reassigned.").tqarg(category.name())+TQString("</qt>")); + return TQString(); } // execute dialog and if aborted, return empty string - if (this->exec() == QDialog::Rejected) - return QString(); + if (this->exec() == TQDialog::Rejected) + return TQString(); // otherwise return index of selected payee return m_category->selectedItem(); diff --git a/kmymoney2/dialogs/kcategoryreassigndlg.h b/kmymoney2/dialogs/kcategoryreassigndlg.h index ce756ee..4639bd4 100644 --- a/kmymoney2/dialogs/kcategoryreassigndlg.h +++ b/kmymoney2/dialogs/kcategoryreassigndlg.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluelist.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -39,9 +39,10 @@ class KCategoryReassignDlg : public KCategoryReassignDlgDecl { Q_OBJECT + TQ_OBJECT public: /** Default constructor */ - KCategoryReassignDlg( QWidget* parent = 0, const char* name = 0); + KCategoryReassignDlg( TQWidget* tqparent = 0, const char* name = 0); /** Destructor */ ~KCategoryReassignDlg(); @@ -52,11 +53,11 @@ public: * * @param category reference to MyMoneyAccount object of the category to be deleted * - * @return Returns the id of the selected category in the list or QString() if - * the dialog was aborted. QString() is also returned if the @a category + * @return Returns the id of the selected category in the list or TQString() if + * the dialog was aborted. TQString() is also returned if the @a category * does not have an id. */ - QString show(const MyMoneyAccount& category); + TQString show(const MyMoneyAccount& category); protected: void accept(void); diff --git a/kmymoney2/dialogs/kcategoryreassigndlgdecl.ui b/kmymoney2/dialogs/kcategoryreassigndlgdecl.ui index 5b9a954..be2e661 100644 --- a/kmymoney2/dialogs/kcategoryreassigndlgdecl.ui +++ b/kmymoney2/dialogs/kcategoryreassigndlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCategoryReassignDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KCategoryeReassignDlgDecl</cstring> </property> @@ -25,11 +25,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> @@ -38,7 +38,7 @@ <property name="text"> <string>The transactions, schedules and budgets associated with the selected category need to be re-assigned to a different category before the selected category can be deleted. Please select a category from the list below.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignJustify|AlignTop</set> </property> </widget> @@ -52,14 +52,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -82,7 +82,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -103,9 +103,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -121,7 +121,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>305</width> <height>20</height> @@ -171,5 +171,8 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kchooseimportexportdlg.cpp b/kmymoney2/dialogs/kchooseimportexportdlg.cpp index 0c390a8..1038bf1 100644 --- a/kmymoney2/dialogs/kchooseimportexportdlg.cpp +++ b/kmymoney2/dialogs/kchooseimportexportdlg.cpp @@ -19,17 +19,13 @@ ***************************************************************************/ #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif -#include <qpixmap.h> +#include <tqpixmap.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> #include <kglobal.h> #include <kconfig.h> @@ -37,10 +33,10 @@ #include "kchooseimportexportdlg.h" -KChooseImportExportDlg::KChooseImportExportDlg(int type, QWidget *parent, const char *name ) - : KChooseImportExportDlgDecl(parent,name, true) +KChooseImportExportDlg::KChooseImportExportDlg(int type, TQWidget *tqparent, const char *name ) + : KChooseImportExportDlgDecl(tqparent,name, true) { - QString filename; + TQString filename; if (type==0) { // import topLabel->setText(i18n("Please choose the type of import you wish to perform. A simple explanation\n" @@ -60,11 +56,11 @@ KChooseImportExportDlg::KChooseImportExportDlg(int type, QWidget *parent, const readConfig(); slotTypeActivated(m_lastType); - typeCombo->setCurrentItem(((m_lastType=="QIF") ? 0 : 1)); + typeCombo->setCurrentItem(((m_lastType=="TQIF") ? 0 : 1)); - connect(typeCombo, SIGNAL(activated(const QString&)), this, SLOT(slotTypeActivated(const QString&))); - connect(okButton, SIGNAL(clicked()), this, SLOT(accept())); - connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); + connect(typeCombo, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotTypeActivated(const TQString&))); + connect(okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); } KChooseImportExportDlg::~KChooseImportExportDlg() @@ -72,10 +68,10 @@ KChooseImportExportDlg::~KChooseImportExportDlg() writeConfig(); } -void KChooseImportExportDlg::slotTypeActivated(const QString& text) +void KChooseImportExportDlg::slotTypeActivated(const TQString& text) { - if (text=="QIF") { - descriptionLabel->setText(i18n("QIF files are created by the popular accounting program Quicken.\n" + if (text=="TQIF") { + descriptionLabel->setText(i18n("TQIF files are created by the popular accounting program Quicken.\n" "Another dialog will appear, if you choose this type, asking for further\n" "information relevant to the Quicken format.")); } else { @@ -85,7 +81,7 @@ void KChooseImportExportDlg::slotTypeActivated(const QString& text) } } -QString KChooseImportExportDlg::importExportType(void) +TQString KChooseImportExportDlg::importExportType(void) { return typeCombo->currentText(); } diff --git a/kmymoney2/dialogs/kchooseimportexportdlg.h b/kmymoney2/dialogs/kchooseimportexportdlg.h index ac562f3..c93ba8b 100644 --- a/kmymoney2/dialogs/kchooseimportexportdlg.h +++ b/kmymoney2/dialogs/kchooseimportexportdlg.h @@ -21,7 +21,7 @@ #ifndef KCHOOSEIMPORTEXPORTDLG_H #define KCHOOSEIMPORTEXPORTDLG_H -#include <qwidget.h> +#include <tqwidget.h> #include "../dialogs/kchooseimportexportdlgdecl.h" /** @@ -30,18 +30,19 @@ class KChooseImportExportDlg : public KChooseImportExportDlgDecl { Q_OBJECT + TQ_OBJECT private: void readConfig(void); void writeConfig(void); - QString m_lastType; + TQString m_lastType; protected slots: - void slotTypeActivated(const QString& text); + void slotTypeActivated(const TQString& text); public: - KChooseImportExportDlg(int type, QWidget *parent=0, const char *name=0); + KChooseImportExportDlg(int type, TQWidget *tqparent=0, const char *name=0); ~KChooseImportExportDlg(); - QString importExportType(void); + TQString importExportType(void); }; #endif diff --git a/kmymoney2/dialogs/kchooseimportexportdlgdecl.ui b/kmymoney2/dialogs/kchooseimportexportdlgdecl.ui index 3d12a14..f52cbca 100644 --- a/kmymoney2/dialogs/kchooseimportexportdlgdecl.ui +++ b/kmymoney2/dialogs/kchooseimportexportdlgdecl.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI> <class>KChooseImportExportDlgDecl</class> <widget> - <class>QDialog</class> + <class>TQDialog</class> <property stdset="1"> <name>name</name> <cstring>kChooseImportDlgDecl</cstring> @@ -20,7 +20,7 @@ <number>6</number> </property> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout4</cstring> @@ -35,7 +35,7 @@ <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>topLabel</cstring> @@ -67,7 +67,7 @@ Once you have chosen an import type please press the OK button.</string> </property> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout3</cstring> @@ -95,7 +95,7 @@ Once you have chosen an import type please press the OK button.</string> <enum>Expanding</enum> </property> <property> - <name>sizeHint</name> + <name>tqsizeHint</name> <size> <width>20</width> <height>20</height> @@ -103,7 +103,7 @@ Once you have chosen an import type please press the OK button.</string> </property> </spacer> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>promptLabel</cstring> @@ -114,11 +114,11 @@ Once you have chosen an import type please press the OK button.</string> </property> </widget> <widget> - <class>QComboBox</class> + <class>TQComboBox</class> <item> <property> <name>text</name> - <string>QIF</string> + <string>TQIF</string> </property> </item> <item> @@ -132,7 +132,7 @@ Once you have chosen an import type please press the OK button.</string> <cstring>typeCombo</cstring> </property> <property stdset="1"> - <name>minimumSize</name> + <name>tqminimumSize</name> <size> <width>100</width> <height>0</height> @@ -142,7 +142,7 @@ Once you have chosen an import type please press the OK button.</string> </hbox> </widget> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>descriptionLabel</cstring> @@ -155,7 +155,7 @@ Once you have chosen an import type please press the OK button.</string> </sizepolicy> </property> <property stdset="1"> - <name>minimumSize</name> + <name>tqminimumSize</name> <size> <width>410</width> <height>100</height> @@ -167,7 +167,7 @@ Once you have chosen an import type please press the OK button.</string> </property> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> @@ -195,7 +195,7 @@ Once you have chosen an import type please press the OK button.</string> <enum>Expanding</enum> </property> <property> - <name>sizeHint</name> + <name>tqsizeHint</name> <size> <width>20</width> <height>20</height> @@ -203,7 +203,7 @@ Once you have chosen an import type please press the OK button.</string> </property> </spacer> <widget> - <class>QPushButton</class> + <class>TQPushButton</class> <property stdset="1"> <name>name</name> <cstring>okButton</cstring> @@ -218,7 +218,7 @@ Once you have chosen an import type please press the OK button.</string> </property> </widget> <widget> - <class>QPushButton</class> + <class>TQPushButton</class> <property stdset="1"> <name>name</name> <cstring>cancelButton</cstring> diff --git a/kmymoney2/dialogs/kconfirmmanualenterdlg.cpp b/kmymoney2/dialogs/kconfirmmanualenterdlg.cpp index 3c20a48..8c1678f 100644 --- a/kmymoney2/dialogs/kconfirmmanualenterdlg.cpp +++ b/kmymoney2/dialogs/kconfirmmanualenterdlg.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qradiobutton.h> +#include <tqradiobutton.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,8 +36,8 @@ #include <kmymoney/kmymoneyutils.h> #include "kconfirmmanualenterdlg.h" -KConfirmManualEnterDlg::KConfirmManualEnterDlg(const MyMoneySchedule& schedule, QWidget* parent, const char* name) : - KConfirmManualEnterDlgDecl(parent, name) +KConfirmManualEnterDlg::KConfirmManualEnterDlg(const MyMoneySchedule& schedule, TQWidget* tqparent, const char* name) : + KConfirmManualEnterDlgDecl(tqparent, name) { buttonOk->setGuiItem(KStdGuiItem::ok()); buttonCancel->setGuiItem(KStdGuiItem::cancel()); @@ -53,7 +53,7 @@ KConfirmManualEnterDlg::KConfirmManualEnterDlg(const MyMoneySchedule& schedule, void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, const MyMoneyTransaction& tn) { - QString messageDetail("<qt>"); + TQString messageDetail("<qt>"); MyMoneyFile* file = MyMoneyFile::instance(); int noItemsChanged=0; @@ -75,7 +75,7 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons try { - QString po, pn; + TQString po, pn; if(to.splits()[0].payeeId()) po = file->payee(to.splits()[0].payeeId()).name(); if(tn.splits()[0].payeeId()) @@ -83,7 +83,7 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons if (po != pn) { noItemsChanged++; - messageDetail += i18n("Payee changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").arg(po).arg(pn); + messageDetail += i18n("Payee changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").tqarg(po).tqarg(pn); } #if 0 if ( (m_schedule.type() == MyMoneySchedule::TYPE_TRANSFER || @@ -92,7 +92,7 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons { noItemsChanged++; messageDetail += i18n("Account changed. Old: \"%1\", New: \"%2\"") - .arg(m_schedule.account().name()).arg(m_from->currentText()) + QString("\n"); + .tqarg(m_schedule.account().name()).tqarg(m_from->currentText()) + TQString("\n"); } if ( m_schedule.type() == MyMoneySchedule::TYPE_DEPOSIT && @@ -100,26 +100,26 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons { noItemsChanged++; messageDetail += i18n("Account changed. Old: \"%1\", New: \"%2\"") - .arg(m_schedule.account().name()).arg(m_to->currentText()) + QString("\n"); + .tqarg(m_schedule.account().name()).tqarg(m_to->currentText()) + TQString("\n"); } #endif if(to.splits()[0].accountId() != tn.splits()[0].accountId()) { noItemsChanged++; messageDetail += i18n("Account changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>") - .arg(file->account(to.splits()[0].accountId()).name()) - .arg(file->account(tn.splits()[0].accountId()).name()); + .tqarg(file->account(to.splits()[0].accountId()).name()) + .tqarg(file->account(tn.splits()[0].accountId()).name()); } if(file->isTransfer(to) && file->isTransfer(tn)) { if(to.splits()[1].accountId() != tn.splits()[1].accountId()) { noItemsChanged++; messageDetail += i18n("Transfer account changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>") - .arg(file->account(to.splits()[1].accountId()).name()) - .arg(file->account(tn.splits()[1].accountId()).name()); + .tqarg(file->account(to.splits()[1].accountId()).name()) + .tqarg(file->account(tn.splits()[1].accountId()).name()); } } else { - QString co, cn; + TQString co, cn; switch(to.splitCount()) { default: co = i18n("Split transaction (category replacement)", "Split transaction"); @@ -142,21 +142,21 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons if (co != cn) { noItemsChanged++; - messageDetail += i18n("Category changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").arg(co).arg(cn); + messageDetail += i18n("Category changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").tqarg(co).tqarg(cn); } } - QString mo, mn; + TQString mo, mn; mo = to.splits()[0].memo(); mn = tn.splits()[0].memo(); if(mo.isEmpty()) - mo = QString("<i>")+i18n("empty")+QString("</i>"); + mo = TQString("<i>")+i18n("empty")+TQString("</i>"); if(mn.isEmpty()) - mn = QString("<i>")+i18n("empty")+QString("</i>"); + mn = TQString("<i>")+i18n("empty")+TQString("</i>"); if (mo != mn) { noItemsChanged++; - messageDetail += i18n("Memo changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").arg(mo).arg(mn); + messageDetail += i18n("Memo changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>").tqarg(mo).tqarg(mn); } const MyMoneySecurity& sec = MyMoneyFile::instance()->security(to.commodity()); @@ -166,7 +166,7 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons if (ao != an) { noItemsChanged++; messageDetail += i18n("Amount changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>") - .arg(ao.formatMoney(sec.smallestAccountFraction())).arg(an.formatMoney(sec.smallestAccountFraction())); + .tqarg(ao.formatMoney(sec.smallestAccountFraction())).tqarg(an.formatMoney(sec.smallestAccountFraction())); } MyMoneySplit::reconcileFlagE fo, fn; @@ -175,8 +175,8 @@ void KConfirmManualEnterDlg::loadTransactions(const MyMoneyTransaction& to, cons if(fo != fn) { noItemsChanged++; messageDetail += i18n("Reconciliation flag changed.<br> Old: <b>%1</b>, New: <b>%2</b><p>") - .arg(KMyMoneyUtils::reconcileStateToString(fo, true)) - .arg(KMyMoneyUtils::reconcileStateToString(fn, true)); + .tqarg(KMyMoneyUtils::reconcileStateToString(fo, true)) + .tqarg(KMyMoneyUtils::reconcileStateToString(fn, true)); } } catch (MyMoneyException *e) diff --git a/kmymoney2/dialogs/kconfirmmanualenterdlg.h b/kmymoney2/dialogs/kconfirmmanualenterdlg.h index 43ff65a..95a0b9b 100644 --- a/kmymoney2/dialogs/kconfirmmanualenterdlg.h +++ b/kmymoney2/dialogs/kconfirmmanualenterdlg.h @@ -36,8 +36,9 @@ class KConfirmManualEnterDlg : public KConfirmManualEnterDlgDecl { Q_OBJECT + TQ_OBJECT public: - KConfirmManualEnterDlg(const MyMoneySchedule& schedule, QWidget* parent = 0, const char* name = 0); + KConfirmManualEnterDlg(const MyMoneySchedule& schedule, TQWidget* tqparent = 0, const char* name = 0); typedef enum { UseOriginal = 0, diff --git a/kmymoney2/dialogs/kconfirmmanualenterdlgdecl.ui b/kmymoney2/dialogs/kconfirmmanualenterdlgdecl.ui index f88f0ce..f358370 100644 --- a/kmymoney2/dialogs/kconfirmmanualenterdlgdecl.ui +++ b/kmymoney2/dialogs/kconfirmmanualenterdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KConfirmManualEnterDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KConfirmManualEnterDlgDecl</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_message</cstring> </property> @@ -47,7 +47,7 @@ <bool>true</bool> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -65,7 +65,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_discardRadio</cstring> </property> @@ -73,7 +73,7 @@ <string>Discard the changes and enter the original transaction into the register.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_onceRadio</cstring> </property> @@ -81,7 +81,7 @@ <string>Enter these new values this one time, for this occurence only.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_setRadio</cstring> </property> @@ -91,9 +91,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -109,7 +109,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>180</width> <height>16</height> @@ -156,5 +156,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kcsvprogressdlg.cpp b/kmymoney2/dialogs/kcsvprogressdlg.cpp index d8f85ed..7b923e7 100644 --- a/kmymoney2/dialogs/kcsvprogressdlg.cpp +++ b/kmymoney2/dialogs/kcsvprogressdlg.cpp @@ -19,22 +19,18 @@ ***************************************************************************/ #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif -#include <qpixmap.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qtextstream.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qprogressbar.h> -#include <qlineedit.h> -#include <qgroupbox.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqprogressbar.h> +#include <tqlineedit.h> +#include <tqgroupbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,8 +47,8 @@ #include "../kmymoneyutils.h" /** Simple constructor */ -KCsvProgressDlg::KCsvProgressDlg(int type, MyMoneyAccount *account, QWidget *parent, const char *name ) - : KCsvProgressDlgDecl(parent,name, true) +KCsvProgressDlg::KCsvProgressDlg(int type, MyMoneyAccount *account, TQWidget *tqparent, const char *name ) + : KCsvProgressDlgDecl(tqparent,name, true) { m_nType = type; if (m_nType==0) @@ -70,11 +66,11 @@ KCsvProgressDlg::KCsvProgressDlg(int type, MyMoneyAccount *account, QWidget *par readConfig(); - connect(m_qbuttonBrowse, SIGNAL(clicked()), this, SLOT(slotBrowseClicked())); - connect(m_qbuttonRun, SIGNAL(clicked()), this, SLOT(slotRunClicked())); - connect(m_qlineeditFile, SIGNAL(textChanged(const QString&)), this, - SLOT(slotFileTextChanged(const QString&))); - connect(m_qbuttonOk, SIGNAL(clicked()), this, SLOT(accept())); + connect(m_qbuttonBrowse, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBrowseClicked())); + connect(m_qbuttonRun, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRunClicked())); + connect(m_qlineeditFile, TQT_SIGNAL(textChanged(const TQString&)), this, + TQT_SLOT(slotFileTextChanged(const TQString&))); + connect(m_qbuttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); } /** Simple destructor */ @@ -94,16 +90,16 @@ void KCsvProgressDlg::performExport(void) return; } - QString strFile = m_qlineeditFile->text(); - if(KMyMoneyUtils::appendCorrectFileExt(strFile, QString("csv"))) + TQString strFile = m_qlineeditFile->text(); + if(KMyMoneyUtils::appendCorrectFileExt(strFile, TQString("csv"))) m_qlineeditFile->setText(strFile); - if (m_kmymoneydateEnd->getQDate() < m_kmymoneydateStart->getQDate()) { + if (m_kmymoneydateEnd->getTQDate() < m_kmymoneydateStart->getTQDate()) { KMessageBox::information(this, i18n("Please enter a start date lower than the end date.")); return; } - QFile qfile(m_qlineeditFile->text()); + TQFile qfile(m_qlineeditFile->text()); if (!qfile.open(IO_WriteOnly)) { KMessageBox::error(this, i18n("Unable to open export file for writing.")); return; @@ -111,27 +107,27 @@ void KCsvProgressDlg::performExport(void) qfile.close(); m_qlabelAccount->setText(m_mymoneyaccount->name()); - m_qlabelTransaction->setText(QString("0") + i18n(" of ") + QString::number(m_mymoneyaccount->transactionCount())); + m_qlabelTransaction->setText(TQString("0") + i18n(" of ") + TQString::number(m_mymoneyaccount->transactionCount())); m_qprogressbar->setTotalSteps(m_mymoneyaccount->transactionCount()); // Make sure we have an account to operate on if (m_mymoneyaccount) { // Connect to the provided signals in MyMoneyAccount // These signals will be emitted at appropriate times. - connect(m_mymoneyaccount, SIGNAL(signalProgressCount(int)), m_qprogressbar, SLOT(setTotalSteps(int))); - connect(m_mymoneyaccount, SIGNAL(signalProgress(int)), this, SLOT(slotSetProgress(int))); + connect(m_mymoneyaccount, TQT_SIGNAL(signalProgressCount(int)), m_qprogressbar, TQT_SLOT(setTotalSteps(int))); + connect(m_mymoneyaccount, TQT_SIGNAL(signalProgress(int)), this, TQT_SLOT(slotSetProgress(int))); int nTransCount = 0; // Do the actual write - if (!m_mymoneyaccount->writeCSVFile(m_qlineeditFile->text(), m_kmymoneydateStart->getQDate(), - m_kmymoneydateEnd->getQDate(), nTransCount)) { + if (!m_mymoneyaccount->writeCSVFile(m_qlineeditFile->text(), m_kmymoneydateStart->getTQDate(), + m_kmymoneydateEnd->getTQDate(), nTransCount)) { KMessageBox::error(this, i18n("Error occurred whilst exporting to csv file."), i18n("Export CSV")); } else { - QString qstringPrompt = i18n("Export finished successfully.\n\n"); + TQString qstringPrompt = i18n("Export finished successfully.\n\n"); qstringPrompt += i18n("Number of transactions exported "); - qstringPrompt += QString::number(nTransCount); + qstringPrompt += TQString::number(nTransCount); qstringPrompt += "."; KMessageBox::information(this, qstringPrompt, i18n("Export CSV")); } @@ -150,7 +146,7 @@ void KCsvProgressDlg::performImport(void) return; } - QFile qfile(m_qlineeditFile->text()); + TQFile qfile(m_qlineeditFile->text()); if (!qfile.open(IO_ReadOnly)) { KMessageBox::error(this, i18n("Unable to open import file for reading.")); return; @@ -163,8 +159,8 @@ void KCsvProgressDlg::performImport(void) if (m_mymoneyaccount) { // Connect to the provided signals in MyMoneyAccount // These signals will be emitted at appropriate times. - connect(m_mymoneyaccount, SIGNAL(signalProgressCount(int)), m_qprogressbar, SLOT(setTotalSteps(int))); - connect(m_mymoneyaccount, SIGNAL(signalProgress(int)), this, SLOT(slotSetProgress(int))); + connect(m_mymoneyaccount, TQT_SIGNAL(signalProgressCount(int)), m_qprogressbar, TQT_SLOT(setTotalSteps(int))); + connect(m_mymoneyaccount, TQT_SIGNAL(signalProgress(int)), this, TQT_SLOT(slotSetProgress(int))); int nTransCount = 0; @@ -173,9 +169,9 @@ void KCsvProgressDlg::performImport(void) KMessageBox::error(this, i18n("Error occurred whilst importing csv file."), i18n("Import CSV")); } else { - QString qstringPrompt = i18n("Import finished successfully.\n\n"); + TQString qstringPrompt = i18n("Import finished successfully.\n\n"); qstringPrompt += i18n("Number of transactions imported "); - qstringPrompt += QString::number(nTransCount); + qstringPrompt += TQString::number(nTransCount); qstringPrompt += "."; KMessageBox::information(this, qstringPrompt, i18n("Import CSV")); } @@ -186,7 +182,7 @@ void KCsvProgressDlg::performImport(void) /** Called when the user clicks on the Browser button */ void KCsvProgressDlg::slotBrowseClicked() { - QString newName = KFileDialog::getSaveFileName(QString::null,"*.CSV"); + TQString newName = KFileDialog::getSaveFileName(TQString(),"*.CSV"); if (!newName.isEmpty()) { m_qlineeditFile->setText(newName); @@ -207,7 +203,7 @@ void KCsvProgressDlg::slotRunClicked() } /** Make sure the text input is ok */ -void KCsvProgressDlg::slotFileTextChanged(const QString& text) +void KCsvProgressDlg::slotFileTextChanged(const TQString& text) { if (!text.isEmpty()) { m_qlineeditFile->setText(text); @@ -234,8 +230,8 @@ void KCsvProgressDlg::writeConfig(void) KConfig *kconfig = KGlobal::config(); kconfig->setGroup("Last Use Settings"); kconfig->writeEntry("KCsvProgressDlg_LastFile", m_qlineeditFile->text()); - kconfig->writeEntry("KCsvProgressDlg_StartDate", QDateTime(m_kmymoneydateStart->date())); - kconfig->writeEntry("KCsvProgressDlg_EndDate", QDateTime(m_kmymoneydateEnd->date())); + kconfig->writeEntry("KCsvProgressDlg_StartDate", TQDateTime(m_kmymoneydateStart->date())); + kconfig->writeEntry("KCsvProgressDlg_EndDate", TQDateTime(m_kmymoneydateEnd->date())); kconfig->sync(); } @@ -243,9 +239,9 @@ void KCsvProgressDlg::writeConfig(void) void KCsvProgressDlg::slotSetProgress(int progress) { m_qprogressbar->setProgress(progress); - QString qstring = QString::number(progress); + TQString qstring = TQString::number(progress); qstring += i18n(" of "); - qstring += QString::number(m_qprogressbar->totalSteps()); + qstring += TQString::number(m_qprogressbar->totalSteps()); m_qlabelTransaction->setText(qstring); } diff --git a/kmymoney2/dialogs/kcsvprogressdlg.h b/kmymoney2/dialogs/kcsvprogressdlg.h index 339d210..20d6990 100644 --- a/kmymoney2/dialogs/kcsvprogressdlg.h +++ b/kmymoney2/dialogs/kcsvprogressdlg.h @@ -22,7 +22,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -44,6 +44,7 @@ **/ class KCsvProgressDlg : public KCsvProgressDlgDecl { Q_OBJECT + TQ_OBJECT private: MyMoneyAccount *m_mymoneyaccount; int m_nType; @@ -57,11 +58,11 @@ protected: protected slots: void slotBrowseClicked(); void slotRunClicked(); - void slotFileTextChanged(const QString& text); + void slotFileTextChanged(const TQString& text); void slotSetProgress(int progress); public: - KCsvProgressDlg(int type, MyMoneyAccount *account, QWidget *parent=0, const char *name=0); + KCsvProgressDlg(int type, MyMoneyAccount *account, TQWidget *tqparent=0, const char *name=0); ~KCsvProgressDlg(); }; diff --git a/kmymoney2/dialogs/kcsvprogressdlgdecl.ui b/kmymoney2/dialogs/kcsvprogressdlgdecl.ui index 4b1afd5..d7c0f20 100644 --- a/kmymoney2/dialogs/kcsvprogressdlgdecl.ui +++ b/kmymoney2/dialogs/kcsvprogressdlgdecl.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI> <class>KCsvProgressDlgDecl</class> <widget> - <class>QDialog</class> + <class>TQDialog</class> <property stdset="1"> <name>name</name> <cstring>kcsvprogressdlgdecl</cstring> @@ -20,7 +20,7 @@ <number>6</number> </property> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7</cstring> @@ -35,7 +35,7 @@ <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2_2</cstring> @@ -62,7 +62,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout20</cstring> @@ -77,7 +77,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout19</cstring> @@ -92,7 +92,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel1_2</cstring> @@ -103,7 +103,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout18</cstring> @@ -118,14 +118,14 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLineEdit</class> + <class>TQLineEdit</class> <property stdset="1"> <name>name</name> <cstring>m_qlineeditFile</cstring> </property> </widget> <widget> - <class>QPushButton</class> + <class>TQPushButton</class> <property stdset="1"> <name>name</name> <cstring>m_qbuttonBrowse</cstring> @@ -140,7 +140,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </vbox> </widget> <widget> - <class>QGroupBox</class> + <class>TQGroupBox</class> <property stdset="1"> <name>name</name> <cstring>m_qgroupboxDates</cstring> @@ -159,7 +159,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout8</cstring> @@ -174,7 +174,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>lblStartDate</cstring> @@ -187,7 +187,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </sizepolicy> </property> <property stdset="1"> - <name>minimumSize</name> + <name>tqminimumSize</name> <size> <width>50</width> <height>0</height> @@ -215,7 +215,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </hbox> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7_2</cstring> @@ -230,7 +230,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>lblEndDate</cstring> @@ -243,7 +243,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </sizepolicy> </property> <property stdset="1"> - <name>minimumSize</name> + <name>tqminimumSize</name> <size> <width>50</width> <height>0</height> @@ -275,7 +275,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </hbox> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout7</cstring> @@ -303,7 +303,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <enum>Expanding</enum> </property> <property> - <name>sizeHint</name> + <name>tqsizeHint</name> <size> <width>20</width> <height>20</height> @@ -311,7 +311,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </spacer> <widget> - <class>QPushButton</class> + <class>TQPushButton</class> <property stdset="1"> <name>name</name> <cstring>m_qbuttonRun</cstring> @@ -328,7 +328,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </hbox> </widget> <widget> - <class>QGroupBox</class> + <class>TQGroupBox</class> <property stdset="1"> <name>name</name> <cstring>m_qgroupbox</cstring> @@ -351,7 +351,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout2</cstring> @@ -366,7 +366,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel2</cstring> @@ -377,7 +377,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </widget> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>m_qlabelAccount</cstring> @@ -387,7 +387,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <string>Unknown</string> </property> <property stdset="1"> - <name>alignment</name> + <name>tqalignment</name> <set>AlignVCenter|AlignRight</set> </property> <property> @@ -397,7 +397,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </hbox> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout1</cstring> @@ -412,7 +412,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <number>6</number> </property> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>TextLabel3</cstring> @@ -423,7 +423,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </widget> <widget> - <class>QLabel</class> + <class>TQLabel</class> <property stdset="1"> <name>name</name> <cstring>m_qlabelTransaction</cstring> @@ -433,7 +433,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <string>0 of 0</string> </property> <property stdset="1"> - <name>alignment</name> + <name>tqalignment</name> <set>AlignVCenter|AlignRight</set> </property> <property> @@ -443,7 +443,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </hbox> </widget> <widget> - <class>QProgressBar</class> + <class>TQProgressBar</class> <property stdset="1"> <name>name</name> <cstring>m_qprogressbar</cstring> @@ -456,7 +456,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </vbox> </widget> <widget> - <class>QLayoutWidget</class> + <class>TQLayoutWidget</class> <property stdset="1"> <name>name</name> <cstring>Layout3</cstring> @@ -484,7 +484,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string <enum>Expanding</enum> </property> <property> - <name>sizeHint</name> + <name>tqsizeHint</name> <size> <width>20</width> <height>20</height> @@ -492,7 +492,7 @@ You can cancel the process at any time by clicking on the Cancel button.</string </property> </spacer> <widget> - <class>QPushButton</class> + <class>TQPushButton</class> <property stdset="1"> <name>name</name> <cstring>m_qbuttonOk</cstring> diff --git a/kmymoney2/dialogs/kcurrencycalculator.cpp b/kmymoney2/dialogs/kcurrencycalculator.cpp index 6e674dc..0457a98 100644 --- a/kmymoney2/dialogs/kcurrencycalculator.cpp +++ b/kmymoney2/dialogs/kcurrencycalculator.cpp @@ -23,11 +23,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qwidgetstack.h> -#include <qgroupbox.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqwidgetstack.h> +#include <tqgroupbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,7 +51,7 @@ #include "../kmymoneyutils.h" -bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTransaction& t, const MyMoneySplit& s, const QMap<QString, MyMoneyMoney>& priceInfo, QWidget* parentWidget) +bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTransaction& t, const MyMoneySplit& s, const TQMap<TQString, MyMoneyMoney>& priceInfo, TQWidget* tqparentWidget) { bool rc = true; MyMoneyFile* file = MyMoneyFile::instance(); @@ -72,7 +72,7 @@ bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTra fromValue = s.value().abs(); // if we had a price info in the beginning, we use it here - if(priceInfo.find(cat.currencyId()) != priceInfo.end()) { + if(priceInfo.tqfind(cat.currencyId()) != priceInfo.end()) { toValue = (fromValue * priceInfo[cat.currencyId()]).convert(fract); } @@ -95,9 +95,9 @@ bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTra toValue, t.postDate(), fract, - parentWidget, "currencyCalculator"); + tqparentWidget, "currencyCalculator"); - if(calc.exec() == QDialog::Rejected) { + if(calc.exec() == TQDialog::Rejected) { rc = false; } else shares = (s.value() * calc.price()).convert(fract); @@ -111,8 +111,8 @@ bool KCurrencyCalculator::setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTra return rc; } -KCurrencyCalculator::KCurrencyCalculator(const MyMoneySecurity& from, const MyMoneySecurity& to, const MyMoneyMoney& value, const MyMoneyMoney& shares, const QDate& date, const signed64 resultFraction, QWidget *parent, const char *name ) : - KCurrencyCalculatorDecl(parent, name), +KCurrencyCalculator::KCurrencyCalculator(const MyMoneySecurity& from, const MyMoneySecurity& to, const MyMoneyMoney& value, const MyMoneyMoney& shares, const TQDate& date, const signed64 resultFraction, TQWidget *tqparent, const char *name ) : + KCurrencyCalculatorDecl(tqparent, name), m_fromCurrency(from), m_toCurrency(to), m_result(shares.abs()), @@ -125,7 +125,7 @@ KCurrencyCalculator::KCurrencyCalculator(const MyMoneySecurity& from, const MyMo if(date.isValid()) m_dateEdit->setDate(date); else - m_dateEdit->setDate(QDate::currentDate()); + m_dateEdit->setDate(TQDate::tqcurrentDate()); m_fromCurrencyText->setText(m_fromCurrency.isCurrency() ? m_fromCurrency.id() : m_fromCurrency.tradingSymbol()); m_toCurrencyText->setText(m_toCurrency.isCurrency() ? m_toCurrency.id() : m_toCurrency.tradingSymbol()); @@ -157,13 +157,13 @@ KCurrencyCalculator::KCurrencyCalculator(const MyMoneySecurity& from, const MyMo m_conversionRate->setPrecision(KMyMoneyGlobalSettings::pricePrecision()); - connect(m_amountButton, SIGNAL(clicked()), this, SLOT(slotSetToAmount())); - connect(m_rateButton, SIGNAL(clicked()), this, SLOT(slotSetExchangeRate())); + connect(m_amountButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetToAmount())); + connect(m_rateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSetExchangeRate())); - connect(m_toAmount, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateResult(const QString&))); - connect(m_conversionRate, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateRate(const QString&))); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept())); + connect(m_toAmount, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateResult(const TQString&))); + connect(m_conversionRate, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateRate(const TQString&))); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); // use this as the default m_amountButton->animateClick(); @@ -204,14 +204,14 @@ void KCurrencyCalculator::slotSetExchangeRate(void) m_conversionRate->setEnabled(true); } -void KCurrencyCalculator::slotUpdateResult(const QString& /*txt*/) +void KCurrencyCalculator::slotUpdateResult(const TQString& /*txt*/) { MyMoneyMoney result = m_toAmount->value(); MyMoneyMoney price(0, 1); if(result.isNegative()) { m_toAmount->setValue(-result); - slotUpdateResult(QString()); + slotUpdateResult(TQString()); return; } @@ -225,13 +225,13 @@ void KCurrencyCalculator::slotUpdateResult(const QString& /*txt*/) updateExample(price); } -void KCurrencyCalculator::slotUpdateRate(const QString& /*txt*/) +void KCurrencyCalculator::slotUpdateRate(const TQString& /*txt*/) { MyMoneyMoney price = m_conversionRate->value(); if(price.isNegative()) { m_conversionRate->setValue(-price); - slotUpdateRate(QString()); + slotUpdateRate(TQString()); return; } @@ -245,24 +245,24 @@ void KCurrencyCalculator::slotUpdateRate(const QString& /*txt*/) void KCurrencyCalculator::updateExample(const MyMoneyMoney& price) { - QString msg; + TQString msg; if(price.isZero()) { - msg = QString("1 %1 = ? %2").arg(m_fromCurrency.tradingSymbol()) - .arg(m_toCurrency.tradingSymbol()); + msg = TQString("1 %1 = ? %2").tqarg(m_fromCurrency.tradingSymbol()) + .tqarg(m_toCurrency.tradingSymbol()); if(m_fromCurrency.isCurrency()) { - msg += QString("\n"); - msg += QString("1 %1 = ? %2").arg(m_toCurrency.tradingSymbol()) - .arg(m_fromCurrency.tradingSymbol()); + msg += TQString("\n"); + msg += TQString("1 %1 = ? %2").tqarg(m_toCurrency.tradingSymbol()) + .tqarg(m_fromCurrency.tradingSymbol()); } } else { - msg = QString("1 %1 = %2 %3").arg(m_fromCurrency.tradingSymbol()) - .arg(price.formatMoney("", KMyMoneyGlobalSettings::pricePrecision())) - .arg(m_toCurrency.tradingSymbol()); + msg = TQString("1 %1 = %2 %3").tqarg(m_fromCurrency.tradingSymbol()) + .tqarg(price.formatMoney("", KMyMoneyGlobalSettings::pricePrecision())) + .tqarg(m_toCurrency.tradingSymbol()); if(m_fromCurrency.isCurrency()) { - msg += QString("\n"); - msg += QString("1 %1 = %2 %3").arg(m_toCurrency.tradingSymbol()) - .arg((MyMoneyMoney(1,1)/price).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())) - .arg(m_fromCurrency.tradingSymbol()); + msg += TQString("\n"); + msg += TQString("1 %1 = %2 %3").tqarg(m_toCurrency.tradingSymbol()) + .tqarg((MyMoneyMoney(1,1)/price).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())) + .tqarg(m_fromCurrency.tradingSymbol()); } } m_conversionExample->setText(msg); @@ -272,9 +272,9 @@ void KCurrencyCalculator::updateExample(const MyMoneyMoney& price) void KCurrencyCalculator::accept(void) { if(m_conversionRate->isEnabled()) - slotUpdateRate(QString()); + slotUpdateRate(TQString()); else - slotUpdateResult(QString()); + slotUpdateResult(TQString()); if(m_updateButton->isChecked()) { MyMoneyPrice pr = MyMoneyFile::instance()->price(m_fromCurrency.id(), m_toCurrency.id(), m_dateEdit->date()); diff --git a/kmymoney2/dialogs/kcurrencycalculator.h b/kmymoney2/dialogs/kcurrencycalculator.h index d9934da..a301129 100644 --- a/kmymoney2/dialogs/kcurrencycalculator.h +++ b/kmymoney2/dialogs/kcurrencycalculator.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -44,6 +44,7 @@ class KCurrencyCalculator : public KCurrencyCalculatorDecl { Q_OBJECT + TQ_OBJECT public: /** @@ -53,19 +54,19 @@ public: * @param shares the number of foreign currency units * @param date the date when the conversion took place * @param resultFraction the smallest fraction of the result (default 100) - * @param parent see QWidget constructor - * @param name see QWidget constructor + * @param tqparent see TQWidget constructor + * @param name see TQWidget constructor * * @note @p value must not be 0! */ - KCurrencyCalculator(const MyMoneySecurity& from, const MyMoneySecurity& to, const MyMoneyMoney& value, const MyMoneyMoney& shares, const QDate& date, const signed64 resultFraction = 100, QWidget *parent=0, const char *name=0); + KCurrencyCalculator(const MyMoneySecurity& from, const MyMoneySecurity& to, const MyMoneyMoney& value, const MyMoneyMoney& shares, const TQDate& date, const signed64 resultFraction = 100, TQWidget *tqparent=0, const char *name=0); ~KCurrencyCalculator(); const MyMoneyMoney price(void) const; void setupPriceEditor(void); - static bool setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTransaction& t, const MyMoneySplit& s, const QMap<QString, MyMoneyMoney>& priceInfo, QWidget* parentWidget); + static bool setupSplitPrice(MyMoneyMoney& shares, const MyMoneyTransaction& t, const MyMoneySplit& s, const TQMap<TQString, MyMoneyMoney>& priceInfo, TQWidget* tqparentWidget); protected: void updateExample(const MyMoneyMoney& price); @@ -73,8 +74,8 @@ protected: protected slots: void slotSetToAmount(void); void slotSetExchangeRate(void); - void slotUpdateResult(const QString& txt); - void slotUpdateRate(const QString& txt); + void slotUpdateResult(const TQString& txt); + void slotUpdateRate(const TQString& txt); virtual void accept(void); private: diff --git a/kmymoney2/dialogs/kcurrencycalculatordecl.ui b/kmymoney2/dialogs/kcurrencycalculatordecl.ui index 688a282..16a8c3f 100644 --- a/kmymoney2/dialogs/kcurrencycalculatordecl.ui +++ b/kmymoney2/dialogs/kcurrencycalculatordecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCurrencyCalculatorDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KCurrencyCalculatorDecl</cstring> </property> @@ -25,7 +25,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_amountDateFrame</cstring> </property> @@ -42,15 +42,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -58,7 +58,7 @@ <string>Amount</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_fromAmount</cstring> </property> @@ -76,14 +76,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -91,7 +91,7 @@ <string>Date</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_dateText</cstring> </property> @@ -109,7 +109,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>145</width> <height>20</height> @@ -120,15 +120,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2_2</cstring> </property> @@ -142,7 +142,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_fromType</cstring> </property> @@ -150,20 +150,20 @@ <string>Currency</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_fromCurrencyText</cstring> </property> <property name="text"> <string>xxx</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -177,7 +177,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_toType</cstring> </property> @@ -185,14 +185,14 @@ <string>Currency</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_toCurrencyText</cstring> </property> <property name="text"> <string>xxx</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -200,9 +200,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <grid> <property name="name"> @@ -213,7 +213,7 @@ <cstring>m_conversionRate</cstring> </property> </widget> - <widget class="QButtonGroup" row="0" column="0" rowspan="3" colspan="1"> + <widget class="TQButtonGroup" row="0" column="0" rowspan="3" colspan="1"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -239,7 +239,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_amountButton</cstring> </property> @@ -247,7 +247,7 @@ <string>To amount</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_rateButton</cstring> </property> @@ -257,7 +257,7 @@ </widget> </vbox> </widget> - <widget class="QFrame" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQFrame" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_dateFrame</cstring> </property> @@ -277,7 +277,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -292,7 +292,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_conversionExample</cstring> </property> @@ -308,7 +308,7 @@ xx</string> </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_updateButton</cstring> </property> @@ -329,7 +329,7 @@ xx</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -350,9 +350,9 @@ xx</string> <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -368,7 +368,7 @@ xx</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -410,5 +410,9 @@ xx</string> <tabstop>m_okButton</tabstop> <tabstop>m_cancelButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kcurrencyeditdlg.cpp b/kmymoney2/dialogs/kcurrencyeditdlg.cpp index 55bac30..aad8f20 100644 --- a/kmymoney2/dialogs/kcurrencyeditdlg.cpp +++ b/kmymoney2/dialogs/kcurrencyeditdlg.cpp @@ -25,13 +25,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qheader.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqtimer.h> -#include <qpixmap.h> -#include <qbitmap.h> -#include <qlabel.h> -#include <qgroupbox.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqlabel.h> +#include <tqgroupbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,8 +56,8 @@ #include "../widgets/kmymoneypriceview.h" -KCurrencyEditDlg::KCurrencyEditDlg(QWidget *parent, const char *name ) : - KCurrencyEditDlgDecl(parent,name) +KCurrencyEditDlg::KCurrencyEditDlg(TQWidget *tqparent, const char *name ) : + KCurrencyEditDlgDecl(tqparent,name) { m_currencyList->addColumn(i18n("Currency")); m_currencyList->header()->hide(); @@ -65,18 +65,18 @@ KCurrencyEditDlg::KCurrencyEditDlg(QWidget *parent, const char *name ) : // FIXME: the online source table currently has no functionality m_onlineSourceTable->hide(); - connect(m_currencyList, SIGNAL(rightButtonPressed(QListViewItem* , const QPoint&, int)), - this, SLOT(slotListClicked(QListViewItem*, const QPoint&, int))); - connect(m_currencyList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectCurrency(QListViewItem*))); + connect(m_currencyList, TQT_SIGNAL(rightButtonPressed(TQListViewItem* , const TQPoint&, int)), + this, TQT_SLOT(slotListClicked(TQListViewItem*, const TQPoint&, int))); + connect(m_currencyList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectCurrency(TQListViewItem*))); - connect(m_currencyList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SIGNAL(renameCurrency(QListViewItem*,int,const QString&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadCurrencies())); + connect(m_currencyList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SIGNAL(renameCurrency(TQListViewItem*,int,const TQString&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadCurrencies())); slotLoadCurrencies(); - connect(m_baseCurrencyButton, SIGNAL(clicked()), this, SLOT(slotSelectBaseCurrency())); - connect(buttonClose, SIGNAL(clicked()), this, SLOT(slotClose())); + connect(m_baseCurrencyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectBaseCurrency())); + connect(buttonClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClose())); // FIXME: currently, no online help available buttonHelp->hide(); @@ -85,14 +85,14 @@ KCurrencyEditDlg::KCurrencyEditDlg(QWidget *parent, const char *name ) : m_description->hide(); resize(width()-1, height()-1); - QTimer::singleShot(10, this, SLOT(timerDone())); + TQTimer::singleShot(10, this, TQT_SLOT(timerDone())); } void KCurrencyEditDlg::timerDone(void) { if(!m_currency.id().isEmpty()) { - QListViewItemIterator it(m_currencyList); - QListViewItem* q; + TQListViewItemIterator it(m_currencyList); + TQListViewItem* q; while((q = it.current()) != 0) { KMyMoneyListViewItem* p = static_cast<KMyMoneyListViewItem *>(q); if(p->id() == m_currency.id()) { @@ -113,7 +113,7 @@ KCurrencyEditDlg::~KCurrencyEditDlg() { } -void KCurrencyEditDlg::resizeEvent(QResizeEvent* /* e*/) +void KCurrencyEditDlg::resizeEvent(TQResizeEvent* /* e*/) { int w = m_currencyList->visibleWidth(); @@ -122,25 +122,25 @@ void KCurrencyEditDlg::resizeEvent(QResizeEvent* /* e*/) void KCurrencyEditDlg::slotLoadCurrencies(void) { - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->currencyList(); - QValueList<MyMoneySecurity>::ConstIterator it; - QListViewItem *first = 0; + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->currencyList(); + TQValueList<MyMoneySecurity>::ConstIterator it; + TQListViewItem *first = 0; - QString localCurrency(localeconv()->int_curr_symbol); + TQString localCurrency(localeconv()->int_curr_symbol); localCurrency.truncate(3); - QString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); + TQString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); // construct a transparent 16x16 pixmap - QPixmap empty(16, 16); - empty.setMask(QBitmap(16, 16, true)); + TQPixmap empty(16, 16); + empty.setMask(TQBitmap(16, 16, true)); m_currencyList->clear(); for(it = list.begin(); it != list.end(); ++it) { - KMyMoneyListViewItem* p = new KMyMoneyListViewItem(m_currencyList, (*it).name(), QString(), (*it).id()); + KMyMoneyListViewItem* p = new KMyMoneyListViewItem(m_currencyList, (*it).name(), TQString(), (*it).id()); p->setRenameEnabled(0, true); if((*it).id() == baseCurrency) { - p->setPixmap(0, QPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); + p->setPixmap(0, TQPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); if(m_currency.id().isEmpty()) first = p; } else { @@ -182,9 +182,9 @@ void KCurrencyEditDlg::updateCurrency(void) } } -void KCurrencyEditDlg::slotSelectCurrency(const QString& id) +void KCurrencyEditDlg::slotSelectCurrency(const TQString& id) { - QListViewItemIterator it(m_currencyList); + TQListViewItemIterator it(m_currencyList); while(it.current()) { KMyMoneyListViewItem* p = static_cast<KMyMoneyListViewItem*>(it.current()); @@ -198,17 +198,17 @@ void KCurrencyEditDlg::slotSelectCurrency(const QString& id) } } -void KCurrencyEditDlg::slotSelectCurrency(QListViewItem *item) +void KCurrencyEditDlg::slotSelectCurrency(TQListViewItem *item) { - QMap<QDate, MyMoneyMoney> history; + TQMap<TQDate, MyMoneyMoney> history; MyMoneyFile* file = MyMoneyFile::instance(); updateCurrency(); m_detailGroup->setEnabled(item != 0); m_onlineSourceTable->clear(); - m_idLabel->setText(QString()); - m_symbolEdit->setText(QString()); + m_idLabel->setText(TQString()); + m_symbolEdit->setText(TQString()); if(item) { try { @@ -221,8 +221,8 @@ void KCurrencyEditDlg::slotSelectCurrency(QListViewItem *item) delete e; m_currency = MyMoneySecurity(); m_onlineSourceTable->clear(); - m_idLabel->setText(QString()); - m_symbolEdit->setText(QString()); + m_idLabel->setText(TQString()); + m_symbolEdit->setText(TQString()); } m_baseCurrencyButton->setDisabled(m_currency.id() == file->baseCurrency().id()); emit selectObject(m_currency); @@ -237,20 +237,20 @@ void KCurrencyEditDlg::slotClose(void) void KCurrencyEditDlg::slotStartRename(void) { - QListViewItemIterator it_l(m_currencyList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_currencyList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; if((it_v = it_l.current()) != 0) { it_v->startRename(0); } } -void KCurrencyEditDlg::slotListClicked(QListViewItem* item, const QPoint&, int) +void KCurrencyEditDlg::slotListClicked(TQListViewItem* item, const TQPoint&, int) { slotSelectCurrency(item); emit openContextMenu(m_currency); } -void KCurrencyEditDlg::slotRenameCurrency(QListViewItem* item, int /* col */, const QString& txt) +void KCurrencyEditDlg::slotRenameCurrency(TQListViewItem* item, int /* col */, const TQString& txt) { MyMoneyFile* file = MyMoneyFile::instance(); KMyMoneyListViewItem* p = static_cast<KMyMoneyListViewItem *>(item); @@ -279,7 +279,7 @@ void KCurrencyEditDlg::slotRenameCurrency(QListViewItem* item, int /* col */, co void KCurrencyEditDlg::slotSelectBaseCurrency(void) { if(!m_currency.id().isEmpty()) { - QListViewItem* p = m_currencyList->selectedItem(); + TQListViewItem* p = m_currencyList->selectedItem(); emit selectBaseCurrency(m_currency); // in case the dataChanged() signal was not sent out (nested FileTransaction) // we update the list manually diff --git a/kmymoney2/dialogs/kcurrencyeditdlg.h b/kmymoney2/dialogs/kcurrencyeditdlg.h index f1a4871..5a1e00f 100644 --- a/kmymoney2/dialogs/kcurrencyeditdlg.h +++ b/kmymoney2/dialogs/kcurrencyeditdlg.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,25 +46,26 @@ class KPopupMenu; class KCurrencyEditDlg : public KCurrencyEditDlgDecl { Q_OBJECT + TQ_OBJECT public: - KCurrencyEditDlg(QWidget *parent=0, const char *name=0); + KCurrencyEditDlg(TQWidget *tqparent=0, const char *name=0); ~KCurrencyEditDlg(); public slots: - void slotSelectCurrency(const QString& id); + void slotSelectCurrency(const TQString& id); protected: /// the resize event - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); void updateCurrency(void); protected slots: - void slotSelectCurrency(QListViewItem *); + void slotSelectCurrency(TQListViewItem *); void slotClose(void); void slotStartRename(void); - void slotListClicked(QListViewItem* item, const QPoint&, int); - void slotRenameCurrency(QListViewItem* item, int col, const QString& txt); + void slotListClicked(TQListViewItem* item, const TQPoint&, int); + void slotRenameCurrency(TQListViewItem* item, int col, const TQString& txt); void slotLoadCurrencies(void); private slots: @@ -74,7 +75,7 @@ private slots: signals: void selectObject(const MyMoneySecurity& currency); void openContextMenu(const MyMoneySecurity& currency); - void renameCurrency(QListViewItem* item, int, const QString& txt); + void renameCurrency(TQListViewItem* item, int, const TQString& txt); void selectBaseCurrency(const MyMoneySecurity& currency); private: diff --git a/kmymoney2/dialogs/kcurrencyeditdlgdecl.ui b/kmymoney2/dialogs/kcurrencyeditdlgdecl.ui index 4a0a740..6c4a50c 100644 --- a/kmymoney2/dialogs/kcurrencyeditdlgdecl.ui +++ b/kmymoney2/dialogs/kcurrencyeditdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KCurrencyEditDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KCurrencyEditDlgDecl</cstring> </property> @@ -22,17 +22,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -43,7 +43,7 @@ <cstring>m_currencyList</cstring> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_baseCurrencyFrame</cstring> </property> @@ -60,9 +60,9 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -78,7 +78,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>21</height> @@ -103,7 +103,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>31</height> @@ -116,7 +116,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_detailGroup</cstring> </property> @@ -127,15 +127,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -143,7 +143,7 @@ <string>Symbol</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_idLabel</cstring> </property> @@ -156,7 +156,7 @@ <cstring>m_symbolEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -166,7 +166,7 @@ </widget> </grid> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_description</cstring> </property> @@ -205,7 +205,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -219,7 +219,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -246,14 +246,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonClose</cstring> </property> @@ -300,5 +300,5 @@ <data format="PNG" length="1114">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042149444154789c8d95c18b1c4514c67fbb29e5b54ea05b26da1d36b08d096e8b11261871837bc8e282ac7ac82187e049a317e32d37110992bf42123c694eea414c0e0bf1b0ec6c402139485a54e8810c54c10e741146fa110bd643f74c12bd642e4d75f77cf5d5ef7dafdfc2ce7087d9eff32fdfdff74e5114104011e489d6e952cce5cfbe5998692dec0c77b87aedd3fddd9f2b3efce02291082209aa3504685022e4ffd7a000a82a765c515615ce95acae659c3f7765c100ec6e575cf8f822e991025f3b6a6f890c484f181ccfc1583428f5d4e2fe84da039aa04121b40eb32483a0ec6e5bce9f8385d36fa7fb9b1b17c8f31cbfe7a95c45be94520c72b2141a1caa160d1666e24ea94aa11ee7685054159d2ada34d41387c40dc63b8844f0b5c73a4bb19cb3f9de001f2aac1fa23aa209168c004224902e29d22ff1e38abbdb275055c4800610233867311a1491847a62c98f66ac6f14d8e99072f22daa15b68a8108424d6422e24c88e3966fbce4c9d786945b27f0be0103ed13c16004d59a2c4d58df28a87548e9aee2274ab95d60c7193c9a0281fc959ae2a4450364a9e2572c7a2b43438374ef2dd2154012d050514dbec7396578a3130d9d6850066f0ad9d186f2d78cdbbb799b0a202f2c48d3aebbb418310240b112637588574bf54b8efaa4fd9b691dacbf5b305813542bae63a9eee4c4694d967b5494eca8c7ef0933bdc5d90e6a2caa0e3f013b7adce9fa5b03d637561113a30106a71d18c5fd9677058338ad01e91c0b8b743b880182ce19cd9c0e5e2b583fbdda565d3d04cfedad180942133af201b2bc3588e111c680068f489780ce69b192b279768088524f2b3458ea694d3de99a4323bc976ed34eb86b98c51993f6be10f77240c99685cd731991f1582df15aa15a213d583f5313a7806988fb8a0640e336359d9e9933568bf44062214ba19e2a7652a13d8b068ff596b807182189234e9da9f1ceb78c81b28c3ac6fe21e306c58e41d5118952acd6a0c2f56b9e6a5c72f346cdcd6b19a3bf8010010d714f89533b674c90c7189b598eab12a45fb5c75b8253672b863fbcccf5af93b6904119fe9851bf5153ac3a746ae7b9d5698c1dc58f313e70e4707ce9d84bafa2f79fc23fb8c7c1438ef04031a2642fee21060ec69ee47020796ecaa12313ccd333d1b67935047acf2be3bb11aa010dbe656cc755dbe3b772084a7ebc6d5711253b593dfcc0cc8fcd3cafda455512c7f200ec56cbfac0f1d7d34b7fdf0f98fd88a92a7e9cb0e70cc933c0b38a2c823ea0bd76c70c016adb67f47bc2a117a6d40abeea33fa23c2fb867edfb413e4a34fded94ffb3991c46dc7754cd3634ad2af490b857f5a5137126a97e02a8120a485235b6a28ef80bd077ee2b9f2d54fed04595dcbd8ddb6c4bd87334c10cadb2064e856177e7864e669fbe1df154a0142839f7ad2e5b6880bff1da66eece78e315d959f609da670f98befe6c3f45fb42672c9acff7f660000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/keditequityentrydecl.ui b/kmymoney2/dialogs/keditequityentrydecl.ui index 4acf703..baa92c9 100644 --- a/kmymoney2/dialogs/keditequityentrydecl.ui +++ b/kmymoney2/dialogs/keditequityentrydecl.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KEditEquityEntryDecl</class> <author>Kevin Tambascio </author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KEditEquityEntryDecl</cstring> </property> @@ -23,9 +23,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -56,7 +56,7 @@ <cstring>cmbInvestmentType</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -64,15 +64,15 @@ <string>Smallest fraction:</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="1"> + <widget class="TQLayoutWidget" row="3" column="1"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -87,7 +87,7 @@ <property name="text"> <string>1 /</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -98,7 +98,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>lblType</cstring> </property> @@ -106,7 +106,7 @@ <string>Investment Type:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblEquityName</cstring> </property> @@ -119,7 +119,7 @@ <cstring>edtMarketSymbol</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblSymbol</cstring> </property> @@ -129,7 +129,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -145,9 +145,9 @@ <cstring>kpvPriceHistory</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>21</height> @@ -204,7 +204,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>21</height> @@ -215,9 +215,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -233,7 +233,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>238</width> <height>21</height> @@ -302,5 +302,5 @@ <data format="PNG" length="826">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000030149444154789cb59531681b5718c77f0e377c070e3c810a3a70e0041eac51852e0a19e45134830a1d9a4c69a04bc8928e990a693a640e1d0c8642b08742321894c1507991b484c890902bb8701a047760c3bd21701fe4201dde49b6a41a32b8df72dcbbeffdbefffbbfefbd5b1b0c07cce266ebe667ae2006c3c1dada0cdc3be87d6e6c35b0d692a409d9c7ec8b20d65ae29398d19b1114e7e3de4ce98b3f5e10dc0053cf0951b4506496e1b964bf7ce6c585d9054c62d01d617ca48be0596553cf496d8f2c8b01c5f795fc93904e85ec4c01a152857a5d9175d0b2805c872080f18595ccc1499a10a225d4e2fbc2877786fe81253ab6c04c8d106e09db5d43ab0d146e5c64d1a23938fb98a185cea1c33eecfd9eba49eb427dcb201e245365f2b7b2fb5b4a3a31dcb927178afe07d86901df870fefa4842aed6f6b74ba42e52b4014d580e1eb9cbd9d94de7e4aad16d2f9be02d805f0b5e532f927a1ffcacea1777f122a8105b164a7c25faf323a5d9f1f1fd600e1e5bec59e2d4b5c7ef5209d0ad17b8b31864e57c0b3e0815ac3ee33253ab664a770ff5185d1a1cb8d2267d3e58aa1dc7d2508cbe597d0e74fdd269aaaf0f52d414c4ea3e9762c996869e42560d7a72e41c4799a2586e74f95e8d8151481fa86efbe7b3398ac58b1a2b8527589f15451ad303ac2293542ad6648a796278f13a27185e4c4754310facb98c53a79e19a3fdc1426ff28c3d7399d1f7cb25343eb96106cf83c790ce9c4f2eb831855c55485663327992eb6dc8a6259874ed700b0b793323cccb9ffa842b30d6133e3e75fea989ac15a8b16ca76b746b0b92278d919774c5b6d48a78697fb29bbcf52468742a32120909c24e899ce67beed5be2db01e22d1e9485bb620e47f9ee9e606a21bd3f5d3744c7e7c54d55e87443867d8b554515ac5db4620e8e4f62263170fd1cdee90aad7640141992891b0f367c9adfe4049bb07d3b7022bd8c687c0978f46684ee084150b65ac1fcca94591b7a90a496e4c095164fb016a2b192a497795cc0f84817aebe25f7bf70ccc54a575c555c03f78ffa5fc0570d1f0c076bff0232285a0901e2257b0000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/keditequityentrydlg.cpp b/kmymoney2/dialogs/keditequityentrydlg.cpp index 854ce9a..ef9ed84 100644 --- a/kmymoney2/dialogs/keditequityentrydlg.cpp +++ b/kmymoney2/dialogs/keditequityentrydlg.cpp @@ -22,7 +22,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,27 +40,27 @@ #include "kupdatestockpricedlg.h" #include "../widgets/kmymoneypriceview.h" -KEditEquityEntryDlg::KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity, QWidget *parent, const char *name) - : KEditEquityEntryDecl(parent, name, true) +KEditEquityEntryDlg::KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity, TQWidget *tqparent, const char *name) + : KEditEquityEntryDecl(tqparent, name, true) { m_selectedSecurity = selectedSecurity; - connect(btnOK, SIGNAL(clicked()), this, SLOT(slotOKClicked())); - connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(edtEquityName, SIGNAL(textChanged(const QString &)), this, SLOT(slotDataChanged())); - connect(edtMarketSymbol, SIGNAL(textChanged(const QString &)), this, SLOT(slotDataChanged())); - connect(edtFraction, SIGNAL(textChanged(const QString&)), this, SLOT(slotDataChanged())); - connect(btnAddEntry, SIGNAL(clicked()), kpvPriceHistory, SLOT(slotAddPrice())); - connect(btnEditEntry, SIGNAL(clicked()), kpvPriceHistory, SLOT(slotEditPrice())); - connect(btnRemoveEntry, SIGNAL(clicked()), kpvPriceHistory, SLOT(slotDeletePrice())); - connect(kpvPriceHistory, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectionChanged(QListViewItem*))); + connect(btnOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOKClicked())); + connect(btnCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(edtEquityName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotDataChanged())); + connect(edtMarketSymbol, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotDataChanged())); + connect(edtFraction, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotDataChanged())); + connect(btnAddEntry, TQT_SIGNAL(clicked()), kpvPriceHistory, TQT_SLOT(slotAddPrice())); + connect(btnEditEntry, TQT_SIGNAL(clicked()), kpvPriceHistory, TQT_SLOT(slotEditPrice())); + connect(btnRemoveEntry, TQT_SIGNAL(clicked()), kpvPriceHistory, TQT_SLOT(slotDeletePrice())); + connect(kpvPriceHistory, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); //fill in the fields with what we know. edtEquityName->setText(m_selectedSecurity.name()); edtMarketSymbol->setText(m_selectedSecurity.tradingSymbol()); edtFraction->setPrecision(0); edtFraction->setCalculatorButtonVisible(false); - edtFraction->loadText(QString::number(m_selectedSecurity.smallestAccountFraction())); + edtFraction->loadText(TQString::number(m_selectedSecurity.smallestAccountFraction())); cmbInvestmentType->setCurrentItem((int)m_selectedSecurity.securityType()); // FIXME PRICE // kpvPriceHistory->setHistory(m_selectedSecurity.priceHistory()); @@ -73,7 +73,7 @@ KEditEquityEntryDlg::KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity btnAddEntry->setGuiItem(KStdGuiItem::add()); KGuiItem editButtenItem( i18n( "&Edit" ), - QIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), i18n("Modify the selected entry"), i18n("Change the price information of the selected entry.")); btnEditEntry->setGuiItem(editButtenItem); @@ -82,9 +82,9 @@ KEditEquityEntryDlg::KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity slotDataChanged(); m_changes = false; - // force a resize to optimize the layout of all widgets + // force a resize to optimize the tqlayout of all widgets resize(width()-1, height()-1); - QTimer::singleShot(10, this, SLOT(slotTimerDone())); + TQTimer::singleShot(10, this, TQT_SLOT(slotTimerDone())); } KEditEquityEntryDlg::~KEditEquityEntryDlg() @@ -115,7 +115,7 @@ void KEditEquityEntryDlg::slotOKClicked() accept(); } -void KEditEquityEntryDlg::slotSelectionChanged(QListViewItem* item) +void KEditEquityEntryDlg::slotSelectionChanged(TQListViewItem* item) { btnEditEntry->setEnabled(item != 0); btnRemoveEntry->setEnabled(item != 0); diff --git a/kmymoney2/dialogs/keditequityentrydlg.h b/kmymoney2/dialogs/keditequityentrydlg.h index 0fdf40e..ae9dc58 100644 --- a/kmymoney2/dialogs/keditequityentrydlg.h +++ b/kmymoney2/dialogs/keditequityentrydlg.h @@ -20,13 +20,13 @@ * * ***************************************************************************/ -#ifndef KEDITEQUITYENTRYDLG_H -#define KEDITEQUITYENTRYDLG_H +#ifndef KEDITETQUITYENTRYDLG_H +#define KEDITETQUITYENTRYDLG_H // ---------------------------------------------------------------------------- // QT Includes -#include <qdialog.h> +#include <tqdialog.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,8 +47,9 @@ class KEditEquityEntryDlg : public KEditEquityEntryDecl { Q_OBJECT + TQ_OBJECT public: - KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity, QWidget *parent = NULL, const char *name = NULL); + KEditEquityEntryDlg(const MyMoneySecurity& selectedSecurity, TQWidget *tqparent = NULL, const char *name = NULL); ~KEditEquityEntryDlg(); void updatedEquity(MyMoneySecurity& security) { security = m_selectedSecurity; } @@ -56,7 +57,7 @@ public: protected slots: void slotOKClicked(); void slotDataChanged(void); - void slotSelectionChanged(QListViewItem* item); + void slotSelectionChanged(TQListViewItem* item); private slots: void slotTimerDone(void); diff --git a/kmymoney2/dialogs/keditloanwizard.cpp b/kmymoney2/dialogs/keditloanwizard.cpp index 6054cec..3992550 100644 --- a/kmymoney2/dialogs/keditloanwizard.cpp +++ b/kmymoney2/dialogs/keditloanwizard.cpp @@ -23,9 +23,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qlabel.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,19 +48,19 @@ #include "../mymoney/mymoneyfile.h" #include "../kmymoneyutils.h" -KEditLoanWizard::KEditLoanWizard(const MyMoneyAccount& account, QWidget *parent, const char *name ) : - KNewLoanWizard(parent, name) +KEditLoanWizard::KEditLoanWizard(const MyMoneyAccount& account, TQWidget *tqparent, const char *name ) : + KNewLoanWizard(tqparent, name) { MyMoneyFile* file = MyMoneyFile::instance(); setCaption(i18n("Edit loan wizard")); - m_effectiveDateLabel->setText(QString("\n") + i18n( + m_effectiveDateLabel->setText(TQString("\n") + i18n( "Please enter the date from which on the following changes will be effective. " "The date entered must be later than the opening date of this account (%1), but must " - "not be in the future. The default will be today.").arg(KGlobal::locale()->formatDate(account.openingDate(), true))); + "not be in the future. The default will be today.").tqarg(KGlobal::locale()->formatDate(account.openingDate(), true))); m_account = account; try { - QString id = m_account.value("schedule"); + TQString id = m_account.value("schedule"); m_schedule = file->schedule(id); } catch (MyMoneyException *e) { delete e; @@ -71,11 +71,11 @@ KEditLoanWizard::KEditLoanWizard(const MyMoneyAccount& account, QWidget *parent, loadWidgets(m_account); - if(m_account.openingDate() > QDate::currentDate()) { - m_effectiveDateNoteLabel->setText(QString("\n") + i18n( + if(m_account.openingDate() > TQDate::tqcurrentDate()) { + m_effectiveDateNoteLabel->setText(TQString("\n") + i18n( "Note: you will not be able to modify this account today, because the opening date \"%1\" is in the future. " "Please revisit this dialog when the time has come." - ).arg(KGlobal::locale()->formatDate(m_account.openingDate(), true))); + ).tqarg(KGlobal::locale()->formatDate(m_account.openingDate(), true))); } else { m_effectiveDateNoteLabel->hide(); } @@ -94,9 +94,9 @@ KEditLoanWizard::KEditLoanWizard(const MyMoneyAccount& account, QWidget *parent, setAppropriate(m_editSelectionPage, true); // setup connections - connect(m_effectiveChangeDateEdit, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotCheckPageFinished())); - connect(m_newPaymentEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished())); - connect(m_newInterestRateEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished())); + connect(m_effectiveChangeDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotCheckPageFinished())); + connect(m_newPaymentEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished())); + connect(m_newInterestRateEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished())); // make sure, we show the correct start page showPage(m_editIntroPage); @@ -109,7 +109,7 @@ KEditLoanWizard::~KEditLoanWizard() void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) { MyMoneyFile* file = MyMoneyFile::instance(); - QString paymentAccountId, interestAccountId; + TQString paymentAccountId, interestAccountId; m_nameEdit->loadText(m_account.name()); m_loanAmountEdit->loadText(m_account.loanAmount().formatMoney(m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId())))); @@ -123,15 +123,15 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) } MyMoneyMoney ir; - if(m_schedule.startDate() > QDate::currentDate()) { + if(m_schedule.startDate() > TQDate::tqcurrentDate()) { ir = m_account.interestRate(m_schedule.startDate()); } else { - ir = m_account.interestRate(QDate::currentDate()); + ir = m_account.interestRate(TQDate::tqcurrentDate()); } m_interestRateEdit->loadText(ir.formatMoney("", 3)); m_newInterestRateEdit->loadText(ir.formatMoney("", 3)); m_newInterestRateEdit->setPrecision(3); - m_interestRateLabel->setText(QString(" ") + ir.formatMoney("", 3) + QString("%")); + m_interestRateLabel->setText(TQString(" ") + ir.formatMoney("", 3) + TQString("%")); m_paymentFrequencyUnitEdit->setCurrentItem(i18n(m_schedule.occurenceToString())); updateTermWidgets(m_account.term()); @@ -144,7 +144,7 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) m_transaction = m_schedule.transaction(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = m_schedule.transaction().splits().begin(); it_s != m_schedule.transaction().splits().end(); ++it_s) { @@ -210,7 +210,7 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) int fraction = m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId())); m_paymentEdit->loadText(basePayment.formatMoney(fraction)); m_newPaymentEdit->loadText(basePayment.formatMoney(fraction)); - m_paymentLabel->setText(QString(" ") + basePayment.formatMoney(fraction)); + m_paymentLabel->setText(TQString(" ") + basePayment.formatMoney(fraction)); m_additionalCost->setText(addPayment.formatMoney(fraction)); m_interestAccountEdit->setSelected(interestAccountId); @@ -234,16 +234,16 @@ void KEditLoanWizard::loadWidgets(const MyMoneyAccount& /* account */) void KEditLoanWizard::next() { bool dontLeavePage = false; - QButton* button = m_selectionButtonGroup->find(m_lastSelection); + TQButton* button = m_selectionButtonGroup->tqfind(m_lastSelection); if(currentPage() == m_editSelectionPage) { if(button != 0 && m_lastSelection != m_selectionButtonGroup->id(m_selectionButtonGroup->selected())) { - QString errMsg = i18n( + TQString errMsg = i18n( "Your previous selection was \"%1\". If you select another option, " "KMyMoney will dismiss the changes you have just entered. " - "Do you wish to proceed?").arg(button->text()); + "Do you wish to proceed?").tqarg(button->text()); if(KMessageBox::questionYesNo(this, errMsg) == KMessageBox::No) { dontLeavePage = true; @@ -363,12 +363,12 @@ void KEditLoanWizard::next() // now and always calculate with the full loan amount. MyMoneyMoney balance = m_account.openingBalance(); - QValueList<MyMoneyTransaction> list; - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction>::ConstIterator it; MyMoneySplit split; MyMoneyTransactionFilter filter(m_account.id()); - filter.setDateFilter(QDate(), m_effectiveChangeDateEdit->date().addDays(-1)); + filter.setDateFilter(TQDate(), m_effectiveChangeDateEdit->date().addDays(-1)); list = MyMoneyFile::instance()->transactionList(filter); for(it = list.begin(); it != list.end(); ++it) { @@ -417,7 +417,7 @@ void KEditLoanWizard::slotCheckPageFinished(void) if(currentPage() == m_effectiveDatePage) { if(m_effectiveChangeDateEdit->date() < m_account.openingDate() - || m_effectiveChangeDateEdit->date() > QDate::currentDate()) + || m_effectiveChangeDateEdit->date() > TQDate::tqcurrentDate()) nextButton()->setEnabled(false); } else if(currentPage() == m_interestEditPage) { @@ -438,15 +438,15 @@ void KEditLoanWizard::updateEditSummary(void) // calculate the number of affected transactions MyMoneyTransactionFilter filter(m_account.id()); - filter.setDateFilter(m_effectiveChangeDateEdit->date(), QDate()); + filter.setDateFilter(m_effectiveChangeDateEdit->date(), TQDate()); int count = 0; - QValueList<MyMoneyTransaction> list; - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction>::ConstIterator it; list = MyMoneyFile::instance()->transactionList(filter); for(it = list.begin(); it != list.end(); ++it) { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; int match = 0; for(it_s = (*it).splits().begin(); it_s != (*it).splits().end(); ++it_s) { // we only count those transactions that have an interest @@ -460,7 +460,7 @@ void KEditLoanWizard::updateEditSummary(void) count++; } - m_affectedPayments->setText(QString().sprintf("%d", count)); + m_affectedPayments->setText(TQString().sprintf("%d", count)); } const MyMoneySchedule KEditLoanWizard::schedule(void) const @@ -503,7 +503,7 @@ const MyMoneyAccount KEditLoanWizard::account(void) const const MyMoneyTransaction KEditLoanWizard::transaction() const { MyMoneyTransaction t = KNewLoanWizard::transaction(); - MyMoneySplit s = t.splitByAccount(QString("Phony-ID")); + MyMoneySplit s = t.splitByAccount(TQString("Phony-ID")); s.setAccountId(m_account.id()); t.modifySplit(s); diff --git a/kmymoney2/dialogs/keditloanwizard.h b/kmymoney2/dialogs/keditloanwizard.h index 0598248..f2efbdf 100644 --- a/kmymoney2/dialogs/keditloanwizard.h +++ b/kmymoney2/dialogs/keditloanwizard.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -44,8 +44,9 @@ class KEditLoanWizard : public KNewLoanWizard { Q_OBJECT + TQ_OBJECT public: - KEditLoanWizard(const MyMoneyAccount& account, QWidget *parent=0, const char *name=0); + KEditLoanWizard(const MyMoneyAccount& account, TQWidget *tqparent=0, const char *name=0); ~KEditLoanWizard(); /** diff --git a/kmymoney2/dialogs/keditscheduledlg.cpp b/kmymoney2/dialogs/keditscheduledlg.cpp index 635d564..559fddd 100644 --- a/kmymoney2/dialogs/keditscheduledlg.cpp +++ b/kmymoney2/dialogs/keditscheduledlg.cpp @@ -18,12 +18,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -#include <qwidgetlist.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qvaluevector.h> +#include <tqtimer.h> +#include <tqwidgetlist.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqvaluevector.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -55,13 +55,13 @@ class KEditScheduleDlg::Private { public: MyMoneySchedule m_schedule; KMyMoneyRegister::Transaction* m_item; - QWidgetList m_tabOrderWidgets; + TQWidgetList m_tabOrderWidgets; TransactionEditor* m_editor; kMandatoryFieldGroup* m_requiredFields; }; -KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *parent, const char *name) : - KEditScheduleDlgDecl(parent, name, true), +KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, TQWidget *tqparent, const char *name) : + KEditScheduleDlgDecl(tqparent, name, true), d(new Private) { d->m_schedule = schedule; @@ -71,12 +71,12 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par buttonCancel->setGuiItem(KStdGuiItem::cancel()); buttonHelp->setGuiItem(KStdGuiItem::help()); - d->m_requiredFields = new kMandatoryFieldGroup (this); + d->m_requiredFields = new kMandatoryFieldGroup (TQT_TQOBJECT(this)); d->m_requiredFields->setOkButton(buttonOk); // button to be enabled when all fields present // make sure, we have a tabbar with the form // insert it after the horizontal line - m_paymentInformationLayout->insertWidget(2, m_form->tabBar(m_form->parentWidget())); + m_paymentInformationLayout->insertWidget(2, m_form->tabBar(m_form->tqparentWidget())); // we never need to see the register m_register->hide(); @@ -111,7 +111,7 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par m_paymentMethodEdit->insertItem(i18n("Direct debit"), MyMoneySchedule::STYPE_DIRECTDEBIT); m_paymentMethodEdit->insertItem(i18n("Standing order"), MyMoneySchedule::STYPE_STANDINGORDER); m_paymentMethodEdit->insertItem(i18n("Bank transfer"), MyMoneySchedule::STYPE_BANKTRANSFER); - m_paymentMethodEdit->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHEQUE); + m_paymentMethodEdit->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHETQUE); m_paymentMethodEdit->insertItem(i18n("Other"), MyMoneySchedule::STYPE_OTHER); MyMoneySchedule::paymentTypeE method = d->m_schedule.paymentType(); @@ -140,18 +140,18 @@ KEditScheduleDlg::KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *par m_FinalPaymentEdit->setDate(d->m_schedule.endDate()); } - connect(m_RemainingEdit, SIGNAL(valueChanged(int)), - this, SLOT(slotRemainingChanged(int))); - connect(m_FinalPaymentEdit, SIGNAL(dateChanged(const QDate&)), - this, SLOT(slotEndDateChanged(const QDate&))); - connect(m_frequencyEdit, SIGNAL(itemSelected(int)), - this, SLOT(slotFrequencyChanged(int))); - connect(m_frequencyNoEdit, SIGNAL(valueChanged(int)), - this, SLOT(slotOccurenceMultiplierChanged(int))); - connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotShowHelp())); + connect(m_RemainingEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotRemainingChanged(int))); + connect(m_FinalPaymentEdit, TQT_SIGNAL(dateChanged(const TQDate&)), + this, TQT_SLOT(slotEndDateChanged(const TQDate&))); + connect(m_frequencyEdit, TQT_SIGNAL(itemSelected(int)), + this, TQT_SLOT(slotFrequencyChanged(int))); + connect(m_frequencyNoEdit, TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotOccurenceMultiplierChanged(int))); + connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp())); // force the initial height to be as small as possible - QTimer::singleShot(0, this, SLOT(slotSetupSize())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetupSize())); // we just hide the variation field for now and enable the logic // once we have a respective member in the MyMoneySchedule object @@ -165,13 +165,13 @@ KEditScheduleDlg::~KEditScheduleDlg() void KEditScheduleDlg::slotSetupSize(void) { - resize(width(), minimumSizeHint().height()); + resize(width(), tqminimumSizeHint().height()); } TransactionEditor* KEditScheduleDlg::startEdit(void) { KMyMoneyRegister::SelectedTransactions list(m_register); - TransactionEditor* editor = d->m_item->createEditor(m_form, list, QDate()); + TransactionEditor* editor = d->m_item->createEditor(m_form, list, TQDate()); // check that we use the same transaction commodity in all selected transactions // if not, we need to update this in the editor's list. The user can also bail out @@ -186,18 +186,18 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) } if(editor) { - connect(editor, SIGNAL(transactionDataSufficient(bool)), buttonOk, SLOT(setEnabled(bool))); - connect(editor, SIGNAL(escapePressed()), buttonCancel, SLOT(animateClick())); - connect(editor, SIGNAL(returnPressed()), buttonOk, SLOT(animateClick())); - - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets())); - // connect(editor, SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); - connect(editor, SIGNAL(createPayee(const QString&, QString&)), kmymoney2, SLOT(slotPayeeNew(const QString&, QString&))); - connect(editor, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(editor, SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets())); - - // create the widgets, place them in the parent and load them with data + connect(editor, TQT_SIGNAL(transactionDataSufficient(bool)), buttonOk, TQT_SLOT(setEnabled(bool))); + connect(editor, TQT_SIGNAL(escapePressed()), buttonCancel, TQT_SLOT(animateClick())); + connect(editor, TQT_SIGNAL(returnPressed()), buttonOk, TQT_SLOT(animateClick())); + + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets())); + // connect(editor, TQT_SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); + connect(editor, TQT_SIGNAL(createPayee(const TQString&, TQString&)), kmymoney2, TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(editor, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(editor, TQT_SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets())); + + // create the widgets, place them in the tqparent and load them with data // setup tab order d->m_tabOrderWidgets.clear(); KMyMoneyRegister::Action action = KMyMoneyRegister::ActionWithdrawal; @@ -216,7 +216,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) // into the transaction and determine the type. in case we don't have a transaction with splits // we stick with the default action already set up if(d->m_schedule.transaction().splits().count() > 0) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; bool isDeposit = false; bool isTransfer = false; for(it_s = d->m_schedule.transaction().splits().begin(); it_s != d->m_schedule.transaction().splits().end(); ++it_s) { @@ -241,10 +241,10 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) // if it's not a check, then we need to clear // a possibly assigned check number - if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHEQUE) { - QWidget* w = editor->haveWidget("number"); + if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHETQUE) { + TQWidget* w = editor->haveWidget("number"); if(w) - dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(QString()); + dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(TQString()); } Q_ASSERT(!d->m_tabOrderWidgets.isEmpty()); @@ -268,7 +268,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) d->m_tabOrderWidgets.append(m_form); // install event filter in all taborder widgets - QWidget* w; + TQWidget* w; for(w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) { w->installEventFilter(this); w->installEventFilter(editor); @@ -277,7 +277,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) // connect the postdate modification signal to our update routine kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(editor->haveWidget("postdate")); if(dateEdit) - connect(dateEdit, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotPostDateChanged(const QDate&))); + connect(dateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotPostDateChanged(const TQDate&))); m_nameEdit->setFocus(); @@ -288,7 +288,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) d->m_requiredFields->add(editor->haveWidget("category")); // fix labels - QLabel* label = dynamic_cast<QLabel*>(editor->haveWidget("date-label")); + TQLabel* label = dynamic_cast<TQLabel*>(editor->haveWidget("date-label")); if(label) { label->setText(i18n("Next due date")); } @@ -296,7 +296,7 @@ TransactionEditor* KEditScheduleDlg::startEdit(void) d->m_editor = editor; slotSetPaymentMethod(d->m_schedule.paymentType()); - connect(m_paymentMethodEdit, SIGNAL(itemSelected(int)), this, SLOT(slotSetPaymentMethod(int))); + connect(m_paymentMethodEdit, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotSetPaymentMethod(int))); } return editor; @@ -366,7 +366,7 @@ const MyMoneySchedule& KEditScheduleDlg::schedule(void) const if(m_endSeriesEdit->isEnabled() && m_endSeriesEdit->isChecked()) { d->m_schedule.setEndDate(m_FinalPaymentEdit->date()); } else { - d->m_schedule.setEndDate(QDate()); + d->m_schedule.setEndDate(TQDate()); } } return d->m_schedule; @@ -381,7 +381,7 @@ MyMoneyTransaction KEditScheduleDlg::transaction(void) const } t.clearId(); - t.setEntryDate(QDate()); + t.setEntryDate(TQDate()); return t; } @@ -390,13 +390,13 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next) bool rc = false; // qDebug("KEditScheduleDlg::focusNextPrevChild(editmode=%s)", m_inEditMode ? "true" : "false"); - QWidget *w = 0; - QWidget *currentWidget; + TQWidget *w = 0; + TQWidget *currentWidget; - w = qApp->focusWidget(); - while(w && d->m_tabOrderWidgets.find(w) == -1) { - // qDebug("'%s' not in list, use parent", w->className()); - w = w->parentWidget(); + w = tqApp->tqfocusWidget(); + while(w && d->m_tabOrderWidgets.tqfind(w) == -1) { + // qDebug("'%s' not in list, use tqparent", w->className()); + w = w->tqparentWidget(); } // if(w) qDebug("tab order is at '%s'", w->className()); currentWidget = d->m_tabOrderWidgets.current(); @@ -408,7 +408,7 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next) } if(w != currentWidget - && ((w->focusPolicy() & TabFocus) == TabFocus) + && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus) && w->isVisible() && w->isEnabled()) { // qDebug("Selecting '%s' as focus", w->className()); w->setFocus(); @@ -421,7 +421,7 @@ bool KEditScheduleDlg::focusNextPrevChild(bool next) return rc; } -void KEditScheduleDlg::resizeEvent(QResizeEvent* ev) +void KEditScheduleDlg::resizeEvent(TQResizeEvent* ev) { m_register->resize(KMyMoneyRegister::DetailColumn); m_form->resize(KMyMoneyTransactionForm::ValueColumn1); @@ -444,7 +444,7 @@ void KEditScheduleDlg::slotRemainingChanged(int value) } } -void KEditScheduleDlg::slotEndDateChanged(const QDate& date) +void KEditScheduleDlg::slotEndDateChanged(const TQDate& date) { // Make sure the required fields are set kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(d->m_editor->haveWidget("postdate")); @@ -458,7 +458,7 @@ void KEditScheduleDlg::slotEndDateChanged(const QDate& date) } } -void KEditScheduleDlg::slotPostDateChanged(const QDate& date) +void KEditScheduleDlg::slotPostDateChanged(const TQDate& date) { if(d->m_schedule.nextDueDate() != date) { if (m_endOptionsFrame->isEnabled()) { @@ -475,13 +475,13 @@ void KEditScheduleDlg::slotSetPaymentMethod(int item) { kMyMoneyLineEdit* dateEdit = dynamic_cast<kMyMoneyLineEdit*>(d->m_editor->haveWidget("number")); if(dateEdit) { - dateEdit->setShown(item == MyMoneySchedule::STYPE_WRITECHEQUE); + dateEdit->setShown(item == MyMoneySchedule::STYPE_WRITECHETQUE); // hiding the label does not work, because the label underneath will shine // through. So we either write the label or a blank - QLabel* label = dynamic_cast<QLabel *>(d->m_editor->haveWidget("number-label")); + TQLabel* label = dynamic_cast<TQLabel *>(d->m_editor->haveWidget("number-label")); if(label) { - label->setText((item == MyMoneySchedule::STYPE_WRITECHEQUE) ? i18n("Number") : " "); + label->setText((item == MyMoneySchedule::STYPE_WRITECHETQUE) ? i18n("Number") : " "); } } } diff --git a/kmymoney2/dialogs/keditscheduledlg.h b/kmymoney2/dialogs/keditscheduledlg.h index 94c3101..db80aea 100644 --- a/kmymoney2/dialogs/keditscheduledlg.h +++ b/kmymoney2/dialogs/keditscheduledlg.h @@ -40,11 +40,12 @@ class TransactionEditor; class KEditScheduleDlg : public KEditScheduleDlgDecl { Q_OBJECT + TQ_OBJECT public: /** - * Standard QWidget constructor. + * Standard TQWidget constructor. **/ - KEditScheduleDlg(const MyMoneySchedule& schedule, QWidget *parent=0, const char *name=0); + KEditScheduleDlg(const MyMoneySchedule& schedule, TQWidget *tqparent=0, const char *name=0); /** * Standard destructor. @@ -66,19 +67,19 @@ protected: * This method adjusts @a _date according to the rules specified by * the schedule's weekend option. */ - QDate adjustDate(const QDate& _date) const; + TQDate adjustDate(const TQDate& _date) const; /// Overridden for internal reasons. No API changes. bool focusNextPrevChild(bool next); /// Overridden for internal reasons. No API changes. - void resizeEvent(QResizeEvent* ev); + void resizeEvent(TQResizeEvent* ev); private slots: void slotSetupSize(void); void slotRemainingChanged(int); - void slotEndDateChanged(const QDate& date); - void slotPostDateChanged(const QDate& date); + void slotEndDateChanged(const TQDate& date); + void slotPostDateChanged(const TQDate& date); void slotSetPaymentMethod(int); void slotFrequencyChanged(int item); void slotShowHelp(void); diff --git a/kmymoney2/dialogs/keditscheduledlgdecl.ui b/kmymoney2/dialogs/keditscheduledlgdecl.ui index 8555c58..494fa46 100644 --- a/kmymoney2/dialogs/keditscheduledlgdecl.ui +++ b/kmymoney2/dialogs/keditscheduledlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KEditScheduleDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KEditScheduleDlgDecl</cstring> </property> @@ -22,23 +22,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -53,15 +53,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -92,7 +92,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_paymentInformation</cstring> </property> @@ -103,15 +103,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -142,7 +142,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -234,7 +234,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -245,9 +245,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -273,7 +273,7 @@ <cstring>m_weekendOptionEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -283,15 +283,15 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_estimateEdit</cstring> </property> @@ -320,7 +320,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -329,7 +329,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_autoEnterEdit</cstring> </property> @@ -337,7 +337,7 @@ <string>Enter this schedule into the register automatically when it is due</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_endSeriesEdit</cstring> </property> @@ -345,7 +345,7 @@ <string>This schedule will end at some time</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_endOptionsFrame</cstring> </property> @@ -372,14 +372,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_endLabel1</cstring> </property> @@ -398,7 +398,7 @@ <number>9999</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_endLabel2</cstring> </property> @@ -428,16 +428,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10_3</cstring> + <cstring>tqlayout10_3</cstring> </property> <hbox> <property name="name"> @@ -467,7 +467,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>280</width> <height>0</height> @@ -528,5 +528,8 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kendingbalancedlg.cpp b/kmymoney2/dialogs/kendingbalancedlg.cpp index 0760cc2..05b2896 100644 --- a/kmymoney2/dialogs/kendingbalancedlg.cpp +++ b/kmymoney2/dialogs/kendingbalancedlg.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,7 +46,7 @@ public: MyMoneyTransaction m_tInterest; MyMoneyTransaction m_tCharges; MyMoneyAccount m_account; - QMap<QWidget*, QString> m_helpAnchor; + TQMap<TQWidget*, TQString> m_helpAnchor; }; class KEndingBalanceLoanDlg::Private @@ -55,22 +55,22 @@ public: MyMoneyTransaction m_tInterest; MyMoneyTransaction m_tCharges; MyMoneyAccountLoan m_account; - QMap<QWidget*, QString> m_helpAnchor; + TQMap<TQWidget*, TQString> m_helpAnchor; }; -KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, QWidget *parent, const char *name) : - KEndingBalanceDlgDecl(parent, name, true), +KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, TQWidget *tqparent, const char *name) : + KEndingBalanceDlgDecl(tqparent, name, true), d(new Private) { - QString value; + TQString value; MyMoneyMoney endBalance, startBalance; d->m_account = account; MyMoneySecurity currency = MyMoneyFile::instance()->security(account.currencyId()); - m_enterInformationLabel->setText(QString("<qt>")+i18n("Please enter the following fields with the information as you find them on your statement. Make sure to enter all values in <b>%1</b>.").arg(currency.name())+QString("</qt>")); + m_enterInformationLabel->setText(TQString("<qt>")+i18n("Please enter the following fields with the information as you find them on your statement. Make sure to enter all values in <b>%1</b>.").tqarg(currency.name())+TQString("</qt>")); - m_statementDate->setDate(QDate::currentDate()); + m_statementDate->setDate(TQDate::tqcurrentDate()); // If the previous reconciliation was postponed, // we show a different first page @@ -79,8 +79,8 @@ KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, QWidget *par // if the last statement has been entered long enough ago (more than one month), // then take the last statement date and add one month and use that as statement // date. - QDate lastStatementDate = account.lastReconciliationDate(); - if(lastStatementDate.addMonths(1) < QDate::currentDate()) { + TQDate lastStatementDate = account.lastReconciliationDate(); + if(lastStatementDate.addMonths(1) < TQDate::tqcurrentDate()) { m_statementDate->setDate(lastStatementDate.addMonths(1)); } @@ -111,18 +111,18 @@ KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, QWidget *par } // We don't need to add the default into the list (see ::help() why) - // m_helpAnchor[m_startPageCheckings] = QString(""); - d->m_helpAnchor[m_interestChargeCheckings] = QString("details.reconcile.wizard.interest"); - d->m_helpAnchor[m_statementInfoPageCheckings] = QString("details.reconcile.wizard.statement"); + // m_helpAnchor[m_startPageCheckings] = TQString(""); + d->m_helpAnchor[m_interestChargeCheckings] = TQString("details.reconcile.wizard.interest"); + d->m_helpAnchor[m_statementInfoPageCheckings] = TQString("details.reconcile.wizard.statement"); value = account.value("statementDate"); if(!value.isEmpty()) - m_statementDate->setDate(QDate::fromString(value, Qt::ISODate)); + m_statementDate->setDate(TQDate::fromString(value, Qt::ISODate)); - m_lastStatementDate->setText(QString()); + m_lastStatementDate->setText(TQString()); if(account.lastReconciliationDate().isValid()) { m_lastStatementDate->setText(i18n("Last reconciled statement: %1") - .arg(KGlobal::locale()->formatDate(account.lastReconciliationDate(), true))); + .tqarg(KGlobal::locale()->formatDate(account.lastReconciliationDate(), true))); } // remove all unwanted pages @@ -131,16 +131,16 @@ KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, QWidget *par removePage(m_adjustmentTransactionPage); // connect the signals with the slots - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadEditWidgets())); - connect(m_payeeEdit, SIGNAL(createItem(const QString&, QString&)), this, SIGNAL(createPayee(const QString&, QString&))); - connect(m_interestCategoryEdit, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateInterestCategory(const QString&, QString&))); - connect(m_chargesCategoryEdit, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateChargesCategory(const QString&, QString&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadEditWidgets())); + connect(m_payeeEdit, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SIGNAL(createPayee(const TQString&, TQString&))); + connect(m_interestCategoryEdit, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateInterestCategory(const TQString&, TQString&))); + connect(m_chargesCategoryEdit, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateChargesCategory(const TQString&, TQString&))); - connect(m_interestEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_interestCategoryEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_chargesEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_chargesCategoryEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_statementDate, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotUpdateBalances())); + connect(m_interestEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_interestCategoryEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_chargesEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_chargesCategoryEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_statementDate, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotUpdateBalances())); slotReloadEditWidgets(); @@ -180,8 +180,8 @@ void KEndingBalanceDlg::slotUpdateBalances(void) filter.addState(MyMoneyTransactionFilter::cleared); filter.setReportAllSplits(true); - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > transactionList; - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; // retrieve the list from the engine MyMoneyFile::instance()->transactionList(transactionList, filter); @@ -236,22 +236,22 @@ void KEndingBalanceDlg::accept(void) KEndingBalanceDlgDecl::accept(); } -void KEndingBalanceDlg::slotCreateInterestCategory(const QString& txt, QString& id) +void KEndingBalanceDlg::slotCreateInterestCategory(const TQString& txt, TQString& id) { createCategory(txt, id, MyMoneyFile::instance()->income()); } -void KEndingBalanceDlg::slotCreateChargesCategory(const QString& txt, QString& id) +void KEndingBalanceDlg::slotCreateChargesCategory(const TQString& txt, TQString& id) { createCategory(txt, id, MyMoneyFile::instance()->expense()); } -void KEndingBalanceDlg::createCategory(const QString& txt, QString& id, const MyMoneyAccount& parent) +void KEndingBalanceDlg::createCategory(const TQString& txt, TQString& id, const MyMoneyAccount& tqparent) { MyMoneyAccount acc; acc.setName(txt); - emit createCategory(acc, parent); + emit createCategory(acc, tqparent); id = acc.id(); } @@ -273,7 +273,7 @@ const MyMoneyMoney KEndingBalanceDlg::adjustedReturnValue(const MyMoneyMoney& v) void KEndingBalanceDlg::slotReloadEditWidgets(void) { - QString payeeId, interestId, chargesId; + TQString payeeId, interestId, chargesId; // keep current selected items payeeId = m_payeeEdit->selectedItem(); @@ -351,7 +351,7 @@ bool KEndingBalanceDlg::createTransaction(MyMoneyTransaction &t, const int sign, t.addSplit(s1); t.addSplit(s2); - QMap<QString, MyMoneyMoney> priceInfo; // just empty + TQMap<TQString, MyMoneyMoney> priceInfo; // just empty MyMoneyMoney shares; if(!KCurrencyCalculator::setupSplitPrice(shares, t, s2, priceInfo, this)) { t = MyMoneyTransaction(); @@ -373,19 +373,19 @@ bool KEndingBalanceDlg::createTransaction(MyMoneyTransaction &t, const int sign, void KEndingBalanceDlg::help(void) { - QString anchor = d->m_helpAnchor[currentPage()]; + TQString anchor = d->m_helpAnchor[currentPage()]; if(anchor.isEmpty()) - anchor = QString("details.reconcile.whatis"); + anchor = TQString("details.reconcile.whatis"); kapp->invokeHelp(anchor); } -KEndingBalanceLoanDlg::KEndingBalanceLoanDlg(const MyMoneyAccount& account, QWidget *parent, const char *name) : - KEndingBalanceDlgDecl(parent, name, true), +KEndingBalanceLoanDlg::KEndingBalanceLoanDlg(const MyMoneyAccount& account, TQWidget *tqparent, const char *name) : + KEndingBalanceDlgDecl(tqparent, name, true), d(new Private) { d->m_account = account; - QDate value = account.lastReconciliationDate(); + TQDate value = account.lastReconciliationDate(); if(value.isValid()) m_startDateEdit->setDate(value.addDays(1)); else @@ -404,10 +404,10 @@ KEndingBalanceLoanDlg::KEndingBalanceLoanDlg(const MyMoneyAccount& account, QWid removePage(m_interestChargeCheckings); // connect the signals with the slots - connect(m_amortizationTotalEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_interestTotalEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished(void))); - connect(m_accountEdit, SIGNAL(stateChanged(void)), this, SLOT(slotCheckPageFinished(void))); - connect(m_categoryEdit, SIGNAL(stateChanged(void)), this, SLOT(slotCheckPageFinished(void))); + connect(m_amortizationTotalEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_interestTotalEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_accountEdit, TQT_SIGNAL(stateChanged(void)), this, TQT_SLOT(slotCheckPageFinished(void))); + connect(m_categoryEdit, TQT_SIGNAL(stateChanged(void)), this, TQT_SLOT(slotCheckPageFinished(void))); } KEndingBalanceLoanDlg::~KEndingBalanceLoanDlg() @@ -452,17 +452,17 @@ void KEndingBalanceLoanDlg::slotCheckPageFinished(void) } } -const MyMoneyMoney KEndingBalanceLoanDlg::totalInterest(const QDate& start, const QDate& end) const +const MyMoneyMoney KEndingBalanceLoanDlg::totalInterest(const TQDate& start, const TQDate& end) const { MyMoneyMoney interest; MyMoneyTransactionFilter filter(d->m_account.id()); filter.setDateFilter(start, end); - QValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList(filter); - QValueList<MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList(filter); + TQValueList<MyMoneyTransaction>::ConstIterator it_t; for(it_t = list.begin(); it_t != list.end(); ++it_t) { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s) { if((*it_s).action() == MyMoneySplit::ActionInterest) { interest += (*it_s).value(); @@ -472,7 +472,7 @@ const MyMoneyMoney KEndingBalanceLoanDlg::totalInterest(const QDate& start, cons return interest; } -const MyMoneyMoney KEndingBalanceLoanDlg::totalAmortization(const QDate& start, const QDate& end) const +const MyMoneyMoney KEndingBalanceLoanDlg::totalAmortization(const TQDate& start, const TQDate& end) const { MyMoneyMoney amortization; MyMoneyMoney adjust(1,1); @@ -482,11 +482,11 @@ const MyMoneyMoney KEndingBalanceLoanDlg::totalAmortization(const QDate& start, if(d->m_account.accountType() == MyMoneyAccount::AssetLoan) adjust = -adjust; - QValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList(filter); - QValueList<MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList(filter); + TQValueList<MyMoneyTransaction>::ConstIterator it_t; for(it_t = list.begin(); it_t != list.end(); ++it_t) { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s) { if((*it_s).accountId() == d->m_account.id() && (*it_s).action() == MyMoneySplit::ActionAmortization @@ -510,8 +510,8 @@ void KEndingBalanceLoanDlg::next(void) m_loanOverview->setText(i18n("KMyMoney has calculated the following amounts for " "interest and amortization according to recorded payments " "between %1 and %2.") - .arg(KGlobal::locale()->formatDate(m_startDateEdit->date(), true)) - .arg(KGlobal::locale()->formatDate(m_endDateEdit->date(), true))); + .tqarg(KGlobal::locale()->formatDate(m_startDateEdit->date(), true)) + .tqarg(KGlobal::locale()->formatDate(m_endDateEdit->date(), true))); // preload widgets with calculated values if they are empty if(m_amortizationTotalEdit->value().isZero() && !amortization.isZero()) @@ -600,9 +600,9 @@ const MyMoneyTransaction KEndingBalanceLoanDlg::adjustmentTransaction(void) cons void KEndingBalanceLoanDlg::help(void) { - QString anchor = d->m_helpAnchor[currentPage()]; + TQString anchor = d->m_helpAnchor[currentPage()]; if(anchor.isEmpty()) - anchor = QString("details.reconcile.whatis"); + anchor = TQString("details.reconcile.whatis"); kapp->invokeHelp(anchor); } diff --git a/kmymoney2/dialogs/kendingbalancedlg.h b/kmymoney2/dialogs/kendingbalancedlg.h index 3b9de00..67a1098 100644 --- a/kmymoney2/dialogs/kendingbalancedlg.h +++ b/kmymoney2/dialogs/kendingbalancedlg.h @@ -20,12 +20,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qdialog.h> -#include <qdatetime.h> +#include <tqwidget.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqdialog.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,13 +51,14 @@ class kMyMoneyEdit; class KEndingBalanceDlg : public KEndingBalanceDlgDecl { Q_OBJECT + TQ_OBJECT public: - KEndingBalanceDlg(const MyMoneyAccount& account, QWidget *parent=0, const char *name=0); + KEndingBalanceDlg(const MyMoneyAccount& account, TQWidget *tqparent=0, const char *name=0); ~KEndingBalanceDlg(); const MyMoneyMoney endingBalance(void) const; const MyMoneyMoney previousBalance(void) const; - const QDate statementDate(void) const { return m_statementDate->date(); }; + const TQDate statementDate(void) const { return m_statementDate->date(); }; const MyMoneyTransaction interestTransaction(void); const MyMoneyTransaction chargeTransaction(void); @@ -65,27 +66,27 @@ public: protected: bool createTransaction(MyMoneyTransaction& t, const int sign, kMyMoneyEdit *amountEdit, KMyMoneyCategory *categoryEdit, kMyMoneyDateInput* dateEdit); const MyMoneyMoney adjustedReturnValue(const MyMoneyMoney& v) const; - void createCategory(const QString& txt, QString& id, const MyMoneyAccount& parent); + void createCategory(const TQString& txt, TQString& id, const MyMoneyAccount& tqparent); protected slots: void slotCheckPageFinished(void); void slotReloadEditWidgets(void); void help(void); - void slotCreateInterestCategory(const QString& txt, QString& id); - void slotCreateChargesCategory(const QString& txt, QString& id); + void slotCreateInterestCategory(const TQString& txt, TQString& id); + void slotCreateChargesCategory(const TQString& txt, TQString& id); void accept(void); void slotUpdateBalances(void); signals: /** - * proxy signal for KMyMoneyPayeeCombo::createItem(const QString&, QString&) + * proxy signal for KMyMoneyPayeeCombo::createItem(const TQString&, TQString&) */ - void createPayee(const QString&, QString&); + void createPayee(const TQString&, TQString&); /** * emit when a category is about to be created */ - void createCategory(MyMoneyAccount& acc, const MyMoneyAccount& parent); + void createCategory(MyMoneyAccount& acc, const MyMoneyAccount& tqparent); private: /// \internal d-pointer class. @@ -102,8 +103,9 @@ private: class KEndingBalanceLoanDlg : public KEndingBalanceDlgDecl { Q_OBJECT + TQ_OBJECT public: - KEndingBalanceLoanDlg(const MyMoneyAccount& account, QWidget *parent=0, const char *name=0); + KEndingBalanceLoanDlg(const MyMoneyAccount& account, TQWidget *tqparent=0, const char *name=0); ~KEndingBalanceLoanDlg(); /** @@ -115,20 +117,20 @@ public: /** * This method returns the starting date of the statement as provided * by the user. The value returned is only valid if the dialog returned - * with QDialog::accept. + * with TQDialog::accept. */ - const QDate startDate(void) const { return m_startDateEdit->date(); }; + const TQDate startDate(void) const { return m_startDateEdit->date(); }; /** * This method returns the ending date of the statement as provided * by the user. The value returned is only valid if the dialog returned - * with QDialog::accept. + * with TQDialog::accept. */ - const QDate endDate(void) const { return m_endDateEdit->date(); }; + const TQDate endDate(void) const { return m_endDateEdit->date(); }; protected: - const MyMoneyMoney totalInterest(const QDate& start, const QDate& end) const; - const MyMoneyMoney totalAmortization(const QDate& start, const QDate& end) const; + const MyMoneyMoney totalInterest(const TQDate& start, const TQDate& end) const; + const MyMoneyMoney totalAmortization(const TQDate& start, const TQDate& end) const; public slots: void next(); diff --git a/kmymoney2/dialogs/kendingbalancedlgdecl.ui b/kmymoney2/dialogs/kendingbalancedlgdecl.ui index 0f77810..ed4d921 100644 --- a/kmymoney2/dialogs/kendingbalancedlgdecl.ui +++ b/kmymoney2/dialogs/kendingbalancedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KEndingBalanceDlgDecl</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KEndingBalanceDlgDecl</cstring> </property> @@ -15,7 +15,7 @@ <property name="caption"> <string>Reconciliation Wizard</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_startPageCheckings</cstring> </property> @@ -32,7 +32,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -43,13 +43,13 @@ All relevant information necessary for this process is usually printed on your s On the next page you will verify, that the starting and ending balance are matching those on your statement. If not, please modify the figures.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_startPageLoan</cstring> </property> @@ -66,7 +66,7 @@ On the next page you will verify, that the starting and ending balance are match <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel7</cstring> </property> @@ -75,7 +75,7 @@ On the next page you will verify, that the starting and ending balance are match Please enter the following information found on your statement:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -89,14 +89,14 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>19</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout10</cstring> </property> @@ -120,14 +120,14 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>42</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -146,7 +146,7 @@ Please enter the following information found on your statement:</string> <cstring>m_startDateEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -159,7 +159,7 @@ Please enter the following information found on your statement:</string> <cstring>m_endDateEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -179,7 +179,7 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>44</width> <height>0</height> @@ -198,7 +198,7 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -207,7 +207,7 @@ Please enter the following information found on your statement:</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_checkPaymentsPage</cstring> </property> @@ -224,18 +224,18 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_loanOverview</cstring> </property> <property name="text"> <string>1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout12</cstring> </property> @@ -259,14 +259,14 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout11</cstring> </property> @@ -280,7 +280,7 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -293,7 +293,7 @@ Please enter the following information found on your statement:</string> <cstring>m_amortizationTotalEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2_3</cstring> </property> @@ -318,7 +318,7 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>0</height> @@ -327,14 +327,14 @@ Please enter the following information found on your statement:</string> </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> <property name="text"> <string>If your statement shows different amounts, please cancel this dialog and correct the false transactions or correct the values in this dialog. In the later case, KMyMoney will create an adjustment transaction and add it to the ledger.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -348,7 +348,7 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>19</height> @@ -357,7 +357,7 @@ Please enter the following information found on your statement:</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_adjustmentTransactionPage</cstring> </property> @@ -374,18 +374,18 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel5_2</cstring> </property> <property name="text"> <string>In order to create the adjustment transaction, KMyMoney requires an account and possibly an interest category to assign the differences to. Please select an account and - if necessary - a category.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout19</cstring> </property> @@ -399,7 +399,7 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout16</cstring> </property> @@ -413,7 +413,7 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel7_2</cstring> </property> @@ -431,7 +431,7 @@ Please enter the following information found on your statement:</string> </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout18</cstring> </property> @@ -445,7 +445,7 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6_2</cstring> </property> @@ -475,7 +475,7 @@ Please enter the following information found on your statement:</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>25</height> @@ -484,7 +484,7 @@ Please enter the following information found on your statement:</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_pagePreviousPostpone</cstring> </property> @@ -501,7 +501,7 @@ Please enter the following information found on your statement:</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel8</cstring> </property> @@ -512,13 +512,13 @@ It is important, that you continue with the same statement you used when you pos All information you have entered into this wizard will be shown and all transactions that you already cleared are marked with a 'C'.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_statementInfoPageCheckings</cstring> </property> @@ -547,14 +547,14 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -578,14 +578,14 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>42</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout8</cstring> </property> @@ -599,7 +599,7 @@ All information you have entered into this wizard will be shown and all transact <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -612,7 +612,7 @@ All information you have entered into this wizard will be shown and all transact <cstring>m_statementDate</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -625,7 +625,7 @@ All information you have entered into this wizard will be shown and all transact <cstring>m_previousBalance</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -650,7 +650,7 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>46</width> <height>0</height> @@ -669,14 +669,14 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>87</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_lastStatementDate</cstring> </property> @@ -686,7 +686,7 @@ All information you have entered into this wizard will be shown and all transact </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestChargeCheckings</cstring> </property> @@ -729,16 +729,16 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> @@ -754,30 +754,30 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -808,7 +808,7 @@ All information you have entered into this wizard will be shown and all transact </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -835,9 +835,9 @@ All information you have entered into this wizard will be shown and all transact </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <hbox> <property name="name"> @@ -860,7 +860,7 @@ All information you have entered into this wizard will be shown and all transact </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -887,9 +887,9 @@ All information you have entered into this wizard will be shown and all transact </sizepolicy> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> @@ -924,7 +924,7 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>60</width> <height>20</height> @@ -943,7 +943,7 @@ All information you have entered into this wizard will be shown and all transact <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -976,5 +976,10 @@ All information you have entered into this wizard will be shown and all transact <data format="PNG" length="1114">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042149444154789c8d95c18b1c4514c67fbb29e5b54ea05b26da1d36b08d096e8b11261871837bc8e282ac7ac82187e049a317e32d37110992bf42123c694eea414c0e0bf1b0ec6c402139485a54e8810c54c10e741146fa110bd643f74c12bd642e4d75f77cf5d5ef7dafdfc2ce7087d9eff32fdfdff74e5114104011e489d6e952cce5cfbe5998692dec0c77b87aedd3fddd9f2b3efce02291082209aa3504685022e4ffd7a000a82a765c515615ce95acae659c3f7765c100ec6e575cf8f822e991025f3b6a6f890c484f181ccfc1583428f5d4e2fe84da039aa04121b40eb32483a0ec6e5bce9f8385d36fa7fb9b1b17c8f31cbfe7a95c45be94520c72b2141a1caa160d1666e24ea94aa11ee7685054159d2ada34d41387c40dc63b8844f0b5c73a4bb19cb3f9de001f2aac1fa23aa209168c004224902e29d22ff1e38abbdb275055c4800610233867311a1491847a62c98f66ac6f14d8e99072f22daa15b68a8108424d6422e24c88e3966fbce4c9d786945b27f0be0103ed13c16004d59a2c4d58df28a87548e9aee2274ab95d60c7193c9a0281fc959ae2a4450364a9e2572c7a2b43438374ef2dd2154012d050514dbec7396578a3130d9d6850066f0ad9d186f2d78cdbbb799b0a202f2c48d3aebbb418310240b112637588574bf54b8efaa4fd9b691dacbf5b305813542bae63a9eee4c4694d967b5494eca8c7ef0933bdc5d90e6a2caa0e3f013b7adce9fa5b03d637561113a30106a71d18c5fd9677058338ad01e91c0b8b743b880182ce19cd9c0e5e2b583fbdda565d3d04cfedad180942133af201b2bc3588e111c680068f489780ce69b192b279768088524f2b3458ea694d3de99a4323bc976ed34eb86b98c51993f6be10f77240c99685cd731991f1582df15aa15a213d583f5313a7806988fb8a0640e336359d9e9933568bf44062214ba19e2a7652a13d8b068ff596b807182189234e9da9f1ceb78c81b28c3ac6fe21e306c58e41d5118952acd6a0c2f56b9e6a5c72f346cdcd6b19a3bf8010010d714f89533b674c90c7189b598eab12a45fb5c75b8253672b863fbcccf5af93b6904119fe9851bf5153ac3a746ae7b9d5698c1dc58f313e70e4707ce9d84bafa2f79fc23fb8c7c1438ef04031a2642fee21060ec69ee47020796ecaa12313ccd333d1b67935047acf2be3bb11aa010dbe656cc755dbe3b772084a7ebc6d5711253b593dfcc0cc8fcd3cafda455512c7f200ec56cbfac0f1d7d34b7fdf0f98fd88a92a7e9cb0e70cc933c0b38a2c823ea0bd76c70c016adb67f47bc2a117a6d40abeea33fa23c2fb867edfb413e4a34fded94ffb3991c46dc7754cd3634ad2af490b857f5a5137126a97e02a8120a485235b6a28ef80bd077ee2b9f2d54fed04595dcbd8ddb6c4bd87334c10cadb2064e856177e7864e669fbe1df154a0142839f7ad2e5b6880bff1da66eece78e315d959f609da670f98befe6c3f45fb42672c9acff7f660000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kenterscheduledlg.cpp b/kmymoney2/dialogs/kenterscheduledlg.cpp index f39f003..47f881f 100644 --- a/kmymoney2/dialogs/kenterscheduledlg.cpp +++ b/kmymoney2/dialogs/kenterscheduledlg.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -#include <qwidgetlist.h> -#include <qlabel.h> +#include <tqtimer.h> +#include <tqwidgetlist.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -57,13 +57,13 @@ public: MyMoneySchedule m_schedule; KMyMoneyRegister::Transaction* m_item; - QWidgetList m_tabOrderWidgets; + TQWidgetList m_tabOrderWidgets; bool m_showWarningOnce; KMyMoneyUtils::EnterScheduleResultCodeE m_extendedReturnCode; }; -KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& schedule) : - KEnterScheduleDlgDecl(parent, "kenterscheduledlg"), +KEnterScheduleDlg::KEnterScheduleDlg(TQWidget *tqparent, const MyMoneySchedule& schedule) : + KEnterScheduleDlgDecl(tqparent, "kenterscheduledlg"), d(new Private) { d->m_schedule = schedule; @@ -76,7 +76,7 @@ KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& sch buttonSkip->setHidden(true); // make sure, we have a tabbar with the form - KMyMoneyTransactionForm::TabBar* tabbar = m_form->tabBar(m_form->parentWidget()); + KMyMoneyTransactionForm::TabBar* tabbar = m_form->tabBar(m_form->tqparentWidget()); // we never need to see the register m_register->hide(); @@ -103,12 +103,12 @@ KEnterScheduleDlg::KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& sch m_scheduleName->setText(d->m_schedule.name()); m_type->setText(KMyMoneyUtils::scheduleTypeToString(d->m_schedule.type())); - connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotShowHelp())); - connect(buttonIgnore, SIGNAL(clicked()), this, SLOT(slotIgnore())); - connect(buttonSkip, SIGNAL(clicked()), this, SLOT(slotSkip())); + connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp())); + connect(buttonIgnore, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotIgnore())); + connect(buttonSkip, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSkip())); // force the initial height to be as small as possible - QTimer::singleShot(0, this, SLOT(slotSetupSize())); + TQTimer::singleShot(0, this, TQT_SLOT(slotSetupSize())); } KEnterScheduleDlg::~KEnterScheduleDlg() @@ -118,7 +118,7 @@ KEnterScheduleDlg::~KEnterScheduleDlg() KMyMoneyUtils::EnterScheduleResultCodeE KEnterScheduleDlg::resultCode(void) const { - if(result() == QDialog::Accepted) + if(result() == TQDialog::Accepted) return d->m_extendedReturnCode; return KMyMoneyUtils::Cancel; } @@ -147,7 +147,7 @@ MyMoneyTransaction KEnterScheduleDlg::transaction(void) try { if (d->m_schedule.type() == MyMoneySchedule::TYPE_LOANPAYMENT) { - KMyMoneyUtils::calculateAutoLoan(d->m_schedule, t, QMap<QString, MyMoneyMoney>()); + KMyMoneyUtils::calculateAutoLoan(d->m_schedule, t, TQMap<TQString, MyMoneyMoney>()); } } catch (MyMoneyException* e) { KMessageBox::detailedError(this, i18n("Unable to load schedule details"), e->what()); @@ -155,17 +155,17 @@ MyMoneyTransaction KEnterScheduleDlg::transaction(void) } t.clearId(); - t.setEntryDate(QDate()); + t.setEntryDate(TQDate()); return t; } -QDate KEnterScheduleDlg::date(const QDate& _date) const +TQDate KEnterScheduleDlg::date(const TQDate& _date) const { - QDate date(_date); + TQDate date(_date); return d->m_schedule.adjustedDate(date, d->m_schedule.weekendOption()); } -void KEnterScheduleDlg::resizeEvent(QResizeEvent* ev) +void KEnterScheduleDlg::resizeEvent(TQResizeEvent* ev) { m_register->resize(KMyMoneyRegister::DetailColumn); m_form->resize(KMyMoneyTransactionForm::ValueColumn1); @@ -175,14 +175,14 @@ void KEnterScheduleDlg::resizeEvent(QResizeEvent* ev) void KEnterScheduleDlg::slotSetupSize(void) { - resize(width(), minimumSizeHint().height()); + resize(width(), tqminimumSizeHint().height()); } int KEnterScheduleDlg::exec(void) { if(d->m_showWarningOnce) { d->m_showWarningOnce = false; - KMessageBox::information(this, QString("<qt>")+i18n("<p>Please check that all the details in the following dialog are correct and press OK.</p><p>Editable data can be changed and can either be applied to just this occurence or for all subsequent occurences for this schedule. (You will be asked what you intend after pressing OK in the following dialog)</p>")+QString("</qt>"), i18n("Enter scheduled transaction"), "EnterScheduleDlgInfo"); + KMessageBox::information(this, TQString("<qt>")+i18n("<p>Please check that all the details in the following dialog are correct and press OK.</p><p>Editable data can be changed and can either be applied to just this occurence or for all subsequent occurences for this schedule. (You will be asked what you intend after pressing OK in the following dialog)</p>")+TQString("</qt>"), i18n("Enter scheduled transaction"), "EnterScheduleDlgInfo"); } return KEnterScheduleDlgDecl::exec(); @@ -191,7 +191,7 @@ int KEnterScheduleDlg::exec(void) TransactionEditor* KEnterScheduleDlg::startEdit(void) { KMyMoneyRegister::SelectedTransactions list(m_register); - TransactionEditor* editor = d->m_item->createEditor(m_form, list, QDate()); + TransactionEditor* editor = d->m_item->createEditor(m_form, list, TQDate()); // check that we use the same transaction commodity in all selected transactions // if not, we need to update this in the editor's list. The user can also bail out @@ -206,18 +206,18 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void) } if(editor) { - connect(editor, SIGNAL(transactionDataSufficient(bool)), buttonOk, SLOT(setEnabled(bool))); - connect(editor, SIGNAL(escapePressed()), buttonCancel, SLOT(animateClick())); - connect(editor, SIGNAL(returnPressed()), buttonOk, SLOT(animateClick())); - - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets())); - // connect(editor, SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); - connect(editor, SIGNAL(createPayee(const QString&, QString&)), kmymoney2, SLOT(slotPayeeNew(const QString&, QString&))); - connect(editor, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(editor, SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets())); - - // create the widgets, place them in the parent and load them with data + connect(editor, TQT_SIGNAL(transactionDataSufficient(bool)), buttonOk, TQT_SLOT(setEnabled(bool))); + connect(editor, TQT_SIGNAL(escapePressed()), buttonCancel, TQT_SLOT(animateClick())); + connect(editor, TQT_SIGNAL(returnPressed()), buttonOk, TQT_SLOT(animateClick())); + + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets())); + // connect(editor, TQT_SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); + connect(editor, TQT_SIGNAL(createPayee(const TQString&, TQString&)), kmymoney2, TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(editor, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(editor, TQT_SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets())); + + // create the widgets, place them in the tqparent and load them with data // setup tab order d->m_tabOrderWidgets.clear(); KMyMoneyRegister::Action action = KMyMoneyRegister::ActionWithdrawal; @@ -245,10 +245,10 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void) // if it's not a check, then we need to clear // a possibly assigned check number - if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHEQUE) { - QWidget* w = editor->haveWidget("number"); + if(d->m_schedule.paymentType() != MyMoneySchedule::STYPE_WRITECHETQUE) { + TQWidget* w = editor->haveWidget("number"); if(w) - dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(QString()); + dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(TQString()); } Q_ASSERT(!d->m_tabOrderWidgets.isEmpty()); @@ -259,17 +259,17 @@ TransactionEditor* KEnterScheduleDlg::startEdit(void) d->m_tabOrderWidgets.append(buttonHelp); // install event filter in all taborder widgets - for(QWidget* w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) { + for(TQWidget* w = d->m_tabOrderWidgets.first(); w; w = d->m_tabOrderWidgets.next()) { w->installEventFilter(this); w->installEventFilter(editor); } // Check if the editor has some preference on where to set the focus // If not, set the focus to the first widget in the tab order - QWidget* focusWidget = editor->firstWidget(); - if(!focusWidget) - focusWidget = d->m_tabOrderWidgets.first(); - focusWidget->setFocus(); + TQWidget* tqfocusWidget = editor->firstWidget(); + if(!tqfocusWidget) + tqfocusWidget = d->m_tabOrderWidgets.first(); + tqfocusWidget->setFocus(); // Make sure, we use the adjusted date kMyMoneyDateInput* dateEdit = dynamic_cast<kMyMoneyDateInput*>(editor->haveWidget("postdate")); @@ -286,13 +286,13 @@ bool KEnterScheduleDlg::focusNextPrevChild(bool next) bool rc = false; // qDebug("KGlobalLedgerView::focusNextPrevChild(editmode=%s)", m_inEditMode ? "true" : "false"); - QWidget *w = 0; - QWidget *currentWidget; + TQWidget *w = 0; + TQWidget *currentWidget; - w = qApp->focusWidget(); - while(w && d->m_tabOrderWidgets.find(w) == -1) { - // qDebug("'%s' not in list, use parent", w->className()); - w = w->parentWidget(); + w = tqApp->tqfocusWidget(); + while(w && d->m_tabOrderWidgets.tqfind(w) == -1) { + // qDebug("'%s' not in list, use tqparent", w->className()); + w = w->tqparentWidget(); } // if(w) qDebug("tab order is at '%s'", w->className()); currentWidget = d->m_tabOrderWidgets.current(); @@ -304,7 +304,7 @@ bool KEnterScheduleDlg::focusNextPrevChild(bool next) } if(w != currentWidget - && ((w->focusPolicy() & TabFocus) == TabFocus) + && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus) && w->isVisible() && w->isEnabled()) { // qDebug("Selecting '%s' as focus", w->className()); w->setFocus(); diff --git a/kmymoney2/dialogs/kenterscheduledlg.h b/kmymoney2/dialogs/kenterscheduledlg.h index 0e14ad4..8f45d75 100644 --- a/kmymoney2/dialogs/kenterscheduledlg.h +++ b/kmymoney2/dialogs/kenterscheduledlg.h @@ -39,8 +39,9 @@ class TransactionEditor; class KEnterScheduleDlg : public KEnterScheduleDlgDecl { Q_OBJECT + TQ_OBJECT public: - KEnterScheduleDlg(QWidget *parent, const MyMoneySchedule& schedule); + KEnterScheduleDlg(TQWidget *tqparent, const MyMoneySchedule& schedule); ~KEnterScheduleDlg(); TransactionEditor* startEdit(void); @@ -68,9 +69,9 @@ protected: * This method returns the adjusts @a _date according to * the setting of the schedule's weekend option. */ - QDate date(const QDate& _date) const; + TQDate date(const TQDate& _date) const; - void resizeEvent(QResizeEvent* ev); + void resizeEvent(TQResizeEvent* ev); public slots: int exec(void); diff --git a/kmymoney2/dialogs/kenterscheduledlgdecl.ui b/kmymoney2/dialogs/kenterscheduledlgdecl.ui index 3efed94..f81cdf8 100644 --- a/kmymoney2/dialogs/kenterscheduledlgdecl.ui +++ b/kmymoney2/dialogs/kenterscheduledlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KEnterScheduleDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KEnterScheduleDlgDecl</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -45,7 +45,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>70</width> <height>0</height> @@ -59,7 +59,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_scheduleName</cstring> </property> @@ -67,7 +67,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -79,7 +79,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>70</width> <height>0</height> @@ -93,7 +93,7 @@ <string>Type:</string> </property> </widget> - <widget class="QLabel" row="0" column="3"> + <widget class="TQLabel" row="0" column="3"> <property name="name"> <cstring>m_type</cstring> </property> @@ -167,7 +167,7 @@ <number>12</number> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame4</cstring> </property> @@ -219,9 +219,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -245,7 +245,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>190</width> <height>20</height> @@ -326,5 +326,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp index 4111bfa..f5014d0 100644 --- a/kmymoney2/dialogs/kequitypriceupdatedlg.cpp +++ b/kmymoney2/dialogs/kequitypriceupdatedlg.cpp @@ -24,13 +24,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qtimer.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqtimer.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,8 +61,8 @@ #define ID_COL 4 #define SOURCE_COL 5 -KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& securityId) : - KEquityPriceUpdateDlgDecl(parent), +KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(TQWidget *tqparent, const TQString& securityId) : + KEquityPriceUpdateDlgDecl(tqparent), m_fUpdateAll(false) { lvEquityList->setRootIsDecorated(false); @@ -78,8 +78,8 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec lvEquityList->setColumnWidth(ID_COL, 0); lvEquityList->setMultiSelection(true); - lvEquityList->setColumnWidthMode(SYMBOL_COL, QListView::Maximum); - lvEquityList->setColumnWidthMode(ID_COL, QListView::Manual); + lvEquityList->setColumnWidthMode(SYMBOL_COL, TQListView::Maximum); + lvEquityList->setColumnWidthMode(ID_COL, TQListView::Manual); lvEquityList->setAllColumnsShowFocus(true); btnUpdateAll->setEnabled(false); @@ -92,7 +92,7 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec // send in securityId == "XXX YYY" to get a single-shot update for XXX to YYY. // for consistency reasons, this accepts the same delimiters as WebPriceQuote::launch() - QRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); + TQRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); MyMoneySecurityPair currencyIds; if ( splitrx.search(securityId) != -1 ) currencyIds = MyMoneySecurityPair(splitrx.cap(1).utf8(),splitrx.cap(2).utf8()); @@ -104,7 +104,7 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec if ( file->security( pair.first ).isCurrency() && ( securityId.isEmpty() || ( pair == currencyIds ) ) ) { const MyMoneyPriceEntries& entries = (*it_price); - if(entries.count() > 0 && entries.begin().key() <= QDate::currentDate()) { + if(entries.count() > 0 && entries.begin().key() <= TQDate::tqcurrentDate()) { addPricePair(pair); btnUpdateAll->setEnabled(true); } @@ -115,8 +115,8 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec // Add each investment // - QValueList<MyMoneySecurity> securities = file->securityList(); - for(QValueList<MyMoneySecurity>::ConstIterator it = securities.begin(); it != securities.end(); ++it) + TQValueList<MyMoneySecurity> securities = file->securityList(); + for(TQValueList<MyMoneySecurity>::ConstIterator it = securities.begin(); it != securities.end(); ++it) { if ( !(*it).isCurrency() && ( securityId.isEmpty() || ( (*it).id() == securityId ) ) @@ -133,33 +133,33 @@ KEquityPriceUpdateDlg::KEquityPriceUpdateDlg(QWidget *parent, const QString& sec addPricePair(currencyIds, true); } - connect(btnOK, SIGNAL(clicked()), this, SLOT(accept())); - connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(btnUpdateSelected, SIGNAL(clicked()), this, SLOT(slotUpdateSelectedClicked())); - connect(btnUpdateAll, SIGNAL(clicked()), this, SLOT(slotUpdateAllClicked())); + connect(btnOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(btnCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(btnUpdateSelected, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateSelectedClicked())); + connect(btnUpdateAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateAllClicked())); - connect(&m_webQuote,SIGNAL(quote(const QString&, const QString&,const QDate&, const double&)), - this,SLOT(slotReceivedQuote(const QString&, const QString&,const QDate&, const double&))); - connect(&m_webQuote,SIGNAL(failed(const QString&, const QString&)), - this,SLOT(slotQuoteFailed(const QString&, const QString&))); - connect(&m_webQuote,SIGNAL(status(const QString&)), - this,SLOT(logStatusMessage(const QString&))); - connect(&m_webQuote,SIGNAL(error(const QString&)), - this,SLOT(logErrorMessage(const QString&))); + connect(&m_webQuote,TQT_SIGNAL(quote(const TQString&, const TQString&,const TQDate&, const double&)), + this,TQT_SLOT(slotReceivedQuote(const TQString&, const TQString&,const TQDate&, const double&))); + connect(&m_webQuote,TQT_SIGNAL(failed(const TQString&, const TQString&)), + this,TQT_SLOT(slotQuoteFailed(const TQString&, const TQString&))); + connect(&m_webQuote,TQT_SIGNAL(status(const TQString&)), + this,TQT_SLOT(logStatusMessage(const TQString&))); + connect(&m_webQuote,TQT_SIGNAL(error(const TQString&)), + this,TQT_SLOT(logErrorMessage(const TQString&))); - connect(lvEquityList, SIGNAL(selectionChanged()), this, SLOT(slotUpdateSelection())); + connect(lvEquityList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateSelection())); // Not implemented yet. btnConfigure->hide(); - //connect(btnConfigure, SIGNAL(clicked()), this, SLOT(slotConfigureClicked())); + //connect(btnConfigure, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotConfigureClicked())); if ( !securityId.isEmpty() ) { btnUpdateSelected->hide(); btnUpdateAll->hide(); - // delete layout1; + // delete tqlayout1; - QTimer::singleShot(100,this,SLOT(slotUpdateAllClicked())); + TQTimer::singleShot(100,this,TQT_SLOT(slotUpdateAllClicked())); } // Hide OK button until we have received the first update @@ -183,19 +183,19 @@ void KEquityPriceUpdateDlg::addPricePair(const MyMoneySecurityPair& pair, bool d { MyMoneyFile* file = MyMoneyFile::instance(); - QString symbol = QString("%1 > %2").arg(pair.first,pair.second); - QString id = QString("%1 %2").arg(pair.first,pair.second); - if ( ! lvEquityList->findItem(id,ID_COL,Qt::ExactMatch) ) + TQString symbol = TQString("%1 > %2").tqarg(pair.first,pair.second); + TQString id = TQString("%1 %2").tqarg(pair.first,pair.second); + if ( ! lvEquityList->tqfindItem(id,ID_COL,TQt::ExactMatch) ) { MyMoneyPrice pr = file->price(pair.first,pair.second); if(pr.source() != "KMyMoney") { bool keep = true; if((pair.first == file->baseCurrency().id()) || (pair.second == file->baseCurrency().id())) { - const QString& foreignCurrency = file->foreignCurrency(pair.first, pair.second); + const TQString& foreignCurrency = file->foreignCurrency(pair.first, pair.second); // check that the foreign currency is still in use - QValueList<MyMoneyAccount>::const_iterator it_a; - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount> list; file->accountList(list); for(it_a = list.begin(); !dontCheckExistance && it_a != list.end(); ++it_a) { // if it's an account denominated in the foreign currency @@ -219,7 +219,7 @@ void KEquityPriceUpdateDlg::addPricePair(const MyMoneySecurityPair& pair, bool d if(keep) { KListViewItem* item = new KListViewItem(lvEquityList, symbol, - i18n("%1 units in %2").arg(pair.first,pair.second)); + i18n("%1 units in %2").tqarg(pair.first,pair.second)); if(pr.isValid()) { item->setText(PRICE_COL, pr.rate(pair.second).formatMoney(file->currency(pair.second).tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision())); item->setText(DATE_COL, pr.date().toString(Qt::ISODate)); @@ -235,13 +235,13 @@ void KEquityPriceUpdateDlg::addInvestment(const MyMoneySecurity& inv) { MyMoneyFile* file = MyMoneyFile::instance(); - QString symbol = inv.tradingSymbol(); - QString id = inv.id(); - if ( ! lvEquityList->findItem(id, ID_COL, Qt::ExactMatch) ) + TQString symbol = inv.tradingSymbol(); + TQString id = inv.id(); + if ( ! lvEquityList->tqfindItem(id, ID_COL, TQt::ExactMatch) ) { // check that the security is still in use - QValueList<MyMoneyAccount>::const_iterator it_a; - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount> list; file->accountList(list); for(it_a = list.begin(); it_a != list.end(); ++it_a) { if((*it_a).isInvest() @@ -260,7 +260,7 @@ void KEquityPriceUpdateDlg::addInvestment(const MyMoneySecurity& inv) } item->setText(ID_COL,id); if (inv.value("kmm-online-quote-system") == "Finance::Quote") - item->setText(SOURCE_COL, QString("Finance::Quote %1").arg( inv.value("kmm-online-source"))); + item->setText(SOURCE_COL, TQString("Finance::Quote %1").tqarg( inv.value("kmm-online-source"))); else item->setText(SOURCE_COL, inv.value("kmm-online-source")); @@ -275,40 +275,40 @@ void KEquityPriceUpdateDlg::addInvestment(const MyMoneySecurity& inv) } } -void KEquityPriceUpdateDlg::logErrorMessage(const QString& message) +void KEquityPriceUpdateDlg::logErrorMessage(const TQString& message) { - logStatusMessage(QString("<font color=\"red\"><b>") + message + QString("</b></font>")); + logStatusMessage(TQString("<font color=\"red\"><b>") + message + TQString("</b></font>")); } -void KEquityPriceUpdateDlg::logStatusMessage(const QString& message) +void KEquityPriceUpdateDlg::logStatusMessage(const TQString& message) { - lbStatus->append(message); + lbtqStatus->append(message); } -MyMoneyPrice KEquityPriceUpdateDlg::price(const QString& id) const +MyMoneyPrice KEquityPriceUpdateDlg::price(const TQString& id) const { MyMoneyPrice price; - QListViewItem* item; + TQListViewItem* item; - if((item = lvEquityList->findItem(id, ID_COL, Qt::ExactMatch)) != 0) { + if((item = lvEquityList->tqfindItem(id, ID_COL, TQt::ExactMatch)) != 0) { MyMoneyMoney rate(item->text(PRICE_COL)); if ( !rate.isZero() ) { - QString id = item->text(ID_COL).utf8(); + TQString id = item->text(ID_COL).utf8(); // if the ID has a space, then this is TWO ID's, so it's a currency quote - if ( QString(id).contains(" ") ) + if ( TQString(id).tqcontains(" ") ) { - QStringList ids = QStringList::split(" ",QString(id)); - QString fromid = ids[0].utf8(); - QString toid = ids[1].utf8(); - price = MyMoneyPrice(fromid,toid,QDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); + TQStringList ids = TQStringList::split(" ",TQString(id)); + TQString fromid = ids[0].utf8(); + TQString toid = ids[1].utf8(); + price = MyMoneyPrice(fromid,toid,TQDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); } else // otherwise, it's a security quote { MyMoneySecurity security = MyMoneyFile::instance()->security(id); - price = MyMoneyPrice(id, security.tradingCurrency(), QDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); + price = MyMoneyPrice(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); } } } @@ -320,11 +320,11 @@ void KEquityPriceUpdateDlg::storePrices(void) // update the new prices into the equities MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySecurity> equities = file->securityList(); + TQValueList<MyMoneySecurity> equities = file->securityList(); - QListViewItem* item = lvEquityList->firstChild(); + TQListViewItem* item = lvEquityList->firstChild(); MyMoneyFileTransaction ft; - QString name; + TQString name; try { while ( item ) { @@ -334,16 +334,16 @@ void KEquityPriceUpdateDlg::storePrices(void) MyMoneyMoney rate(item->text(PRICE_COL)); if ( !rate.isZero() ) { - QString id = item->text(ID_COL).utf8(); + TQString id = item->text(ID_COL).utf8(); // if the ID has a space, then this is TWO ID's, so it's a currency quote - if ( QString(id).contains(" ") ) + if ( TQString(id).tqcontains(" ") ) { - QStringList ids = QStringList::split(" ",QString(id)); - QString fromid = ids[0].utf8(); - QString toid = ids[1].utf8(); - name = QString("%1 --> %2").arg(fromid).arg(toid); - MyMoneyPrice price(fromid,toid,QDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); + TQStringList ids = TQStringList::split(" ",TQString(id)); + TQString fromid = ids[0].utf8(); + TQString toid = ids[1].utf8(); + name = TQString("%1 --> %2").tqarg(fromid).tqarg(toid); + MyMoneyPrice price(fromid,toid,TQDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); file->addPrice(price); } else @@ -351,7 +351,7 @@ void KEquityPriceUpdateDlg::storePrices(void) { MyMoneySecurity security = MyMoneyFile::instance()->security(id); name = security.name(); - MyMoneyPrice price(id, security.tradingCurrency(), QDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); + MyMoneyPrice price(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); // TODO (Ace) Better handling of the case where there is already a price // for this date. Currently, it just overrides the old value. Really it @@ -374,7 +374,7 @@ void KEquityPriceUpdateDlg::slotUpdateSelection(void) { btnUpdateSelected->setEnabled(false); - QListViewItem* item = lvEquityList->firstChild(); + TQListViewItem* item = lvEquityList->firstChild(); while ( item && !item->isSelected()) item = item->nextSibling(); @@ -384,7 +384,7 @@ void KEquityPriceUpdateDlg::slotUpdateSelection(void) void KEquityPriceUpdateDlg::slotUpdateSelectedClicked(void) { - QListViewItem* item = lvEquityList->firstChild(); + TQListViewItem* item = lvEquityList->firstChild(); int skipCnt = 1; while ( item && !item->isSelected()) { @@ -403,7 +403,7 @@ void KEquityPriceUpdateDlg::slotUpdateSelectedClicked(void) void KEquityPriceUpdateDlg::slotUpdateAllClicked(void) { - QListViewItem* item = lvEquityList->firstChild(); + TQListViewItem* item = lvEquityList->firstChild(); if ( item ) { prgOnlineProgress->setTotalSteps(1+lvEquityList->childCount()); @@ -415,16 +415,16 @@ void KEquityPriceUpdateDlg::slotUpdateAllClicked(void) logErrorMessage("Security list is empty."); } -void KEquityPriceUpdateDlg::slotQuoteFailed(const QString& _id, const QString& _symbol) +void KEquityPriceUpdateDlg::slotQuoteFailed(const TQString& _id, const TQString& _symbol) { - QListViewItem* item = lvEquityList->findItem(_id,ID_COL,Qt::ExactMatch); + TQListViewItem* item = lvEquityList->tqfindItem(_id,ID_COL,TQt::ExactMatch); // Give the user some options int result; - if(_id.contains(" ")) { - result = KMessageBox::warningContinueCancel(this, i18n("Failed to retrieve an exchange rate for %1 from %2. It will be skipped this time.").arg(_symbol, item->text(SOURCE_COL)), i18n("Price Update Failed")); + if(_id.tqcontains(" ")) { + result = KMessageBox::warningContinueCancel(this, i18n("Failed to retrieve an exchange rate for %1 from %2. It will be skipped this time.").tqarg(_symbol, item->text(SOURCE_COL)), i18n("Price Update Failed")); } else { - result = KMessageBox::questionYesNoCancel(this, QString("<qt>%1</qt>").arg(i18n("Failed to retrieve a quote for %1 from %2. Press <b>No</b> to remove the online price source from this security permanently, <b>Yes</b> to continue updating this security during future price updates or <b>Cancel</b> to stop the current update operation.").arg(_symbol, item->text(SOURCE_COL))), i18n("Price Update Failed"), KStdGuiItem::yes(), KStdGuiItem::no()); + result = KMessageBox::questionYesNoCancel(this, TQString("<qt>%1</qt>").tqarg(i18n("Failed to retrieve a quote for %1 from %2. Press <b>No</b> to remove the online price source from this security permanently, <b>Yes</b> to continue updating this security during future price updates or <b>Cancel</b> to stop the current update operation.").tqarg(_symbol, item->text(SOURCE_COL))), i18n("Price Update Failed"), KStdGuiItem::yes(), KStdGuiItem::no()); } if ( result == KMessageBox::No ) @@ -437,14 +437,14 @@ void KEquityPriceUpdateDlg::slotQuoteFailed(const QString& _id, const QString& _ MyMoneySecurity security = MyMoneyFile::instance()->security(_id.utf8()); // Set the quote source to blank - security.setValue("kmm-online-source",QString()); - security.setValue("kmm-online-quote-system",QString()); + security.setValue("kmm-online-source",TQString()); + security.setValue("kmm-online-quote-system",TQString()); // Re-commit the security MyMoneyFile::instance()->modifySecurity(security); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error(this, QString("<qt>")+i18n("Cannot update security <b>%1</b>: %2").arg(_symbol, e->what())+QString("</qt>"), i18n("Price Update Failed")); + KMessageBox::error(this, TQString("<qt>")+i18n("Cannot update security <b>%1</b>: %2").tqarg(_symbol, e->what())+TQString("</qt>"), i18n("Price Update Failed")); delete e; } } @@ -452,7 +452,7 @@ void KEquityPriceUpdateDlg::slotQuoteFailed(const QString& _id, const QString& _ // As long as the user doesn't want to cancel, move on! if ( result != KMessageBox::Cancel ) { - QListViewItem* next = NULL; + TQListViewItem* next = NULL; prgOnlineProgress->advance(1); item->listView()->setSelected(item, false); @@ -482,25 +482,25 @@ void KEquityPriceUpdateDlg::slotQuoteFailed(const QString& _id, const QString& _ } } -void KEquityPriceUpdateDlg::slotReceivedQuote(const QString& _id, const QString& _symbol,const QDate& _date, const double& _price) +void KEquityPriceUpdateDlg::slotReceivedQuote(const TQString& _id, const TQString& _symbol,const TQDate& _date, const double& _price) { - QListViewItem* item = lvEquityList->findItem(_id,ID_COL,Qt::ExactMatch); - QListViewItem* next = NULL; + TQListViewItem* item = lvEquityList->tqfindItem(_id,ID_COL,TQt::ExactMatch); + TQListViewItem* next = NULL; if ( item ) { if ( _price > 0.0f && _date.isValid() ) { - QDate date = _date; - if ( date > QDate::currentDate() ) - date = QDate::currentDate(); + TQDate date = _date; + if ( date > TQDate::tqcurrentDate() ) + date = TQDate::tqcurrentDate(); double price = _price; - QString id = _id.utf8(); + TQString id = _id.utf8(); MyMoneySecurity sec; - if ( _id.contains(" ") == 0) { + if ( _id.tqcontains(" ") == 0) { MyMoneySecurity security = MyMoneyFile::instance()->security(id); - QString factor = security.value("kmm-online-factor"); + TQString factor = security.value("kmm-online-factor"); if(!factor.isEmpty()) { price *= MyMoneyMoney(factor).toDouble(); } @@ -513,7 +513,7 @@ void KEquityPriceUpdateDlg::slotReceivedQuote(const QString& _id, const QString& } } else { - QRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); + TQRegExp splitrx("([0-9a-z\\.]+)[^a-z0-9]+([0-9a-z\\.]+)",false /*case sensitive*/); if ( splitrx.search(_id) != -1 ) { try { sec = MyMoneyFile::instance()->security(splitrx.cap(2).utf8()); @@ -525,13 +525,13 @@ void KEquityPriceUpdateDlg::slotReceivedQuote(const QString& _id, const QString& } item->setText(PRICE_COL, KGlobal::locale()->formatMoney(price, sec.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision())); item->setText(DATE_COL, date.toString(Qt::ISODate)); - logStatusMessage(i18n("Price for %1 updated (id %2)").arg(_symbol,_id)); + logStatusMessage(i18n("Price for %1 updated (id %2)").tqarg(_symbol,_id)); // make sure to make OK button available btnOK->setEnabled(true); } else { - logErrorMessage(i18n("Received an invalid price for %1, unable to update.").arg(_symbol)); + logErrorMessage(i18n("Received an invalid price for %1, unable to update.").tqarg(_symbol)); } prgOnlineProgress->advance(1); @@ -551,7 +551,7 @@ void KEquityPriceUpdateDlg::slotReceivedQuote(const QString& _id, const QString& } else { - logErrorMessage(i18n("Received a price for %1 (id %2), but this symbol is not on the list! Aborting entire update.").arg(_symbol,_id)); + logErrorMessage(i18n("Received a price for %1 (id %2), but this symbol is not on the list! Aborting entire update.").tqarg(_symbol,_id)); } if (next) diff --git a/kmymoney2/dialogs/kequitypriceupdatedlg.h b/kmymoney2/dialogs/kequitypriceupdatedlg.h index 7dbc6a5..a5a0bac 100644 --- a/kmymoney2/dialogs/kequitypriceupdatedlg.h +++ b/kmymoney2/dialogs/kequitypriceupdatedlg.h @@ -20,16 +20,16 @@ * * ***************************************************************************/ -#ifndef KEQUITYPRICEUPDATEDIALOG_H -#define KEQUITYPRICEUPDATEDIALOG_H +#ifndef KETQUITYPRICEUPDATEDIALOG_H +#define KETQUITYPRICEUPDATEDIALOG_H // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qpair.h> -#include <qdatastream.h> -class QListViewItem; +#include <tqwidget.h> +#include <tqpair.h> +#include <tqdatastream.h> +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -51,21 +51,22 @@ class QListViewItem; class KEquityPriceUpdateDlg : public KEquityPriceUpdateDlgDecl { Q_OBJECT + TQ_OBJECT public: - KEquityPriceUpdateDlg(QWidget *parent, const QString& securityId = QString()); + KEquityPriceUpdateDlg(TQWidget *tqparent, const TQString& securityId = TQString()); ~KEquityPriceUpdateDlg(); void storePrices(void); - MyMoneyPrice price(const QString& id) const; + MyMoneyPrice price(const TQString& id) const; protected slots: void slotUpdateSelectedClicked(void); void slotUpdateAllClicked(void); void slotUpdateSelection(void); - void logStatusMessage(const QString&); - void logErrorMessage(const QString&); - void slotReceivedQuote(const QString&, const QString&,const QDate&, const double&); - void slotQuoteFailed(const QString& _id, const QString& _symbol); + void logStatusMessage(const TQString&); + void logErrorMessage(const TQString&); + void slotReceivedQuote(const TQString&, const TQString&,const TQDate&, const double&); + void slotQuoteFailed(const TQString& _id, const TQString& _symbol); protected: void addPricePair(const MyMoneySecurityPair& pair, bool dontCheckExistance = false); diff --git a/kmymoney2/dialogs/kequitypriceupdatedlgdecl.ui b/kmymoney2/dialogs/kequitypriceupdatedlgdecl.ui index a06c44d..91a1fc6 100644 --- a/kmymoney2/dialogs/kequitypriceupdatedlgdecl.ui +++ b/kmymoney2/dialogs/kequitypriceupdatedlgdecl.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KEquityPriceUpdateDlgDecl</class> <author>Kevin Tambascio <ktambascio@users.sourceforge.net></author> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kequitypriceupdatedlgdecl</cstring> </property> @@ -24,7 +24,7 @@ <property name="name"> <cstring>lvEquityList</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>350</width> <height>0</height> @@ -49,9 +49,9 @@ <string>List of known Equities, and the date they were last updated on.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -75,7 +75,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -100,17 +100,17 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> - <string>Status:</string> + <string>tqStatus:</string> </property> </widget> <widget class="KTextEdit"> <property name="name"> - <cstring>lbStatus</cstring> + <cstring>lbtqStatus</cstring> </property> <property name="textFormat"> <enum>LogText</enum> @@ -121,9 +121,9 @@ <cstring>prgOnlineProgress</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -139,7 +139,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> @@ -175,5 +175,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kexportdlg.cpp b/kmymoney2/dialogs/kexportdlg.cpp index c00e3cf..701d138 100644 --- a/kmymoney2/dialogs/kexportdlg.cpp +++ b/kmymoney2/dialogs/kexportdlg.cpp @@ -20,20 +20,16 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qlineedit.h> -#include <qlabel.h> -#include <qpixmap.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // KDE Headers #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif #include <kmessagebox.h> #include <kfiledialog.h> #include <kpushbutton.h> @@ -49,8 +45,8 @@ #include "../widgets/kmymoneyaccountcombo.h" #include "../kmymoneyutils.h" -KExportDlg::KExportDlg(QWidget *parent) - : KExportDlgDecl(parent, 0, true) +KExportDlg::KExportDlg(TQWidget *tqparent) + : KExportDlgDecl(tqparent, 0, true) { // Set (almost) all the last used options readConfig(); @@ -63,40 +59,40 @@ KExportDlg::KExportDlg(QWidget *parent) m_qbuttonCancel->setGuiItem(KStdGuiItem::cancel()); KGuiItem okButtenItem( i18n( "&Export" ), - QIconSet(il->loadIcon("fileexport", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("fileexport", KIcon::Small, KIcon::SizeSmall)), i18n("Start operation"), i18n("Use this to start the export operation")); m_qbuttonOk->setGuiItem(okButtenItem); KGuiItem browseButtenItem( i18n( "&Browse..." ), - QIconSet(il->loadIcon("fileopen", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("fileopen", KIcon::Small, KIcon::SizeSmall)), i18n("Select filename"), i18n("Use this to select a filename to export to")); m_qbuttonBrowse->setGuiItem(browseButtenItem); KGuiItem newButtenItem( i18n( "&New..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new profile"), i18n("Use this to open the profile editor")); m_profileEditorButton->setGuiItem(newButtenItem); // connect the buttons to their functionality - connect(m_qbuttonBrowse, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) ); - connect(m_profileEditorButton, SIGNAL(clicked()), this, SLOT(slotNewProfile())); - connect(m_qbuttonOk, SIGNAL(clicked()), this, SLOT(slotOkClicked())); - connect(m_qbuttonCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(m_qbuttonBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowse() ) ); + connect(m_profileEditorButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewProfile())); + connect(m_qbuttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOkClicked())); + connect(m_qbuttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); // connect the change signals to the check slot and perform initial check - connect(m_qlineeditFile, SIGNAL(textChanged(const QString&)), this, SLOT(checkData())); - connect(m_qcheckboxAccount, SIGNAL(toggled(bool)), this, SLOT(checkData())); - connect(m_qcheckboxCategories, SIGNAL(toggled(bool)), this, SLOT(checkData())); - connect(m_accountComboBox, SIGNAL(accountSelected(const QString&)), this, SLOT(checkData(const QString&))); - connect(m_profileComboBox, SIGNAL(highlighted(int)), this, SLOT(checkData())); - connect(m_kmymoneydateStart, SIGNAL(dateChanged(const QDate&)), this, SLOT(checkData())); - connect(m_kmymoneydateEnd, SIGNAL(dateChanged(const QDate&)), this, SLOT(checkData())); - - checkData(QString()); + connect(m_qlineeditFile, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkData())); + connect(m_qcheckboxAccount, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkData())); + connect(m_qcheckboxCategories, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkData())); + connect(m_accountComboBox, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(checkData(const TQString&))); + connect(m_profileComboBox, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(checkData())); + connect(m_kmymoneydateStart, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(checkData())); + connect(m_kmymoneydateEnd, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(checkData())); + + checkData(TQString()); } KExportDlg::~KExportDlg() @@ -105,15 +101,15 @@ KExportDlg::~KExportDlg() void KExportDlg::slotBrowse() { - QString newName(KFileDialog::getSaveFileName(QString::null,"*.QIF")); - KMyMoneyUtils::appendCorrectFileExt(newName, QString("qif")); + TQString newName(KFileDialog::getSaveFileName(TQString(),"*.TQIF")); + KMyMoneyUtils::appendCorrectFileExt(newName, TQString("qif")); if (!newName.isEmpty()) m_qlineeditFile->setText(newName); } void KExportDlg::slotNewProfile(void) { - MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "QIF Profile Editor"); + MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "TQIF Profile Editor"); if(editor->exec()) { m_profileComboBox->setCurrentText(editor->selectedProfile()); loadProfiles(); @@ -129,11 +125,11 @@ void KExportDlg::loadProfiles(const bool selectLast) edit->slotOk(); delete edit; - QString current = m_profileComboBox->currentText(); + TQString current = m_profileComboBox->currentText(); m_profileComboBox->clear(); - QStringList list; + TQStringList list; KConfig* config = KGlobal::config(); config->setGroup("Profiles"); @@ -147,7 +143,7 @@ void KExportDlg::loadProfiles(const bool selectLast) } m_profileComboBox->setCurrentItem(0); - if(list.contains(current) > 0) + if(list.tqcontains(current) > 0) m_profileComboBox->setCurrentText(current); } @@ -178,19 +174,19 @@ void KExportDlg::writeConfig(void) kconfig->writeEntry("KExportDlg_LastFile", m_qlineeditFile->text()); kconfig->writeEntry("KExportDlg_AccountOpt", m_qcheckboxAccount->isChecked()); kconfig->writeEntry("KExportDlg_CatOpt", m_qcheckboxCategories->isChecked()); - kconfig->writeEntry("KExportDlg_StartDate", QDateTime(m_kmymoneydateStart->date())); - kconfig->writeEntry("KExportDlg_EndDate", QDateTime(m_kmymoneydateEnd->date())); + kconfig->writeEntry("KExportDlg_StartDate", TQDateTime(m_kmymoneydateStart->date())); + kconfig->writeEntry("KExportDlg_EndDate", TQDateTime(m_kmymoneydateEnd->date())); kconfig->writeEntry("KExportDlg_LastProfile", m_profileComboBox->currentText()); kconfig->sync(); } -void KExportDlg::checkData(const QString& accountId) +void KExportDlg::checkData(const TQString& accountId) { bool okEnabled = false; if(!m_qlineeditFile->text().isEmpty()) { - QString strFile(m_qlineeditFile->text()); - if(KMyMoneyUtils::appendCorrectFileExt(strFile, QString("qif"))) + TQString strFile(m_qlineeditFile->text()); + if(KMyMoneyUtils::appendCorrectFileExt(strFile, TQString("qif"))) m_qlineeditFile->setText(strFile); } @@ -200,8 +196,8 @@ void KExportDlg::checkData(const QString& accountId) account = file->account(accountId); if(m_lastAccount != accountId) { MyMoneyTransactionFilter filter(accountId); - QValueList<MyMoneyTransaction> list = file->transactionList(filter); - QValueList<MyMoneyTransaction>::Iterator it; + TQValueList<MyMoneyTransaction> list = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::Iterator it; if(!list.isEmpty()) { it = list.begin(); @@ -228,14 +224,14 @@ void KExportDlg::checkData(const QString& accountId) void KExportDlg::loadAccounts(void) { /* - QStringList strList; + TQStringList strList; try { MyMoneyFile *file = MyMoneyFile::instance(); // read all account items from the MyMoneyFile objects and add them to the listbox - addCategories(strList, file->liability().id(), QString()); - addCategories(strList, file->asset().id(), QString()); + addCategories(strList, file->liability().id(), TQString()); + addCategories(strList, file->asset().id(), TQString()); } catch (MyMoneyException *e) { qDebug("Exception '%s' thrown in %s, line %ld caught in KExportDlg::loadAccounts:%d", @@ -247,26 +243,26 @@ void KExportDlg::loadAccounts(void) /* m_accountComboBox->setCurrentItem(0); - if(strList.contains(current) > 0) + if(strList.tqcontains(current) > 0) m_accountComboBox->setCurrentText(current); */ } -QString KExportDlg::accountId() const +TQString KExportDlg::accountId() const { return m_lastAccount; } /* -void KExportDlg::addCategories(QStringList& strList, const QString& id, const QString& leadIn) const +void KExportDlg::addCategories(TQStringList& strList, const TQString& id, const TQString& leadIn) const { MyMoneyFile *file = MyMoneyFile::instance(); - QString name; + TQString name; MyMoneyAccount account = file->account(id); - QStringList accList = account.accountList(); - QStringList::ConstIterator it_a; + TQStringList accList = account.accountList(); + TQStringList::ConstIterator it_a; for(it_a = accList.begin(); it_a != accList.end(); ++it_a) { account = file->account(*it_a); @@ -275,7 +271,7 @@ void KExportDlg::addCategories(QStringList& strList, const QString& id, const QS } } -QString KExportDlg::accountId(const QString& account) const +TQString KExportDlg::accountId(const TQString& account) const { return MyMoneyFile::instance()->nameToAccount(account); } diff --git a/kmymoney2/dialogs/kexportdlg.h b/kmymoney2/dialogs/kexportdlg.h index cad5091..9afca12 100644 --- a/kmymoney2/dialogs/kexportdlg.h +++ b/kmymoney2/dialogs/kexportdlg.h @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qstring.h> -#include <qcheckbox.h> +#include <tqstring.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -39,9 +39,9 @@ /** * This class is used to select the required user input to export - * a specified account to the popular QIF format. - * It relies upon the QIF file handling routines in MyMoneyQifProfile and - * MyMoneyQifWriter to do the actual writing of QIF files. + * a specified account to the popular TQIF format. + * It relies upon the TQIF file handling routines in MyMoneyQifProfile and + * MyMoneyQifWriter to do the actual writing of TQIF files. * * It uses the global KConfig object to read and write the application * settings. @@ -50,47 +50,48 @@ * * @author Felix Rodriguez, Michael Edwardes, Thomas Baumgart 2000-2003 * - * @short A class to select user data required to export a specified account to the popular QIF format. + * @short A class to select user data required to export a specified account to the popular TQIF format. **/ class KExportDlg : public KExportDlgDecl { Q_OBJECT + TQ_OBJECT public: - KExportDlg(QWidget *parent); + KExportDlg(TQWidget *tqparent); ~KExportDlg(); /** * This method returns the filename entered into the edit field * - * @return QString with filename + * @return TQString with filename */ - const QString filename(void) const { return m_qlineeditFile->text(); }; + const TQString filename(void) const { return m_qlineeditFile->text(); }; /** * This method returns the account id that has been selected for export * - * @return QString with account id + * @return TQString with account id */ - QString accountId(void) const; + TQString accountId(void) const; /** * This method returns the name of the profile that has been selected * for the export operation * - * @return QString with profile name + * @return TQString with profile name */ - const QString profile(void) const { return m_profileComboBox->currentText(); }; + const TQString profile(void) const { return m_profileComboBox->currentText(); }; /** * This method returns the start date of the export dialog */ - const QDate startDate(void) const { return m_kmymoneydateStart->date(); }; + const TQDate startDate(void) const { return m_kmymoneydateStart->date(); }; /** * This method returns the end date of the export dialog */ - const QDate endDate(void) const { return m_kmymoneydateEnd->date(); }; + const TQDate endDate(void) const { return m_kmymoneydateEnd->date(); }; /** * This method returns the state of the account checkbox @@ -109,7 +110,7 @@ protected slots: void slotOkClicked(); /** - * Called when the user needs to browse the filesystem for a QIF file + * Called when the user needs to browse the filesystem for a TQIF file */ void slotBrowse(); @@ -130,7 +131,7 @@ protected slots: * * @param account The id of the selected account. */ - void checkData(const QString& account = QString()); + void checkData(const TQString& account = TQString()); private: void readConfig(void); @@ -162,7 +163,7 @@ private: * @param id Account id to add * @param leadIn constant leadin to be added in front of the account name */ - // void addCategories(QStringList& strList, const QString& id, const QString& leadIn) const; + // void addCategories(TQStringList& strList, const TQString& id, const TQString& leadIn) const; /** * This method is used to return the account id of a given account name @@ -171,10 +172,10 @@ private: * @return the ID of the account will be returned. * See MyMoneyFile::nameToAccount() for details. */ - // QString accountId(const QString& account) const; + // TQString accountId(const TQString& account) const; private: - QString m_lastAccount; + TQString m_lastAccount; }; #endif diff --git a/kmymoney2/dialogs/kexportdlgdecl.ui b/kmymoney2/dialogs/kexportdlgdecl.ui index 5425210..922355d 100644 --- a/kmymoney2/dialogs/kexportdlgdecl.ui +++ b/kmymoney2/dialogs/kexportdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KExportDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KExportDlgDecl</cstring> </property> @@ -20,7 +20,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout7</cstring> </property> @@ -34,7 +34,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -57,7 +57,7 @@ You can choose the file's path, the account and the format of the QIF file (profile). Choose Account to export all the transactions between the specified dates or just categories. You can also limit the transactions that are exported by start and ending date. Once you have pressed the Export button a message box will appear when the export has completed detailing how many transactions, categories and payees were exported.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop|AlignLeft</set> </property> <property name="wordwrap" stdset="0"> @@ -79,7 +79,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout45</cstring> </property> @@ -93,7 +93,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>lblFileExport</cstring> </property> @@ -109,7 +109,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <string>File to export to:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_qlineeditFile</cstring> </property> @@ -130,23 +130,23 @@ You can choose the file's path, the account and the format of the QIF file (prof </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -161,7 +161,7 @@ You can choose the file's path, the account and the format of the QIF file (prof </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout47</cstring> </property> @@ -175,7 +175,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -183,7 +183,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <string>QIF Profile</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout46</cstring> </property> @@ -209,7 +209,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>0</height> @@ -233,15 +233,15 @@ You can choose the file's path, the account and the format of the QIF file (prof </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_qgroupboxContents</cstring> </property> @@ -258,7 +258,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_qcheckboxAccount</cstring> </property> @@ -266,7 +266,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <string>Account</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_qcheckboxCategories</cstring> </property> @@ -276,7 +276,7 @@ You can choose the file's path, the account and the format of the QIF file (prof </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_qgroupboxDates</cstring> </property> @@ -293,9 +293,9 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <grid> <property name="name"> @@ -306,7 +306,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <cstring>m_kmymoneydateStart</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblEndDate</cstring> </property> @@ -318,7 +318,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>0</height> @@ -328,7 +328,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <string>End on:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblStartDate</cstring> </property> @@ -340,7 +340,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>50</width> <height>0</height> @@ -377,7 +377,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>230</width> <height>16</height> @@ -400,7 +400,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout49</cstring> </property> @@ -424,7 +424,7 @@ You can choose the file's path, the account and the format of the QIF file (prof <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>451</width> <height>0</height> @@ -503,5 +503,5 @@ You can choose the file's path, the account and the format of the QIF file (prof <data format="XPM.GZ" length="3368">789c9595c94eeb581086f73c4544ed50ab6eecd889ad562f1802843961a6d58b632764228c616cf5bb77f9d45fe75e11165c4c703e55d55fc319f8b152bb38daafadfc587a9abbf9b8ac9523f7585be93fcf66ef7ffff3d7bf4bcb715c93df2891d7f21f4bcb5cd4cadac1ddedc003fd02ddf9af16274075ffe3b91738f33c01276aa722b0b753ec390b7c0cce107f092e238d7fa838aa578fe713b0c5bf1aabdddd8033e49f1923be052e11df31867dc77366fe1c81cdbeab1c5b3d4d30f2d351c571dd988fc196ffda731e43cf811b98a79b06d6fa5e8c11ff1458e775054ec0dd8a1b91f9731d9ca9dd0d9513d35ff79c9b9dc7c68ddcdbf7c125ecefca16cf7e9e4994987dcfb34b73d86363e41f559cc6691ff93f8c119f2a3723b5bb8931faffc91abf691cabfd0e9c42ffd21876bf9ea90bf946c6a9f37ca66cf16e0c463fb46a8cf95e0456bb3346be3ad8fa3d34463fcf153763b33b678cf853e516e6415bc688bf31567fde04a7e8cffcd13ffbf56f4afea6ef971265f157bdd218f9d7c0e8878fc0a88ffdfe6f355a51abe1b9ad9c59ff0781fd7e62afdf2a5a79abf0f63765f377857123f2f67bb0e5f3e7256bb4f24cf3ed83fbcad4530efe99e722373e5476981faf05d679ad1aa3fe0b63ad8737c0982fed19c33ea8384ff2284f3c1f283b9be746609dc79bb19e37877837403d3bca458cf3531a23de9fdfbc147fed673bb0d6f7688cfc5960cdd737c6bc87caa2affe8dc09aefc338d17e3be026f291b1fad318ecb0bf38b0f677628cf5f1f7ab4b4c8f7363d4731b58eb2763d43f02231f9f0656bd8631f44cdfe6d535c67afaf9b8d245aef43c05a7e04439c44f8d511f2b9736cf79609d0ff44b9bd719d8ea7b0763fdd89f8742ea6beabfed73e53206df05d6fbecd618e7f311dc84ff0bd82993df7f453fd81f02abdecc58f737a56087fbf3d518f14f81f5bed17afb7dac07b58dd19fbfcfcab418383d3f73e550df36d8fa7f0eacfa57ca03ccbb3b67928ffbc6435eaf10ef92fb3ce06b1e7ef18c78cc138d80bee329dff08c6ff98eeff9811ff989e7fcecdf2ffcca6ffcfed39f0bf93610ef0f5ee5355ee70d6ef3266fc9df6deec8b3c3bbbcf7497f5fb40ff8503c8eb8cb3d6fedf1b1d0099f4accd927fd219f7bef0bf1eaf1255f719d23ff3de606279c7ed26f4addeba25629b738e39c98881c891695d45fd4a7016fd075e54d431ad1980f684253bae11ecde896ee16f41fe95e6c0f9c55def4484f92ab4573afd1a6e785fa5f65264ebc72effd22b1aff446eff421d60b5a5dd09fd39af8af134b254fbe8f8836a84d958aa3ad85fab765de3dea48979b555db4237ebbb447fbf23ea0c3c5fa799b643ea2d595ba7ba2bd2b9e0f744c27dca0d32feaef5029fe056f499767744e173413cb842ee98aea5fe877a4d7a85a577aa148a6b94fb1ecb3091d5183924ffa234a659f9c4ae61b8e6cffd2896837a945d9c2fa8e650fcadea2bc72e3b69399b842a2afe41eebbb81bbfea43f7143d983a91b714a776e4cab74e89f3a6db9899bba9b4ffadf7c82fe6ff857e7f7f7f425e25b39baf3e5fffe5cfa1fdc4beba0</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kfindtransactiondlg.cpp b/kmymoney2/dialogs/kfindtransactiondlg.cpp index f122ba2..a1d5214 100644 --- a/kmymoney2/dialogs/kfindtransactiondlg.cpp +++ b/kmymoney2/dialogs/kfindtransactiondlg.cpp @@ -17,12 +17,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qtimer.h> -#include <qtabwidget.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqtimer.h> +#include <tqtabwidget.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,15 +56,15 @@ #include "ksortoptiondlg.h" -KFindTransactionDlg::KFindTransactionDlg(QWidget *parent, const char *name) : - KFindTransactionDlgDecl(parent, name, false), +KFindTransactionDlg::KFindTransactionDlg(TQWidget *tqparent, const char *name) : + KFindTransactionDlgDecl(tqparent, name, false), m_needReload(false) { m_register->installEventFilter(this); m_tabWidget->setTabEnabled(m_resultPage, false); // 'cause we don't have a separate setupTextPage - connect(m_textEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); + connect(m_textEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); setupAccountsPage(); setupCategoriesPage(); @@ -74,16 +74,16 @@ KFindTransactionDlg::KFindTransactionDlg(QWidget *parent, const char *name) : setupDetailsPage(); // We don't need to add the default into the list (see ::slotShowHelp() why) - // m_helpAnchor[m_textTab] = QString("details.search"); - m_helpAnchor[m_accountTab] = QString("details.search.account"); - m_helpAnchor[m_dateTab] = QString("details.search.date"); - m_helpAnchor[m_amountTab] = QString("details.search.amount"); - m_helpAnchor[m_categoryTab] = QString("details.search.category"); - m_helpAnchor[m_payeeTab] = QString("details.search.payee"); - m_helpAnchor[m_detailsTab] = QString("details.search.details"); + // m_helpAnchor[m_textTab] = TQString("details.search"); + m_helpAnchor[m_accountTab] = TQString("details.search.account"); + m_helpAnchor[m_dateTab] = TQString("details.search.date"); + m_helpAnchor[m_amountTab] = TQString("details.search.amount"); + m_helpAnchor[m_categoryTab] = TQString("details.search.category"); + m_helpAnchor[m_payeeTab] = TQString("details.search.payee"); + m_helpAnchor[m_detailsTab] = TQString("details.search.details"); // setup the register - QValueList<KMyMoneyRegister::Column> cols; + TQValueList<KMyMoneyRegister::Column> cols; cols << KMyMoneyRegister::DateColumn; cols << KMyMoneyRegister::AccountColumn; cols << KMyMoneyRegister::DetailColumn; @@ -91,26 +91,26 @@ KFindTransactionDlg::KFindTransactionDlg(QWidget *parent, const char *name) : cols << KMyMoneyRegister::PaymentColumn; cols << KMyMoneyRegister::DepositColumn; m_register->setupRegister(MyMoneyAccount(), cols); - m_register->setSelectionMode(QTable::Single); + m_register->setSelectionMode(TQTable::Single); - connect(m_register, SIGNAL(editTransaction()), this, SLOT(slotSelectTransaction())); - connect(m_register, SIGNAL(headerClicked()), this, SLOT(slotSortOptions())); + connect(m_register, TQT_SIGNAL(editTransaction()), this, TQT_SLOT(slotSelectTransaction())); + connect(m_register, TQT_SIGNAL(headerClicked()), this, TQT_SLOT(slotSortOptions())); slotUpdateSelections(); // setup the connections - connect(m_searchButton, SIGNAL(clicked()), this, SLOT(slotSearch())); - connect(m_resetButton, SIGNAL(clicked()), this, SLOT(slotReset())); - connect(m_resetButton, SIGNAL(clicked()), m_accountsView, SLOT(slotSelectAllAccounts())); - connect(m_resetButton, SIGNAL(clicked()), m_categoriesView, SLOT(slotSelectAllAccounts())); - connect(m_closeButton, SIGNAL(clicked()), this, SLOT(deleteLater())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotShowHelp())); + connect(m_searchButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSearch())); + connect(m_resetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReset())); + connect(m_resetButton, TQT_SIGNAL(clicked()), m_accountsView, TQT_SLOT(slotSelectAllAccounts())); + connect(m_resetButton, TQT_SIGNAL(clicked()), m_categoriesView, TQT_SLOT(slotSelectAllAccounts())); + connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteLater())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowHelp())); // only allow searches when a selection has been made - connect(this, SIGNAL(selectionEmpty(bool)), m_searchButton, SLOT(setDisabled(bool))); + connect(this, TQT_SIGNAL(selectionEmpty(bool)), m_searchButton, TQT_SLOT(setDisabled(bool))); // get signal about engine changes - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotRefreshView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotRefreshView())); slotUpdateSelections(); @@ -119,7 +119,7 @@ KFindTransactionDlg::KFindTransactionDlg(QWidget *parent, const char *name) : void KFindTransactionDlg::slotReset(void) { - m_textEdit->setText(QString()); + m_textEdit->setText(TQString()); m_regExp->setChecked(false); m_caseSensitive->setChecked(false); m_textNegate->setCurrentItem(0); @@ -127,9 +127,9 @@ void KFindTransactionDlg::slotReset(void) m_amountEdit->setEnabled(true); m_amountFromEdit->setEnabled(false); m_amountToEdit->setEnabled(false); - m_amountEdit->loadText(QString()); - m_amountFromEdit->loadText(QString()); - m_amountToEdit->loadText(QString()); + m_amountEdit->loadText(TQString()); + m_amountFromEdit->loadText(TQString()); + m_amountToEdit->loadText(TQString()); m_amountButton->setChecked(true); m_amountRangeButton->setChecked(false); @@ -143,9 +143,9 @@ void KFindTransactionDlg::slotReset(void) m_nrEdit->setEnabled(true); m_nrFromEdit->setEnabled(false); m_nrToEdit->setEnabled(false); - m_nrEdit->setText(QString()); - m_nrFromEdit->setText(QString()); - m_nrToEdit->setText(QString()); + m_nrEdit->setText(TQString()); + m_nrFromEdit->setText(TQString()); + m_nrToEdit->setText(TQString()); m_nrButton->setChecked(true); m_nrRangeButton->setChecked(false); @@ -160,14 +160,14 @@ void KFindTransactionDlg::slotReset(void) void KFindTransactionDlg::slotUpdateSelections(void) { - QString txt; + TQString txt; // Text tab if(!m_textEdit->text().isEmpty()) { if(!txt.isEmpty()) txt += ", "; txt += i18n("Text"); - m_regExp->setEnabled(QRegExp(m_textEdit->text()).isValid()); + m_regExp->setEnabled(TQRegExp(m_textEdit->text()).isValid()); } else m_regExp->setEnabled(false); @@ -241,13 +241,13 @@ void KFindTransactionDlg::slotUpdateSelections(void) m_selectedCriteria->setText(i18n("Current selections: ") + txt); } -bool KFindTransactionDlg::allItemsSelected(const QListViewItem *item) const +bool KFindTransactionDlg::allItemsSelected(const TQListViewItem *item) const { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = static_cast<QCheckListItem*>(it_v); + TQCheckListItem* it_c = static_cast<TQCheckListItem*>(it_v); if(!(it_c->isOn() && allItemsSelected(it_v))) return false; } @@ -255,14 +255,14 @@ bool KFindTransactionDlg::allItemsSelected(const QListViewItem *item) const return true; } -bool KFindTransactionDlg::allItemsSelected(const QListView* view) const +bool KFindTransactionDlg::allItemsSelected(const TQListView* view) const { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = view->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = static_cast<QCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + TQCheckListItem* it_c = static_cast<TQCheckListItem*>(it_v); + if(it_c->type() == TQCheckListItem::CheckBox) { if(!(it_c->isOn() && allItemsSelected(it_v))) return false; } else { @@ -276,23 +276,23 @@ bool KFindTransactionDlg::allItemsSelected(const QListView* view) const void KFindTransactionDlg::setupAccountsPage(void) { - m_accountsView->setSelectionMode(QListView::Multi); + m_accountsView->setSelectionMode(TQListView::Multi); AccountSet accountSet; accountSet.addAccountGroup(MyMoneyAccount::Asset); accountSet.addAccountGroup(MyMoneyAccount::Liability); //set the accountset to show closed account if the settings say so accountSet.setHideClosedAccounts(KMyMoneyGlobalSettings::hideClosedAccounts()); accountSet.load(m_accountsView); - connect(m_accountsView, SIGNAL(stateChanged()), this, SLOT(slotUpdateSelections())); + connect(m_accountsView, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotUpdateSelections())); } -void KFindTransactionDlg::selectAllItems(QListView* view, const bool state) +void KFindTransactionDlg::selectAllItems(TQListView* view, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = view->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { - QCheckListItem* it_c = static_cast<QCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + TQCheckListItem* it_c = static_cast<TQCheckListItem*>(it_v); + if(it_c->type() == TQCheckListItem::CheckBox) { it_c->setOn(state); } selectAllSubItems(it_v, state); @@ -301,13 +301,13 @@ void KFindTransactionDlg::selectAllItems(QListView* view, const bool state) slotUpdateSelections(); } -void KFindTransactionDlg::selectItems(QListView* view, const QStringList& list, const bool state) +void KFindTransactionDlg::selectItems(TQListView* view, const TQStringList& list, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = view->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox && list.contains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && list.tqcontains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, list, state); @@ -318,31 +318,31 @@ void KFindTransactionDlg::selectItems(QListView* view, const QStringList& list, void KFindTransactionDlg::setupCategoriesPage(void) { - m_categoriesView->setSelectionMode(QListView::Multi); + m_categoriesView->setSelectionMode(TQListView::Multi); AccountSet categorySet; categorySet.addAccountGroup(MyMoneyAccount::Income); categorySet.addAccountGroup(MyMoneyAccount::Expense); categorySet.load(m_categoriesView); - connect(m_categoriesView, SIGNAL(stateChanged()), this, SLOT(slotUpdateSelections())); + connect(m_categoriesView, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotUpdateSelections())); } -void KFindTransactionDlg::selectAllSubItems(QListViewItem* item, const bool state) +void KFindTransactionDlg::selectAllSubItems(TQListViewItem* item, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { - static_cast<QCheckListItem*>(it_v)->setOn(state); + static_cast<TQCheckListItem*>(it_v)->setOn(state); selectAllSubItems(it_v, state); } } -void KFindTransactionDlg::selectSubItems(QListViewItem* item, const QStringList& list, const bool state) +void KFindTransactionDlg::selectSubItems(TQListViewItem* item, const TQStringList& list, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(list.contains(it_c->id())) + if(list.tqcontains(it_c->id())) it_c->setOn(state); selectSubItems(it_v, list, state); } @@ -355,9 +355,9 @@ void KFindTransactionDlg::setupDatePage(void) MyMoneyTransactionFilter::translateDateRange(static_cast<MyMoneyTransactionFilter::dateOptionE>(i), m_startDates[i], m_endDates[i]); } - connect(m_dateRange, SIGNAL(itemSelected(int)), this, SLOT(slotDateRangeChanged(int))); - connect(m_fromDate, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotDateChanged())); - connect(m_toDate, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotDateChanged())); + connect(m_dateRange, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotDateRangeChanged(int))); + connect(m_fromDate, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotDateChanged())); + connect(m_toDate, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotDateChanged())); slotDateRangeChanged(MyMoneyTransactionFilter::allDates); } @@ -367,8 +367,8 @@ void KFindTransactionDlg::slotDateRangeChanged(int idx) switch(idx) { case MyMoneyTransactionFilter::allDates: case MyMoneyTransactionFilter::userDefined: - m_fromDate->loadDate(QDate()); - m_toDate->loadDate(QDate()); + m_fromDate->loadDate(TQDate()); + m_toDate->loadDate(TQDate()); break; default: m_fromDate->loadDate(m_startDates[idx]); @@ -399,12 +399,12 @@ void KFindTransactionDlg::slotDateChanged(void) void KFindTransactionDlg::setupAmountPage(void) { - connect(m_amountButton, SIGNAL(clicked()), this, SLOT(slotAmountSelected())); - connect(m_amountRangeButton, SIGNAL(clicked()), this, SLOT(slotAmountRangeSelected())); + connect(m_amountButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAmountSelected())); + connect(m_amountRangeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAmountRangeSelected())); - connect(m_amountEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); - connect(m_amountFromEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); - connect(m_amountToEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); + connect(m_amountEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_amountFromEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_amountToEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); m_amountButton->setChecked(true); slotAmountSelected(); @@ -428,28 +428,28 @@ void KFindTransactionDlg::slotAmountRangeSelected(void) void KFindTransactionDlg::setupPayeesPage(void) { - m_payeesView->setSelectionMode(QListView::Single); + m_payeesView->setSelectionMode(TQListView::Single); m_payeesView->header()->hide(); loadPayees(); m_emptyPayeesButton->setChecked(false); - connect(m_allPayeesButton, SIGNAL(clicked()), this, SLOT(slotSelectAllPayees())); - connect(m_clearPayeesButton, SIGNAL(clicked()), this, SLOT(slotDeselectAllPayees())); - connect(m_emptyPayeesButton, SIGNAL(stateChanged(int)), this, SLOT(slotUpdateSelections())); + connect(m_allPayeesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectAllPayees())); + connect(m_clearPayeesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeselectAllPayees())); + connect(m_emptyPayeesButton, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotUpdateSelections())); } void KFindTransactionDlg::loadPayees(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyPayee> list; - QValueList<MyMoneyPayee>::Iterator it_l; + TQValueList<MyMoneyPayee> list; + TQValueList<MyMoneyPayee>::Iterator it_l; list = file->payeeList(); // load view for(it_l = list.begin(); it_l != list.end(); ++it_l) { - KMyMoneyCheckListItem* item = new KMyMoneyCheckListItem(m_payeesView, (*it_l).name(), QString(), (*it_l).id()); - connect(item, SIGNAL(stateChanged(bool)), this, SLOT(slotUpdateSelections())); + KMyMoneyCheckListItem* item = new KMyMoneyCheckListItem(m_payeesView, (*it_l).name(), TQString(), (*it_l).id()); + connect(item, TQT_SIGNAL(stateChanged(bool)), this, TQT_SLOT(slotUpdateSelections())); item->setOn(true); } } @@ -465,15 +465,15 @@ void KFindTransactionDlg::slotDeselectAllPayees(void) void KFindTransactionDlg::setupDetailsPage(void) { - connect(m_typeBox, SIGNAL(activated(int)), this, SLOT(slotUpdateSelections())); - connect(m_stateBox, SIGNAL(activated(int)), this, SLOT(slotUpdateSelections())); - connect(m_validityBox, SIGNAL(activated(int)), this, SLOT(slotUpdateSelections())); + connect(m_typeBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_stateBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_validityBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateSelections())); - connect(m_nrButton, SIGNAL(clicked()), this, SLOT(slotNrSelected())); - connect(m_nrRangeButton, SIGNAL(clicked()), this, SLOT(slotNrRangeSelected())); - connect(m_nrEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); - connect(m_nrFromEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); - connect(m_nrToEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateSelections())); + connect(m_nrButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNrSelected())); + connect(m_nrRangeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNrRangeSelected())); + connect(m_nrEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_nrFromEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); + connect(m_nrToEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateSelections())); m_nrButton->setChecked(true); slotNrSelected(); @@ -495,7 +495,7 @@ void KFindTransactionDlg::slotNrRangeSelected(void) slotUpdateSelections(); } -void KFindTransactionDlg::addItemToFilter(const opTypeE op, const QString& id) +void KFindTransactionDlg::addItemToFilter(const opTypeE op, const TQString& id) { switch(op) { case addAccountToFilter: @@ -510,14 +510,14 @@ void KFindTransactionDlg::addItemToFilter(const opTypeE op, const QString& id) } } -void KFindTransactionDlg::scanCheckListItems(const QListViewItem* item, const opTypeE op) +void KFindTransactionDlg::scanCheckListItems(const TQListViewItem* item, const opTypeE op) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(it_c->isOn()) addItemToFilter(op, (*it_c).id()); } @@ -526,14 +526,14 @@ void KFindTransactionDlg::scanCheckListItems(const QListViewItem* item, const op } } -void KFindTransactionDlg::scanCheckListItems(const QListView* view, const opTypeE op) +void KFindTransactionDlg::scanCheckListItems(const TQListView* view, const opTypeE op) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = view->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(it_c->isOn()) addItemToFilter(op, (*it_c).id()); } @@ -548,27 +548,27 @@ void KFindTransactionDlg::setupFilter(void) // Text tab if(!m_textEdit->text().isEmpty()) { - QRegExp exp(m_textEdit->text(), m_caseSensitive->isChecked(), !m_regExp->isChecked()); + TQRegExp exp(m_textEdit->text(), m_caseSensitive->isChecked(), !m_regExp->isChecked()); m_filter.setTextFilter(exp, m_textNegate->currentItem() != 0); } // Account tab if(!m_accountsView->allItemsSelected()) { // retrieve a list of selected accounts - QStringList list; + TQStringList list; m_accountsView->selectedItems(list); // if we're not in expert mode, we need to make sure // that all stock accounts for the selected investment // account are also selected if(!KMyMoneyGlobalSettings::expertMode()) { - QStringList missing; - QStringList::const_iterator it_a, it_b; + TQStringList missing; + TQStringList::const_iterator it_a, it_b; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.contains(*it_b)) { + if(!list.tqcontains(*it_b)) { missing.append(*it_b); } } @@ -608,7 +608,7 @@ void KFindTransactionDlg::setupFilter(void) // Payees tab if(m_emptyPayeesButton->isChecked()) { - m_filter.addPayee(QString()); + m_filter.addPayee(TQString()); } else if(!allItemsSelected(m_payeesView)) { scanCheckListItems(m_payeesView, addPayeeToFilter); @@ -674,8 +674,8 @@ void KFindTransactionDlg::loadView(void) MyMoneyFile::instance()->transactionList(m_transactionList, m_filter); // create the elements for the register - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; - QMap<QString, int>uniqueMap; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; + TQMap<TQString, int>uniqueMap; MyMoneyMoney deposit, payment; int splitCount = 0; @@ -714,15 +714,15 @@ void KFindTransactionDlg::loadView(void) #if KMM_DEBUG m_foundText->setText(i18n("Found %1 matching transactions (D %2 / P %3 = %4)") - .arg(splitCount).arg(deposit.formatMoney("", 2)).arg(payment.formatMoney("", 2)).arg((deposit-payment).formatMoney("", 2))); + .tqarg(splitCount).tqarg(deposit.formatMoney("", 2)).tqarg(payment.formatMoney("", 2)).tqarg((deposit-payment).formatMoney("", 2))); #else - m_foundText->setText(i18n("Found %1 matching transactions") .arg(splitCount)); + m_foundText->setText(i18n("Found %1 matching transactions") .tqarg(splitCount)); #endif m_tabWidget->setTabEnabled(m_resultPage, true); m_tabWidget->setCurrentPage(m_tabWidget->indexOf(m_resultPage)); - QTimer::singleShot(10, this, SLOT(slotRightSize())); + TQTimer::singleShot(10, this, TQT_SLOT(slotRightSize())); } void KFindTransactionDlg::slotRightSize(void) @@ -730,7 +730,7 @@ void KFindTransactionDlg::slotRightSize(void) m_register->updateContents(); } -void KFindTransactionDlg::resizeEvent(QResizeEvent* ev) +void KFindTransactionDlg::resizeEvent(TQResizeEvent* ev) { // Columns // 1 = Date @@ -775,7 +775,7 @@ void KFindTransactionDlg::resizeEvent(QResizeEvent* ev) void KFindTransactionDlg::slotSelectTransaction(void) { - QValueList<KMyMoneyRegister::RegisterItem*> list = m_register->selectedItems(); + TQValueList<KMyMoneyRegister::RegisterItem*> list = m_register->selectedItems(); if(!list.isEmpty()) { KMyMoneyRegister::Transaction* t = dynamic_cast<KMyMoneyRegister::Transaction*>(list[0]); if(t) { @@ -785,21 +785,21 @@ void KFindTransactionDlg::slotSelectTransaction(void) } } -bool KFindTransactionDlg::eventFilter(QObject* o, QEvent* e) +bool KFindTransactionDlg::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; if(o->isWidgetType()) { - if(e->type() == QEvent::KeyPress) { - const QWidget* w = dynamic_cast<const QWidget*>(o); - QKeyEvent *k = static_cast<QKeyEvent *> (e); + if(e->type() == TQEvent::KeyPress) { + const TQWidget* w = dynamic_cast<const TQWidget*>(o); + TQKeyEvent *k = TQT_TQKEYEVENT (e); if(w == m_register) { switch(k->key()) { default: break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: rc = true; slotSelectTransaction(); break; @@ -812,9 +812,9 @@ bool KFindTransactionDlg::eventFilter(QObject* o, QEvent* e) void KFindTransactionDlg::slotShowHelp(void) { - QString anchor = m_helpAnchor[m_criteriaTab->currentPage()]; + TQString anchor = m_helpAnchor[m_criteriaTab->currentPage()]; if(anchor.isEmpty()) - anchor = QString("details.search"); + anchor = TQString("details.search"); kapp->invokeHelp(anchor); } @@ -823,11 +823,11 @@ void KFindTransactionDlg::slotSortOptions(void) { KSortOptionDlg* dlg = new KSortOptionDlg(this); - dlg->setSortOption(KMyMoneyGlobalSettings::sortSearchView(), QString()); + dlg->setSortOption(KMyMoneyGlobalSettings::sortSearchView(), TQString()); dlg->hideDefaultButton(); - if(dlg->exec() == QDialog::Accepted) { - QString sortOrder = dlg->sortOption(); + if(dlg->exec() == TQDialog::Accepted) { + TQString sortOrder = dlg->sortOption(); if(sortOrder != KMyMoneyGlobalSettings::sortSearchView()) { KMyMoneyGlobalSettings::setSortSearchView(sortOrder); slotRefreshView(); diff --git a/kmymoney2/dialogs/kfindtransactiondlg.h b/kmymoney2/dialogs/kfindtransactiondlg.h index edf9504..bd0cb7a 100644 --- a/kmymoney2/dialogs/kfindtransactiondlg.h +++ b/kmymoney2/dialogs/kfindtransactiondlg.h @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlistview.h> -#include <qdatetime.h> -#include <qmap.h> +#include <tqlistview.h> +#include <tqdatetime.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,8 +36,8 @@ #include "../dialogs/kfindtransactiondlgdecl.h" -class QListView; -class QListViewItem; +class TQListView; +class TQListViewItem; /** * @author Thomas Baumgart @@ -45,6 +45,7 @@ class QListViewItem; class KFindTransactionDlg : public KFindTransactionDlgDecl { Q_OBJECT + TQ_OBJECT public: /* @@ -77,16 +78,16 @@ public: dateOptionCount }; */ - KFindTransactionDlg(QWidget *parent=0, const char *name=0); + KFindTransactionDlg(TQWidget *tqparent=0, const char *name=0); ~KFindTransactionDlg() {} - virtual bool eventFilter( QObject *o, QEvent *e ); + virtual bool eventFilter( TQObject *o, TQEvent *e ); public slots: void show(void); protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); protected slots: virtual void slotReset(void); @@ -117,7 +118,7 @@ protected slots: /** * This slot selects the current selected transaction/split and emits - * the signal @a transactionSelected(const QString& accountId, const QString& transactionId) + * the signal @a transactionSelected(const TQString& accountId, const TQString& transactionId) */ void slotSelectTransaction(void); @@ -126,7 +127,7 @@ protected slots: void slotSortOptions(void); signals: - void transactionSelected(const QString& accountId, const QString& transactionId); + void transactionSelected(const TQString& accountId, const TQString& transactionId); /** * This signal is sent out when no selection has been made. It is @@ -150,10 +151,10 @@ protected: void setupFilter(void); - void selectAllItems(QListView* view, const bool state); - void selectAllSubItems(QListViewItem* item, const bool state); - void selectItems(QListView* view, const QStringList& list, const bool state); - void selectSubItems(QListViewItem* item, const QStringList& list, const bool state); + void selectAllItems(TQListView* view, const bool state); + void selectAllSubItems(TQListViewItem* item, const bool state); + void selectItems(TQListView* view, const TQStringList& list, const bool state); + void selectSubItems(TQListViewItem* item, const TQStringList& list, const bool state); /** * This method loads the m_payeesView with the payees name @@ -177,25 +178,25 @@ protected: * * @note If the view contains no items the method returns @p true. */ - bool allItemsSelected(const QListView* view) const; - bool allItemsSelected(const QListViewItem *item) const; + bool allItemsSelected(const TQListView* view) const; + bool allItemsSelected(const TQListViewItem *item) const; - void scanCheckListItems(const QListView* view, const opTypeE op); - void scanCheckListItems(const QListViewItem* item, const opTypeE op); - void addItemToFilter(const opTypeE op, const QString& id); + void scanCheckListItems(const TQListView* view, const opTypeE op); + void scanCheckListItems(const TQListViewItem* item, const opTypeE op); + void addItemToFilter(const opTypeE op, const TQString& id); protected: - QDate m_startDates[MyMoneyTransactionFilter::dateOptionCount]; - QDate m_endDates[MyMoneyTransactionFilter::dateOptionCount]; + TQDate m_startDates[MyMoneyTransactionFilter::dateOptionCount]; + TQDate m_endDates[MyMoneyTransactionFilter::dateOptionCount]; /** * This member holds a list of all transactions matching the filter criteria */ - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; MyMoneyTransactionFilter m_filter; - QMap<QWidget*, QString> m_helpAnchor; + TQMap<TQWidget*, TQString> m_helpAnchor; bool m_needReload; }; diff --git a/kmymoney2/dialogs/kfindtransactiondlgdecl.ui b/kmymoney2/dialogs/kfindtransactiondlgdecl.ui index 3340afd..8887776 100644 --- a/kmymoney2/dialogs/kfindtransactiondlgdecl.ui +++ b/kmymoney2/dialogs/kfindtransactiondlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KFindTransactionDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KFindTransactionDlgDecl</cstring> </property> @@ -28,11 +28,11 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_criteriaPage</cstring> </property> @@ -43,7 +43,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -51,7 +51,7 @@ <string>Define your search criteria</string> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_criteriaTab</cstring> </property> @@ -63,7 +63,7 @@ <verstretch>3</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_textTab</cstring> </property> @@ -84,7 +84,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>83</height> @@ -103,7 +103,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> @@ -125,7 +125,7 @@ <cstring>m_textNegate</cstring> </property> </widget> - <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_regExp</cstring> </property> @@ -133,7 +133,7 @@ <string>Treat text as regular expression</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_caseSensitive</cstring> </property> @@ -143,7 +143,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_accountTab</cstring> </property> @@ -167,7 +167,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_dateTab</cstring> </property> @@ -178,17 +178,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <grid> <property name="name"> @@ -199,7 +199,7 @@ <cstring>m_dateRange</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -212,7 +212,7 @@ <cstring>m_fromDate</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -221,7 +221,7 @@ <comment>To (Date)</comment> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -247,7 +247,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -266,7 +266,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -275,7 +275,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_amountTab</cstring> </property> @@ -286,15 +286,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup1</cstring> </property> @@ -314,7 +314,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_amountButton</cstring> </property> @@ -322,7 +322,7 @@ <string>Search this amount</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_amountRangeButton</cstring> </property> @@ -332,9 +332,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <grid> <property name="name"> @@ -344,14 +344,14 @@ <property name="name"> <cstring>m_amountToEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> </size> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel9</cstring> </property> @@ -359,7 +359,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel8</cstring> </property> @@ -372,14 +372,14 @@ <property name="name"> <cstring>m_amountEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> </size> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> @@ -392,7 +392,7 @@ <property name="name"> <cstring>m_amountFromEdit</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -411,7 +411,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -430,7 +430,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>75</height> @@ -439,7 +439,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_categoryTab</cstring> </property> @@ -457,7 +457,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_payeeTab</cstring> </property> @@ -474,7 +474,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout46</cstring> </property> @@ -504,7 +504,7 @@ <cstring>m_payeesView</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_emptyPayeesButton</cstring> </property> @@ -514,7 +514,7 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout45</cstring> </property> @@ -554,7 +554,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>42</height> @@ -565,7 +565,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_detailsTab</cstring> </property> @@ -576,23 +576,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel11_2</cstring> </property> @@ -600,7 +600,7 @@ <string>Validity</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel10</cstring> </property> @@ -678,7 +678,7 @@ <cstring>m_validityBox</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel11</cstring> </property> @@ -698,7 +698,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>130</width> <height>20</height> @@ -707,15 +707,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup2</cstring> </property> @@ -729,7 +729,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_nrButton</cstring> </property> @@ -737,7 +737,7 @@ <string>Search this number</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_nrRangeButton</cstring> </property> @@ -755,15 +755,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel12</cstring> </property> @@ -771,7 +771,7 @@ <string></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel14</cstring> </property> @@ -790,7 +790,7 @@ <cstring>m_nrEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel13</cstring> </property> @@ -816,7 +816,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -835,7 +835,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -845,18 +845,18 @@ </vbox> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_selectedCriteria</cstring> </property> <property name="text"> <string>text</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_transferWarning</cstring> </property> @@ -886,7 +886,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>24</height> @@ -895,7 +895,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_resultPage</cstring> </property> @@ -962,23 +962,23 @@ <number>12</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_foundText</cstring> </property> <property name="text"> <string>F</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignLeft</set> </property> </widget> </vbox> </widget> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <hbox> <property name="name"> @@ -1008,7 +1008,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> @@ -1097,5 +1097,10 @@ <data format="PNG" length="1110">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000041d49444154388d8d95c18b1c4514c67fbb29e5b54ea05b26da1d36b08d09a6c508138cb8c13d647141163de49043bca9f1628eb9294810f24f88c15b728b07617358888785d980427290b4a8d00b19a8821da8228cf42316ac87eed9247ac95c9aeaeef9eaabdffb5ebf85f178ccfcf7f5b79fec07a7280a08a008f25ceb7c29e5da573716e65a0be3f198ef6f5ededff9b9e1b34faf90882092a1ea21428b9220ffbf46054055b19386ba6970ae6665b5e0d2c5eb0b066067bbe1f21757c88f5504eff0c192189081303a5582b16854fccce2fe041f00cdd0a8103b874556405476b62d972ec2c2b90ff3fd8df5cb946549d80b34aea15ccaa94625450e2d0e558b460b7371a734b5e027251a155545678ab62d7eea90b4c504078908c107acb354cb251b1f8f08b1c18631aabbb4d18211404804f22545863561d2f060fb34aa8a18d0086204e72c46a32292e1a796f278c1da7a859d8da9a737506db04d0a24103d8949480b214d3bbee952a05c1d536f9d2684160c744f048311543d459eb1b65ee1754cedae13a64abd5d6127053c9d0281f22d4f75c6a2118a5c09272d7ab740638bf4ef2dd2174032d0d8d04c6fe19c32bedd8bc65e342aa3f785e2784bfd6bc1bd9db24b05505616a4edd67d5a8c1801a03a9962754c504bf34b8986acfb9be91cac7d54315a15541b36b134f74bd2dc53940115a5381e087bc25c6f71be831a8baa234cc1ee3eeb74ed83116beb2b8849d108a3730e8ce27e2bfb82419a7b407ac7c222fd0e6280a8078ce64e47ef54ac9d5be9aaae0162e0de568a44a18d3df90845d919c4f01463406340a44f40efb43a99b371618488e2670d1a2d7ee6f1d3be39342104e937ed85fb86599c33e9ee0be9a004946259d8b858909880d59aa00daa0d3280b5f39e34074c4b3a5434029a76a9e9f5cc0163b5c80024158a1cfc4cb1d3061d5834066cb0a403c008599a70f6bc27b8d03106ea3ae91987278c5b143b015547224ab5e24185cd9b81665273e7b6e7cecd82ddbf8098002de94049737bc09828cf3036f31c3735c8b0e98eb704672f348c7f7c93cd1fb2ae905119ff54e0dff3542b0e9dd983dcea2cc5eea6cf303e74ec687af5c41b6fa38f5e203c7ec8e1238ef85831a214afef21060ea781ec68247b65c6916353cc8b73d1ae79354606af2a930709aa118da1636c274dd7e3774b884a79aa6b5711a538d33cf9c01c1c9b83bc6a1f55c91ccb23b05b1deb43a7decdaffefd2862f61366aa8449c69e33642f012f2bb208fa98eeda1f3346f076c8eeef19475e9be115423364f78f84105a8643d34d90cfbfdcd8cf872589a45dc7f54cf3134a36f4e495c23f9da8db15bccb708d4014f2ca512cb5d4f7c13e84300d5cff6eb39b202bab053bdb9674f0648609427d0f8402ddeac30f4fcd3ced3efc3b422d406c09b340bedc1571e1bfc3d44dc281634c5fe5e758e7395cfbe6d6c130fd17d92372d277c159b70000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kgncimportoptionsdlg.cpp b/kmymoney2/dialogs/kgncimportoptionsdlg.cpp index e11ff69..9aaf5b6 100644 --- a/kmymoney2/dialogs/kgncimportoptionsdlg.cpp +++ b/kmymoney2/dialogs/kgncimportoptionsdlg.cpp @@ -17,11 +17,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qapplication.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqapplication.h> +#include <tqcombobox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -35,8 +35,8 @@ #include "kgncimportoptionsdlg.h" // dialog constructor -KGncImportOptionsDlg::KGncImportOptionsDlg(QWidget *parent, const char *name) - : KGncImportOptionsDlgDecl(parent, name) +KGncImportOptionsDlg::KGncImportOptionsDlg(TQWidget *tqparent, const char *name) + : KGncImportOptionsDlgDecl(tqparent, name) { buttonInvestGroup->setRadioButtonExclusive (true); buttonInvestGroup->setButton (0); @@ -50,7 +50,7 @@ KGncImportOptionsDlg::KGncImportOptionsDlg(QWidget *parent, const char *name) checkDebugXML->setChecked (false); checkAnonymize->setChecked (false); - connect (checkDecode, SIGNAL(toggled(bool)), this, SLOT(slotDecodeOptionChanged(bool))); + connect (checkDecode, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotDecodeOptionChanged(bool))); } KGncImportOptionsDlg::~KGncImportOptionsDlg() @@ -71,12 +71,12 @@ void KGncImportOptionsDlg::slotDecodeOptionChanged(bool isOn) { // try to get the others in some sort of order of likelihood void KGncImportOptionsDlg::buildCodecList () { - m_localeCodec = QTextCodec::codecForLocale(); + m_localeCodec = TQTextCodec::codecForLocale(); m_codecList.setAutoDelete (true); // retrieve all codec pointers - QTextCodec *codec; + TQTextCodec *codec; unsigned int i; - for (i = 0; (codec = QTextCodec::codecForIndex(i)); i++) { + for (i = 0; (codec = TQTextCodec::codecForIndex(i)); i++) { int rank; if (codec == m_localeCodec) rank = 999; // ensure locale rank comes first else rank = codec->heuristicNameMatch(m_localeCodec->name()); @@ -86,7 +86,7 @@ void KGncImportOptionsDlg::buildCodecList () { } m_codecList.sort(); for (i = 0; i < m_codecList.count(); i++) { - QString name (m_codecList.at(i)->second->name()); + TQString name (m_codecList.at(i)->second->name()); comboDecode->insertItem (name); } } @@ -102,8 +102,8 @@ int codecDataList::compareItems (void *a, void *b) { return (1); } // ranks are equal, sort on name, case insensitive - QString sa(pa->second->name()); - QString sb(pb->second->name()); + TQString sa(pa->second->name()); + TQString sb(pb->second->name()); if (sa.lower() > sb.lower()) { return (1); } else { @@ -112,7 +112,7 @@ int codecDataList::compareItems (void *a, void *b) { } // return selected codec or 0 -QTextCodec* KGncImportOptionsDlg::decodeOption(void) { +TQTextCodec* KGncImportOptionsDlg::decodeOption(void) { if (!checkDecode->isChecked()) { return (0); } else { diff --git a/kmymoney2/dialogs/kgncimportoptionsdlg.h b/kmymoney2/dialogs/kgncimportoptionsdlg.h index 5ab6202..787bd8b 100644 --- a/kmymoney2/dialogs/kgncimportoptionsdlg.h +++ b/kmymoney2/dialogs/kgncimportoptionsdlg.h @@ -20,10 +20,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qtextcodec.h> -#include <qptrlist.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqtextcodec.h> +#include <tqptrlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -32,24 +32,25 @@ // Project Includes #include "../dialogs/kgncimportoptionsdlgdecl.h" -typedef QPair<int, QTextCodec*> codecData; +typedef TQPair<int, TQTextCodec*> codecData; // class to sort codec list -class codecDataList : public QPtrList<codecData> { - int compareItems (QPtrCollection::Item a, QPtrCollection::Item b); +class codecDataList : public TQPtrList<codecData> { + int compareItems (TQPtrCollection::Item a, TQPtrCollection::Item b); }; class KGncImportOptionsDlg : public KGncImportOptionsDlgDecl { Q_OBJECT + TQ_OBJECT public: - KGncImportOptionsDlg(QWidget *parent = 0, const char *name = 0); + KGncImportOptionsDlg(TQWidget *tqparent = 0, const char *name = 0); ~KGncImportOptionsDlg(); int investmentOption () const {return (buttonInvestGroup->selectedId());}; bool quoteOption() const {return (checkFinanceQuote->isChecked());}; bool scheduleOption () const {return (checkSchedules->isChecked());}; - QTextCodec* decodeOption (); + TQTextCodec* decodeOption (); bool txNotesOption () const {return (checkTxNotes->isChecked());}; bool generalDebugOption () const {return (checkDebugGeneral->isChecked());}; bool xmlDebugOption () const {return (checkDebugXML->isChecked());}; @@ -62,7 +63,7 @@ public slots: private: void buildCodecList (); - QTextCodec* m_localeCodec; + TQTextCodec* m_localeCodec; codecDataList m_codecList; }; diff --git a/kmymoney2/dialogs/kgncimportoptionsdlgdecl.ui b/kmymoney2/dialogs/kgncimportoptionsdlgdecl.ui index e32197b..852a19e 100644 --- a/kmymoney2/dialogs/kgncimportoptionsdlgdecl.ui +++ b/kmymoney2/dialogs/kgncimportoptionsdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KGncImportOptionsDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KGncImportOptionsDlgDecl</cstring> </property> @@ -15,9 +15,9 @@ <property name="caption"> <string>GnuCash Import Options</string> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <property name="geometry"> <rect> @@ -31,18 +31,18 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>Use 'Help' for more information on these options</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonInvestGroup</cstring> </property> @@ -53,7 +53,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInvest1</cstring> </property> @@ -64,7 +64,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInvest2</cstring> </property> @@ -72,7 +72,7 @@ <string>One investment account for all stocks</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioInvest3</cstring> </property> @@ -82,7 +82,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup5</cstring> </property> @@ -93,7 +93,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkFinanceQuote</cstring> </property> @@ -103,7 +103,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -114,7 +114,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkSchedules</cstring> </property> @@ -124,7 +124,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup4</cstring> </property> @@ -135,9 +135,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -149,7 +149,7 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkDecode</cstring> </property> @@ -167,14 +167,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>140</width> <height>20</height> </size> </property> </spacer> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>comboDecode</cstring> </property> @@ -183,14 +183,14 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup18</cstring> </property> <property name="title"> <string>Transaction Notes option</string> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkTxNotes</cstring> </property> @@ -207,7 +207,7 @@ </property> </widget> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup3</cstring> </property> @@ -218,7 +218,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkDebugGeneral</cstring> </property> @@ -226,7 +226,7 @@ <string>General debug data</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkDebugXML</cstring> </property> @@ -234,7 +234,7 @@ <string>Display XML data</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkAnonymize</cstring> </property> @@ -254,16 +254,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -275,7 +275,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -299,14 +299,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>200</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -323,7 +323,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -376,8 +376,8 @@ <slot>slotHelp()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot access="protected">slotHelp()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kgncpricesourcedlg.cpp b/kmymoney2/dialogs/kgncpricesourcedlg.cpp index 2246e01..5058d5b 100644 --- a/kmymoney2/dialogs/kgncpricesourcedlg.cpp +++ b/kmymoney2/dialogs/kgncpricesourcedlg.cpp @@ -17,12 +17,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qlistbox.h> -#include <qlineedit.h> -#include <qbuttongroup.h> -#include <qlayout.h> -#include <qapplication.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqbuttongroup.h> +#include <tqlayout.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,17 +36,17 @@ #include "kgncpricesourcedlg.h" #include "../converter/webpricequote.h" -KGncPriceSourceDlg::KGncPriceSourceDlg(QWidget *parent, const char *name) - : KGncPriceSourceDlgDecl(parent, name) +KGncPriceSourceDlg::KGncPriceSourceDlg(TQWidget *tqparent, const char *name) + : KGncPriceSourceDlgDecl(tqparent, name) { } -KGncPriceSourceDlg::KGncPriceSourceDlg(const QString &stockName, const QString &gncSource){ +KGncPriceSourceDlg::KGncPriceSourceDlg(const TQString &stockName, const TQString &gncSource){ // signals and slots connections - connect( buttonGroup5, SIGNAL( released(int) ), this, SLOT( buttonPressed(int) ) ); - connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( slotHelp() ) ); + connect( buttonGroup5, TQT_SIGNAL( released(int) ), this, TQT_SLOT( buttonPressed(int) ) ); + connect( buttonHelp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotHelp() ) ); // initialize data fields - textStockName->setText (i18n ("Investment: %1").arg(stockName)); - textGncSource->setText (i18n ("Quote source: %1").arg(gncSource)); + textStockName->setText (i18n ("Investment: %1").tqarg(stockName)); + textGncSource->setText (i18n ("Quote source: %1").tqarg(gncSource)); listKnownSource->insertStringList (WebPriceQuote::quoteSources()); lineUserSource->setText (gncSource); checkAlwaysUse->setChecked(true); @@ -87,8 +87,8 @@ void KGncPriceSourceDlg::buttonPressed (int buttonId) { } } -QString KGncPriceSourceDlg::selectedSource() const { - QString s; +TQString KGncPriceSourceDlg::selectedSource() const { + TQString s; switch (m_currentButton) { case NOSOURCE: s = ""; break; case KMMSOURCE: s = listKnownSource->currentText(); break; diff --git a/kmymoney2/dialogs/kgncpricesourcedlg.h b/kmymoney2/dialogs/kgncpricesourcedlg.h index 6351b02..1d2eac6 100644 --- a/kmymoney2/dialogs/kgncpricesourcedlg.h +++ b/kmymoney2/dialogs/kgncpricesourcedlg.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,12 +34,13 @@ class KGncPriceSourceDlg : public KGncPriceSourceDlgDecl { Q_OBJECT + TQ_OBJECT public: - KGncPriceSourceDlg(QWidget *parent = 0, const char *name = 0); - KGncPriceSourceDlg(const QString &stockName, const QString &gncSource); + KGncPriceSourceDlg(TQWidget *tqparent = 0, const char *name = 0); + KGncPriceSourceDlg(const TQString &stockName, const TQString &gncSource); ~KGncPriceSourceDlg(); - QString selectedSource () const; + TQString selectedSource () const; bool alwaysUse() const { return (checkAlwaysUse->isChecked()); } public slots: diff --git a/kmymoney2/dialogs/kgncpricesourcedlgdecl.ui b/kmymoney2/dialogs/kgncpricesourcedlgdecl.ui index c781f81..b335268 100644 --- a/kmymoney2/dialogs/kgncpricesourcedlgdecl.ui +++ b/kmymoney2/dialogs/kgncpricesourcedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KGncPriceSourceDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KGncPriceSourceDlgDecl</cstring> </property> @@ -15,9 +15,9 @@ <property name="caption"> <string>Online Quotes - Select price source</string> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <property name="geometry"> <rect> @@ -41,14 +41,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -66,14 +66,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOK</cstring> </property> @@ -94,7 +94,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>171</width> <height>20</height> @@ -103,7 +103,7 @@ </spacer> </hbox> </widget> - <widget class="QSplitter"> + <widget class="TQSplitter"> <property name="name"> <cstring>splitter1</cstring> </property> @@ -118,15 +118,15 @@ <property name="orientation"> <enum>Horizontal</enum> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textStockName</cstring> </property> @@ -134,7 +134,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textGncSource</cstring> </property> @@ -142,7 +142,7 @@ <string></string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -150,7 +150,7 @@ <string>This price source is not known to KMyMoney. Please select an option below.</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup5</cstring> </property> @@ -161,7 +161,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>buttonNoSource</cstring> </property> @@ -172,7 +172,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>buttonSelectSource</cstring> </property> @@ -183,12 +183,12 @@ <number>1</number> </property> </widget> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>listKnownSource</cstring> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>buttonUserSource</cstring> </property> @@ -200,14 +200,14 @@ <number>2</number> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>lineUserSource</cstring> </property> </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkAlwaysUse</cstring> </property> @@ -227,7 +227,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>370</height> @@ -244,5 +244,5 @@ <slot>close()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kgpgkeyselectiondlg.cpp b/kmymoney2/dialogs/kgpgkeyselectiondlg.cpp index 37ddcc5..38ff094 100644 --- a/kmymoney2/dialogs/kgpgkeyselectiondlg.cpp +++ b/kmymoney2/dialogs/kgpgkeyselectiondlg.cpp @@ -17,9 +17,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qlabel.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqwhatsthis.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,41 +34,41 @@ #include "kgpgkeyselectiondlg.h" #include <kmymoney/kgpgfile.h> -KGpgKeySelectionDlg::KGpgKeySelectionDlg(QWidget *parent, const char *name) : - KDialogBase(parent, name, true, i18n("Select additional keys"), Ok | Cancel), +KGpgKeySelectionDlg::KGpgKeySelectionDlg(TQWidget *tqparent, const char *name) : + KDialogBase(tqparent, name, true, i18n("Select additional keys"), Ok | Cancel), m_needCheckList(true), m_listOk(false), m_checkCount(0) { - 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()); m_listBox = new KEditListBox(page); m_listBox->setTitle(i18n("User identification")); m_listBox->setButtons( int( KEditListBox::Remove | KEditListBox::Add ) ); - QWhatsThis::add( m_listBox, i18n( "Enter the id of the key you want to use for data encryption. This can either be an e-mail address or the hexadecimal key id. In case of the key id don't forget the leading 0x." ) ); + TQWhatsThis::add( m_listBox, i18n( "Enter the id of the key you want to use for data encryption. This can either be an e-mail address or the hexadecimal key id. In case of the key id don't forget the leading 0x." ) ); topLayout->addWidget(m_listBox); // add a LED for the availability of all keys - QHBoxLayout* ledBox = new QHBoxLayout(0, 0, 6, "ledBoxLayout"); + TQHBoxLayout* ledBox = new TQHBoxLayout(0, 0, 6, "ledBoxLayout"); m_keyLed = new KLed(page); m_keyLed->setShape( KLed::Circular ); m_keyLed->setLook( KLed::Sunken ); ledBox->addWidget(m_keyLed); - ledBox->addWidget(new QLabel(i18n("Keys for all of the above user ids found"), page)); - ledBox->addItem(new QSpacerItem( 50, 20, QSizePolicy::Expanding, QSizePolicy::Minimum )); + ledBox->addWidget(new TQLabel(i18n("Keys for all of the above user ids found"), page)); + ledBox->addItem(new TQSpacerItem( 50, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum )); topLayout->addLayout(ledBox); - connect(m_listBox, SIGNAL(changed()), this, SLOT(slotIdChanged())); - connect(m_listBox, SIGNAL(added(const QString&)), this, SLOT(slotKeyListChanged())); - connect(m_listBox, SIGNAL(removed(const QString&)), this, SLOT(slotKeyListChanged())); + connect(m_listBox, TQT_SIGNAL(changed()), this, TQT_SLOT(slotIdChanged())); + connect(m_listBox, TQT_SIGNAL(added(const TQString&)), this, TQT_SLOT(slotKeyListChanged())); + connect(m_listBox, TQT_SIGNAL(removed(const TQString&)), this, TQT_SLOT(slotKeyListChanged())); } -void KGpgKeySelectionDlg::setKeys(const QStringList& list) +void KGpgKeySelectionDlg::setKeys(const TQStringList& list) { m_listBox->clear(); m_listBox->insertStringList(list); @@ -78,9 +78,9 @@ void KGpgKeySelectionDlg::setKeys(const QStringList& list) #if 0 void KGpgKeySelectionDlg::slotShowHelp(void) { - QString anchor = m_helpAnchor[m_criteriaTab->currentPage()]; + TQString anchor = m_helpAnchor[m_criteriaTab->currentPage()]; if(anchor.isEmpty()) - anchor = QString("details.search"); + anchor = TQString("details.search"); kapp->invokeHelp(anchor); } @@ -114,8 +114,8 @@ void KGpgKeySelectionDlg::slotIdChanged(void) // if it is available, then scan the current list if we need to if(keysOk) { if(m_needCheckList) { - QStringList keys = m_listBox->items(); - QStringList::const_iterator it_s; + TQStringList keys = m_listBox->items(); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); keysOk && it_s != keys.end(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) keysOk = false; diff --git a/kmymoney2/dialogs/kgpgkeyselectiondlg.h b/kmymoney2/dialogs/kgpgkeyselectiondlg.h index 4355478..35b86b4 100644 --- a/kmymoney2/dialogs/kgpgkeyselectiondlg.h +++ b/kmymoney2/dialogs/kgpgkeyselectiondlg.h @@ -36,20 +36,21 @@ class KLed; class KGpgKeySelectionDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KGpgKeySelectionDlg(QWidget *parent=0, const char *name=0); + KGpgKeySelectionDlg(TQWidget *tqparent=0, const char *name=0); virtual ~KGpgKeySelectionDlg() {} /** * preset the key list with the given key ids in @a list */ - void setKeys(const QStringList& list); + void setKeys(const TQStringList& list); /** * Returns the list of keys currently listed in the KEditListBox */ - const QStringList keys(void) const { return m_listBox->items(); } + const TQStringList keys(void) const { return m_listBox->items(); } protected slots: void slotIdChanged(void); diff --git a/kmymoney2/dialogs/kimportdlg.cpp b/kmymoney2/dialogs/kimportdlg.cpp index c9cc2d5..e8489d2 100644 --- a/kmymoney2/dialogs/kimportdlg.cpp +++ b/kmymoney2/dialogs/kimportdlg.cpp @@ -21,13 +21,13 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qlineedit.h> -#include <qtextstream.h> -#include <qprogressbar.h> -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qpixmap.h> -#include <qapplication.h> +#include <tqlineedit.h> +#include <tqtextstream.h> +#include <tqprogressbar.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqpixmap.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -51,8 +51,8 @@ #include "mymoneyqifprofileeditor.h" #include "../converter/mymoneyqifprofile.h" -KImportDlg::KImportDlg(QWidget *parent, const char * name) - : KImportDlgDecl(parent, name, TRUE) +KImportDlg::KImportDlg(TQWidget *tqparent, const char * name) + : KImportDlgDecl(tqparent, name, TRUE) { // Set all the last used options readConfig(); @@ -64,32 +64,32 @@ KImportDlg::KImportDlg(QWidget *parent, const char * name) KIconLoader* il = KGlobal::iconLoader(); KGuiItem okButtenItem( i18n( "&Import" ), - QIconSet(il->loadIcon("fileimport", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("fileimport", KIcon::Small, KIcon::SizeSmall)), i18n("Start operation"), i18n("Use this to start the import operation")); m_qbuttonOk->setGuiItem(okButtenItem); KGuiItem browseButtenItem( i18n( "&Browse..." ), - QIconSet(il->loadIcon("fileopen", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("fileopen", KIcon::Small, KIcon::SizeSmall)), i18n("Select filename"), i18n("Use this to select a filename to export to")); m_qbuttonBrowse->setGuiItem(browseButtenItem); KGuiItem newButtenItem( i18n( "&New..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new profile"), i18n("Use this to open the profile editor")); m_profileEditorButton->setGuiItem(newButtenItem); // connect the buttons to their functionality - connect(m_qbuttonBrowse, SIGNAL( clicked() ), this, SLOT( slotBrowse() ) ); - connect(m_qbuttonOk, SIGNAL(clicked()), this, SLOT(slotOkClicked())); - connect(m_qbuttonCancel, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_profileEditorButton, SIGNAL(clicked()), this, SLOT(slotNewProfile())); + connect(m_qbuttonBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowse() ) ); + connect(m_qbuttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOkClicked())); + connect(m_qbuttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_profileEditorButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewProfile())); // connect the change signals to the check slot and perform initial check - connect(m_qlineeditFile, SIGNAL(textChanged(const QString&)), this, - SLOT(slotFileTextChanged(const QString&))); + connect(m_qlineeditFile, TQT_SIGNAL(textChanged(const TQString&)), this, + TQT_SLOT(slotFileTextChanged(const TQString&))); // setup button enable status slotFileTextChanged(m_qlineeditFile->text()); @@ -107,11 +107,11 @@ void KImportDlg::slotBrowse() tmpprofile.loadProfile("Profile-" + profile()); KFileDialog dialog(KGlobalSettings::documentPath(), - i18n("%1|Import files\n%2|All files (*.*)").arg(tmpprofile.filterFileType()).arg("*"), + i18n("%1|Import files\n%2|All files (*.*)").tqarg(tmpprofile.filterFileType()).tqarg("*"), this, i18n("Import File..."), true); dialog.setMode(KFile::File | KFile::ExistingOnly); - if(dialog.exec() == QDialog::Accepted) { + if(dialog.exec() == TQDialog::Accepted) { #if KDE_IS_VERSION(3,4,0) m_qlineeditFile->setText(dialog.selectedURL().pathOrURL()); #else @@ -145,9 +145,9 @@ void KImportDlg::writeConfig(void) } /** Make sure the text input is ok */ -void KImportDlg::slotFileTextChanged(const QString& text) +void KImportDlg::slotFileTextChanged(const TQString& text) { - if (!text.isEmpty() && KIO::NetAccess::exists(text, true, qApp->mainWidget())) { + if (!text.isEmpty() && KIO::NetAccess::exists(text, true, tqApp->mainWidget())) { // m_qcomboboxDateFormat->setEnabled(true); m_qbuttonOk->setEnabled(true); m_qlineeditFile->setText(text); @@ -159,7 +159,7 @@ void KImportDlg::slotFileTextChanged(const QString& text) void KImportDlg::slotNewProfile(void) { - MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "QIF Profile Editor"); + MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "TQIF Profile Editor"); if(editor->exec()) { m_profileComboBox->setCurrentText(editor->selectedProfile()); @@ -169,7 +169,7 @@ void KImportDlg::slotNewProfile(void) delete editor; } -void KImportDlg::slotSelectProfile(const QString& profile) +void KImportDlg::slotSelectProfile(const TQString& profile) { m_profileComboBox->setCurrentText(profile); loadProfiles(); @@ -183,11 +183,11 @@ void KImportDlg::loadProfiles(const bool selectLast) edit->slotOk(); delete edit; - QString current = m_profileComboBox->currentText(); + TQString current = m_profileComboBox->currentText(); m_profileComboBox->clear(); - QStringList list; + TQStringList list; KConfig* config = KGlobal::config(); config->setGroup("Profiles"); @@ -201,20 +201,20 @@ void KImportDlg::loadProfiles(const bool selectLast) } m_profileComboBox->setCurrentItem(0); - if(list.contains(current) > 0) { + if(list.tqcontains(current) > 0) { m_profileComboBox->setCurrentText(current); } } -void KImportDlg::addCategories(QStringList& strList, const QString& id, const QString& leadIn) const +void KImportDlg::addCategories(TQStringList& strList, const TQString& id, const TQString& leadIn) const { MyMoneyFile *file = MyMoneyFile::instance(); - QString name; + TQString name; MyMoneyAccount account = file->account(id); - QStringList accList = account.accountList(); - QStringList::ConstIterator it_a; + TQStringList accList = account.accountList(); + TQStringList::ConstIterator it_a; for(it_a = accList.begin(); it_a != accList.end(); ++it_a) { account = file->account(*it_a); diff --git a/kmymoney2/dialogs/kimportdlg.h b/kmymoney2/dialogs/kimportdlg.h index 06f1003..119d77d 100644 --- a/kmymoney2/dialogs/kimportdlg.h +++ b/kmymoney2/dialogs/kimportdlg.h @@ -22,9 +22,9 @@ // ---------------------------------------------------------------------------- // QT Headers -#include <qstring.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqstring.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -39,8 +39,8 @@ /** * This class is used to import a qif file to an account. - * It relies upon the QIF file handling routines in MyMoneyAccount to do - * the actual writing of QIF files. + * It relies upon the TQIF file handling routines in MyMoneyAccount to do + * the actual writing of TQIF files. * * It uses the global KConfig object to read and write the application * settings. @@ -54,30 +54,31 @@ class KImportDlg : public KImportDlgDecl { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor */ - KImportDlg(QWidget *parent, const char *name = 0); + KImportDlg(TQWidget *tqparent, const char *name = 0); /** Standard destructor */ ~KImportDlg(); /** */ - const QString filename(void) const { return m_qlineeditFile->text(); }; + const TQString filename(void) const { return m_qlineeditFile->text(); }; /** */ - const QString profile(void) const { return m_profileComboBox->currentText(); }; + const TQString profile(void) const { return m_profileComboBox->currentText(); }; protected slots: - /** Called to let the user browse for a QIF file to import from. */ + /** Called to let the user browse for a TQIF file to import from. */ void slotBrowse(); /** Test whether to enable the buttons */ - void slotFileTextChanged(const QString& text); + void slotFileTextChanged(const TQString& text); /** * Called when the user needs a new profile @@ -86,7 +87,7 @@ protected slots: void slotOkClicked(void); - void slotSelectProfile(const QString& text); + void slotSelectProfile(const TQString& text); private: /** @@ -109,7 +110,7 @@ private: * @param id Account id to add * @param leadIn constant leadin to be added in front of the account name */ - void addCategories(QStringList& strList, const QString& id, const QString& leadIn) const; + void addCategories(TQStringList& strList, const TQString& id, const TQString& leadIn) const; void readConfig(void); void writeConfig(void); diff --git a/kmymoney2/dialogs/kimportdlgdecl.ui b/kmymoney2/dialogs/kimportdlgdecl.ui index c915f12..0ebd81b 100644 --- a/kmymoney2/dialogs/kimportdlgdecl.ui +++ b/kmymoney2/dialogs/kimportdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KImportDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KImportDlgDecl</cstring> </property> @@ -50,15 +50,15 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <set>AutoAll</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblImportFile</cstring> </property> @@ -74,7 +74,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <string>QIF File to Import:</string> </property> </widget> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_optionGroupBox</cstring> </property> @@ -103,7 +103,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <string>Select <b>Bank statement</b> turns on automatic category matching which is turned off in case of <b>Historic data</b>. Use the latter if you import files from other Personal Finance Management software.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -111,7 +111,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <string>Source of QIF</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -131,7 +131,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>0</height> @@ -159,7 +159,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <string>Browse...</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_qlineeditFile</cstring> </property> @@ -180,7 +180,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout90</cstring> </property> @@ -204,7 +204,7 @@ Please enter the path to the QIF file or select it by clicking on the Browse but <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>411</width> <height>0</height> @@ -242,5 +242,5 @@ Please enter the path to the QIF file or select it by clicking on the Browse but </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kloadtemplatedlg.cpp b/kmymoney2/dialogs/kloadtemplatedlg.cpp index d765f8a..3666281 100644 --- a/kmymoney2/dialogs/kloadtemplatedlg.cpp +++ b/kmymoney2/dialogs/kloadtemplatedlg.cpp @@ -33,17 +33,17 @@ #include "kloadtemplatedlg.h" #include "../widgets/kaccounttemplateselector.h" -KLoadTemplateDlg::KLoadTemplateDlg(QWidget* parent, const char* name) : - KLoadTemplateDlgDecl(parent, name) +KLoadTemplateDlg::KLoadTemplateDlg(TQWidget* tqparent, const char* name) : + KLoadTemplateDlgDecl(tqparent, name) { buttonOk->setGuiItem(KStdGuiItem::ok()); buttonCancel->setGuiItem(KStdGuiItem::cancel()); buttonHelp->setGuiItem(KStdGuiItem::help()); - connect(buttonHelp, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); } -QValueList<MyMoneyTemplate> KLoadTemplateDlg::templates(void) const +TQValueList<MyMoneyTemplate> KLoadTemplateDlg::templates(void) const { return m_templateSelector->selectedTemplates(); } diff --git a/kmymoney2/dialogs/kloadtemplatedlg.h b/kmymoney2/dialogs/kloadtemplatedlg.h index 44fdfee..d2f36b1 100644 --- a/kmymoney2/dialogs/kloadtemplatedlg.h +++ b/kmymoney2/dialogs/kloadtemplatedlg.h @@ -33,11 +33,12 @@ class KLoadTemplateDlg : public KLoadTemplateDlgDecl { Q_OBJECT + TQ_OBJECT public: - KLoadTemplateDlg(QWidget *parent = 0, const char *name = 0); + KLoadTemplateDlg(TQWidget *tqparent = 0, const char *name = 0); - QValueList<MyMoneyTemplate> templates(void) const; + TQValueList<MyMoneyTemplate> templates(void) const; private slots: void slotHelp(void); diff --git a/kmymoney2/dialogs/kloadtemplatedlgdecl.ui b/kmymoney2/dialogs/kloadtemplatedlgdecl.ui index 4790de9..4e9b4e9 100644 --- a/kmymoney2/dialogs/kloadtemplatedlgdecl.ui +++ b/kmymoney2/dialogs/kloadtemplatedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLoadTemplateDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KLoadTemplateDlgDecl</cstring> </property> @@ -27,9 +27,9 @@ <cstring>m_templateSelector</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -53,7 +53,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>228</width> <height>20</height> @@ -102,5 +102,8 @@ <slot>accept()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kaccounttemplateselector.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kmergetransactionsdlg.cpp b/kmymoney2/dialogs/kmergetransactionsdlg.cpp index 692c88f..99dadbd 100644 --- a/kmymoney2/dialogs/kmergetransactionsdlg.cpp +++ b/kmymoney2/dialogs/kmergetransactionsdlg.cpp @@ -31,8 +31,8 @@ #include "kmergetransactionsdlg.h" -KMergeTransactionsDlg::KMergeTransactionsDlg(const MyMoneyAccount& account, QWidget* parent, const char* name) : - KSelectTransactionsDlg(account, parent, name) +KMergeTransactionsDlg::KMergeTransactionsDlg(const MyMoneyAccount& account, TQWidget* tqparent, const char* name) : + KSelectTransactionsDlg(account, tqparent, name) { // setup descriptive texts @@ -40,7 +40,7 @@ KMergeTransactionsDlg::KMergeTransactionsDlg(const MyMoneyAccount& account, QWid m_description->setText(i18n("Are you sure you wish to merge these transactions?")); // no selection possible - m_register->setSelectionMode(QTable::NoSelection); + m_register->setSelectionMode(TQTable::NoSelection); // override default and enable ok button right away buttonOk->setEnabled(true); diff --git a/kmymoney2/dialogs/kmergetransactionsdlg.h b/kmymoney2/dialogs/kmergetransactionsdlg.h index ebbfd82..23d1d5d 100644 --- a/kmymoney2/dialogs/kmergetransactionsdlg.h +++ b/kmymoney2/dialogs/kmergetransactionsdlg.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QResizeEvent; +class TQResizeEvent; // ---------------------------------------------------------------------------- // KDE Includes @@ -39,10 +39,11 @@ class QResizeEvent; class KMergeTransactionsDlg: public KSelectTransactionsDlg { Q_OBJECT + TQ_OBJECT public: - KMergeTransactionsDlg(const MyMoneyAccount& account, QWidget* parent = 0, const char* name = 0); + KMergeTransactionsDlg(const MyMoneyAccount& account, TQWidget* tqparent = 0, const char* name = 0); - bool eventFilter(QObject* , QEvent* ) { return false; } + bool eventFilter(TQObject* , TQEvent* ) { return false; } public slots: void slotHelp(); diff --git a/kmymoney2/dialogs/kmymoneyfileinfodlg.cpp b/kmymoney2/dialogs/kmymoneyfileinfodlg.cpp index 108c776..c7ae4b1 100644 --- a/kmymoney2/dialogs/kmymoneyfileinfodlg.cpp +++ b/kmymoney2/dialogs/kmymoneyfileinfodlg.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,8 +34,8 @@ #include <kmymoney/mymoneyfile.h> #include <kmymoney/kmymoneyutils.h> -KMyMoneyFileInfoDlg::KMyMoneyFileInfoDlg(QWidget *parent, const char *name ) - : KMyMoneyFileInfoDlgDecl(parent, name) +KMyMoneyFileInfoDlg::KMyMoneyFileInfoDlg(TQWidget *tqparent, const char *name ) + : KMyMoneyFileInfoDlgDecl(tqparent, name) { // Hide the unused buttons. buttonCancel->hide(); @@ -48,16 +48,16 @@ KMyMoneyFileInfoDlg::KMyMoneyFileInfoDlg(QWidget *parent, const char *name ) m_lastModificationDate->setText(storage->lastModificationDate().toString(Qt::ISODate)); m_baseCurrency->setText(storage->value("kmm-baseCurrency")); - m_payeeCount->setText(QString("%1").arg(storage->payeeList().count())); - m_institutionCount->setText(QString("%1").arg(storage->institutionList().count())); + m_payeeCount->setText(TQString("%1").tqarg(storage->payeeList().count())); + m_institutionCount->setText(TQString("%1").tqarg(storage->institutionList().count())); - QValueList<MyMoneyAccount> a_list; + TQValueList<MyMoneyAccount> a_list; storage->accountList(a_list); - m_accountCount->setText(QString("%1").arg(a_list.count())); + m_accountCount->setText(TQString("%1").tqarg(a_list.count())); - QMap<MyMoneyAccount::accountTypeE, int> accountMap; - QMap<MyMoneyAccount::accountTypeE, int> accountMapClosed; - QValueList<MyMoneyAccount>::const_iterator it_a; + TQMap<MyMoneyAccount::accountTypeE, int> accountMap; + TQMap<MyMoneyAccount::accountTypeE, int> accountMapClosed; + TQValueList<MyMoneyAccount>::const_iterator it_a; for(it_a = a_list.begin(); it_a != a_list.end(); ++it_a) { accountMap[(*it_a).accountType()] = accountMap[(*it_a).accountType()] + 1; accountMapClosed[(*it_a).accountType()] = accountMapClosed[(*it_a).accountType()] + 0; @@ -65,24 +65,24 @@ KMyMoneyFileInfoDlg::KMyMoneyFileInfoDlg(QWidget *parent, const char *name ) accountMapClosed[(*it_a).accountType()] = accountMapClosed[(*it_a).accountType()] + 1; } - QMap<MyMoneyAccount::accountTypeE, int>::const_iterator it_m; + TQMap<MyMoneyAccount::accountTypeE, int>::const_iterator it_m; for(it_m = accountMap.begin(); it_m != accountMap.end(); ++it_m) { - new KListViewItem(m_accountView, KMyMoneyUtils::accountTypeToString(it_m.key()), QString("%1").arg(*it_m), QString("%1").arg(accountMapClosed[it_m.key()])); + new KListViewItem(m_accountView, KMyMoneyUtils::accountTypeToString(it_m.key()), TQString("%1").tqarg(*it_m), TQString("%1").tqarg(accountMapClosed[it_m.key()])); } MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); - m_transactionCount->setText(QString("%1").arg(storage->transactionList(filter).count())); + m_transactionCount->setText(TQString("%1").tqarg(storage->transactionList(filter).count())); filter.setReportAllSplits(true); - m_splitCount->setText(QString("%1").arg(storage->transactionList(filter).count())); - m_scheduleCount->setText(QString("%1").arg(storage->scheduleList().count())); + m_splitCount->setText(TQString("%1").tqarg(storage->transactionList(filter).count())); + m_scheduleCount->setText(TQString("%1").tqarg(storage->scheduleList().count())); MyMoneyPriceList list = storage->priceList(); MyMoneyPriceList::const_iterator it_p; int pCount = 0; for(it_p = list.begin(); it_p != list.end(); ++it_p) pCount += (*it_p).count(); - m_priceCount->setText(QString("%1").arg(pCount)); + m_priceCount->setText(TQString("%1").tqarg(pCount)); } KMyMoneyFileInfoDlg::~KMyMoneyFileInfoDlg() diff --git a/kmymoney2/dialogs/kmymoneyfileinfodlg.h b/kmymoney2/dialogs/kmymoneyfileinfodlg.h index 9ba7f56..548b5a3 100644 --- a/kmymoney2/dialogs/kmymoneyfileinfodlg.h +++ b/kmymoney2/dialogs/kmymoneyfileinfodlg.h @@ -36,8 +36,9 @@ class KMyMoneyFileInfoDlg : public KMyMoneyFileInfoDlgDecl { Q_OBJECT + TQ_OBJECT public: - KMyMoneyFileInfoDlg(QWidget *parent=0, const char *name=0); + KMyMoneyFileInfoDlg(TQWidget *tqparent=0, const char *name=0); virtual ~KMyMoneyFileInfoDlg(); }; diff --git a/kmymoney2/dialogs/kmymoneyfileinfodlgdecl.ui b/kmymoney2/dialogs/kmymoneyfileinfodlgdecl.ui index fe2cd18..58528ed 100644 --- a/kmymoney2/dialogs/kmymoneyfileinfodlgdecl.ui +++ b/kmymoney2/dialogs/kmymoneyfileinfodlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KMyMoneyFileInfoDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KMyMoneyFileInfoDlgDecl</cstring> </property> @@ -25,15 +25,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_baseCurrency</cstring> </property> @@ -41,7 +41,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="9" column="1"> + <widget class="TQLabel" row="9" column="1"> <property name="name"> <cstring>m_scheduleCount</cstring> </property> @@ -96,7 +96,7 @@ <enum>AllColumns</enum> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -104,7 +104,7 @@ <string>Accounts/Categories</string> </property> </widget> - <widget class="QLabel" row="10" column="0"> + <widget class="TQLabel" row="10" column="0"> <property name="name"> <cstring>textLabel19</cstring> </property> @@ -112,7 +112,7 @@ <string>Prices</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -120,7 +120,7 @@ <string>Created on</string> </property> </widget> - <widget class="QLabel" row="10" column="1"> + <widget class="TQLabel" row="10" column="1"> <property name="name"> <cstring>m_priceCount</cstring> </property> @@ -128,7 +128,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="9" column="0"> + <widget class="TQLabel" row="9" column="0"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -136,7 +136,7 @@ <string>Schedules</string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -144,7 +144,7 @@ <string>Transactions</string> </property> </widget> - <widget class="QLabel" row="8" column="0"> + <widget class="TQLabel" row="8" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -152,7 +152,7 @@ <string>Splits</string> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payeeCount</cstring> </property> @@ -160,7 +160,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_institutionCount</cstring> </property> @@ -168,7 +168,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -176,7 +176,7 @@ <string>Institutions</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_creationDate</cstring> </property> @@ -184,7 +184,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="7" column="1"> + <widget class="TQLabel" row="7" column="1"> <property name="name"> <cstring>m_transactionCount</cstring> </property> @@ -192,7 +192,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="5" column="1"> + <widget class="TQLabel" row="5" column="1"> <property name="name"> <cstring>m_accountCount</cstring> </property> @@ -200,7 +200,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -208,7 +208,7 @@ <string>Payees</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -216,7 +216,7 @@ <string>Base currency</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -224,7 +224,7 @@ <string>Last modified on</string> </property> </widget> - <widget class="QLabel" row="8" column="1"> + <widget class="TQLabel" row="8" column="1"> <property name="name"> <cstring>m_splitCount</cstring> </property> @@ -232,7 +232,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_lastModificationDate</cstring> </property> @@ -252,7 +252,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -273,15 +273,15 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -305,7 +305,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>120</width> <height>20</height> @@ -354,5 +354,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kmymoneypricedlg.cpp b/kmymoney2/dialogs/kmymoneypricedlg.cpp index cd8d66f..a64fd13 100644 --- a/kmymoney2/dialogs/kmymoneypricedlg.cpp +++ b/kmymoney2/dialogs/kmymoneypricedlg.cpp @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -53,47 +53,47 @@ #define PRICE_COL 3 #define SOURCE_COL 4 -KMyMoneyPriceDlg::KMyMoneyPriceDlg(QWidget* parent, const char *name) : - KMyMoneyPriceDlgDecl(parent, name) +KMyMoneyPriceDlg::KMyMoneyPriceDlg(TQWidget* tqparent, const char *name) : + KMyMoneyPriceDlgDecl(tqparent, name) { KIconLoader *il = KGlobal::iconLoader(); KGuiItem removeButtenItem( i18n( "&Delete" ), - QIconSet(il->loadIcon("delete", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("delete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete this entry"), i18n("Remove this price item from the file")); m_deleteButton->setGuiItem(removeButtenItem); KGuiItem newButtenItem( i18n( "&New" ), - QIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), i18n("Add a new entry"), i18n("Create a new price entry.")); m_newButton->setGuiItem(newButtenItem); KGuiItem editButtenItem( i18n( "&Edit" ), - QIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), i18n("Modify the selected entry"), i18n("Change the details of selected price information.")); m_editButton->setGuiItem(editButtenItem); KGuiItem okButtenItem( i18n("&Close" ), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Close the dialog"), i18n("Use this to close the dialog and return to the application.")); m_closeButton->setGuiItem(okButtenItem); - connect(m_closeButton, SIGNAL(clicked()), this, SLOT(accept())); - connect(m_editButton, SIGNAL(clicked()), this, SLOT(slotEditPrice())); - connect(m_priceList, SIGNAL(editPrice()), this, SLOT(slotEditPrice())); - connect(m_deleteButton, SIGNAL(clicked()), this, SLOT(slotDeletePrice())); - connect(m_priceList, SIGNAL(deletePrice()), this, SLOT(slotDeletePrice())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewPrice())); - connect(m_priceList, SIGNAL(newPrice()), this, SLOT(slotNewPrice())); - connect(m_priceList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectPrice(QListViewItem*))); - connect(m_onlineQuoteButton, SIGNAL(clicked()), this, SLOT(slotOnlinePriceUpdate())); - connect(m_priceList, SIGNAL(onlinePriceUpdate()), this, SLOT(slotOnlinePriceUpdate())); + connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(m_editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditPrice())); + connect(m_priceList, TQT_SIGNAL(editPrice()), this, TQT_SLOT(slotEditPrice())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeletePrice())); + connect(m_priceList, TQT_SIGNAL(deletePrice()), this, TQT_SLOT(slotDeletePrice())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewPrice())); + connect(m_priceList, TQT_SIGNAL(newPrice()), this, TQT_SLOT(slotNewPrice())); + connect(m_priceList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectPrice(TQListViewItem*))); + connect(m_onlineQuoteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOnlinePriceUpdate())); + connect(m_priceList, TQT_SIGNAL(onlinePriceUpdate()), this, TQT_SLOT(slotOnlinePriceUpdate())); - connect(m_showAllPrices, SIGNAL(toggled(bool)), this, SLOT(slotLoadWidgets())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(m_showAllPrices, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); slotLoadWidgets(); slotSelectPrice(0); @@ -128,7 +128,7 @@ void KMyMoneyPriceDlg::slotLoadWidgets(void) } } -void KMyMoneyPriceDlg::slotSelectPrice(QListViewItem * item) +void KMyMoneyPriceDlg::slotSelectPrice(TQListViewItem * item) { m_currentItem = item; m_editButton->setEnabled(item != 0); @@ -162,7 +162,7 @@ void KMyMoneyPriceDlg::slotNewPrice(void) m_priceList->setSelected(p, true); // If the user cancels the following operation, we delete the new item // and re-select any previously selected one - if(slotEditPrice() == QDialog::Rejected) { + if(slotEditPrice() == TQDialog::Rejected) { delete p; if(item) m_priceList->setSelected(item, true); @@ -172,7 +172,7 @@ void KMyMoneyPriceDlg::slotNewPrice(void) int KMyMoneyPriceDlg::slotEditPrice(void) { - int rc = QDialog::Rejected; + int rc = TQDialog::Rejected; KMyMoneyPriceItem* item = dynamic_cast<KMyMoneyPriceItem*>(m_priceList->selectedItem()); if(item) { MyMoneySecurity from(MyMoneyFile::instance()->security(item->price().from())); @@ -217,11 +217,11 @@ void KMyMoneyPriceDlg::slotOnlinePriceUpdate(void) if(item) { KEquityPriceUpdateDlg dlg(this, (item->text(COMMODITY_COL)+" "+item->text(CURRENCY_COL)).utf8()); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } else { KEquityPriceUpdateDlg dlg(this); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } } @@ -234,9 +234,9 @@ void KMyMoneyPriceDlg::slotOnlinePriceUpdate(void) // complains and if not, we get rid of this whole block one day. (2007-06-22 ipwizard) // // kmymoney2/widgets/kmymoneypriceview.cpp:179: undefined reference to -// `KUpdateStockPriceDlg::KUpdateStockPriceDlg[in-charge](QWidget*, char const*)' +// `KUpdateStockPriceDlg::KUpdateStockPriceDlg[in-charge](TQWidget*, char const*)' // kmymoney2/widgets/kmymoneypriceview.cpp:204: undefined reference to -// `KUpdateStockPriceDlg::KUpdateStockPriceDlg[in-charge](QDate const&, QString const&, QWidget*, char const*)' +// `KUpdateStockPriceDlg::KUpdateStockPriceDlg[in-charge](TQDate const&, TQString const&, TQWidget*, char const*)' void KEditEquityEntryDlg_useless(void) { delete new KUpdateStockPriceDlg(); diff --git a/kmymoney2/dialogs/kmymoneypricedlg.h b/kmymoney2/dialogs/kmymoneypricedlg.h index c7e7c99..c3c23e5 100644 --- a/kmymoney2/dialogs/kmymoneypricedlg.h +++ b/kmymoney2/dialogs/kmymoneypricedlg.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QListViewItem; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -40,12 +40,13 @@ class QListViewItem; class KMyMoneyPriceDlg : public KMyMoneyPriceDlgDecl { Q_OBJECT + TQ_OBJECT public: - KMyMoneyPriceDlg(QWidget* parent, const char *name); + KMyMoneyPriceDlg(TQWidget* tqparent, const char *name); ~KMyMoneyPriceDlg(); protected slots: - void slotSelectPrice(QListViewItem* item); + void slotSelectPrice(TQListViewItem* item); void slotNewPrice(void); void slotDeletePrice(void); int slotEditPrice(void); @@ -53,7 +54,7 @@ protected slots: void slotOnlinePriceUpdate(void); private: - QListViewItem* m_currentItem; + TQListViewItem* m_currentItem; }; #endif // KMYMONEYPRICEDLG_H diff --git a/kmymoney2/dialogs/kmymoneypricedlgdecl.ui b/kmymoney2/dialogs/kmymoneypricedlgdecl.ui index 27895e3..424c25d 100644 --- a/kmymoney2/dialogs/kmymoneypricedlgdecl.ui +++ b/kmymoney2/dialogs/kmymoneypricedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KMyMoneyPriceDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KMyMoneyPriceDlgDecl</cstring> </property> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <vbox> <property name="name"> @@ -40,7 +40,7 @@ <cstring>m_priceList</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_showAllPrices</cstring> </property> @@ -50,9 +50,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <vbox> <property name="name"> @@ -100,7 +100,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>150</height> @@ -133,9 +133,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -151,16 +151,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>560</width> <height>20</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> @@ -216,5 +216,5 @@ <tabstop>m_onlineQuoteButton</tabstop> <tabstop>m_closeButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kmymoneysplittable.cpp b/kmymoney2/dialogs/kmymoneysplittable.cpp index 5b5f1af..d1182ec 100644 --- a/kmymoney2/dialogs/kmymoneysplittable.cpp +++ b/kmymoney2/dialogs/kmymoneysplittable.cpp @@ -25,13 +25,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qglobal.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qapplication.h> -#include <qtimer.h> -#include <qlayout.h> -#include <qeventloop.h> +#include <tqglobal.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqapplication.h> +#include <tqtimer.h> +#include <tqlayout.h> +#include <tqeventloop.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,8 +62,8 @@ #include "../mymoney/mymoneyutils.h" -kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : - QTable(parent,name), +kMyMoneySplitTable::kMyMoneySplitTable(TQWidget *tqparent, const char *name ) : + TQTable(tqparent,name), m_currentRow(0), m_maxRows(0), m_editMode(false), @@ -78,7 +78,7 @@ kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : horizontalHeader()->setLabel(0, i18n("Category")); horizontalHeader()->setLabel(1, i18n("Memo")); horizontalHeader()->setLabel(2, i18n("Amount")); - setSelectionMode(QTable::NoSelection); + setSelectionMode(TQTable::NoSelection); setLeftMargin(0); verticalHeader()->hide(); setColumnStretchable(0, false); @@ -88,63 +88,63 @@ kMyMoneySplitTable::kMyMoneySplitTable(QWidget *parent, const char *name ) : horizontalHeader()->setMovingEnabled(false); horizontalHeader()->setFont(KMyMoneyGlobalSettings::listHeaderFont()); - setVScrollBarMode(QScrollView::AlwaysOn); + setVScrollBarMode(TQScrollView::AlwaysOn); // never show a horizontal scroll bar - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); // setup the context menu m_contextMenu = new KPopupMenu(this); KIconLoader *il = KGlobal::iconLoader(); m_contextMenu->insertTitle(il->loadIcon("transaction", KIcon::MainToolbar), i18n("Split Options")); - m_contextMenu->insertItem(il->loadIcon("edit", KIcon::Small), i18n("Edit..."), this, SLOT(slotStartEdit())); - m_contextMenuDuplicate = m_contextMenu->insertItem(il->loadIcon("editcopy", KIcon::Small), i18n("Duplicate"), this, SLOT(slotDuplicateSplit())); + m_contextMenu->insertItem(il->loadIcon("edit", KIcon::Small), i18n("Edit..."), this, TQT_SLOT(slotStartEdit())); + m_contextMenuDuplicate = m_contextMenu->insertItem(il->loadIcon("editcopy", KIcon::Small), i18n("Duplicate"), this, TQT_SLOT(slotDuplicateSplit())); m_contextMenuDelete = m_contextMenu->insertItem(il->loadIcon("delete", KIcon::Small), i18n("Delete ..."), - this, SLOT(slotDeleteSplit())); + this, TQT_SLOT(slotDeleteSplit())); - connect(this, SIGNAL(clicked(int, int, int, const QPoint&)), - this, SLOT(slotSetFocus(int, int, int, const QPoint&))); + connect(this, TQT_SIGNAL(clicked(int, int, int, const TQPoint&)), + this, TQT_SLOT(slotSetFocus(int, int, int, const TQPoint&))); - connect(this, SIGNAL(transactionChanged(const MyMoneyTransaction&)), - this, SLOT(slotUpdateData(const MyMoneyTransaction&))); + connect(this, TQT_SIGNAL(transactionChanged(const MyMoneyTransaction&)), + this, TQT_SLOT(slotUpdateData(const MyMoneyTransaction&))); } kMyMoneySplitTable::~kMyMoneySplitTable() { } -void kMyMoneySplitTable::setup(const QMap<QString, MyMoneyMoney>& priceInfo) +void kMyMoneySplitTable::setup(const TQMap<TQString, MyMoneyMoney>& priceInfo) { m_priceInfo = priceInfo; } -const QColor kMyMoneySplitTable::rowBackgroundColor(const int row) const +const TQColor kMyMoneySplitTable::rowBackgroundColor(const int row) const { return (row % 2) ? KMyMoneyGlobalSettings::listColor() : KMyMoneyGlobalSettings::listBGColor(); } -void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r, bool /*selected*/) +void kMyMoneySplitTable::paintCell(TQPainter *p, int row, int col, const TQRect& r, bool /*selected*/) { - QColorGroup g = colorGroup(); - QColor textColor; + TQColorGroup g = tqcolorGroup(); + TQColor textColor; - g.setColor(QColorGroup::Base, rowBackgroundColor(row)); + g.setColor(TQColorGroup::Base, rowBackgroundColor(row)); p->setFont(KMyMoneyGlobalSettings::listCellFont()); - QString firsttext = text(row, col); - QString qstringCategory; - QString qstringMemo; + TQString firsttext = text(row, col); + TQString qstringCategory; + TQString qstringMemo; - int intPos = firsttext.find("|"); + int intPos = firsttext.tqfind("|"); if(intPos > -1) { qstringCategory = firsttext.left(intPos); qstringMemo = firsttext.mid(intPos + 1); } - QRect rr = r; - QRect rr2 = r; + TQRect rr = r; + TQRect rr2 = r; rr.setX(0); rr.setY(0); rr.setWidth(columnWidth(col)); @@ -157,12 +157,12 @@ void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r if(row == m_currentRow) { - QBrush backgroundBrush(g.highlight()); + TQBrush backgroundBrush(g.highlight()); textColor = g.highlightedText(); p->fillRect(rr,backgroundBrush); } else { - QBrush backgroundBrush(g.base()); + TQBrush backgroundBrush(g.base()); textColor = g.text(); p->fillRect(rr,backgroundBrush); } @@ -178,17 +178,17 @@ void kMyMoneySplitTable::paintCell(QPainter *p, int row, int col, const QRect& r switch (col) { case 0: // category case 1: // memo - p->drawText(rr2, Qt::AlignLeft | Qt::AlignVCenter, text(row, col)); + p->drawText(rr2, TQt::AlignLeft | TQt::AlignVCenter, text(row, col)); break; case 2: // amount - p->drawText(rr2, Qt::AlignRight | Qt::AlignVCenter,firsttext); + p->drawText(rr2, TQt::AlignRight | TQt::AlignVCenter,firsttext); break; } } -/** Override the QTable member function to avoid display of focus */ -void kMyMoneySplitTable::paintFocus(QPainter * /* p */, const QRect & /*cr*/) +/** Override the TQTable member function to avoid display of focus */ +void kMyMoneySplitTable::paintFocus(TQPainter * /* p */, const TQRect & /*cr*/) { } @@ -198,42 +198,42 @@ void kMyMoneySplitTable::columnWidthChanged(int col) updateCell(i, col); } -/** Override the QTable member function to avoid confusion with our own functionality */ -void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/ ) +/** Override the TQTable member function to avoid confusion with our own functionality */ +void kMyMoneySplitTable::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/ ) { } -bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) +bool kMyMoneySplitTable::eventFilter(TQObject *o, TQEvent *e) { // MYMONEYTRACER(tracer); - QKeyEvent *k = static_cast<QKeyEvent *> (e); + TQKeyEvent *k = TQT_TQKEYEVENT (e); bool rc = false; int row = currentRow(); int lines = visibleHeight()/rowHeight(0); - QWidget* w; + TQWidget* w; - if(e->type() == QEvent::KeyPress && !isEditMode()) { + if(e->type() == TQEvent::KeyPress && !isEditMode()) { rc = true; switch(k->key()) { - case Qt::Key_Up: + case TQt::Key_Up: if(row) slotSetFocus(row-1); break; - case Qt::Key_Down: + case TQt::Key_Down: if(row < static_cast<int> (m_transaction.splits().count()-1)) slotSetFocus(row+1); break; - case Qt::Key_Home: + case TQt::Key_Home: slotSetFocus(0); break; - case Qt::Key_End: + case TQt::Key_End: slotSetFocus(m_transaction.splits().count()-1); break; - case Qt::Key_PageUp: + case TQt::Key_PageUp: if(lines) { while(lines-- > 0 && row) row--; @@ -241,7 +241,7 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: if(row < static_cast<int> (m_transaction.splits().count()-1)) { while(lines-- > 0 && row < static_cast<int> (m_transaction.splits().count()-1)) row++; @@ -249,12 +249,12 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } break; - case Qt::Key_Delete: + case TQt::Key_Delete: slotDeleteSplit(); break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: if(row < static_cast<int> (m_transaction.splits().count()-1) && KMyMoneyGlobalSettings::enterMovesBetweenFields()) { slotStartEdit(); @@ -262,18 +262,18 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) emit returnPressed(); break; - case Qt::Key_Escape: + case TQt::Key_Escape: emit escapePressed(); break; - case Qt::Key_F2: + case TQt::Key_F2: slotStartEdit(); break; default: rc = true; KShortcut copySplit(i18n("Duplicate split", "CTRL+c")); - KShortcut newSplit(QKeySequence(Qt::CTRL | Qt::Key_Insert)); + KShortcut newSplit(TQKeySequence(TQt::CTRL | TQt::Key_Insert)); if(copySplit.contains(KKey(k))) { slotDuplicateSplit(); @@ -284,26 +284,26 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) } else if ( k->text()[ 0 ].isPrint() ) { w = slotStartEdit(); // make sure, the widget receives the key again - QApplication::sendEvent(w, e); + TQApplication::sendEvent(w, e); } break; } - } else if(e->type() == QEvent::KeyPress && isEditMode()) { + } else if(e->type() == TQEvent::KeyPress && isEditMode()) { bool terminate = true; rc = true; switch(k->key()) { // suppress the F2 functionality to start editing in inline edit mode - case Qt::Key_F2: + case TQt::Key_F2: // suppress the cursor movement in inline edit mode - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_PageUp: - case Qt::Key_PageDown: + case TQt::Key_Up: + case TQt::Key_Down: + case TQt::Key_PageUp: + case TQt::Key_PageDown: break; - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: // we cannot call the slot directly, as it destroys the caller of // this method :-( So we let the event handler take care of calling // the respective slot using a timeout. For a KLineEdit derived object @@ -322,38 +322,38 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) // in case we have the 'enter moves focus between fields', we need to simulate // a TAB key when the object 'o' points to the category or memo field. if(KMyMoneyGlobalSettings::enterMovesBetweenFields()) { - if(o == m_editCategory->lineEdit() || o == m_editMemo) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editCategory->lineEdit()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_editMemo)) { terminate = false; - QKeyEvent evt(e->type(), - Key_Tab, 0, k->state(), QString::null, + TQKeyEvent evt(e->type(), + Key_Tab, 0, k->state(), TQString(), k->isAutoRepeat(), k->count()); - QApplication::sendEvent( o, &evt ); + TQApplication::sendEvent( o, &evt ); } } if(terminate) { - QTimer::singleShot(0, this, SLOT(slotEndEditKeyboard())); + TQTimer::singleShot(0, this, TQT_SLOT(slotEndEditKeyboard())); } break; - case Qt::Key_Escape: + case TQt::Key_Escape: // we cannot call the slot directly, as it destroys the caller of // this method :-( So we let the event handler take care of calling // the respective slot using a timeout. - QTimer::singleShot(0, this, SLOT(slotCancelEdit())); + TQTimer::singleShot(0, this, TQT_SLOT(slotCancelEdit())); break; default: rc = false; break; } - } else if(e->type() == QEvent::KeyRelease && !isEditMode()) { + } else if(e->type() == TQEvent::KeyRelease && !isEditMode()) { // for some reason, we only see a KeyRelease event of the Menu key // here. In other locations (e.g. Register::eventFilter()) we see // a KeyPress event. Strange. (ipwizard - 2008-05-10) switch(k->key()) { - case Qt::Key_Menu: + case TQt::Key_Menu: // if the very last entry is selected, the delete // operation is not available otherwise it is m_contextMenu->setItemEnabled(m_contextMenuDelete, @@ -361,7 +361,7 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) m_contextMenu->setItemEnabled(m_contextMenuDuplicate, row < static_cast<int> (m_transaction.splits().count()-1)); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); rc = true; break; default: @@ -372,16 +372,16 @@ bool kMyMoneySplitTable::eventFilter(QObject *o, QEvent *e) // if the event has not been processed here, forward it to // the base class implementation if it's not a key event if(rc == false) { - if(e->type() != QEvent::KeyPress - && e->type() != QEvent::KeyRelease) { - rc = QTable::eventFilter(o, e); + if(e->type() != TQEvent::KeyPress + && e->type() != TQEvent::KeyRelease) { + rc = TQTable::eventFilter(o, e); } } return rc; } -void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, const QPoint& /* point */) +void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, const TQPoint& /* point */) { MYMONEYTRACER(tracer); int row = realrow; @@ -422,22 +422,22 @@ void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, co m_contextMenu->setItemEnabled(m_contextMenuDuplicate, row < static_cast<int> (m_transaction.splits().count()-1)); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); } } } -void kMyMoneySplitTable::contentsMousePressEvent( QMouseEvent* e ) +void kMyMoneySplitTable::contentsMousePressEvent( TQMouseEvent* e ) { slotSetFocus( rowAt(e->pos().y()), columnAt(e->pos().x()), e->button(), e->pos() ); } -/* turn off QTable behaviour */ -void kMyMoneySplitTable::contentsMouseReleaseEvent( QMouseEvent* /* e */ ) +/* turn off TQTable behaviour */ +void kMyMoneySplitTable::contentsMouseReleaseEvent( TQMouseEvent* /* e */ ) { } -void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void kMyMoneySplitTable::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { MYMONEYTRACER(tracer); @@ -452,7 +452,7 @@ void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) break; case 2: - editWidget = dynamic_cast<KLineEdit*> (m_editAmount->focusWidget()); + editWidget = dynamic_cast<KLineEdit*> (m_editAmount->tqfocusWidget()); break; default: @@ -463,7 +463,7 @@ void kMyMoneySplitTable::contentsMouseDoubleClickEvent( QMouseEvent *e ) editWidget->selectAll(); // we need to call setFocus on the edit widget from the // main loop again to get the keyboard focus to the widget also - QTimer::singleShot(0, editWidget, SLOT(setFocus())); + TQTimer::singleShot(0, editWidget, TQT_SLOT(setFocus())); } } @@ -474,8 +474,8 @@ void kMyMoneySplitTable::setCurrentCell(int row, int /* col */) if(row > m_maxRows) row = m_maxRows; m_currentRow = row; - QTable::setCurrentCell(row, 0); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQTable::setCurrentCell(row, 0); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(row < static_cast<int>(list.count())) m_split = list[row]; else @@ -484,16 +484,16 @@ void kMyMoneySplitTable::setCurrentCell(int row, int /* col */) void kMyMoneySplitTable::setNumRows(int irows) { - QTable::setNumRows(irows); + TQTable::setNumRows(irows); // determine row height according to the edit widgets // we use the category widget as the base - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); int height = fm.lineSpacing()+6; #if 0 // recalculate row height hint KMyMoneyCategory cat; - height = QMAX(cat.sizeHint().height(), height); + height = TQMAX(cat.tqsizeHint().height(), height); #endif verticalHeader()->setUpdatesEnabled(false); @@ -517,10 +517,10 @@ void kMyMoneySplitTable::setTransaction(const MyMoneyTransaction& t, const MyMon slotUpdateData(m_transaction); } -const QValueList<MyMoneySplit> kMyMoneySplitTable::getSplits(const MyMoneyTransaction& t) const +const TQValueList<MyMoneySplit> kMyMoneySplitTable::getSplits(const MyMoneyTransaction& t) const { - QValueList<MyMoneySplit> list; - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit> list; + TQValueList<MyMoneySplit>::Iterator it; // get list of splits list = t.splits(); @@ -541,14 +541,14 @@ void kMyMoneySplitTable::slotUpdateData(const MyMoneyTransaction& t) MYMONEYTRACER(tracer); unsigned long rowCount=0; - QValueList<MyMoneySplit> list = getSplits(t); + TQValueList<MyMoneySplit> list = getSplits(t); updateTransactionTableSize(); // fill the part that is used by transactions - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; kMyMoneyEdit* valfield = new kMyMoneyEdit(); for(it = list.begin(); it != list.end(); ++it) { - QString colText; + TQString colText; MyMoneyMoney value = (*it).value(); if(!(*it).accountId().isEmpty()) { try { @@ -558,17 +558,17 @@ void kMyMoneySplitTable::slotUpdateData(const MyMoneyTransaction& t) delete e; } } - QString amountTxt = value.formatMoney(m_account.fraction()); + TQString amountTxt = value.formatMoney(m_account.fraction()); if(value == MyMoneyMoney::autoCalc) { amountTxt = i18n("will be calculated"); } if(colText.isEmpty() && (*it).memo().isEmpty() && value.isZero()) - amountTxt = QString(); + amountTxt = TQString(); unsigned width = fontMetrics().width(amountTxt); valfield->setMinimumWidth(width); - width = valfield->minimumSizeHint().width(); + width = valfield->tqminimumSizeHint().width(); if(width > m_amountWidth) m_amountWidth = width; @@ -613,7 +613,7 @@ void kMyMoneySplitTable::updateTransactionTableSize(void) m_maxRows = splitCount; } -void kMyMoneySplitTable::resizeEvent(QResizeEvent* /* ev */) +void kMyMoneySplitTable::resizeEvent(TQResizeEvent* /* ev */) { int w = visibleWidth() - m_amountWidth; @@ -628,7 +628,7 @@ void kMyMoneySplitTable::resizeEvent(QResizeEvent* /* ev */) void kMyMoneySplitTable::slotDuplicateSplit(void) { MYMONEYTRACER(tracer); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(m_currentRow < static_cast<int> (list.count())) { MyMoneySplit split = list[m_currentRow]; split.clearId(); @@ -645,7 +645,7 @@ void kMyMoneySplitTable::slotDuplicateSplit(void) void kMyMoneySplitTable::slotDeleteSplit(void) { MYMONEYTRACER(tracer); - QValueList<MyMoneySplit> list = getSplits(m_transaction); + TQValueList<MyMoneySplit> list = getSplits(m_transaction); if(m_currentRow < static_cast<int> (list.count())) { if(KMessageBox::warningContinueCancel (this, i18n("You are about to delete the selected split. " @@ -669,7 +669,7 @@ void kMyMoneySplitTable::slotDeleteSplit(void) } } -QWidget* kMyMoneySplitTable::slotStartEdit(void) +TQWidget* kMyMoneySplitTable::slotStartEdit(void) { MYMONEYTRACER(tracer); return createEditWidgets(); @@ -735,7 +735,7 @@ void kMyMoneySplitTable::endEdit(bool keyBoardDriven) fromValue = s1.value().abs(); // if we had a price info in the beginning, we use it here - if(m_priceInfo.find(cat.currencyId()) != m_priceInfo.end()) { + if(m_priceInfo.tqfind(cat.currencyId()) != m_priceInfo.end()) { toValue = (fromValue * m_priceInfo[cat.currencyId()]).convert(fract); } @@ -760,7 +760,7 @@ void kMyMoneySplitTable::endEdit(bool keyBoardDriven) fract, this, "currencyCalculator"); - if(calc.exec() == QDialog::Rejected) { + if(calc.exec() == TQDialog::Rejected) { return; } else { s1.setShares((s1.value() * calc.price()).convert(fract)); @@ -817,7 +817,7 @@ void kMyMoneySplitTable::destroyEditWidgets(void) { MYMONEYTRACER(tracer); - disconnect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadEditWidgets())); + disconnect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadEditWidgets())); clearCellWidget(m_currentRow, 0); clearCellWidget(m_currentRow, 1); @@ -825,14 +825,14 @@ void kMyMoneySplitTable::destroyEditWidgets(void) clearCellWidget(m_currentRow+1, 0); m_editMode = false; - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 100); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 100); } -QWidget* kMyMoneySplitTable::createEditWidgets(void) +TQWidget* kMyMoneySplitTable::createEditWidgets(void) { MYMONEYTRACER(tracer); - QFont cellFont = KMyMoneyGlobalSettings::listCellFont(); + TQFont cellFont = KMyMoneyGlobalSettings::listCellFont(); m_tabOrderWidgets.clear(); // create the widgets @@ -843,8 +843,8 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) m_editCategory = new KMyMoneyCategory(); m_editCategory->setHint(i18n("Category")); m_editCategory->setFont(cellFont); - connect(m_editCategory, SIGNAL(createItem(const QString&, QString&)), this, SIGNAL(createCategory(const QString&, QString&))); - connect(m_editCategory, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); + connect(m_editCategory, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SIGNAL(createCategory(const TQString&, TQString&))); + connect(m_editCategory, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); m_editMemo = new kMyMoneyLineEdit(0, 0, false, AlignLeft|AlignVCenter); m_editMemo->setHint(i18n("Memo")); @@ -852,22 +852,22 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // create buttons for the mouse users KIconLoader *il = KGlobal::iconLoader(); - m_registerButtonFrame = new QFrame(this, "buttonFrame"); - QPalette palette = m_registerButtonFrame->palette(); - palette.setColor(QColorGroup::Background, rowBackgroundColor(m_currentRow+1) ); + m_registerButtonFrame = new TQFrame(this, "buttonFrame"); + TQPalette palette = m_registerButtonFrame->palette(); + palette.setColor(TQColorGroup::Background, rowBackgroundColor(m_currentRow+1) ); m_registerButtonFrame->setPalette(palette); - QHBoxLayout* l = new QHBoxLayout(m_registerButtonFrame); - m_registerEnterButton = new KPushButton(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall), QString(), m_registerButtonFrame, "EnterButton"); + TQHBoxLayout* l = new TQHBoxLayout(m_registerButtonFrame); + m_registerEnterButton = new KPushButton(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall), TQString(), m_registerButtonFrame, "EnterButton"); - m_registerCancelButton = new KPushButton(il->loadIcon("button_cancel", KIcon::Small, KIcon::SizeSmall), QString(), m_registerButtonFrame, "CancelButton"); + m_registerCancelButton = new KPushButton(il->loadIcon("button_cancel", KIcon::Small, KIcon::SizeSmall), TQString(), m_registerButtonFrame, "CancelButton"); l->addWidget(m_registerEnterButton); l->addWidget(m_registerCancelButton); l->addStretch(2); - connect(m_registerEnterButton, SIGNAL(clicked()), this, SLOT(slotEndEdit())); - connect(m_registerCancelButton, SIGNAL(clicked()), this, SLOT(slotCancelEdit())); + connect(m_registerEnterButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEndEdit())); + connect(m_registerCancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCancelEdit())); // setup tab order addToTabOrder(m_editCategory); @@ -882,8 +882,8 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // check if the transaction is balanced or not. If not, // assign the remainder to the amount. MyMoneyMoney diff; - QValueList<MyMoneySplit> list = m_transaction.splits(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit> list = m_transaction.splits(); + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if(!(*it_s).accountId().isEmpty()) diff += (*it_s).value(); @@ -906,10 +906,10 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) // load e.g. the category widget with the account list slotLoadEditWidgets(); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadEditWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadEditWidgets())); // setup the keyboard filter for all widgets - for(QWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { + for(TQWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { w->installEventFilter(this); } @@ -923,7 +923,7 @@ QWidget* kMyMoneySplitTable::createEditWidgets(void) void kMyMoneySplitTable::slotLoadEditWidgets(void) { // reload category widget - QString categoryId = m_editCategory->selectedItem(); + TQString categoryId = m_editCategory->selectedItem(); AccountSet aSet; aSet.addAccountGroup(MyMoneyAccount::Asset); @@ -951,11 +951,11 @@ void kMyMoneySplitTable::slotLoadEditWidgets(void) } -void kMyMoneySplitTable::addToTabOrder(QWidget* w) +void kMyMoneySplitTable::addToTabOrder(TQWidget* w) { if(w) { while(w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); m_tabOrderWidgets.append(w); } } @@ -966,10 +966,10 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) bool rc = false; if(m_editCategory) { - QWidget *w = 0; - QWidget *currentWidget; + TQWidget *w = 0; + TQWidget *currentWidget; - m_tabOrderWidgets.find(qApp->focusWidget()); + m_tabOrderWidgets.tqfind(tqApp->tqfocusWidget()); currentWidget = m_tabOrderWidgets.current(); w = next ? m_tabOrderWidgets.next() : m_tabOrderWidgets.prev(); @@ -979,7 +979,7 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) } if(w != currentWidget - && ((w->focusPolicy() & TabFocus) == TabFocus) + && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus) && w->isVisible() && w->isEnabled()) { w->setFocus(); rc = true; @@ -989,7 +989,7 @@ bool kMyMoneySplitTable::focusNextPrevChild(bool next) } while(w != currentWidget); } else - rc = QTable::focusNextPrevChild(next); + rc = TQTable::focusNextPrevChild(next); return rc; } diff --git a/kmymoney2/dialogs/kmymoneysplittable.h b/kmymoney2/dialogs/kmymoneysplittable.h index 023660f..477084f 100644 --- a/kmymoney2/dialogs/kmymoneysplittable.h +++ b/kmymoney2/dialogs/kmymoneysplittable.h @@ -26,10 +26,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qtable.h> -#include <qwidgetlist.h> -#include <qguardedptr.h> +#include <tqwidget.h> +#include <tqtable.h> +#include <tqwidgetlist.h> +#include <tqguardedptr.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -50,15 +50,16 @@ class kMyMoneyEdit; /** * @author Thomas Baumgart */ -class kMyMoneySplitTable : public QTable +class kMyMoneySplitTable : public TQTable { Q_OBJECT + TQ_OBJECT public: - kMyMoneySplitTable(QWidget *parent=0, const char *name=0); + kMyMoneySplitTable(TQWidget *tqparent=0, const char *name=0); virtual ~kMyMoneySplitTable(); - void paintCell(QPainter *p, int row, int col, const QRect& r, bool /*selected*/); - void paintFocus(QPainter *p, const QRect &cr); + void paintCell(TQPainter *p, int row, int col, const TQRect& r, bool /*selected*/); + void paintFocus(TQPainter *p, const TQRect &cr); /** * This method is used to load the widget with the information about @@ -83,19 +84,19 @@ public: * @param t reference to transaction * @return list of splits */ - const QValueList<MyMoneySplit> getSplits(const MyMoneyTransaction& t) const; + const TQValueList<MyMoneySplit> getSplits(const MyMoneyTransaction& t) const; - void setup(const QMap<QString, MyMoneyMoney>& priceInfo); + void setup(const TQMap<TQString, MyMoneyMoney>& priceInfo); protected: - void contentsMousePressEvent( QMouseEvent* e ); - void contentsMouseReleaseEvent( QMouseEvent* e ); - void contentsMouseDoubleClickEvent( QMouseEvent* e ); - bool eventFilter(QObject *o, QEvent *e); - void endEdit(int row, int col, bool accept, bool replace ); - - void resizeEvent(QResizeEvent*); - QWidget* createEditWidgets(void); + void contentsMousePressEvent( TQMouseEvent* e ); + void contentsMouseReleaseEvent( TQMouseEvent* e ); + void contentsMouseDoubleClickEvent( TQMouseEvent* e ); + bool eventFilter(TQObject *o, TQEvent *e); + void endEdit(int row, int col, bool accept, bool tqreplace ); + + void resizeEvent(TQResizeEvent*); + TQWidget* createEditWidgets(void); void destroyEditWidgets(void); /** @@ -108,7 +109,7 @@ protected: * pressed by the user */ virtual bool focusNextPrevChild(bool next); - void addToTabOrder(QWidget* w); + void addToTabOrder(TQWidget* w); /** * convenience function for setCurrentCell(int row, int col) @@ -128,9 +129,9 @@ protected: * This method retuns the background color for a given @p row. * * @param row the row in question - * @return the color as QColor object + * @return the color as TQColor object */ - const QColor rowBackgroundColor(const int row) const; + const TQColor rowBackgroundColor(const int row) const; void endEdit(bool keyboardDriven); @@ -140,7 +141,7 @@ public slots: virtual void setNumRows(int r); - QWidget* slotStartEdit(void); + TQWidget* slotStartEdit(void); void slotEndEdit(void); void slotEndEditKeyboard(void); void slotDeleteSplit(void); @@ -151,7 +152,7 @@ protected slots: virtual void columnWidthChanged(int col); /// move the focus to the selected @p row. - void slotSetFocus(int row, int col = 0, int button = Qt::LeftButton, const QPoint & mousePos = QPoint(0, 0)); + void slotSetFocus(int row, int col = 0, int button = Qt::LeftButton, const TQPoint & mousePos = TQPoint(0, 0)); /** * Calling this slot refills the widget with the data @@ -190,7 +191,7 @@ signals: * @param txt The name of the category to be created * @param id A connected slot should store the id of the created object in this variable */ - void createCategory(const QString& txt, QString& id); + void createCategory(const TQString& txt, TQString& id); /** * Signal is emitted, if any of the widgets enters (@a state equals @a true) @@ -233,32 +234,32 @@ private: * The widget will be created and destroyed dynamically in createInputWidgets() * and destroyInputWidgets(). */ - QGuardedPtr<KMyMoneyCategory> m_editCategory; + TQGuardedPtr<KMyMoneyCategory> m_editCategory; /** * This member contains a pointer to the input widget for the memo. * The widget will be created and destroyed dynamically in createInputWidgets() * and destroyInputWidgets(). */ - QGuardedPtr<kMyMoneyLineEdit> m_editMemo; + TQGuardedPtr<kMyMoneyLineEdit> m_editMemo; /** * This member contains a pointer to the input widget for the amount. * The widget will be created and destroyed dynamically in createInputWidgets() * and destroyInputWidgets(). */ - QGuardedPtr<kMyMoneyEdit> m_editAmount; + TQGuardedPtr<kMyMoneyEdit> m_editAmount; /** * This member keeps the tab order for the above widgets */ - QWidgetList m_tabOrderWidgets; + TQWidgetList m_tabOrderWidgets; - QGuardedPtr<QFrame> m_registerButtonFrame; - QGuardedPtr<KPushButton> m_registerEnterButton; - QGuardedPtr<KPushButton> m_registerCancelButton; + TQGuardedPtr<TQFrame> m_registerButtonFrame; + TQGuardedPtr<KPushButton> m_registerEnterButton; + TQGuardedPtr<KPushButton> m_registerCancelButton; - QMap<QString, MyMoneyMoney> m_priceInfo; + TQMap<TQString, MyMoneyMoney> m_priceInfo; }; #endif diff --git a/kmymoney2/dialogs/knewaccountdlg.cpp b/kmymoney2/dialogs/knewaccountdlg.cpp index f941f2e..fb01aef 100644 --- a/kmymoney2/dialogs/knewaccountdlg.cpp +++ b/kmymoney2/dialogs/knewaccountdlg.cpp @@ -23,19 +23,19 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qheader.h> -#include <qtooltip.h> -#include <qcheckbox.h> -#include <qtimer.h> -#include <qtabwidget.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qtextedit.h> -#include <qlayout.h> -#include <qtabwidget.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqtooltip.h> +#include <tqcheckbox.h> +#include <tqtimer.h> +#include <tqtabwidget.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> +#include <tqlayout.h> +#include <tqtabwidget.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -88,24 +88,24 @@ #define KMM_KDCHART_PROPSET_NORMAL_DATA KDCHART_PROPSET_NORMAL_DATA #endif -KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bool categoryEditor, QWidget *parent, const char *name, const QString& title) - : KNewAccountDlgDecl(parent,name,true), +KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bool categoryEditor, TQWidget *tqparent, const char *name, const TQString& title) + : KNewAccountDlgDecl(tqparent,name,true), m_account(account), m_bSelectedParentAccount(false), m_categoryEditor(categoryEditor), m_isEditing(isEditing) { - QString columnName = ( (categoryEditor) ? i18n("Categories") : i18n("Accounts") ); + TQString columnName = ( (categoryEditor) ? i18n("Categories") : i18n("Accounts") ); m_qlistviewParentAccounts->setRootIsDecorated(true); m_qlistviewParentAccounts->setAllColumnsShowFocus(true); m_qlistviewParentAccounts->setSectionHeader(columnName); m_qlistviewParentAccounts->setMultiSelection(false); m_qlistviewParentAccounts->header()->setResizeEnabled(true); - m_qlistviewParentAccounts->setColumnWidthMode(0, QListView::Maximum); + m_qlistviewParentAccounts->setColumnWidthMode(0, TQListView::Maximum); m_qlistviewParentAccounts->setEnabled(false); // never show the horizontal scroll bar - m_qlistviewParentAccounts->setHScrollBarMode(QScrollView::AlwaysOff); + m_qlistviewParentAccounts->setHScrollBarMode(TQScrollView::AlwaysOff); m_subAccountLabel->setText(i18n("Is a sub account")); @@ -135,7 +135,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo if (categoryEditor) { // get rid of the tabs that are not used for categories - QWidget* tab = m_tab->page(m_tab->indexOf(m_institutionTab)); + TQWidget* tab = m_tab->page(m_tab->indexOf(m_institutionTab)); if(tab) m_tab->removePage(tab); tab = m_tab->page(m_tab->indexOf(m_limitsTab)); @@ -178,7 +178,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo else { // get rid of the tabs that are not used for accounts - QWidget* taxtab = m_tab->page(m_tab->indexOf(m_taxTab)); + TQWidget* taxtab = m_tab->page(m_tab->indexOf(m_taxTab)); if (taxtab) { if(m_account.isAssetLiability()) { m_vatCategory->setText(i18n( "VAT account")); @@ -206,7 +206,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo default: // no limit available, so we might get rid of the tab - QWidget* tab = m_tab->page(m_tab->indexOf(m_limitsTab)); + TQWidget* tab = m_tab->page(m_tab->indexOf(m_limitsTab)); if(tab) m_tab->removePage(tab); // don't try to hide the widgets we just wiped @@ -289,7 +289,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo } if(!m_account.openingDate().isValid()) - m_account.setOpeningDate(QDate::currentDate()); + m_account.setOpeningDate(TQDate::tqcurrentDate()); startDateEdit->setDate(m_account.openingDate()); accountNoEdit->setText(account.number()); @@ -334,14 +334,14 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo // Load the institutions // then the accounts - QString institutionName; + TQString institutionName; try { if (m_isEditing && !account.institutionId().isEmpty()) institutionName = file->institution(account.institutionId()).name(); else - institutionName = QString(); + institutionName = TQString(); } catch (MyMoneyException *e) { @@ -349,7 +349,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo delete e; } - initParentWidget(account.parentAccountId(), account.id()); + initParentWidget(account.tqparentAccountId(), account.id()); if(m_account.isInvest()) m_qlistviewParentAccounts->setEnabled(false); @@ -366,44 +366,44 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo cancelButton->setGuiItem(KStdGuiItem::cancel()); createButton->setGuiItem(KStdGuiItem::ok()); - connect(cancelButton, SIGNAL(clicked()), SLOT(reject())); - connect(createButton, SIGNAL(clicked()), this, SLOT(okClicked())); - connect(m_qlistviewParentAccounts, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotSelectionChanged(QListViewItem*))); - connect(m_qbuttonNew, SIGNAL(clicked()), this, SLOT(slotNewClicked())); - connect(typeCombo, SIGNAL(activated(const QString&)), - this, SLOT(slotAccountTypeChanged(const QString&))); + connect(cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(createButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(okClicked())); + connect(m_qlistviewParentAccounts, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotSelectionChanged(TQListViewItem*))); + connect(m_qbuttonNew, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewClicked())); + connect(typeCombo, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(slotAccountTypeChanged(const TQString&))); - connect(accountNameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckFinished())); + connect(accountNameEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckFinished())); - connect(m_vatCategory, SIGNAL(toggled(bool)), this, SLOT(slotVatChanged(bool))); - connect(m_vatAssignment, SIGNAL(toggled(bool)), this, SLOT(slotVatAssignmentChanged(bool))); - connect(m_vatCategory, SIGNAL(toggled(bool)), this, SLOT(slotCheckFinished())); - connect(m_vatAssignment, SIGNAL(toggled(bool)), this, SLOT(slotCheckFinished())); - connect(m_vatRate, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckFinished())); - connect(m_vatAccount, SIGNAL(stateChanged()), this, SLOT(slotCheckFinished())); + connect(m_vatCategory, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotVatChanged(bool))); + connect(m_vatAssignment, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotVatAssignmentChanged(bool))); + connect(m_vatCategory, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCheckFinished())); + connect(m_vatAssignment, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotCheckFinished())); + connect(m_vatRate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckFinished())); + connect(m_vatAccount, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotCheckFinished())); - connect(m_minBalanceEarlyEdit, SIGNAL(valueChanged(const QString&)), this, SLOT(slotAdjustMinBalanceAbsoluteEdit(const QString&))); - connect(m_minBalanceAbsoluteEdit, SIGNAL(valueChanged(const QString&)), this, SLOT(slotAdjustMinBalanceEarlyEdit(const QString&))); - connect(m_maxCreditEarlyEdit, SIGNAL(valueChanged(const QString&)), this, SLOT(slotAdjustMaxCreditAbsoluteEdit(const QString&))); - connect(m_maxCreditAbsoluteEdit, SIGNAL(valueChanged(const QString&)), this, SLOT(slotAdjustMaxCreditEarlyEdit(const QString&))); + connect(m_minBalanceEarlyEdit, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotAdjustMinBalanceAbsoluteEdit(const TQString&))); + connect(m_minBalanceAbsoluteEdit, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotAdjustMinBalanceEarlyEdit(const TQString&))); + connect(m_maxCreditEarlyEdit, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotAdjustMaxCreditAbsoluteEdit(const TQString&))); + connect(m_maxCreditAbsoluteEdit, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotAdjustMaxCreditEarlyEdit(const TQString&))); - connect(m_qcomboboxInstitutions, SIGNAL(activated(const QString&)), this, SLOT(slotLoadInstitutions(const QString&))); + connect(m_qcomboboxInstitutions, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotLoadInstitutions(const TQString&))); m_vatCategory->setChecked(false); m_vatAssignment->setChecked(false); - // make sure our account does not have an id and no parent assigned - // and certainly no children in case we create a new account + // make sure our account does not have an id and no tqparent assigned + // and certainly no tqchildren in case we create a new account if(!m_isEditing) { m_account.clearId(); - m_account.setParentAccountId(QString()); - QStringList::ConstIterator it; + m_account.setParentAccountId(TQString()); + TQStringList::ConstIterator it; while((it = m_account.accountList().begin()) != m_account.accountList().end()) m_account.removeAccountId(*it); if(m_parentItem == 0) { - // force loading of initial parent + // force loading of initial tqparent m_account.setAccountType(MyMoneyAccount::UnknownAccountType); MyMoneyAccount::_accountTypeE type = account.accountType(); if(type == MyMoneyAccount::UnknownAccountType) @@ -416,7 +416,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo m_vatRate->setValue(MyMoneyMoney(m_account.value("VatRate"))*MyMoneyMoney(100,1)); } else { if(!m_account.value("VatAccount").isEmpty()) { - QString accId = m_account.value("VatAccount").latin1(); + TQString accId = m_account.value("VatAccount").latin1(); try { // make sure account exists MyMoneyFile::instance()->account(accId); @@ -435,14 +435,14 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo slotVatAssignmentChanged(m_vatAssignment->isChecked()); slotCheckFinished(); - kMandatoryFieldGroup* requiredFields = new kMandatoryFieldGroup (this); + kMandatoryFieldGroup* requiredFields = new kMandatoryFieldGroup (TQT_TQOBJECT(this)); requiredFields->setOkButton(createButton); // button to be enabled when all fields present requiredFields->add(accountNameEdit); // using a timeout is the only way, I got the 'ensureItemVisible' // working when creating the dialog. I assume, this // has something to do with the delayed update of the display somehow. - QTimer::singleShot(50, this, SLOT(timerDone())); + TQTimer::singleShot(50, this, TQT_SLOT(timerDone())); } void KNewAccountDlg::timerDone(void) @@ -451,7 +451,7 @@ void KNewAccountDlg::timerDone(void) if(m_parentItem) m_qlistviewParentAccounts->ensureItemVisible(m_parentItem); // KNewAccountDlgDecl::resizeEvent(0); m_qlistviewParentAccounts->setColumnWidth(m_qlistviewParentAccounts->nameColumn(), m_qlistviewParentAccounts->visibleWidth()); - m_qlistviewParentAccounts->repaintContents(false); + m_qlistviewParentAccounts->tqrepaintContents(false); } void KNewAccountDlg::setOpeningBalance(const MyMoneyMoney& balance) @@ -468,7 +468,7 @@ void KNewAccountDlg::okClicked() { MyMoneyFile* file = MyMoneyFile::instance(); - QString accountNameText = accountNameEdit->text(); + TQString accountNameText = accountNameEdit->text(); if (accountNameText.isEmpty()) { KMessageBox::error(this, i18n("You have not specified a name.\nPlease fill in this field.")); @@ -476,24 +476,24 @@ void KNewAccountDlg::okClicked() return; } - MyMoneyAccount parent = parentAccount(); - if (parent.name().length() == 0) + MyMoneyAccount tqparent = tqparentAccount(); + if (tqparent.name().length() == 0) { - KMessageBox::error(this, i18n("Please select a parent account.")); + KMessageBox::error(this, i18n("Please select a tqparent account.")); return; } if (!m_categoryEditor) { - QString institutionNameText = m_qcomboboxInstitutions->currentText(); + TQString institutionNameText = m_qcomboboxInstitutions->currentText(); if (institutionNameText != i18n("<No Institution>")) { try { MyMoneyFile *file = MyMoneyFile::instance(); - QValueList<MyMoneyInstitution> list = file->institutionList(); - QValueList<MyMoneyInstitution>::ConstIterator institutionIterator; + TQValueList<MyMoneyInstitution> list = file->institutionList(); + TQValueList<MyMoneyInstitution>::ConstIterator institutionIterator; for (institutionIterator = list.begin(); institutionIterator != list.end(); ++institutionIterator) { if ((*institutionIterator).name() == institutionNameText) @@ -508,7 +508,7 @@ void KNewAccountDlg::okClicked() } else { - m_account.setInstitutionId(QString()); + m_account.setInstitutionId(TQString()); } } @@ -532,16 +532,16 @@ void KNewAccountDlg::okClicked() storeKVP("lastNumberUsed", m_lastCheckNumberUsed); // delete a previous version of the minimumbalance information - storeKVP("minimumBalance", QString(), QString()); + storeKVP("minimumBalance", TQString(), TQString()); MyMoneyAccount::accountTypeE acctype; if (!m_categoryEditor) { acctype = KMyMoneyUtils::stringToAccountType(typeCombo->currentText()); - // If it's a loan, check if the parent is asset or liability. In + // If it's a loan, check if the tqparent is asset or liability. In // case of asset, we change the account type to be AssetLoan if(acctype == MyMoneyAccount::Loan - && parent.accountGroup() == MyMoneyAccount::Asset) + && tqparent.accountGroup() == MyMoneyAccount::Asset) acctype = MyMoneyAccount::AssetLoan; #if 0 @@ -549,22 +549,22 @@ void KNewAccountDlg::okClicked() // we don't need this check anymore. if(!file->nameToAccount(accountNameText).isEmpty() && (file->nameToAccount(accountNameText) != m_account.id())) { - KMessageBox::error(this, QString("<qt>")+i18n("An account named <b>%1</b> already exists. You cannot create a second account with the same name.").arg(accountNameText)+QString("</qt>")); + KMessageBox::error(this, TQString("<qt>")+i18n("An account named <b>%1</b> already exists. You cannot create a second account with the same name.").tqarg(accountNameText)+TQString("</qt>")); return; } #endif } else { - acctype = parent.accountGroup(); - QString newName; - if(!MyMoneyFile::instance()->isStandardAccount(parent.id())) { - newName = MyMoneyFile::instance()->accountToCategory(parent.id()) + MyMoneyFile::AccountSeperator; + acctype = tqparent.accountGroup(); + TQString newName; + if(!MyMoneyFile::instance()->isStandardAccount(tqparent.id())) { + newName = MyMoneyFile::instance()->accountToCategory(tqparent.id()) + MyMoneyFile::AccountSeperator; } newName += accountNameText; if(!file->categoryToAccount(newName, acctype).isEmpty() && (file->categoryToAccount(newName, acctype) != m_account.id())) { - KMessageBox::error(this, QString("<qt>")+i18n("A category named <b>%1</b> already exists. You cannot create a second category with the same name.").arg(newName)+QString("</qt>")); + KMessageBox::error(this, TQString("<qt>")+i18n("A category named <b>%1</b> already exists. You cannot create a second category with the same name.").tqarg(newName)+TQString("</qt>")); return; } } @@ -619,7 +619,7 @@ void KNewAccountDlg::okClicked() accept(); } -void KNewAccountDlg::loadKVP(const QString& key, kMyMoneyEdit* widget) +void KNewAccountDlg::loadKVP(const TQString& key, kMyMoneyEdit* widget) { if(!widget) return; @@ -631,7 +631,7 @@ void KNewAccountDlg::loadKVP(const QString& key, kMyMoneyEdit* widget) } } -void KNewAccountDlg::loadKVP(const QString& key, KLineEdit* widget) +void KNewAccountDlg::loadKVP(const TQString& key, KLineEdit* widget) { if(!widget) return; @@ -639,7 +639,7 @@ void KNewAccountDlg::loadKVP(const QString& key, KLineEdit* widget) widget->setText(m_account.value(key)); } -void KNewAccountDlg::storeKVP(const QString& key, const QString& text, const QString& value) +void KNewAccountDlg::storeKVP(const TQString& key, const TQString& text, const TQString& value) { if(text.isEmpty()) m_account.deletePair(key); @@ -647,12 +647,12 @@ void KNewAccountDlg::storeKVP(const QString& key, const QString& text, const QSt m_account.setValue(key, value); } -void KNewAccountDlg::storeKVP(const QString& key, kMyMoneyEdit* widget) +void KNewAccountDlg::storeKVP(const TQString& key, kMyMoneyEdit* widget) { storeKVP(key, widget->lineedit()->text(), widget->text()); } -void KNewAccountDlg::storeKVP(const QString& key, KLineEdit* widget) +void KNewAccountDlg::storeKVP(const TQString& key, KLineEdit* widget) { storeKVP(key, widget->text(), widget->text()); } @@ -669,14 +669,14 @@ const MyMoneyAccount& KNewAccountDlg::account(void) break; case 1: case 2: - m_account.setValue("priceMode", QString("%1").arg(m_priceMode->currentItem())); + m_account.setValue("priceMode", TQString("%1").tqarg(m_priceMode->currentItem())); break; } return m_account; } -const MyMoneyAccount& KNewAccountDlg::parentAccount(void) +const MyMoneyAccount& KNewAccountDlg::tqparentAccount(void) { if (!m_bSelectedParentAccount) { @@ -710,7 +710,7 @@ const MyMoneyAccount& KNewAccountDlg::parentAccount(void) return m_parentAccount; } -void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId) +void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accountId) { MyMoneyFile *file = MyMoneyFile::instance(); @@ -723,18 +723,18 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_parentItem = 0; m_accountItem = 0; - // Determine the parent account + // Determine the tqparent account try { - m_parentAccount = file->account(parentId); + m_parentAccount = file->account(tqparentId); } catch (MyMoneyException *e) { m_bSelectedParentAccount = false; m_parentAccount = MyMoneyAccount(); if(m_account.accountType() != MyMoneyAccount::UnknownAccountType) { - parentAccount(); - parentId = m_parentAccount.id(); + tqparentAccount(); + tqparentId = m_parentAccount.id(); } delete e; } @@ -748,7 +748,7 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_qlistviewParentAccounts->clear(); - // Now scan all 4 account roots to load the list and mark the parent + // Now scan all 4 account roots to load the list and mark the tqparent try { if (!m_categoryEditor) @@ -759,15 +759,15 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId if(m_parentAccount.id().isEmpty()) { m_parentAccount = assetAccount; - parentId = m_parentAccount.id(); + tqparentId = m_parentAccount.id(); } - if (parentId == assetAccount.id()) + if (tqparentId == assetAccount.id()) m_parentItem = assetTopLevelAccount; assetTopLevelAccount->setOpen(true); - for ( QStringList::ConstIterator it = assetAccount.accountList().begin(); + for ( TQStringList::ConstIterator it = assetAccount.accountList().begin(); it != assetAccount.accountList().end(); ++it ) { @@ -777,7 +777,7 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(assetTopLevelAccount, acc); - if(parentId == acc.id()) { + if(tqparentId == acc.id()) { m_parentItem = accountItem; } else if(accountId == acc.id()) { if(m_isEditing) @@ -785,10 +785,10 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_accountItem = accountItem; } - QStringList subAccounts = acc.accountList(); + TQStringList subAccounts = acc.accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, parentId, acc.id()); + showSubAccounts(subAccounts, accountItem, tqparentId, acc.id()); } } } @@ -799,15 +799,15 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId if(m_parentAccount.id().isEmpty()) { m_parentAccount = liabilityAccount; - parentId = m_parentAccount.id(); + tqparentId = m_parentAccount.id(); } - if (parentId == liabilityAccount.id()) + if (tqparentId == liabilityAccount.id()) m_parentItem = liabilityTopLevelAccount; liabilityTopLevelAccount->setOpen(true); - for ( QStringList::ConstIterator it = liabilityAccount.accountList().begin(); + for ( TQStringList::ConstIterator it = liabilityAccount.accountList().begin(); it != liabilityAccount.accountList().end(); ++it ) { @@ -817,7 +817,7 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(liabilityTopLevelAccount, acc); - if(parentId == acc.id()) { + if(tqparentId == acc.id()) { m_parentItem = accountItem; } else if(accountId == acc.id()) { if(m_isEditing) @@ -825,10 +825,10 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_accountItem = accountItem; } - QStringList subAccounts = acc.accountList(); + TQStringList subAccounts = acc.accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, parentId, acc.id()); + showSubAccounts(subAccounts, accountItem, tqparentId, acc.id()); } } } @@ -842,23 +842,23 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId if(m_parentAccount.id().isEmpty()) { m_parentAccount = incomeAccount; - parentId = m_parentAccount.id(); + tqparentId = m_parentAccount.id(); } - if (parentId == incomeAccount.id()) + if (tqparentId == incomeAccount.id()) m_parentItem = incomeTopLevelAccount; incomeTopLevelAccount->setOpen(true); - for ( QStringList::ConstIterator it = incomeAccount.accountList().begin(); + for ( TQStringList::ConstIterator it = incomeAccount.accountList().begin(); it != incomeAccount.accountList().end(); ++it ) { KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(incomeTopLevelAccount, file->account(*it)); - QString id = file->account(*it).id(); - if(parentId == id) { + TQString id = file->account(*it).id(); + if(tqparentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -866,10 +866,10 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_accountItem = accountItem; } - QStringList subAccounts = file->account(*it).accountList(); + TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, parentId, accountId); + showSubAccounts(subAccounts, accountItem, tqparentId, accountId); } } } @@ -881,23 +881,23 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId if(m_parentAccount.id().isEmpty()) { m_parentAccount = expenseAccount; - parentId = m_parentAccount.id(); + tqparentId = m_parentAccount.id(); } - if (parentId == expenseAccount.id()) + if (tqparentId == expenseAccount.id()) m_parentItem = expenseTopLevelAccount; expenseTopLevelAccount->setOpen(true); - for ( QStringList::ConstIterator it = expenseAccount.accountList().begin(); + for ( TQStringList::ConstIterator it = expenseAccount.accountList().begin(); it != expenseAccount.accountList().end(); ++it ) { KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(expenseTopLevelAccount, file->account(*it)); - QString id = file->account(*it).id(); - if(parentId == id) { + TQString id = file->account(*it).id(); + if(tqparentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -905,10 +905,10 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_accountItem = accountItem; } - QStringList subAccounts = file->account(*it).accountList(); + TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, parentId, accountId); + showSubAccounts(subAccounts, accountItem, tqparentId, accountId); } } } @@ -924,7 +924,7 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId if (m_parentItem) { - m_subAccountLabel->setText(i18n("Is a sub account of %1").arg(m_parentAccount.name())); + m_subAccountLabel->setText(i18n("Is a sub account of %1").tqarg(m_parentAccount.name())); m_parentItem->setOpen(true); m_qlistviewParentAccounts->setSelected(m_parentItem, true); } @@ -932,18 +932,18 @@ void KNewAccountDlg::initParentWidget(QString parentId, const QString& accountId m_qlistviewParentAccounts->setEnabled(true); } -void KNewAccountDlg::showSubAccounts(QStringList accounts, KMyMoneyAccountTreeBaseItem *parentItem, - const QString& parentId, const QString& accountId) +void KNewAccountDlg::showSubAccounts(TQStringList accounts, KMyMoneyAccountTreeBaseItem *tqparentItem, + const TQString& tqparentId, const TQString& accountId) { MyMoneyFile *file = MyMoneyFile::instance(); - for ( QStringList::ConstIterator it = accounts.begin(); it != accounts.end(); ++it ) + for ( TQStringList::ConstIterator it = accounts.begin(); it != accounts.end(); ++it ) { - KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(parentItem, + KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(tqparentItem, file->account(*it)); - QString id = file->account(*it).id(); - if(parentId == id) { + TQString id = file->account(*it).id(); + if(tqparentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -951,15 +951,15 @@ void KNewAccountDlg::showSubAccounts(QStringList accounts, KMyMoneyAccountTreeBa m_accountItem = accountItem; } - QStringList subAccounts = file->account(*it).accountList(); + TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, parentId, accountId); + showSubAccounts(subAccounts, accountItem, tqparentId, accountId); } } } -void KNewAccountDlg::resizeEvent(QResizeEvent* e) +void KNewAccountDlg::resizeEvent(TQResizeEvent* e) { m_qlistviewParentAccounts->setColumnWidth(0, m_qlistviewParentAccounts->width()); @@ -967,7 +967,7 @@ void KNewAccountDlg::resizeEvent(QResizeEvent* e) KNewAccountDlgDecl::resizeEvent(e); } -void KNewAccountDlg::slotSelectionChanged(QListViewItem *item) +void KNewAccountDlg::slotSelectionChanged(TQListViewItem *item) { KMyMoneyAccountTreeBaseItem *accountItem = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(item); try @@ -976,7 +976,7 @@ void KNewAccountDlg::slotSelectionChanged(QListViewItem *item) //qDebug("Selected account id: %s", accountItem->accountID().data()); m_parentAccount = file->account(accountItem->id()); - m_subAccountLabel->setText(i18n("Is a sub account of %1").arg(m_parentAccount.name())); + m_subAccountLabel->setText(i18n("Is a sub account of %1").tqarg(m_parentAccount.name())); if(m_qlistviewParentAccounts->isEnabled()) { m_bSelectedParentAccount = true; } @@ -990,13 +990,13 @@ void KNewAccountDlg::slotSelectionChanged(QListViewItem *item) void KNewAccountDlg::loadVatAccounts(void) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list); - QValueList<MyMoneyAccount>::Iterator it; - QStringList loadListExpense; - QStringList loadListIncome; - QStringList loadListAsset; - QStringList loadListLiability; + TQValueList<MyMoneyAccount>::Iterator it; + TQStringList loadListExpense; + TQStringList loadListIncome; + TQStringList loadListAsset; + TQStringList loadListLiability; for(it = list.begin(); it != list.end(); ++it) { if(!(*it).value("VatRate").isEmpty()) { if((*it).accountType() == MyMoneyAccount::Expense) @@ -1020,11 +1020,11 @@ void KNewAccountDlg::loadVatAccounts(void) vatSet.load(m_vatAccount, i18n("Expense"), loadListExpense, false); } -void KNewAccountDlg::slotLoadInstitutions(const QString& name) +void KNewAccountDlg::slotLoadInstitutions(const TQString& name) { int id=-1, counter=0; m_qcomboboxInstitutions->clear(); - QString bic; + TQString bic; // Are we forcing the user to use institutions? m_qcomboboxInstitutions->insertItem(i18n("<No Institution>")); m_bicValue->setText(" "); @@ -1034,8 +1034,8 @@ void KNewAccountDlg::slotLoadInstitutions(const QString& name) { MyMoneyFile *file = MyMoneyFile::instance(); - QValueList<MyMoneyInstitution> list = file->institutionList(); - QValueList<MyMoneyInstitution>::ConstIterator institutionIterator; + TQValueList<MyMoneyInstitution> list = file->institutionList(); + TQValueList<MyMoneyInstitution>::ConstIterator institutionIterator; for (institutionIterator = list.begin(), counter=1; institutionIterator != list.end(); ++institutionIterator, counter++) { if ((*institutionIterator).name() == name) { @@ -1084,7 +1084,7 @@ void KNewAccountDlg::slotNewClicked() } } -void KNewAccountDlg::slotAccountTypeChanged(const QString& typeStr) +void KNewAccountDlg::slotAccountTypeChanged(const TQString& typeStr) { MyMoneyAccount::accountTypeE type; MyMoneyAccount::accountTypeE oldType; @@ -1094,25 +1094,25 @@ void KNewAccountDlg::slotAccountTypeChanged(const QString& typeStr) try { oldType = m_account.accountType(); if(oldType != type) { - QString parentId; + TQString tqparentId; switch(MyMoneyAccount::accountGroup(type)) { case MyMoneyAccount::Asset: - parentId = file->asset().id(); + tqparentId = file->asset().id(); break; case MyMoneyAccount::Liability: - parentId = file->liability().id(); + tqparentId = file->liability().id(); break; case MyMoneyAccount::Expense: - parentId = file->expense().id(); + tqparentId = file->expense().id(); break; case MyMoneyAccount::Income: - parentId = file->income().id(); + tqparentId = file->income().id(); break; default: qWarning("Unknown account group in KNewAccountDlg::slotAccountTypeChanged()"); break; } - initParentWidget(parentId, QString()); + initParentWidget(tqparentId, TQString()); m_account.setAccountType(type); } } catch(MyMoneyException *e) { @@ -1176,30 +1176,30 @@ void KNewAccountDlg::adjustEditWidgets(kMyMoneyEdit* dst, kMyMoneyEdit* src, cha } } -void KNewAccountDlg::slotAdjustMinBalanceAbsoluteEdit(const QString&) +void KNewAccountDlg::slotAdjustMinBalanceAbsoluteEdit(const TQString&) { adjustEditWidgets(m_minBalanceAbsoluteEdit, m_minBalanceEarlyEdit, '<', -1); } -void KNewAccountDlg::slotAdjustMinBalanceEarlyEdit(const QString&) +void KNewAccountDlg::slotAdjustMinBalanceEarlyEdit(const TQString&) { adjustEditWidgets(m_minBalanceEarlyEdit, m_minBalanceAbsoluteEdit, '>', -1); } -void KNewAccountDlg::slotAdjustMaxCreditAbsoluteEdit(const QString&) +void KNewAccountDlg::slotAdjustMaxCreditAbsoluteEdit(const TQString&) { adjustEditWidgets(m_maxCreditAbsoluteEdit, m_maxCreditEarlyEdit, '>', 1); } -void KNewAccountDlg::slotAdjustMaxCreditEarlyEdit(const QString&) +void KNewAccountDlg::slotAdjustMaxCreditEarlyEdit(const TQString&) { adjustEditWidgets(m_maxCreditEarlyEdit, m_maxCreditAbsoluteEdit, '<', 1); } -void KNewAccountDlg::addTab(QWidget* w, const QString& name) +void KNewAccountDlg::addTab(TQWidget* w, const TQString& name) { if(w) { - w->reparent(m_tab, QPoint(0,0)); + w->reparent(m_tab, TQPoint(0,0)); m_tab->addTab(w, name); } } diff --git a/kmymoney2/dialogs/knewaccountdlg.h b/kmymoney2/dialogs/knewaccountdlg.h index ee09158..5b6e481 100644 --- a/kmymoney2/dialogs/knewaccountdlg.h +++ b/kmymoney2/dialogs/knewaccountdlg.h @@ -48,6 +48,7 @@ namespace reports { class KNewAccountDlg : public KNewAccountDlgDecl { Q_OBJECT + TQ_OBJECT private: MyMoneyAccount m_account; @@ -64,14 +65,14 @@ private: int m_idPropMaxCredit; int m_idPropMinBalance; - void initParentWidget(QString parentId, const QString& accountId); - void showSubAccounts(QStringList accounts, KMyMoneyAccountTreeBaseItem *parentItem, const QString& parentId, const QString& accountId); + void initParentWidget(TQString tqparentId, const TQString& accountId); + void showSubAccounts(TQStringList accounts, KMyMoneyAccountTreeBaseItem *tqparentItem, const TQString& tqparentId, const TQString& accountId); void loadVatAccounts(void); - void storeKVP(const QString& key, kMyMoneyEdit* widget); - void storeKVP(const QString& key, KLineEdit* widget); - void storeKVP(const QString& key, const QString& text, const QString& value); - void loadKVP(const QString& key, kMyMoneyEdit* widget); - void loadKVP(const QString& key, KLineEdit* widget); + void storeKVP(const TQString& key, kMyMoneyEdit* widget); + void storeKVP(const TQString& key, KLineEdit* widget); + void storeKVP(const TQString& key, const TQString& text, const TQString& value); + void loadKVP(const TQString& key, kMyMoneyEdit* widget); + void loadKVP(const TQString& key, KLineEdit* widget); public: /** @@ -80,17 +81,17 @@ public: * apply and will be handled by the dialog. * * @param account The original data to be used to create the account. In case - * of @p isEditing is false, the account id, the parent account id + * of @p isEditing is false, the account id, the tqparent account id * and the list of all child accounts will be cleared. * @param isEditing If @p false, rules for new account creation apply. * If @p true, rules for account editing apply * @param categoryEditor If @p false, rules for asset/liability accounts apply. * If @p true, rules for income/expense account apply. - * @param parent Pointer to parent object (passed to QDialog). Default is 0. - * @param name Name of the object (passed to QDialog). Default is 0. - * @param title Caption of the object (passed to QDialog). Default is empty string. + * @param tqparent Pointer to tqparent object (passed to TQDialog). Default is 0. + * @param name Name of the object (passed to TQDialog). Default is 0. + * @param title Caption of the object (passed to TQDialog). Default is empty string. */ - KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bool categoryEditor, QWidget *parent=0, const char *name=0, const QString& title=QString::null); + KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bool categoryEditor, TQWidget *tqparent=0, const char *name=0, const TQString& title=TQString()); /** * This method returns the edited account object. @@ -98,9 +99,9 @@ public: const MyMoneyAccount& account(void); /** - * This method returns the parent account of the edited account object. + * This method returns the tqparent account of the edited account object. */ - const MyMoneyAccount& parentAccount(void); + const MyMoneyAccount& tqparentAccount(void); void setOpeningBalance(const MyMoneyMoney& balance); @@ -113,26 +114,26 @@ public: * This tab is usually defined by a plugin (eg. online banking). If @a w is * zero, this is a NOP. @a name is used as the text to be placed on the tab. */ - void addTab(QWidget* w, const QString& name); + void addTab(TQWidget* w, const TQString& name); protected: - void resizeEvent(QResizeEvent* e); - void displayOnlineBankingStatus(void); + void resizeEvent(TQResizeEvent* e); + void displayOnlineBankingtqStatus(void); void adjustEditWidgets(kMyMoneyEdit* dst, kMyMoneyEdit* src, char mode, int corr); protected slots: void okClicked(); - void slotSelectionChanged(QListViewItem *item); - void slotAccountTypeChanged(const QString& type); + void slotSelectionChanged(TQListViewItem *item); + void slotAccountTypeChanged(const TQString& type); void slotVatChanged(bool); void slotVatAssignmentChanged(bool); void slotNewClicked(void); void slotCheckFinished(void); - void slotLoadInstitutions(const QString&); - void slotAdjustMinBalanceAbsoluteEdit(const QString&); - void slotAdjustMinBalanceEarlyEdit(const QString&); - void slotAdjustMaxCreditAbsoluteEdit(const QString&); - void slotAdjustMaxCreditEarlyEdit(const QString&); + void slotLoadInstitutions(const TQString&); + void slotAdjustMinBalanceAbsoluteEdit(const TQString&); + void slotAdjustMinBalanceEarlyEdit(const TQString&); + void slotAdjustMaxCreditAbsoluteEdit(const TQString&); + void slotAdjustMaxCreditEarlyEdit(const TQString&); private slots: void timerDone(void); diff --git a/kmymoney2/dialogs/knewaccountdlgdecl.ui b/kmymoney2/dialogs/knewaccountdlgdecl.ui index 6f6357e..5d374e7 100644 --- a/kmymoney2/dialogs/knewaccountdlgdecl.ui +++ b/kmymoney2/dialogs/knewaccountdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KNewAccountDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kNewAccountDlgDecl</cstring> </property> @@ -22,11 +22,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tab</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_generalTab</cstring> </property> @@ -37,25 +37,25 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>60</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>60</width> <height>32767</height> @@ -71,14 +71,14 @@ <string>Name:</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>accountNameEdit</cstring> </property> </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -100,7 +100,7 @@ <cstring>m_currency</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_currencyText</cstring> </property> @@ -108,7 +108,7 @@ <string>Currency:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>typeCombo</cstring> </property> @@ -124,7 +124,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -132,11 +132,11 @@ <string>Type:</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -157,7 +157,7 @@ <cstring>startDateEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -172,7 +172,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -183,17 +183,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> @@ -214,7 +214,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>140</width> <height>20</height> @@ -223,7 +223,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -231,17 +231,17 @@ <string>Last check number:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -250,26 +250,26 @@ <property name="text"> <string>Notes:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QTextEdit" row="1" column="1"> + <widget class="TQTextEdit" row="1" column="1"> <property name="name"> <cstring>descriptionEdit</cstring> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_qcheckboxNoVat</cstring> </property> @@ -277,15 +277,15 @@ <string>No auto-VAT-assignment</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -311,7 +311,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_qcheckboxPreferred</cstring> </property> @@ -333,7 +333,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -342,7 +342,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_institutionTab</cstring> </property> @@ -353,7 +353,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_institutionBox</cstring> </property> @@ -364,7 +364,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout11</cstring> </property> @@ -378,12 +378,12 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_qcomboboxInstitutions</cstring> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>m_qbuttonNew</cstring> </property> @@ -401,9 +401,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <grid> <property name="name"> @@ -414,17 +414,17 @@ <cstring>accountNoEdit</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>60</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>60</width> <height>32767</height> @@ -434,7 +434,7 @@ <string>Number:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -447,7 +447,7 @@ <cstring>ibanEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -455,7 +455,7 @@ <string>IBAN</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_bicValue</cstring> </property> @@ -477,7 +477,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>30</height> @@ -486,7 +486,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_hiearchyTab</cstring> </property> @@ -497,7 +497,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_subAccountLabel</cstring> </property> @@ -513,7 +513,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_limitsTab</cstring> </property> @@ -532,15 +532,15 @@ <string>This page allows to setup certain limits. KMyMoney will warn you when the account balance reaches a limit.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -556,7 +556,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -564,7 +564,7 @@ <string>Absolute limit</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>m_maxCreditLabel</cstring> </property> @@ -596,7 +596,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_minBalanceLabel</cstring> </property> @@ -618,7 +618,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -638,7 +638,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -647,7 +647,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_taxTab</cstring> </property> @@ -658,7 +658,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -669,15 +669,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout34</cstring> + <cstring>tqlayout34</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_vatCategory</cstring> </property> @@ -685,7 +685,7 @@ <string>VAT category</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_vatCategoryFrame</cstring> </property> @@ -702,7 +702,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -710,9 +710,9 @@ <string>VAT percentage</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout33</cstring> + <cstring>tqlayout33</cstring> </property> <hbox> <property name="name"> @@ -733,7 +733,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -754,7 +754,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -763,7 +763,7 @@ </spacer> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_vatAssignmentFrame</cstring> </property> @@ -780,15 +780,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_vatAssignment</cstring> </property> @@ -803,25 +803,25 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_amountGroup</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>32767</height> @@ -840,7 +840,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_grossAmount</cstring> </property> @@ -851,7 +851,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_netAmount</cstring> </property> @@ -871,7 +871,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -884,7 +884,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_qcheckboxTax</cstring> </property> @@ -909,7 +909,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout29</cstring> </property> @@ -933,7 +933,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>422</width> <height>0</height> @@ -1040,5 +1040,10 @@ <tabstop>createButton</tabstop> <tabstop>cancelButton</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/knewbankdlg.cpp b/kmymoney2/dialogs/knewbankdlg.cpp index f1c4e3f..fd886b8 100644 --- a/kmymoney2/dialogs/knewbankdlg.cpp +++ b/kmymoney2/dialogs/knewbankdlg.cpp @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qpixmap.h> +#include <tqlabel.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,8 +43,8 @@ #include "knewbankdlg.h" -KNewBankDlg::KNewBankDlg(MyMoneyInstitution& institution, QWidget *parent, const char *name) - : KNewBankDlgDecl(parent,name,true), m_institution(institution) +KNewBankDlg::KNewBankDlg(MyMoneyInstitution& institution, TQWidget *tqparent, const char *name) + : KNewBankDlgDecl(tqparent,name,true), m_institution(institution) { okBtn->setGuiItem(KStdGuiItem::ok()); cancelBtn->setGuiItem(KStdGuiItem::cancel()); @@ -58,17 +58,17 @@ KNewBankDlg::KNewBankDlg(MyMoneyInstitution& institution, QWidget *parent, const bicEdit->setText(institution.value("bic")); sortCodeEdit->setText(institution.sortcode()); - connect(okBtn, SIGNAL(clicked()), SLOT(okClicked())); - connect(cancelBtn, SIGNAL(clicked()), SLOT(reject())); - connect(nameEdit, SIGNAL(textChanged ( const QString & )), SLOT(institutionNameChanged( const QString &))); + connect(okBtn, TQT_SIGNAL(clicked()), TQT_SLOT(okClicked())); + connect(cancelBtn, TQT_SIGNAL(clicked()), TQT_SLOT(reject())); + connect(nameEdit, TQT_SIGNAL(textChanged ( const TQString & )), TQT_SLOT(institutionNameChanged( const TQString &))); institutionNameChanged( nameEdit->text()); - kMandatoryFieldGroup* requiredFields = new kMandatoryFieldGroup (this); + kMandatoryFieldGroup* requiredFields = new kMandatoryFieldGroup (TQT_TQOBJECT(this)); requiredFields->setOkButton(okBtn); // button to be enabled when all fields present requiredFields->add(nameEdit); } -void KNewBankDlg::institutionNameChanged( const QString &_text) +void KNewBankDlg::institutionNameChanged( const TQString &_text) { okBtn->setEnabled( !_text.isEmpty() ); } diff --git a/kmymoney2/dialogs/knewbankdlg.h b/kmymoney2/dialogs/knewbankdlg.h index f829a4c..55deee1 100644 --- a/kmymoney2/dialogs/knewbankdlg.h +++ b/kmymoney2/dialogs/knewbankdlg.h @@ -20,7 +20,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdialog.h> +#include <tqdialog.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -39,15 +39,16 @@ class KNewBankDlg : public KNewBankDlgDecl { Q_OBJECT + TQ_OBJECT public: - KNewBankDlg(MyMoneyInstitution& institution, QWidget *parent = 0, const char *name = 0); + KNewBankDlg(MyMoneyInstitution& institution, TQWidget *tqparent = 0, const char *name = 0); ~KNewBankDlg(); const MyMoneyInstitution& institution(void); protected slots: void okClicked(); - void institutionNameChanged( const QString &); + void institutionNameChanged( const TQString &); private: MyMoneyInstitution m_institution; diff --git a/kmymoney2/dialogs/knewbankdlgdecl.ui b/kmymoney2/dialogs/knewbankdlgdecl.ui index e6d4f52..71d496a 100644 --- a/kmymoney2/dialogs/knewbankdlgdecl.ui +++ b/kmymoney2/dialogs/knewbankdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KNewBankDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kNewBankDlgDecl</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -45,7 +45,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -58,11 +58,11 @@ <cstring>nameEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -77,11 +77,11 @@ <cstring>cityEdit</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -96,11 +96,11 @@ <cstring>streetEdit</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -115,11 +115,11 @@ <cstring>postcodeEdit</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -134,11 +134,11 @@ <cstring>telephoneEdit</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -153,11 +153,11 @@ <cstring>sortCodeEdit</cstring> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -184,7 +184,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -208,7 +208,7 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout51</cstring> </property> @@ -232,7 +232,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>449</width> <height>0</height> @@ -264,5 +264,5 @@ </widget> <tabstops> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/knewbudgetdlg.cpp b/kmymoney2/dialogs/knewbudgetdlg.cpp index 5971e54..67fcbda 100644 --- a/kmymoney2/dialogs/knewbudgetdlg.cpp +++ b/kmymoney2/dialogs/knewbudgetdlg.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -37,19 +37,19 @@ const int KNewBudgetDlg::m_icFutureYears = 5; const int KNewBudgetDlg::m_icPastYears = 2; -KNewBudgetDlg::KNewBudgetDlg(QWidget* parent, const char *name) : - KNewBudgetDlgDecl(parent, name) +KNewBudgetDlg::KNewBudgetDlg(TQWidget* tqparent, const char *name) : + KNewBudgetDlgDecl(tqparent, name) { - QStringList slYear; - QDate dToday = QDate::currentDate(); + TQStringList slYear; + TQDate dToday = TQDate::tqcurrentDate(); int iYear = dToday.year(); for (int i=0; i<=m_icFutureYears; i++) - m_cbYear->insertItem( QString::number(iYear++) ); + m_cbYear->insertItem( TQString::number(iYear++) ); iYear = dToday.year(); for (int i=0; i<=m_icFutureYears; i++) - m_cbYear->insertItem( QString::number(--iYear) ); + m_cbYear->insertItem( TQString::number(--iYear) ); } KNewBudgetDlg::~KNewBudgetDlg() diff --git a/kmymoney2/dialogs/knewbudgetdlg.h b/kmymoney2/dialogs/knewbudgetdlg.h index db63e11..697ecfd 100644 --- a/kmymoney2/dialogs/knewbudgetdlg.h +++ b/kmymoney2/dialogs/knewbudgetdlg.h @@ -21,13 +21,13 @@ // ---------------------------------------------------------------------------- // QT Includes -class QListViewItem; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes -#include <qdatetime.h> -#include <qcombobox.h> -#include <qlineedit.h> +#include <tqdatetime.h> +#include <tqcombobox.h> +#include <tqlineedit.h> // ---------------------------------------------------------------------------- // Project Includes @@ -36,12 +36,13 @@ class QListViewItem; class KNewBudgetDlg : public KNewBudgetDlgDecl { Q_OBJECT + TQ_OBJECT public: - KNewBudgetDlg(QWidget* parent, const char *name); + KNewBudgetDlg(TQWidget* tqparent, const char *name); ~KNewBudgetDlg(); - QString& getYear() {return m_year;}; - QString& getName() {return m_name;}; + TQString& getYear() {return m_year;}; + TQString& getName() {return m_name;}; public slots: virtual void m_pbCancel_clicked(); @@ -52,8 +53,8 @@ private: static const int m_icFutureYears; static const int m_icPastYears; - QString m_year; - QString m_name; + TQString m_year; + TQString m_name; }; #endif // KNEWBUDGETDLG_H diff --git a/kmymoney2/dialogs/knewbudgetdlgdecl.ui b/kmymoney2/dialogs/knewbudgetdlgdecl.ui index 7066a56..7a18195 100644 --- a/kmymoney2/dialogs/knewbudgetdlgdecl.ui +++ b/kmymoney2/dialogs/knewbudgetdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KNewBudgetDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KNewBudgetDlgDecl</cstring> </property> @@ -22,31 +22,31 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -54,7 +54,7 @@ <string>Name</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -64,20 +64,20 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_leBudgetName</cstring> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <property name="name"> <cstring>m_cbYear</cstring> </property> @@ -100,9 +100,9 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -163,11 +163,11 @@ <includes> <include location="local" impldecl="in implementation">knewbudgetdlgdecl.ui.h</include> </includes> -<slots> +<Q_SLOTS> <slot>m_pbOk_clicked()</slot> <slot>m_pbCancel_clicked()</slot> -</slots> -<layoutdefaults spacing="6" margin="11"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="11"/> diff --git a/kmymoney2/dialogs/knewequityentrydecl.ui b/kmymoney2/dialogs/knewequityentrydecl.ui index affd116..4f97f92 100644 --- a/kmymoney2/dialogs/knewequityentrydecl.ui +++ b/kmymoney2/dialogs/knewequityentrydecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kNewEquityEntryDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kNewEquityEntryDecl</cstring> </property> @@ -22,15 +22,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>lblEquityName</cstring> </property> @@ -38,7 +38,7 @@ <string>Equity Name:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>lblType</cstring> </property> @@ -57,15 +57,15 @@ <string>Trading Symbol of the stock or mutual fund, not required.</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="1"> + <widget class="TQLayoutWidget" row="3" column="1"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -80,7 +80,7 @@ <property name="text"> <string>1 /</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -91,7 +91,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>lblSymbol</cstring> </property> @@ -99,7 +99,7 @@ <string>Market Symbol:</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -150,16 +150,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -175,7 +175,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>20</height> @@ -232,5 +232,5 @@ <tabstop>btnOK</tabstop> <tabstop>btnCancel</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/knewequityentrydlg.cpp b/kmymoney2/dialogs/knewequityentrydlg.cpp index 86a1ab8..29a91b3 100644 --- a/kmymoney2/dialogs/knewequityentrydlg.cpp +++ b/kmymoney2/dialogs/knewequityentrydlg.cpp @@ -36,19 +36,19 @@ #include "../widgets/kmymoneyedit.h" #include "../mymoney/mymoneymoney.h" -KNewEquityEntryDlg::KNewEquityEntryDlg(QWidget *parent, const char *name) - : kNewEquityEntryDecl(parent, name, TRUE) +KNewEquityEntryDlg::KNewEquityEntryDlg(TQWidget *tqparent, const char *name) + : kNewEquityEntryDecl(tqparent, name, TRUE) { edtFraction->setCalculatorButtonVisible(false); edtFraction->setPrecision(0); edtFraction->loadText("100"); - connect(btnOK, SIGNAL(clicked()), this, SLOT(onOKClicked())); - connect(btnCancel, SIGNAL(clicked()), this, SLOT(reject())); + connect(btnOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(onOKClicked())); + connect(btnCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); - connect(edtFraction, SIGNAL(textChanged(const QString&)), this, SLOT(slotDataChanged())); - connect(edtMarketSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotDataChanged())); - connect(edtEquityName, SIGNAL(textChanged(const QString&)), this, SLOT(slotDataChanged())); + connect(edtFraction, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotDataChanged())); + connect(edtMarketSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotDataChanged())); + connect(edtEquityName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotDataChanged())); // add icons to buttons btnOK->setGuiItem(KStdGuiItem::ok()); @@ -72,13 +72,13 @@ void KNewEquityEntryDlg::onOKClicked() accept(); } -void KNewEquityEntryDlg::setSymbolName(const QString& str) +void KNewEquityEntryDlg::setSymbolName(const TQString& str) { m_strSymbolName = str; edtMarketSymbol->setText(m_strSymbolName); } -void KNewEquityEntryDlg::setName(const QString& str) +void KNewEquityEntryDlg::setName(const TQString& str) { m_strName = str; edtEquityName->setText(m_strName); diff --git a/kmymoney2/dialogs/knewequityentrydlg.h b/kmymoney2/dialogs/knewequityentrydlg.h index 25605c6..d3a5a89 100644 --- a/kmymoney2/dialogs/knewequityentrydlg.h +++ b/kmymoney2/dialogs/knewequityentrydlg.h @@ -20,10 +20,10 @@ * * ***************************************************************************/ -#ifndef KNEWEQUITYENTRY_H -#define KNEWEQUITYENTRY_H +#ifndef KNEWETQUITYENTRY_H +#define KNEWETQUITYENTRY_H -#include <qdialog.h> +#include <tqdialog.h> #include <klocale.h> #include "../dialogs/knewequityentrydecl.h" @@ -39,15 +39,16 @@ class KNewEquityEntryDlg : public kNewEquityEntryDecl { Q_OBJECT + TQ_OBJECT public: - KNewEquityEntryDlg(QWidget *parent = NULL, const char *name = NULL); + KNewEquityEntryDlg(TQWidget *tqparent = NULL, const char *name = NULL); virtual ~KNewEquityEntryDlg(); - void setSymbolName(const QString& str); - QString symbolName(void) const { return m_strSymbolName; } + void setSymbolName(const TQString& str); + TQString symbolName(void) const { return m_strSymbolName; } - void setName(const QString& str); - QString name(void) const { return m_strName; } + void setName(const TQString& str); + TQString name(void) const { return m_strName; } int fraction(void) const { return m_fraction; } @@ -56,8 +57,8 @@ protected slots: void slotDataChanged(void); private: - QString m_strSymbolName; - QString m_strName; + TQString m_strSymbolName; + TQString m_strName; int m_fraction; }; diff --git a/kmymoney2/dialogs/knewfiledlg.cpp b/kmymoney2/dialogs/knewfiledlg.cpp index 2ea043f..7a3b221 100644 --- a/kmymoney2/dialogs/knewfiledlg.cpp +++ b/kmymoney2/dialogs/knewfiledlg.cpp @@ -19,9 +19,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqpixmap.h> +#include <tqlineedit.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -43,16 +43,16 @@ #include "knewfiledlg.h" -KNewFileDlg::KNewFileDlg(QWidget *parent, const char *name, const QString& title) - : KNewFileDlgDecl(parent,name,true) +KNewFileDlg::KNewFileDlg(TQWidget *tqparent, const char *name, const TQString& title) + : KNewFileDlgDecl(tqparent,name,true) { init(title); } -KNewFileDlg::KNewFileDlg(QString userName, QString userStreet, - QString userTown, QString userCounty, QString userPostcode, QString userTelephone, - QString userEmail, QWidget *parent, const char *name, const QString& title) - : KNewFileDlgDecl(parent,name,true) +KNewFileDlg::KNewFileDlg(TQString userName, TQString userStreet, + TQString userTown, TQString userCounty, TQString userPostcode, TQString userTelephone, + TQString userEmail, TQWidget *tqparent, const char *name, const TQString& title) + : KNewFileDlgDecl(tqparent,name,true) { userNameEdit->setText(userName); streetEdit->setText(userStreet); @@ -65,7 +65,7 @@ KNewFileDlg::KNewFileDlg(QString userName, QString userStreet, init(title); } -void KNewFileDlg::init(const QString& title) +void KNewFileDlg::init(const TQString& title) { bool showLoadButton = false; okBtn->setGuiItem(KStdGuiItem::ok()); @@ -86,9 +86,9 @@ void KNewFileDlg::init(const QString& title) userNameEdit->setFocus(); - connect(cancelBtn, SIGNAL(clicked()), this, SLOT(reject())); - connect(okBtn, SIGNAL(clicked()), this, SLOT(okClicked())); - connect(kabcBtn, SIGNAL(clicked()), this, SLOT(loadFromKABC())); + connect(cancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(okBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(okClicked())); + connect(kabcBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(loadFromKABC())); } KNewFileDlg::~KNewFileDlg(){ diff --git a/kmymoney2/dialogs/knewfiledlg.h b/kmymoney2/dialogs/knewfiledlg.h index 706a139..3cf8c7c 100644 --- a/kmymoney2/dialogs/knewfiledlg.h +++ b/kmymoney2/dialogs/knewfiledlg.h @@ -19,7 +19,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdialog.h> +#include <tqdialog.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -33,27 +33,28 @@ // Use the second constructor to edit a file. class KNewFileDlg : public KNewFileDlgDecl { Q_OBJECT + TQ_OBJECT public: - KNewFileDlg(QWidget *parent=0, const char *name=0, const QString& title=QString()); - KNewFileDlg(QString userName, QString userStreet, - QString userTown, QString userCounty, QString userPostcode, QString userTelephone, - QString userEmail, QWidget *parent=0, const char *name=0, const QString& title=QString()); + KNewFileDlg(TQWidget *tqparent=0, const char *name=0, const TQString& title=TQString()); + KNewFileDlg(TQString userName, TQString userStreet, + TQString userTown, TQString userCounty, TQString userPostcode, TQString userTelephone, + TQString userEmail, TQWidget *tqparent=0, const char *name=0, const TQString& title=TQString()); ~KNewFileDlg(); KPushButton* cancelButton(void) { return cancelBtn; }; public: - QString userNameText; - QString userStreetText; - QString userTownText; - QString userCountyText; - QString userPostcodeText; - QString userTelephoneText; - QString userEmailText; + TQString userNameText; + TQString userStreetText; + TQString userTownText; + TQString userCountyText; + TQString userPostcodeText; + TQString userTelephoneText; + TQString userEmailText; protected: /// helper method for constructors - void init(const QString& title); + void init(const TQString& title); protected slots: void okClicked(); diff --git a/kmymoney2/dialogs/knewfiledlgdecl.ui b/kmymoney2/dialogs/knewfiledlgdecl.ui index 9097a74..9658fad 100644 --- a/kmymoney2/dialogs/knewfiledlgdecl.ui +++ b/kmymoney2/dialogs/knewfiledlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KNewFileDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kNewFileDlgDecl</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout10</cstring> </property> @@ -42,7 +42,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -72,19 +72,19 @@ your KMyMoney file.</string> <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -94,26 +94,26 @@ your KMyMoney file.</string> <string>County/State:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>userNameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>countyEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>townEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -123,16 +123,16 @@ your KMyMoney file.</string> <string>Street:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>streetEdit</cstring> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -142,7 +142,7 @@ your KMyMoney file.</string> <string>Email:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -150,11 +150,11 @@ your KMyMoney file.</string> <string>Your name:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -164,11 +164,11 @@ your KMyMoney file.</string> <string>Telephone:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -178,16 +178,16 @@ your KMyMoney file.</string> <string>Town:</string> </property> </widget> - <widget class="QLineEdit" row="6" column="1"> + <widget class="TQLineEdit" row="6" column="1"> <property name="name"> <cstring>emailEdit</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -197,21 +197,21 @@ your KMyMoney file.</string> <string>Postal Code:</string> </property> </widget> - <widget class="QLineEdit" row="5" column="1"> + <widget class="TQLineEdit" row="5" column="1"> <property name="name"> <cstring>telephoneEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>postcodeEdit</cstring> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <hbox> <property name="name"> @@ -235,7 +235,7 @@ your KMyMoney file.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>305</width> <height>21</height> @@ -254,16 +254,16 @@ your KMyMoney file.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -279,7 +279,7 @@ your KMyMoney file.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>360</width> <height>16</height> @@ -324,5 +324,5 @@ your KMyMoney file.</string> <tabstop>okBtn</tabstop> <tabstop>cancelBtn</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/knewinvestmentwizard.cpp b/kmymoney2/dialogs/knewinvestmentwizard.cpp index d0c9046..a1e2e9e 100644 --- a/kmymoney2/dialogs/knewinvestmentwizard.cpp +++ b/kmymoney2/dialogs/knewinvestmentwizard.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,18 +45,18 @@ #include "../converter/webpricequote.h" #include "../kmymoneyutils.h" -KNewInvestmentWizard::KNewInvestmentWizard( QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ) +KNewInvestmentWizard::KNewInvestmentWizard( TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ) { init1(); - slotCheckPage(QString()); + slotCheckPage(TQString()); m_investmentSymbol->setFocus(); - connect(m_investmentSymbol, SIGNAL(lineChanged(const QString&)), this, SLOT(slotCheckForExistingSymbol(const QString&))); + connect(m_investmentSymbol, TQT_SIGNAL(lineChanged(const TQString&)), this, TQT_SLOT(slotCheckForExistingSymbol(const TQString&))); } -KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ), +KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ), m_account(acc) { setCaption(i18n("Investment detail wizard")); @@ -75,8 +75,8 @@ KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneyAccount& acc, QWidget * } -KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneySecurity& security, QWidget *parent, const char *name ) : - KNewInvestmentWizardDecl( parent, name ), +KNewInvestmentWizard::KNewInvestmentWizard( const MyMoneySecurity& security, TQWidget *tqparent, const char *name ) : + KNewInvestmentWizardDecl( tqparent, name ), m_security(security) { setCaption(i18n("Security detail wizard")); @@ -102,7 +102,7 @@ void KNewInvestmentWizard::init1(void) m_fraction->setPrecision(0); m_fraction->setValue(MyMoneyMoney(100, 1)); - kMyMoneyMoneyValidator* fractionValidator = new kMyMoneyMoneyValidator(1, 100000, 0, this); + kMyMoneyMoneyValidator* fractionValidator = new kMyMoneyMoneyValidator(1, 100000, 0, TQT_TQOBJECT(this)); m_fraction->setValidator(fractionValidator); // load the price mode combo @@ -111,16 +111,16 @@ void KNewInvestmentWizard::init1(void) m_priceMode->insertItem(i18n("Total for all shares"), 2); // load the widget with the available currencies - m_tradingCurrencyEdit->update(QString()); + m_tradingCurrencyEdit->update(TQString()); - connect(helpButton(),SIGNAL(clicked()), this, SLOT(slotHelp(void))); - connect(m_investmentName, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_investmentSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_fraction, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_investmentIdentification, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_onlineFactor, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPage(void))); - connect(m_onlineSourceCombo, SIGNAL(activated(const QString&)), this, SLOT(slotCheckPage(const QString&))); - connect(m_useFinanceQuote, SIGNAL(toggled(bool)), this, SLOT(slotSourceChanged(bool))); + connect(helpButton(),TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp(void))); + connect(m_investmentName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_investmentSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_fraction, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_investmentIdentification, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_onlineFactor, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPage(void))); + connect(m_onlineSourceCombo, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotCheckPage(const TQString&))); + connect(m_useFinanceQuote, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSourceChanged(bool))); m_createAccount = true; @@ -161,7 +161,7 @@ KNewInvestmentWizard::~KNewInvestmentWizard() { } -void KNewInvestmentWizard::setName(const QString& name) +void KNewInvestmentWizard::setName(const TQString& name) { m_investmentName->setText(name); } @@ -172,11 +172,11 @@ void KNewInvestmentWizard::next(void) slotCheckPage(); } -void KNewInvestmentWizard::slotCheckForExistingSymbol(const QString& symbol) +void KNewInvestmentWizard::slotCheckForExistingSymbol(const TQString& symbol) { if(m_investmentName->text().isEmpty()) { - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); - QValueList<MyMoneySecurity>::const_iterator it_s; + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity>::const_iterator it_s; MyMoneySecurity::eSECURITYTYPE type = KMyMoneyUtils::stringToSecurity(m_securityType->currentText()); for(it_s = list.begin(); it_s != list.end(); ++it_s) { @@ -197,7 +197,7 @@ void KNewInvestmentWizard::slotCheckForExistingSymbol(const QString& symbol) void KNewInvestmentWizard::slotSourceChanged(bool useFQ) { m_onlineSourceCombo->clear(); - m_onlineSourceCombo->insertItem(QString(), 0); + m_onlineSourceCombo->insertItem(TQString(), 0); if (useFQ) { m_onlineSourceCombo->insertStringList( WebPriceQuote::quoteSources( WebPriceQuote::FinanceQuote ) ); } else { @@ -205,7 +205,7 @@ void KNewInvestmentWizard::slotSourceChanged(bool useFQ) } } -void KNewInvestmentWizard::slotCheckPage(const QString& txt) +void KNewInvestmentWizard::slotCheckPage(const TQString& txt) { m_onlineFactor->setEnabled(!txt.isEmpty()); } @@ -232,12 +232,12 @@ void KNewInvestmentWizard::slotHelp(void) kapp->invokeHelp("details.investments.newinvestmentwizard"); } -void KNewInvestmentWizard::createObjects(const QString& parentId) +void KNewInvestmentWizard::createObjects(const TQString& tqparentId) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); - QValueList<MyMoneySecurity>::ConstIterator it; + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity>::ConstIterator it; MyMoneySecurity::eSECURITYTYPE type = KMyMoneyUtils::stringToSecurity(m_securityType->currentText()); MyMoneyFileTransaction ft; @@ -294,19 +294,19 @@ void KNewInvestmentWizard::createObjects(const QString& parentId) break; case 1: case 2: - m_account.setValue("priceMode", QString("%1").arg(m_priceMode->currentItem())); + m_account.setValue("priceMode", TQString("%1").tqarg(m_priceMode->currentItem())); break; } if(m_account.id().isEmpty()) { - MyMoneyAccount parent = file->account(parentId); - file->addAccount(m_account, parent); + MyMoneyAccount tqparent = file->account(tqparentId); + file->addAccount(m_account, tqparent); } else file->modifyAccount(m_account); } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Unable to create all objects for the investment"), QString("%1 caugt in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Unable to create all objects for the investment"), TQString("%1 caugt in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } diff --git a/kmymoney2/dialogs/knewinvestmentwizard.h b/kmymoney2/dialogs/knewinvestmentwizard.h index 7540521..8e3be09 100644 --- a/kmymoney2/dialogs/knewinvestmentwizard.h +++ b/kmymoney2/dialogs/knewinvestmentwizard.h @@ -39,45 +39,46 @@ class KNewInvestmentWizard : public KNewInvestmentWizardDecl { Q_OBJECT + TQ_OBJECT public: /** * Use this constructor for the creation of a new investment */ - KNewInvestmentWizard( QWidget *parent = 0, const char *name = 0 ); + KNewInvestmentWizard( TQWidget *tqparent = 0, const char *name = 0 ); /** * Use this constructor for the modification of an existing investment */ - KNewInvestmentWizard( const MyMoneyAccount& acc, QWidget *parent = 0, const char *name = 0 ); + KNewInvestmentWizard( const MyMoneyAccount& acc, TQWidget *tqparent = 0, const char *name = 0 ); /** * Use this constructor for the modification of an existing security */ - KNewInvestmentWizard( const MyMoneySecurity& sec, QWidget *parent = 0, const char *name = 0 ); + KNewInvestmentWizard( const MyMoneySecurity& sec, TQWidget *tqparent = 0, const char *name = 0 ); ~KNewInvestmentWizard(); /** * This method sets the name in the name widget. */ - void setName(const QString& name); + void setName(const TQString& name); /** * Depending on the constructor used, this method either * creates all necessary objects for the investment or updates * them. * - * @param parentId id of parent account for the investment + * @param tqparentId id of tqparent account for the investment */ - void createObjects(const QString& parentId); + void createObjects(const TQString& tqparentId); const MyMoneyAccount& account(void) const { return m_account; } protected slots: void next(void); void slotCheckPage(void); - void slotCheckPage(const QString&); - void slotCheckForExistingSymbol(const QString&); + void slotCheckPage(const TQString&); + void slotCheckForExistingSymbol(const TQString&); void slotSourceChanged(bool); void slotHelp(void); diff --git a/kmymoney2/dialogs/knewinvestmentwizarddecl.ui b/kmymoney2/dialogs/knewinvestmentwizarddecl.ui index a6e9241..c6936c6 100644 --- a/kmymoney2/dialogs/knewinvestmentwizarddecl.ui +++ b/kmymoney2/dialogs/knewinvestmentwizarddecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KNewInvestmentWizardDecl</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KNewInvestmentWizardDecl</cstring> </property> @@ -15,7 +15,7 @@ <property name="caption"> <string>New Investment wizard</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_investmentTypePage</cstring> </property> @@ -26,14 +26,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_introLabel</cstring> </property> <property name="text"> <string>This wizard allows you to create a new investment.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -47,21 +47,21 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> <property name="text"> <string>The first step in this process requires to select the type of investment. The following steps collect more details about the investment from you.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -75,22 +75,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -128,7 +128,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -147,7 +147,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -156,7 +156,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_investmentDetailsPage</cstring> </property> @@ -167,14 +167,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> <property name="text"> <string>Enter the details below and click <b>Next</b> to continue entering the online update details.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -188,16 +188,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> @@ -208,15 +208,15 @@ <cstring>m_investmentName</cstring> </property> </widget> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -231,7 +231,7 @@ <property name="text"> <string>1 /</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -242,7 +242,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel2_5</cstring> </property> @@ -250,7 +250,7 @@ <string>Price entry</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_2_2</cstring> </property> @@ -258,7 +258,7 @@ <string>Fraction</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -266,7 +266,7 @@ <string>Trading Currency</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -317,7 +317,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -325,7 +325,7 @@ <string>Trading symbol</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -354,7 +354,7 @@ <string>Enter the CUSIP/ISIN/WKN identification number here</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -374,7 +374,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -383,7 +383,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_onlineUpdatePage</cstring> </property> @@ -394,20 +394,20 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> <property name="text"> <string>Select an online source and click <b>Finish</b> to store the investment data. If you don't want to use online updates, just leave the data as is.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout25</cstring> + <cstring>tqlayout25</cstring> </property> <hbox> <property name="name"> @@ -419,23 +419,23 @@ <property name="spacing"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout24</cstring> + <cstring>tqlayout24</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout21</cstring> + <cstring>tqlayout21</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -443,7 +443,7 @@ <string>Use Finance::Quote</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useFinanceQuote</cstring> </property> @@ -453,15 +453,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout23</cstring> + <cstring>tqlayout23</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -478,7 +478,7 @@ <property name="name"> <cstring>m_onlineSourceCombo</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>180</width> <height>0</height> @@ -487,15 +487,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_6</cstring> </property> @@ -522,7 +522,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>371</width> <height>20</height> @@ -541,7 +541,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>181</height> @@ -587,5 +587,10 @@ <tabstop>m_onlineSourceCombo</tabstop> <tabstop>m_onlineFactor</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/knewloanwizard.cpp b/kmymoney2/dialogs/knewloanwizard.cpp index 28c48ef..e56dbf9 100644 --- a/kmymoney2/dialogs/knewloanwizard.cpp +++ b/kmymoney2/dialogs/knewloanwizard.cpp @@ -25,9 +25,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -59,38 +59,38 @@ #include "../kmymoney2.h" -KNewLoanWizard::KNewLoanWizard(QWidget *parent, const char *name ) : - KNewLoanWizardDecl(parent, name, true) +KNewLoanWizard::KNewLoanWizard(TQWidget *tqparent, const char *name ) : + KNewLoanWizardDecl(tqparent, name, true) { - connect(m_borrowButton, SIGNAL(clicked()), this, SLOT(slotLiabilityLoan())); - connect(m_lendButton, SIGNAL(clicked()), this, SLOT(slotAssetLoan())); + connect(m_borrowButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLiabilityLoan())); + connect(m_lendButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAssetLoan())); - connect(m_nameEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished())); - // connect(m_payeeEdit, SIGNAL(newPayee(const QString&)), this, SLOT(slotNewPayee(const QString&))); - connect(m_payeeEdit, SIGNAL(createItem(const QString&, QString&)), this, SIGNAL(createPayee(const QString&, QString&))); + connect(m_nameEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished())); + // connect(m_payeeEdit, TQT_SIGNAL(newPayee(const TQString&)), this, TQT_SLOT(slotNewPayee(const TQString&))); + connect(m_payeeEdit, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SIGNAL(createPayee(const TQString&, TQString&))); - connect(m_previousPaymentButton, SIGNAL(clicked()), this, SLOT(slotPaymentsMade())); - connect(m_noPreviousPaymentButton, SIGNAL(clicked()), this, SLOT(slotNoPaymentsMade())); + connect(m_previousPaymentButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPaymentsMade())); + connect(m_noPreviousPaymentButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNoPaymentsMade())); - connect(m_allPaymentsButton, SIGNAL(clicked()), this, SLOT(slotRecordAllPayments())); - connect(m_thisYearPaymentButton, SIGNAL(clicked()), this, SLOT(slotRecordThisYearsPayments())); + connect(m_allPaymentsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRecordAllPayments())); + connect(m_thisYearPaymentButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRecordThisYearsPayments())); - connect(m_firstDueDateEdit, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotCheckPageFinished())); + connect(m_firstDueDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotCheckPageFinished())); - connect(m_interestOnPaymentButton, SIGNAL(clicked()), this, SLOT(slotInterestOnPayment())); - connect(m_interestOnReceptionButton, SIGNAL(clicked()), this, SLOT(slotInterestOnReception())); + connect(m_interestOnPaymentButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInterestOnPayment())); + connect(m_interestOnReceptionButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInterestOnReception())); - connect(m_loanAmountEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotCheckPageFinished())); + connect(m_loanAmountEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotCheckPageFinished())); - connect(m_interestAccountEdit, SIGNAL(stateChanged()), this, SLOT(slotCheckPageFinished())); + connect(m_interestAccountEdit, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotCheckPageFinished())); - connect(m_nextDueDateEdit, SIGNAL(dateChanged(const QDate&)), this, SLOT(slotCheckPageFinished())); - connect(m_paymentAccountEdit, SIGNAL(stateChanged()), this, SLOT(slotCheckPageFinished())); + connect(m_nextDueDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotCheckPageFinished())); + connect(m_paymentAccountEdit, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotCheckPageFinished())); - connect(m_assetAccountEdit, SIGNAL(stateChanged()), this, SLOT(slotCheckPageFinished())); - connect(m_dontCreatePayoutCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckPageFinished())); + connect(m_assetAccountEdit, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotCheckPageFinished())); + connect(m_dontCreatePayoutCheckBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCheckPageFinished())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadEditWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadEditWidgets())); loadComboBoxes(); @@ -111,7 +111,7 @@ KNewLoanWizard::KNewLoanWizard(QWidget *parent, const char *name ) : m_interestFrequencyAmountEdit->setValue(1); m_interestFrequencyUnitEdit->setCurrentItem(static_cast<int>(MyMoneyAccountLoan::changeYearly)); m_paymentFrequencyUnitEdit->setCurrentItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY))); - m_firstDueDateEdit->loadDate(QDate(QDate::currentDate().year(),QDate::currentDate().month(),30)); + m_firstDueDateEdit->loadDate(TQDate(TQDate::tqcurrentDate().year(),TQDate::tqcurrentDate().month(),30)); m_paymentAccountEdit->removeButtons(); m_assetAccountEdit->removeButtons(); @@ -120,25 +120,25 @@ KNewLoanWizard::KNewLoanWizard(QWidget *parent, const char *name ) : // load button icons KIconLoader* il = KGlobal::iconLoader(); KGuiItem createCategoryButtenItem( i18n( "&Create..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new category"), i18n("Use this to open the new account editor")); m_createCategoryButton->setGuiItem(createCategoryButtenItem); - connect(m_createCategoryButton, SIGNAL(clicked()), this, SLOT(slotCreateCategory())); + connect(m_createCategoryButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateCategory())); KGuiItem additionalFeeButtenItem( i18n( "&Additional fees..." ), - 0, //QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + 0, //TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Enter additional fees"), i18n("Use this to add any additional fees other than principal and interest contained in your periodical payments.")); m_additionalFeeButton->setGuiItem(additionalFeeButtenItem); - connect(m_additionalFeeButton, SIGNAL(clicked()), this, SLOT(slotAdditionalFees())); + connect(m_additionalFeeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdditionalFees())); KGuiItem createAssetButtenItem( i18n( "&Create..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new asset account"), i18n("Use this to create a new account to which the initial payment should be made")); m_createNewAssetButton->setGuiItem(createAssetButtenItem); - connect(m_createNewAssetButton, SIGNAL(clicked()), kmymoney2, SLOT(slotAccountNew())); + connect(m_createNewAssetButton, TQT_SIGNAL(clicked()), kmymoney2, TQT_SLOT(slotAccountNew())); // enable the finish button on the last page setFinishEnabled(m_summaryPage, true); @@ -170,35 +170,35 @@ KNewLoanWizard::~KNewLoanWizard() void KNewLoanWizard::resetCalculator(void) { - m_loanAmount1->setText(QString()); - m_interestRate1->setText(QString()); - m_duration1->setText(QString()); - m_payment1->setText(QString()); - m_balloon1->setText(QString()); - - m_loanAmount2->setText(QString()); - m_interestRate2->setText(QString()); - m_duration2->setText(QString()); - m_payment2->setText(QString()); - m_balloon2->setText(QString()); - - m_loanAmount3->setText(QString()); - m_interestRate3->setText(QString()); - m_duration3->setText(QString()); - m_payment3->setText(QString()); - m_balloon3->setText(QString()); - - m_loanAmount4->setText(QString()); - m_interestRate4->setText(QString()); - m_duration4->setText(QString()); - m_payment4->setText(QString()); - m_balloon4->setText(QString()); - - m_loanAmount5->setText(QString()); - m_interestRate5->setText(QString()); - m_duration5->setText(QString()); - m_payment5->setText(QString()); - m_balloon5->setText(QString()); + m_loanAmount1->setText(TQString()); + m_interestRate1->setText(TQString()); + m_duration1->setText(TQString()); + m_payment1->setText(TQString()); + m_balloon1->setText(TQString()); + + m_loanAmount2->setText(TQString()); + m_interestRate2->setText(TQString()); + m_duration2->setText(TQString()); + m_payment2->setText(TQString()); + m_balloon2->setText(TQString()); + + m_loanAmount3->setText(TQString()); + m_interestRate3->setText(TQString()); + m_duration3->setText(TQString()); + m_payment3->setText(TQString()); + m_balloon3->setText(TQString()); + + m_loanAmount4->setText(TQString()); + m_interestRate4->setText(TQString()); + m_duration4->setText(TQString()); + m_payment4->setText(TQString()); + m_balloon4->setText(TQString()); + + m_loanAmount5->setText(TQString()); + m_interestRate5->setText(TQString()); + m_duration5->setText(TQString()); + m_payment5->setText(TQString()); + m_balloon5->setText(TQString()); m_additionalCost->setText(MyMoneyMoney(0).formatMoney(m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId())))); } @@ -229,14 +229,14 @@ void KNewLoanWizard::slotNoPaymentsMade(void) void KNewLoanWizard::slotRecordAllPayments(void) { m_firstPaymentLabel->setText( - QString("\n") + + TQString("\n") + i18n("Please enter the date, the first payment for this loan was/is due.")); m_firstPaymentNote->setText( i18n("Note: Consult the loan contract for details of the first due date. " "Keep in mind, that the first due date usually differs from the date " "the contract was signed")); m_balanceLabel->setText( - QString("\n") + + TQString("\n") + i18n("Please enter the original loan amount in the field below or leave it " "empty to be calculated.")); } @@ -244,13 +244,13 @@ void KNewLoanWizard::slotRecordAllPayments(void) void KNewLoanWizard::slotRecordThisYearsPayments(void) { m_firstPaymentLabel->setText( - QString("\n") + + TQString("\n") + i18n("Please enter the date, the first payment for this loan was/is due this year.")); m_firstPaymentNote->setText( i18n("Note: You can easily figure out the date of the first payment " "if you consult the last statement of last year.")); m_balanceLabel->setText( - QString("\n") + + TQString("\n") + i18n("Please enter the remaining loan amount of last years final " "statement in the field below. You should not leave this field empty.")); } @@ -306,9 +306,9 @@ void KNewLoanWizard::slotCheckPageFinished(void) void KNewLoanWizard::updateLoanAmount(void) { - QString txt; + TQString txt; if(m_loanAmountEdit->lineedit()->text().isEmpty()) { - txt = QString("<") + i18n("calculate") + QString(">"); + txt = TQString("<") + i18n("calculate") + TQString(">"); } else { txt = m_loanAmountEdit->value().formatMoney(m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId()))); } @@ -321,11 +321,11 @@ void KNewLoanWizard::updateLoanAmount(void) void KNewLoanWizard::updateInterestRate(void) { - QString txt; + TQString txt; if(m_interestRateEdit->lineedit()->text().isEmpty()) { - txt = QString("<") + i18n("calculate") + QString(">"); + txt = TQString("<") + i18n("calculate") + TQString(">"); } else { - txt = m_interestRateEdit->value().formatMoney("", 3) + QString("%"); + txt = m_interestRateEdit->value().formatMoney("", 3) + TQString("%"); } m_interestRate1->setText(txt); m_interestRate2->setText(txt); @@ -336,11 +336,11 @@ void KNewLoanWizard::updateInterestRate(void) void KNewLoanWizard::updateDuration(void) { - QString txt; + TQString txt; if(m_durationValueEdit->value() == 0) { - txt = QString("<") + i18n("calculate") + QString(">"); + txt = TQString("<") + i18n("calculate") + TQString(">"); } else { - txt = QString().sprintf("%d ", m_durationValueEdit->value()) + txt = TQString().sprintf("%d ", m_durationValueEdit->value()) + m_durationUnitEdit->currentText(); } m_duration1->setText(txt); @@ -352,9 +352,9 @@ void KNewLoanWizard::updateDuration(void) void KNewLoanWizard::updatePayment(void) { - QString txt; + TQString txt; if(m_paymentEdit->lineedit()->text().isEmpty()) { - txt = QString("<") + i18n("calculate") + QString(">"); + txt = TQString("<") + i18n("calculate") + TQString(">"); } else { txt = m_paymentEdit->value().formatMoney(m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId()))); } @@ -368,9 +368,9 @@ void KNewLoanWizard::updatePayment(void) void KNewLoanWizard::updateFinalPayment(void) { - QString txt; + TQString txt; if(m_finalPaymentEdit->lineedit()->text().isEmpty()) { - txt = QString("<") + i18n("calculate") + QString(">"); + txt = TQString("<") + i18n("calculate") + TQString(">"); } else { txt = m_finalPaymentEdit->value().formatMoney(m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId()))); } @@ -390,12 +390,12 @@ void KNewLoanWizard::updateLoanInfo(void) updateFinalPayment(); updatePeriodicPayment(); - QString txt; + TQString txt; int fraction = m_account.fraction(MyMoneyFile::instance()->security(m_account.currencyId())); m_loanAmount6->setText(m_loanAmountEdit->value().formatMoney(fraction)); - m_interestRate6->setText(m_interestRateEdit->value().formatMoney("", 3) + QString("%")); - txt = QString().sprintf("%d ", m_durationValueEdit->value()) + m_interestRate6->setText(m_interestRateEdit->value().formatMoney("", 3) + TQString("%")); + txt = TQString().sprintf("%d ", m_durationValueEdit->value()) + m_durationUnitEdit->currentText(); m_duration6->setText(txt); m_payment6->setText(m_paymentEdit->value().formatMoney(fraction)); @@ -439,7 +439,7 @@ void KNewLoanWizard::updateSummary(void) // Payment try { - QStringList sel = m_interestAccountEdit->selectedItems(); + TQStringList sel = m_interestAccountEdit->selectedItems(); if(sel.count() != 1) throw new MYMONEYEXCEPTION("Need a single selected interest category"); MyMoneyAccount acc = MyMoneyFile::instance()->account(sel.first()); @@ -453,7 +453,7 @@ void KNewLoanWizard::updateSummary(void) m_summaryNextPayment->setText(KGlobal::locale()->formatDate(m_nextDueDateEdit->date(), true)); try { - QStringList sel = m_paymentAccountEdit->selectedItems(); + TQStringList sel = m_paymentAccountEdit->selectedItems(); if(sel.count() != 1) throw new MYMONEYEXCEPTION("Need a single selected payment account"); MyMoneyAccount acc = MyMoneyFile::instance()->account(sel.first()); @@ -467,7 +467,7 @@ void KNewLoanWizard::updateSummary(void) void KNewLoanWizard::next() { bool dontLeavePage = false; - QString errMsg = i18n( + TQString errMsg = i18n( "The loan wizard is unable to calculate two different values for your loan " "at the same time. " "Please enter a value for the %1 on this page or backup to the page where the " @@ -510,7 +510,7 @@ void KNewLoanWizard::next() if(m_loanAmountEdit->lineedit()->text().isEmpty() && m_interestRateEdit->lineedit()->text().isEmpty()) { dontLeavePage = true; - KMessageBox::error(0, errMsg.arg(i18n("interest rate")), i18n("Calculation error")); + KMessageBox::error(0, errMsg.tqarg(i18n("interest rate")), i18n("Calculation error")); } else updateInterestRate(); @@ -519,7 +519,7 @@ void KNewLoanWizard::next() || m_interestRateEdit->lineedit()->text().isEmpty()) && m_durationValueEdit->value() == 0) { dontLeavePage = true; - KMessageBox::error(0, errMsg.arg(i18n("term")), i18n("Calculation error")); + KMessageBox::error(0, errMsg.tqarg(i18n("term")), i18n("Calculation error")); } else updateDuration(); @@ -529,7 +529,7 @@ void KNewLoanWizard::next() || m_durationValueEdit->value() == 0) && m_paymentEdit->lineedit()->text().isEmpty()) { dontLeavePage = true; - KMessageBox::error(0, errMsg.arg(i18n("principal and interest")), i18n("Calculation error")); + KMessageBox::error(0, errMsg.tqarg(i18n("principal and interest")), i18n("Calculation error")); } else updatePayment(); @@ -557,7 +557,7 @@ void KNewLoanWizard::next() if(m_assetAccountPage) setAppropriate(m_assetAccountPage, true); } else { - QDate nextPayment(QDate::currentDate().year(), 1, m_firstDueDateEdit->date().day()); + TQDate nextPayment(TQDate::tqcurrentDate().year(), 1, m_firstDueDateEdit->date().day()); m_nextDueDateEdit->setDate(nextPayment); if(m_assetAccountPage) setAppropriate(m_assetAccountPage, false); @@ -626,7 +626,7 @@ void KNewLoanWizard::loadComboBoxes(void) m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_MONTHLY))); m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS))); m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH))); - m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY))); + m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TQUARTERLY))); m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS))); m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY))); m_paymentFrequencyUnitEdit->insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY))); @@ -654,7 +654,7 @@ int KNewLoanWizard::calculateLoan(void) MyMoneyFinancialCalculator calc; long double val; int PF; - QString result; + TQString result; // FIXME: for now, we only support interest calculation at the end of the period calc.setBep(); @@ -709,14 +709,14 @@ int KNewLoanWizard::calculateLoan(void) val = calc.presentValue(); m_loanAmountEdit->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney(fraction)); result = i18n("KMyMoney has calculated the amount of the loan as %1.") - .arg(m_loanAmountEdit->lineedit()->text()); + .tqarg(m_loanAmountEdit->lineedit()->text()); } else if(m_interestRateEdit->lineedit()->text().isEmpty()) { // calculate the interest rate out of the other information val = calc.interestRate(); m_interestRateEdit->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney("", 3)); result = i18n("KMyMoney has calculated the interest rate to %1%.") - .arg(m_interestRateEdit->lineedit()->text()); + .tqarg(m_interestRateEdit->lineedit()->text()); } else if(m_paymentEdit->lineedit()->text().isEmpty()) { // calculate the periodical amount of the payment out of the other information @@ -729,7 +729,7 @@ int KNewLoanWizard::calculateLoan(void) calc.setPmt(val); result = i18n("KMyMoney has calculated a periodic payment of %1 to cover principal and interest.") - .arg(m_paymentEdit->lineedit()->text()); + .tqarg(m_paymentEdit->lineedit()->text()); val = calc.futureValue(); if((m_borrowButton->isChecked() && val < 0 && fabsl(val) >= fabsl(calc.payment())) @@ -739,9 +739,9 @@ int KNewLoanWizard::calculateLoan(void) val = calc.futureValue(); MyMoneyMoney refVal(static_cast<double>(val)); m_finalPaymentEdit->loadText(refVal.abs().formatMoney(fraction)); - result += QString(" "); + result += TQString(" "); result += i18n("The number of payments has been decremented and the final payment has been modified to %1.") - .arg(m_finalPaymentEdit->lineedit()->text()); + .tqarg(m_finalPaymentEdit->lineedit()->text()); } else if((m_borrowButton->isChecked() && val < 0 && fabsl(val) < fabsl(calc.payment())) || (m_lendButton->isChecked() && val > 0 && fabs(val) < fabs(calc.payment()))) { m_finalPaymentEdit->loadText(MyMoneyMoney(0,1).formatMoney(fraction)); @@ -749,7 +749,7 @@ int KNewLoanWizard::calculateLoan(void) MyMoneyMoney refVal(static_cast<double>(val)); m_finalPaymentEdit->loadText(refVal.abs().formatMoney(fraction)); result += i18n("The final payment has been modified to %1.") - .arg(m_finalPaymentEdit->lineedit()->text()); + .tqarg(m_finalPaymentEdit->lineedit()->text()); } } else if(m_durationValueEdit->value() == 0) { @@ -761,7 +761,7 @@ int KNewLoanWizard::calculateLoan(void) // if the number of payments has a fractional part, then we // round it to the smallest integer and calculate the balloon payment result = i18n("KMyMoney has calculated the term of your loan as %1. ") - .arg(updateTermWidgets(floorl(val))); + .tqarg(updateTermWidgets(floorl(val))); if(val != floorl(val)) { calc.setNpp(floorl(val)); @@ -769,7 +769,7 @@ int KNewLoanWizard::calculateLoan(void) MyMoneyMoney refVal(static_cast<double>(val)); m_finalPaymentEdit->loadText(refVal.abs().formatMoney(fraction)); result += i18n("The final payment has been modified to %1.") - .arg(m_finalPaymentEdit->lineedit()->text()); + .tqarg(m_finalPaymentEdit->lineedit()->text()); } } else { @@ -800,7 +800,7 @@ int KNewLoanWizard::calculateLoan(void) MyMoneyMoney refVal(static_cast<double>(val)); result = i18n("KMyMoney has calculated a final payment of %1 for this loan.") - .arg(refVal.abs().formatMoney(fraction)); + .tqarg(refVal.abs().formatMoney(fraction)); if(!m_finalPaymentEdit->lineedit()->text().isEmpty()) { if((m_finalPaymentEdit->value().abs() - refVal.abs()).abs().toDouble() > 1) { @@ -827,11 +827,11 @@ int KNewLoanWizard::calculateLoan(void) return 1; } -QString KNewLoanWizard::updateTermWidgets(const long double val) +TQString KNewLoanWizard::updateTermWidgets(const long double val) { long long vl = static_cast<long long>(floorl(val)); - QString valString; + TQString valString; MyMoneySchedule::occurenceE unit; unit = MyMoneySchedule::stringToOccurence(m_paymentFrequencyUnitEdit->currentText()); @@ -874,12 +874,12 @@ void KNewLoanWizard::slotCreateCategory(void) acc.setParentAccountId(base.id()); KNewAccountDlg* dlg = new KNewAccountDlg(acc, true, true); - if(dlg->exec() == QDialog::Accepted) { + if(dlg->exec() == TQDialog::Accepted) { acc = dlg->account(); MyMoneyFileTransaction ft; try { - QString id; + TQString id; id = file->createCategory(base, acc.name()); if(id.isEmpty()) throw new MYMONEYEXCEPTION("failure while creating the account hierarchy"); @@ -889,7 +889,7 @@ void KNewLoanWizard::slotCreateCategory(void) m_interestAccountEdit->setSelected(id); } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to add account: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to add account: %1").tqarg(e->what())); delete e; } } @@ -921,17 +921,17 @@ void KNewLoanWizard::loadAccountList(void) void KNewLoanWizard::slotAdditionalFees(void) { - // KMessageBox::information(0, QString("Not yet implemented ... if you want to help, contact kmymoney2-developer@lists.sourceforge.net"), QString("Development notice")); + // KMessageBox::information(0, TQString("Not yet implemented ... if you want to help, contact kmymoney2-developer@lists.sourceforge.net"), TQString("Development notice")); MyMoneyAccount account("Phony-ID", MyMoneyAccount()); - QMap<QString, MyMoneyMoney> priceInfo; + TQMap<TQString, MyMoneyMoney> priceInfo; KSplitTransactionDlg* dlg = new KSplitTransactionDlg(m_transaction, m_split, account, false, !m_borrowButton->isChecked(), MyMoneyMoney(0), priceInfo); - connect(dlg, SIGNAL(newCategory(MyMoneyAccount&)), this, SIGNAL(newCategory(MyMoneyAccount&))); + connect(dlg, TQT_SIGNAL(newCategory(MyMoneyAccount&)), this, TQT_SIGNAL(newCategory(MyMoneyAccount&))); - if(dlg->exec() == QDialog::Accepted) { + if(dlg->exec() == TQDialog::Accepted) { m_transaction = dlg->transaction(); // sum up the additional fees - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; MyMoneyMoney fees; for(it = m_transaction.splits().begin(); it != m_transaction.splits().end(); ++it) { @@ -980,7 +980,7 @@ MyMoneyTransaction KNewLoanWizard::transaction() const sInterest.setAction(MyMoneySplit::ActionInterest); // payee - QString payeeId = m_payeeEdit->selectedItem(); + TQString payeeId = m_payeeEdit->selectedItem(); sPayment.setPayeeId(payeeId); sAmortization.setPayeeId(payeeId); @@ -994,7 +994,7 @@ MyMoneyTransaction KNewLoanWizard::transaction() const t.addSplit(sInterest); // copy the splits from the other costs and update the payment split - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_transaction.splits().begin(); it != m_transaction.splits().end(); ++it) { if((*it).accountId() != account.id()) { MyMoneySplit sp = (*it); @@ -1014,8 +1014,8 @@ MyMoneySchedule KNewLoanWizard::schedule(void) const MyMoneySchedule::TYPE_LOANPAYMENT, MyMoneySchedule::stringToOccurence(m_paymentFrequencyUnitEdit->currentText()), 1, MyMoneySchedule::STYPE_OTHER, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); @@ -1032,7 +1032,7 @@ void KNewLoanWizard::slotReloadEditWidgets(void) loadAccountList(); // reload payee widget - QString payeeId = m_payeeEdit->selectedItem(); + TQString payeeId = m_payeeEdit->selectedItem(); m_payeeEdit->loadPayees(MyMoneyFile::instance()->payeeList()); @@ -1069,18 +1069,18 @@ int KNewLoanWizard::term(void) const return factor; } -QString KNewLoanWizard::initialPaymentAccount(void) const +TQString KNewLoanWizard::initialPaymentAccount(void) const { if(m_dontCreatePayoutCheckBox->isChecked()) { - return QString(); + return TQString(); } return m_assetAccountEdit->selectedItems().first(); } -QDate KNewLoanWizard::initialPaymentDate(void) const +TQDate KNewLoanWizard::initialPaymentDate(void) const { if(m_dontCreatePayoutCheckBox->isChecked()) { - return QDate(); + return TQDate(); } return m_paymentDate->date(); } diff --git a/kmymoney2/dialogs/knewloanwizard.h b/kmymoney2/dialogs/knewloanwizard.h index 5e291b7..8cf019d 100644 --- a/kmymoney2/dialogs/knewloanwizard.h +++ b/kmymoney2/dialogs/knewloanwizard.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,8 +54,9 @@ class KNewLoanWizard : public KNewLoanWizardDecl { Q_OBJECT + TQ_OBJECT public: - KNewLoanWizard(QWidget *parent=0, const char *name=0); + KNewLoanWizard(TQWidget *tqparent=0, const char *name=0); ~KNewLoanWizard(); /** @@ -75,20 +76,20 @@ public: * This method returns the id of the account to/from which * the payout should be created. If the checkbox that allows * to skip the creation of this transaction is checked, this - * method returns QString() + * method returns TQString() * - * @return id of account or empty QString + * @return id of account or empty TQString */ - QString initialPaymentAccount(void) const; + TQString initialPaymentAccount(void) const; /** * This method returns the date of the payout transaction. * If the checkbox that allows to skip the creation of - * this transaction is checked, this method returns QDate() + * this transaction is checked, this method returns TQDate() * - * @return selected date or invalid QDate if checkbox is selected. + * @return selected date or invalid TQDate if checkbox is selected. */ - QDate initialPaymentDate(void) const; + TQDate initialPaymentDate(void) const; protected: /** @@ -114,7 +115,7 @@ protected slots: void slotInterestOnReception(void); void slotCreateCategory(void); virtual void slotAdditionalFees(void); - // void slotNewPayee(const QString&); + // void slotNewPayee(const TQString&); void slotReloadEditWidgets(void); protected: @@ -127,7 +128,7 @@ protected: void updatePayment(void); void updateFinalPayment(void); void updateLoanInfo(void); - QString updateTermWidgets(const long double v); + TQString updateTermWidgets(const long double v); void updatePeriodicPayment(void); void updateSummary(void); int calculateLoan(void); @@ -156,7 +157,7 @@ signals: * @param txt The name of the payee to be created * @param id A connected slot should store the id of the created object in this variable */ - void createPayee(const QString& txt, QString& id); + void createPayee(const TQString& txt, TQString& id); protected: MyMoneyAccountLoan m_account; diff --git a/kmymoney2/dialogs/knewloanwizarddecl.ui b/kmymoney2/dialogs/knewloanwizarddecl.ui index d45eb4b..6a70458 100644 --- a/kmymoney2/dialogs/knewloanwizarddecl.ui +++ b/kmymoney2/dialogs/knewloanwizarddecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KNewLoanWizardDecl</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KNewLoanWizardDecl</cstring> </property> @@ -12,7 +12,7 @@ <height>458</height> </rect> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>800</width> <height>32767</height> @@ -28,7 +28,7 @@ <font> </font> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_newIntroPage</cstring> </property> @@ -39,7 +39,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2</cstring> </property> @@ -63,14 +63,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>98</width> <height>0</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_1</cstring> </property> @@ -84,7 +84,7 @@ <property name="text"> <string>New Loan Account Wizard</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> </widget> @@ -98,7 +98,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>119</width> <height>0</height> @@ -107,7 +107,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -117,7 +117,7 @@ Welcome to the New Loan Account Wizard which will guide you through the creation Please make sure that you have the relevant information handy. You usually get the information out of your contract and the last statement.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -131,7 +131,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -140,7 +140,7 @@ Please make sure that you have the relevant information handy. You usually get t </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_editIntroPage</cstring> </property> @@ -151,7 +151,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout2_2</cstring> </property> @@ -175,14 +175,14 @@ Please make sure that you have the relevant information handy. You usually get t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>98</width> <height>0</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_1_2</cstring> </property> @@ -196,7 +196,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="text"> <string>Edit Loan Account Wizard</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignHCenter</set> </property> </widget> @@ -210,7 +210,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>119</width> <height>0</height> @@ -219,7 +219,7 @@ Please make sure that you have the relevant information handy. You usually get t </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2_2</cstring> </property> @@ -229,7 +229,7 @@ Welcome to the Edit Loan Account Wizard. Please use this wizard to modify inform Please make sure that you have the relevant information handy. You usually get the information out of your contract and the last statement.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -243,7 +243,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -252,7 +252,7 @@ Please make sure that you have the relevant information handy. You usually get t </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_newGeneralInfoPage</cstring> </property> @@ -269,7 +269,7 @@ Please make sure that you have the relevant information handy. You usually get t <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -277,7 +277,7 @@ Please make sure that you have the relevant information handy. You usually get t <string> In the first step, KMyMoney will ask you some general information about the loan account to be created.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -291,14 +291,14 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>32</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -322,14 +322,14 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>138</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -343,18 +343,18 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3</cstring> </property> <property name="text"> <string>1. General Information</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -378,7 +378,7 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>25</height> @@ -397,7 +397,7 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>137</width> <height>0</height> @@ -416,7 +416,7 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>32</height> @@ -425,7 +425,7 @@ In the first step, KMyMoney will ask you some general information about the loan </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_editSelectionPage</cstring> </property> @@ -442,7 +442,7 @@ In the first step, KMyMoney will ask you some general information about the loan <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2_1</cstring> </property> @@ -450,7 +450,7 @@ In the first step, KMyMoney will ask you some general information about the loan <string> Please select, which data of the loan you want to modify.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -464,14 +464,14 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>48</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout33</cstring> </property> @@ -495,14 +495,14 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>93</width> <height>0</height> </size> </property> </spacer> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_selectionButtonGroup</cstring> </property> @@ -525,7 +525,7 @@ Please select, which data of the loan you want to modify.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_editInterestRateButton</cstring> </property> @@ -533,7 +533,7 @@ Please select, which data of the loan you want to modify.</string> <string>Modify the interest rate</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_editOtherCostButton</cstring> </property> @@ -541,7 +541,7 @@ Please select, which data of the loan you want to modify.</string> <string>Modify additional fees</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_editOtherInfoButton</cstring> </property> @@ -561,7 +561,7 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>108</width> <height>0</height> @@ -580,7 +580,7 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>47</height> @@ -589,7 +589,7 @@ Please select, which data of the loan you want to modify.</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_effectiveDatePage</cstring> </property> @@ -606,25 +606,25 @@ Please select, which data of the loan you want to modify.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_effectiveDateLabel</cstring> </property> <property name="text"> <string>1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_effectiveDateNoteLabel</cstring> </property> <property name="text"> <string>1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -638,14 +638,14 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>30</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout34</cstring> </property> @@ -659,7 +659,7 @@ Please select, which data of the loan you want to modify.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_7</cstring> </property> @@ -684,7 +684,7 @@ Please select, which data of the loan you want to modify.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>87</height> @@ -693,7 +693,7 @@ Please select, which data of the loan you want to modify.</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_lendBorrowPage</cstring> </property> @@ -710,7 +710,7 @@ Please select, which data of the loan you want to modify.</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -718,7 +718,7 @@ Please select, which data of the loan you want to modify.</string> <string> Do you borrow or lend money?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -732,14 +732,14 @@ Do you borrow or lend money?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>61</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout38</cstring> </property> @@ -753,7 +753,7 @@ Do you borrow or lend money?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup1</cstring> </property> @@ -776,7 +776,7 @@ Do you borrow or lend money?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_borrowButton</cstring> </property> @@ -784,7 +784,7 @@ Do you borrow or lend money?</string> <string>I am borrowing money</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_lendButton</cstring> </property> @@ -804,7 +804,7 @@ Do you borrow or lend money?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>299</width> <height>0</height> @@ -823,7 +823,7 @@ Do you borrow or lend money?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>60</height> @@ -832,7 +832,7 @@ Do you borrow or lend money?</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_namePage</cstring> </property> @@ -843,7 +843,7 @@ Do you borrow or lend money?</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> @@ -851,7 +851,7 @@ Do you borrow or lend money?</string> <string> How do you want to call this loan? Examples for names are 'car loan', 'school loan', 'home owner loan'.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -865,14 +865,14 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>56</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout13</cstring> </property> @@ -886,7 +886,7 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -911,14 +911,14 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>56</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_generalReceiverText</cstring> </property> @@ -926,15 +926,15 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <string>TextLabel6</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout55</cstring> + <cstring>tqlayout55</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_receiverLabel</cstring> </property> @@ -959,7 +959,7 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>56</height> @@ -968,7 +968,7 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestTypePage</cstring> </property> @@ -985,7 +985,7 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel5_2</cstring> </property> @@ -993,7 +993,7 @@ How do you want to call this loan? Examples for names are 'car loan', 'school lo <string> Is the interest of this loan fixed over a period of time or is it adapted from time to time? If the interest rate changes during the amortization phase of the loan you should choose the option 'variable interest rate'.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1007,14 +1007,14 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>53</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout39</cstring> </property> @@ -1028,7 +1028,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup2</cstring> </property> @@ -1051,7 +1051,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_fixedInterestButton</cstring> </property> @@ -1059,7 +1059,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <string>Fixed interest rate</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_variableInterestButton</cstring> </property> @@ -1079,7 +1079,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>286</width> <height>0</height> @@ -1098,7 +1098,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>53</height> @@ -1107,7 +1107,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_previousPaymentsPage</cstring> </property> @@ -1124,7 +1124,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel6_2</cstring> </property> @@ -1132,7 +1132,7 @@ Is the interest of this loan fixed over a period of time or is it adapted from t <string> Were there any payments for this loan whether they are entered into KMyMoney or not?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1146,14 +1146,14 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>32</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout40</cstring> </property> @@ -1167,7 +1167,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup3</cstring> </property> @@ -1190,7 +1190,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_noPreviousPaymentButton</cstring> </property> @@ -1198,7 +1198,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <string>No, no payments were made yet.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_previousPaymentButton</cstring> </property> @@ -1218,7 +1218,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>202</width> <height>0</height> @@ -1237,21 +1237,21 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>32</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3_3</cstring> </property> <property name="text"> <string>Note: Payments made to obtain the loan (e.g. Dissagio) are not considered as payments in this context.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1265,7 +1265,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>32</height> @@ -1274,7 +1274,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_recordPaymentPage</cstring> </property> @@ -1291,7 +1291,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel7_2</cstring> </property> @@ -1299,7 +1299,7 @@ Were there any payments for this loan whether they are entered into KMyMoney or <string> Do you want to record all payments of this loan with KMyMoney?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1313,14 +1313,14 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>69</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout41</cstring> </property> @@ -1334,7 +1334,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup4</cstring> </property> @@ -1357,7 +1357,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_allPaymentsButton</cstring> </property> @@ -1365,7 +1365,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <string>Yes, record all payments.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_thisYearPaymentButton</cstring> </property> @@ -1385,7 +1385,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>137</width> <height>0</height> @@ -1404,7 +1404,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>69</height> @@ -1413,7 +1413,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_variableInterestDatePage</cstring> </property> @@ -1424,7 +1424,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel8_2</cstring> </property> @@ -1432,7 +1432,7 @@ Do you want to record all payments of this loan with KMyMoney?</string> <string> Select the date when the interest rate for this loan will be modified and the frequency of the future changes.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1446,22 +1446,22 @@ Select the date when the interest rate for this loan will be modified and the fr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>99</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout44</cstring> + <cstring>tqlayout44</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -1469,9 +1469,9 @@ Select the date when the interest rate for this loan will be modified and the fr <string>Next interest change on</string> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout42</cstring> + <cstring>tqlayout42</cstring> </property> <hbox> <property name="name"> @@ -1502,7 +1502,7 @@ Select the date when the interest rate for this loan will be modified and the fr <cstring>m_interestChangeDateEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -1522,7 +1522,7 @@ Select the date when the interest rate for this loan will be modified and the fr <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> @@ -1531,7 +1531,7 @@ Select the date when the interest rate for this loan will be modified and the fr </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_paymentEditPage</cstring> </property> @@ -1548,7 +1548,7 @@ Select the date when the interest rate for this loan will be modified and the fr <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel8_2_2</cstring> </property> @@ -1556,7 +1556,7 @@ Select the date when the interest rate for this loan will be modified and the fr <string> Please enter the amount you pay for principal and interest or leave the field empty to calculate it.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1570,14 +1570,14 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>21</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout39</cstring> </property> @@ -1601,14 +1601,14 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout35</cstring> </property> @@ -1627,7 +1627,7 @@ Please enter the amount you pay for principal and interest or leave the field em <cstring>m_newPaymentEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2_4</cstring> </property> @@ -1635,7 +1635,7 @@ Please enter the amount you pay for principal and interest or leave the field em <string>Current amount</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_paymentLabel</cstring> </property> @@ -1643,7 +1643,7 @@ Please enter the amount you pay for principal and interest or leave the field em <string>1</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_5</cstring> </property> @@ -1663,7 +1663,7 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>0</height> @@ -1682,14 +1682,14 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>19</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_5</cstring> </property> @@ -1698,13 +1698,13 @@ Please enter the amount you pay for principal and interest or leave the field em If KMyMoney should calculate this value for you, then leave the field blank.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestEditPage</cstring> </property> @@ -1721,7 +1721,7 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel5_4</cstring> </property> @@ -1729,7 +1729,7 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <string> Please enter the interest rate or leave the field empty to calculate it.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1743,14 +1743,14 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>29</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout40</cstring> </property> @@ -1774,14 +1774,14 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout36</cstring> </property> @@ -1800,7 +1800,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <cstring>m_newInterestRateEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRateLabel</cstring> </property> @@ -1808,7 +1808,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <string>1</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel7_3</cstring> </property> @@ -1816,7 +1816,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <string>Current rate</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_5</cstring> </property> @@ -1836,7 +1836,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>0</height> @@ -1855,14 +1855,14 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>29</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel9_4</cstring> </property> @@ -1871,13 +1871,13 @@ Please enter the interest rate or leave the field empty to calculate it.</string If KMyMoney should calculate this value for you, then leave the field blank.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_firstPaymentPage</cstring> </property> @@ -1894,14 +1894,14 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_firstPaymentLabel</cstring> </property> <property name="text"> <string>1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -1915,14 +1915,14 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>78</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout22_2</cstring> </property> @@ -1936,7 +1936,7 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_3</cstring> </property> @@ -1961,27 +1961,27 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>28</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_firstPaymentNote</cstring> </property> <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignBottom</set> </property> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_newCalculateLoanPage</cstring> </property> @@ -1998,7 +1998,7 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_2_2</cstring> </property> @@ -2006,7 +2006,7 @@ If KMyMoney should calculate this value for you, then leave the field blank.</st <string> You have successfully entered the general information about your loan. Next, KMyMoney needs some information about the calculation of the loan.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2020,14 +2020,14 @@ You have successfully entered the general information about your loan. Next, KMy <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>19</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout31</cstring> </property> @@ -2051,14 +2051,14 @@ You have successfully entered the general information about your loan. Next, KMy <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>136</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout30</cstring> </property> @@ -2072,7 +2072,7 @@ You have successfully entered the general information about your loan. Next, KMy <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3_4</cstring> </property> @@ -2082,11 +2082,11 @@ You have successfully entered the general information about your loan. Next, KMy <property name="text"> <string>1. General Information</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_3_2</cstring> </property> @@ -2095,7 +2095,7 @@ You have successfully entered the general information about your loan. Next, KMy 2. Calculate Loan</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel4_3</cstring> </property> @@ -2117,7 +2117,7 @@ You have successfully entered the general information about your loan. Next, KMy <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>18</height> @@ -2136,7 +2136,7 @@ You have successfully entered the general information about your loan. Next, KMy <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>135</width> <height>0</height> @@ -2155,7 +2155,7 @@ You have successfully entered the general information about your loan. Next, KMy <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>23</height> @@ -2164,7 +2164,7 @@ You have successfully entered the general information about your loan. Next, KMy </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_paymentFrequencyPage</cstring> </property> @@ -2181,7 +2181,7 @@ You have successfully entered the general information about your loan. Next, KMy <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel11_2</cstring> </property> @@ -2189,7 +2189,7 @@ You have successfully entered the general information about your loan. Next, KMy <string> How often will there be payments made to this loan?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2203,14 +2203,14 @@ How often will there be payments made to this loan?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>49</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout33</cstring> </property> @@ -2234,7 +2234,7 @@ How often will there be payments made to this loan?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>39</width> <height>0</height> @@ -2256,7 +2256,7 @@ How often will there be payments made to this loan?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>56</width> <height>0</height> @@ -2275,7 +2275,7 @@ How often will there be payments made to this loan?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>49</height> @@ -2284,7 +2284,7 @@ How often will there be payments made to this loan?</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestCalculationPage</cstring> </property> @@ -2301,7 +2301,7 @@ How often will there be payments made to this loan?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel12_2</cstring> </property> @@ -2309,7 +2309,7 @@ How often will there be payments made to this loan?</string> <string> When does the actual interest rate get calculated?</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2323,14 +2323,14 @@ When does the actual interest rate get calculated?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>69</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout42</cstring> </property> @@ -2344,7 +2344,7 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>ButtonGroup5</cstring> </property> @@ -2367,7 +2367,7 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_interestOnReceptionButton</cstring> </property> @@ -2375,7 +2375,7 @@ When does the actual interest rate get calculated?</string> <string>When the payment is received.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_interestOnPaymentButton</cstring> </property> @@ -2395,7 +2395,7 @@ When does the actual interest rate get calculated?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>296</width> <height>0</height> @@ -2414,7 +2414,7 @@ When does the actual interest rate get calculated?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>69</height> @@ -2423,7 +2423,7 @@ When does the actual interest rate get calculated?</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_loanAmountPage</cstring> </property> @@ -2440,14 +2440,14 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_balanceLabel</cstring> </property> <property name="text"> <string>1</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2461,14 +2461,14 @@ When does the actual interest rate get calculated?</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>15</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout38</cstring> </property> @@ -2482,7 +2482,7 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel16</cstring> </property> @@ -2497,7 +2497,7 @@ When does the actual interest rate get calculated?</string> </widget> </hbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3</cstring> </property> @@ -2517,62 +2517,62 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount1</cstring> </property> @@ -2588,7 +2588,7 @@ When does the actual interest rate get calculated?</string> <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate1</cstring> </property> @@ -2604,7 +2604,7 @@ When does the actual interest rate get calculated?</string> <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration1</cstring> </property> @@ -2620,7 +2620,7 @@ When does the actual interest rate get calculated?</string> <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment1</cstring> </property> @@ -2636,7 +2636,7 @@ When does the actual interest rate get calculated?</string> <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon1</cstring> </property> @@ -2656,7 +2656,7 @@ When does the actual interest rate get calculated?</string> </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestPage</cstring> </property> @@ -2673,7 +2673,7 @@ When does the actual interest rate get calculated?</string> <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel14_2</cstring> </property> @@ -2681,7 +2681,7 @@ When does the actual interest rate get calculated?</string> <string> Please enter the interest rate or leave the field empty to calculate it.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2695,14 +2695,14 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout36</cstring> </property> @@ -2716,7 +2716,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_4</cstring> </property> @@ -2731,7 +2731,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string </widget> </hbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2</cstring> </property> @@ -2751,62 +2751,62 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount2</cstring> </property> @@ -2822,7 +2822,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate2</cstring> </property> @@ -2838,7 +2838,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration2</cstring> </property> @@ -2854,7 +2854,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment2</cstring> </property> @@ -2870,7 +2870,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon2</cstring> </property> @@ -2890,7 +2890,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_durationPage</cstring> </property> @@ -2901,7 +2901,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel15_2</cstring> </property> @@ -2909,7 +2909,7 @@ Please enter the interest rate or leave the field empty to calculate it.</string <string> Please enter the term of this loan or leave the field empty to calculate it. The term is the time that is required to fully repay the loan. This time might be different from the time your loan contract is signed for.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -2923,22 +2923,22 @@ Please enter the term of this loan or leave the field empty to calculate it. The <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>54</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout43</cstring> + <cstring>tqlayout43</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2_3</cstring> </property> @@ -2966,7 +2966,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The </widget> </hbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2_2</cstring> </property> @@ -2986,62 +2986,62 @@ Please enter the term of this loan or leave the field empty to calculate it. The <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3_2</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3_2</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2_2</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3_2</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount3</cstring> </property> @@ -3057,7 +3057,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate3</cstring> </property> @@ -3073,7 +3073,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration3</cstring> </property> @@ -3089,7 +3089,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment3</cstring> </property> @@ -3105,7 +3105,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon3</cstring> </property> @@ -3125,7 +3125,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_paymentPage</cstring> </property> @@ -3142,7 +3142,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel16_2</cstring> </property> @@ -3150,7 +3150,7 @@ Please enter the term of this loan or leave the field empty to calculate it. The <string> Please enter the amount you pay for principal and interest or leave the field empty to calculate it.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -3164,14 +3164,14 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout36_2</cstring> </property> @@ -3185,7 +3185,7 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_4_2</cstring> </property> @@ -3200,7 +3200,7 @@ Please enter the amount you pay for principal and interest or leave the field em </widget> </hbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2_2_2</cstring> </property> @@ -3220,62 +3220,62 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3_2_2</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3_2_2</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2_2_2</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2_2_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3_2_2</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount4</cstring> </property> @@ -3291,7 +3291,7 @@ Please enter the amount you pay for principal and interest or leave the field em <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate4</cstring> </property> @@ -3307,7 +3307,7 @@ Please enter the amount you pay for principal and interest or leave the field em <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration4</cstring> </property> @@ -3323,7 +3323,7 @@ Please enter the amount you pay for principal and interest or leave the field em <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment4</cstring> </property> @@ -3339,7 +3339,7 @@ Please enter the amount you pay for principal and interest or leave the field em <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon4</cstring> </property> @@ -3359,7 +3359,7 @@ Please enter the amount you pay for principal and interest or leave the field em </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_finalPaymentPage</cstring> </property> @@ -3376,7 +3376,7 @@ Please enter the amount you pay for principal and interest or leave the field em <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel17_2</cstring> </property> @@ -3384,7 +3384,7 @@ Please enter the amount you pay for principal and interest or leave the field em <string> Please enter the amount of a final amortization payment or leave the field empty to calculate it.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -3398,14 +3398,14 @@ Please enter the amount of a final amortization payment or leave the field empty <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout44</cstring> </property> @@ -3419,7 +3419,7 @@ Please enter the amount of a final amortization payment or leave the field empty <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_4_2_2</cstring> </property> @@ -3434,7 +3434,7 @@ Please enter the amount of a final amortization payment or leave the field empty </widget> </hbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2_2_2_2</cstring> </property> @@ -3454,62 +3454,62 @@ Please enter the amount of a final amortization payment or leave the field empty <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3_2_2_2</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3_2_2_2</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2_2_2_2</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2_2_2_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3_2_2_2</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount5</cstring> </property> @@ -3525,7 +3525,7 @@ Please enter the amount of a final amortization payment or leave the field empty <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate5</cstring> </property> @@ -3541,7 +3541,7 @@ Please enter the amount of a final amortization payment or leave the field empty <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration5</cstring> </property> @@ -3557,7 +3557,7 @@ Please enter the amount of a final amortization payment or leave the field empty <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment5</cstring> </property> @@ -3573,7 +3573,7 @@ Please enter the amount of a final amortization payment or leave the field empty <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon5</cstring> </property> @@ -3593,7 +3593,7 @@ Please enter the amount of a final amortization payment or leave the field empty </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_calculationOverviewPage</cstring> </property> @@ -3610,7 +3610,7 @@ Please enter the amount of a final amortization payment or leave the field empty <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel18_2</cstring> </property> @@ -3618,7 +3618,7 @@ Please enter the amount of a final amortization payment or leave the field empty <string> KMyMoney has calculated the loan as shown in the overview below. You can accept these values by selecting "Next" or change them by choosing "Back" to return to the input field for the information you want to change.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -3632,14 +3632,14 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>22</height> </size> </property> </spacer> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2_2_2_2_2</cstring> </property> @@ -3659,62 +3659,62 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3_2_2_2_2</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3_2_2_2_2</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2_2_2_2_2</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2_2_2_2_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3_2_2_2_2</cstring> </property> <property name="text"> <string>Final amortization payment</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_loanAmount6</cstring> </property> @@ -3730,7 +3730,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_interestRate6</cstring> </property> @@ -3746,7 +3746,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_duration6</cstring> </property> @@ -3762,7 +3762,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_payment6</cstring> </property> @@ -3778,7 +3778,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_balloon6</cstring> </property> @@ -3798,7 +3798,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_newPaymentsPage</cstring> </property> @@ -3815,7 +3815,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel19_2</cstring> </property> @@ -3823,7 +3823,7 @@ KMyMoney has calculated the loan as shown in the overview below. You can accept <string> In the following steps, KMyMoney supports you in setting up categories and schedules for your loan payments.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -3837,14 +3837,14 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>14</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout31_2</cstring> </property> @@ -3868,14 +3868,14 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>136</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout30_2</cstring> </property> @@ -3889,7 +3889,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel19_3</cstring> </property> @@ -3899,11 +3899,11 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="text"> <string>1. General Information</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel19_4</cstring> </property> @@ -3915,7 +3915,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched 2. Calculate Loan</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel19_5</cstring> </property> @@ -3937,7 +3937,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>18</height> @@ -3956,7 +3956,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>135</width> <height>0</height> @@ -3975,7 +3975,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>18</height> @@ -3984,7 +3984,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_interestCategoryPage</cstring> </property> @@ -4001,7 +4001,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel20_2</cstring> </property> @@ -4009,7 +4009,7 @@ In the following steps, KMyMoney supports you in setting up categories and sched <string> Please select the category you want to assign the interest payments to or create a new category.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4023,7 +4023,7 @@ Please select the category you want to assign the interest payments to or create <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>38</height> @@ -4035,7 +4035,7 @@ Please select the category you want to assign the interest payments to or create <cstring>m_interestAccountEdit</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout29</cstring> </property> @@ -4059,7 +4059,7 @@ Please select the category you want to assign the interest payments to or create <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>264</width> <height>0</height> @@ -4086,7 +4086,7 @@ Please select the category you want to assign the interest payments to or create <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>22</height> @@ -4095,7 +4095,7 @@ Please select the category you want to assign the interest payments to or create </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_additionalFeesPage</cstring> </property> @@ -4112,7 +4112,7 @@ Please select the category you want to assign the interest payments to or create <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel21_2</cstring> </property> @@ -4120,7 +4120,7 @@ Please select the category you want to assign the interest payments to or create <string> If your regular payment contains any additional fees, click on the button "Additional fees" to enter them.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4134,14 +4134,14 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame9</cstring> </property> @@ -4161,18 +4161,18 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>TextLabel21_1_3</cstring> </property> <property name="text"> <string>= periodical payment:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>m_periodicPayment</cstring> </property> @@ -4187,11 +4187,11 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>m_additionalCost</cstring> </property> @@ -4206,11 +4206,11 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> <cstring>Layout63</cstring> </property> @@ -4224,14 +4224,14 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel21_1_2</cstring> </property> <property name="text"> <string>+</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -4245,7 +4245,7 @@ If your regular payment contains any additional fees, click on the button "Addit </widget> </hbox> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>m_basePayment</cstring> </property> @@ -4260,18 +4260,18 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="textFormat"> <enum>PlainText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>TextLabel21_1</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -4285,7 +4285,7 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -4302,7 +4302,7 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -4321,21 +4321,21 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel21_2_2</cstring> </property> <property name="text"> <string>If no additional fees are included in your periodical payment or you have entered all such fees, then click on "Next".</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4349,7 +4349,7 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> @@ -4358,7 +4358,7 @@ If your regular payment contains any additional fees, click on the button "Addit </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_schedulePage</cstring> </property> @@ -4375,7 +4375,7 @@ If your regular payment contains any additional fees, click on the button "Addit <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel22_2</cstring> </property> @@ -4383,7 +4383,7 @@ If your regular payment contains any additional fees, click on the button "Addit <string>KMyMoney will create a schedule for this payment and reminds you whenever a payment must be made.<p> If you selected to record all payments this date has already been supplied. If you selected to record only this years payments, then the <b>First payment due date</b> is the date of the first payment made in this year.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4397,14 +4397,14 @@ If you selected to record all payments this date has already been supplied. If y <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>23</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout49</cstring> </property> @@ -4428,7 +4428,7 @@ If you selected to record all payments this date has already been supplied. If y <cstring>m_nextDueDateEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_dueLabel</cstring> </property> @@ -4436,14 +4436,14 @@ If you selected to record all payments this date has already been supplied. If y <string>First payment due on:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2_5</cstring> </property> <property name="text"> <string>Make payment from/to:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -4459,7 +4459,7 @@ If you selected to record all payments this date has already been supplied. If y <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>24</height> @@ -4468,7 +4468,7 @@ If you selected to record all payments this date has already been supplied. If y </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_summaryEditPage</cstring> </property> @@ -4485,7 +4485,7 @@ If you selected to record all payments this date has already been supplied. If y <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel10_4</cstring> </property> @@ -4493,7 +4493,7 @@ If you selected to record all payments this date has already been supplied. If y <string> KMyMoney has calculated the loan as shown below. If you want to accept these values use the "Finish" button to update your account, otherwise use the "Back" button to modify your settings.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4507,14 +4507,14 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>23</height> </size> </property> </spacer> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3_2_2_2_2_2_2</cstring> </property> @@ -4534,73 +4534,73 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_3_2_2_2_2_2</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel8_3_2_2_2_2_2</cstring> </property> <property name="text"> <string>Additional fees:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel9_2_2_2_2_2_2</cstring> </property> <property name="text"> <string>Total payment:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel10_2_2_2_2_2_2</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel11_3_2_2_2_2_2</cstring> </property> <property name="text"> <string>Valid from:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel11_3_2_2_2_2_2_2</cstring> </property> <property name="text"> <string>Affected payments:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_payment7</cstring> </property> @@ -4616,7 +4616,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_additionalFees7</cstring> </property> @@ -4632,7 +4632,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_totalPayment7</cstring> </property> @@ -4648,7 +4648,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_interestRate7</cstring> </property> @@ -4664,7 +4664,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_startDateChanges</cstring> </property> @@ -4680,7 +4680,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="5" column="1"> + <widget class="TQLabel" row="5" column="1"> <property name="name"> <cstring>m_affectedPayments</cstring> </property> @@ -4700,7 +4700,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_assetAccountPage</cstring> </property> @@ -4711,7 +4711,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel10_4_2</cstring> </property> @@ -4719,7 +4719,7 @@ KMyMoney has calculated the loan as shown below. If you want to accept these val <string>If this loan is for an asset, such as a car or a house, you can create the asset account now. An asset account represents the total value of an asset. The money from this loan will be transfered into the asset account you create or select. If this loan is a 'consumer loan' (money to use however you want), you can use a checking account instead.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4733,14 +4733,14 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_dontCreatePayoutCheckBox</cstring> </property> @@ -4748,9 +4748,9 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <string>Don't create payout transaction</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout124</cstring> + <cstring>tqlayout124</cstring> </property> <vbox> <property name="name"> @@ -4761,9 +4761,9 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <cstring>m_assetAccountEdit</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout123</cstring> + <cstring>tqlayout123</cstring> </property> <hbox> <property name="name"> @@ -4779,7 +4779,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>466</width> <height>20</height> @@ -4804,15 +4804,15 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout170</cstring> + <cstring>tqlayout170</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -4837,7 +4837,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -4846,7 +4846,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_summaryPage</cstring> </property> @@ -4863,7 +4863,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel22_2_2</cstring> </property> @@ -4871,7 +4871,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <string> This page summarizes the data you entered. If you need to modify anything, please use the "Back" button to go to respective page. Otherwise use the "Finish" button to create the account.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -4885,14 +4885,14 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout61</cstring> </property> @@ -4906,7 +4906,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout60</cstring> </property> @@ -4920,7 +4920,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox3</cstring> </property> @@ -4937,7 +4937,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout52</cstring> </property> @@ -4951,18 +4951,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel5_3</cstring> </property> <property name="text"> <string>Payee:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_summaryLoanType</cstring> </property> @@ -4978,7 +4978,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_summaryPayee</cstring> </property> @@ -4994,18 +4994,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4_4</cstring> </property> <property name="text"> <string>First payment:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_summaryFirstPayment</cstring> </property> @@ -5021,14 +5021,14 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3_5</cstring> </property> <property name="text"> <string>Amount is:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -5036,7 +5036,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -5053,7 +5053,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout57</cstring> </property> @@ -5067,7 +5067,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_summaryTotalPeriodicPayment</cstring> </property> @@ -5083,7 +5083,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="5" column="1"> + <widget class="TQLabel" row="5" column="1"> <property name="name"> <cstring>m_summaryPaymentAccount</cstring> </property> @@ -5099,7 +5099,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_summaryAdditionalFees</cstring> </property> @@ -5115,51 +5115,51 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel15</cstring> </property> <property name="text"> <string>Periodic Payment:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0" rowspan="2" colspan="1"> + <widget class="TQLabel" row="1" column="0" rowspan="2" colspan="1"> <property name="name"> <cstring>TextLabel14</cstring> </property> <property name="text"> <string>Additional Fees:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel13</cstring> </property> <property name="text"> <string>Interest category:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel17</cstring> </property> <property name="text"> <string>Payment from:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1" rowspan="2" colspan="1"> + <widget class="TQLabel" row="0" column="1" rowspan="2" colspan="1"> <property name="name"> <cstring>m_summaryInterestCategory</cstring> </property> @@ -5175,7 +5175,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_summaryNextPayment</cstring> </property> @@ -5191,14 +5191,14 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel16_3</cstring> </property> <property name="text"> <string>Next due date:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -5208,7 +5208,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -5225,7 +5225,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout59</cstring> </property> @@ -5239,7 +5239,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="spacing"> <number>1</number> </property> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>m_summaryInterestRate</cstring> </property> @@ -5255,18 +5255,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel10_3</cstring> </property> <property name="text"> <string>Term:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="5" column="1"> + <widget class="TQLabel" row="5" column="1"> <property name="name"> <cstring>m_summaryPeriodicPayment</cstring> </property> @@ -5282,18 +5282,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel9_3</cstring> </property> <property name="text"> <string>Interest rate:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_summaryPaymentFrequency</cstring> </property> @@ -5309,18 +5309,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>TextLabel12</cstring> </property> <property name="text"> <string>Final Payment:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="4" column="1"> + <widget class="TQLabel" row="4" column="1"> <property name="name"> <cstring>m_summaryTerm</cstring> </property> @@ -5336,18 +5336,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel6_4</cstring> </property> <property name="text"> <string>Interest is due:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_summaryAmount</cstring> </property> @@ -5363,18 +5363,18 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel11_4</cstring> </property> <property name="text"> <string>Principal + Interest:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="6" column="1"> + <widget class="TQLabel" row="6" column="1"> <property name="name"> <cstring>m_summaryBalloonPayment</cstring> </property> @@ -5390,29 +5390,29 @@ This page summarizes the data you entered. If you need to modify anything, pleas <enum>PlainText</enum> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel8_4</cstring> </property> <property name="text"> <string>Loan amount:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> <property name="text"> <string>Payment frequency:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>m_summaryInterestDue</cstring> </property> @@ -5444,7 +5444,7 @@ This page summarizes the data you entered. If you need to modify anything, pleas <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> @@ -5493,5 +5493,10 @@ This page summarizes the data you entered. If you need to modify anything, pleas <data format="PNG" length="1110">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000041d49444154388d8d95c18b1c4514c67fbb29e5b54ea05b26da1d36b08d09a6c508138cb8c13d647141163de49043bca9f1628eb9294810f24f88c15b728b07617358888785d980427290b4a8d00b19a8821da8228cf42316ac87eed9247ac95c9aeaeef9eaabdffb5ebf85f178ccfcf7f5b79fec07a7280a08a008f25ceb7c29e5da573716e65a0be3f198ef6f5ededff9b9e1b34faf90882092a1ea21428b9220ffbf46054055b19386ba6970ae6665b5e0d2c5eb0b066067bbe1f21757c88f5504eff0c192189081303a5582b16854fccce2fe041f00cdd0a8103b874556405476b62d972ec2c2b90ff3fd8df5cb946549d80b34aea15ccaa94625450e2d0e558b460b7371a734b5e027251a155545678ab62d7eea90b4c504078908c107acb354cb251b1f8f08b1c18631aabbb4d18211404804f22545863561d2f060fb34aa8a18d0086204e72c46a32292e1a796f278c1da7a859d8da9a737506db04d0a24103d8949480b214d3bbee952a05c1d536f9d2684160c744f048311543d459eb1b65ee1754cedae13a64abd5d6127053c9d0281f22d4f75c6a2118a5c09272d7ab740638bf4ef2dd2174032d0d8d04c6fe19c32bedd8bc65e342aa3f785e2784bfd6bc1bd9db24b05505616a4edd67d5a8c1801a03a9962754c504bf34b8986acfb9be91cac7d54315a15541b36b134f74bd2dc53940115a5381e087bc25c6f71be831a8baa234cc1ee3eeb74ed83116beb2b8849d108a3730e8ce27e2bfb82419a7b407ac7c222fd0e6280a8078ce64e47ef54ac9d5be9aaae0162e0de568a44a18d3df90845d919c4f01463406340a44f40efb43a99b371618488e2670d1a2d7ee6f1d3be39342104e937ed85fb86599c33e9ee0be9a004946259d8b858909880d59aa00daa0d3280b5f39e34074c4b3a5434029a76a9e9f5cc0163b5c80024158a1cfc4cb1d3061d5834066cb0a403c008599a70f6bc27b8d03106ea3ae91987278c5b143b015547224ab5e24185cd9b81665273e7b6e7cecd82ddbf8098002de94049737bc09828cf3036f31c3735c8b0e98eb704672f348c7f7c93cd1fb2ae905119ff54e0dff3542b0e9dd983dcea2cc5eea6cf303e74ec687af5c41b6fa38f5e203c7ec8e1238ef85831a214afef21060ea781ec68247b65c6916353cc8b73d1ae79354606af2a930709aa118da1636c274dd7e3774b884a79aa6b5711a538d33cf9c01c1c9b83bc6a1f55c91ccb23b05b1deb43a7decdaffefd2862f61366aa8449c69e33642f012f2bb208fa98eeda1f3346f076c8eeef19475e9be115423364f78f84105a8643d34d90cfbfdcd8cf872589a45dc7f54cf3134a36f4e495c23f9da8db15bccb708d4014f2ca512cb5d4f7c13e84300d5cff6eb39b202bab053bdb9674f0648609427d0f8402ddeac30f4fcd3ced3efc3b422d406c09b340bedc1571e1bfc3d44dc281634c5fe5e758e7395cfbe6d6c130fd17d92372d277c159b70000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/konlinequoteconfigurationdecl.ui b/kmymoney2/dialogs/konlinequoteconfigurationdecl.ui index 0ca2d14..748d343 100644 --- a/kmymoney2/dialogs/konlinequoteconfigurationdecl.ui +++ b/kmymoney2/dialogs/konlinequoteconfigurationdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kOnlineQuoteConfigurationDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kOnlineQuoteConfigurationDecl</cstring> </property> @@ -18,7 +18,7 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout1</cstring> </property> @@ -40,7 +40,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -64,14 +64,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -88,7 +88,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -104,7 +104,7 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -120,7 +120,7 @@ <string>Perl Location:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -195,5 +195,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/konlinequoteconfigurationdlg.cpp b/kmymoney2/dialogs/konlinequoteconfigurationdlg.cpp index 8503d5a..d479c81 100644 --- a/kmymoney2/dialogs/konlinequoteconfigurationdlg.cpp +++ b/kmymoney2/dialogs/konlinequoteconfigurationdlg.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,7 +38,7 @@ #include "konlinequoteconfigurationdlg.h" -KOnlineQuoteConfigurationDlg::KOnlineQuoteConfigurationDlg(QWidget *parent) : kOnlineQuoteConfigurationDecl(parent) +KOnlineQuoteConfigurationDlg::KOnlineQuoteConfigurationDlg(TQWidget *tqparent) : kOnlineQuoteConfigurationDecl(tqparent) { } diff --git a/kmymoney2/dialogs/konlinequoteconfigurationdlg.h b/kmymoney2/dialogs/konlinequoteconfigurationdlg.h index f6ea139..7a9eb65 100644 --- a/kmymoney2/dialogs/konlinequoteconfigurationdlg.h +++ b/kmymoney2/dialogs/konlinequoteconfigurationdlg.h @@ -15,13 +15,13 @@ * * ***************************************************************************/ -#ifndef KONLINEQUOTECONFIGURATIONDIALOG_H -#define KONLINEQUOTECONFIGURATIONDIALOG_H +#ifndef KONLINETQUOTECONFIGURATIONDIALOG_H +#define KONLINETQUOTECONFIGURATIONDIALOG_H // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,8 +40,9 @@ class KOnlineQuoteConfigurationDlg : public kOnlineQuoteConfigurationDecl { Q_OBJECT + TQ_OBJECT public: - KOnlineQuoteConfigurationDlg(QWidget *parent); + KOnlineQuoteConfigurationDlg(TQWidget *tqparent); ~KOnlineQuoteConfigurationDlg(); }; diff --git a/kmymoney2/dialogs/kpayeereassigndlg.cpp b/kmymoney2/dialogs/kpayeereassigndlg.cpp index 0ed8a5a..dc03518 100644 --- a/kmymoney2/dialogs/kpayeereassigndlg.cpp +++ b/kmymoney2/dialogs/kpayeereassigndlg.cpp @@ -36,12 +36,12 @@ #include <kmymoney/kmymoneycombo.h> #include <kmymoney/kguiutils.h> -KPayeeReassignDlg::KPayeeReassignDlg( QWidget* parent, const char* name) : - KPayeeReassignDlgDecl( parent, name) +KPayeeReassignDlg::KPayeeReassignDlg( TQWidget* tqparent, const char* name) : + KPayeeReassignDlgDecl( tqparent, name) { buttonOk->setGuiItem(KStdGuiItem::ok()); buttonCancel->setGuiItem(KStdGuiItem::cancel()); - kMandatoryFieldGroup* mandatory = new kMandatoryFieldGroup(this); + kMandatoryFieldGroup* mandatory = new kMandatoryFieldGroup(TQT_TQOBJECT(this)); mandatory->add(payeeCombo); mandatory->setOkButton(buttonOk); } @@ -50,16 +50,16 @@ KPayeeReassignDlg::~KPayeeReassignDlg() { } -QString KPayeeReassignDlg::show(const QValueList<MyMoneyPayee>& payeeslist) +TQString KPayeeReassignDlg::show(const TQValueList<MyMoneyPayee>& payeeslist) { if (payeeslist.isEmpty()) - return QString(); // no payee available? nothing can be selected... + return TQString(); // no payee available? nothing can be selected... payeeCombo->loadPayees(payeeslist); // execute dialog and if aborted, return empty string - if (this->exec() == QDialog::Rejected) - return QString(); + if (this->exec() == TQDialog::Rejected) + return TQString(); // otherwise return index of selected payee return payeeCombo->selectedItem(); diff --git a/kmymoney2/dialogs/kpayeereassigndlg.h b/kmymoney2/dialogs/kpayeereassigndlg.h index 3edab86..f0f21ac 100644 --- a/kmymoney2/dialogs/kpayeereassigndlg.h +++ b/kmymoney2/dialogs/kpayeereassigndlg.h @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluelist.h> -#include <qcheckbox.h> +#include <tqvaluelist.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,9 +42,10 @@ class KPayeeReassignDlg : public KPayeeReassignDlgDecl { Q_OBJECT + TQ_OBJECT public: /** Default constructor */ - KPayeeReassignDlg( QWidget* parent = 0, const char* name = 0); + KPayeeReassignDlg( TQWidget* tqparent = 0, const char* name = 0); /** Destructor */ ~KPayeeReassignDlg(); @@ -53,12 +54,12 @@ public: * This function sets up the dialog, lets the user select a payee and returns * the id of the selected payee in the payeeslist. * - * @param payeeslist reference to QValueList of MyMoneyPayee objects to be contained in the list + * @param payeeslist reference to TQValueList of MyMoneyPayee objects to be contained in the list * - * @return Returns the id of the selected payee in the list or QString() if - * the dialog was aborted. QString() is also returned if the payeeslist is empty. + * @return Returns the id of the selected payee in the list or TQString() if + * the dialog was aborted. TQString() is also returned if the payeeslist is empty. */ - QString show(const QValueList<MyMoneyPayee>& payeeslist); + TQString show(const TQValueList<MyMoneyPayee>& payeeslist); /** * Returns true, if the names of the payees to be deleted should be copied diff --git a/kmymoney2/dialogs/kpayeereassigndlgdecl.ui b/kmymoney2/dialogs/kpayeereassigndlgdecl.ui index a968709..1f85b76 100644 --- a/kmymoney2/dialogs/kpayeereassigndlgdecl.ui +++ b/kmymoney2/dialogs/kpayeereassigndlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KPayeeReassignDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KPayeeReassignDlgDecl</cstring> </property> @@ -25,11 +25,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>300</width> <height>0</height> @@ -38,7 +38,7 @@ <property name="text"> <string>The transactions associated with the selected payees need to be re-assigned to a different payee before the selected payees can be deleted. Please select a payee from the list below.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignJustify|AlignTop</set> </property> </widget> @@ -52,14 +52,14 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -82,14 +82,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_copyToMatchList</cstring> </property> @@ -114,9 +114,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -132,7 +132,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>305</width> <height>20</height> @@ -182,5 +182,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kplugindlg.ui b/kmymoney2/dialogs/kplugindlg.ui index 33a6f88..19d7f03 100644 --- a/kmymoney2/dialogs/kplugindlg.ui +++ b/kmymoney2/dialogs/kplugindlg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KPluginDlg</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KPluginDlg</cstring> </property> @@ -36,7 +36,7 @@ </column> <column> <property name="text"> - <string>Status</string> + <string>tqStatus</string> </property> <property name="clickable"> <bool>true</bool> @@ -82,7 +82,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>180</width> <height>20</height> @@ -150,5 +150,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/krecentfileitem.cpp b/kmymoney2/dialogs/krecentfileitem.cpp index 679078d..dfcb0b8 100644 --- a/kmymoney2/dialogs/krecentfileitem.cpp +++ b/kmymoney2/dialogs/krecentfileitem.cpp @@ -23,10 +23,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtooltip.h> -#include <qwidget.h> -#include <qrect.h> -#include <qpoint.h> +#include <tqtooltip.h> +#include <tqwidget.h> +#include <tqrect.h> +#include <tqpoint.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -37,12 +37,12 @@ #include "krecentfileitem.h" -KRecentFileItem::KRecentFileItem(const QString& url, QIconView* parent, const QString& text, const QPixmap& icon) - : QIconViewItem(parent, text, icon), +KRecentFileItem::KRecentFileItem(const TQString& url, TQIconView* tqparent, const TQString& text, const TQPixmap& icon) + : TQIconViewItem(tqparent, text, icon), m_url(url), - m_parent(parent) + m_parent(tqparent) { - QToolTip::add(parent, rect(), url); + TQToolTip::add(tqparent, rect(), url); // avoid moving this item around setDragEnabled(false); } @@ -53,10 +53,10 @@ KRecentFileItem::~KRecentFileItem() bool KRecentFileItem::move( int x, int y ) { - QRect r = rect(); - QToolTip::remove(m_parent, rect()); - r.moveTopLeft(QPoint(x,y)); - QToolTip::add(m_parent, r, m_url); - return QIconViewItem::move(x,y); + TQRect r = rect(); + TQToolTip::remove(m_parent, rect()); + r.moveTopLeft(TQPoint(x,y)); + TQToolTip::add(m_parent, r, m_url); + return TQIconViewItem::move(x,y); } diff --git a/kmymoney2/dialogs/krecentfileitem.h b/kmymoney2/dialogs/krecentfileitem.h index bb88cba..1859c96 100644 --- a/kmymoney2/dialogs/krecentfileitem.h +++ b/kmymoney2/dialogs/krecentfileitem.h @@ -24,8 +24,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qiconview.h> +#include <tqwidget.h> +#include <tqiconview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,17 +40,17 @@ * @author Michael Edwardes */ -class KRecentFileItem : public QIconViewItem { +class KRecentFileItem : public TQIconViewItem { public: - KRecentFileItem(const QString& url, QIconView* parent, const QString& text, const QPixmap& icon); + KRecentFileItem(const TQString& url, TQIconView* tqparent, const TQString& text, const TQPixmap& icon); ~KRecentFileItem(); - QString fileURL(void) const { return m_url; } + TQString fileURL(void) const { return m_url; } bool move( int x, int y ); private: - QString m_url; - QWidget* m_parent; + TQString m_url; + TQWidget* m_parent; }; #endif diff --git a/kmymoney2/dialogs/kreconciledlg.cpp b/kmymoney2/dialogs/kreconciledlg.cpp index 75e7b48..f7911b2 100644 --- a/kmymoney2/dialogs/kreconciledlg.cpp +++ b/kmymoney2/dialogs/kreconciledlg.cpp @@ -17,24 +17,20 @@ #include <kmessagebox.h> #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif #include "kreconciledlg.h" KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, - const QDate /* endingDate */, MyMoneyAccount* /*accountIndex */, - const MyMoneyFile* /* file */, QWidget *parent, const char *name) - : KReconcileDlgDecl(parent,name,true) + const TQDate /* endingDate */, MyMoneyAccount* /*accountIndex */, + const MyMoneyFile* /* file */, TQWidget *tqparent, const char *name) + : KReconcileDlgDecl(tqparent,name,true) { /* m_balanced = false; - m_debitsQList.setAutoDelete(false); - m_creditsQList.setAutoDelete(false); + m_debitsTQList.setAutoDelete(false); + m_creditsTQList.setAutoDelete(false); m_reconciledTransactions.setAutoDelete(false); m_file = file; @@ -47,11 +43,11 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney m_endingDate = endingDate; - totalCreditsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - totalDebitsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - previousLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - endingLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - differenceLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + totalCreditsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + totalDebitsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + previousLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + endingLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + differenceLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); debitListView->setRootIsDecorated(false); @@ -63,7 +59,7 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney debitListView->setMultiSelection(true); debitListView->setAllColumnsShowFocus(true); // never show a horizontal scroll bar - debitListView->setHScrollBarMode(QScrollView::AlwaysOff); + debitListView->setHScrollBarMode(TQScrollView::AlwaysOff); creditListView->setRootIsDecorated(false); creditListView->addColumn(i18n("Date")); @@ -74,7 +70,7 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney creditListView->setMultiSelection(true); creditListView->setAllColumnsShowFocus(true); // never show a horizontal scroll bar - creditListView->setHScrollBarMode(QScrollView::AlwaysOff); + creditListView->setHScrollBarMode(TQScrollView::AlwaysOff); endingLabel->setText(KGlobal::locale()->formatMoney(m_clearedBalance.amount(),"")); @@ -90,11 +86,11 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney loadLists(); insertTransactions(); - connect(debitListView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotDebitSelected(QListViewItem*, const QPoint&, int))); - connect(creditListView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotCreditSelected(QListViewItem*, const QPoint&, int))); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(cancelClicked())); - connect(buttonOk, SIGNAL(clicked()), this, SLOT(finishClicked())); - connect(buttonEdit, SIGNAL(clicked()), this, SLOT(editClicked())); + connect(debitListView, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotDebitSelected(TQListViewItem*, const TQPoint&, int))); + connect(creditListView, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotCreditSelected(TQListViewItem*, const TQPoint&, int))); + connect(buttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancelClicked())); + connect(buttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(finishClicked())); + connect(buttonEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editClicked())); doDifference(); */ @@ -108,14 +104,14 @@ void KReconcileDlg::clearReconcile() { /* MyMoneyTransaction *temp_transaction; - for(temp_transaction = m_creditsQList.first();temp_transaction;temp_transaction = m_creditsQList.next()) + for(temp_transaction = m_creditsTQList.first();temp_transaction;temp_transaction = m_creditsTQList.next()) { if(temp_transaction->state() == MyMoneyTransaction::Reconciled) { temp_transaction->setState(MyMoneyTransaction::Unreconciled); } } - for(temp_transaction = m_debitsQList.first();temp_transaction;temp_transaction = m_debitsQList.next()) + for(temp_transaction = m_debitsTQList.first();temp_transaction;temp_transaction = m_debitsTQList.next()) { if(temp_transaction->state() == MyMoneyTransaction::Reconciled) { @@ -129,8 +125,8 @@ void KReconcileDlg::loadLists(void) { /* // Load the internal transaaction lists - m_creditsQList.clear(); - m_debitsQList.clear(); + m_creditsTQList.clear(); + m_debitsTQList.clear(); unsigned int i=0; MyMoneyTransaction *transaction; @@ -141,11 +137,11 @@ void KReconcileDlg::loadLists(void) if (transaction->state()!=MyMoneyTransaction::Reconciled) { if (transaction->type() == MyMoneyTransaction::Debit) { transaction->setIndex(i); - m_debitsQList.append(transaction); + m_debitsTQList.append(transaction); } else { transaction->setIndex(i); - m_creditsQList.append(transaction); + m_creditsTQList.append(transaction); } } } @@ -159,12 +155,12 @@ void KReconcileDlg::insertTransactions(void) creditListView->clear(); debitListView->clear(); - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { (void) new KReconcileListItem(debitListView, it.current()); } - QListIterator<MyMoneyTransaction> it2(m_creditsQList); + TQListIterator<MyMoneyTransaction> it2(m_creditsTQList); for ( ; it2.current(); ++it2) { (void) new KReconcileListItem(creditListView, it2.current()); } @@ -173,7 +169,7 @@ void KReconcileDlg::insertTransactions(void) */ } -void KReconcileDlg::slotDebitSelected(QListViewItem* /* item */, const QPoint&/*p*/, int/* col*/) +void KReconcileDlg::slotDebitSelected(TQListViewItem* /* item */, const TQPoint&/*p*/, int/* col*/) { /* KReconcileListItem *reconcileItem = (KReconcileListItem*)item; @@ -210,7 +206,7 @@ void KReconcileDlg::slotDebitSelected(QListViewItem* /* item */, const QPoint&/* */ } -void KReconcileDlg::slotCreditSelected(QListViewItem* /* item */, const QPoint&, int) +void KReconcileDlg::slotCreditSelected(TQListViewItem* /* item */, const TQPoint&, int) { /* KReconcileListItem *reconcileItem = (KReconcileListItem*)item; @@ -279,8 +275,8 @@ void KReconcileDlg::updateData(void) // Simply reload the list clearing the status. qDebug("In updateData"); m_reconciledTransactions.clear(); - m_debitsQList.clear(); - m_creditsQList.clear(); + m_debitsTQList.clear(); + m_creditsTQList.clear(); loadLists(); insertTransactions(); @@ -297,12 +293,12 @@ void KReconcileDlg::cancelClicked() */ } -void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, const QDate /* endingDate */, MyMoneyAccount* /* accountIndex */, const MyMoneyFile* /* file */) +void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, const TQDate /* endingDate */, MyMoneyAccount* /* accountIndex */, const MyMoneyFile* /* file */) { /* m_reconciledTransactions.clear(); - m_debitsQList.clear(); - m_creditsQList.clear(); + m_debitsTQList.clear(); + m_creditsTQList.clear(); m_balanced = false; @@ -317,11 +313,11 @@ void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMone m_endingDate = endingDate; - //totalCreditsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //totalDebitsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //previousLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //endingLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //differenceLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //totalCreditsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //totalDebitsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //previousLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //endingLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //differenceLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); endingLabel->setText(KGlobal::locale()->formatMoney(m_clearedBalance.amount(),"")); @@ -358,34 +354,34 @@ void KReconcileDlg::reloadLists() if (transaction->state()!=MyMoneyTransaction::Reconciled) { if (transaction->type() == MyMoneyTransaction::Debit) { transaction->setIndex(i); - if(m_debitsQList.find(transaction) < 0) + if(m_debitsTQList.tqfind(transaction) < 0) { - m_debitsQList.append(transaction); + m_debitsTQList.append(transaction); } } else { transaction->setIndex(i); - if(m_creditsQList.find(transaction) < 0) + if(m_creditsTQList.tqfind(transaction) < 0) { - m_creditsQList.append(transaction); + m_creditsTQList.append(transaction); } } } } - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { bool transactionFound = inTransactions(it.current()); if(transactionFound == false) - m_debitsQList.remove(it.current()); + m_debitsTQList.remove(it.current()); } - QListIterator<MyMoneyTransaction> it2(m_creditsQList); + TQListIterator<MyMoneyTransaction> it2(m_creditsTQList); for ( ; it2.current(); ++it2) { bool transactionFound = inTransactions(it2.current()); if(transactionFound == false) - m_creditsQList.remove(it2.current()); + m_creditsTQList.remove(it2.current()); } */ } @@ -408,7 +404,7 @@ bool KReconcileDlg::inTransactions(MyMoneyTransaction * /*credittrans */) /* Not used (yet?) bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) { - QListIterator<MyMoneyTransaction> it(m_creditsQList); + TQListIterator<MyMoneyTransaction> it(m_creditsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; @@ -422,7 +418,7 @@ bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) /* Not used (yet?) bool KReconcileDlg::inDebits(MyMoneyTransaction *transaction) { - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; @@ -440,7 +436,7 @@ void KReconcileDlg::editClicked() */ } -void KReconcileDlg::resizeEvent(QResizeEvent* /* e */) +void KReconcileDlg::resizeEvent(TQResizeEvent* /* e */) { /* debitListView->setColumnWidth( 2, debitListView->visibleWidth() diff --git a/kmymoney2/dialogs/kreconciledlg.h b/kmymoney2/dialogs/kreconciledlg.h index 9ddb079..214c583 100644 --- a/kmymoney2/dialogs/kreconciledlg.h +++ b/kmymoney2/dialogs/kreconciledlg.h @@ -17,9 +17,9 @@ #ifndef KRECONCILEDLG_H #define KRECONCILEDLG_H -#include <qlabel.h> +#include <tqlabel.h> #include <klistview.h> -#include <qpushbutton.h> +#include <tqpushbutton.h> #include "../mymoney/mymoneyfile.h" #include "../mymoney/mymoneymoney.h" @@ -29,19 +29,20 @@ // This dialog is used for reconciliation. class KReconcileDlg : public KReconcileDlgDecl { Q_OBJECT + TQ_OBJECT public: - KReconcileDlg(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const QDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file, QWidget *parent=0, const char *name=0); + KReconcileDlg(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const TQDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file, TQWidget *tqparent=0, const char *name=0); ~KReconcileDlg(); // void updateData(void); - void resetData(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const QDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file); + void resetData(const MyMoneyMoney previousBal, const MyMoneyMoney endingBal, const TQDate endingDate, MyMoneyAccount *accountIndex, const MyMoneyFile* file); /** No descriptions */ protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); protected slots: - void slotDebitSelected(QListViewItem*, const QPoint&, int); - void slotCreditSelected(QListViewItem*, const QPoint&, int); + void slotDebitSelected(TQListViewItem*, const TQPoint&, int); + void slotCreditSelected(TQListViewItem*, const TQPoint&, int); void finishClicked(); void cancelClicked(); /** No descriptions */ @@ -61,13 +62,13 @@ private: //MyMoneyBank m_bankIndex; MyMoneyAccount *m_accountIndex; - QList<MyMoneyTransaction> m_debitsQList; - QList<MyMoneyTransaction> m_creditsQList; - QList<MyMoneyTransaction> m_reconciledTransactions; + TQList<MyMoneyTransaction> m_debitsTQList; + TQList<MyMoneyTransaction> m_creditsTQList; + TQList<MyMoneyTransaction> m_reconciledTransactions; bool m_balanced; // true when the account is balanced (determined by doDifference) - QDate m_endingDate; + TQDate m_endingDate; void loadLists(void); void insertTransactions(void); diff --git a/kmymoney2/dialogs/kreconciledlgdecl.ui b/kmymoney2/dialogs/kreconciledlgdecl.ui index c75ceed..9ed4dc1 100644 --- a/kmymoney2/dialogs/kreconciledlgdecl.ui +++ b/kmymoney2/dialogs/kreconciledlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KReconcileDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>reconcileDlg</cstring> </property> @@ -12,7 +12,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -34,7 +34,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout10</cstring> </property> @@ -48,7 +48,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>descriptionLabel</cstring> </property> @@ -63,7 +63,7 @@ a transaction you can return to the register by clicking on the Edit Transaction Your account is balanced when the Difference is Zero. Click on the Finish button to save the reconciled transactions.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignLeft</set> </property> <property name="wordwrap" stdset="0"> @@ -85,7 +85,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout27</cstring> </property> @@ -99,11 +99,11 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout25</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>420</width> <height>0</height> @@ -119,7 +119,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_3</cstring> </property> @@ -131,7 +131,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>420</width> <height>15</height> @@ -153,7 +153,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>420</width> <height>100</height> @@ -162,7 +162,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout26</cstring> </property> @@ -176,7 +176,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_3_2</cstring> </property> @@ -188,7 +188,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>15</height> @@ -210,7 +210,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>420</width> <height>100</height> @@ -221,7 +221,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout11</cstring> </property> @@ -235,7 +235,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>totalDebitsLabel</cstring> </property> @@ -264,14 +264,14 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>totalCreditsLabel</cstring> </property> @@ -289,7 +289,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -313,14 +313,14 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>infoGroup</cstring> </property> @@ -332,7 +332,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>250</width> <height>120</height> @@ -351,7 +351,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout8</cstring> </property> @@ -365,7 +365,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -377,7 +377,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -386,13 +386,13 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>Previous Balance:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>broughtForwardLabel</cstring> </property> @@ -407,7 +407,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>0</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -415,7 +415,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout7</cstring> </property> @@ -429,7 +429,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -441,7 +441,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -450,13 +450,13 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>Ending Balance:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>previousLabel</cstring> </property> @@ -468,7 +468,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -477,7 +477,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>0</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -485,7 +485,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout8</cstring> </property> @@ -499,7 +499,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -511,7 +511,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -520,13 +520,13 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>Cleared Balance:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>endingLabel</cstring> </property> @@ -538,7 +538,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -547,7 +547,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>0</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -555,7 +555,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout9</cstring> </property> @@ -569,7 +569,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -581,7 +581,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -590,13 +590,13 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>Difference:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>differenceLabel</cstring> </property> @@ -611,7 +611,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="text"> <string>0</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -623,7 +623,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -637,7 +637,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonEdit</cstring> </property> @@ -655,14 +655,14 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -676,7 +676,7 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -705,5 +705,5 @@ Your account is balanced when the Difference is Zero. Click on the Finish butto <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kreportconfigurationfilterdlg.cpp b/kmymoney2/dialogs/kreportconfigurationfilterdlg.cpp index 949601d..d904d1a 100644 --- a/kmymoney2/dialogs/kreportconfigurationfilterdlg.cpp +++ b/kmymoney2/dialogs/kreportconfigurationfilterdlg.cpp @@ -28,22 +28,22 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvariant.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qlayout.h> -#include <qspinbox.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qtabwidget.h> -#include <qtextedit.h> -#include <qlayout.h> -#include <qapplication.h> +#include <tqvariant.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqlayout.h> +#include <tqspinbox.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqtabwidget.h> +#include <tqtextedit.h> +#include <tqlayout.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -76,8 +76,8 @@ #include "../widgets/kmymoneyreportconfigtabchartdecl.h" KReportConfigurationFilterDlg::KReportConfigurationFilterDlg( - MyMoneyReport report, QWidget *parent, const char *name) - : KFindTransactionDlg(parent, name), + MyMoneyReport report, TQWidget *tqparent, const char *name) + : KFindTransactionDlg(tqparent, name), m_tab2(0), m_tab3(0), m_tabChart(0), @@ -96,13 +96,13 @@ KReportConfigurationFilterDlg::KReportConfigurationFilterDlg( // // the Ok button is always enabled - disconnect(SIGNAL(selectionEmpty(bool))); + disconnect(TQT_SIGNAL(selectionEmpty(bool))); m_searchButton->setGuiItem( KStdGuiItem::ok() ); m_searchButton->setEnabled(true); // reconnect the close button m_closeButton->disconnect(); - connect(m_closeButton, SIGNAL(clicked()), this, SLOT(reject())); + connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); // // Add new tabs @@ -115,10 +115,10 @@ KReportConfigurationFilterDlg::KReportConfigurationFilterDlg( { m_tab2 = new kMyMoneyReportConfigTab2Decl( m_criteriaTab, "kMyMoneyReportConfigTab2" ); m_criteriaTab->insertTab( m_tab2, i18n( "Rows/Columns"), 1 ); - connect(m_tab2->m_comboRows, SIGNAL(highlighted(int)), this, SLOT(slotRowTypeChanged(int))); - connect(m_tab2->m_comboColumns, SIGNAL(activated(int)), this, SLOT(slotColumnTypeChanged(int))); + connect(m_tab2->m_comboRows, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotRowTypeChanged(int))); + connect(m_tab2->m_comboColumns, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotColumnTypeChanged(int))); //control the state of the includeTransfer check - connect(m_categoriesView, SIGNAL(stateChanged()), this, SLOT(slotUpdateCheckTransfers())); + connect(m_categoriesView, TQT_SIGNAL(stateChanged()), this, TQT_SLOT(slotUpdateCheckTransfers())); #ifdef HAVE_KDCHART m_tabChart = new kMyMoneyReportConfigTabChartDecl( m_criteriaTab, "kMyMoneyReportConfigTabChart" ); @@ -139,8 +139,8 @@ KReportConfigurationFilterDlg::KReportConfigurationFilterDlg( m_criteriaTab->showPage( m_tab1 ); m_criteriaTab->setMinimumSize( 500,200 ); - QValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); - QValueList<MyMoneyBudget>::const_iterator it_b; + TQValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); + TQValueList<MyMoneyBudget>::const_iterator it_b; for(it_b = list.begin(); it_b != list.end(); ++it_b) { m_budgets.push_back(*it_b); } @@ -201,7 +201,7 @@ void KReportConfigurationFilterDlg::slotSearch(void) if(m_tab2->m_comboBudget->isEnabled()) { m_currentState.setBudget(m_budgets[m_tab2->m_comboBudget->currentItem()].id(), m_initialState.rowType() == MyMoneyReport::eBudgetActual); } else { - m_currentState.setBudget(QString(), false); + m_currentState.setBudget(TQString(), false); } //set moving average days @@ -214,32 +214,32 @@ void KReportConfigurationFilterDlg::slotSearch(void) MyMoneyReport::ERowType rtq[7] = { MyMoneyReport::eCategory, MyMoneyReport::eTopCategory, MyMoneyReport::ePayee, MyMoneyReport::eAccount, MyMoneyReport::eTopAccount, MyMoneyReport::eMonth, MyMoneyReport::eWeek }; m_currentState.setRowType( rtq[m_tab3->m_comboOrganizeBy->currentItem()] ); - unsigned qc = MyMoneyReport::eQCnone; + unsigned qc = MyMoneyReport::eTQCnone; - if (m_currentState.queryColumns() & MyMoneyReport::eQCloan) + if (m_currentState.queryColumns() & MyMoneyReport::eTQCloan) // once a loan report, always a loan report - qc = MyMoneyReport::eQCloan; + qc = MyMoneyReport::eTQCloan; if ( m_tab3->m_checkNumber->isChecked() ) - qc |= MyMoneyReport::eQCnumber; + qc |= MyMoneyReport::eTQCnumber; if ( m_tab3->m_checkPayee->isChecked() ) - qc |= MyMoneyReport::eQCpayee; + qc |= MyMoneyReport::eTQCpayee; if ( m_tab3->m_checkCategory->isChecked() ) - qc |= MyMoneyReport::eQCcategory; + qc |= MyMoneyReport::eTQCcategory; if ( m_tab3->m_checkMemo->isChecked() ) - qc |= MyMoneyReport::eQCmemo; + qc |= MyMoneyReport::eTQCmemo; if ( m_tab3->m_checkAccount->isChecked() ) - qc |= MyMoneyReport::eQCaccount; + qc |= MyMoneyReport::eTQCaccount; if ( m_tab3->m_checkReconciled->isChecked() ) - qc |= MyMoneyReport::eQCreconciled; + qc |= MyMoneyReport::eTQCreconciled; if ( m_tab3->m_checkAction->isChecked() ) - qc |= MyMoneyReport::eQCaction; + qc |= MyMoneyReport::eTQCaction; if ( m_tab3->m_checkShares->isChecked() ) - qc |= MyMoneyReport::eQCshares; + qc |= MyMoneyReport::eTQCshares; if ( m_tab3->m_checkPrice->isChecked() ) - qc |= MyMoneyReport::eQCprice; + qc |= MyMoneyReport::eTQCprice; if( m_tab3->m_checkBalance->isChecked() ) - qc |= MyMoneyReport::eQCbalance; + qc |= MyMoneyReport::eTQCbalance; m_currentState.setQueryColumns(static_cast<MyMoneyReport::EQueryColumns>(qc)); @@ -373,12 +373,12 @@ void KReportConfigurationFilterDlg::slotReset(void) || m_initialState.rowType() == MyMoneyReport::eBudgetActual) { m_tab2->m_comboRows->setEnabled(false); m_tab2->m_budgetFrame->setEnabled(!m_budgets.empty()); - QValueVector<MyMoneyBudget>::const_iterator it_b; + TQValueVector<MyMoneyBudget>::const_iterator it_b; int i = 0; for(it_b = m_budgets.begin(); it_b != m_budgets.end(); ++it_b) { m_tab2->m_comboBudget->insertItem((*it_b).name(), i); //set the current selected item - if( (m_initialState.budget() == "Any" && (*it_b).budgetStart().year() == QDate::currentDate().year()) + if( (m_initialState.budget() == "Any" && (*it_b).budgetStart().year() == TQDate::tqcurrentDate().year()) || m_initialState.budget() == (*it_b).id()) m_tab2->m_comboBudget->setCurrentItem(i); i++; @@ -426,16 +426,16 @@ void KReportConfigurationFilterDlg::slotReset(void) } unsigned qc = m_initialState.queryColumns(); - m_tab3->m_checkNumber->setChecked(qc & MyMoneyReport::eQCnumber); - m_tab3->m_checkPayee->setChecked(qc & MyMoneyReport::eQCpayee); - m_tab3->m_checkCategory->setChecked(qc & MyMoneyReport::eQCcategory); - m_tab3->m_checkMemo->setChecked(qc & MyMoneyReport::eQCmemo); - m_tab3->m_checkAccount->setChecked(qc & MyMoneyReport::eQCaccount); - m_tab3->m_checkReconciled->setChecked(qc & MyMoneyReport::eQCreconciled); - m_tab3->m_checkAction->setChecked(qc & MyMoneyReport::eQCaction); - m_tab3->m_checkShares->setChecked(qc & MyMoneyReport::eQCshares); - m_tab3->m_checkPrice->setChecked(qc & MyMoneyReport::eQCprice); - m_tab3->m_checkBalance->setChecked(qc & MyMoneyReport::eQCbalance); + m_tab3->m_checkNumber->setChecked(qc & MyMoneyReport::eTQCnumber); + m_tab3->m_checkPayee->setChecked(qc & MyMoneyReport::eTQCpayee); + m_tab3->m_checkCategory->setChecked(qc & MyMoneyReport::eTQCcategory); + m_tab3->m_checkMemo->setChecked(qc & MyMoneyReport::eTQCmemo); + m_tab3->m_checkAccount->setChecked(qc & MyMoneyReport::eTQCaccount); + m_tab3->m_checkReconciled->setChecked(qc & MyMoneyReport::eTQCreconciled); + m_tab3->m_checkAction->setChecked(qc & MyMoneyReport::eTQCaction); + m_tab3->m_checkShares->setChecked(qc & MyMoneyReport::eTQCshares); + m_tab3->m_checkPrice->setChecked(qc & MyMoneyReport::eTQCprice); + m_tab3->m_checkBalance->setChecked(qc & MyMoneyReport::eTQCbalance); m_tab3->m_checkTax->setChecked( m_initialState.isTax() ); m_tab3->m_checkInvestments->setChecked( m_initialState.isInvestmentsOnly() ); @@ -478,7 +478,7 @@ void KReportConfigurationFilterDlg::slotReset(void) // Text Filter // - QRegExp textfilter; + TQRegExp textfilter; if ( m_initialState.textFilter(textfilter)) { m_textEdit->setText(textfilter.pattern()); @@ -503,7 +503,7 @@ void KReportConfigurationFilterDlg::slotReset(void) // Number Filter // - QString nrFrom, nrTo; + TQString nrFrom, nrTo; if ( m_initialState.numberFilter(nrFrom, nrTo) ) { if ( nrFrom == nrTo ) @@ -512,8 +512,8 @@ void KReportConfigurationFilterDlg::slotReset(void) m_nrFromEdit->setEnabled(false); m_nrToEdit->setEnabled(false); m_nrEdit->setText(nrFrom); - m_nrFromEdit->setText(QString()); - m_nrToEdit->setText(QString()); + m_nrFromEdit->setText(TQString()); + m_nrToEdit->setText(TQString()); m_nrButton->setChecked(true); m_nrRangeButton->setChecked(false); } @@ -522,7 +522,7 @@ void KReportConfigurationFilterDlg::slotReset(void) m_nrEdit->setEnabled(false); m_nrFromEdit->setEnabled(true); m_nrToEdit->setEnabled(false); - m_nrEdit->setText(QString()); + m_nrEdit->setText(TQString()); m_nrFromEdit->setText(nrFrom); m_nrToEdit->setText(nrTo); m_nrButton->setChecked(false); @@ -534,9 +534,9 @@ void KReportConfigurationFilterDlg::slotReset(void) m_nrEdit->setEnabled(true); m_nrFromEdit->setEnabled(false); m_nrToEdit->setEnabled(false); - m_nrEdit->setText(QString()); - m_nrFromEdit->setText(QString()); - m_nrToEdit->setText(QString()); + m_nrEdit->setText(TQString()); + m_nrFromEdit->setText(TQString()); + m_nrToEdit->setText(TQString()); m_nrButton->setChecked(true); m_nrRangeButton->setChecked(false); } @@ -553,9 +553,9 @@ void KReportConfigurationFilterDlg::slotReset(void) m_amountEdit->setEnabled(true); m_amountFromEdit->setEnabled(false); m_amountToEdit->setEnabled(false); - m_amountEdit->loadText(QString::number(from.toDouble())); - m_amountFromEdit->loadText(QString()); - m_amountToEdit->loadText(QString()); + m_amountEdit->loadText(TQString::number(from.toDouble())); + m_amountFromEdit->loadText(TQString()); + m_amountToEdit->loadText(TQString()); m_amountButton->setChecked(true); m_amountRangeButton->setChecked(false); } @@ -564,9 +564,9 @@ void KReportConfigurationFilterDlg::slotReset(void) m_amountEdit->setEnabled(false); m_amountFromEdit->setEnabled(true); m_amountToEdit->setEnabled(true); - m_amountEdit->loadText(QString()); - m_amountFromEdit->loadText(QString::number(from.toDouble())); - m_amountToEdit->loadText(QString::number(to.toDouble())); + m_amountEdit->loadText(TQString()); + m_amountFromEdit->loadText(TQString::number(from.toDouble())); + m_amountToEdit->loadText(TQString::number(to.toDouble())); m_amountButton->setChecked(false); m_amountRangeButton->setChecked(true); } @@ -576,9 +576,9 @@ void KReportConfigurationFilterDlg::slotReset(void) m_amountEdit->setEnabled(true); m_amountFromEdit->setEnabled(false); m_amountToEdit->setEnabled(false); - m_amountEdit->loadText(QString()); - m_amountFromEdit->loadText(QString()); - m_amountToEdit->loadText(QString()); + m_amountEdit->loadText(TQString()); + m_amountFromEdit->loadText(TQString()); + m_amountToEdit->loadText(TQString()); m_amountButton->setChecked(true); m_amountRangeButton->setChecked(false); } @@ -587,7 +587,7 @@ void KReportConfigurationFilterDlg::slotReset(void) // Payees Filter // - QStringList payees; + TQStringList payees; if ( m_initialState.payees(payees) ) { if ( payees.empty() ) @@ -609,7 +609,7 @@ void KReportConfigurationFilterDlg::slotReset(void) // Accounts Filter // - QStringList accounts; + TQStringList accounts; if ( m_initialState.accounts(accounts) ) { m_accountsView->selectAllItems(false); @@ -638,7 +638,7 @@ void KReportConfigurationFilterDlg::slotReset(void) // that's why we call it last m_initialState.updateDateFilter(); - QDate dateFrom, dateTo; + TQDate dateFrom, dateTo; if ( m_initialState.dateFilter( dateFrom, dateTo ) ) { if(m_initialState.isUserDefined()) { diff --git a/kmymoney2/dialogs/kreportconfigurationfilterdlg.h b/kmymoney2/dialogs/kreportconfigurationfilterdlg.h index 56e398d..0a80e60 100644 --- a/kmymoney2/dialogs/kreportconfigurationfilterdlg.h +++ b/kmymoney2/dialogs/kreportconfigurationfilterdlg.h @@ -24,7 +24,7 @@ #ifndef KREPORTCONFIGURATIONFILTERDLG_H #define KREPORTCONFIGURATIONFILTERDLG_H -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "../dialogs/kfindtransactiondlg.h" #include "../mymoney/mymoneyreport.h" @@ -42,8 +42,9 @@ class MyMoneyBudget; class KReportConfigurationFilterDlg : public KFindTransactionDlg { Q_OBJECT + TQ_OBJECT public: - KReportConfigurationFilterDlg(MyMoneyReport report, QWidget *parent = 0, const char *name = 0); + KReportConfigurationFilterDlg(MyMoneyReport report, TQWidget *tqparent = 0, const char *name = 0); ~KReportConfigurationFilterDlg(); const MyMoneyReport& getConfig(void) const { return m_currentState; } @@ -72,7 +73,7 @@ protected slots: virtual void slotDateChanged(void); private: - QValueVector<MyMoneyBudget> m_budgets; + TQValueVector<MyMoneyBudget> m_budgets; }; #endif diff --git a/kmymoney2/dialogs/ksecuritylisteditor.cpp b/kmymoney2/dialogs/ksecuritylisteditor.cpp index ee4c486..86e2e66 100644 --- a/kmymoney2/dialogs/ksecuritylisteditor.cpp +++ b/kmymoney2/dialogs/ksecuritylisteditor.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,49 +51,49 @@ #define ACCFRACT_COL 6 #define CASHFRACT_COL 7 -#define CURRENCY_MARKET QString("ISO 4217") +#define CURRENCY_MARKET TQString("ISO 4217") -KSecurityListEditor::KSecurityListEditor(QWidget *parent, const char *name) : - KSecurityListEditorDecl(parent, name) +KSecurityListEditor::KSecurityListEditor(TQWidget *tqparent, const char *name) : + KSecurityListEditorDecl(tqparent, name) { m_listView->setColumnWidth(ID_COL, 0); - m_listView->setColumnWidthMode(NAME_COL, QListView::Maximum); - m_listView->setColumnWidthMode(ID_COL, QListView::Manual); - m_listView->setColumnAlignment(CURR_COL, Qt::AlignHCenter); + m_listView->setColumnWidthMode(NAME_COL, TQListView::Maximum); + m_listView->setColumnWidthMode(ID_COL, TQListView::Manual); + m_listView->setColumnAlignment(CURR_COL, TQt::AlignHCenter); m_listView->setMultiSelection(false); m_listView->setAllColumnsShowFocus(true); KIconLoader *il = KGlobal::iconLoader(); KGuiItem removeButtenItem( i18n( "&Delete" ), - QIconSet(il->loadIcon("delete", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("delete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete this entry"), i18n("Remove this security item from the file")); m_deleteButton->setGuiItem(removeButtenItem); KGuiItem addButtenItem( i18n( "&Add" ), - QIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), i18n("Add a new entry"), i18n("Create a new security entry.")); m_addButton->setGuiItem(addButtenItem); KGuiItem editButtenItem( i18n( "&Edit" ), - QIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("edit", KIcon::Small, KIcon::SizeSmall)), i18n("Modify the selected entry"), i18n("Change the security information of the selected entry.")); m_editButton->setGuiItem(editButtenItem); KGuiItem okButtenItem( i18n("&Close" ), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Close the dialog"), i18n("Use this to close the dialog and return to the application.")); m_closeButton->setGuiItem(okButtenItem); - connect(m_closeButton, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_showCurrencyButton, SIGNAL(toggled(bool)), this, SLOT(slotLoadList())); - connect(m_listView, SIGNAL(selectionChanged()), this, SLOT(slotUpdateButtons())); + connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_showCurrencyButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLoadList())); + connect(m_listView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateButtons())); - connect(m_editButton, SIGNAL(clicked()), this, SLOT(slotEditSecurity())); - connect(m_deleteButton, SIGNAL(clicked()), this, SLOT(slotDeleteSecurity())); + connect(m_editButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSecurity())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeleteSecurity())); // FIXME for now, the only way to add a new security is to add a new investment m_addButton->hide(); @@ -109,22 +109,22 @@ void KSecurityListEditor::slotLoadList(void) { m_listView->clear(); - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); - QValueList<MyMoneySecurity>::ConstIterator it; + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity>::ConstIterator it; if(m_showCurrencyButton->isChecked()) { list += MyMoneyFile::instance()->currencyList(); } for(it = list.begin(); it != list.end(); ++it) { - KListViewItem* newItem = new KListViewItem(m_listView, QString((*it).id())); + KListViewItem* newItem = new KListViewItem(m_listView, TQString((*it).id())); fillItem(newItem, *it); } slotUpdateButtons(); } -void KSecurityListEditor::fillItem(QListViewItem* item, const MyMoneySecurity& security) +void KSecurityListEditor::fillItem(TQListViewItem* item, const MyMoneySecurity& security) { - QString market = security.tradingMarket(); + TQString market = security.tradingMarket(); MyMoneySecurity tradingCurrency; if(security.isCurrency()) market = CURRENCY_MARKET; @@ -136,16 +136,16 @@ void KSecurityListEditor::fillItem(QListViewItem* item, const MyMoneySecurity& s item->setText(SYMBOL_COL, security.tradingSymbol()); item->setText(MARKET_COL, market); item->setText(CURR_COL, tradingCurrency.tradingSymbol()); - item->setText(ACCFRACT_COL, QString::number(security.smallestAccountFraction())); + item->setText(ACCFRACT_COL, TQString::number(security.smallestAccountFraction())); // smallestCashFraction is only applicable for currencies if(security.isCurrency()) - item->setText(CASHFRACT_COL, QString::number(security.smallestCashFraction())); + item->setText(CASHFRACT_COL, TQString::number(security.smallestCashFraction())); } void KSecurityListEditor::slotUpdateButtons(void) { - QListViewItem* item = m_listView->selectedItem(); + TQListViewItem* item = m_listView->selectedItem(); if(item) { MyMoneySecurity security = MyMoneyFile::instance()->security(item->text(ID_COL).latin1()); @@ -160,13 +160,13 @@ void KSecurityListEditor::slotUpdateButtons(void) void KSecurityListEditor::slotEditSecurity(void) { - QListViewItem* item = m_listView->selectedItem(); + TQListViewItem* item = m_listView->selectedItem(); if(item) { MyMoneySecurity security = MyMoneyFile::instance()->security(item->text(ID_COL).latin1()); KNewInvestmentWizard dlg(security, this, "KNewInvestmentWizard"); - if(dlg.exec() == QDialog::Accepted) { - dlg.createObjects(QString()); + if(dlg.exec() == TQDialog::Accepted) { + dlg.createObjects(TQString()); security = MyMoneyFile::instance()->security(item->text(ID_COL).latin1()); fillItem(item, security); } @@ -175,16 +175,16 @@ void KSecurityListEditor::slotEditSecurity(void) void KSecurityListEditor::slotDeleteSecurity(void) { - QListViewItem* item = m_listView->selectedItem(); + TQListViewItem* item = m_listView->selectedItem(); if(item) { MyMoneySecurity security = MyMoneyFile::instance()->security(item->text(ID_COL).latin1()); - QString msg; - QString dontAsk; + TQString msg; + TQString dontAsk; if(security.isCurrency()) { - msg = QString("<p>") + i18n("Do you really want to remove the currency <b>%1</b> from the file?</p><i>Note: It is currently not supported to add currencies.</i>").arg(security.name()); + msg = TQString("<p>") + i18n("Do you really want to remove the currency <b>%1</b> from the file?</p><i>Note: It is currently not supported to add currencies.</i>").tqarg(security.name()); dontAsk = "DeleteCurrency"; } else { - msg = QString("<p>") + i18n("Do you really want to remove the %1 <b>%2</b> from the file?").arg(KMyMoneyUtils::securityTypeToString(security.securityType())).arg(security.name()); + msg = TQString("<p>") + i18n("Do you really want to remove the %1 <b>%2</b> from the file?").tqarg(KMyMoneyUtils::securityTypeToString(security.securityType())).tqarg(security.name()); dontAsk = "DeleteSecurity"; } if(KMessageBox::questionYesNo(this, msg, i18n("Delete security"), KStdGuiItem::yes(), KStdGuiItem::no(), dontAsk) == KMessageBox::Yes) { diff --git a/kmymoney2/dialogs/ksecuritylisteditor.h b/kmymoney2/dialogs/ksecuritylisteditor.h index 050edbe..ec77483 100644 --- a/kmymoney2/dialogs/ksecuritylisteditor.h +++ b/kmymoney2/dialogs/ksecuritylisteditor.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QListViewItem; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -40,8 +40,9 @@ class QListViewItem; class KSecurityListEditor : public KSecurityListEditorDecl { Q_OBJECT + TQ_OBJECT public: - KSecurityListEditor(QWidget *parent, const char* name = 0); + KSecurityListEditor(TQWidget *tqparent, const char* name = 0); ~KSecurityListEditor(); protected slots: @@ -51,7 +52,7 @@ protected slots: void slotDeleteSecurity(void); protected: - void fillItem(QListViewItem* item, const MyMoneySecurity& security); + void fillItem(TQListViewItem* item, const MyMoneySecurity& security); }; diff --git a/kmymoney2/dialogs/ksecuritylisteditordecl.ui b/kmymoney2/dialogs/ksecuritylisteditordecl.ui index cbb9999..1347cb0 100644 --- a/kmymoney2/dialogs/ksecuritylisteditordecl.ui +++ b/kmymoney2/dialogs/ksecuritylisteditordecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KSecurityListEditorDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSecurityListEditorDecl</cstring> </property> @@ -22,9 +22,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -123,9 +123,9 @@ <cstring>m_listView</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -141,7 +141,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>51</height> @@ -182,7 +182,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>110</height> @@ -193,7 +193,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_showCurrencyButton</cstring> </property> @@ -215,9 +215,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -233,7 +233,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>91</width> <height>20</height> @@ -258,5 +258,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kselectdatabasedlg.cpp b/kmymoney2/dialogs/kselectdatabasedlg.cpp index 941712c..47d092d 100644 --- a/kmymoney2/dialogs/kselectdatabasedlg.cpp +++ b/kmymoney2/dialogs/kselectdatabasedlg.cpp @@ -22,14 +22,14 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qpushbutton.h> -#include <qapplication.h> -#include <qsqldatabase.h> -#include <qfiledialog.h> -#include <qstatusbar.h> -#include <qcheckbox.h> -#include <qcolor.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqapplication.h> +#include <tqsqldatabase.h> +#include <tqfiledialog.h> +#include <tqstatusbar.h> +#include <tqcheckbox.h> +#include <tqcolor.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,24 +45,24 @@ #include "kselectdatabasedlg.h" -KSelectDatabaseDlg::KSelectDatabaseDlg(QWidget *parent, const char *name) - : KSelectDatabaseDlgDecl(parent, name) { +KSelectDatabaseDlg::KSelectDatabaseDlg(TQWidget *tqparent, const char *name) + : KSelectDatabaseDlgDecl(tqparent, name) { listDrivers->clear(); // list drivers supported by KMM - QMap<QString, QString> map = m_map.driverMap(); + TQMap<TQString, TQString> map = m_map.driverMap(); // list drivers installed on system - QStringList list = QSqlDatabase::drivers(); + TQStringList list = TQSqlDatabase::drivers(); if (list.count() == 0) { - KMessageBox::error (0, i18n("There are no Qt SQL drivers installed in your system.\n" - "Please consult documentation for your distro, or visit the Qt web site (www.trolltech.com)" + KMessageBox::error (0, i18n("There are no TQt SQL drivers installed in your system.\n" + "Please consult documentation for your distro, or visit the TQt web site (www.trolltech.com)" " and search for SQL drivers."), ""); setError(); } else { - QStringList::Iterator it = list.begin(); + TQStringList::Iterator it = list.begin(); while(it != list.end()) { - QString dname = *it; - if (map.keys().contains(dname)) { // only display if driver is supported + TQString dname = *it; + if (map.keys().tqcontains(dname)) { // only display if driver is supported dname = dname + " - " + map[dname]; listDrivers->insertItem (dname); } @@ -73,20 +73,20 @@ KSelectDatabaseDlg::KSelectDatabaseDlg(QWidget *parent, const char *name) textUserName->setText(""); struct passwd * pwd = getpwuid(geteuid()); if (pwd != 0) - textUserName->setText (QString(pwd->pw_name)); + textUserName->setText (TQString(pwd->pw_name)); textPassword->setText (""); - m_requiredFields = new kMandatoryFieldGroup(this); + m_requiredFields = new kMandatoryFieldGroup(TQT_TQOBJECT(this)); m_requiredFields->setOkButton(buttonOK); m_requiredFields->add(listDrivers); m_requiredFields->add(textDbName); - connect (listDrivers, SIGNAL(clicked(QListBoxItem *)), - this, SLOT(slotDriverSelected(QListBoxItem *))); - connect (buttonSQL, SIGNAL(clicked()), this, SLOT(slotGenerateSQL())); - connect (buttonOK, SIGNAL(clicked()), this, SLOT(accept())); + connect (listDrivers, TQT_SIGNAL(clicked(TQListBoxItem *)), + this, TQT_SLOT(slotDriverSelected(TQListBoxItem *))); + connect (buttonSQL, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGenerateSQL())); + connect (buttonOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); checkPreLoad->setChecked(false); buttonSQL->setEnabled(true); } - connect (buttonHelp, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect (buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); // ensure a driver gets selected; pre-select if only one listDrivers->clearSelection(); if (listDrivers->count() == 1) { @@ -95,30 +95,30 @@ KSelectDatabaseDlg::KSelectDatabaseDlg(QWidget *parent, const char *name) } } -KSelectDatabaseDlg::KSelectDatabaseDlg(KURL openURL, QWidget *parent, const char *name) - : KSelectDatabaseDlgDecl(parent, name) { +KSelectDatabaseDlg::KSelectDatabaseDlg(KURL openURL, TQWidget *tqparent, const char *name) + : KSelectDatabaseDlgDecl(tqparent, name) { // here we are re-opening a database from a URL // probably taken from the last-used or recent file list listDrivers->clear(); // check that the SQL driver is still available - QString driverName = openURL.queryItem("driver"); + TQString driverName = openURL.queryItem("driver"); // list drivers installed on system - QStringList list = QSqlDatabase::drivers(); + TQStringList list = TQSqlDatabase::drivers(); // list drivers supported by KMM - QMap<QString, QString> map = m_map.driverMap(); - if (!list.contains(driverName)) { - KMessageBox::error (0, i18n("Qt SQL driver %1 is no longer installed on your system").arg(driverName), + TQMap<TQString, TQString> map = m_map.driverMap(); + if (!list.tqcontains(driverName)) { + KMessageBox::error (0, i18n("TQt SQL driver %1 is no longer installed on your system").tqarg(driverName), ""); setError(); - } else if (!map.contains(driverName)) { - KMessageBox::error (0, i18n("Qt SQL driver %1 is not suported").arg(driverName), + } else if (!map.tqcontains(driverName)) { + KMessageBox::error (0, i18n("TQt SQL driver %1 is not suported").tqarg(driverName), ""); setError(); } else { // fill in the fixed data from the URL - listDrivers->insertItem (QString(driverName + " - " + map[driverName])); + listDrivers->insertItem (TQString(driverName + " - " + map[driverName])); listDrivers->setSelected(0,true); - QString dbName = openURL.path().right(openURL.path().length() - 1); // remove separator slash + TQString dbName = openURL.path().right(openURL.path().length() - 1); // remove separator slash textDbName->setText (dbName); textHostName->setText (openURL.host()); textUserName->setText(openURL.user()); @@ -131,14 +131,14 @@ KSelectDatabaseDlg::KSelectDatabaseDlg(KURL openURL, QWidget *parent, const char textPassword->setFocus(); buttonSQL->setEnabled(false); // set password as required - m_requiredFields = new kMandatoryFieldGroup(this); + m_requiredFields = new kMandatoryFieldGroup(TQT_TQOBJECT(this)); m_requiredFields->add(textPassword); m_requiredFields->setOkButton(buttonOK); - connect (buttonOK, SIGNAL(clicked()), this, SLOT(accept())); + connect (buttonOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); checkPreLoad->setChecked(false); } - connect (buttonHelp, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect (buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); } @@ -158,20 +158,20 @@ const KURL KSelectDatabaseDlg::selectedURL() { url.setPass(textPassword->text()); url.setHost(textHostName->text()); url.setPath("/" + textDbName->text()); - QString qs = QString("driver=%1") - .arg(listDrivers->currentText().section (' ', 0, 0)); + TQString qs = TQString("driver=%1") + .tqarg(listDrivers->currentText().section (' ', 0, 0)); if (checkPreLoad->isChecked()) qs.append("&options=loadAll"); if (!textPassword->text().isEmpty()) qs.append("&secure=yes"); url.setQuery(qs); return (url); } -void KSelectDatabaseDlg::slotDriverSelected (QListBoxItem *driver) { +void KSelectDatabaseDlg::slotDriverSelected (TQListBoxItem *driver) { databaseTypeE dbType = m_map.driverToType(driver->text().section(' ', 0, 0)); if (!m_map.isTested(dbType)) { int rc = KMessageBox::warningContinueCancel (0, - i18n("Qt SQL driver %1 has not been fully tested in a KMyMoney environment. Please make sure you have adequate backups of your data. Please report any problems to the developer mailing list at kmymoney2-developer@lists.sourceforge.net") - .arg(driver->text()), + i18n("TQt SQL driver %1 has not been fully tested in a KMyMoney environment. Please make sure you have adequate backups of your data. Please report any problems to the developer mailing list at kmymoney2-developer@lists.sourceforge.net") + .tqarg(driver->text()), ""); if (rc == KMessageBox::Cancel) { listDrivers->clearSelection(); @@ -180,12 +180,12 @@ void KSelectDatabaseDlg::slotDriverSelected (QListBoxItem *driver) { } if (dbType == Sqlite3){ - QString dbName = QFileDialog::getOpenFileName( + TQString dbName = TQFileDialog::getOpenFileName( "", - i18n("SQLite files (*.sql);; All files (*.*)"), + i18n("STQLite files (*.sql);; All files (*.*)"), this, "", - i18n("Select SQLite file")); + i18n("Select STQLite file")); if (dbName.isNull()) { listDrivers->setSelected(driver, false); return; @@ -204,16 +204,16 @@ void KSelectDatabaseDlg::slotDriverSelected (QListBoxItem *driver) { } void KSelectDatabaseDlg::slotGenerateSQL () { - QString fileName = QFileDialog::getSaveFileName( + TQString fileName = TQFileDialog::getSaveFileName( "", i18n("All files (*.*)"), this, "", i18n("Select output file")); if (fileName == "") return; - QFile out(fileName); + TQFile out(fileName); if (!out.open(IO_WriteOnly)) return; - QTextStream s(&out); + TQTextStream s(&out); MyMoneyDbDef db; s << db.generateSQL(listDrivers->currentText().section (' ', 0, 0)); out.close(); diff --git a/kmymoney2/dialogs/kselectdatabasedlg.h b/kmymoney2/dialogs/kselectdatabasedlg.h index bc5a782..28c44d8 100644 --- a/kmymoney2/dialogs/kselectdatabasedlg.h +++ b/kmymoney2/dialogs/kselectdatabasedlg.h @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlistbox.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -37,9 +37,10 @@ class KSelectDatabaseDlg : public KSelectDatabaseDlgDecl { Q_OBJECT + TQ_OBJECT public: - KSelectDatabaseDlg(QWidget *parent = 0, const char *name = 0); - KSelectDatabaseDlg(KURL openURL, QWidget *parent = 0, const char *name = 0); + KSelectDatabaseDlg(TQWidget *tqparent = 0, const char *name = 0); + KSelectDatabaseDlg(KURL openURL, TQWidget *tqparent = 0, const char *name = 0); ~KSelectDatabaseDlg(); /** Set the mode of this dialog * @param - openMode (IO_ReadWrite = open database; IO_WriteOnly = saveas database) @@ -51,7 +52,7 @@ public: const KURL selectedURL(); public slots: - void slotDriverSelected(QListBoxItem *driver); + void slotDriverSelected(TQListBoxItem *driver); void slotHelp(); void slotGenerateSQL(); private: diff --git a/kmymoney2/dialogs/kselectdatabasedlgdecl.ui b/kmymoney2/dialogs/kselectdatabasedlgdecl.ui index 4736fb7..20a8dd0 100644 --- a/kmymoney2/dialogs/kselectdatabasedlgdecl.ui +++ b/kmymoney2/dialogs/kselectdatabasedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSelectDatabaseDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSelectDatabaseDlgDecl</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -50,7 +50,7 @@ As always, please make sure you have adequate backups of your data.</font> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -61,14 +61,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <property name="name"> <cstring>listDrivers</cstring> </property> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -79,14 +79,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>textDbName</cstring> </property> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -97,14 +97,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>textHostName</cstring> </property> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -115,14 +115,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>textUserName</cstring> </property> </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBoxPassword</cstring> </property> @@ -133,7 +133,7 @@ As always, please make sure you have adequate backups of your data.</font> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>textPassword</cstring> </property> @@ -143,7 +143,7 @@ As always, please make sure you have adequate backups of your data.</font> </widget> </vbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkPreLoad</cstring> </property> @@ -151,15 +151,15 @@ As always, please make sure you have adequate backups of your data.</font> <string>Preload &all data</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonHelp</cstring> </property> @@ -177,14 +177,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonSQL</cstring> </property> @@ -202,14 +202,14 @@ As always, please make sure you have adequate backups of your data.</font> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonOK</cstring> </property> @@ -220,7 +220,7 @@ As always, please make sure you have adequate backups of your data.</font> <bool>true</bool> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -246,5 +246,5 @@ As always, please make sure you have adequate backups of your data.</font> <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kselecttransactionsdlg.cpp b/kmymoney2/dialogs/kselecttransactionsdlg.cpp index 7a87dc8..1b21089 100644 --- a/kmymoney2/dialogs/kselecttransactionsdlg.cpp +++ b/kmymoney2/dialogs/kselecttransactionsdlg.cpp @@ -36,8 +36,8 @@ #include "kmergetransactionsdlg.h" -KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, QWidget* parent, const char* name) : - KSelectTransactionsDlgDecl(parent, name), +KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, TQWidget* tqparent, const char* name) : + KSelectTransactionsDlgDecl(tqparent, name), m_account(_account) { // setup descriptive texts @@ -48,11 +48,11 @@ KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, Q m_register->clear(); // no selection possible - m_register->setSelectionMode(QTable::Single); + m_register->setSelectionMode(TQTable::Single); // setup header font - QFont font = KMyMoneyGlobalSettings::listHeaderFont(); - QFontMetrics fm( font ); + TQFont font = KMyMoneyGlobalSettings::listHeaderFont(); + TQFontMetrics fm( font ); int height = fm.lineSpacing()+6; m_register->horizontalHeader()->setMinimumHeight(height); m_register->horizontalHeader()->setMaximumHeight(height); @@ -76,10 +76,10 @@ KSelectTransactionsDlg::KSelectTransactionsDlg(const MyMoneyAccount& _account, Q // catch some events from the register m_register->installEventFilter(this); - connect(m_register, SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotEnableOk(const KMyMoneyRegister::SelectedTransactions&))); - connect(m_register, SIGNAL(editTransaction()), this, SLOT(accept())); + connect(m_register, TQT_SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotEnableOk(const KMyMoneyRegister::SelectedTransactions&))); + connect(m_register, TQT_SIGNAL(editTransaction()), this, TQT_SLOT(accept())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); } void KSelectTransactionsDlg::slotEnableOk(const KMyMoneyRegister::SelectedTransactions& list) @@ -89,7 +89,7 @@ void KSelectTransactionsDlg::slotEnableOk(const KMyMoneyRegister::SelectedTransa void KSelectTransactionsDlg::addTransaction(const MyMoneyTransaction& t) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { KMyMoneyRegister::Transaction* tr = KMyMoneyRegister::Register::transactionFactory(m_register, t, (*it_s), 0); @@ -121,7 +121,7 @@ void KSelectTransactionsDlg::show(void) m_register->resize(KMyMoneyRegister::DetailColumn); } -void KSelectTransactionsDlg::resizeEvent(QResizeEvent* ev) +void KSelectTransactionsDlg::resizeEvent(TQResizeEvent* ev) { // don't forget the resizer KSelectTransactionsDlgDecl::resizeEvent(ev); @@ -134,7 +134,7 @@ MyMoneyTransaction KSelectTransactionsDlg::transaction(void) const { MyMoneyTransaction t; - QValueList<KMyMoneyRegister::RegisterItem*> list; + TQValueList<KMyMoneyRegister::RegisterItem*> list; list = m_register->selectedItems(); if(list.count()) { KMyMoneyRegister::Transaction* _t = dynamic_cast<KMyMoneyRegister::Transaction*>(list[0]); @@ -144,19 +144,19 @@ MyMoneyTransaction KSelectTransactionsDlg::transaction(void) const return t; } -bool KSelectTransactionsDlg::eventFilter(QObject* o, QEvent* e) +bool KSelectTransactionsDlg::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; - QKeyEvent* k; + TQKeyEvent* k; - if(o == m_register) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) { switch(e->type()) { - case QEvent::KeyPress: - k = dynamic_cast<QKeyEvent*>(e); - if((k->state() & Qt::KeyButtonMask) == 0) { + case TQEvent::KeyPress: + k = dynamic_cast<TQKeyEvent*>(e); + if((k->state() & TQt::KeyButtonMask) == 0) { switch(k->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: if(buttonOk->isEnabled()) { accept(); rc = true; diff --git a/kmymoney2/dialogs/kselecttransactionsdlg.h b/kmymoney2/dialogs/kselecttransactionsdlg.h index 7bab9eb..8a2e73b 100644 --- a/kmymoney2/dialogs/kselecttransactionsdlg.h +++ b/kmymoney2/dialogs/kselecttransactionsdlg.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QResizeEvent; +class TQResizeEvent; // ---------------------------------------------------------------------------- // KDE Includes @@ -39,8 +39,9 @@ class QResizeEvent; class KSelectTransactionsDlg: public KSelectTransactionsDlgDecl { Q_OBJECT + TQ_OBJECT public: - KSelectTransactionsDlg(const MyMoneyAccount& account, QWidget* parent = 0, const char* name = 0); + KSelectTransactionsDlg(const MyMoneyAccount& account, TQWidget* tqparent = 0, const char* name = 0); /** * Adds the transaction @a t to the dialog @@ -51,7 +52,7 @@ public: MyMoneyTransaction transaction(void) const; - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); public slots: virtual void slotHelp(); @@ -60,7 +61,7 @@ protected slots: void slotEnableOk(const KMyMoneyRegister::SelectedTransactions& list); protected: - void resizeEvent(QResizeEvent* ev); + void resizeEvent(TQResizeEvent* ev); private: /** diff --git a/kmymoney2/dialogs/kselecttransactionsdlgdecl.ui b/kmymoney2/dialogs/kselecttransactionsdlgdecl.ui index 76d825b..a8efa2c 100644 --- a/kmymoney2/dialogs/kselecttransactionsdlgdecl.ui +++ b/kmymoney2/dialogs/kselecttransactionsdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSelectTransactionsDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSelectTransactionsDlgDecl</cstring> </property> @@ -97,9 +97,9 @@ <number>12</number> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -123,7 +123,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>430</width> <height>20</height> @@ -170,5 +170,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/ksortoptiondlg.ui b/kmymoney2/dialogs/ksortoptiondlg.ui index e5606ae..6ffb91a 100644 --- a/kmymoney2/dialogs/ksortoptiondlg.ui +++ b/kmymoney2/dialogs/ksortoptiondlg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSortOptionDlg</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSortOptionDlg</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useDefault</cstring> </property> @@ -35,9 +35,9 @@ <cstring>m_sortOption</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -61,7 +61,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>237</width> <height>20</height> @@ -117,13 +117,16 @@ <includes> <include location="local" impldecl="in implementation">ksortoptiondlg.ui.h</include> </includes> -<slots> - <slot>setSortOption( const QString & option, const QString & def )</slot> -</slots> +<Q_SLOTS> + <slot>setSortOption( const TQString & option, const TQString & def )</slot> +</Q_SLOTS> <functions> <function access="private" specifier="non virtual">init()</function> - <function returnType="QString">sortOption( void ) const</function> + <function returnType="TQString">sortOption( void ) const</function> <function>hideDefaultButton( void )</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/transactionsortoption.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/ksortoptiondlg.ui.h b/kmymoney2/dialogs/ksortoptiondlg.ui.h index 62c26b7..322c147 100644 --- a/kmymoney2/dialogs/ksortoptiondlg.ui.h +++ b/kmymoney2/dialogs/ksortoptiondlg.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -26,7 +26,7 @@ void KSortOptionDlg::init() m_helpButton->setGuiItem(KStdGuiItem::help()); } -void KSortOptionDlg::setSortOption(const QString& option, const QString& def) +void KSortOptionDlg::setSortOption(const TQString& option, const TQString& def) { if(option.isEmpty()) { m_sortOption->setSettings(def); @@ -37,9 +37,9 @@ void KSortOptionDlg::setSortOption(const QString& option, const QString& def) } } -QString KSortOptionDlg::sortOption(void) const +TQString KSortOptionDlg::sortOption(void) const { - QString rc; + TQString rc; if(!m_useDefault->isChecked()) { rc = m_sortOption->settings(); } diff --git a/kmymoney2/dialogs/ksplitcorrectiondlg.ui b/kmymoney2/dialogs/ksplitcorrectiondlg.ui index f5d9757..e37789e 100644 --- a/kmymoney2/dialogs/ksplitcorrectiondlg.ui +++ b/kmymoney2/dialogs/ksplitcorrectiondlg.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSplitCorrectionDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSplitCorrectionDlgDecl</cstring> </property> @@ -12,7 +12,7 @@ <height>292</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>80</width> <height>0</height> @@ -31,9 +31,9 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -50,7 +50,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>question</cstring> </property> @@ -61,7 +61,7 @@ <string>How do you want to proceed?</string> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup</cstring> </property> @@ -81,7 +81,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>continueBtn</cstring> </property> @@ -92,7 +92,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>changeBtn</cstring> </property> @@ -100,7 +100,7 @@ <string>Change total amount of transaction to %1.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>distributeBtn</cstring> </property> @@ -111,7 +111,7 @@ <string>Distribute difference of %1 among all splits.</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>leaveBtn</cstring> </property> @@ -133,7 +133,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -154,9 +154,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -172,7 +172,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -191,7 +191,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>80</width> <height>0</height> @@ -213,7 +213,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>80</width> <height>0</height> @@ -241,5 +241,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/ksplittransactiondlg.cpp b/kmymoney2/dialogs/ksplittransactiondlg.cpp index a197b4c..9236bea 100644 --- a/kmymoney2/dialogs/ksplittransactiondlg.cpp +++ b/kmymoney2/dialogs/ksplittransactiondlg.cpp @@ -23,14 +23,14 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qlabel.h> -#include <qtable.h> -#include <qtimer.h> -#include <qptrlist.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qcursor.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqtable.h> +#include <tqtimer.h> +#include <tqptrlist.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqcursor.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,9 +61,9 @@ KSplitTransactionDlg::KSplitTransactionDlg(const MyMoneyTransaction& t, const bool amountValid, const bool deposit, const MyMoneyMoney& calculatedValue, - const QMap<QString, MyMoneyMoney>& priceInfo, - QWidget* parent, const char* name) : - KSplitTransactionDlgDecl(parent, name, true), + const TQMap<TQString, MyMoneyMoney>& priceInfo, + TQWidget* tqparent, const char* name) : + KSplitTransactionDlgDecl(tqparent, name, true), m_account(acc), m_split(s), m_precision(2), @@ -75,14 +75,14 @@ KSplitTransactionDlg::KSplitTransactionDlg(const MyMoneyTransaction& t, KIconLoader *il = KGlobal::iconLoader(); KGuiItem clearButtenItem( i18n( "Clear &All" ), - QIconSet(il->loadIcon("edittrash", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("edittrash", KIcon::Small, KIcon::SizeSmall)), i18n("Clear all splits"), i18n("Use this to clear all splits of this transaction")); clearAllBtn->setGuiItem(clearButtenItem); KGuiItem mergeButtenItem( i18n( "&Merge" ), - QIconSet(il->loadIcon("math_sum", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("math_sum", KIcon::Small, KIcon::SizeSmall)), "", ""); mergeBtn->setGuiItem(mergeButtenItem); @@ -90,24 +90,24 @@ KSplitTransactionDlg::KSplitTransactionDlg(const MyMoneyTransaction& t, finishBtn->setDefault(true); // setup the focus - cancelBtn->setFocusPolicy(QWidget::NoFocus); - finishBtn->setFocusPolicy(QWidget::NoFocus); - clearAllBtn->setFocusPolicy(QWidget::NoFocus); + cancelBtn->setFocusPolicy(TQ_NoFocus); + finishBtn->setFocusPolicy(TQ_NoFocus); + clearAllBtn->setFocusPolicy(TQ_NoFocus); // connect signals with slots - connect(transactionsTable, SIGNAL(transactionChanged(const MyMoneyTransaction&)), - this, SLOT(slotSetTransaction(const MyMoneyTransaction&))); - connect(transactionsTable, SIGNAL(createCategory(const QString&, QString&)), this, SLOT(slotCreateCategory(const QString&, QString&))); - connect(transactionsTable, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); + connect(transactionsTable, TQT_SIGNAL(transactionChanged(const MyMoneyTransaction&)), + this, TQT_SLOT(slotSetTransaction(const MyMoneyTransaction&))); + connect(transactionsTable, TQT_SIGNAL(createCategory(const TQString&, TQString&)), this, TQT_SLOT(slotCreateCategory(const TQString&, TQString&))); + connect(transactionsTable, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); - connect(transactionsTable, SIGNAL(returnPressed()), this, SLOT(accept())); - connect(transactionsTable, SIGNAL(escapePressed()), this, SLOT(reject())); + connect(transactionsTable, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(accept())); + connect(transactionsTable, TQT_SIGNAL(escapePressed()), this, TQT_SLOT(reject())); - connect(cancelBtn, SIGNAL(clicked()), this, SLOT(reject())); - connect(finishBtn, SIGNAL(clicked()), this, SLOT(accept())); - connect(clearAllBtn, SIGNAL(clicked()), this, SLOT(slotClearAllSplits())); - connect(mergeBtn, SIGNAL(clicked()), this, SLOT(slotMergeSplits())); - connect(clearZeroBtn, SIGNAL(clicked()), this, SLOT(slotClearUnusedSplits())); + connect(cancelBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(finishBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(clearAllBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearAllSplits())); + connect(mergeBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMergeSplits())); + connect(clearZeroBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearUnusedSplits())); // setup the precision try { @@ -122,11 +122,11 @@ KSplitTransactionDlg::KSplitTransactionDlg(const MyMoneyTransaction& t, // pass on those vars transactionsTable->setup(priceInfo); - QSize size(width(), height()); + TQSize size(width(), height()); kapp->config()->setGroup("SplitTransactionEditor"); size = kapp->config()->readSizeEntry("Geometry", &size); size.setHeight(size.height()-1); - QDialog::resize( size.expandedTo(minimumSizeHint()) ); + TQDialog::resize( size.expandedTo(tqminimumSizeHint()) ); // Trick: it seems, that the initial sizing of the dialog does // not work correctly. At least, the columns do not get displayed @@ -134,7 +134,7 @@ KSplitTransactionDlg::KSplitTransactionDlg(const MyMoneyTransaction& t, // is incorrect. If the widget is visible, resizing works correctly. // So, we let the dialog show up and resize it then. It's not really // clean, but the only way I got the damned thing working. - QTimer::singleShot( 10, this, SLOT(initSize()) ); + TQTimer::singleShot( 10, this, TQT_SLOT(initSize()) ); } KSplitTransactionDlg::~KSplitTransactionDlg() @@ -166,7 +166,7 @@ int KSplitTransactionDlg::exec(void) rc = KSplitTransactionDlgDecl::exec(); - if(rc == QDialog::Accepted) { + if(rc == TQDialog::Accepted) { if(!diffAmount().isZero()) { KSplitCorrectionDlgDecl* corrDlg = new KSplitCorrectionDlgDecl(this, 0, true); @@ -175,23 +175,23 @@ int KSplitTransactionDlg::exec(void) corrDlg->cancelBtn->setGuiItem(KStdGuiItem::cancel()); MyMoneySplit split = m_transaction.splits()[0]; - QString total = (-split.value()).formatMoney("", m_precision); - QString sums = splitsValue().formatMoney("", m_precision); - QString diff = diffAmount().formatMoney("", m_precision); + TQString total = (-split.value()).formatMoney("", m_precision); + TQString sums = splitsValue().formatMoney("", m_precision); + TQString diff = diffAmount().formatMoney("", m_precision); // now modify the text items of the dialog to contain the correct values - QString q = i18n("The total amount of this transaction is %1 while " + TQString q = i18n("The total amount of this transaction is %1 while " "the sum of the splits is %2. The remaining %3 are " "unassigned.") - .arg(total) - .arg(sums) - .arg(diff); + .tqarg(total) + .tqarg(sums) + .tqarg(diff); corrDlg->explanation->setText(q); - q = i18n("Change &total amount of transaction to %1.").arg(sums); + q = i18n("Change &total amount of transaction to %1.").tqarg(sums); corrDlg->changeBtn->setText(q); - q = i18n("&Distribute difference of %1 among all splits.").arg(diff); + q = i18n("&Distribute difference of %1 among all splits.").tqarg(diff); corrDlg->distributeBtn->setText(q); // FIXME remove the following line once distribution among // all splits is implemented @@ -200,18 +200,18 @@ int KSplitTransactionDlg::exec(void) // if we have only two splits left, we don't allow leaving sth. unassigned. if(m_transaction.splitCount() < 3) { - q = i18n("&Leave total amount of transaction at %1.").arg(total); + q = i18n("&Leave total amount of transaction at %1.").tqarg(total); } else { - q = i18n("&Leave %1 unassigned.").arg(diff); + q = i18n("&Leave %1 unassigned.").tqarg(diff); } corrDlg->leaveBtn->setText(q); - if((rc = corrDlg->exec()) == QDialog::Accepted) { - QButton* button = corrDlg->buttonGroup->selected(); + if((rc = corrDlg->exec()) == TQDialog::Accepted) { + TQButton* button = corrDlg->buttonGroup->selected(); if(button != 0) { switch(corrDlg->buttonGroup->id(button)) { case 0: // continue to edit - rc = QDialog::Rejected; + rc = TQDialog::Rejected; break; case 1: // modify total @@ -234,7 +234,7 @@ int KSplitTransactionDlg::exec(void) } else break; - } while(rc != QDialog::Accepted); + } while(rc != TQDialog::Accepted); // for deposits, we inverted the sign of all splits. // now we revert it back, so that things are left correct @@ -252,7 +252,7 @@ int KSplitTransactionDlg::exec(void) void KSplitTransactionDlg::initSize(void) { - QDialog::resize(width(), height()+1); + TQDialog::resize(width(), height()+1); } void KSplitTransactionDlg::accept() @@ -281,8 +281,8 @@ void KSplitTransactionDlg::slotClearAllSplits(void) if(answer == KMessageBox::Continue) { transactionsTable->slotCancelEdit(); - QValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); + TQValueList<MyMoneySplit>::ConstIterator it; // clear all but the one referencing the account for(it = list.begin(); it != list.end(); ++it) { @@ -298,8 +298,8 @@ void KSplitTransactionDlg::slotClearUnusedSplits(void) { transactionsTable->slotEndEdit(); - QValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); + TQValueList<MyMoneySplit>::ConstIterator it; try { // remove all splits that don't have a value assigned @@ -320,14 +320,14 @@ void KSplitTransactionDlg::slotMergeSplits(void) { transactionsTable->slotEndEdit(); - QValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); + TQValueList<MyMoneySplit>::ConstIterator it; try { // collect all splits, merge them if needed and remove from transaction - QValueList<MyMoneySplit> splits; + TQValueList<MyMoneySplit> splits; for(it = list.begin(); it != list.end(); ++it) { - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { if((*it_s).accountId() == (*it).accountId() && (*it_s).memo().isEmpty() && (*it).memo().isEmpty()) @@ -343,7 +343,7 @@ void KSplitTransactionDlg::slotMergeSplits(void) } // now add them back to the transaction - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { (*it_s).clearId(); m_transaction.addSplit(*it_s); @@ -361,18 +361,18 @@ void KSplitTransactionDlg::slotSetTransaction(const MyMoneyTransaction& t) transactionsTable->slotCancelEdit(); m_transaction = t; - QValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); + TQValueList<MyMoneySplit>::ConstIterator it; // check if we can merge splits or not, have zero splits or not - QMap<QString, int> splits; + TQMap<TQString, int> splits; bool haveZeroSplit = false; for(it = list.begin(); it != list.end(); ++it) { splits[(*it).accountId()]++; if(((*it).id() != m_split.id()) && ((*it).shares().isZero())) haveZeroSplit = true; } - QMap<QString, int>::const_iterator it_s; + TQMap<TQString, int>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { if((*it_s) > 1) break; @@ -400,8 +400,8 @@ void KSplitTransactionDlg::updateSums(void) MyMoneyMoney KSplitTransactionDlg::splitsValue(void) { MyMoneyMoney splitsValue(m_calculatedValue); - QValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> list = transactionsTable->getSplits(m_transaction); + TQValueList<MyMoneySplit>::ConstIterator it; // calculate the current sum of all split parts for(it = list.begin(); it != list.end(); ++it) { @@ -426,21 +426,21 @@ MyMoneyMoney KSplitTransactionDlg::diffAmount(void) return diff; } -void KSplitTransactionDlg::slotCreateCategory(const QString& name, QString& id) +void KSplitTransactionDlg::slotCreateCategory(const TQString& name, TQString& id) { - MyMoneyAccount acc, parent; + MyMoneyAccount acc, tqparent; acc.setName(name); if(m_isDeposit) - parent = MyMoneyFile::instance()->income(); + tqparent = MyMoneyFile::instance()->income(); else - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); // TODO extract possible first part of a hierarchy and check if it is one - // of our top categories. If so, remove it and select the parent + // of our top categories. If so, remove it and select the tqparent // according to this information. - emit createCategory(acc, parent); + emit createCategory(acc, tqparent); // return id id = acc.id(); diff --git a/kmymoney2/dialogs/ksplittransactiondlg.h b/kmymoney2/dialogs/ksplittransactiondlg.h index 67a5b92..76261bd 100644 --- a/kmymoney2/dialogs/ksplittransactiondlg.h +++ b/kmymoney2/dialogs/ksplittransactiondlg.h @@ -51,6 +51,7 @@ class kMyMoneyLineEdit; class KSplitTransactionDlg : public KSplitTransactionDlgDecl { Q_OBJECT + TQ_OBJECT public: KSplitTransactionDlg(const MyMoneyTransaction& t, @@ -59,8 +60,8 @@ public: const bool amountValid, const bool deposit, const MyMoneyMoney& calculatedValue, - const QMap<QString, MyMoneyMoney>& priceInfo, - QWidget* parent = 0, const char* name = 0); + const TQMap<TQString, MyMoneyMoney>& priceInfo, + TQWidget* tqparent = 0, const char* name = 0); virtual ~KSplitTransactionDlg(); @@ -106,7 +107,7 @@ protected slots: void slotClearAllSplits(void); void slotClearUnusedSplits(void); void slotSetTransaction(const MyMoneyTransaction& t); - void slotCreateCategory(const QString& txt, QString& id); + void slotCreateCategory(const TQString& txt, TQString& id); void slotMergeSplits(void); /// used internally to setup the initial size of all widgets @@ -115,13 +116,13 @@ protected slots: signals: /** * This signal is sent out, when a new category needs to be created - * Depending on the setting of either a payment or deposit, the parent + * Depending on the setting of either a payment or deposit, the tqparent * account will be preset to Expense or Income. * * @param account reference to account info. Will be filled by called slot - * @param parent reference to parent account + * @param tqparent reference to tqparent account */ - void createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent); + void createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent); /** * Signal is emitted, if any of the widgets enters (@a state equals @a true) diff --git a/kmymoney2/dialogs/ksplittransactiondlgdecl.ui b/kmymoney2/dialogs/ksplittransactiondlgdecl.ui index 72a19e3..2d2f231 100644 --- a/kmymoney2/dialogs/ksplittransactiondlgdecl.ui +++ b/kmymoney2/dialogs/ksplittransactiondlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSplitTransactionDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KSplitTransactionDlgDecl</cstring> </property> @@ -28,7 +28,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout61</cstring> </property> @@ -58,7 +58,7 @@ <cursor>0</cursor> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_sumFrame</cstring> </property> @@ -88,18 +88,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>16</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout49</cstring> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>80</height> @@ -115,7 +115,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>splitUnassigned</cstring> </property> @@ -127,7 +127,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>120</width> <height>15</height> @@ -136,13 +136,13 @@ <property name="text"> <string><b>11,00<b></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>transactionAmount</cstring> </property> @@ -154,7 +154,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>120</width> <height>15</height> @@ -163,13 +163,13 @@ <property name="text"> <string><b>111,00<b></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> @@ -181,13 +181,13 @@ <property name="text"> <string>Unassigned</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -199,13 +199,13 @@ <property name="text"> <string>Sum of splits</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>splitSum</cstring> </property> @@ -217,7 +217,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>120</width> <height>15</height> @@ -226,17 +226,17 @@ <property name="text"> <string>100,00</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel1_2_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -250,7 +250,7 @@ <property name="text"> <string>Transaction amount</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -272,7 +272,7 @@ </widget> </grid> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>Frame3</cstring> </property> @@ -284,13 +284,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>15</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>80</height> @@ -307,9 +307,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -364,7 +364,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>120</height> @@ -420,5 +420,5 @@ <data format="PNG" length="256">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000000c749444154388dad55db1184200c4c180bb81a28c73aad811228c356f42b3792db3cc0db2fc724bb7901dc7b270f27ed17fa5fa9b117b7cd90211f4ba0ac906a7f1453b4d30ca917bb590681552af23f69bfc4ffa71519d2c8f62546ea5ea03738b1c18c33a4d156f0d13f43b61952e4af6d6e8fb3a408f080448419a433d6486d85052fdba892a295f5d45785cd8c51a9d6de6a814a8d2131da51f98e7a3b64ec9da04a8db53d43be3c3c0b22cacf17e4cdb5a931649ceddf34b190cf0aa019f03f1fd3e7457f03b5a66c9ed26e86130000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/kstartdlg.cpp b/kmymoney2/dialogs/kstartdlg.cpp index d0af8eb..afdef28 100644 --- a/kmymoney2/dialogs/kstartdlg.cpp +++ b/kmymoney2/dialogs/kstartdlg.cpp @@ -18,24 +18,20 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvbox.h> -#include <qlayout.h> -#include <qbuttongroup.h> -#include <qabstractlayout.h> -#include <qpixmap.h> -#include <qtextview.h> -#include <qlabel.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqbuttongroup.h> +#include <tqabstractlayout.h> +#include <tqpixmap.h> +#include <tqtextview.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes #include "kdecompat.h" -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif #include <kiconloader.h> #include <kconfig.h> @@ -54,9 +50,9 @@ #include "krecentfileitem.h" #include "../kmymoney2.h" -#include <qtooltip.h> +#include <tqtooltip.h> -KStartDlg::KStartDlg(QWidget *parent, const char *name, bool modal) : KDialogBase(IconList,i18n("Start Dialog"),Help|Ok|Cancel,Ok, parent, name, modal, true) +KStartDlg::KStartDlg(TQWidget *tqparent, const char *name, bool modal) : KDialogBase(IconList,i18n("Start Dialog"),Help|Ok|Cancel,Ok, tqparent, name, modal, true) { setPage_Template(); setPage_Documents(); @@ -77,41 +73,41 @@ void KStartDlg::setPage_Template() KIconLoader *ic = KGlobal::iconLoader(); templateMainFrame = addVBoxPage( i18n("Templates"), i18n("Select templates"), DesktopIcon("wizard")); view_wizard = new KIconView( templateMainFrame, "view_options" ); - (void)new QIconViewItem( view_wizard, i18n("New KMyMoney document"), ic->loadIcon("mime_empty.png", KIcon::Desktop, KIcon::SizeLarge)/*QPixmap( locate("icon","hicolor/48x48/mimetypes/mime_empty.png") )*/ ); - connect(view_wizard, SIGNAL(executed(QIconViewItem *) ), this, SLOT(slotTemplateClicked(QIconViewItem *) ) ); - connect(view_wizard, SIGNAL(selectionChanged(QIconViewItem*)), - this, SLOT(slotTemplateSelectionChanged(QIconViewItem*))); - connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotAboutToShowPage(QWidget*))); + (void)new TQIconViewItem( view_wizard, i18n("New KMyMoney document"), ic->loadIcon("mime_empty.png", KIcon::Desktop, KIcon::SizeLarge)/*TQPixmap( locate("icon","hicolor/48x48/mimetypes/mime_empty.png") )*/ ); + connect(view_wizard, TQT_SIGNAL(executed(TQIconViewItem *) ), this, TQT_SLOT(slotTemplateClicked(TQIconViewItem *) ) ); + connect(view_wizard, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), + this, TQT_SLOT(slotTemplateSelectionChanged(TQIconViewItem*))); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotAboutToShowPage(TQWidget*))); } /** Set the Misc options Page of the preferences dialog */ void KStartDlg::setPage_Documents() { recentMainFrame = addPage( i18n("Open"), i18n("Open a KMyMoney document"), DesktopIcon("fileopen")); - QVBoxLayout *mainLayout = new QVBoxLayout( recentMainFrame ); + TQVBoxLayout *mainLayout = new TQVBoxLayout( recentMainFrame ); kurlrequest = new KURLRequester( recentMainFrame, "kurlrequest" ); //allow user to select either a .kmy file, or any generic file. - kurlrequest->fileDialog()->setFilter( i18n("%1|KMyMoney files (*.kmy)\n" "%2|All files (*.*)").arg("*.kmy").arg("*.*") ); + kurlrequest->fileDialog()->setFilter( i18n("%1|KMyMoney files (*.kmy)\n" "%2|All files (*.*)").tqarg("*.kmy").tqarg("*.*") ); kurlrequest->fileDialog()->setMode(KFile::File || KFile::ExistingOnly); kurlrequest->fileDialog()->setURL(KURL(kmymoney2->readLastUsedDir()));//kurlrequest->fileDialog()->setURL(KURL(KGlobalSettings::documentPath())); mainLayout->addWidget( kurlrequest ); - QLabel *label1 = new QLabel( recentMainFrame, "label1" ); + TQLabel *label1 = new TQLabel( recentMainFrame, "label1" ); label1->setText( i18n("Recent Files") ); mainLayout->addWidget( label1 ); view_recent = new KIconView( recentMainFrame, "view_recent" ); - connect( view_recent, SIGNAL( executed(QIconViewItem *) ), this, SLOT( slotRecentClicked(QIconViewItem *) ) ); + connect( view_recent, TQT_SIGNAL( executed(TQIconViewItem *) ), this, TQT_SLOT( slotRecentClicked(TQIconViewItem *) ) ); mainLayout->addWidget( view_recent ); view_recent->setArrangement(KIconView::LeftToRight/*TopToBottom*/); view_recent->setItemTextPos(KIconView::Bottom); - connect(view_recent, SIGNAL(selectionChanged(QIconViewItem*)), - this, SLOT(slotRecentSelectionChanged(QIconViewItem*))); + connect(view_recent, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), + this, TQT_SLOT(slotRecentSelectionChanged(TQIconViewItem*))); } -void KStartDlg::slotTemplateClicked(QIconViewItem *item) +void KStartDlg::slotTemplateClicked(TQIconViewItem *item) { if(!item) return; @@ -129,7 +125,7 @@ void KStartDlg::slotTemplateClicked(QIconViewItem *item) /** Read config window */ void KStartDlg::readConfig() { - QString value; + TQString value; unsigned int i = 1; KConfig *config = KGlobal::config(); @@ -142,17 +138,17 @@ void KStartDlg::readConfig() // it does not make a difference, if you call setGroup() outside of // this loop. The first time it does make a difference! config->setGroup("Recent Files"); - value = config->readEntry( QString( "File%1" ).arg( i ), QString::null ); + value = config->readEntry( TQString( "File%1" ).tqarg( i ), TQString() ); if( !value.isNull() && fileExists(value) ) { - QString file_name = value.mid(value.findRev('/')+1); + TQString file_name = value.mid(value.tqfindRev('/')+1); (void)new KRecentFileItem( value, view_recent, file_name, il->loadIcon("kmy", KIcon::Desktop, KIcon::SizeLarge)); } i++; } while( !value.isNull() ); config->setGroup("Start Dialog"); - QSize *defaultSize = new QSize(400,300); + TQSize *defaultSize = new TQSize(400,300); this->resize( config->readSizeEntry("Geometry", defaultSize ) ); // Restore the last page viewed @@ -178,7 +174,7 @@ void KStartDlg::writeConfig() } /** slot to recent view */ -void KStartDlg::slotRecentClicked(QIconViewItem *item) +void KStartDlg::slotRecentClicked(TQIconViewItem *item) { KRecentFileItem *kitem = (KRecentFileItem*)item; if(!kitem) return; @@ -205,7 +201,7 @@ bool KStartDlg::fileExists(KURL url) #endif } -void KStartDlg::slotTemplateSelectionChanged(QIconViewItem* item) +void KStartDlg::slotTemplateSelectionChanged(TQIconViewItem* item) { if(!item) return; @@ -222,7 +218,7 @@ void KStartDlg::slotTemplateSelectionChanged(QIconViewItem* item) isopenfile = false; } -void KStartDlg::slotRecentSelectionChanged(QIconViewItem* item) +void KStartDlg::slotRecentSelectionChanged(TQIconViewItem* item) { KRecentFileItem *kitem = (KRecentFileItem*)item; if(!kitem) return; @@ -235,7 +231,7 @@ void KStartDlg::slotRecentSelectionChanged(QIconViewItem* item) kurlrequest->setURL( kitem->fileURL() ); } -void KStartDlg::slotAboutToShowPage(QWidget* page) +void KStartDlg::slotAboutToShowPage(TQWidget* page) { enableButtonOK(page == recentMainFrame); } diff --git a/kmymoney2/dialogs/kstartdlg.h b/kmymoney2/dialogs/kstartdlg.h index a09f72d..55d6955 100644 --- a/kmymoney2/dialogs/kstartdlg.h +++ b/kmymoney2/dialogs/kstartdlg.h @@ -27,27 +27,28 @@ #include <kurlrequester.h> #include <kiconview.h> -#include <qstring.h> -#include <qradiobutton.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqstring.h> +#include <tqradiobutton.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> /**KMyMoney 2 start dialog */ class KStartDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KStartDlg( QWidget *parent=0, const char *name=0, bool modal=true ); + KStartDlg( TQWidget *tqparent=0, const char *name=0, bool modal=true ); virtual ~KStartDlg(); bool isNewFile(void) const { return isnewfile; } bool isOpenFile(void) const { return !kurlrequest->url().isEmpty(); } - const QString getURL(void) const { return kurlrequest->url(); } - QString getTemplateName(void) const { return templatename; } + const TQString getURL(void) const { return kurlrequest->url(); } + TQString getTemplateName(void) const { return templatename; } private: // Private methods - QString m_filename; + TQString m_filename; bool fileExists(KURL url); void setPage_Template(); @@ -63,22 +64,22 @@ private: // Private methods /** misc variables */ bool isnewfile; bool isopenfile; - QString templatename; - QVBox *templateMainFrame; - QFrame *recentMainFrame; + TQString templatename; + TQVBox *templateMainFrame; + TQFrame *recentMainFrame; protected slots: /** No descriptions */ void slotOk(); private slots: - void slotTemplateClicked(QIconViewItem *item); + void slotTemplateClicked(TQIconViewItem *item); /** slot to recent view */ - void slotRecentClicked(QIconViewItem *item); + void slotRecentClicked(TQIconViewItem *item); /** Handle selections */ - void slotTemplateSelectionChanged(QIconViewItem* item); - void slotRecentSelectionChanged(QIconViewItem* item); - void slotAboutToShowPage(QWidget* page); + void slotTemplateSelectionChanged(TQIconViewItem* item); + void slotRecentSelectionChanged(TQIconViewItem* item); + void slotAboutToShowPage(TQWidget* page); }; #endif diff --git a/kmymoney2/dialogs/kupdatestockpricedlg.cpp b/kmymoney2/dialogs/kupdatestockpricedlg.cpp index 05eee8a..ef7bfab 100644 --- a/kmymoney2/dialogs/kupdatestockpricedlg.cpp +++ b/kmymoney2/dialogs/kupdatestockpricedlg.cpp @@ -34,10 +34,10 @@ #include "kupdatestockpricedlg.h" #include "../widgets/kmymoneycurrencyselector.h" -KUpdateStockPriceDlg::KUpdateStockPriceDlg(QWidget* parent, const char* name) : - kUpdateStockPriceDecl(parent, name, true) +KUpdateStockPriceDlg::KUpdateStockPriceDlg(TQWidget* tqparent, const char* name) : + kUpdateStockPriceDecl(tqparent, name, true) { - m_date->setDate(QDate::currentDate()); + m_date->setDate(TQDate::tqcurrentDate()); init(); } @@ -50,15 +50,15 @@ void KUpdateStockPriceDlg::init() m_okButton->setGuiItem(KStdGuiItem::ok()); m_cancelButton->setGuiItem(KStdGuiItem::cancel()); - connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept())); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); + connect(m_okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); - connect(m_security, SIGNAL(activated(int)), this, SLOT(slotCheckData())); - connect(m_currency, SIGNAL(activated(int)), this, SLOT(slotCheckData())); + connect(m_security, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotCheckData())); + connect(m_currency, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotCheckData())); // load initial values into the selection widgets - m_currency->update(QString()); - m_security->update(QString()); + m_currency->update(TQString()); + m_security->update(TQString()); slotCheckData(); } @@ -71,8 +71,8 @@ int KUpdateStockPriceDlg::exec(void) void KUpdateStockPriceDlg::slotCheckData(void) { - QString from = m_security->security().id(); - QString to = m_currency->security().id(); + TQString from = m_security->security().id(); + TQString to = m_currency->security().id(); m_okButton->setEnabled(!from.isEmpty() && !to.isEmpty() && from != to); } diff --git a/kmymoney2/dialogs/kupdatestockpricedlg.h b/kmymoney2/dialogs/kupdatestockpricedlg.h index c7dd407..ed75120 100644 --- a/kmymoney2/dialogs/kupdatestockpricedlg.h +++ b/kmymoney2/dialogs/kupdatestockpricedlg.h @@ -31,7 +31,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -55,12 +55,13 @@ class KUpdateStockPriceDlg : public kUpdateStockPriceDecl { Q_OBJECT + TQ_OBJECT public: - KUpdateStockPriceDlg(QWidget* parent = NULL, const char* name = NULL); + KUpdateStockPriceDlg(TQWidget* tqparent = NULL, const char* name = NULL); ~KUpdateStockPriceDlg(); - const QDate date() const { return m_date->date(); }; + const TQDate date() const { return m_date->date(); }; const MyMoneyMoney price(void) const; public slots: diff --git a/kmymoney2/dialogs/kupdatestockpricedlgdecl.ui b/kmymoney2/dialogs/kupdatestockpricedlgdecl.ui index d9770b2..1e41eaa 100644 --- a/kmymoney2/dialogs/kupdatestockpricedlgdecl.ui +++ b/kmymoney2/dialogs/kupdatestockpricedlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>kUpdateStockPriceDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>kUpdateStockPriceDecl</cstring> </property> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout38</cstring> + <cstring>tqlayout38</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout37</cstring> + <cstring>tqlayout37</cstring> </property> <hbox> <property name="name"> @@ -50,7 +50,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>21</height> @@ -59,9 +59,9 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="1"> + <widget class="TQLayoutWidget" row="1" column="1"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <hbox> <property name="name"> @@ -90,7 +90,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -99,7 +99,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -107,7 +107,7 @@ <string>Currency</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>lblDate</cstring> </property> @@ -115,7 +115,7 @@ <string>Date:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -123,9 +123,9 @@ <string>Security</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> @@ -154,7 +154,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -175,7 +175,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>40</height> @@ -196,9 +196,9 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -214,7 +214,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>21</height> @@ -253,5 +253,8 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> +</includes> </UI> diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp index cc43ced..cdb7a34 100644 --- a/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp +++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.cpp @@ -18,11 +18,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qcheckbox.h> -#include <qtabwidget.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqcheckbox.h> +#include <tqtabwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,8 +48,8 @@ #include "mymoneyqifprofileeditor.h" -MyMoneyQifProfileNameValidator::MyMoneyQifProfileNameValidator(QObject *o, const char *name) - : QValidator(o, name) +MyMoneyQifProfileNameValidator::MyMoneyQifProfileNameValidator(TQObject *o, const char *name) + : TQValidator(o, name) { } @@ -57,26 +57,26 @@ MyMoneyQifProfileNameValidator::~MyMoneyQifProfileNameValidator() { } -QValidator::State MyMoneyQifProfileNameValidator::validate(QString& name, int&) const +TQValidator::State MyMoneyQifProfileNameValidator::validate(TQString& name, int&) const { KConfig* config = KGlobal::config(); config->setGroup("Profiles"); - QStringList list = config->readListEntry("profiles"); + TQStringList list = config->readListEntry("profiles"); // invalid character? - if(name.contains(",") != 0) - return QValidator::Invalid; + if(name.tqcontains(",") != 0) + return TQValidator::Invalid; // would not work in this form (empty or existing name) - if(name.isEmpty() || list.contains(name)) - return QValidator::Intermediate; + if(name.isEmpty() || list.tqcontains(name)) + return TQValidator::Intermediate; // is OK - return QValidator::Acceptable; + return TQValidator::Acceptable; } -MyMoneyQifProfileEditor::MyMoneyQifProfileEditor(const bool edit, QWidget *parent, const char *name ) - : MyMoneyQifProfileEditorDecl(parent,name), +MyMoneyQifProfileEditor::MyMoneyQifProfileEditor(const bool edit, TQWidget *tqparent, const char *name ) + : MyMoneyQifProfileEditorDecl(tqparent,name), m_inEdit(edit), m_isDirty(false), m_isAccepted(false), @@ -92,42 +92,42 @@ MyMoneyQifProfileEditor::MyMoneyQifProfileEditor(const bool edit, QWidget *paren // load button icons KIconLoader* il = KGlobal::iconLoader(); KGuiItem newButtenItem( i18n( "&New" ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new profile"), - i18n("Use this to create a new QIF import/export profile")); + i18n("Use this to create a new TQIF import/export profile")); m_newButton->setGuiItem(newButtenItem); - connect(m_profileListBox, SIGNAL(highlighted(const QString&)), this, SLOT(slotLoadProfileFromConfig(const QString&))); - connect(m_resetButton, SIGNAL(clicked()), this, SLOT(slotReset())); - connect(m_okButton, SIGNAL(clicked()), this, SLOT(slotOk())); - connect(m_renameButton, SIGNAL(clicked()), this, SLOT(slotRename())); - connect(m_deleteButton, SIGNAL(clicked()), this, SLOT(slotDelete())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNew())); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(m_profileListBox, TQT_SIGNAL(highlighted(const TQString&)), this, TQT_SLOT(slotLoadProfileFromConfig(const TQString&))); + connect(m_resetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReset())); + connect(m_okButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotOk())); + connect(m_renameButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRename())); + connect(m_deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelete())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNew())); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); - connect(m_editDescription, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setProfileDescription(const QString&))); - connect(m_editType, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setProfileType(const QString&))); - connect(m_editOpeningBalance, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setOpeningBalanceText(const QString&))); - connect(m_editAccountDelimiter, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setAccountDelimiter(const QString&))); - connect(m_editVoidMark, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setVoidMark(const QString&))); + connect(m_editDescription, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setProfileDescription(const TQString&))); + connect(m_editType, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setProfileType(const TQString&))); + connect(m_editOpeningBalance, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setOpeningBalanceText(const TQString&))); + connect(m_editAccountDelimiter, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setAccountDelimiter(const TQString&))); + connect(m_editVoidMark, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setVoidMark(const TQString&))); - //connect(m_editDateFormat, SIGNAL(highlighted(const QString&)), &m_profile, SLOT(setDateFormat(const QString&))); - connect(m_editApostrophe, SIGNAL(highlighted(const QString&)), &m_profile, SLOT(setApostropheFormat(const QString&))); + //connect(m_editDateFormat, TQT_SIGNAL(highlighted(const TQString&)), &m_profile, TQT_SLOT(setDateFormat(const TQString&))); + connect(m_editApostrophe, TQT_SIGNAL(highlighted(const TQString&)), &m_profile, TQT_SLOT(setApostropheFormat(const TQString&))); - connect(m_editAmounts, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotAmountTypeSelected(QListViewItem*))); - connect(m_decimalBox, SIGNAL(activated(const QString&)), this, SLOT(slotDecimalChanged(const QString&))); - connect(m_thousandsBox, SIGNAL(activated(const QString&)), this, SLOT(slotThousandsChanged(const QString&))); + connect(m_editAmounts, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotAmountTypeSelected(TQListViewItem*))); + connect(m_decimalBox, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotDecimalChanged(const TQString&))); + connect(m_thousandsBox, TQT_SIGNAL(activated(const TQString&)), this, TQT_SLOT(slotThousandsChanged(const TQString&))); - connect(m_editInputFilterLocation, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setFilterScriptImport(const QString&))); - connect(m_editInputFilterLocation, SIGNAL(urlSelected(const QString&)), m_editInputFilterLocation, SLOT(setURL(const QString&))); + connect(m_editInputFilterLocation, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setFilterScriptImport(const TQString&))); + connect(m_editInputFilterLocation, TQT_SIGNAL(urlSelected(const TQString&)), m_editInputFilterLocation, TQT_SLOT(setURL(const TQString&))); - connect(m_editInputFilterFileType, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setFilterFileType(const QString&))); + connect(m_editInputFilterFileType, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setFilterFileType(const TQString&))); - connect(m_editOutputFilterLocation, SIGNAL(textChanged(const QString&)), &m_profile, SLOT(setFilterScriptExport(const QString&))); - connect(m_editOutputFilterLocation, SIGNAL(urlSelected(const QString&)), m_editOutputFilterLocation, SLOT(setURL(const QString&))); + connect(m_editOutputFilterLocation, TQT_SIGNAL(textChanged(const TQString&)), &m_profile, TQT_SLOT(setFilterScriptExport(const TQString&))); + connect(m_editOutputFilterLocation, TQT_SIGNAL(urlSelected(const TQString&)), m_editOutputFilterLocation, TQT_SLOT(setURL(const TQString&))); - connect(m_attemptMatch, SIGNAL(toggled(bool)), &m_profile, SLOT(setAttemptMatchDuplicates(bool))); + connect(m_attemptMatch, TQT_SIGNAL(toggled(bool)), &m_profile, TQT_SLOT(setAttemptMatchDuplicates(bool))); } MyMoneyQifProfileEditor::~MyMoneyQifProfileEditor() @@ -145,9 +145,9 @@ MyMoneyQifProfileEditor::~MyMoneyQifProfileEditor() void MyMoneyQifProfileEditor::loadWidgets(void) { if(m_inEdit) - setCaption(i18n("QIF Profile Editor")); + setCaption(i18n("TQIF Profile Editor")); else - setCaption(i18n("QIF Profile Selector")); + setCaption(i18n("TQIF Profile Selector")); m_editDateFormat->clear(); m_editDateFormat->insertItem( "%d/%m/%yy" ); @@ -175,12 +175,12 @@ void MyMoneyQifProfileEditor::loadWidgets(void) m_editApostrophe->insertItem( "1900-1999" ); m_editApostrophe->insertItem( "2000-2099" ); - m_editAmounts->setColumnAlignment(1, Qt::AlignCenter); - m_editAmounts->setColumnAlignment(2, Qt::AlignCenter); - m_editAmounts->setColumnAlignment(3, Qt::AlignCenter); + m_editAmounts->setColumnAlignment(1, TQt::AlignCenter); + m_editAmounts->setColumnAlignment(2, TQt::AlignCenter); + m_editAmounts->setColumnAlignment(3, TQt::AlignCenter); m_editAmounts->setColumnWidth(4, 0); - m_editAmounts->setColumnWidthMode(4, QListView::Manual); + m_editAmounts->setColumnWidthMode(4, TQListView::Manual); m_editAmounts->setSorting(4); m_editAmounts->sort(); @@ -216,7 +216,7 @@ void MyMoneyQifProfileEditor::loadWidgets(void) void MyMoneyQifProfileEditor::loadProfileListFromConfig(void) { - QFontMetrics fontMetrics(m_profileListBox->font()); + TQFontMetrics fontMetrics(m_profileListBox->font()); int w = 100; // minimum is 100 pixels width for the list box if(m_profile.isDirty()) { @@ -226,14 +226,14 @@ void MyMoneyQifProfileEditor::loadProfileListFromConfig(void) m_profileListBox->clear(); - QStringList list; + TQStringList list; KConfig* config = KGlobal::config(); config->setGroup("Profiles"); list = config->readListEntry("profiles"); if(list.count() == 0) { m_profile.clear(); - m_profile.setProfileDescription(i18n("The default QIF profile")); + m_profile.setProfileDescription(i18n("The default TQIF profile")); addProfile("Default"); config->setGroup("Profiles"); @@ -249,28 +249,28 @@ void MyMoneyQifProfileEditor::loadProfileListFromConfig(void) } for(unsigned int i = 0; i < list.count(); ++i) { int nw = fontMetrics.width(list[i]) + 10; - w = QMAX( w, nw ); + w = TQMAX( w, nw ); } - w = QMIN(w, 200); + w = TQMIN(w, 200); m_profileListBox->setMinimumWidth(w); } -void MyMoneyQifProfileEditor::slotLoadProfileFromConfig(const QString& profile) +void MyMoneyQifProfileEditor::slotLoadProfileFromConfig(const TQString& profile) { - QString profileName = profile; + TQString profileName = profile; if(m_profile.isDirty()) { m_profile.saveProfile(); m_isDirty = true; } - if(m_profileListBox->findItem(profileName, Qt::ExactMatch | Qt::CaseSensitive) == NULL) { + if(m_profileListBox->tqfindItem(profileName, TQt::ExactMatch | TQt::CaseSensitive) == NULL) { profileName = m_profileListBox->text(0); } m_profile.loadProfile("Profile-" + profileName); - QListBoxItem *lbi = m_profileListBox->findItem(profileName, Qt::ExactMatch | Qt::CaseSensitive); + TQListBoxItem *lbi = m_profileListBox->tqfindItem(profileName, TQt::ExactMatch | TQt::CaseSensitive); int idx = m_profileListBox->index(lbi); showProfile(); if(idx >= 0) { @@ -294,11 +294,11 @@ void MyMoneyQifProfileEditor::showProfile(void) m_attemptMatch->setChecked(m_profile.attemptMatchDuplicates()); - QListViewItem* item; - QListViewItemIterator it(m_editAmounts); + TQListViewItem* item; + TQListViewItemIterator it(m_editAmounts); while((item = it.current()) != 0) { - QChar key = item->text(1)[0]; + TQChar key = item->text(1)[0]; item->setText(2, m_profile.amountDecimal(key)); item->setText(3, m_profile.amountThousands(key)); if(m_selectedAmountType == 0 && key == 'T' && m_inEdit) { @@ -311,25 +311,25 @@ void MyMoneyQifProfileEditor::showProfile(void) } } -void MyMoneyQifProfileEditor::deleteProfile(const QString& name) +void MyMoneyQifProfileEditor::deleteProfile(const TQString& name) { KConfig* config = KGlobal::config(); config->deleteGroup("Profile-" + name); config->setGroup("Profiles"); - QStringList list = config->readListEntry("profiles"); + TQStringList list = config->readListEntry("profiles"); list.remove(name); config->writeEntry("profiles", list); m_isDirty = true; } -void MyMoneyQifProfileEditor::addProfile(const QString& name) +void MyMoneyQifProfileEditor::addProfile(const TQString& name) { KConfig* config = KGlobal::config(); config->setGroup("Profiles"); - QStringList list = config->readListEntry("profiles"); + TQStringList list = config->readListEntry("profiles"); list += name; list.sort(); @@ -364,7 +364,7 @@ void MyMoneyQifProfileEditor::slotReset(void) config->rollback(); config->reparseConfiguration(); - QString currentProfile = m_profile.profileName().mid(8); + TQString currentProfile = m_profile.profileName().mid(8); loadProfileListFromConfig(); slotLoadProfileFromConfig(currentProfile); m_isDirty = false; @@ -373,7 +373,7 @@ void MyMoneyQifProfileEditor::slotReset(void) void MyMoneyQifProfileEditor::slotRename(void) { bool ok; - QString newName = enterName(ok); + TQString newName = enterName(ok); if(ok == true) { deleteProfile(m_profile.profileName().mid(8)); @@ -386,7 +386,7 @@ void MyMoneyQifProfileEditor::slotRename(void) void MyMoneyQifProfileEditor::slotNew(void) { bool ok; - QString newName = enterName(ok); + TQString newName = enterName(ok); if(ok == true) { m_profile.clear(); @@ -396,20 +396,20 @@ void MyMoneyQifProfileEditor::slotNew(void) } } -const QString MyMoneyQifProfileEditor::enterName(bool& ok) +const TQString MyMoneyQifProfileEditor::enterName(bool& ok) { - MyMoneyQifProfileNameValidator val(this, "Validator"); + MyMoneyQifProfileNameValidator val(TQT_TQOBJECT(this), "Validator"); #if KDE_IS_VERSION(3,2,0) - return KInputDialog::getText(i18n("QIF Profile Editor"), + return KInputDialog::getText(i18n("TQIF Profile Editor"), i18n("Enter new profile name"), - QString::null, + TQString(), &ok, this, 0, &val, 0); #else - QString rc; + TQString rc; // the blank in the next line as the value for the edit box is // there on purpose, so that with the following call to validateAndSet @@ -431,9 +431,9 @@ const QString MyMoneyQifProfileEditor::enterName(bool& ok) void MyMoneyQifProfileEditor::slotDelete(void) { - QString profile = m_profile.profileName().mid(8); + TQString profile = m_profile.profileName().mid(8); - if(KMessageBox::questionYesNo(this, i18n("Do you really want to delete profile '%1'?").arg(profile)) == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, i18n("Do you really want to delete profile '%1'?").tqarg(profile)) == KMessageBox::Yes) { int idx = m_profileListBox->currentItem(); m_profile.saveProfile(); deleteProfile(profile); @@ -450,32 +450,32 @@ void MyMoneyQifProfileEditor::slotHelp(void) kapp->invokeHelp("details.impexp.qifimp.profile"); } -void MyMoneyQifProfileEditor::slotAmountTypeSelected(QListViewItem* item) +void MyMoneyQifProfileEditor::slotAmountTypeSelected(TQListViewItem* item) { m_decimalBox->setCurrentText(item->text(2)); m_thousandsBox->setCurrentText(item->text(3)); m_selectedAmountType = item; } -void MyMoneyQifProfileEditor::slotDecimalChanged(const QString& val) +void MyMoneyQifProfileEditor::slotDecimalChanged(const TQString& val) { if(m_selectedAmountType != 0) { - QChar key = m_selectedAmountType->text(1)[0]; + TQChar key = m_selectedAmountType->text(1)[0]; m_profile.setAmountDecimal(key, val[0]); m_selectedAmountType->setText(2, val); } } -void MyMoneyQifProfileEditor::slotThousandsChanged(const QString& val) +void MyMoneyQifProfileEditor::slotThousandsChanged(const TQString& val) { if(m_selectedAmountType != 0) { - QChar key = m_selectedAmountType->text(1)[0]; + TQChar key = m_selectedAmountType->text(1)[0]; m_profile.setAmountThousands(key, val[0]); m_selectedAmountType->setText(3, val); } } -const QString MyMoneyQifProfileEditor::selectedProfile() const +const TQString MyMoneyQifProfileEditor::selectedProfile() const { return m_profileListBox->currentText(); } diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditor.h b/kmymoney2/dialogs/mymoneyqifprofileeditor.h index ce95c9a..67993c2 100644 --- a/kmymoney2/dialogs/mymoneyqifprofileeditor.h +++ b/kmymoney2/dialogs/mymoneyqifprofileeditor.h @@ -15,15 +15,15 @@ * * ***************************************************************************/ -#ifndef MYMONEYQIFPROFILEEDITOR_H -#define MYMONEYQIFPROFILEEDITOR_H +#ifndef MYMONEYTQIFPROFILEEDITOR_H +#define MYMONEYTQIFPROFILEEDITOR_H // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qvalidator.h> -class QListViewItem; +#include <tqwidget.h> +#include <tqvalidator.h> +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -38,59 +38,61 @@ class QListViewItem; * @author Thomas Baumgart */ -class MyMoneyQifProfileNameValidator : public QValidator +class MyMoneyQifProfileNameValidator : public TQValidator { Q_OBJECT + TQ_OBJECT public: - MyMoneyQifProfileNameValidator(QObject *o, const char *name); + MyMoneyQifProfileNameValidator(TQObject *o, const char *name); virtual ~MyMoneyQifProfileNameValidator(); - QValidator::State validate(QString&, int&) const; + TQValidator::State validate(TQString&, int&) const; }; class MyMoneyQifProfileEditor : public MyMoneyQifProfileEditorDecl { Q_OBJECT + TQ_OBJECT public: - MyMoneyQifProfileEditor(const bool edit = false, QWidget *parent=0, const char *name=0); + MyMoneyQifProfileEditor(const bool edit = false, TQWidget *tqparent=0, const char *name=0); virtual ~MyMoneyQifProfileEditor(); /** * This method returns the currently selected profile in the list box. */ - const QString selectedProfile() const; + const TQString selectedProfile() const; public slots: void slotOk(void); protected slots: - void slotLoadProfileFromConfig(const QString& name); + void slotLoadProfileFromConfig(const TQString& name); void slotReset(void); void slotRename(void); void slotDelete(void); void slotNew(void); - void slotAmountTypeSelected(QListViewItem*); - void slotDecimalChanged(const QString& val); - void slotThousandsChanged(const QString& val); + void slotAmountTypeSelected(TQListViewItem*); + void slotDecimalChanged(const TQString& val); + void slotThousandsChanged(const TQString& val); void slotHelp(void); private: void loadProfileListFromConfig(void); void loadWidgets(void); void showProfile(void); - void addProfile(const QString& name); - void deleteProfile(const QString& name); - const QString enterName(bool& ok); + void addProfile(const TQString& name); + void deleteProfile(const TQString& name); + const TQString enterName(bool& ok); private: bool m_inEdit; MyMoneyQifProfile m_profile; bool m_isDirty; bool m_isAccepted; - QListViewItem* m_selectedAmountType; + TQListViewItem* m_selectedAmountType; }; #endif diff --git a/kmymoney2/dialogs/mymoneyqifprofileeditordecl.ui b/kmymoney2/dialogs/mymoneyqifprofileeditordecl.ui index 43e56fa..b88f241 100644 --- a/kmymoney2/dialogs/mymoneyqifprofileeditordecl.ui +++ b/kmymoney2/dialogs/mymoneyqifprofileeditordecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>MyMoneyQifProfileEditorDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>MyMoneyQifProfileEditorDecl</cstring> </property> @@ -28,15 +28,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListBox"> + <widget class="TQListBox"> <item> <property name="text"> <string></string> @@ -57,11 +57,11 @@ <bool>true</bool> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>profileTabs</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tabGeneral</cstring> </property> @@ -72,19 +72,19 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel2_2_3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -94,11 +94,11 @@ <string>Void mark</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -113,11 +113,11 @@ <cstring>m_editOpeningBalance</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -137,11 +137,11 @@ <cstring>m_editVoidMark</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel2_2_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -161,11 +161,11 @@ <cstring>m_editDescription</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -177,7 +177,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_attemptMatch</cstring> </property> @@ -195,7 +195,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -204,7 +204,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tabDate</cstring> </property> @@ -215,17 +215,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout43</cstring> + <cstring>tqlayout43</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <grid> <property name="name"> @@ -239,11 +239,11 @@ <string>The format of the dates in the QIF file.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -264,11 +264,11 @@ <string>If a QIF file contains date entries with years represented with two digits then either an apostrophe or a slash may be used to delimit the year in the dates for certain centuries. This enables 1905 to be distinguished from 2005. Specify here which range of years will have year delimited by an apostrophe (eg. for Quicken this is usually 1900-1949).</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -293,7 +293,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> @@ -312,7 +312,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>80</height> @@ -321,7 +321,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tabMoney</cstring> </property> @@ -332,7 +332,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Field</string> @@ -561,17 +561,17 @@ <enum>Accept</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout41</cstring> + <cstring>tqlayout41</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout40</cstring> + <cstring>tqlayout40</cstring> </property> <grid> <property name="name"> @@ -582,11 +582,11 @@ <cstring>m_thousandsBox</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -596,11 +596,11 @@ <string>Decimal Symbol</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -627,7 +627,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>20</height> @@ -646,7 +646,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>16</height> @@ -655,7 +655,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tabFilter</cstring> </property> @@ -666,19 +666,19 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel1_4_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -701,11 +701,11 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1_4_3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -715,7 +715,7 @@ <string>Input filter file type</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_editInputFilterFileType</cstring> </property> @@ -723,11 +723,11 @@ <string>*.qif</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1_4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>140</width> <height>0</height> @@ -749,7 +749,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -761,7 +761,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout14</cstring> </property> @@ -823,7 +823,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>104</width> <height>0</height> @@ -901,5 +901,5 @@ <tabstop>m_editInputFilterLocation</tabstop> <tabstop>m_editOutputFilterLocation</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingscolors.cpp b/kmymoney2/dialogs/settings/ksettingscolors.cpp index 727241c..06a5199 100644 --- a/kmymoney2/dialogs/settings/ksettingscolors.cpp +++ b/kmymoney2/dialogs/settings/ksettingscolors.cpp @@ -25,8 +25,8 @@ #include "ksettingscolors.h" -KSettingsColors::KSettingsColors(QWidget* parent, const char* name) : - KSettingsColorsDecl(parent, name) +KSettingsColors::KSettingsColors(TQWidget* tqparent, const char* name) : + KSettingsColorsDecl(tqparent, name) { } diff --git a/kmymoney2/dialogs/settings/ksettingscolors.h b/kmymoney2/dialogs/settings/ksettingscolors.h index 896ad85..0f877a2 100644 --- a/kmymoney2/dialogs/settings/ksettingscolors.h +++ b/kmymoney2/dialogs/settings/ksettingscolors.h @@ -31,9 +31,10 @@ class KSettingsColors : public KSettingsColorsDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsColors(QWidget* parent = 0, const char* name = 0); + KSettingsColors(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsColors(); }; #endif diff --git a/kmymoney2/dialogs/settings/ksettingscolorsdecl.ui b/kmymoney2/dialogs/settings/ksettingscolorsdecl.ui index 2d4d15b..98fe42b 100644 --- a/kmymoney2/dialogs/settings/ksettingscolorsdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingscolorsdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsColorsDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsColorsDecl</cstring> </property> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -45,7 +45,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -53,7 +53,7 @@ <string>Grid color</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -61,7 +61,7 @@ <string>Erronous transaction</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -99,7 +99,7 @@ </color> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -157,7 +157,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -166,7 +166,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -177,7 +177,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_useSystemColors</cstring> </property> @@ -185,7 +185,7 @@ <string>Use system colors</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_individualColorFrame</cstring> </property> @@ -196,7 +196,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -204,7 +204,7 @@ <string>Normal</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -252,7 +252,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -263,7 +263,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -286,7 +286,7 @@ </color> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -317,7 +317,7 @@ </color> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -340,7 +340,7 @@ </color> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -382,7 +382,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -402,5 +402,5 @@ <slot>setDisabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsfonts.cpp b/kmymoney2/dialogs/settings/ksettingsfonts.cpp index a4aef71..c21437d 100644 --- a/kmymoney2/dialogs/settings/ksettingsfonts.cpp +++ b/kmymoney2/dialogs/settings/ksettingsfonts.cpp @@ -25,8 +25,8 @@ #include "ksettingsfonts.h" -KSettingsFonts::KSettingsFonts(QWidget* parent, const char* name) : - KSettingsFontsDecl(parent, name) +KSettingsFonts::KSettingsFonts(TQWidget* tqparent, const char* name) : + KSettingsFontsDecl(tqparent, name) { } diff --git a/kmymoney2/dialogs/settings/ksettingsfonts.h b/kmymoney2/dialogs/settings/ksettingsfonts.h index 40cb9de..eda94fd 100644 --- a/kmymoney2/dialogs/settings/ksettingsfonts.h +++ b/kmymoney2/dialogs/settings/ksettingsfonts.h @@ -31,9 +31,10 @@ class KSettingsFonts : public KSettingsFontsDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsFonts(QWidget* parent = 0, const char* name = 0); + KSettingsFonts(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsFonts(); }; #endif diff --git a/kmymoney2/dialogs/settings/ksettingsfontsdecl.ui b/kmymoney2/dialogs/settings/ksettingsfontsdecl.ui index cbaefeb..6cb100a 100644 --- a/kmymoney2/dialogs/settings/ksettingsfontsdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsfontsdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsFontsDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsFontsDecl</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_useSystemFont</cstring> </property> @@ -27,7 +27,7 @@ <string>Use system fonts</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_individualFontsFrame</cstring> </property> @@ -58,7 +58,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>110</width> <height>20</height> @@ -75,14 +75,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>100</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -90,7 +90,7 @@ <string>Cell font</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -110,7 +110,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -127,5 +127,5 @@ <slot>setDisabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsforecast.cpp b/kmymoney2/dialogs/settings/ksettingsforecast.cpp index 0a74252..d3e8770 100644 --- a/kmymoney2/dialogs/settings/ksettingsforecast.cpp +++ b/kmymoney2/dialogs/settings/ksettingsforecast.cpp @@ -25,8 +25,8 @@ #include "ksettingsforecast.h" -KSettingsForecast::KSettingsForecast(QWidget* parent, const char* name) : - KSettingsForecastDecl(parent, name) +KSettingsForecast::KSettingsForecast(TQWidget* tqparent, const char* name) : + KSettingsForecastDecl(tqparent, name) { } diff --git a/kmymoney2/dialogs/settings/ksettingsforecast.h b/kmymoney2/dialogs/settings/ksettingsforecast.h index 7195eee..4423a39 100644 --- a/kmymoney2/dialogs/settings/ksettingsforecast.h +++ b/kmymoney2/dialogs/settings/ksettingsforecast.h @@ -32,9 +32,10 @@ class KSettingsForecast : public KSettingsForecastDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsForecast(QWidget* parent = 0, const char* name = 0); + KSettingsForecast(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsForecast(); }; #endif diff --git a/kmymoney2/dialogs/settings/ksettingsforecastdecl.ui b/kmymoney2/dialogs/settings/ksettingsforecastdecl.ui index c412f81..c3f90df 100644 --- a/kmymoney2/dialogs/settings/ksettingsforecastdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsforecastdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsForecastDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsForecastDecl</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -38,28 +38,28 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>kcfg_forecastAccountCycle</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -67,12 +67,12 @@ <string>Number of Days of Account Cycle:</string> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>kcfg_forecastDays</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -80,12 +80,12 @@ <string>Day of Month to start Forecast:</string> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>kcfg_beginForecastDay</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -105,7 +105,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>133</width> <height>21</height> @@ -114,7 +114,7 @@ </spacer> </grid> </widget> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>kcfg_forecastMethod</cstring> </property> @@ -125,7 +125,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton9</cstring> </property> @@ -136,7 +136,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton10</cstring> </property> @@ -149,7 +149,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -164,7 +164,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -172,7 +172,7 @@ <string>Number of Cycles to use in Forecast:</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>kcfg_forecastCycles</cstring> </property> @@ -187,7 +187,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>130</width> <height>21</height> @@ -195,7 +195,7 @@ </property> </spacer> </hbox> - <widget class="QButtonGroup" row="1" column="0"> + <widget class="TQButtonGroup" row="1" column="0"> <property name="name"> <cstring>kcfg_historyMethod</cstring> </property> @@ -206,7 +206,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton11</cstring> </property> @@ -217,7 +217,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton12</cstring> </property> @@ -228,7 +228,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton13</cstring> </property> @@ -255,7 +255,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -264,5 +264,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsgeneral.cpp b/kmymoney2/dialogs/settings/ksettingsgeneral.cpp index 5acdd08..e36530f 100644 --- a/kmymoney2/dialogs/settings/ksettingsgeneral.cpp +++ b/kmymoney2/dialogs/settings/ksettingsgeneral.cpp @@ -17,7 +17,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -31,8 +31,8 @@ #include <kmymoney/kmymoneydateinput.h> #include "ksettingsgeneral.h" -KSettingsGeneral::KSettingsGeneral(QWidget* parent, const char* name) : - KSettingsGeneralDecl(parent, name) +KSettingsGeneral::KSettingsGeneral(TQWidget* tqparent, const char* name) : + KSettingsGeneralDecl(tqparent, name) { // hide the internally used date field kcfg_StartDate->hide(); @@ -43,20 +43,20 @@ KSettingsGeneral::KSettingsGeneral(QWidget* parent, const char* name) : m_viewList->hide(); // setup connections, so that the sort optios get loaded once the edit fields are filled - connect(kcfg_StartDate, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotLoadStartDate(const QDate&))); + connect(kcfg_StartDate, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotLoadStartDate(const TQDate&))); // setup connections, so that changes by the user are forwarded to the (hidden) edit fields - connect(m_startDateEdit, SIGNAL(dateChanged(const QDate&)), kcfg_StartDate, SLOT(setDate(const QDate&))); + connect(m_startDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), kcfg_StartDate, TQT_SLOT(setDate(const TQDate&))); } KSettingsGeneral::~KSettingsGeneral() { } -void KSettingsGeneral::slotLoadStartDate(const QDate&) +void KSettingsGeneral::slotLoadStartDate(const TQDate&) { // only need this once - disconnect(kcfg_StartDate, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotLoadStartDate(const QDate&))); + disconnect(kcfg_StartDate, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotLoadStartDate(const TQDate&))); m_startDateEdit->setDate(kcfg_StartDate->date()); } diff --git a/kmymoney2/dialogs/settings/ksettingsgeneral.h b/kmymoney2/dialogs/settings/ksettingsgeneral.h index 3bd0992..246a600 100644 --- a/kmymoney2/dialogs/settings/ksettingsgeneral.h +++ b/kmymoney2/dialogs/settings/ksettingsgeneral.h @@ -31,13 +31,14 @@ class KSettingsGeneral : public KSettingsGeneralDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsGeneral(QWidget* parent = 0, const char* name = 0); + KSettingsGeneral(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsGeneral(); protected slots: - void slotLoadStartDate(const QDate&); + void slotLoadStartDate(const TQDate&); }; #endif diff --git a/kmymoney2/dialogs/settings/ksettingsgeneraldecl.ui b/kmymoney2/dialogs/settings/ksettingsgeneraldecl.ui index 9eeb181..b851f2b 100644 --- a/kmymoney2/dialogs/settings/ksettingsgeneraldecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsgeneraldecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsGeneralDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsGeneralDecl</cstring> </property> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget2</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_StartLastViewSelected</cstring> </property> @@ -48,7 +48,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -62,7 +62,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton2</cstring> </property> @@ -75,7 +75,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -86,7 +86,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -94,7 +94,7 @@ <string>Price precision</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>kcfg_PricePrecision</cstring> </property> @@ -102,7 +102,7 @@ <number>10</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -129,7 +129,7 @@ </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -140,7 +140,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_AutoSaveFile</cstring> </property> @@ -148,7 +148,7 @@ <string>Autosave periodically</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_periodFrame</cstring> </property> @@ -168,7 +168,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>kcfg_AutoSavePeriod</cstring> </property> @@ -176,7 +176,7 @@ <number>60</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -194,7 +194,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>354</width> <height>20</height> @@ -205,7 +205,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -216,7 +216,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -304,7 +304,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>20</height> @@ -323,7 +323,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -332,7 +332,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -343,7 +343,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_syncLedgerInvestment</cstring> </property> @@ -359,14 +359,14 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_viewLabel</cstring> </property> <property name="text"> <string>Check the views you want to enable, uncheck those you want to hide, because you don't need the functionality.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -383,7 +383,7 @@ </sizepolicy> </property> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_iconSize</cstring> </property> @@ -397,7 +397,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioButton3</cstring> </property> @@ -405,7 +405,7 @@ <string>Micro (16px)</string> </property> </widget> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioButton4</cstring> </property> @@ -413,7 +413,7 @@ <string>Small (32px)</string> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioButton5</cstring> </property> @@ -424,7 +424,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>radioButton6</cstring> </property> @@ -434,7 +434,7 @@ </widget> </grid> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_showTitleBar</cstring> </property> @@ -452,7 +452,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -461,7 +461,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -472,7 +472,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -483,7 +483,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HideUnusedCategory</cstring> </property> @@ -494,7 +494,7 @@ <string>This option hides all categories in the categories view that are not used in at least a single transaction. They are still shown in the category selection lists.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HideClosedAccounts</cstring> </property> @@ -507,7 +507,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden accounts in the views.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ExpertMode</cstring> </property> @@ -517,7 +517,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -528,7 +528,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HideFinishedSchedules</cstring> </property> @@ -541,7 +541,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox5</cstring> </property> @@ -552,15 +552,15 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -573,7 +573,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <cstring>m_startDateEdit</cstring> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>kcfg_StartDate</cstring> </property> @@ -588,7 +588,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>63</width> <height>20</height> @@ -597,7 +597,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HideReconciledTransactions</cstring> </property> @@ -620,7 +620,7 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -642,5 +642,8 @@ You can use <b>View/Show all accounts</b> to temporarily show hidden <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsgpg.cpp b/kmymoney2/dialogs/settings/ksettingsgpg.cpp index 2dba83e..133700d 100644 --- a/kmymoney2/dialogs/settings/ksettingsgpg.cpp +++ b/kmymoney2/dialogs/settings/ksettingsgpg.cpp @@ -17,9 +17,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qregexp.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,8 +40,8 @@ #define RECOVER_KEY_ID "0xD2B08440" #define RECOVER_KEY_ID_FULL "59B0F826D2B08440" -KSettingsGpg::KSettingsGpg(QWidget* parent, const char* name) : - KSettingsGpgDecl(parent, name), +KSettingsGpg::KSettingsGpg(TQWidget* tqparent, const char* name) : + KSettingsGpgDecl(tqparent, name), m_checkCount(0), m_needCheckList(true), m_listOk(false) @@ -51,11 +51,11 @@ KSettingsGpg::KSettingsGpg(QWidget* parent, const char* name) : // don't show the widget in which the master key is actually kept kcfg_GpgRecipient->hide(); - connect(kcfg_WriteDataEncrypted, SIGNAL(toggled(bool)), this, SLOT(slotStatusChanged(bool))); - connect(m_masterKeyCombo, SIGNAL(activated(int)), this, SLOT(slotIdChanged())); - connect(kcfg_GpgRecipientList, SIGNAL(changed()), this, SLOT(slotIdChanged())); - connect(kcfg_GpgRecipientList, SIGNAL(added(const QString&)), this, SLOT(slotKeyListChanged())); - connect(kcfg_GpgRecipientList, SIGNAL(removed(const QString&)), this, SLOT(slotKeyListChanged())); + connect(kcfg_WriteDataEncrypted, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotStatusChanged(bool))); + connect(m_masterKeyCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotIdChanged())); + connect(kcfg_GpgRecipientList, TQT_SIGNAL(changed()), this, TQT_SLOT(slotIdChanged())); + connect(kcfg_GpgRecipientList, TQT_SIGNAL(added(const TQString&)), this, TQT_SLOT(slotKeyListChanged())); + connect(kcfg_GpgRecipientList, TQT_SIGNAL(removed(const TQString&)), this, TQT_SLOT(slotKeyListChanged())); // Initial state setup slotStatusChanged(kcfg_WriteDataEncrypted->isChecked()); @@ -93,8 +93,8 @@ void KSettingsGpg::slotIdChanged(void) // if it is available, then scan the current list if we need to if(keysOk) { if(m_needCheckList) { - QStringList keys = kcfg_GpgRecipientList->items(); - QStringList::const_iterator it_s; + TQStringList keys = kcfg_GpgRecipientList->items(); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); keysOk && it_s != keys.end(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) keysOk = false; @@ -115,7 +115,7 @@ void KSettingsGpg::slotIdChanged(void) // if we have a master key, we store it in the hidden widget if(m_masterKeyCombo->currentItem() != 0) { - QRegExp keyExp(".* \\((.*)\\)"); + TQRegExp keyExp(".* \\((.*)\\)"); if(keyExp.search(m_masterKeyCombo->currentText()) != -1) { kcfg_GpgRecipient->setText(keyExp.cap(1)); } @@ -131,10 +131,10 @@ void KSettingsGpg::slotIdChanged(void) void KSettingsGpg::show(void) { - QString masterKey; + TQString masterKey; if(m_masterKeyCombo->currentItem() != 0) { - QRegExp keyExp(".* \\((.*)\\)"); + TQRegExp keyExp(".* \\((.*)\\)"); if(keyExp.search(m_masterKeyCombo->currentText()) != -1) { masterKey = keyExp.cap(1); } @@ -143,19 +143,19 @@ void KSettingsGpg::show(void) // fill the secret key combobox with a fresh list m_masterKeyCombo->clear(); - QStringList keyList; + TQStringList keyList; KGPGFile::secretKeyList(keyList); - for(QStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { - QStringList fields = QStringList::split(":", *it); + for(TQStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { + TQStringList fields = TQStringList::split(":", *it); if(fields[0] != RECOVER_KEY_ID_FULL) { - // replace parenthesis in name field with brackets - QString name = fields[1]; - name.replace('(', "["); - name.replace(')', "]"); - name = QString("%1 (0x%2)").arg(name).arg(fields[0]); + // replace tqparenthesis in name field with brackets + TQString name = fields[1]; + name.tqreplace('(', "["); + name.tqreplace(')', "]"); + name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]); m_masterKeyCombo->insertItem(name); - if(name.contains(masterKey)) + if(name.tqcontains(masterKey)) m_masterKeyCombo->setCurrentItem(name); } } @@ -177,7 +177,7 @@ void KSettingsGpg::slotStatusChanged(bool state) state = false; if((state == true) && (oncePerSession == true) && isVisible()) { - KMessageBox::information(this, QString("<qt>%1</qt>").arg(i18n("You have turned on the GPG encryption support. This means, that new files will be stored encrypted. Existing files will not be encrypted automatically. To achieve encryption of existing files, please use the <b>File/Save as...</b> feature and store the file under a different name. Once confident with the result, feel free to delete the old file and rename the encrypted one to the old name.")), i18n("GPG encryption activated"), "GpgEncryptionActivated"); + KMessageBox::information(this, TQString("<qt>%1</qt>").tqarg(i18n("You have turned on the GPG encryption support. This means, that new files will be stored encrypted. Existing files will not be encrypted automatically. To achieve encryption of existing files, please use the <b>File/Save as...</b> feature and store the file under a different name. Once confident with the result, feel free to delete the old file and rename the encrypted one to the old name.")), i18n("GPG encryption activated"), "GpgEncryptionActivated"); oncePerSession = false; } diff --git a/kmymoney2/dialogs/settings/ksettingsgpg.h b/kmymoney2/dialogs/settings/ksettingsgpg.h index ecea6ab..2508192 100644 --- a/kmymoney2/dialogs/settings/ksettingsgpg.h +++ b/kmymoney2/dialogs/settings/ksettingsgpg.h @@ -32,9 +32,10 @@ class KSettingsGpg : public KSettingsGpgDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsGpg(QWidget* parent = 0, const char* name = 0); + KSettingsGpg(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsGpg(); public slots: diff --git a/kmymoney2/dialogs/settings/ksettingsgpgdecl.ui b/kmymoney2/dialogs/settings/ksettingsgpgdecl.ui index 15d3bbe..0d82e45 100644 --- a/kmymoney2/dialogs/settings/ksettingsgpgdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsgpgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsGpgDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsGpgDecl</cstring> </property> @@ -24,7 +24,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_WriteDataEncrypted</cstring> </property> @@ -32,7 +32,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <string>Use GPG encryption</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_idGroup</cstring> </property> @@ -46,15 +46,15 @@ The <i>additional recovery encryption</i> is only accessible, if the <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -102,9 +102,9 @@ The <i>additional recovery encryption</i> is only accessible, if the <string>Enter the id of the key you want to use for data encryption. This can either be an e-mail address or the hexadecimal key id. In case of the key id don't forget the leading 0x.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> @@ -124,7 +124,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <string>This symbol denotes, if the key for the given user id has been found in your keyring. It is green when found, dark otherwise.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -142,7 +142,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -151,9 +151,9 @@ The <i>additional recovery encryption</i> is only accessible, if the </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -173,7 +173,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <string>This symbol denotes, if the KMyMoney recovery key has been found in your keyring. It is green when found, dark otherwise.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -191,7 +191,7 @@ The <i>additional recovery encryption</i> is only accessible, if the <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -200,7 +200,7 @@ The <i>additional recovery encryption</i> is only accessible, if the </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EncryptRecover</cstring> </property> @@ -225,7 +225,7 @@ This mechanism is provided for the case that you have lost your key and cannot a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>30</height> @@ -234,5 +234,5 @@ This mechanism is provided for the case that you have lost your key and cannot a </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingshome.cpp b/kmymoney2/dialogs/settings/ksettingshome.cpp index d2f471b..a874de7 100644 --- a/kmymoney2/dialogs/settings/ksettingshome.cpp +++ b/kmymoney2/dialogs/settings/ksettingshome.cpp @@ -17,8 +17,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> -#include <qheader.h> +#include <tqstringlist.h> +#include <tqheader.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,8 +38,8 @@ #include "kmymoney2/kmymoneyglobalsettings.h" #include "kmymoney2/kmymoneyutils.h" -KSettingsHome::KSettingsHome(QWidget* parent, const char* name) : - KSettingsHomeDecl(parent, name), +KSettingsHome::KSettingsHome(TQWidget* tqparent, const char* name) : + KSettingsHomeDecl(tqparent, name), m_noNeedToUpdateList(false) { m_homePageList->addColumn(""); @@ -49,11 +49,11 @@ KSettingsHome::KSettingsHome(QWidget* parent, const char* name) : KIconLoader* il = KGlobal::iconLoader(); KGuiItem upButtonItem( i18n( "&Up" ), - QIconSet(il->loadIcon("up", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("up", KIcon::Small, KIcon::SizeSmall)), i18n("Move selected item up"), i18n("Use this to move the selected item up by one position in the list.")); KGuiItem downButtonItem( i18n( "&Down" ), - QIconSet(il->loadIcon("down", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("down", KIcon::Small, KIcon::SizeSmall)), i18n("Move selected item down"), i18n("Use this to move the selected item down by one position in the list.")); @@ -63,14 +63,14 @@ KSettingsHome::KSettingsHome(QWidget* parent, const char* name) : m_downButton->setEnabled(false); // connect this, so that the list gets loaded once the edit field is filled - connect(kcfg_ItemList, SIGNAL(textChanged()), this, SLOT(slotLoadItems())); + connect(kcfg_ItemList, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadItems())); - connect(m_homePageList, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotSelectHomePageItem(QListViewItem *))); - connect(m_homePageList, SIGNAL(pressed(QListViewItem*)), this, SLOT(slotUpdateItemList())); + connect(m_homePageList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotSelectHomePageItem(TQListViewItem *))); + connect(m_homePageList, TQT_SIGNAL(pressed(TQListViewItem*)), this, TQT_SLOT(slotUpdateItemList())); - connect(m_upButton, SIGNAL(clicked()), this, SLOT(slotMoveUp())); - connect(m_downButton, SIGNAL(clicked()), this, SLOT(slotMoveDown())); + connect(m_upButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUp())); + connect(m_downButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDown())); // Don't show it to the user, we only need it to load and save the settings kcfg_ItemList->hide(); @@ -85,14 +85,14 @@ void KSettingsHome::slotLoadItems(void) if(m_noNeedToUpdateList) return; - QStringList list = KMyMoneyGlobalSettings::itemList(); - QStringList::ConstIterator it; + TQStringList list = KMyMoneyGlobalSettings::itemList(); + TQStringList::ConstIterator it; int w = 0; m_homePageList->clear(); - QCheckListItem *sel = 0; + TQCheckListItem *sel = 0; - QFontMetrics fm( KGlobalSettings::generalFont()); - QCheckListItem* last = 0; + TQFontMetrics fm( KGlobalSettings::generalFont()); + TQCheckListItem* last = 0; for(it = list.begin(); it != list.end(); ++it) { int idx = (*it).toInt(); @@ -101,7 +101,7 @@ void KSettingsHome::slotLoadItems(void) continue; bool enabled = idx > 0; if(!enabled) idx = -idx; - QCheckListItem* item = new QCheckListItem(m_homePageList, KMyMoneyUtils::homePageItemToString(idx), QCheckListItem::CheckBox); + TQCheckListItem* item = new TQCheckListItem(m_homePageList, KMyMoneyUtils::homePageItemToString(idx), TQCheckListItem::CheckBox); if(last) item->moveItem(last); @@ -123,14 +123,14 @@ void KSettingsHome::slotLoadItems(void) void KSettingsHome::slotUpdateItemList(void) { - QString list; - QListViewItem *it; + TQString list; + TQListViewItem *it; for(it = m_homePageList->firstChild(); it; ) { int item = KMyMoneyUtils::stringToHomePageItem(it->text(0)); - if(!(static_cast<QCheckListItem*>(it)->isOn())) + if(!(static_cast<TQCheckListItem*>(it)->isOn())) item = -item; - list += QString::number(item); + list += TQString::number(item); it = it->nextSibling(); if(it) list += ","; @@ -142,7 +142,7 @@ void KSettingsHome::slotUpdateItemList(void) m_noNeedToUpdateList = false; } -void KSettingsHome::slotSelectHomePageItem(QListViewItem *item) +void KSettingsHome::slotSelectHomePageItem(TQListViewItem *item) { m_upButton->setEnabled(m_homePageList->firstChild() != item); m_downButton->setEnabled(item->nextSibling()); @@ -150,8 +150,8 @@ void KSettingsHome::slotSelectHomePageItem(QListViewItem *item) void KSettingsHome::slotMoveUp(void) { - QListViewItem *item = m_homePageList->currentItem(); - QListViewItem *prev = item->itemAbove(); + TQListViewItem *item = m_homePageList->currentItem(); + TQListViewItem *prev = item->itemAbove(); if(prev) { prev->moveItem(item); slotSelectHomePageItem(item); @@ -161,8 +161,8 @@ void KSettingsHome::slotMoveUp(void) void KSettingsHome::slotMoveDown(void) { - QListViewItem *item = m_homePageList->currentItem(); - QListViewItem *next = item->nextSibling(); + TQListViewItem *item = m_homePageList->currentItem(); + TQListViewItem *next = item->nextSibling(); if(next) { item->moveItem(next); slotSelectHomePageItem(item); diff --git a/kmymoney2/dialogs/settings/ksettingshome.h b/kmymoney2/dialogs/settings/ksettingshome.h index c461210..9717b2d 100644 --- a/kmymoney2/dialogs/settings/ksettingshome.h +++ b/kmymoney2/dialogs/settings/ksettingshome.h @@ -20,7 +20,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QListViewItem; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -33,15 +33,16 @@ class QListViewItem; class KSettingsHome : public KSettingsHomeDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsHome(QWidget* parent = 0, const char* name = 0); + KSettingsHome(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsHome(); protected slots: void slotLoadItems(void); void slotUpdateItemList(void); - void slotSelectHomePageItem(QListViewItem *); + void slotSelectHomePageItem(TQListViewItem *); void slotMoveUp(void); void slotMoveDown(void); diff --git a/kmymoney2/dialogs/settings/ksettingshomedecl.ui b/kmymoney2/dialogs/settings/ksettingshomedecl.ui index 49f6251..c248697 100644 --- a/kmymoney2/dialogs/settings/ksettingshomedecl.ui +++ b/kmymoney2/dialogs/settings/ksettingshomedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsHomeDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsHomeDecl</cstring> </property> @@ -19,17 +19,17 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="2"> + <widget class="TQLayoutWidget" row="0" column="2"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -78,7 +78,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>70</height> @@ -97,14 +97,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>21</height> </size> </property> </spacer> - <widget class="QLabel" row="1" column="2" rowspan="1" colspan="2"> + <widget class="TQLabel" row="1" column="2" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -118,9 +118,9 @@ </property> <property name="text"> <string>Selected entries are shown on the home page of the application.<p> -Use the buttons and checkboxes to customize the layout of the home page.</string> +Use the buttons and checkboxes to customize the tqlayout of the home page.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -142,7 +142,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupbox</cstring> </property> @@ -153,7 +153,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>percentageLabel</cstring> </property> @@ -161,7 +161,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string <string>Percentage of default font size:</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_RememberFontSize</cstring> </property> @@ -193,7 +193,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -202,7 +202,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupbox2</cstring> </property> @@ -213,7 +213,7 @@ Use the buttons and checkboxes to customize the layout of the home page.</string <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>kcfg_ShowLimitInfo</cstring> </property> @@ -227,5 +227,5 @@ Use the buttons and checkboxes to customize the layout of the home page.</string </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp b/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp index db4dc1e..a17fd6e 100644 --- a/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp +++ b/kmymoney2/dialogs/settings/ksettingsonlinequotes.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> -#include <qcheckbox.h> +#include <tqregexp.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -39,10 +39,10 @@ #include "ksettingsonlinequotes.h" #include "kmymoney2/converter/webpricequote.h" -KSettingsOnlineQuotes::KSettingsOnlineQuotes(QWidget *parent, const char *name ) - : KSettingsOnlineQuotesDecl(parent, name) +KSettingsOnlineQuotes::KSettingsOnlineQuotes(TQWidget *tqparent, const char *name ) + : KSettingsOnlineQuotesDecl(tqparent, name) { - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList groups = WebPriceQuote::quoteSources(); loadList(true /*updateResetList*/); @@ -50,36 +50,36 @@ KSettingsOnlineQuotes::KSettingsOnlineQuotes(QWidget *parent, const char *name ) KIconLoader* il = KGlobal::iconLoader(); KGuiItem updateButtenItem( i18n("&Update" ), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it"), i18n("Use this to accept the modified data.")); m_updateButton->setGuiItem(updateButtenItem); KGuiItem deleteButtenItem( i18n( "&Delete" ), - QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete the selected source entry"), i18n("Use this to delete the selected online source entry")); m_deleteButton->setGuiItem(deleteButtenItem); KGuiItem newButtenItem( i18n( "&New..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new source entry for online quotes"), i18n("Use this to create a new entry for online quotes")); m_newButton->setGuiItem(newButtenItem); - connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdateEntry())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewEntry())); + connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateEntry())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewEntry())); - connect(m_quoteSourceList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*))); - connect(m_quoteSourceList, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*))); - connect(m_quoteSourceList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)), this, SLOT(slotEntryRenamed(QListViewItem*,const QString&,int))); + connect(m_quoteSourceList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*))); + connect(m_quoteSourceList, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*))); + connect(m_quoteSourceList, TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)), this, TQT_SLOT(slotEntryRenamed(TQListViewItem*,const TQString&,int))); - connect(m_editURL, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editDate, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editDateFormat, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editPrice, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_skipStripping, SIGNAL(toggled(bool)), this, SLOT(slotEntryChanged())); + connect(m_editURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editDate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editDateFormat, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editPrice, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_skipStripping, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotEntryChanged())); // FIXME deleting a source is not yet implemented m_deleteButton->setEnabled(false); @@ -87,30 +87,30 @@ KSettingsOnlineQuotes::KSettingsOnlineQuotes(QWidget *parent, const char *name ) void KSettingsOnlineQuotes::loadList(const bool updateResetList) { - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList groups = WebPriceQuote::quoteSources(); if(updateResetList) m_resetList.clear(); m_quoteSourceList->clear(); - QStringList::Iterator it; + TQStringList::Iterator it; for(it = groups.begin(); it != groups.end(); ++it) { - new QListViewItem(m_quoteSourceList, *it); + new TQListViewItem(m_quoteSourceList, *it); if(updateResetList) m_resetList += WebPriceQuoteSource(*it); } - QListViewItem* first = m_quoteSourceList->firstChild(); + TQListViewItem* first = m_quoteSourceList->firstChild(); if(first) m_quoteSourceList->setSelected(first, true); slotLoadWidgets(first); - m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); } void KSettingsOnlineQuotes::resetConfig(void) { - QStringList::ConstIterator it; - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList::ConstIterator it; + TQStringList groups = WebPriceQuote::quoteSources(); // delete all currently defined entries for(it = groups.begin(); it != groups.end(); ++it) { @@ -118,7 +118,7 @@ void KSettingsOnlineQuotes::resetConfig(void) } // and write back the one's from the reset list - QValueList<WebPriceQuoteSource>::ConstIterator itr; + TQValueList<WebPriceQuoteSource>::ConstIterator itr; for(itr = m_resetList.begin(); itr != m_resetList.end(); ++itr) { (*itr).write(); } @@ -126,7 +126,7 @@ void KSettingsOnlineQuotes::resetConfig(void) loadList(); } -void KSettingsOnlineQuotes::slotLoadWidgets(QListViewItem* item) +void KSettingsOnlineQuotes::slotLoadWidgets(TQListViewItem* item) { m_editURL->setEnabled(true); m_editSymbol->setEnabled(true); @@ -134,11 +134,11 @@ void KSettingsOnlineQuotes::slotLoadWidgets(QListViewItem* item) m_editDate->setEnabled(true); m_editDateFormat->setEnabled(true); m_skipStripping->setEnabled(true); - m_editURL->setText(QString()); - m_editSymbol->setText(QString()); - m_editPrice->setText(QString()); - m_editDate->setText(QString()); - m_editDateFormat->setText(QString()); + m_editURL->setText(TQString()); + m_editSymbol->setText(TQString()); + m_editPrice->setText(TQString()); + m_editDate->setText(TQString()); + m_editDateFormat->setText(TQString()); if(item) { m_currentItem = WebPriceQuoteSource(item->text(0)); @@ -190,17 +190,17 @@ void KSettingsOnlineQuotes::slotNewEntry(void) WebPriceQuoteSource newSource(i18n("New Quote Source")); newSource.write(); loadList(); - QListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0); + TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0); if(item) { m_quoteSourceList->setSelected(item, true); slotLoadWidgets(item); } } -void KSettingsOnlineQuotes::slotEntryRenamed(QListViewItem* item, const QString& text, int /* col */) +void KSettingsOnlineQuotes::slotEntryRenamed(TQListViewItem* item, const TQString& text, int /* col */) { int nameCount = 0; - QListViewItemIterator it(m_quoteSourceList); + TQListViewItemIterator it(m_quoteSourceList); while(it.current()) { if(it.current()->text(0) == text) ++nameCount; @@ -213,7 +213,7 @@ void KSettingsOnlineQuotes::slotEntryRenamed(QListViewItem* item, const QString& } else { item->setText(0, m_currentItem.m_name); } - m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); } #include "ksettingsonlinequotes.moc" diff --git a/kmymoney2/dialogs/settings/ksettingsonlinequotes.h b/kmymoney2/dialogs/settings/ksettingsonlinequotes.h index 8c0b6f0..ef9abe2 100644 --- a/kmymoney2/dialogs/settings/ksettingsonlinequotes.h +++ b/kmymoney2/dialogs/settings/ksettingsonlinequotes.h @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#ifndef KSETTINGSONLINEQUOTES_H -#define KSETTINGSONLINEQUOTES_H +#ifndef KSETTINGSONLINETQUOTES_H +#define KSETTINGSONLINETQUOTES_H // ---------------------------------------------------------------------------- // QT Includes @@ -33,8 +33,9 @@ class KSettingsOnlineQuotes : public KSettingsOnlineQuotesDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsOnlineQuotes(QWidget* parent = 0, const char *name = 0); + KSettingsOnlineQuotes(TQWidget* tqparent = 0, const char *name = 0); virtual ~KSettingsOnlineQuotes() {} void writeConfig(void) {} @@ -43,16 +44,16 @@ public: protected slots: void slotUpdateEntry(void); - void slotLoadWidgets(QListViewItem* item); + void slotLoadWidgets(TQListViewItem* item); void slotEntryChanged(void); void slotNewEntry(void); - void slotEntryRenamed(QListViewItem* item, const QString& text, int col); + void slotEntryRenamed(TQListViewItem* item, const TQString& text, int col); protected: void loadList(const bool updateResetList = false); private: - QValueList<WebPriceQuoteSource> m_resetList; + TQValueList<WebPriceQuoteSource> m_resetList; WebPriceQuoteSource m_currentItem; }; diff --git a/kmymoney2/dialogs/settings/ksettingsonlinequotesdecl.ui b/kmymoney2/dialogs/settings/ksettingsonlinequotesdecl.ui index 3077b78..88678ec 100644 --- a/kmymoney2/dialogs/settings/ksettingsonlinequotesdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsonlinequotesdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsOnlineQuotesDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsOnlineQuotesDecl</cstring> </property> @@ -12,7 +12,7 @@ <height>442</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -58,7 +58,7 @@ <bool>true</bool> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupParsing</cstring> </property> @@ -72,7 +72,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -80,7 +80,7 @@ <string>Date</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -115,7 +115,7 @@ <string>Enter the URL from which stock quotes will be fetched. <b>%1</b> will be replaced with the symbol for the security being quoted. For currency conversions, <b>%2</b> will be replaced with the currency to be quoted and <b>%1</b> with the currency the quote is based on.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -131,7 +131,7 @@ <string>Regular Expression to extract the date from the downloaded data</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -139,7 +139,7 @@ <string>Date Format</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -155,7 +155,7 @@ <string>Regular Expression to extract the date from the downloaded data</string> </property> </widget> - <widget class="QCheckBox" row="4" column="2"> + <widget class="TQCheckBox" row="4" column="2"> <property name="name"> <cstring>m_skipStripping</cstring> </property> @@ -177,9 +177,9 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> @@ -211,7 +211,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>240</width> <height>20</height> @@ -230,5 +230,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsplugins.cpp b/kmymoney2/dialogs/settings/ksettingsplugins.cpp index 0887315..b44e124 100644 --- a/kmymoney2/dialogs/settings/ksettingsplugins.cpp +++ b/kmymoney2/dialogs/settings/ksettingsplugins.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qstring.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -35,13 +35,13 @@ #include "kmymoney2/plugins/pluginloader.h" #include "ksettingsplugins.h" -KSettingsPlugins::KSettingsPlugins(QWidget* parent) - : QWidget(parent) +KSettingsPlugins::KSettingsPlugins(TQWidget* tqparent) + : TQWidget(tqparent) { - QVBoxLayout *layout = new QVBoxLayout(this); - KMyMoneyPlugin::PluginLoader::instance()->pluginSelectorWidget()->reparent(this, QPoint()); - layout->addWidget(KMyMoneyPlugin::PluginLoader::instance()->pluginSelectorWidget()); - layout->setSpacing(KDialog::spacingHint()); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); + KMyMoneyPlugin::PluginLoader::instance()->pluginSelectorWidget()->reparent(this, TQPoint()); + tqlayout->addWidget(KMyMoneyPlugin::PluginLoader::instance()->pluginSelectorWidget()); + tqlayout->setSpacing(KDialog::spacingHint()); } KSettingsPlugins::~KSettingsPlugins() diff --git a/kmymoney2/dialogs/settings/ksettingsplugins.h b/kmymoney2/dialogs/settings/ksettingsplugins.h index 9c36f67..0106afb 100644 --- a/kmymoney2/dialogs/settings/ksettingsplugins.h +++ b/kmymoney2/dialogs/settings/ksettingsplugins.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -29,13 +29,14 @@ // ---------------------------------------------------------------------------- // Project Includes -class KSettingsPlugins : public QWidget +class KSettingsPlugins : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KSettingsPlugins(QWidget* parent = 0); + KSettingsPlugins(TQWidget* tqparent = 0); ~KSettingsPlugins(); public slots: diff --git a/kmymoney2/dialogs/settings/ksettingsregister.cpp b/kmymoney2/dialogs/settings/ksettingsregister.cpp index 9f1fda2..e6a278e 100644 --- a/kmymoney2/dialogs/settings/ksettingsregister.cpp +++ b/kmymoney2/dialogs/settings/ksettingsregister.cpp @@ -28,8 +28,8 @@ #include "ksettingsregister.h" #include <kmymoney/transactionsortoption.h> -KSettingsRegister::KSettingsRegister(QWidget* parent, const char* name) : - KSettingsRegisterDecl(parent, name) +KSettingsRegister::KSettingsRegister(TQWidget* tqparent, const char* name) : + KSettingsRegisterDecl(tqparent, name) { // hide the internally used text fields kcfg_sortNormalView->hide(); @@ -37,14 +37,14 @@ KSettingsRegister::KSettingsRegister(QWidget* parent, const char* name) : kcfg_sortSearchView->hide(); // setup connections, so that the sort optios get loaded once the edit fields are filled - connect(kcfg_sortNormalView, SIGNAL(textChanged()), this, SLOT(slotLoadNormal())); - connect(kcfg_sortReconcileView, SIGNAL(textChanged()), this, SLOT(slotLoadReconcile())); - connect(kcfg_sortSearchView, SIGNAL(textChanged()), this, SLOT(slotLoadSearch())); + connect(kcfg_sortNormalView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadNormal())); + connect(kcfg_sortReconcileView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadReconcile())); + connect(kcfg_sortSearchView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadSearch())); // setup connections, so that changes by the user are forwarded to the (hidden) edit fields - connect(m_sortNormalView, SIGNAL(settingsChanged(const QString&)), kcfg_sortNormalView, SLOT(setText(const QString&))); - connect(m_sortReconcileView, SIGNAL(settingsChanged(const QString&)), kcfg_sortReconcileView, SLOT(setText(const QString&))); - connect(m_sortSearchView, SIGNAL(settingsChanged(const QString&)), kcfg_sortSearchView, SLOT(setText(const QString&))); + connect(m_sortNormalView, TQT_SIGNAL(settingsChanged(const TQString&)), kcfg_sortNormalView, TQT_SLOT(setText(const TQString&))); + connect(m_sortReconcileView, TQT_SIGNAL(settingsChanged(const TQString&)), kcfg_sortReconcileView, TQT_SLOT(setText(const TQString&))); + connect(m_sortSearchView, TQT_SIGNAL(settingsChanged(const TQString&)), kcfg_sortSearchView, TQT_SLOT(setText(const TQString&))); } KSettingsRegister::~KSettingsRegister() @@ -54,21 +54,21 @@ KSettingsRegister::~KSettingsRegister() void KSettingsRegister::slotLoadNormal(void) { // only need this once - disconnect(kcfg_sortNormalView, SIGNAL(textChanged()), this, SLOT(slotLoadNormal())); + disconnect(kcfg_sortNormalView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadNormal())); m_sortNormalView->setSettings(kcfg_sortNormalView->text()); } void KSettingsRegister::slotLoadReconcile(void) { // only need this once - disconnect(kcfg_sortReconcileView, SIGNAL(textChanged()), this, SLOT(slotLoadReconcile())); + disconnect(kcfg_sortReconcileView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadReconcile())); m_sortReconcileView->setSettings(kcfg_sortReconcileView->text()); } void KSettingsRegister::slotLoadSearch(void) { // only need this once - disconnect(kcfg_sortSearchView, SIGNAL(textChanged()), this, SLOT(slotLoadSearch())); + disconnect(kcfg_sortSearchView, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotLoadSearch())); m_sortSearchView->setSettings(kcfg_sortSearchView->text()); } diff --git a/kmymoney2/dialogs/settings/ksettingsregister.h b/kmymoney2/dialogs/settings/ksettingsregister.h index bcad7eb..7fa475f 100644 --- a/kmymoney2/dialogs/settings/ksettingsregister.h +++ b/kmymoney2/dialogs/settings/ksettingsregister.h @@ -31,9 +31,10 @@ class KSettingsRegister : public KSettingsRegisterDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsRegister(QWidget* parent = 0, const char* name = 0); + KSettingsRegister(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsRegister(); protected slots: diff --git a/kmymoney2/dialogs/settings/ksettingsregisterdecl.ui b/kmymoney2/dialogs/settings/ksettingsregisterdecl.ui index c03807e..1ad71bf 100644 --- a/kmymoney2/dialogs/settings/ksettingsregisterdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsregisterdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsRegisterDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsRegisterDecl</cstring> </property> @@ -19,11 +19,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tab</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -34,7 +34,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowGrid</cstring> </property> @@ -45,7 +45,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_LedgerLens</cstring> </property> @@ -59,7 +59,7 @@ <string>Using the ledger lens shows the details for the transaction that has focus in the ledger. Usually, when using the transaction form, only a one line summary is displayed for each transaction as the details are shown in the form.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_TransactionForm</cstring> </property> @@ -67,7 +67,7 @@ <string>Show transaction form</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_AlwaysShowNrField</cstring> </property> @@ -78,7 +78,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowFancyMarker</cstring> </property> @@ -92,7 +92,7 @@ <string>Draws a larger header above each group of transaction. The grouping depends on the current sort order.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_ShowFiscalMarker</cstring> </property> @@ -110,7 +110,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -119,7 +119,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>sorting</cstring> </property> @@ -130,11 +130,11 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>tabWidget3</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -157,7 +157,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -180,7 +180,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -214,7 +214,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -225,7 +225,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_CopyTypeToNr</cstring> </property> @@ -233,7 +233,7 @@ <string>Insert transaction type into No. field for new transactions</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_AutoIncCheckNumber</cstring> </property> @@ -244,7 +244,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_FocusChangeIsEnter</cstring> </property> @@ -252,7 +252,7 @@ <string>Keep changes when selecting a different transaction/split</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_EnterMovesBetweenFields</cstring> </property> @@ -263,7 +263,7 @@ <string></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_stringMatchFromStart</cstring> </property> @@ -274,15 +274,15 @@ <string>Mark this option, if you always want to match names e.g. for payees from the start. If unset, any substring is matched.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -323,7 +323,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> @@ -332,7 +332,7 @@ </spacer> </hbox> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>kcfg_AutoFillTransaction</cstring> </property> @@ -349,7 +349,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton1</cstring> </property> @@ -360,15 +360,15 @@ <string>Don't do autofill of transaction data at all.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton2</cstring> </property> @@ -398,7 +398,7 @@ Selecting 0% will list all transactions.</string> <string>Two transactions are usually treated identical for autofill, if they refer the same accounts. They are treated as different transactions though, when their amount varies by more than the percentage given here.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -409,7 +409,7 @@ Selecting 0% will list all transactions.</string> </widget> </hbox> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton3</cstring> </property> @@ -432,7 +432,7 @@ Selecting 0% will list all transactions.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -441,7 +441,7 @@ Selecting 0% will list all transactions.</string> </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -452,15 +452,15 @@ Selecting 0% will list all transactions.</string> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -498,7 +498,7 @@ Selecting 0% will list all transactions.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -507,7 +507,7 @@ Selecting 0% will list all transactions.</string> </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_askForPayeeCategory</cstring> </property> @@ -531,7 +531,7 @@ Selecting 0% will list all transactions.</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>60</height> @@ -545,5 +545,8 @@ Selecting 0% will list all transactions.</string> </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/transactionsortoption.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/settings/ksettingsschedules.cpp b/kmymoney2/dialogs/settings/ksettingsschedules.cpp index 6f9a77c..05dc80f 100644 --- a/kmymoney2/dialogs/settings/ksettingsschedules.cpp +++ b/kmymoney2/dialogs/settings/ksettingsschedules.cpp @@ -25,8 +25,8 @@ #include "ksettingsschedules.h" -KSettingsSchedules::KSettingsSchedules(QWidget* parent, const char* name) : - KSettingsSchedulesDecl(parent, name) +KSettingsSchedules::KSettingsSchedules(TQWidget* tqparent, const char* name) : + KSettingsSchedulesDecl(tqparent, name) { } diff --git a/kmymoney2/dialogs/settings/ksettingsschedules.h b/kmymoney2/dialogs/settings/ksettingsschedules.h index caa7d33..06e5af6 100644 --- a/kmymoney2/dialogs/settings/ksettingsschedules.h +++ b/kmymoney2/dialogs/settings/ksettingsschedules.h @@ -32,9 +32,10 @@ class KSettingsSchedules : public KSettingsSchedulesDecl { Q_OBJECT + TQ_OBJECT public: - KSettingsSchedules(QWidget* parent = 0, const char* name = 0); + KSettingsSchedules(TQWidget* tqparent = 0, const char* name = 0); ~KSettingsSchedules(); }; #endif diff --git a/kmymoney2/dialogs/settings/ksettingsschedulesdecl.ui b/kmymoney2/dialogs/settings/ksettingsschedulesdecl.ui index fca9aa9..4f7bd28 100644 --- a/kmymoney2/dialogs/settings/ksettingsschedulesdecl.ui +++ b/kmymoney2/dialogs/settings/ksettingsschedulesdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSettingsSchedulesDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSettingsSchedulesDecl</cstring> </property> @@ -19,7 +19,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox6</cstring> </property> @@ -30,7 +30,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_CheckSchedule</cstring> </property> @@ -38,7 +38,7 @@ <string>Check schedules on startup</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_dayCountFrame</cstring> </property> @@ -55,7 +55,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -63,7 +63,7 @@ <string>Enter transactions this number of days in advance</string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>kcfg_CheckSchedulePreview</cstring> </property> @@ -72,15 +72,15 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -103,7 +103,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -122,7 +122,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -141,5 +141,5 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/dialogs/transactioneditor.cpp b/kmymoney2/dialogs/transactioneditor.cpp index c53d3c6..91f60b8 100644 --- a/kmymoney2/dialogs/transactioneditor.cpp +++ b/kmymoney2/dialogs/transactioneditor.cpp @@ -18,12 +18,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qapplication.h> -#include <qeventloop.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qtooltip.h> +#include <tqlabel.h> +#include <tqapplication.h> +#include <tqeventloop.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqtooltip.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -60,7 +60,7 @@ using namespace KMyMoneyRegister; using namespace KMyMoneyTransactionForm; -TransactionEditor::TransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) : +TransactionEditor::TransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) : m_transactions(list), m_regForm(regForm), m_item(item), @@ -70,14 +70,14 @@ TransactionEditor::TransactionEditor(TransactionEditorContainer* regForm, KMyMon m_openEditSplits(false) { m_item->startEditMode(); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotUpdateAccount())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotUpdateAccount())); } TransactionEditor::~TransactionEditor() { // Make sure the widgets do not send out signals to the editor anymore // After all, the editor is about to die - QMap<QString, QWidget*>::iterator it_w; + TQMap<TQString, TQWidget*>::iterator it_w; for(it_w = m_editWidgets.begin(); it_w != m_editWidgets.end(); ++it_w) { (*it_w)->disconnect(this); } @@ -87,7 +87,7 @@ TransactionEditor::~TransactionEditor() emit finishEdit(m_transactions); } -void TransactionEditor::slotUpdateAccount(const QString& id) +void TransactionEditor::slotUpdateAccount(const TQString& id) { m_account = MyMoneyFile::instance()->account(id); setupPrecision(); @@ -103,24 +103,24 @@ void TransactionEditor::slotUpdateAccount(void) void TransactionEditor::setupPrecision(void) { const int prec = (m_account.id().isEmpty()) ? 2 : MyMoneyMoney::denomToPrec(m_account.fraction()); - QStringList widgets = QStringList::split(",", "amount,deposit,payment"); - QStringList::const_iterator it_w; + TQStringList widgets = TQStringList::split(",", "amount,deposit,payment"); + TQStringList::const_iterator it_w; for(it_w = widgets.begin(); it_w != widgets.end(); ++it_w) { - QWidget * w; + TQWidget * w; if((w = haveWidget(*it_w)) != 0) { dynamic_cast<kMyMoneyEdit*>(w)->setPrecision(prec); } } } -void TransactionEditor::setup(QWidgetList& tabOrderWidgets, const MyMoneyAccount& account, KMyMoneyRegister::Action action) +void TransactionEditor::setup(TQWidgetList& tabOrderWidgets, const MyMoneyAccount& account, KMyMoneyRegister::Action action) { m_account = account; m_initialAction = action; createEditWidgets(); m_regForm->arrangeEditWidgets(m_editWidgets, m_item); m_regForm->tabOrder(tabOrderWidgets, m_item); - QWidget* w = haveWidget("tabbar"); + TQWidget* w = haveWidget("tabbar"); if(w) tabOrderWidgets.append(w); loadEditWidgets(action); @@ -135,7 +135,7 @@ void TransactionEditor::clearFinalWidgets(void) m_finalEditWidgets.clear(); } -void TransactionEditor::addFinalWidget(const QWidget* w) +void TransactionEditor::addFinalWidget(const TQWidget* w) { if(w) { m_finalEditWidgets << w; @@ -146,11 +146,11 @@ void TransactionEditor::slotReloadEditWidgets(void) { } -bool TransactionEditor::eventFilter(QObject* o, QEvent* e) +bool TransactionEditor::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; - if(o == haveWidget("number")) { - if(e->type() == QEvent::MouseButtonDblClick) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(haveWidget("number"))) { + if(e->type() == TQEvent::MouseButtonDblClick) { emit assignNumber(); rc = true; } @@ -159,15 +159,15 @@ bool TransactionEditor::eventFilter(QObject* o, QEvent* e) // if the object is a widget, the event is a key press event and // the object is one of our edit widgets, then .... if(o->isWidgetType() - && (e->type() == QEvent::KeyPress) - && m_editWidgets.values().contains(dynamic_cast<QWidget*>(o))) { - QKeyEvent* k = dynamic_cast<QKeyEvent*>(e); - if((k->state() & Qt::KeyButtonMask) == 0) { + && (e->type() == TQEvent::KeyPress) + && m_editWidgets.values().tqcontains(dynamic_cast<TQWidget*>(o))) { + TQKeyEvent* k = dynamic_cast<TQKeyEvent*>(e); + if((k->state() & TQt::KeyButtonMask) == 0) { bool isFinal = false; - QValueList<const QWidget*>::const_iterator it_w; + TQValueList<const TQWidget*>::const_iterator it_w; switch(k->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: // we check, if the object is one of the m_finalEditWidgets and if it's // a kMyMoneyEdit object that the value is not 0. If any of that is the // case, it's the final object. In other cases, we convert the enter @@ -176,7 +176,7 @@ bool TransactionEditor::eventFilter(QObject* o, QEvent* e) // we treat the return/enter key as such. if(KMyMoneyGlobalSettings::enterMovesBetweenFields()) { for(it_w = m_finalEditWidgets.begin(); !isFinal && it_w != m_finalEditWidgets.end(); ++it_w) { - if(*it_w == o) { + if(TQT_BASE_OBJECT_CONST(*it_w) == TQT_BASE_OBJECT(o)) { if(dynamic_cast<const kMyMoneyEdit*>(*it_w)) { isFinal = !(dynamic_cast<const kMyMoneyEdit*>(*it_w)->value().isZero()); } else @@ -188,25 +188,25 @@ bool TransactionEditor::eventFilter(QObject* o, QEvent* e) // for the non-final objects, we treat the return key as a TAB if(!isFinal) { - QKeyEvent evt(e->type(), - Key_Tab, 0, k->state(), QString::null, + TQKeyEvent evt(e->type(), + Key_Tab, 0, k->state(), TQString(), k->isAutoRepeat(), k->count()); - QApplication::sendEvent( o, &evt ); + TQApplication::sendEvent( o, &evt ); // in case of a category item and the split button is visible // send a second event so that we get passed the button. if(dynamic_cast<KMyMoneyCategory*>(o) && dynamic_cast<KMyMoneyCategory*>(o)->splitButton()) - QApplication::sendEvent( o, &evt ); + TQApplication::sendEvent( o, &evt ); } else { - QTimer::singleShot(0, this, SIGNAL(returnPressed())); + TQTimer::singleShot(0, this, TQT_SIGNAL(returnPressed())); } // don't process any further rc = true; break; - case Qt::Key_Escape: - QTimer::singleShot(0, this, SIGNAL(escapePressed())); + case TQt::Key_Escape: + TQTimer::singleShot(0, this, TQT_SIGNAL(escapePressed())); break; } } @@ -214,13 +214,13 @@ bool TransactionEditor::eventFilter(QObject* o, QEvent* e) return rc; } -void TransactionEditor::slotNumberChanged(const QString& txt) +void TransactionEditor::slotNumberChanged(const TQString& txt) { kMyMoneyLineEdit* number = dynamic_cast<kMyMoneyLineEdit*>(haveWidget("number")); if(number) { if(MyMoneyFile::instance()->checkNoUsed(m_account.id(), txt)) { - if(KMessageBox::questionYesNo(m_regForm, QString("<qt>")+i18n("The number <b>%1</b> has already been used in account <b>%2</b>. Do you want to replace it with the next available number?").arg(txt).arg(m_account.name())+QString("</qt>"), i18n("Duplicate number")) == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(m_regForm, TQString("<qt>")+i18n("The number <b>%1</b> has already been used in account <b>%2</b>. Do you want to replace it with the next available number?").tqarg(txt).tqarg(m_account.name())+TQString("</qt>"), i18n("Duplicate number")) == KMessageBox::Yes) { number->loadText(KMyMoneyUtils::nextCheckNumber(m_account)); } } @@ -229,18 +229,18 @@ void TransactionEditor::slotNumberChanged(const QString& txt) void TransactionEditor::slotUpdateButtonState(void) { - QString reason; + TQString reason; emit transactionDataSufficient(isComplete(reason)); } -QWidget* TransactionEditor::haveWidget(const QString& name) const +TQWidget* TransactionEditor::haveWidget(const TQString& name) const { return m_editWidgets.haveWidget(name); } int TransactionEditor::slotEditSplits(void) { - return QDialog::Rejected; + return TQDialog::Rejected; } #if 0 @@ -301,12 +301,12 @@ int TransactionEditor::slotEditSplits(void) } acc = MyMoneyAccount(); } - QString msg; - msg = QString("<p>")+i18n("This transaction has more than two splits and is based on a different currency (%1). Using this account to modify the transaction is currently not very well supported by KMyMoney and may result in false results.").arg(sec.name())+QString(" "); + TQString msg; + msg = TQString("<p>")+i18n("This transaction has more than two splits and is based on a different currency (%1). Using this account to modify the transaction is currently not very well supported by KMyMoney and may result in false results.").tqarg(sec.name())+TQString(" "); if(acc.id().isEmpty()) { msg += i18n("KMyMoney was not able to find a more appropriate account to edit this transaction. Nevertheless, you are allowed to modify the transaction. If you don't want to edit this transaction, please cancel from editing next."); } else { - msg += i18n("Using e.g. <b>%1</b> to edit this transaction is a better choice. Nevertheless, you are allowed to modify the transaction. If you want to use the suggested account instead, please cancel from editing next and change the view to the suggested account.").arg(acc.name()); + msg += i18n("Using e.g. <b>%1</b> to edit this transaction is a better choice. Nevertheless, you are allowed to modify the transaction. If you want to use the suggested account instead, please cancel from editing next and change the view to the suggested account.").tqarg(acc.name()); } KMessageBox::information(0, msg); } @@ -405,16 +405,16 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account) // this will happen and allow him to stop the processing (rc = false) try { - QString msg; + TQString msg; if(firstTimeMultiCurrency) { firstTimeMultiCurrency = false; if(!isMultiSelection()) { - msg = i18n("This transaction has more than two splits and is originally based on a different currency (%1). Using this account to modify the transaction may result in rounding errors. Do you want to continue?").arg(osec.name()); + msg = i18n("This transaction has more than two splits and is originally based on a different currency (%1). Using this account to modify the transaction may result in rounding errors. Do you want to continue?").tqarg(osec.name()); } else { - msg = i18n("At least one of the selected transactions has more than two splits and is originally based on a different currency (%1). Using this account to modify the transactions may result in rounding errors. Do you want to continue?").arg(osec.name()); + msg = i18n("At least one of the selected transactions has more than two splits and is originally based on a different currency (%1). Using this account to modify the transactions may result in rounding errors. Do you want to continue?").tqarg(osec.name()); } - if(KMessageBox::warningContinueCancel(0, QString("<qt>%1</qt>").arg(msg)) == KMessageBox::Cancel) { + if(KMessageBox::warningContinueCancel(0, TQString("<qt>%1</qt>").tqarg(msg)) == KMessageBox::Cancel) { rc = false; } } @@ -423,7 +423,7 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account) MyMoneyMoney price; if(!(*it_t).split().shares().isZero() && !(*it_t).split().value().isZero()) price = (*it_t).split().shares() / (*it_t).split().value(); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; MyMoneySplit& mySplit = (*it_t).split(); for(it_s = (*it_t).transaction().splits().begin(); it_s != (*it_t).transaction().splits().end(); ++it_s) { MyMoneySplit s = (*it_s); @@ -472,9 +472,9 @@ bool TransactionEditor::canAssignNumber(void) const return (number != 0) && (number->text().isEmpty()); } -void TransactionEditor::setupCategoryWidget(KMyMoneyCategory* category, const QValueList<MyMoneySplit>& splits, QString& categoryId, const char* splitEditSlot, bool /* allowObjectCreation */) +void TransactionEditor::setupCategoryWidget(KMyMoneyCategory* category, const TQValueList<MyMoneySplit>& splits, TQString& categoryId, const char* splitEditSlot, bool /* allowObjectCreation */) { - disconnect(category, SIGNAL(focusIn()), this, splitEditSlot); + disconnect(category, TQT_SIGNAL(focusIn()), this, splitEditSlot); #if 0 // FIXME must deal with the logic that suppressObjectCreation is // automatically turned off when the createItem() signal is connected @@ -484,13 +484,13 @@ void TransactionEditor::setupCategoryWidget(KMyMoneyCategory* category, const QV switch(splits.count()) { case 0: - categoryId = QString(); + categoryId = TQString(); if(!category->currentText().isEmpty()) { category->setCurrentText(); // make sure, we don't see the selector category->completion()->hide(); } - category->completion()->setSelected(QString()); + category->completion()->setSelected(TQString()); break; case 1: @@ -500,9 +500,9 @@ void TransactionEditor::setupCategoryWidget(KMyMoneyCategory* category, const QV break; default: - categoryId = QString(); + categoryId = TQString(); category->setSplitTransaction(); - connect(category, SIGNAL(focusIn()), this, splitEditSlot); + connect(category, TQT_SIGNAL(focusIn()), this, splitEditSlot); #if 0 // FIXME must deal with the logic that suppressObjectCreation is // automatically turned off when the createItem() signal is connected @@ -513,17 +513,17 @@ void TransactionEditor::setupCategoryWidget(KMyMoneyCategory* category, const QV } } -bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, bool suppressBalanceWarnings) +bool TransactionEditor::enterTransactions(TQString& newId, bool askForSchedule, bool suppressBalanceWarnings) { - newId = QString(); + newId = TQString(); MyMoneyFile* file = MyMoneyFile::instance(); // make sure to run through all stuff that is tied to 'focusout events'. - m_regForm->parentWidget()->setFocus(); - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + m_regForm->tqparentWidget()->setFocus(); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); // we don't need to update our widgets anymore, so we just disconnect the signal - disconnect(file, SIGNAL(dataChanged()), this, SLOT(slotReloadEditWidgets())); + disconnect(file, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadEditWidgets())); KMyMoneyRegister::SelectedTransactions::iterator it_t; MyMoneyTransaction t; @@ -538,7 +538,7 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b // collect the transactions to be stored in the engine in a local // list first, so that the user has a chance to interrupt the storage // process - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; bool storeTransactions = true; // collect transactions @@ -562,12 +562,12 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b MyMoneyFileTransaction ft; try { - QValueList<MyMoneyTransaction>::iterator it_ts; - QMap<QString, bool> minBalanceEarly; - QMap<QString, bool> minBalanceAbsolute; - QMap<QString, bool> maxCreditEarly; - QMap<QString, bool> maxCreditAbsolute; - QMap<QString, bool> accountIds; + TQValueList<MyMoneyTransaction>::iterator it_ts; + TQMap<TQString, bool> minBalanceEarly; + TQMap<TQString, bool> minBalanceAbsolute; + TQMap<TQString, bool> maxCreditEarly; + TQMap<TQString, bool> maxCreditAbsolute; + TQMap<TQString, bool> accountIds; for(it_ts = list.begin(); it_ts != list.end(); ++it_ts) { // if we have a categorization, make sure we remove @@ -576,7 +576,7 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b (*it_ts).setImported(false); // create information about min and max balances - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = (*it_ts).splits().begin(); it_s != (*it_ts).splits().end(); ++it_s) { MyMoneyAccount acc = file->account((*it_s).accountId()); accountIds[acc.id()] = true; @@ -599,19 +599,19 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b if((*it_ts).id().isEmpty()) { bool enter = true; - if(askForSchedule && (*it_ts).postDate() > QDate::currentDate()) { + if(askForSchedule && (*it_ts).postDate() > TQDate::tqcurrentDate()) { KGuiItem enterItem; KIconLoader* il = KGlobal::iconLoader(); KGuiItem enterButton( i18n("&Enter" ), - QIconSet(il->loadIcon("kontact_journal", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("kontact_journal", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it"), i18n("Use this to enter the transaction into the ledger.")); KGuiItem scheduleButton( i18n("&Schedule" ), - QIconSet(il->loadIcon("kontact_date", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("kontact_date", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it as schedule"), i18n("Use this to schedule the transaction for later entry into the ledger.")); - enter = KMessageBox::questionYesNo(m_regForm, QString("<qt>%1</qt>").arg(i18n("The transaction you are about to enter has a post date in the future.<br/><br/>Do you want to enter it in the ledger or add it to the schedules?")), i18n("Dialog caption for 'Enter or schedule' dialog", "Enter or schedule?"), enterButton, scheduleButton, "EnterOrScheduleTransactionInFuture") == KMessageBox::Yes; + enter = KMessageBox::questionYesNo(m_regForm, TQString("<qt>%1</qt>").tqarg(i18n("The transaction you are about to enter has a post date in the future.<br/><br/>Do you want to enter it in the ledger or add it to the schedules?")), i18n("Dialog caption for 'Enter or schedule' dialog", "Enter or schedule?"), enterButton, scheduleButton, "EnterOrScheduleTransactionInFuture") == KMessageBox::Yes; } if(enter) { // add new transaction @@ -623,7 +623,7 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b t = (*it_ts); // if a new transaction has a valid number, keep it with the account - QString number = (*it_ts).splits()[0].number(); + TQString number = (*it_ts).splits()[0].number(); if(!number.isEmpty()) { m_account.setValue("lastNumberUsed", number); file->modifyAccount(m_account); @@ -667,37 +667,37 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b ft.commit(); // now analyse the balances and spit out warnings to the user - QMap<QString, bool>::const_iterator it_a; + TQMap<TQString, bool>::const_iterator it_a; if(!suppressBalanceWarnings) { for(it_a = accountIds.begin(); it_a != accountIds.end(); ++it_a) { - QString msg; + TQString msg; MyMoneyAccount acc = file->account(it_a.key()); MyMoneyMoney balance = file->balance(acc.id()); const MyMoneySecurity& sec = file->security(acc.currencyId()); - QString key; + TQString key; key = "minBalanceEarly"; if(!acc.value(key).isEmpty()) { if(minBalanceEarly[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) { - msg = QString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the warning balance of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); + msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the warning balance of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); } } key = "minBalanceAbsolute"; if(!acc.value(key).isEmpty()) { if(minBalanceAbsolute[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) { - msg = QString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the minimum balance of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); + msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the minimum balance of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); } } key = "maxCreditEarly"; if(!acc.value(key).isEmpty()) { if(maxCreditEarly[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) { - msg = QString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the maximum credit warning limit of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); + msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the maximum credit warning limit of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); } } key = "maxCreditAbsolute"; if(!acc.value(key).isEmpty()) { if(maxCreditAbsolute[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) { - msg = QString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the maximum credit limit of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); + msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the maximum credit limit of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec))); } } @@ -713,7 +713,7 @@ bool TransactionEditor::enterTransactions(QString& newId, bool askForSchedule, b } emit statusProgress(-1, -1); - emit statusMsg(QString()); + emit statusMsg(TQString()); } return storeTransactions; @@ -724,7 +724,7 @@ StdTransactionEditor::StdTransactionEditor() { } -StdTransactionEditor::StdTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) : +StdTransactionEditor::StdTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) : TransactionEditor(regForm, item, list, lastPostDate), m_inUpdateVat(false) { @@ -738,15 +738,15 @@ StdTransactionEditor::~StdTransactionEditor() } } -bool StdTransactionEditor::eventFilter(QObject* o, QEvent* e) +bool StdTransactionEditor::eventFilter(TQObject* o, TQEvent* e) { bool rc = TransactionEditor::eventFilter(o, e); #if 0 // this is sofar dead code here, as the focus out event for Comboboxes // never comes along here. I don't know why (ipwizard - 2009-10-03) - if((e->type() == QEvent::FocusOut) - && (haveWidget("payee") == dynamic_cast<QWidget*>(o))) { + if((e->type() == TQEvent::FocusOut) + && (haveWidget("payee") == dynamic_cast<TQWidget*>(o))) { // loosing the focus on the payee widget? qDebug("Loosing focus on payee"); KMyMoneyPayeeCombo* p = dynamic_cast<KMyMoneyPayeeCombo*>(haveWidget("payee")); @@ -762,25 +762,25 @@ void StdTransactionEditor::createEditWidgets(void) KMyMoneyCategory* account = new KMyMoneyCategory; account->setHint(i18n("Account")); m_editWidgets["account"] = account; - connect(account, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(account, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateAccount(const QString&))); + connect(account, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(account, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateAccount(const TQString&))); KMyMoneyPayeeCombo* payee = new KMyMoneyPayeeCombo; payee->setHint(i18n("Payer/Receiver")); m_editWidgets["payee"] = payee; - connect(payee, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(payee, SIGNAL(createItem(const QString&, QString&)), this, SIGNAL(createPayee(const QString&, QString&))); - connect(payee, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); - connect(payee, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdatePayee(const QString&))); + connect(payee, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(payee, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SIGNAL(createPayee(const TQString&, TQString&))); + connect(payee, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); + connect(payee, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdatePayee(const TQString&))); KMyMoneyCategory* category = new KMyMoneyCategory(0, 0, true); category->setHint(i18n("Category/Account")); m_editWidgets["category"] = category; - connect(category, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateCategory(const QString&))); - connect(category, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); - connect(category, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateCategory(const QString&, QString&))); - connect(category, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); - connect(category->splitButton(), SIGNAL(clicked()), this, SLOT(slotEditSplits())); + connect(category, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateCategory(const TQString&))); + connect(category, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); + connect(category, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateCategory(const TQString&, TQString&))); + connect(category, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); + connect(category->splitButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEditSplits())); category->splitButton()->setDisabled(true); KTextEdit* memo = new KTextEdit; @@ -812,41 +812,41 @@ void StdTransactionEditor::createEditWidgets(void) kMyMoneyLineEdit* number = new kMyMoneyLineEdit; number->setHint(i18n("Number")); m_editWidgets["number"] = number; - connect(number, SIGNAL(lineChanged(const QString&)), this, SLOT(slotNumberChanged(const QString&))); + connect(number, TQT_SIGNAL(lineChanged(const TQString&)), this, TQT_SLOT(slotNumberChanged(const TQString&))); // number->installEventFilter(this); } m_editWidgets["postdate"] = new kMyMoneyDateInput; - connect(m_editWidgets["postdate"], SIGNAL(dateChanged(const QDate&)), this, SLOT(slotUpdateButtonState())); + connect(m_editWidgets["postdate"], TQT_SIGNAL(dateChanged(const TQDate&)), this, TQT_SLOT(slotUpdateButtonState())); kMyMoneyEdit* value = new kMyMoneyEdit; m_editWidgets["amount"] = value; value->setResetButtonVisible(false); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateAmount(const QString&))); - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateAmount(const TQString&))); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); value = new kMyMoneyEdit; m_editWidgets["payment"] = value; value->setResetButtonVisible(false); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdatePayment(const QString&))); - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdatePayment(const TQString&))); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); value = new kMyMoneyEdit; m_editWidgets["deposit"] = value; value->setResetButtonVisible(false); - connect(value, SIGNAL(valueChanged(const QString&)), this, SLOT(slotUpdateDeposit(const QString&))); - connect(value, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateButtonState())); + connect(value, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotUpdateDeposit(const TQString&))); + connect(value, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); KMyMoneyCashFlowCombo* cashflow = new KMyMoneyCashFlowCombo(0, 0, m_account.accountGroup()); m_editWidgets["cashflow"] = cashflow; - connect(cashflow, SIGNAL(directionSelected(KMyMoneyRegister::CashFlowDirection)), this, SLOT(slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirection))); - connect(cashflow, SIGNAL(directionSelected(KMyMoneyRegister::CashFlowDirection)), this, SLOT(slotUpdateButtonState())); + connect(cashflow, TQT_SIGNAL(directionSelected(KMyMoneyRegister::CashFlowDirection)), this, TQT_SLOT(slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirection))); + connect(cashflow, TQT_SIGNAL(directionSelected(KMyMoneyRegister::CashFlowDirection)), this, TQT_SLOT(slotUpdateButtonState())); KMyMoneyReconcileCombo* reconcile = new KMyMoneyReconcileCombo; m_editWidgets["status"] = reconcile; - connect(reconcile, SIGNAL(itemSelected(const QString&)), this, SLOT(slotUpdateButtonState())); + connect(reconcile, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotUpdateButtonState())); - KMyMoneyRegister::QWidgetContainer::iterator it_w; + KMyMoneyRegister::TQWidgetContainer::iterator it_w; for(it_w = m_editWidgets.begin(); it_w != m_editWidgets.end(); ++it_w) { (*it_w)->installEventFilter(this); } @@ -857,9 +857,9 @@ void StdTransactionEditor::createEditWidgets(void) cashflow->removeDontCare(); } - QLabel* label; - m_editWidgets["category-label"] = label = new QLabel(i18n("Category"), 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + TQLabel* label; + m_editWidgets["category-label"] = label = new TQLabel(i18n("Category"), 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); // create a copy of tabbar above the form (if we are created for a form) KMyMoneyTransactionForm::TransactionForm* form = dynamic_cast<KMyMoneyTransactionForm::TransactionForm*>(m_regForm); @@ -868,29 +868,29 @@ void StdTransactionEditor::createEditWidgets(void) KMyMoneyTransactionForm::TabBar* tabbar = new KMyMoneyTransactionForm::TabBar; m_editWidgets["tabbar"] = tabbar; tabbar->copyTabs(form->tabBar()); - connect(tabbar, SIGNAL(tabSelected(int)), this, SLOT(slotUpdateAction(int))); + connect(tabbar, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(slotUpdateAction(int))); } - label = new QLabel(i18n("Date"), 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel(i18n("Date"), 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["date-label"] = label; - label = new QLabel(i18n("Number"), 0); - label->setAlignment(Qt::AlignVCenter | Qt::DontClip); + label = new TQLabel(i18n("Number"), 0); + label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip); m_editWidgets["number-label"] = label; setupPrecision(); } -void StdTransactionEditor::setupCategoryWidget(QString& categoryId) +void StdTransactionEditor::setupCategoryWidget(TQString& categoryId) { - TransactionEditor::setupCategoryWidget(dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]), m_splits, categoryId, SLOT(slotEditSplits())); + TransactionEditor::setupCategoryWidget(dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]), m_splits, categoryId, TQT_SLOT(slotEditSplits())); if(m_splits.count() == 1) m_shares = m_splits[0].shares(); } -bool StdTransactionEditor::isTransfer(const QString& accId1, const QString& accId2) const +bool StdTransactionEditor::isTransfer(const TQString& accId1, const TQString& accId2) const { if(accId1.isEmpty() || accId2.isEmpty()) return false; @@ -903,8 +903,8 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) // don't kick off VAT processing from here m_inUpdateVat = true; - QMap<QString, QWidget*>::const_iterator it_w; - QWidget* w; + TQMap<TQString, TQWidget*>::const_iterator it_w; + TQWidget* w; AccountSet aSet; // load the account widget @@ -929,11 +929,11 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) // load the category widget KMyMoneyCategory* category = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]); - disconnect(category, SIGNAL(focusIn()), this, SLOT(slotEditSplits())); + disconnect(category, TQT_SIGNAL(focusIn()), this, TQT_SLOT(slotEditSplits())); // check if the current transaction has a reference to an equity account bool haveEquityAccount = false; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_transaction.splits().begin(); !haveEquityAccount && it_s != m_transaction.splits().end(); ++it_s) { MyMoneyAccount acc = MyMoneyFile::instance()->account((*it_s).accountId()); if(acc.accountType() == MyMoneyAccount::Equity) @@ -966,7 +966,7 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) else if(m_lastPostDate.isValid()) dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(m_lastPostDate); else - dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(QDate::currentDate()); + dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(TQDate::tqcurrentDate()); if((w = haveWidget("number")) != 0) { dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(m_split.number()); @@ -979,23 +979,23 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) } dynamic_cast<KMyMoneyReconcileCombo*>(m_editWidgets["status"])->setState(m_split.reconcileFlag()); - QString payeeId = m_split.payeeId(); + TQString payeeId = m_split.payeeId(); if(!payeeId.isEmpty()) { payee->setSelectedItem(payeeId); } m_splits.clear(); if(m_transaction.splitCount() < 2) { - category->completion()->setSelected(QString()); + category->completion()->setSelected(TQString()); } else { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_transaction.splits().begin(); it_s != m_transaction.splits().end(); ++it_s) { if((*it_s) == m_split) continue; m_splits.append(*it_s); } } - QString categoryId; + TQString categoryId; setupCategoryWidget(categoryId); if((w = haveWidget("cashflow")) != 0) { @@ -1004,7 +1004,7 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) } if((w = haveWidget("category-label")) != 0) { - QLabel *categoryLabel = dynamic_cast<QLabel*>(w); + TQLabel *categoryLabel = dynamic_cast<TQLabel*>(w); if(isTransfer(m_split.accountId(), categoryId)) { if(m_split.value().isPositive()) categoryLabel->setText(i18n("Transfer from")); @@ -1040,7 +1040,7 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) } } if(action != KMyMoneyRegister::ActionNone) { - QLabel *categoryLabel = dynamic_cast<QLabel*>(w); + TQLabel *categoryLabel = dynamic_cast<TQLabel*>(w); if(action == KMyMoneyRegister::ActionTransfer) { if(m_split.value().isPositive()) categoryLabel->setText(i18n("Transfer from")); @@ -1071,7 +1071,7 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) } } else { - dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->loadDate(QDate()); + dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->loadDate(TQDate()); dynamic_cast<KMyMoneyReconcileCombo*>(m_editWidgets["status"])->setState(MyMoneySplit::Unknown); if(haveWidget("deposit")) { dynamic_cast<kMyMoneyEdit*>(m_editWidgets["deposit"])->loadText(""); @@ -1092,16 +1092,16 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action) w->setEnabled(false); } - category->completion()->setSelected(QString()); + category->completion()->setSelected(TQString()); } // allow kick off VAT processing again m_inUpdateVat = false; } -QWidget* StdTransactionEditor::firstWidget(void) const +TQWidget* StdTransactionEditor::firstWidget(void) const { - QWidget* w = 0; + TQWidget* w = 0; if(m_initialAction != KMyMoneyRegister::ActionNone) w = haveWidget("payee"); return w; @@ -1111,7 +1111,7 @@ void StdTransactionEditor::slotReloadEditWidgets(void) { // reload category widget KMyMoneyCategory* category = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]); - QString categoryId = category->selectedItem(); + TQString categoryId = category->selectedItem(); AccountSet aSet; aSet.addAccountGroup(MyMoneyAccount::Asset); @@ -1133,7 +1133,7 @@ void StdTransactionEditor::slotReloadEditWidgets(void) // reload payee widget KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(m_editWidgets["payee"]); - QString payeeId = payee->selectedItem(); + TQString payeeId = payee->selectedItem(); payee->loadPayees(MyMoneyFile::instance()->payeeList()); @@ -1142,12 +1142,12 @@ void StdTransactionEditor::slotReloadEditWidgets(void) } } -void StdTransactionEditor::slotUpdatePayee(const QString& payeeId) +void StdTransactionEditor::slotUpdatePayee(const TQString& payeeId) { // we have a new payee assigned to this transaction. // retrieve some information about the state of the category widget KMyMoneyCategory* category = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]); - QStringList list; + TQStringList list; category->selectedItems(list); // If payee has associated default account (category), set that now if @@ -1173,9 +1173,9 @@ void StdTransactionEditor::slotUpdatePayee(const QString& payeeId) // check if all value fields are empty kMyMoneyEdit* amount; - QStringList fields; + TQStringList fields; fields << "amount" << "payment" << "deposit"; - QStringList::const_iterator it_f; + TQStringList::const_iterator it_f; for(it_f = fields.begin(); it_f != fields.end(); ++it_f) { amount = dynamic_cast<kMyMoneyEdit*>(haveWidget(*it_f)); if(amount && !amount->value().isZero()) @@ -1195,7 +1195,7 @@ void StdTransactionEditor::slotUpdatePayee(const QString& payeeId) // check if date has been altered by user kMyMoneyDateInput* postDate = dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"]); if((m_lastPostDate.isValid() && (postDate->date() != m_lastPostDate)) - || (!m_lastPostDate.isValid() && (postDate->date() != QDate::currentDate()))) + || (!m_lastPostDate.isValid() && (postDate->date() != TQDate::tqcurrentDate()))) return; #endif @@ -1207,7 +1207,7 @@ void StdTransactionEditor::slotUpdatePayee(const QString& payeeId) MyMoneyMoney StdTransactionEditor::shares(const MyMoneyTransaction& t) const { MyMoneyMoney result; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { result += (*it_s).shares(); @@ -1221,9 +1221,9 @@ struct uniqTransaction { int cnt; }; -void StdTransactionEditor::autoFill(const QString& payeeId) +void StdTransactionEditor::autoFill(const TQString& payeeId) { - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > list; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > list; MyMoneyTransactionFilter filter(m_account.id()); filter.addPayee(payeeId); MyMoneyFile::instance()->transactionList(list, filter); @@ -1231,17 +1231,17 @@ void StdTransactionEditor::autoFill(const QString& payeeId) // ok, we found at least one previous transaction. now we clear out // what we have collected so far and add those splits from // the previous transaction. - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it_t; - QMap<QString, struct uniqTransaction> uniqList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it_t; + TQMap<TQString, struct uniqTransaction> uniqList; // collect the transactions and see if we have any duplicates for(it_t = list.begin(); it_t != list.end(); ++it_t) { - QString key = (*it_t).first.accountSignature(); + TQString key = (*it_t).first.accountSignature(); int cnt = 0; - QMap<QString, struct uniqTransaction>::iterator it_u; + TQMap<TQString, struct uniqTransaction>::iterator it_u; do { - QString ukey = QString("%1-%2").arg(key).arg(cnt); - it_u = uniqList.find(ukey); + TQString ukey = TQString("%1-%2").tqarg(key).tqarg(cnt); + it_u = uniqList.tqfind(ukey); if(it_u == uniqList.end()) { uniqList[ukey].t = &((*it_t).first); uniqList[ukey].cnt = 1; @@ -1289,7 +1289,7 @@ void StdTransactionEditor::autoFill(const QString& payeeId) KSelectTransactionsDlg dlg(m_account, m_regForm); dlg.setCaption(i18n("Select autofill transaction")); - QMap<QString, struct uniqTransaction>::const_iterator it_u; + TQMap<TQString, struct uniqTransaction>::const_iterator it_u; for(it_u = uniqList.begin(); it_u != uniqList.end(); ++it_u) { dlg.addTransaction(*(*it_u).t); } @@ -1303,7 +1303,7 @@ void StdTransactionEditor::autoFill(const QString& payeeId) if(dlg.m_register->lastItem()) dlg.m_register->selectItem(dlg.m_register->lastItem()); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { t = dlg.transaction(); } #if 0 @@ -1311,7 +1311,7 @@ void StdTransactionEditor::autoFill(const QString& payeeId) #endif } else { int maxCnt = 0; - QMap<QString, struct uniqTransaction>::const_iterator it_u; + TQMap<TQString, struct uniqTransaction>::const_iterator it_u; for(it_u = uniqList.begin(); it_u != uniqList.end(); ++it_u) { if((*it_u).cnt > maxCnt) { t = *(*it_u).t; @@ -1324,18 +1324,18 @@ void StdTransactionEditor::autoFill(const QString& payeeId) m_transaction.removeSplits(); m_split = MyMoneySplit(); MyMoneySplit otherSplit; - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = t.splits().begin(); it != t.splits().end(); ++it) { MyMoneySplit s(*it); s.setReconcileFlag(MyMoneySplit::NotReconciled); - s.setReconcileDate(QDate()); + s.setReconcileDate(TQDate()); s.clearId(); - s.setBankID(QString()); + s.setBankID(TQString()); // older versions of KMyMoney used to set the action // we don't need this anymore if(s.action() != MyMoneySplit::ActionAmortization && s.action() != MyMoneySplit::ActionInterest) { - s.setAction(QString()); + s.setAction(TQString()); } // FIXME update check number. The old comment contained @@ -1360,7 +1360,7 @@ void StdTransactionEditor::autoFill(const QString& payeeId) // the autofilled memo text which will then also be used // in this split. See createTransaction() for this logic. if(s.accountId() != m_account.id() && t.splitCount() == 2) - s.setMemo(QString()); + s.setMemo(TQString()); m_transaction.addSplit(s); if(s.accountId() == m_account.id() && m_split == MyMoneySplit()) { @@ -1381,14 +1381,14 @@ void StdTransactionEditor::autoFill(const QString& payeeId) } // now setup the widgets with the new data but keep the date - QDate date = dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->date(); + TQDate date = dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->date(); loadEditWidgets(action); dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(date); } } // focus jumps into the category field - QWidget* w; + TQWidget* w; if((w = haveWidget("payee")) != 0) { w->setFocus(); } @@ -1398,7 +1398,7 @@ void StdTransactionEditor::slotUpdateAction(int action) { TabBar* tabbar = dynamic_cast<TabBar*>(haveWidget("tabbar")); if(tabbar) { - QLabel* categoryLabel = dynamic_cast<QLabel*>(haveWidget("category-label")); + TQLabel* categoryLabel = dynamic_cast<TQLabel*>(haveWidget("category-label")); KMyMoneyCashFlowCombo* cashflow = dynamic_cast<KMyMoneyCashFlowCombo*>(m_editWidgets["cashflow"]); switch(action) { case KMyMoneyRegister::ActionDeposit: @@ -1419,7 +1419,7 @@ void StdTransactionEditor::slotUpdateAction(int action) void StdTransactionEditor::slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirection dir) { - QLabel* categoryLabel = dynamic_cast<QLabel*>(haveWidget("category-label")); + TQLabel* categoryLabel = dynamic_cast<TQLabel*>(haveWidget("category-label")); // qDebug("Update cashflow to %d", dir); if(categoryLabel) { @@ -1440,9 +1440,9 @@ void StdTransactionEditor::slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirectio } } -void StdTransactionEditor::slotUpdateCategory(const QString& id) +void StdTransactionEditor::slotUpdateCategory(const TQString& id) { - QLabel *categoryLabel = dynamic_cast<QLabel*>(haveWidget("category-label")); + TQLabel *categoryLabel = dynamic_cast<TQLabel*>(haveWidget("category-label")); // qDebug("Update category to %s", id.data()); if(categoryLabel) { @@ -1495,7 +1495,7 @@ void StdTransactionEditor::slotUpdateCategory(const QString& id) updateVAT(false); } -void StdTransactionEditor::slotUpdatePayment(const QString& txt) +void StdTransactionEditor::slotUpdatePayment(const TQString& txt) { MyMoneyMoney val(txt); @@ -1508,7 +1508,7 @@ void StdTransactionEditor::slotUpdatePayment(const QString& txt) updateVAT(); } -void StdTransactionEditor::slotUpdateDeposit(const QString& txt) +void StdTransactionEditor::slotUpdateDeposit(const TQString& txt) { MyMoneyMoney val(txt); if(val.isNegative()) { @@ -1520,7 +1520,7 @@ void StdTransactionEditor::slotUpdateDeposit(const QString& txt) updateVAT(); } -void StdTransactionEditor::slotUpdateAmount(const QString& txt) +void StdTransactionEditor::slotUpdateAmount(const TQString& txt) { // qDebug("Update amount to %s", txt.data()); MyMoneyMoney val(txt); @@ -1530,7 +1530,7 @@ void StdTransactionEditor::slotUpdateAmount(const QString& txt) void StdTransactionEditor::updateAmount(const MyMoneyMoney& val) { - QLabel *categoryLabel = dynamic_cast<QLabel*>(haveWidget("category-label")); + TQLabel *categoryLabel = dynamic_cast<TQLabel*>(haveWidget("category-label")); if(categoryLabel) { KMyMoneyCashFlowCombo* cashflow = dynamic_cast<KMyMoneyCashFlowCombo*>(m_editWidgets["cashflow"]); @@ -1615,8 +1615,8 @@ void StdTransactionEditor::updateVAT(bool amountChanged) // if we made this a split transaction, then move the // focus to the memo field - if(qApp->focusWidget() == haveWidget("category")) { - QWidget* w = haveWidget("memo"); + if(tqApp->tqfocusWidget() == haveWidget("category")) { + TQWidget* w = haveWidget("memo"); if(w) w->setFocus(); } @@ -1658,7 +1658,7 @@ bool StdTransactionEditor::addVatSplit(MyMoneyTransaction& tr, const MyMoneyMone tax.setAccountId(vatAcc.id()); // qDebug("vat amount is '%s'", category.value("VatAmount").latin1()); - if(category.value("VatAmount").lower() != QString("net")) { + if(category.value("VatAmount").lower() != TQString("net")) { // split value is the gross value gv = amount; nv = gv / (MyMoneyMoney(1,1) + vatRate); @@ -1698,7 +1698,7 @@ MyMoneyMoney StdTransactionEditor::removeVatSplit(void) MyMoneySplit t; // tax split bool netValue = false; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_splits.begin(); it_s != m_splits.end(); ++it_s) { MyMoneyAccount acc = MyMoneyFile::instance()->account((*it_s).accountId()); if(!acc.value("VatAccount").isEmpty()) { @@ -1729,7 +1729,7 @@ MyMoneyMoney StdTransactionEditor::removeVatSplit(void) // block the signals to avoid popping up the split editor dialog // for nothing m_editWidgets["category"]->blockSignals(true); - QString id; + TQString id; setupCategoryWidget(id); m_editWidgets["category"]->blockSignals(false); @@ -1737,20 +1737,20 @@ MyMoneyMoney StdTransactionEditor::removeVatSplit(void) return amount; } -bool StdTransactionEditor::isComplete(QString& reason) const +bool StdTransactionEditor::isComplete(TQString& reason) const { - reason = QString(); - // reason.clear(); // for Qt4 + reason = TQString(); + // reason.clear(); // for TQt4 - QMap<QString, QWidget*>::const_iterator it_w; + TQMap<TQString, TQWidget*>::const_iterator it_w; kMyMoneyDateInput* postDate = dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"]); if(postDate) { postDate->markAsBadDate(); - QToolTip::remove(postDate); + TQToolTip::remove(postDate); if(postDate->date().isValid() && (postDate->date() < m_account.openingDate())) { postDate->markAsBadDate(true, KMyMoneyGlobalSettings::listNegativeValueColor()); reason = i18n("Cannot enter transaction with postdate prior to account's opening date."); - QToolTip::add(postDate, reason); + TQToolTip::add(postDate, reason); return false; } } @@ -1783,35 +1783,35 @@ bool StdTransactionEditor::isComplete(QString& reason) const return it_w != m_editWidgets.end(); } -void StdTransactionEditor::slotCreateCategory(const QString& name, QString& id) +void StdTransactionEditor::slotCreateCategory(const TQString& name, TQString& id) { - MyMoneyAccount acc, parent; + MyMoneyAccount acc, tqparent; acc.setName(name); KMyMoneyCashFlowCombo* cashflow = dynamic_cast<KMyMoneyCashFlowCombo*>(haveWidget("cashflow")); if(cashflow) { // form based input if(cashflow->direction() == KMyMoneyRegister::Deposit) - parent = MyMoneyFile::instance()->income(); + tqparent = MyMoneyFile::instance()->income(); else - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); } else if(haveWidget("deposit")) { // register based input kMyMoneyEdit* deposit = dynamic_cast<kMyMoneyEdit*>(m_editWidgets["deposit"]); if(deposit->value().isPositive()) - parent = MyMoneyFile::instance()->income(); + tqparent = MyMoneyFile::instance()->income(); else - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); } else - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); // TODO extract possible first part of a hierarchy and check if it is one - // of our top categories. If so, remove it and select the parent + // of our top categories. If so, remove it and select the tqparent // according to this information. - emit createCategory(acc, parent); + emit createCategory(acc, tqparent); // return id id = acc.id(); @@ -1819,14 +1819,14 @@ void StdTransactionEditor::slotCreateCategory(const QString& name, QString& id) int StdTransactionEditor::slotEditSplits(void) { - int rc = QDialog::Rejected; + int rc = TQDialog::Rejected; if(!m_openEditSplits) { // only get in here in a single instance m_openEditSplits = true; // force focus change to update all data - QWidget* w = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"])->splitButton(); + TQWidget* w = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"])->splitButton(); if(w) w->setFocus(); @@ -1877,10 +1877,10 @@ int StdTransactionEditor::slotEditSplits(void) 0, m_priceInfo, m_regForm); - connect(dlg, SIGNAL(objectCreation(bool)), this, SIGNAL(objectCreation(bool))); - connect(dlg, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&))); + connect(dlg, TQT_SIGNAL(objectCreation(bool)), this, TQT_SIGNAL(objectCreation(bool))); + connect(dlg, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&))); - if((rc = dlg->exec()) == QDialog::Accepted) { + if((rc = dlg->exec()) == TQDialog::Accepted) { m_transaction = dlg->transaction(); m_split = m_transaction.splits()[0]; loadEditWidgets(); @@ -1900,7 +1900,7 @@ int StdTransactionEditor::slotEditSplits(void) return rc; } -void StdTransactionEditor::checkPayeeInSplit(MyMoneySplit& s, const QString& payeeId) +void StdTransactionEditor::checkPayeeInSplit(MyMoneySplit& s, const TQString& payeeId) { if(s.accountId().isEmpty()) return; @@ -1957,7 +1957,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone { // extract price info from original transaction m_priceInfo.clear(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; if(!torig.id().isEmpty()) { for(it_s = torig.splits().begin(); it_s != torig.splits().end(); ++it_s) { if((*it_s).id() != sorig.id()) { @@ -2006,7 +2006,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone } KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(m_editWidgets["payee"]); - QString payeeId; + TQString payeeId; if(!isMultiSelection() || (isMultiSelection() && !payee->currentText().isEmpty())) { payeeId = payee->selectedItem(); s0.setPayeeId(payeeId); @@ -2029,7 +2029,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone s0.setReconcileFlag(status->state()); if(s0.reconcileFlag() == MyMoneySplit::Reconciled && !s0.reconcileDate().isValid()) - s0.setReconcileDate(QDate::currentDate()); + s0.setReconcileDate(TQDate::tqcurrentDate()); checkPayeeInSplit(s0, payeeId); @@ -2040,7 +2040,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone // if we have none or only one other split, we reconstruct it here // if we have more than one other split, we take them as they are // make sure to perform all those changes on a local copy - QValueList<MyMoneySplit> splits = m_splits; + TQValueList<MyMoneySplit> splits = m_splits; MyMoneySplit s1; if(splits.count() == 0) { @@ -2056,7 +2056,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone // split or create it if(isMultiSelection()) { if(torig.splitCount() == 2) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = torig.splits().begin(); it_s != torig.splits().end(); ++it_s) { if((*it_s).id() == sorig.id()) continue; @@ -2109,7 +2109,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone return false; } else { MyMoneyAccount cat = MyMoneyFile::instance()->account(s1.accountId()); - if(m_priceInfo.find(cat.currencyId()) != m_priceInfo.end()) { + if(m_priceInfo.tqfind(cat.currencyId()) != m_priceInfo.end()) { shares = (s1.value() * m_priceInfo[cat.currencyId()]).reduce().convert(cat.fraction()); } else @@ -2124,7 +2124,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone t.addSplit(s1); } else { - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { s1 = *it_s; s1.clearId(); @@ -2143,7 +2143,7 @@ void StdTransactionEditor::setupFinalWidgets(void) addFinalWidget(haveWidget("status")); } -void StdTransactionEditor::slotUpdateAccount(const QString& id) +void StdTransactionEditor::slotUpdateAccount(const TQString& id) { TransactionEditor::slotUpdateAccount(id); KMyMoneyCategory* category = dynamic_cast<KMyMoneyCategory*>(m_editWidgets["category"]); diff --git a/kmymoney2/dialogs/transactioneditor.h b/kmymoney2/dialogs/transactioneditor.h index bf47598..72ecff8 100644 --- a/kmymoney2/dialogs/transactioneditor.h +++ b/kmymoney2/dialogs/transactioneditor.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qwidgetlist.h> +#include <tqobject.h> +#include <tqwidgetlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,12 +38,13 @@ class KCurrencyExchange; class KMyMoneyCategory; -class TransactionEditor : public QObject +class TransactionEditor : public TQObject { Q_OBJECT + TQ_OBJECT public: TransactionEditor() {} - TransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate); + TransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate); virtual ~TransactionEditor(); /** @@ -57,12 +58,12 @@ public: * no account so all will be shown. I have no idea anymore, what I * tried to say with the first sentence above. :( Maybe this is crap. * - * @param tabOrderWidgets QWidgetList which will be filled with the pointers + * @param tabOrderWidgets TQWidgetList which will be filled with the pointers * to the editWidgets in their tab order * @param account account that is currently shown in the calling ledger view * @param action default action (defaults to ActionNone). */ - void setup(QWidgetList& tabOrderWidgets, const MyMoneyAccount& account = MyMoneyAccount(), KMyMoneyRegister::Action action = KMyMoneyRegister::ActionNone); + void setup(TQWidgetList& tabOrderWidgets, const MyMoneyAccount& account = MyMoneyAccount(), KMyMoneyRegister::Action action = KMyMoneyRegister::ActionNone); /** * Enter the transactions into the ledger. In case of a newly created @@ -73,7 +74,7 @@ public: * (the default) a warning will be displayed when the balance crosses the minimum * or maximum balance settings for the account. */ - virtual bool enterTransactions(QString& newId, bool askForSchedule = true, bool suppressBalanceWarnings = false); + virtual bool enterTransactions(TQString& newId, bool askForSchedule = true, bool suppressBalanceWarnings = false); /** * This method creates a transaction based on the contents of the current widgets, @@ -110,7 +111,7 @@ public: * * @sa transactionDataSufficient() */ - virtual bool isComplete(QString& reason) const = 0; + virtual bool isComplete(TQString& reason) const = 0; /** * This method returns information if the editor is started with multiple transactions @@ -130,28 +131,28 @@ public: * Returns a pointer to the widget that should receive * the focus after the editor has been started. */ - virtual QWidget* firstWidget(void) const = 0; + virtual TQWidget* firstWidget(void) const = 0; /** * Returns a pointer to a widget by name */ - QWidget* haveWidget(const QString& name) const; + TQWidget* haveWidget(const TQString& name) const; void setTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); const MyMoneyAccount& account(void) const { return m_account; } void clearFinalWidgets(void); - void addFinalWidget(const QWidget*); + void addFinalWidget(const TQWidget*); public slots: void slotReloadEditWidgets(void); /** - * The default implementation returns QDialog::Rejected + * The default implementation returns TQDialog::Rejected */ virtual int slotEditSplits(void); @@ -161,13 +162,13 @@ public slots: * * @param id of the account to be used */ - void slotUpdateAccount(const QString& id); + void slotUpdateAccount(const TQString& id); protected: virtual void createEditWidgets(void) = 0; virtual void setupFinalWidgets(void) = 0; virtual void loadEditWidgets(KMyMoneyRegister::Action action = KMyMoneyRegister::ActionNone) = 0; - void setupCategoryWidget(KMyMoneyCategory* category, const QValueList<MyMoneySplit>& splits, QString& categoryId, const char* splitEditSlot, bool allowObjectCreation = true); + void setupCategoryWidget(KMyMoneyCategory* category, const TQValueList<MyMoneySplit>& splits, TQString& categoryId, const char* splitEditSlot, bool allowObjectCreation = true); /** * This method sets the precision of the value widgets to reflect @@ -179,7 +180,7 @@ protected: protected slots: virtual void slotUpdateButtonState(void); virtual void slotUpdateAccount(void); - virtual void slotNumberChanged(const QString&); + virtual void slotNumberChanged(const TQString&); signals: /** @@ -207,17 +208,17 @@ signals: * @param txt The name of the payee to be created * @param id A connected slot should store the id of the created object in this variable */ - void createPayee(const QString& txt, QString& id); + void createPayee(const TQString& txt, TQString& id); /** * This signal is sent out, when a new category needs to be created - * Depending on the setting of either a payment or deposit, the parent + * Depending on the setting of either a payment or deposit, the tqparent * account will be preset to Expense or Income. * * @param account reference to account info. Will be filled by called slot - * @param parent reference to parent account + * @param tqparent reference to tqparent account */ - void createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent); + void createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent); /** * This signal is sent out, when a new security (e.g. stock )needs to be created @@ -225,9 +226,9 @@ signals: * will be created. * * @param account reference to account info. Will be filled by called slot - * @param parent reference to parent account + * @param tqparent reference to tqparent account */ - void createSecurity(MyMoneyAccount& account, const MyMoneyAccount& parent); + void createSecurity(MyMoneyAccount& account, const MyMoneyAccount& tqparent); /** * Signal is emitted, if any of the widgets enters (@a state equals @a true) @@ -237,7 +238,7 @@ signals: */ void objectCreation(bool state); - void statusMsg(const QString& txt); + void statusMsg(const TQString& txt); void statusProgress(int cnt, int base); @@ -246,7 +247,7 @@ signals: * * @param date the post date of the newly created transaction */ - void lastPostDateUsed(const QDate& date); + void lastPostDateUsed(const TQDate& date); /** * This signal is sent out, if the user decides to schedule the transaction @a t @@ -273,22 +274,22 @@ signals: /** * This signal is sent out, if any of the balance warning levels * for @p account has been reached. @p msg contains the message text. - * @p parent points to the parent widget to be used for the warning message box. + * @p tqparent points to the tqparent widget to be used for the warning message box. */ - void balanceWarning(QWidget* parent, const MyMoneyAccount& account, const QString& msg); + void balanceWarning(TQWidget* tqparent, const MyMoneyAccount& account, const TQString& msg); protected: - QValueList<MyMoneySplit> m_splits; + TQValueList<MyMoneySplit> m_splits; KMyMoneyRegister::SelectedTransactions m_transactions; - QValueList<const QWidget*> m_finalEditWidgets; + TQValueList<const TQWidget*> m_finalEditWidgets; TransactionEditorContainer* m_regForm; KMyMoneyRegister::Transaction* m_item; - KMyMoneyRegister::QWidgetContainer m_editWidgets; + KMyMoneyRegister::TQWidgetContainer m_editWidgets; MyMoneyAccount m_account; MyMoneyTransaction m_transaction; MyMoneySplit m_split; - QDate m_lastPostDate; - QMap<QString, MyMoneyMoney> m_priceInfo; + TQDate m_lastPostDate; + TQMap<TQString, MyMoneyMoney> m_priceInfo; KMyMoneyRegister::Action m_initialAction; bool m_openEditSplits; }; @@ -297,15 +298,16 @@ protected: class StdTransactionEditor : public TransactionEditor { Q_OBJECT + TQ_OBJECT public: StdTransactionEditor(); - StdTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate); + StdTransactionEditor(TransactionEditorContainer* regForm, KMyMoneyRegister::Transaction* item, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate); ~StdTransactionEditor(); - bool isComplete(QString& reason) const; - QWidget* firstWidget(void) const; + bool isComplete(TQString& reason) const; + TQWidget* firstWidget(void) const; - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); /** * This method creates a transaction based on the contents of the current widgets, @@ -329,18 +331,18 @@ public: public slots: int slotEditSplits(void); - void slotUpdateAmount(const QString&); + void slotUpdateAmount(const TQString&); protected slots: void slotReloadEditWidgets(void); - void slotUpdatePayment(const QString&); - void slotUpdateDeposit(const QString&); - void slotUpdateCategory(const QString&); - void slotUpdatePayee(const QString&); + void slotUpdatePayment(const TQString&); + void slotUpdateDeposit(const TQString&); + void slotUpdateCategory(const TQString&); + void slotUpdatePayee(const TQString&); void slotUpdateCashFlow(KMyMoneyRegister::CashFlowDirection); - void slotCreateCategory(const QString&, QString&); + void slotCreateCategory(const TQString&, TQString&); void slotUpdateAction(int action); - void slotUpdateAccount(const QString& id); + void slotUpdateAccount(const TQString& id); protected: /** @@ -358,17 +360,17 @@ protected: */ void loadEditWidgets(KMyMoneyRegister::Action action = KMyMoneyRegister::ActionNone); - void setupCategoryWidget(QString&); + void setupCategoryWidget(TQString&); void updateAmount(const MyMoneyMoney& value); - bool isTransfer(const QString& accId1, const QString& accId2) const; + bool isTransfer(const TQString& accId1, const TQString& accId2) const; - void checkPayeeInSplit(MyMoneySplit& s, const QString& payeeId); + void checkPayeeInSplit(MyMoneySplit& s, const TQString& payeeId); /** * This method fills the editor widgets with the last transaction * that can be found for payee @a payeeId in the account @a m_account. */ - void autoFill(const QString& payeeId); + void autoFill(const TQString& payeeId); /** * Extracts the amount of the transaction from the widgets depending diff --git a/kmymoney2/dialogs/transactionmatcher.cpp b/kmymoney2/dialogs/transactionmatcher.cpp index 5b8d4b5..2ed5356 100644 --- a/kmymoney2/dialogs/transactionmatcher.cpp +++ b/kmymoney2/dialogs/transactionmatcher.cpp @@ -80,38 +80,38 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr // verify that the amounts are the same, otherwise we should not be matching! if(sm.shares() != si.shares()) { - throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").arg(m_account.name()).arg(sm.shares().formatMoney(m_account, sec), si.shares().formatMoney(m_account, sec))); + throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").tqarg(m_account.name()).tqarg(sm.shares().formatMoney(m_account, sec), si.shares().formatMoney(m_account, sec))); } // ipwizard: I took over the code to keep the bank id found in the endMatchTransaction - // This might not work for QIF imports as they don't setup this information. It sure + // This might not work for TQIF imports as they don't setup this information. It sure // makes sense for OFX and HBCI. - const QString& bankID = si.bankID(); + const TQString& bankID = si.bankID(); if (!bankID.isEmpty()) { try { if (sm.bankID().isEmpty() ) { sm.setBankID( bankID ); tm.modifySplit(sm); } else if(sm.bankID() != bankID) { - throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").arg(m_account.name())); + throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").tqarg(m_account.name())); } } catch(MyMoneyException *e) { - QString estr = e->what(); + TQString estr = e->what(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").arg(estr)); + throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").tqarg(estr)); } } #if 0 // Ace's original code // TODO (Ace) Add in another error to catch the case where a user // tries to match two hand-entered transactions. - QValueList<MyMoneySplit> endSplits = endMatchTransaction.splits(); - QValueList<MyMoneySplit>::const_iterator it_split = endSplits.begin(); + TQValueList<MyMoneySplit> endSplits = endMatchTransaction.splits(); + TQValueList<MyMoneySplit>::const_iterator it_split = endSplits.begin(); while (it_split != endSplits.end()) { // find the corresponding split in the start transaction MyMoneySplit startSplit; - QString accountid = (*it_split).accountId(); + TQString accountid = (*it_split).accountId(); try { startSplit = startMatchTransaction.splitByAccount( accountid ); @@ -129,11 +129,11 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr // matching! if ( (*it_split).value() != startSplit.value() ) { - QString accountname = MyMoneyFile::instance()->account(accountid).name(); - throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").arg(accountname).arg((*it_split).value().formatMoney(),startSplit.value().formatMoney())); + TQString accountname = MyMoneyFile::instance()->account(accountid).name(); + throw new MYMONEYEXCEPTION(i18n("Splits for %1 have conflicting values (%2,%3)").tqarg(accountname).tqarg((*it_split).value().formatMoney(),startSplit.value().formatMoney())); } - QString bankID = (*it_split).bankID(); + TQString bankID = (*it_split).bankID(); if ( ! bankID.isEmpty() ) { try @@ -145,15 +145,15 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr } else { - QString accountname = MyMoneyFile::instance()->account(accountid).name(); - throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").arg(accountname)); + TQString accountname = MyMoneyFile::instance()->account(accountid).name(); + throw new MYMONEYEXCEPTION(i18n("Both of these transactions have been imported into %1. Therefore they cannot be matched. Matching works with one imported transaction and one non-imported transaction.").tqarg(accountname)); } } catch(MyMoneyException *e) { - QString estr = e->what(); + TQString estr = e->what(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").arg(estr)); + throw new MYMONEYEXCEPTION(i18n("Unable to match all splits (%1)").tqarg(estr)); } } ++it_split; @@ -179,7 +179,7 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr } // combine the two memos into one - QString memo = sm.memo(); + TQString memo = sm.memo(); if(!si.memo().isEmpty() && si.memo() != memo) { sm.setValue("kmm-orig-memo", memo); if(!memo.isEmpty()) @@ -217,7 +217,7 @@ void TransactionMatcher::unmatch(const MyMoneyTransaction& _t, const MyMoneySpli // restore the postdate if modified if(!sm.value("kmm-orig-postdate").isEmpty()) { - tm.setPostDate(QDate::fromString(sm.value("kmm-orig-postdate"), Qt::ISODate)); + tm.setPostDate(TQDate::fromString(sm.value("kmm-orig-postdate"), Qt::ISODate)); } // restore payee if modified @@ -257,13 +257,13 @@ void TransactionMatcher::accept(const MyMoneyTransaction& _t, const MyMoneySplit } } -void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, QPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, TransactionMatcher::autoMatchResultE& result, int variation) const +void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, TQPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, TransactionMatcher::autoMatchResultE& result, int variation) const { Q_UNUSED(ti); - const QValueList<MyMoneySplit>& splits = tm.splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& splits = tm.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyMoney upper((*it_s).shares()); MyMoneyMoney lower(upper); @@ -277,7 +277,7 @@ void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const My // check for duplicate (we can only do that, if we have a bankID) if(!si.bankID().isEmpty()) { if((*it_s).bankID() == si.bankID()) { - lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); + lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); result = matchedDuplicate; break; } @@ -292,10 +292,10 @@ void TransactionMatcher::checkTransaction(const MyMoneyTransaction& tm, const My && (si.shares() >= lower) && (si.shares() <= upper) && !(*it_s).isMatched()) { if(tm.postDate() == ti.postDate()) { - lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); + lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); result = matchedExact; } else if(result != matchedExact) { - lastMatch = QPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); + lastMatch = TQPair<MyMoneyTransaction, MyMoneySplit>(tm, *it_s); result = matched; } } @@ -313,12 +313,12 @@ MyMoneyObject const * TransactionMatcher::findMatch(const MyMoneyTransaction& ti filter.setDateFilter(ti.postDate().addDays(-m_days), ti.postDate().addDays(m_days)); filter.setAmountFilter(si.shares(), si.shares()); - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > list; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > list; MyMoneyFile::instance()->transactionList(list, filter); // parse list - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::iterator it_l; - QPair<MyMoneyTransaction, MyMoneySplit> lastMatch; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::iterator it_l; + TQPair<MyMoneyTransaction, MyMoneySplit> lastMatch; for(it_l = list.begin(); (result != matchedDuplicate) && (it_l != list.end()); ++it_l) { // just skip myself @@ -336,13 +336,13 @@ MyMoneyObject const * TransactionMatcher::findMatch(const MyMoneyTransaction& ti } else { // if we did not find anything, we need to scan for scheduled transactions - QValueList<MyMoneySchedule> list; - QValueList<MyMoneySchedule>::iterator it_sch; + TQValueList<MyMoneySchedule> list; + TQValueList<MyMoneySchedule>::iterator it_sch; // find all schedules that have a reference to the current account list = MyMoneyFile::instance()->scheduleList(m_account.id()); for(it_sch = list.begin(); (result != matched && result != matchedExact) && (it_sch != list.end()); ++it_sch) { // get the next due date adjusted by the weekend switch - QDate nextDueDate = (*it_sch).nextDueDate(); + TQDate nextDueDate = (*it_sch).nextDueDate(); if((*it_sch).isOverdue() || (nextDueDate >= ti.postDate().addDays(-m_days) && nextDueDate <= ti.postDate().addDays(m_days))) { diff --git a/kmymoney2/dialogs/transactionmatcher.h b/kmymoney2/dialogs/transactionmatcher.h index e5e036c..3295da1 100644 --- a/kmymoney2/dialogs/transactionmatcher.h +++ b/kmymoney2/dialogs/transactionmatcher.h @@ -134,7 +134,7 @@ public: void setMatchWindow(int days) { m_days = days; } private: - void checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, QPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, autoMatchResultE& result, int variation = 0) const; + void checkTransaction(const MyMoneyTransaction& tm, const MyMoneyTransaction& ti, const MyMoneySplit& si, TQPair<MyMoneyTransaction, MyMoneySplit>& lastMatch, autoMatchResultE& result, int variation = 0) const; private: MyMoneyAccount m_account; diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp index 40cc1d6..b423559 100644 --- a/kmymoney2/kmymoney2.cpp +++ b/kmymoney2/kmymoney2.cpp @@ -32,16 +32,16 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdir.h> -#include <qprinter.h> -#include <qlayout.h> -#include <qsignalmapper.h> -#include <qclipboard.h> // temp for problem 1105503 -#include <qdatetime.h> // only for performance tests -#include <qtimer.h> -#include <qsqlpropertymap.h> -#include <qvbox.h> -#include <qeventloop.h> +#include <tqdir.h> +#include <tqprinter.h> +#include <tqlayout.h> +#include <tqsignalmapper.h> +#include <tqclipboard.h> // temp for problem 1105503 +#include <tqdatetime.h> // only for performance tests +#include <tqtimer.h> +#include <tqsqlpropertymap.h> +#include <tqvbox.h> +#include <tqeventloop.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -160,8 +160,8 @@ public: m_ft(0), m_moveToAccountSelector(0), statementXMLindex(0), m_collectingStatements(false) {} void unlinkStatementXML(void); - void moveInvestmentTransaction(const QString& fromId, - const QString& toId, + void moveInvestmentTransaction(const TQString& fromId, + const TQString& toId, const MyMoneyTransaction& t); MyMoneyFileTransaction* m_ft; @@ -170,12 +170,12 @@ public: KBalanceWarning* m_balanceWarning; bool m_collectingStatements; - QStringList m_statementResults; + TQStringList m_statementResults; KMyMoneyPlugin::PluginLoader* m_pluginLoader; - QString m_lastPayeeEntered; + TQString m_lastPayeeEntered; }; -KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : +KMyMoney2App::KMyMoney2App(TQWidget * /*tqparent*/ , const char* name) : KMainWindow(0, name), DCOPObject("kmymoney2app"), d(new Private), @@ -196,10 +196,10 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : updateCaption(true); - QFrame* frame = new QFrame(this); - frame->setFrameStyle(QFrame::NoFrame); + TQFrame* frame = new TQFrame(this); + frame->setFrameStyle(TQFrame::NoFrame); // values for margin (11) and spacing(6) taken from KDialog implementation - QBoxLayout* layout = new QBoxLayout(frame, QBoxLayout::TopToBottom, 2, 6); + TQBoxLayout* tqlayout = new TQBoxLayout(frame, TQBoxLayout::TopToBottom, 2, 6); ::timetrace("init statusbar"); initStatusBar(); @@ -210,8 +210,8 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : ::timetrace("create view"); myMoneyView = new KMyMoneyView(frame, "KMyMoneyView"); - layout->addWidget(myMoneyView, 10); - connect(myMoneyView, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotResetSelections())); + tqlayout->addWidget(myMoneyView, 10); + connect(myMoneyView, TQT_SIGNAL(aboutToShowPage(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotResetSelections())); /////////////////////////////////////////////////////////////////// // call inits to invoke all other construction parts @@ -219,8 +219,8 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : readOptions(); #if 0 - m_pluginSignalMapper = new QSignalMapper( this ); - connect( m_pluginSignalMapper, SIGNAL( mapped( const QString& ) ), this, SLOT( slotPluginImport( const QString& ) ) ); + m_pluginSignalMapper = new TQSignalMapper( this ); + connect( m_pluginSignalMapper, TQT_SIGNAL( mapped( const TQString& ) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginImport( const TQString& ) ) ); #endif // now initialize the plugin structure @@ -232,10 +232,10 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : ::timetrace("done"); - connect(&proc,SIGNAL(processExited(KProcess *)),this,SLOT(slotProcessExited())); + connect(&proc,TQT_SIGNAL(processExited(KProcess *)),TQT_TQOBJECT(this), TQT_SLOT(slotProcessExited())); // force to show the home page if the file is closed - connect(action("view_show_transaction_detail"), SIGNAL(toggled(bool)), myMoneyView, SLOT(slotShowTransactionDetail(bool))); + connect(action("view_show_transaction_detail"), TQT_SIGNAL(toggled(bool)), myMoneyView, TQT_SLOT(slotShowTransactionDetail(bool))); m_backupState = BACKUP_IDLE; @@ -245,14 +245,14 @@ KMyMoney2App::KMyMoney2App(QWidget * /*parent*/ , const char* name) : m_autoSaveEnabled = KMyMoneyGlobalSettings::autoSaveFile(); m_autoSavePeriod = KMyMoneyGlobalSettings::autoSavePeriod(); - m_autoSaveTimer = new QTimer(this); - connect(m_autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave())); + m_autoSaveTimer = new TQTimer(this); + connect(m_autoSaveTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(slotAutoSave())); // make sure, we get a note when the engine changes state - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotDataChanged())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotDataChanged())); // make sure we have a balance warning object - d->m_balanceWarning = new KBalanceWarning(this); + d->m_balanceWarning = new KBalanceWarning(TQT_TQOBJECT(this)); // kickstart date change timer slotDateChanged(); @@ -285,15 +285,15 @@ const KURL KMyMoney2App::lastOpenedURL(void) void KMyMoney2App::initDynamicMenus(void) { - QWidget* w = factory()->container("transaction_move_menu", this); - QPopupMenu *menu = dynamic_cast<QPopupMenu*>(w); + TQWidget* w = factory()->container("transaction_move_menu", this); + TQPopupMenu *menu = dynamic_cast<TQPopupMenu*>(w); if(menu) { d->m_moveToAccountSelector = new kMyMoneyAccountSelector(menu, 0, 0, false); menu->insertItem(d->m_moveToAccountSelector); - connect(d->m_moveToAccountSelector, SIGNAL(itemSelected(const QString&)), this, SLOT(slotMoveToAccount(const QString&))); - connect(this, SIGNAL(accountSelected(const MyMoneyAccount&)), this, SLOT(slotUpdateMoveToAccountMenu())); - connect(this, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotUpdateMoveToAccountMenu())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotUpdateMoveToAccountMenu())); + connect(d->m_moveToAccountSelector, TQT_SIGNAL(itemSelected(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotMoveToAccount(const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(accountSelected(const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMoveToAccountMenu())); } } @@ -304,186 +304,186 @@ void KMyMoney2App::initActions(void) // ************* // The File menu // ************* - KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection()); - KStdAction::open(this, SLOT(slotFileOpen()), actionCollection()); - KStdAction::openRecent(this, SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); - KStdAction::save(this, SLOT(slotFileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::close(this, SLOT(slotFileClose()), actionCollection()); - KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection()); - KStdAction::print(this, SLOT(slotPrintView()), actionCollection()); - - new KAction(i18n("Open database..."), "",0,this,SLOT(slotOpenDatabase()),actionCollection(),"open_database"); - new KAction(i18n("Save as database..."), "",0,this,SLOT(slotSaveAsDatabase()),actionCollection(),"saveas_database"); - new KAction(i18n("Backup..."), "backup",0,this,SLOT(slotFileBackup()),actionCollection(),"file_backup"); - new KAction(i18n("QIF..."), "", 0, this, SLOT(slotQifImport()), actionCollection(), "file_import_qif"); - new KAction(i18n("Gnucash..."), "", 0, this, SLOT(slotGncImport()), actionCollection(), "file_import_gnc"); - new KAction(i18n("Statement file..."), "", 0, this, SLOT(slotStatementImport()), actionCollection(), "file_import_statement"); - - new KAction(i18n("Account Template..."), "", 0, this, SLOT(slotLoadAccountTemplates()), actionCollection(), "file_import_template"); - new KAction(i18n("Account Template..."), "", 0, this, SLOT(slotSaveAccountTemplates()), actionCollection(), "file_export_template"); - new KAction(i18n("QIF..."), "", 0, this, SLOT(slotQifExport()), actionCollection(), "file_export_qif"); - new KAction(i18n("Personal Data..."), "personal_data", 0, this, SLOT(slotFileViewPersonal()), actionCollection(), "view_personal_data"); + KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(slotFileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpenRecent(const KURL&)), actionCollection()); + KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotFileClose()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); + KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrintView()), actionCollection()); + + new KAction(i18n("Open database..."), "",0,TQT_TQOBJECT(this), TQT_SLOT(slotOpenDatabase()),actionCollection(),"open_database"); + new KAction(i18n("Save as database..."), "",0,TQT_TQOBJECT(this), TQT_SLOT(slotSaveAsDatabase()),actionCollection(),"saveas_database"); + new KAction(i18n("Backup..."), "backup",0,TQT_TQOBJECT(this), TQT_SLOT(slotFileBackup()),actionCollection(),"file_backup"); + new KAction(i18n("TQIF..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifImport()), actionCollection(), "file_import_qif"); + new KAction(i18n("Gnucash..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotGncImport()), actionCollection(), "file_import_gnc"); + new KAction(i18n("Statement file..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotStatementImport()), actionCollection(), "file_import_statement"); + + new KAction(i18n("Account Template..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotLoadAccountTemplates()), actionCollection(), "file_import_template"); + new KAction(i18n("Account Template..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSaveAccountTemplates()), actionCollection(), "file_export_template"); + new KAction(i18n("TQIF..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifExport()), actionCollection(), "file_export_qif"); + new KAction(i18n("Personal Data..."), "personal_data", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileViewPersonal()), actionCollection(), "view_personal_data"); #if KMM_DEBUG - new KAction(i18n("Dump Memory"), "", 0, this, SLOT(slotFileFileInfo()), actionCollection(), "file_dump"); + new KAction(i18n("Dump Memory"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileFileInfo()), actionCollection(), "file_dump"); #endif - new KAction(i18n("File-Information..."), "info", 0, this, SLOT(slotFileInfoDialog()), actionCollection(), "view_file_info"); + new KAction(i18n("File-Information..."), "info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileInfoDialog()), actionCollection(), "view_file_info"); // ************* // The Edit menu // ************* - new KAction(i18n("Find transaction..."), "transaction_find", KShortcut("Ctrl+F"), this, SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); + new KAction(i18n("Find transaction..."), "transaction_tqfind", KShortcut("Ctrl+F"), TQT_TQOBJECT(this), TQT_SLOT(slotFindTransaction()), actionCollection(), "edit_find_transaction"); // ************* // The View menu // ************* new KToggleAction(i18n("Show Transaction Detail"), KShortcut("Ctrl+T"), actionCollection(), "view_show_transaction_detail"); - new KToggleAction(i18n("Hide reconciled transactions"), "hide_reconciled", KShortcut("Ctrl+R"), this, SLOT(slotHideReconciledTransactions()), actionCollection(), "view_hide_reconciled_transactions"); - new KToggleAction(i18n("Hide unused categories"), "hide_categories", KShortcut("Ctrl+U"), this, SLOT(slotHideUnusedCategories()), actionCollection(), "view_hide_unused_categories"); - new KToggleAction(i18n("Show all accounts"), "", KShortcut("Ctrl+Shift+A"), this, SLOT(slotShowAllAccounts()), actionCollection(), "view_show_all_accounts"); + new KToggleAction(i18n("Hide reconciled transactions"), "hide_reconciled", KShortcut("Ctrl+R"), TQT_TQOBJECT(this), TQT_SLOT(slotHideReconciledTransactions()), actionCollection(), "view_hide_reconciled_transactions"); + new KToggleAction(i18n("Hide unused categories"), "hide_categories", KShortcut("Ctrl+U"), TQT_TQOBJECT(this), TQT_SLOT(slotHideUnusedCategories()), actionCollection(), "view_hide_unused_categories"); + new KToggleAction(i18n("Show all accounts"), "", KShortcut("Ctrl+Shift+A"), TQT_TQOBJECT(this), TQT_SLOT(slotShowAllAccounts()), actionCollection(), "view_show_all_accounts"); // ********************* // The institutions menu // ********************* - new KAction(i18n("New institution..."), "institution_add", 0, this, SLOT(slotInstitutionNew()), actionCollection(), "institution_new"); - new KAction(i18n("Edit institution..."), "edit", 0, this, SLOT(slotInstitutionEdit()), actionCollection(), "institution_edit"); - new KAction(i18n("Delete institution..."), "delete", 0, this, SLOT(slotInstitutionDelete()), actionCollection(), "institution_delete"); + new KAction(i18n("New institution..."), "institution_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionNew()), actionCollection(), "institution_new"); + new KAction(i18n("Edit institution..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionEdit()), actionCollection(), "institution_edit"); + new KAction(i18n("Delete institution..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionDelete()), actionCollection(), "institution_delete"); // ***************** // The accounts menu // ***************** - new KAction(i18n("New account..."), "account_add", 0, this, SLOT(slotAccountNew()), actionCollection(), "account_new"); + new KAction(i18n("New account..."), "account_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountNew()), actionCollection(), "account_new"); // note : action "category_new" is included in this menu but defined below - new KAction(i18n("Open ledger"), "ledger", 0, this, SLOT(slotAccountOpen()), actionCollection(), "account_open"); - new KAction(i18n("Reconcile..."), "reconcile", KShortcut("Ctrl+Shift+R"), this, SLOT(slotAccountReconcileStart()), actionCollection(), "account_reconcile"); - new KAction(i18n("Finish reconciliation", "Finish"), "player_end", 0, this, SLOT(slotAccountReconcileFinish()), actionCollection(), "account_reconcile_finish"); - new KAction(i18n("Postpone reconciliation", "Postpone"), "player_pause", 0, this, SLOT(slotAccountReconcilePostpone()), actionCollection(), "account_reconcile_postpone"); - new KAction(i18n("Edit account..."), "edit", 0, this, SLOT(slotAccountEdit()), actionCollection(), "account_edit"); - new KAction(i18n("Delete account..."), "delete", 0, this, SLOT(slotAccountDelete()), actionCollection(), "account_delete"); - new KAction(i18n("Close account"), "", 0, this, SLOT(slotAccountClose()), actionCollection(), "account_close"); - new KAction(i18n("Reopen account"), "", 0, this, SLOT(slotAccountReopen()), actionCollection(), "account_reopen"); - new KAction(i18n("Transaction report"), "view_info", 0, this, SLOT(slotAccountTransactionReport()), actionCollection(), "account_transaction_report"); + new KAction(i18n("Open ledger"), "ledger", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountOpen()), actionCollection(), "account_open"); + new KAction(i18n("Reconcile..."), "reconcile", KShortcut("Ctrl+Shift+R"), TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcileStart()), actionCollection(), "account_reconcile"); + new KAction(i18n("Finish reconciliation", "Finish"), "player_end", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcileFinish()), actionCollection(), "account_reconcile_finish"); + new KAction(i18n("Postpone reconciliation", "Postpone"), "player_pause", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReconcilePostpone()), actionCollection(), "account_reconcile_postpone"); + new KAction(i18n("Edit account..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountEdit()), actionCollection(), "account_edit"); + new KAction(i18n("Delete account..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountDelete()), actionCollection(), "account_delete"); + new KAction(i18n("Close account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountClose()), actionCollection(), "account_close"); + new KAction(i18n("Reopen account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountReopen()), actionCollection(), "account_reopen"); + new KAction(i18n("Transaction report"), "view_info", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountTransactionReport()), actionCollection(), "account_transaction_report"); #ifdef HAVE_KDCHART - new KAction(i18n("Show balance chart..."), "kchart_chrt", 0, this, SLOT(slotAccountChart()), actionCollection(), "account_chart"); + new KAction(i18n("Show balance chart..."), "kchart_chrt", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountChart()), actionCollection(), "account_chart"); #endif - new KAction(i18n("Map to online account"), "news_subscribe", 0, this, SLOT(slotAccountMapOnline()), actionCollection(), "account_online_map"); - new KAction(i18n("Unmap account"), "", 0, this, SLOT(slotAccountUnmapOnline()), actionCollection(), "account_online_unmap"); - KActionMenu* menu = new KActionMenu(i18n("Update"), QIconSet(KGlobal::iconLoader()->loadIcon("reload", KIcon::Small, + new KAction(i18n("Map to online account"), "news_subscribe", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountMapOnline()), actionCollection(), "account_online_map"); + new KAction(i18n("Unmap account"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUnmapOnline()), actionCollection(), "account_online_unmap"); + KActionMenu* menu = new KActionMenu(i18n("Update"), TQIconSet(KGlobal::iconLoader()->loadIcon("reload", KIcon::Small, KIcon::SizeSmall)), actionCollection(), "account_online_update_menu"); // activating the menu button is the same as selecting the current account - connect( menu, SIGNAL( activated() ), this, SLOT(slotAccountUpdateOnline())); - menu->insert(new KAction(i18n("Update account..."), "", 0, this, SLOT(slotAccountUpdateOnline()), actionCollection(), "account_online_update")); - menu->insert(new KAction(i18n("Update all accounts..."), "", 0, this, SLOT(slotAccountUpdateOnlineAll()), actionCollection(), "account_online_update_all")); + connect( menu, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnline())); + menu->insert(new KAction(i18n("Update account..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnline()), actionCollection(), "account_online_update")); + menu->insert(new KAction(i18n("Update all accounts..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountUpdateOnlineAll()), actionCollection(), "account_online_update_all")); // ******************* // The categories menu // ******************* - new KAction(i18n("New category..."), "account_add", 0, this, SLOT(slotCategoryNew()), actionCollection(), "category_new"); - new KAction(i18n("Edit category..."), "edit", 0, this, SLOT(slotAccountEdit()), actionCollection(), "category_edit"); - new KAction(i18n("Delete category..."), "delete", 0, this, SLOT(slotAccountDelete()), actionCollection(), "category_delete"); + new KAction(i18n("New category..."), "account_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew()), actionCollection(), "category_new"); + new KAction(i18n("Edit category..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountEdit()), actionCollection(), "category_edit"); + new KAction(i18n("Delete category..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAccountDelete()), actionCollection(), "category_delete"); // ************** // The tools menu // ************** - new KAction(i18n("QIF Profile Editor..."), "edit", 0, this, SLOT(slotQifProfileEditor()), actionCollection(), "tools_qif_editor"); - new KAction(i18n("Securities..."), "", 0, this, SLOT(slotSecurityEditor()), actionCollection(), "tools_security_editor"); - new KAction(i18n("Currencies..."), "", 0, this, SLOT(slotCurrencyDialog()), actionCollection(), "tools_currency_editor"); - new KAction(i18n("Prices..."), "", 0, this, SLOT(slotPriceDialog()), actionCollection(), "tools_price_editor"); - new KAction(i18n("Update Stock and Currency Prices..."), "", 0, this, SLOT(slotEquityPriceUpdate()), actionCollection(), "tools_update_prices"); - new KAction(i18n("Consistency Check"), "", 0, this, SLOT(slotFileConsitencyCheck()), actionCollection(), "tools_consistency_check"); - new KAction(i18n("Performance-Test"), "fork", 0, this, SLOT(slotPerformanceTest()), actionCollection(), "tools_performancetest"); - new KAction(i18n("KCalc..."), "kcalc", 0, this, SLOT(slotToolsStartKCalc()), actionCollection(), "tools_kcalc"); + new KAction(i18n("TQIF Profile Editor..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQifProfileEditor()), actionCollection(), "tools_qif_editor"); + new KAction(i18n("Securities..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotSecurityEditor()), actionCollection(), "tools_security_editor"); + new KAction(i18n("Currencies..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyDialog()), actionCollection(), "tools_currency_editor"); + new KAction(i18n("Prices..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPriceDialog()), actionCollection(), "tools_price_editor"); + new KAction(i18n("Update Stock and Currency Prices..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEquityPriceUpdate()), actionCollection(), "tools_update_prices"); + new KAction(i18n("Consistency Check"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotFileConsitencyCheck()), actionCollection(), "tools_consistency_check"); + new KAction(i18n("Performance-Test"), "fork", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPerformanceTest()), actionCollection(), "tools_performancetest"); + new KAction(i18n("KCalc..."), "kcalc", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToolsStartKCalc()), actionCollection(), "tools_kcalc"); // ***************** // The settings menu // ***************** - KStdAction::preferences(this, SLOT( slotSettings() ), actionCollection()); - new KAction(i18n("Enable all messages"), "", 0, this, SLOT(slotEnableMessages()), actionCollection(), "settings_enable_messages"); - new KAction(i18n("KDE language settings..."), "", 0, this, SLOT(slotKDELanguageSettings()), actionCollection(), "settings_language"); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT( slotSettings() ), actionCollection()); + new KAction(i18n("Enable all messages"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEnableMessages()), actionCollection(), "settings_enable_messages"); + new KAction(i18n("KDE language settings..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotKDELanguageSettings()), actionCollection(), "settings_language"); // ************* // The help menu // ************* - new KAction(i18n("&Show tip of the day"), "idea", 0, this, SLOT(slotShowTipOfTheDay()), actionCollection(), "help_show_tip"); + new KAction(i18n("&Show tip of the day"), "idea", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOfTheDay()), actionCollection(), "help_show_tip"); // *************************** // Actions w/o main menu entry // *************************** - new KAction(i18n("New transaction button", "New"), "filenew", QKeySequence(Qt::CTRL | Qt::Key_Insert), this, SLOT(slotTransactionsNew()), actionCollection(), "transaction_new"); + new KAction(i18n("New transaction button", "New"), "filenew", TQKeySequence(TQt::CTRL | TQt::Key_Insert), TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsNew()), actionCollection(), "transaction_new"); // we use Return as the same shortcut for Edit and Enter. Therefore, we don't allow // to change them (The standard KDE dialog complains anyway if you want to assign // the same shortcut to two actions) - p = new KAction(i18n("Edit transaction button", "Edit"), "edit", 0, this, SLOT(slotTransactionsEdit()), actionCollection(), "transaction_edit"); + p = new KAction(i18n("Edit transaction button", "Edit"), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEdit()), actionCollection(), "transaction_edit"); p->setShortcutConfigurable(false); - p = new KAction(i18n("Enter transaction", "Enter"), "button_ok", 0, this, SLOT(slotTransactionsEnter()), actionCollection(), "transaction_enter"); + p = new KAction(i18n("Enter transaction", "Enter"), "button_ok", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEnter()), actionCollection(), "transaction_enter"); p->setShortcutConfigurable(false); - new KAction(i18n("Edit split button", "Edit splits"), "split_transaction", 0, this, SLOT(slotTransactionsEditSplits()), actionCollection(), "transaction_editsplits"); - new KAction(i18n("Cancel transaction edit", "Cancel"), "button_cancel", 0, this, SLOT(slotTransactionsCancel()), actionCollection(), "transaction_cancel"); - new KAction(i18n("Delete transaction", "Delete"), "delete", 0, this, SLOT(slotTransactionsDelete()), actionCollection(), "transaction_delete"); - new KAction(i18n("Duplicate transaction", "Duplicate"), "editcopy", 0, this, SLOT(slotTransactionDuplicate()), actionCollection(), "transaction_duplicate"); - - new KAction(i18n("Button text for match transaction", "Match"), "stop", 0, this, SLOT(slotTransactionMatch()), actionCollection(), "transaction_match"); - new KAction(i18n("Accept 'imported' and 'matched' transaction", "Accept"), "apply", 0, this, SLOT(slotTransactionsAccept()), actionCollection(), "transaction_accept"); - - new KAction(i18n("Toggle reconciliation flag", "Toggle"), 0, KShortcut("Ctrl+Space"), this, SLOT(slotToggleReconciliationFlag()), actionCollection(), "transaction_mark_toggle"); - new KAction(i18n("Mark transaction cleared", "Cleared"), 0, KShortcut("Ctrl+Alt+Space"), this, SLOT(slotMarkTransactionCleared()), actionCollection(), "transaction_mark_cleared"); - new KAction(i18n("Mark transaction reconciled", "Reconciled"), "", KShortcut("Ctrl+Shift+Space"), this, SLOT(slotMarkTransactionReconciled()), actionCollection(), "transaction_mark_reconciled"); - new KAction(i18n("Mark transaction not reconciled", "Not reconciled"), "", 0, this, SLOT(slotMarkTransactionNotReconciled()), actionCollection(), "transaction_mark_notreconciled"); - new KAction(i18n("Select all transactions", "Select all"), 0, KShortcut("Ctrl+A"), this, SIGNAL(selectAllTransactions()), actionCollection(), "transaction_select_all"); - - new KAction(i18n("Goto account"), "goto", 0, this, SLOT(slotTransactionGotoAccount()), actionCollection(), "transaction_goto_account"); - new KAction(i18n("Goto payee"), "goto", 0, this, SLOT(slotTransactionGotoPayee()), actionCollection(), "transaction_goto_payee"); - new KAction(i18n("Create scheduled transaction..."), "bookmark_add", 0, this, SLOT(slotTransactionCreateSchedule()), actionCollection(), "transaction_create_schedule"); - new KAction(i18n("Assign next number"), "", KShortcut("Ctrl+Shift+N"), this, SLOT(slotTransactionAssignNumber()), actionCollection(), "transaction_assign_number"); - new KAction(i18n("Combine transactions", "Combine"), "", 0, this, SLOT(slotTransactionCombine()), actionCollection(), "transaction_combine"); - - new KAction(i18n("New investment"), "filenew", 0, this, SLOT(slotInvestmentNew()), actionCollection(), "investment_new"); - new KAction(i18n("Edit investment..."), "edit", 0, this, SLOT(slotInvestmentEdit()), actionCollection(), "investment_edit"); - new KAction(i18n("Delete investment..."), "delete", 0, this, SLOT(slotInvestmentDelete()), actionCollection(), "investment_delete"); - new KAction(i18n("Online price update..."), "", 0, this, SLOT(slotOnlinePriceUpdate()), actionCollection(), "investment_online_price_update"); - new KAction(i18n("Manual price update..."), "", 0, this, SLOT(slotManualPriceUpdate()), actionCollection(), "investment_manual_price_update"); - - new KAction(i18n("New scheduled transaction..."), "filenew", 0, this, SLOT(slotScheduleNew()), actionCollection(), "schedule_new"); - new KAction(i18n("Edit scheduled transaction..."), "edit", 0, this, SLOT(slotScheduleEdit()), actionCollection(), "schedule_edit"); - new KAction(i18n("Delete scheduled transaction..."), "delete", 0, this, SLOT(slotScheduleDelete()), actionCollection(), "schedule_delete"); - new KAction(i18n("Duplicate scheduled transaction"), "editcopy", 0, this, SLOT(slotScheduleDuplicate()), actionCollection(), "schedule_duplicate"); - new KAction(i18n("Enter next transaction..."), "key_enter", 0, this, SLOT(slotScheduleEnter()), actionCollection(), "schedule_enter"); - new KAction(i18n("Skip next transaction..."), "player_fwd", 0, this, SLOT(slotScheduleSkip()), actionCollection(), "schedule_skip"); - - new KAction(i18n("New payee"), "filenew", 0, this, SLOT(slotPayeeNew()), actionCollection(), "payee_new"); - new KAction(i18n("Rename payee"), "edit", 0, this, SIGNAL(payeeRename()), actionCollection(), "payee_rename"); - new KAction(i18n("Delete payee"), "delete", 0, this, SLOT(slotPayeeDelete()), actionCollection(), "payee_delete"); - - new KAction(i18n("New budget"), "filenew", 0, this, SLOT(slotBudgetNew()), actionCollection(), "budget_new"); - new KAction(i18n("Rename budget"), "edit", 0, this, SIGNAL(budgetRename()), actionCollection(), "budget_rename"); - new KAction(i18n("Delete budget"), "delete", 0, this, SLOT(slotBudgetDelete()), actionCollection(), "budget_delete"); - new KAction(i18n("Copy budget"), "editcopy", 0, this, SLOT(slotBudgetCopy()), actionCollection(), "budget_copy"); - new KAction(i18n("Change budget year"), "", 0, this, SLOT(slotBudgetChangeYear()), actionCollection(), "budget_change_year"); - new KAction(i18n("Budget based on forecast", "Forecast"), "forcast", 0, this, SLOT(slotBudgetForecast()), actionCollection(), "budget_forecast"); + new KAction(i18n("Edit split button", "Edit splits"), "split_transaction", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsEditSplits()), actionCollection(), "transaction_editsplits"); + new KAction(i18n("Cancel transaction edit", "Cancel"), "button_cancel", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsCancel()), actionCollection(), "transaction_cancel"); + new KAction(i18n("Delete transaction", "Delete"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsDelete()), actionCollection(), "transaction_delete"); + new KAction(i18n("Duplicate transaction", "Duplicate"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionDuplicate()), actionCollection(), "transaction_duplicate"); + + new KAction(i18n("Button text for match transaction", "Match"), "stop", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionMatch()), actionCollection(), "transaction_match"); + new KAction(i18n("Accept 'imported' and 'matched' transaction", "Accept"), "apply", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionsAccept()), actionCollection(), "transaction_accept"); + + new KAction(i18n("Toggle reconciliation flag", "Toggle"), 0, KShortcut("Ctrl+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotToggleReconciliationFlag()), actionCollection(), "transaction_mark_toggle"); + new KAction(i18n("Mark transaction cleared", "Cleared"), 0, KShortcut("Ctrl+Alt+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionCleared()), actionCollection(), "transaction_mark_cleared"); + new KAction(i18n("Mark transaction reconciled", "Reconciled"), "", KShortcut("Ctrl+Shift+Space"), TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionReconciled()), actionCollection(), "transaction_mark_reconciled"); + new KAction(i18n("Mark transaction not reconciled", "Not reconciled"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotMarkTransactionNotReconciled()), actionCollection(), "transaction_mark_notreconciled"); + new KAction(i18n("Select all transactions", "Select all"), 0, KShortcut("Ctrl+A"), TQT_TQOBJECT(this), TQT_SIGNAL(selectAllTransactions()), actionCollection(), "transaction_select_all"); + + new KAction(i18n("Goto account"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionGotoAccount()), actionCollection(), "transaction_goto_account"); + new KAction(i18n("Goto payee"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionGotoPayee()), actionCollection(), "transaction_goto_payee"); + new KAction(i18n("Create scheduled transaction..."), "bookmark_add", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionCreateSchedule()), actionCollection(), "transaction_create_schedule"); + new KAction(i18n("Assign next number"), "", KShortcut("Ctrl+Shift+N"), TQT_TQOBJECT(this), TQT_SLOT(slotTransactionAssignNumber()), actionCollection(), "transaction_assign_number"); + new KAction(i18n("Combine transactions", "Combine"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTransactionCombine()), actionCollection(), "transaction_combine"); + + new KAction(i18n("New investment"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentNew()), actionCollection(), "investment_new"); + new KAction(i18n("Edit investment..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentEdit()), actionCollection(), "investment_edit"); + new KAction(i18n("Delete investment..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotInvestmentDelete()), actionCollection(), "investment_delete"); + new KAction(i18n("Online price update..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotOnlinePriceUpdate()), actionCollection(), "investment_online_price_update"); + new KAction(i18n("Manual price update..."), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotManualPriceUpdate()), actionCollection(), "investment_manual_price_update"); + + new KAction(i18n("New scheduled transaction..."), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleNew()), actionCollection(), "schedule_new"); + new KAction(i18n("Edit scheduled transaction..."), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleEdit()), actionCollection(), "schedule_edit"); + new KAction(i18n("Delete scheduled transaction..."), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleDelete()), actionCollection(), "schedule_delete"); + new KAction(i18n("Duplicate scheduled transaction"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleDuplicate()), actionCollection(), "schedule_duplicate"); + new KAction(i18n("Enter next transaction..."), "key_enter", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleEnter()), actionCollection(), "schedule_enter"); + new KAction(i18n("Skip next transaction..."), "player_fwd", 0, TQT_TQOBJECT(this), TQT_SLOT(slotScheduleSkip()), actionCollection(), "schedule_skip"); + + new KAction(i18n("New payee"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew()), actionCollection(), "payee_new"); + new KAction(i18n("Rename payee"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(payeeRename()), actionCollection(), "payee_rename"); + new KAction(i18n("Delete payee"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPayeeDelete()), actionCollection(), "payee_delete"); + + new KAction(i18n("New budget"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetNew()), actionCollection(), "budget_new"); + new KAction(i18n("Rename budget"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(budgetRename()), actionCollection(), "budget_rename"); + new KAction(i18n("Delete budget"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetDelete()), actionCollection(), "budget_delete"); + new KAction(i18n("Copy budget"), "editcopy", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetCopy()), actionCollection(), "budget_copy"); + new KAction(i18n("Change budget year"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetChangeYear()), actionCollection(), "budget_change_year"); + new KAction(i18n("Budget based on forecast", "Forecast"), "forcast", 0, TQT_TQOBJECT(this), TQT_SLOT(slotBudgetForecast()), actionCollection(), "budget_forecast"); // ************************ // Currency actions // ************************ - new KAction(i18n("New currency"), "filenew", 0, this, SLOT(slotCurrencyNew()), actionCollection(), "currency_new"); - new KAction(i18n("Rename currency"), "edit", 0, this, SIGNAL(currencyRename()), actionCollection(), "currency_rename"); - new KAction(i18n("Delete currency"), "delete", 0, this, SLOT(slotCurrencyDelete()), actionCollection(), "currency_delete"); - new KAction(i18n("Select as base currency"), "kmymoney2", 0, this, SLOT(slotCurrencySetBase()), actionCollection(), "currency_setbase"); + new KAction(i18n("New currency"), "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyNew()), actionCollection(), "currency_new"); + new KAction(i18n("Rename currency"), "edit", 0, TQT_TQOBJECT(this), TQT_SIGNAL(currencyRename()), actionCollection(), "currency_rename"); + new KAction(i18n("Delete currency"), "delete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyDelete()), actionCollection(), "currency_delete"); + new KAction(i18n("Select as base currency"), "kmymoney2", 0, TQT_TQOBJECT(this), TQT_SLOT(slotCurrencySetBase()), actionCollection(), "currency_setbase"); #ifdef KMM_DEBUG - new KAction("Test new feature", "", KShortcut("Ctrl+G"), this, SLOT(slotNewFeature()), actionCollection(), "new_user_wizard"); - new KToggleAction("Debug Traces", "", 0, this, SLOT(slotToggleTraces()), actionCollection(), "debug_traces"); - new KToggleAction("Debug Timers", "", 0, this, SLOT(slotToggleTimers()), actionCollection(), "debug_timers"); + new KAction("Test new feature", "", KShortcut("Ctrl+G"), TQT_TQOBJECT(this), TQT_SLOT(slotNewFeature()), actionCollection(), "new_user_wizard"); + new KToggleAction("Debug Traces", "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTraces()), actionCollection(), "debug_traces"); + new KToggleAction("Debug Timers", "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleTimers()), actionCollection(), "debug_timers"); #endif // ************************ // Currently unused actions // ************************ #if 0 - new KToolBarPopupAction(i18n("View back"), "back", 0, this, SLOT(slotShowPreviousView()), actionCollection(), "go_back"); - new KToolBarPopupAction(i18n("View forward"), "forward", 0, this, SLOT(slotShowNextView()), actionCollection(), "go_forward"); + new KToolBarPopupAction(i18n("View back"), "back", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowPreviousView()), actionCollection(), "go_back"); + new KToolBarPopupAction(i18n("View forward"), "forward", 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowNextView()), actionCollection(), "go_forward"); action("go_back")->setEnabled(false); action("go_forward")->setEnabled(false); @@ -496,7 +496,7 @@ void KMyMoney2App::initActions(void) toggleAction("view_show_all_accounts")->setChecked(false); // use the absolute path to your kmymoney2ui.rc file for testing purpose in createGUI(); - // createGUI(QString::null, false); + // createGUI(TQString(), false); setupGUI(); } @@ -509,10 +509,10 @@ void KMyMoney2App::dumpActions(void) const } } -KAction* KMyMoney2App::action(const QString& actionName) const +KAction* KMyMoney2App::action(const TQString& actionName) const { static KShortcut shortcut(""); - static KAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KAction dummyAction(TQString("Dummy"), TQString(), shortcut, TQT_TQOBJECT_CONST(this), 0, static_cast<KActionCollection*>(0), ""); KAction* p = actionCollection()->action(actionName.latin1()); if(p) @@ -522,10 +522,10 @@ KAction* KMyMoney2App::action(const QString& actionName) const return &dummyAction; } -KToggleAction* KMyMoney2App::toggleAction(const QString& actionName) const +KToggleAction* KMyMoney2App::toggleAction(const TQString& actionName) const { static KShortcut shortcut(""); - static KToggleAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KToggleAction dummyAction(TQString("Dummy"), TQString(), shortcut, TQT_TQOBJECT_CONST(this), 0, static_cast<KActionCollection*>(0), ""); KAction* q = actionCollection()->action(actionName.latin1()); @@ -553,12 +553,12 @@ void KMyMoney2App::initStatusBar(void) // Initialization of progress bar taken from KDevelop ;-) progressBar = new KProgress(statusBar()); - progressBar->setFrameStyle(QFrame::NoFrame | QFrame::Plain); + progressBar->setFrameStyle(TQFrame::NoFrame | TQFrame::Plain); progressBar->setMargin(0); progressBar->setLineWidth(0); - progressBar->setBackgroundMode(QWidget::PaletteBackground); + progressBar->setBackgroundMode(TQWidget::PaletteBackground); statusBar()->addWidget(progressBar); - progressBar->setFixedHeight(progressBar->sizeHint().height() - 8); + progressBar->setFixedHeight(progressBar->tqsizeHint().height() - 8); // hide the progress bar for now slotStatusProgressBar(-1, -1); @@ -587,8 +587,8 @@ void KMyMoney2App::readOptions(void) if(p) p->loadEntries(config,"Recent Files"); - QSize defaultSize(800, 600); - QSize size=config->readSizeEntry("Geometry", &defaultSize); + TQSize defaultSize(800, 600); + TQSize size=config->readSizeEntry("Geometry", &defaultSize); if(!size.isEmpty()) { resize(size); @@ -601,7 +601,7 @@ void KMyMoney2App::readOptions(void) m_bCheckSchedules = config->readBoolEntry("CheckSchedules", true); } -void KMyMoney2App::resizeEvent(QResizeEvent* ev) +void KMyMoney2App::resizeEvent(TQResizeEvent* ev) { KMainWindow::resizeEvent(ev); updateCaption(true); @@ -632,7 +632,7 @@ bool KMyMoney2App::queryExit(void) } ///////////////////////////////////////////////////////////////////// -// SLOT IMPLEMENTATION +// TQT_SLOT IMPLEMENTATION ///////////////////////////////////////////////////////////////////// void KMyMoney2App::slotFileInfoDialog(void) { @@ -645,7 +645,7 @@ void KMyMoney2App::slotPerformanceTest(void) // dump performance report to stderr int measurement[2]; - QTime timer; + TQTime timer; MyMoneyAccount acc; qDebug("--- Starting performance tests ---"); @@ -655,7 +655,7 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; timer.start(); for(int i = 0; i < 1000; ++i) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list); measurement[i != 0] = timer.elapsed(); } @@ -722,8 +722,8 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; if(MyMoneyFile::instance()->asset().accountCount()) { MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]); - filter.setDateFilter(QDate(), QDate::currentDate()); - QValueList<MyMoneyTransaction> list; + filter.setDateFilter(TQDate(), TQDate::tqcurrentDate()); + TQValueList<MyMoneyTransaction> list; timer.start(); for(int i = 0; i < 100; ++i) { @@ -741,8 +741,8 @@ void KMyMoney2App::slotPerformanceTest(void) measurement[0] = measurement[1] = 0; if(MyMoneyFile::instance()->asset().accountCount()) { MyMoneyTransactionFilter filter(MyMoneyFile::instance()->asset().accountList()[0]); - filter.setDateFilter(QDate(), QDate::currentDate()); - QValueList<MyMoneyTransaction> list; + filter.setDateFilter(TQDate(), TQDate::tqcurrentDate()); + TQValueList<MyMoneyTransaction> list; timer.start(); for(int i = 0; i < 100; ++i) { @@ -778,7 +778,7 @@ void KMyMoney2App::slotFileNew(void) NewUserWizard::Wizard *wizard = new NewUserWizard::Wizard(); - if(wizard->exec() == QDialog::Accepted) { + if(wizard->exec() == TQDialog::Accepted) { MyMoneyFile* file = MyMoneyFile::instance(); ft.restart(); try { @@ -808,8 +808,8 @@ void KMyMoney2App::slotFileNew(void) } // import the account templates - QValueList<MyMoneyTemplate> templates = wizard->templates(); - QValueList<MyMoneyTemplate>::iterator it_t; + TQValueList<MyMoneyTemplate> templates = wizard->templates(); + TQValueList<MyMoneyTemplate>::iterator it_t; for(it_t = templates.begin(); it_t != templates.end(); ++it_t) { (*it_t).importTemplate(&progressCallback); } @@ -849,18 +849,18 @@ void KMyMoney2App::slotFileNew(void) } } -KURL KMyMoney2App::selectFile(const QString& title, const QString& _path, const QString& mask, KFile::Mode mode) +KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, const TQString& tqmask, KFile::Mode mode) { KURL url; - QString path(_path); + TQString path(_path); if(path.isEmpty()) path = KGlobalSettings::documentPath(); - KFileDialog* dialog = new KFileDialog(path, mask, this, title, true); + KFileDialog* dialog = new KFileDialog(path, tqmask, this, title, true); dialog->setMode(mode); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { url = dialog->selectedURL(); } delete dialog; @@ -874,11 +874,11 @@ void KMyMoney2App::slotFileOpen(void) KMSTATUS(i18n("Open a file.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|KMyMoney files\n%2|All files (*.*)").arg("*.kmy *.xml").arg("*"), + i18n("%1|KMyMoney files\n%2|All files (*.*)").tqarg("*.kmy *.xml").tqarg("*"), this, i18n("Open File..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { slotFileOpenRecent(dialog->selectedURL()); } delete dialog; @@ -890,7 +890,7 @@ void KMyMoney2App::slotOpenDatabase(void) KSelectDatabaseDlg dialog; dialog.setMode(IO_ReadWrite); - if(dialog.exec() == QDialog::Accepted) { + if(dialog.exec() == TQDialog::Accepted) { slotFileOpenRecent(dialog.selectedURL()); } } @@ -900,7 +900,7 @@ bool KMyMoney2App::isImportableFile( const KURL& url ) bool result = false; // Iterate through the plugins and see if there's a loaded plugin who can handle it - QMap<QString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); + TQMap<TQString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); while ( it_plugin != m_importerPlugins.end() ) { if ( (*it_plugin)->isMyFormat(url.path()) ) @@ -918,7 +918,7 @@ bool KMyMoney2App::isImportableFile( const KURL& url ) if ( MyMoneyStatement::isStatementFile( url.path() ) ) result = true; - // Place code here to test for QIF and other locally-supported formats + // Place code here to test for TQIF and other locally-supported formats // (i.e. not a plugin). If you add them here, be sure to add it to // the webConnect function. @@ -931,13 +931,13 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) KURL lastFile = m_fileName; // check if there are other instances which might have this file open - QValueList<QCString> list = instanceList(); - QValueList<QCString>::ConstIterator it; + TQValueList<TQCString> list = instanceList(); + TQValueList<TQCString>::ConstIterator it; bool duplicate = false; for(it = list.begin(); duplicate == false && it != list.end(); ++it) { KMyMoney2App_stub* remoteApp = new KMyMoney2App_stub(kapp->dcopClient(), (*it), "kmymoney2app"); - QString remoteFile = remoteApp->filename(); + TQString remoteFile = remoteApp->filename(); if(!remoteApp->ok()) { qDebug("DCOP error while calling app->filename()"); } else { @@ -961,7 +961,7 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) KSelectDatabaseDlg dialog(dburl); dialog.setMode(IO_ReadWrite); - if(dialog.exec() == QDialog::Accepted) dburl = dialog.selectedURL(); + if(dialog.exec() == TQDialog::Accepted) dburl = dialog.selectedURL(); } slotFileClose(); if(!myMoneyView->fileOpen()) { @@ -988,10 +988,10 @@ void KMyMoney2App::slotFileOpenRecent(const KURL& url) } } else { slotFileClose(); - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> is either an invalid filename or the file does not exist. You can open another file or create a new one.").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("File not found")); } } else { - KMessageBox::sorry(this, QString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open")); + KMessageBox::sorry(this, TQString("<p>")+i18n("File <b>%1</b> is already opened in another instance of KMyMoney").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Duplicate open")); } } @@ -1021,7 +1021,7 @@ bool KMyMoney2App::slotFileSave(void) return rc; } -void KMyMoney2App::slotFileSaveAsFilterChanged(const QString& filter) +void KMyMoney2App::slotFileSaveAsFilterChanged(const TQString& filter) { if(m_saveEncrypted) { if(filter != "*.kmy") { @@ -1037,9 +1037,9 @@ void KMyMoney2App::slotManageGpgKeys(void) { KGpgKeySelectionDlg dlg(this); dlg.setKeys(m_additionalGpgKeys); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { m_additionalGpgKeys = dlg.keys(); - m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count())); + m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count())); } } @@ -1051,7 +1051,7 @@ void KMyMoney2App::slotKeySelected(int idx) } m_additionalKeyLabel->setEnabled(idx != 0); m_additionalKeyButton->setEnabled(idx != 0); - m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").arg(cnt)); + m_additionalKeyLabel->setText(i18n("Additional encryption key(s) to be used: %1").tqarg(cnt)); } bool KMyMoney2App::slotFileSaveAs(void) @@ -1061,40 +1061,40 @@ bool KMyMoney2App::slotFileSaveAs(void) if (myMoneyView->isDatabase()) dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())->fillStorage(); KMSTATUS(i18n("Saving file with a new filename...")); - QString prevDir= ""; // don't prompt file name if not a native file + TQString prevDir= ""; // don't prompt file name if not a native file if (myMoneyView->isNativeFile()) prevDir = readLastUsedDir(); // fill the additional key list with the default m_additionalGpgKeys = KMyMoneyGlobalSettings::gpgRecipientList(); - QVBox* vbox = new QVBox(); + TQVBox* vbox = new TQVBox(); if(KGPGFile::GPGAvailable()) { - QHBox* keyBox = new QHBox(vbox); - new QLabel(i18n("Encryption key to be used"), keyBox); + TQHBox* keyBox = new TQHBox(vbox); + new TQLabel(i18n("Encryption key to be used"), keyBox); m_saveEncrypted = new KComboBox(keyBox); - QHBox* labelBox = new QHBox(vbox); - m_additionalKeyLabel = new QLabel(i18n("Additional encryption key(s) to be used: %1").arg(m_additionalGpgKeys.count()), labelBox); + TQHBox* labelBox = new TQHBox(vbox); + m_additionalKeyLabel = new TQLabel(i18n("Additional encryption key(s) to be used: %1").tqarg(m_additionalGpgKeys.count()), labelBox); m_additionalKeyButton = new KPushButton(i18n("Manage additional keys"), labelBox); - connect(m_additionalKeyButton, SIGNAL(clicked()), this, SLOT(slotManageGpgKeys())); - connect(m_saveEncrypted, SIGNAL(activated(int)), this, SLOT(slotKeySelected(int))); + connect(m_additionalKeyButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotManageGpgKeys())); + connect(m_saveEncrypted, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(slotKeySelected(int))); // fill the secret key list and combo box - QStringList keyList; + TQStringList keyList; KGPGFile::secretKeyList(keyList); m_saveEncrypted->insertItem(i18n("No encryption")); - for(QStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { - QStringList fields = QStringList::split(":", *it); + for(TQStringList::iterator it = keyList.begin(); it != keyList.end(); ++it) { + TQStringList fields = TQStringList::split(":", *it); if(fields[0] != RECOVER_KEY_ID) { - // replace parenthesis in name field with brackets - QString name = fields[1]; - name.replace('(', "["); - name.replace(')', "]"); - name = QString("%1 (0x%2)").arg(name).arg(fields[0]); + // replace tqparenthesis in name field with brackets + TQString name = fields[1]; + name.tqreplace('(', "["); + name.tqreplace(')', "]"); + name = TQString("%1 (0x%2)").tqarg(name).tqarg(fields[0]); m_saveEncrypted->insertItem(name); - if(name.contains(KMyMoneyGlobalSettings::gpgRecipient())) { + if(name.tqcontains(KMyMoneyGlobalSettings::gpgRecipient())) { m_saveEncrypted->setCurrentItem(name); } } @@ -1105,13 +1105,13 @@ bool KMyMoney2App::slotFileSaveAs(void) // adjust to our local needs (filetypes etc.) and // enhanced to show the m_saveEncrypted combo box bool specialDir = prevDir.at(0) == ':'; - KFileDialog dlg( specialDir ? prevDir : QString::null, - QString("%1|%2\n").arg("*.kmy").arg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) + - QString("%1|%2\n").arg("*.xml").arg(i18n("XML (Filefilter)", "XML files")) + - QString("%1|%2\n").arg("*.anon.xml").arg(i18n("Anonymous (Filefilter)", "Anonymous files")) + - QString("%1|%2\n").arg("*").arg(i18n("All files")), + KFileDialog dlg( specialDir ? prevDir : TQString(), + TQString("%1|%2\n").tqarg("*.kmy").tqarg(i18n("KMyMoney (Filefilter)", "KMyMoney files")) + + TQString("%1|%2\n").tqarg("*.xml").tqarg(i18n("XML (Filefilter)", "XML files")) + + TQString("%1|%2\n").tqarg("*.anon.xml").tqarg(i18n("Anonymous (Filefilter)", "Anonymous files")) + + TQString("%1|%2\n").tqarg("*").tqarg(i18n("All files")), this, "filedialog", true, vbox); - connect(&dlg, SIGNAL(filterChanged(const QString&)), this, SLOT(slotFileSaveAsFilterChanged(const QString&))); + connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAsFilterChanged(const TQString&))); if ( !specialDir ) dlg.setSelection( prevDir ); // may also be a filename @@ -1119,22 +1119,22 @@ bool KMyMoney2App::slotFileSaveAs(void) dlg.setOperationMode( KFileDialog::Saving ); dlg.setCaption(i18n("Save As")); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { KURL newURL = dlg.selectedURL(); if (!newURL.isEmpty()) { - QString newName = newURL.prettyURL(0, KURL::StripFileProtocol); + TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol); // end of copy // find last . delimiter - int nLoc = newName.findRev('.'); + int nLoc = newName.tqfindRev('.'); if(nLoc != -1) { - QString strExt, strTemp; + TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.find("kmy", 0, FALSE) == -1) && (strExt.find("xml", 0, FALSE) == -1)) + if((strExt.tqfind("kmy", 0, FALSE) == -1) && (strExt.tqfind("xml", 0, FALSE) == -1)) { strTemp.append("kmy"); @@ -1163,9 +1163,9 @@ bool KMyMoney2App::slotFileSaveAs(void) { m_fileName = newName; - QString encryptionKeys; + TQString encryptionKeys; if(m_saveEncrypted && m_saveEncrypted->currentItem() != 0) { - QRegExp keyExp(".* \\((.*)\\)"); + TQRegExp keyExp(".* \\((.*)\\)"); if(keyExp.search(m_saveEncrypted->currentText()) != -1) { encryptionKeys = keyExp.cap(1); } @@ -1203,7 +1203,7 @@ bool KMyMoney2App::slotSaveAsDatabase(void) KURL oldUrl = m_fileName.isEmpty() ? lastOpenedURL() : m_fileName; KURL url = oldUrl; - while (oldUrl == url && dialog.exec() == QDialog::Accepted) { + while (oldUrl == url && dialog.exec() == TQDialog::Accepted) { url = dialog.selectedURL(); // If the protocol is SQL for the old and new, and the hostname and database names match // Let the user know that the current database cannot be saved on top of itself. @@ -1265,8 +1265,8 @@ void KMyMoney2App::slotFileClose(void) slotSelectInvestment(); slotSelectSchedule(); slotSelectCurrency(); - slotSelectBudget(QValueList<MyMoneyBudget>()); - slotSelectPayees(QValueList<MyMoneyPayee>()); + slotSelectBudget(TQValueList<MyMoneyBudget>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); slotSelectTransactions(KMyMoneyRegister::SelectedTransactions()); m_reconciliationAccount = MyMoneyAccount(); @@ -1278,7 +1278,7 @@ void KMyMoney2App::slotFileClose(void) // just create a new balance warning object delete d->m_balanceWarning; - d->m_balanceWarning = new KBalanceWarning(this); + d->m_balanceWarning = new KBalanceWarning(TQT_TQOBJECT(this)); emit fileLoaded(m_fileName); } @@ -1335,11 +1335,11 @@ void KMyMoney2App::slotToggleTimers(void) timersOn = toggleAction("debug_timers")->isChecked(); } -const QString KMyMoney2App::slotStatusMsg(const QString &text) +const TQString KMyMoney2App::slotStatusMsg(const TQString &text) { /////////////////////////////////////////////////////////////////// // change status message permanently - QString msg = m_statusMsg; + TQString msg = m_statusMsg; m_statusMsg = text; if(m_statusMsg.isEmpty()) @@ -1351,7 +1351,7 @@ const QString KMyMoney2App::slotStatusMsg(const QString &text) void KMyMoney2App::ready(void) { - slotStatusMsg(QString()); + slotStatusMsg(TQString()); } bool KMyMoney2App::isReady(void) @@ -1384,13 +1384,13 @@ void KMyMoney2App::slotStatusProgressBar(int current, int total) } else { // update if(current > m_nextUpdate) { progressBar->setProgress(current); - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); m_nextUpdate += m_progressUpdate; } } } -void KMyMoney2App::progressCallback(int current, int total, const QString& msg) +void KMyMoney2App::progressCallback(int current, int total, const TQString& msg) { if(!msg.isEmpty()) kmymoney2->slotStatusMsg(msg); @@ -1414,7 +1414,7 @@ void KMyMoney2App::slotFileViewPersonal(void) user.city(), user.state(), user.postcode(), user.telephone(), user.email(), this, "NewFileDlg", i18n("Edit Personal Data")); - if (newFileDlg.exec() == QDialog::Accepted) + if (newFileDlg.exec() == TQDialog::Accepted) { user.setName(newFileDlg.userNameText); user.setAddress(newFileDlg.userStreetText); @@ -1428,7 +1428,7 @@ void KMyMoney2App::slotFileViewPersonal(void) file->setUser(user); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to store user information: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to store user information: %1").tqarg(e->what())); delete e; } } @@ -1441,9 +1441,9 @@ void KMyMoney2App::slotFileFileInfo(void) return; } - QFile g( "kmymoney2.dump" ); + TQFile g( "kmymoney2.dump" ); g.open( IO_WriteOnly ); - QDataStream st(&g); + TQDataStream st(&g); MyMoneyStorageDump dumper; dumper.writeStream(st, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())); g.close(); @@ -1455,18 +1455,18 @@ void KMyMoney2App::slotLoadAccountTemplates(void) int rc; KLoadTemplateDlg* dlg = new KLoadTemplateDlg(); - if((rc = dlg->exec()) == QDialog::Accepted) { + if((rc = dlg->exec()) == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { // import the account templates - QValueList<MyMoneyTemplate> templates = dlg->templates(); - QValueList<MyMoneyTemplate>::iterator it_t; + TQValueList<MyMoneyTemplate> templates = dlg->templates(); + TQValueList<MyMoneyTemplate>::iterator it_t; for(it_t = templates.begin(); it_t != templates.end(); ++it_t) { (*it_t).importTemplate(&progressCallback); } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to import template(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -1477,7 +1477,7 @@ void KMyMoney2App::slotSaveAccountTemplates(void) { KMSTATUS(i18n("Exporting account templates.")); - QString newName = KFileDialog::getSaveFileName(KGlobalSettings::documentPath(), + TQString newName = KFileDialog::getSaveFileName(KGlobalSettings::documentPath(), i18n("*.kmt|KMyMoney template files\n" "*.*|All files"), this, i18n("Save as...")); // @@ -1487,13 +1487,13 @@ void KMyMoney2App::slotSaveAccountTemplates(void) if(!newName.isEmpty()) { // find last . delimiter - int nLoc = newName.findRev('.'); + int nLoc = newName.tqfindRev('.'); if(nLoc != -1) { - QString strExt, strTemp; + TQString strExt, strTemp; strTemp = newName.left(nLoc + 1); strExt = newName.right(newName.length() - (nLoc + 1)); - if((strExt.find("kmt", 0, FALSE) == -1)) + if((strExt.tqfind("kmt", 0, FALSE) == -1)) { strTemp.append("kmt"); //append to make complete file name @@ -1527,7 +1527,7 @@ void KMyMoney2App::slotQifImport(void) // remove all kmm-statement-#.txt files d->unlinkStatementXML(); - connect(m_qifReader, SIGNAL(importFinished()), this, SLOT(slotQifImportFinished())); + connect(m_qifReader, TQT_SIGNAL(importFinished()), TQT_TQOBJECT(this), TQT_SLOT(slotQifImportFinished())); m_qifReader->setURL(dlg->filename()); @@ -1559,7 +1559,7 @@ void KMyMoney2App::slotQifImportFinished(void) KMessageBox::informationList(this, i18n("The statements have been processed with the following results:"), d->m_statementResults, i18n("Statement stats")); #if 0 - // fixme: re-enable the QIF import menu options + // fixme: re-enable the TQIF import menu options if(m_qifReader->finishImport()) { if(verifyImportedData(m_qifReader->account())) { // keep the new data set, destroy the backup copy @@ -1622,11 +1622,11 @@ void KMyMoney2App::slotGncImport(void) KMSTATUS(i18n("Importing a Gnucash file.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|Gnucash files\n%2|All files (*.*)").arg("*").arg("*"), + i18n("%1|Gnucash files\n%2|All files (*.*)").tqarg("*").tqarg("*"), this, i18n("Import Gnucash file..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) { + if(dialog->exec() == TQDialog::Accepted) { // slotFileClose(); // if(myMoneyView->fileOpen()) // return; @@ -1665,26 +1665,26 @@ void KMyMoney2App::slotStatementImport(void) KMSTATUS(i18n("Importing an XML Statement.")); KFileDialog* dialog = new KFileDialog(KGlobalSettings::documentPath(), - i18n("%1|XML files\n%2|All files (*.*)").arg("*.xml").arg("*.*"), + i18n("%1|XML files\n%2|All files (*.*)").tqarg("*.xml").tqarg("*.*"), this, i18n("Import XML Statement..."), true); dialog->setMode(KFile::File | KFile::ExistingOnly); - if(dialog->exec() == QDialog::Accepted) + if(dialog->exec() == TQDialog::Accepted) { result = slotStatementImport(dialog->selectedURL().path()); -/* QFile f( dialog->selectedURL().path() ); +/* TQFile f( dialog->selectedURL().path() ); f.open( IO_ReadOnly ); - QString error = "Unable to parse file"; - QDomDocument* doc = new QDomDocument; + TQString error = "Unable to parse file"; + TQDomDocument* doc = new TQDomDocument; if(doc->setContent(&f, FALSE)) { if ( doc->doctype().name() == "KMYMONEY-STATEMENT" ) { - QDomElement rootElement = doc->documentElement(); + TQDomElement rootElement = doc->documentElement(); if(!rootElement.isNull()) { - QDomNode child = rootElement.firstChild(); + TQDomNode child = rootElement.firstChild(); if(!child.isNull() && child.isElement()) { MyMoneyStatement s; @@ -1702,7 +1702,7 @@ void KMyMoney2App::slotStatementImport(void) if ( !result ) { - QMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").arg( dialog->selectedURL().path()).arg(error), QMessageBox::Ok, 0 ); + TQMessageBox::critical( this, i18n("Critical Error"), i18n("Unable to read file %1: %2").tqarg( dialog->selectedURL().path()).tqarg(error), TQMessageBox::Ok, 0 ); }*/ } @@ -1715,14 +1715,14 @@ void KMyMoney2App::slotStatementImport(void) } } -bool KMyMoney2App::slotStatementImport(const QString& url) +bool KMyMoney2App::slotStatementImport(const TQString& url) { bool result = false; MyMoneyStatement s; if ( MyMoneyStatement::readXMLFile( s, url ) ) result = slotStatementImport(s); else - KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").arg(url), i18n("Invalid Statement")); + KMessageBox::error(this, i18n("Error importing %1: This file is not a valid KMM statement file.").tqarg(url), i18n("Invalid Statement")); return result; } @@ -1732,7 +1732,7 @@ bool KMyMoney2App::slotStatementImport(const MyMoneyStatement& s) bool result = false; // keep a copy of the statement - MyMoneyStatement::writeXMLFile(s, QString("/home/thb/kmm-statement-%1.txt").arg(d->statementXMLindex++)); + MyMoneyStatement::writeXMLFile(s, TQString("/home/thb/kmm-statement-%1.txt").tqarg(d->statementXMLindex++)); // we use an object on the heap here, so that we can check the presence // of it during slotUpdateActions() by looking at the pointer. @@ -1743,7 +1743,7 @@ bool KMyMoney2App::slotStatementImport(const MyMoneyStatement& s) // disable all standard widgets during the import setEnabled(false); - QStringList messages; + TQStringList messages; result = m_smtReader->import(s, messages); bool transactionAdded = m_smtReader->anyTransactionAdded(); @@ -1776,7 +1776,7 @@ void KMyMoney2App::slotQifExport(void) if(dlg->exec()) { if(okToWriteFile(dlg->filename())) { MyMoneyQifWriter writer; - connect(&writer, SIGNAL(signalProgress(int, int)), this, SLOT(slotStatusProgressBar(int, int))); + connect(&writer, TQT_SIGNAL(signalProgress(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusProgressBar(int, int))); writer.write(dlg->filename(), dlg->profile(), dlg->accountId(), dlg->accountSelected(), dlg->categorySelected(), @@ -1792,7 +1792,7 @@ bool KMyMoney2App::okToWriteFile(const KURL& url) bool reallySaveFile = true; if(KIO::NetAccess::exists(url, true, this)) { - if(KMessageBox::warningYesNo(this, QString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").arg(url.prettyURL(0, KURL::StripFileProtocol))+QString("</qt>"), i18n("File already exists")) != KMessageBox::Yes) + if(KMessageBox::warningYesNo(this, TQString("<qt>")+i18n("The file <b>%1</b> already exists. Do you really want to override it?").tqarg(url.prettyURL(0, KURL::StripFileProtocol))+TQString("</qt>"), i18n("File already exists")) != KMessageBox::Yes) reallySaveFile = false; } return reallySaveFile; @@ -1832,9 +1832,9 @@ void KMyMoney2App::slotSettings(void) dlg->addPage(forecastPage, i18n("Forecast"), "forcast"); dlg->addPage(pluginsPage, i18n("Plugins"), "connect_no"); - connect(dlg, SIGNAL(settingsChanged()), this, SLOT(slotUpdateConfiguration())); - connect(dlg, SIGNAL(okClicked()), pluginsPage, SLOT(slotSavePlugins())); - connect(dlg, SIGNAL(defaultClicked()), pluginsPage, SLOT(slotDefaultsPlugins())); + connect(dlg, TQT_SIGNAL(settingsChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateConfiguration())); + connect(dlg, TQT_SIGNAL(okClicked()), pluginsPage, TQT_SLOT(slotSavePlugins())); + connect(dlg, TQT_SIGNAL(defaultClicked()), pluginsPage, TQT_SLOT(slotDefaultsPlugins())); dlg->show(); } @@ -1917,7 +1917,7 @@ void KMyMoney2App::slotFileBackup(void) if(!m_fileName.isLocalFile()) { KMessageBox::sorry(this, i18n("The current implementation of the backup functionality only supports local files as source files! Your current source file is '%1'.") - .arg(m_fileName.url()), + .tqarg(m_fileName.url()), i18n("Local files only")); return; @@ -1934,7 +1934,7 @@ void KMyMoney2App::slotFileBackup(void) m_mountpoint = backupDlg->txtMountPoint->text(); if (m_backupMount) { - progressCallback(0, 300, i18n("Mounting %1").arg(m_mountpoint)); + progressCallback(0, 300, i18n("Mounting %1").tqarg(m_mountpoint)); proc << "mount"; proc << m_mountpoint; proc.start(); @@ -1961,24 +1961,24 @@ void KMyMoney2App::slotProcessExited(void) if(proc.normalExit() && proc.exitStatus() == 0) { proc.clearArguments(); - QString today; + TQString today; today.sprintf("-%04d-%02d-%02d.kmy", - QDate::currentDate().year(), - QDate::currentDate().month(), - QDate::currentDate().day()); - QString backupfile = m_mountpoint + "/" + m_fileName.fileName(false); + TQDate::tqcurrentDate().year(), + TQDate::tqcurrentDate().month(), + TQDate::tqcurrentDate().day()); + TQString backupfile = m_mountpoint + "/" + m_fileName.fileName(false); KMyMoneyUtils::appendCorrectFileExt(backupfile, today); // check if file already exists and ask what to do m_backupResult = 0; - QFile f(backupfile); + TQFile f(backupfile); if (f.exists()) { int answer = KMessageBox::warningContinueCancel(this, i18n("Backup file for today exists on that device. Replace ?"), i18n("Backup"), i18n("&Replace")); if (answer == KMessageBox::Cancel) { m_backupResult = 1; if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -1986,14 +1986,14 @@ void KMyMoney2App::slotProcessExited(void) proc.start(); } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } } if(m_backupResult == 0) { - progressCallback(50, 0, i18n("Writing %1").arg(backupfile)); + progressCallback(50, 0, i18n("Writing %1").tqarg(backupfile)); proc << "cp" << "-f" << m_fileName.path(0) << backupfile; m_backupState = BACKUP_COPYING; proc.start(); @@ -2003,7 +2003,7 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error mounting device"), i18n("Backup")); m_backupResult = 1; if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2012,7 +2012,7 @@ void KMyMoney2App::slotProcessExited(void) } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } @@ -2022,7 +2022,7 @@ void KMyMoney2App::slotProcessExited(void) if(proc.normalExit() && proc.exitStatus() == 0) { if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2032,7 +2032,7 @@ void KMyMoney2App::slotProcessExited(void) progressCallback(300, 0, i18n("Done")); KMessageBox::information(this, i18n("File successfully backed up"), i18n("Backup")); m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } else { @@ -2041,7 +2041,7 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error copying file to device"), i18n("Backup")); if (m_backupMount) { - progressCallback(250, 0, i18n("Unmounting %1").arg(m_mountpoint)); + progressCallback(250, 0, i18n("Unmounting %1").tqarg(m_mountpoint)); proc.clearArguments(); proc << "umount"; proc << m_mountpoint; @@ -2051,7 +2051,7 @@ void KMyMoney2App::slotProcessExited(void) } else { m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); } } @@ -2068,13 +2068,13 @@ void KMyMoney2App::slotProcessExited(void) KMessageBox::information(this, i18n("Error unmounting device"), i18n("Backup")); } m_backupState = BACKUP_IDLE; - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); break; default: qWarning("Unknown state for backup operation!"); - progressCallback(-1, -1, QString()); + progressCallback(-1, -1, TQString()); ready(); break; } @@ -2104,7 +2104,7 @@ void KMyMoney2App::slotShowNextView(void) void KMyMoney2App::slotQifProfileEditor(void) { - MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "QIF Profile Editor"); + MyMoneyQifProfileEditor* editor = new MyMoneyQifProfileEditor(true, this, "TQIF Profile Editor"); editor->exec(); @@ -2115,7 +2115,7 @@ void KMyMoney2App::slotQifProfileEditor(void) void KMyMoney2App::slotToolsStartKCalc(void) { - QString cmd = KMyMoneyGlobalSettings::externalCalculator(); + TQString cmd = KMyMoneyGlobalSettings::externalCalculator(); // if none is present, we fall back to the default if(cmd.isEmpty()) cmd = "kcalc"; @@ -2126,9 +2126,9 @@ void KMyMoney2App::slotFindTransaction(void) { if(m_searchDlg == 0) { m_searchDlg = new KFindTransactionDlg(); - connect(m_searchDlg, SIGNAL(destroyed()), this, SLOT(slotCloseSearchDialog())); - connect(m_searchDlg, SIGNAL(transactionSelected(const QString&, const QString&)), - myMoneyView, SLOT(slotLedgerSelected(const QString&, const QString&))); + connect(m_searchDlg, TQT_SIGNAL(destroyed()), TQT_TQOBJECT(this), TQT_SLOT(slotCloseSearchDialog())); + connect(m_searchDlg, TQT_SIGNAL(transactionSelected(const TQString&, const TQString&)), + myMoneyView, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); } m_searchDlg->show(); m_searchDlg->raise(); @@ -2153,7 +2153,7 @@ void KMyMoney2App::createInstitution(MyMoneyInstitution& institution) ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Cannot add institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Cannot add institution: %1").tqarg(e->what())); delete e; } } @@ -2195,14 +2195,14 @@ void KMyMoney2App::slotInstitutionEdit(const MyMoneyObject& obj) slotSelectInstitution(file->institution(dlg.institution().id())); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to store institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to store institution: %1").tqarg(e->what())); delete e; } } } catch(MyMoneyException *e) { if(!obj.id().isEmpty()) - KMessageBox::information(this, i18n("Unable to edit institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to edit institution: %1").tqarg(e->what())); delete e; } } @@ -2213,7 +2213,7 @@ void KMyMoney2App::slotInstitutionDelete(void) try { MyMoneyInstitution institution = file->institution(m_selectedInstitution.id()); - if ((KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").arg(institution.name()))) == KMessageBox::No) + if ((KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete institution <b>%1</b> ?").tqarg(institution.name()))) == KMessageBox::No) return; MyMoneyFileTransaction ft; @@ -2221,54 +2221,54 @@ void KMyMoney2App::slotInstitutionDelete(void) file->removeInstitution(institution); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what())); delete e; } } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete institution: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete institution: %1").tqarg(e->what())); delete e; } } -const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& parent) const +const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent) const { static MyMoneyAccount nullAccount; MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> parents; + TQValueList<MyMoneyAccount> tqparents; try { // search by id if(!acc.id().isEmpty()) { return file->account(acc.id()); } - // collect the parents. in case parent does not have an id, we scan the all top-level accounts - if(parent.id().isEmpty()) { - parents << file->asset(); - parents << file->liability(); - parents << file->income(); - parents << file->expense(); - parents << file->equity(); + // collect the tqparents. in case tqparent does not have an id, we scan the all top-level accounts + if(tqparent.id().isEmpty()) { + tqparents << file->asset(); + tqparents << file->liability(); + tqparents << file->income(); + tqparents << file->expense(); + tqparents << file->equity(); } else { - parents << parent; + tqparents << tqparent; } - QValueList<MyMoneyAccount>::const_iterator it_p; - for(it_p = parents.begin(); it_p != parents.end(); ++it_p) { - MyMoneyAccount parentAccount = *it_p; + TQValueList<MyMoneyAccount>::const_iterator it_p; + for(it_p = tqparents.begin(); it_p != tqparents.end(); ++it_p) { + MyMoneyAccount tqparentAccount = *it_p; // search by name (allow hierarchy) int pos; // check for ':' in the name and use it as separator for a hierarchy - QString name = acc.name(); - while((pos = name.find(MyMoneyFile::AccountSeperator)) != -1) { - QString part = name.left(pos); - QString remainder = name.mid(pos+1); - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); + TQString name = acc.name(); + while((pos = name.tqfind(MyMoneyFile::AccountSeperator)) != -1) { + TQString part = name.left(pos); + TQString remainder = name.mid(pos+1); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part); if(existingAccount.id().isEmpty()) { return existingAccount; } - parentAccount = existingAccount; + tqparentAccount = existingAccount; name = remainder; } - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, name); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, name); if(!existingAccount.id().isEmpty()) { if(acc.accountType() != MyMoneyAccount::UnknownAccountType) { if(acc.accountType() != existingAccount.accountType()) @@ -2278,13 +2278,13 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const } } } catch (MyMoneyException *e) { - KMessageBox::error(0, i18n("Unable to find account: %1").arg(e->what())); + KMessageBox::error(0, i18n("Unable to find account: %1").tqarg(e->what())); delete e; } return nullAccount; } -void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& parentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal) +void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqparentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -2297,19 +2297,19 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par { int pos; // check for ':' in the name and use it as separator for a hierarchy - while((pos = newAccount.name().find(MyMoneyFile::AccountSeperator)) != -1) { - QString part = newAccount.name().left(pos); - QString remainder = newAccount.name().mid(pos+1); - const MyMoneyAccount& existingAccount = file->subAccountByName(parentAccount, part); + while((pos = newAccount.name().tqfind(MyMoneyFile::AccountSeperator)) != -1) { + TQString part = newAccount.name().left(pos); + TQString remainder = newAccount.name().mid(pos+1); + const MyMoneyAccount& existingAccount = file->subAccountByName(tqparentAccount, part); if(existingAccount.id().isEmpty()) { newAccount.setName(part); - file->addAccount(newAccount, parentAccount); - parentAccount = newAccount; + file->addAccount(newAccount, tqparentAccount); + tqparentAccount = newAccount; } else { - parentAccount = existingAccount; + tqparentAccount = existingAccount; } - newAccount.setParentAccountId(QString()); // make sure, there's no parent + newAccount.setParentAccountId(TQString()); // make sure, there's no tqparent newAccount.clearId(); // and no id set for adding newAccount.removeAccountIds(); // and no sub-account ids newAccount.setName(remainder); @@ -2319,14 +2319,14 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par // Check the opening balance if (openingBal.isPositive() && newAccount.accountGroup() == MyMoneyAccount::Liability) { - QString message = i18n("This account is a liability and if the " + TQString message = i18n("This account is a liability and if the " "opening balance represents money owed, then it should be negative. " "Negate the amount?\n\n" "Please click Yes to change the opening balance to %1,\n" "Please click No to leave the amount as %2,\n" "Please click Cancel to abort the account creation.") - .arg((-openingBal).formatMoney(newAccount, sec)) - .arg(openingBal.formatMoney(newAccount, sec)); + .tqarg((-openingBal).formatMoney(newAccount, sec)) + .tqarg(openingBal.formatMoney(newAccount, sec)); int ans = KMessageBox::questionYesNoCancel(this, message); if (ans == KMessageBox::Yes) { @@ -2336,7 +2336,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par return; } - file->addAccount(newAccount, parentAccount); + file->addAccount(newAccount, tqparentAccount); // in case of a loan account, we add the initial payment if((newAccount.accountType() == MyMoneyAccount::Loan @@ -2357,7 +2357,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par b.setShares(b.value()); a.setMemo(i18n("Loan payout")); b.setMemo(i18n("Loan payout")); - t.setPostDate(QDate::fromString(acc.value("kmm-loan-payment-date"), Qt::ISODate)); + t.setPostDate(TQDate::fromString(acc.value("kmm-loan-payment-date"), Qt::ISODate)); newAccount.deletePair("kmm-loan-payment-acc"); newAccount.deletePair("kmm-loan-payment-date"); MyMoneyFile::instance()->modifyAccount(newAccount); @@ -2371,7 +2371,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par // a brokerage account } else if(newAccount.accountType() == MyMoneyAccount::Investment && !brokerageAccount.name().isEmpty()) { - file->addAccount(brokerageAccount, parentAccount); + file->addAccount(brokerageAccount, tqparentAccount); // set a link from the investment account to the brokerage account file->modifyAccount(newAccount); @@ -2384,12 +2384,12 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par } catch (MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to add account: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to add account: %1").tqarg(e->what())); delete e; } } -void KMyMoney2App::slotCategoryNew(const QString& name, QString& id) +void KMyMoney2App::slotCategoryNew(const TQString& name, TQString& id) { MyMoneyAccount account; account.setName(name); @@ -2399,49 +2399,49 @@ void KMyMoney2App::slotCategoryNew(const QString& name, QString& id) id = account.id(); } -void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { if(KMessageBox::questionYesNo(this, - QString("<qt>%1</qt>").arg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The parent account will default to <b>%2</b> but can be changed in the following dialog</i>.").arg(account.name()).arg(parent.name())), i18n("Create category"), + TQString("<qt>%1</qt>").tqarg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The tqparent account will default to <b>%2</b> but can be changed in the following dialog</i>.").tqarg(account.name()).tqarg(tqparent.name())), i18n("Create category"), KStdGuiItem::yes(), KStdGuiItem::no(), "CreateNewCategories") == KMessageBox::Yes) { - createCategory(account, parent); + createCategory(account, tqparent); } else { // we should not keep the 'no' setting because that can confuse people like // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); - kconfig->deleteEntry(QString::fromLatin1("CreateNewCategories")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); + kconfig->deleteEntry(TQString::tqfromLatin1("CreateNewCategories")); } } } void KMyMoney2App::slotCategoryNew(void) { - MyMoneyAccount parent; + MyMoneyAccount tqparent; MyMoneyAccount account; - // Preselect the parent account by looking at the current selected account/category + // Preselect the tqparent account by looking at the current selected account/category if(!m_selectedAccount.id().isEmpty() && m_selectedAccount.isIncomeExpense()) { MyMoneyFile* file = MyMoneyFile::instance(); try { - parent = file->account(m_selectedAccount.id()); + tqparent = file->account(m_selectedAccount.id()); } catch(MyMoneyException *e) { delete e; } } - createCategory(account, parent); + createCategory(account, tqparent); } -void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { - if(!parent.id().isEmpty()) { + if(!tqparent.id().isEmpty()) { try { - // make sure parent account exists - MyMoneyFile::instance()->account(parent.id()); - account.setParentAccountId(parent.id()); - account.setAccountType( parent.accountType() ); + // make sure tqparent account exists + MyMoneyFile::instance()->account(tqparent.id()); + account.setParentAccountId(tqparent.id()); + account.setAccountType( tqparent.accountType() ); } catch(MyMoneyException *e) { delete e; } @@ -2449,19 +2449,19 @@ void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& KNewAccountDlg dialog(account, false, true, 0, 0, i18n("Create a new Category")); - if(dialog.exec() == QDialog::Accepted) { - MyMoneyAccount parentAccount, brokerageAccount; + if(dialog.exec() == TQDialog::Accepted) { + MyMoneyAccount tqparentAccount, brokerageAccount; account = dialog.account(); - parentAccount = dialog.parentAccount(); + tqparentAccount = dialog.tqparentAccount(); - createAccount(account, parentAccount, brokerageAccount, MyMoneyMoney(0,1)); + createAccount(account, tqparentAccount, brokerageAccount, MyMoneyMoney(0,1)); } } void KMyMoney2App::slotAccountNew(void) { MyMoneyAccount acc; - acc.setOpeningDate(QDate::currentDate()); + acc.setOpeningDate(TQDate::tqcurrentDate()); slotAccountNew(acc); } @@ -2469,22 +2469,22 @@ void KMyMoney2App::slotAccountNew(void) void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) { NewAccountWizard::Wizard* wizard = new NewAccountWizard::Wizard(); - connect(wizard, SIGNAL(createInstitution(MyMoneyInstitution&)), this, SLOT(slotInstitutionNew(MyMoneyInstitution&))); - connect(wizard, SIGNAL(createAccount(MyMoneyAccount&)), this, SLOT(slotAccountNew(MyMoneyAccount&))); - connect(wizard, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - connect(wizard, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createInstitution(MyMoneyInstitution&)), TQT_TQOBJECT(this), TQT_SLOT(slotInstitutionNew(MyMoneyInstitution&))); + connect(wizard, TQT_SIGNAL(createAccount(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotAccountNew(MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(wizard, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); wizard->setAccount(account); - if(wizard->exec() == QDialog::Accepted) { + if(wizard->exec() == TQDialog::Accepted) { MyMoneyAccount acc = wizard->account(); if(!(acc == MyMoneyAccount())) { MyMoneyFileTransaction ft; MyMoneyFile* file = MyMoneyFile::instance(); try { // create the account - MyMoneyAccount parent = wizard->parentAccount(); - file->addAccount(acc, parent); + MyMoneyAccount tqparent = wizard->tqparentAccount(); + file->addAccount(acc, tqparent); // tell the wizard about the account id which it // needs to create a possible schedule and transactions @@ -2506,7 +2506,7 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) // create a brokerage account if selected MyMoneyAccount brokerageAccount = wizard->brokerageAccount(); if(!(brokerageAccount == MyMoneyAccount())) { - file->addAccount(brokerageAccount, parent); + file->addAccount(brokerageAccount, tqparent); } // create a possible schedule @@ -2523,24 +2523,24 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account) ft.commit(); account = acc; } catch (MyMoneyException *e) { - KMessageBox::error(this, i18n("Unable to create account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to create account: %1").tqarg(e->what())); } } } delete wizard; } -void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& parent) +void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent) { - QString dontShowAgain = "CreateNewInvestments"; + TQString dontShowAgain = "CreateNewInvestments"; if(KMessageBox::questionYesNo(this, - QString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. " - "Do you want to create it?").arg(account.name()).arg(parent.name())+QString("</qt>"), i18n("Create security"), + TQString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. " + "Do you want to create it?").tqarg(account.name()).tqarg(tqparent.name())+TQString("</qt>"), i18n("Create security"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain) == KMessageBox::Yes) { KNewInvestmentWizard dlg; dlg.setName(account.name()); - if(dlg.exec() == QDialog::Accepted) { - dlg.createObjects(parent.id()); + if(dlg.exec() == TQDialog::Accepted) { + dlg.createObjects(tqparent.id()); account = dlg.account(); } } else { @@ -2554,7 +2554,7 @@ void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccou void KMyMoney2App::slotInvestmentNew(void) { KNewInvestmentWizard dlg; - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { dlg.createObjects(m_selectedAccount.id()); } } @@ -2562,21 +2562,21 @@ void KMyMoney2App::slotInvestmentNew(void) void KMyMoney2App::slotInvestmentEdit(void) { KNewInvestmentWizard dlg(m_selectedInvestment); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { dlg.createObjects(m_selectedAccount.id()); } } void KMyMoney2App::slotInvestmentDelete(void) { - if(KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").arg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to delete the investment <b>%1</b>?").tqarg(m_selectedInvestment.name()), i18n("Delete investment"), KStdGuiItem::yes(), KStdGuiItem::no(), "DeleteInvestment") == KMessageBox::Yes) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFileTransaction ft; try { file->removeAccount(m_selectedInvestment); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::information(this, i18n("Unable to delete investment: %1").arg(e->what())); + KMessageBox::information(this, i18n("Unable to delete investment: %1").tqarg(e->what())); delete e; } } else { @@ -2584,8 +2584,8 @@ void KMyMoney2App::slotInvestmentDelete(void) // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); - kconfig->deleteEntry(QString::fromLatin1("DeleteInvestment")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); + kconfig->deleteEntry(TQString::tqfromLatin1("DeleteInvestment")); } } } @@ -2594,7 +2594,7 @@ void KMyMoney2App::slotOnlinePriceUpdate(void) { if(!m_selectedInvestment.id().isEmpty()) { KEquityPriceUpdateDlg dlg(0, m_selectedInvestment.currencyId()); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } } @@ -2641,7 +2641,7 @@ void KMyMoney2App::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n // to the account pool. Note: the schedule code used to leave // this always the first split, but the loan code leaves it as // the second one. So I thought, searching is a good alternative .... - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId().isEmpty()) { MyMoneySplit s = (*it_s); @@ -2678,11 +2678,11 @@ void KMyMoney2App::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n } } -bool KMyMoney2App::exchangeAccountInTransaction(MyMoneyTransaction& _t, const QString& fromId, const QString& toId) +bool KMyMoney2App::exchangeAccountInTransaction(MyMoneyTransaction& _t, const TQString& fromId, const TQString& toId) { bool rc = false; MyMoneyTransaction t(_t); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId() == fromId) { (*it_s).setAccountId(toId); @@ -2740,7 +2740,7 @@ void KMyMoney2App::slotAccountDelete(void) needAskUser = false; KCategoryReassignDlg* dlg = new KCategoryReassignDlg(this); - QString categoryId = dlg->show(m_selectedAccount); + TQString categoryId = dlg->show(m_selectedAccount); delete dlg; // and kill the dialog if (categoryId.isEmpty()) return; // the user aborted the dialog, so let's abort as well @@ -2757,8 +2757,8 @@ void KMyMoney2App::slotAccountDelete(void) // get the list of all transactions that reference the old account MyMoneyTransactionFilter filter(m_selectedAccount.id()); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> tlist; - QValueList<MyMoneyTransaction>::iterator it_t; + TQValueList<MyMoneyTransaction> tlist; + TQValueList<MyMoneyTransaction>::iterator it_t; file->transactionList(tlist, filter); slotStatusProgressBar(0, tlist.count()); @@ -2774,8 +2774,8 @@ void KMyMoney2App::slotAccountDelete(void) // now fix all schedules { KMSTATUS(i18n("Adjusting scheduled transactions...")); - QValueList<MyMoneySchedule> slist = file->scheduleList(m_selectedAccount.id()); - QValueList<MyMoneySchedule>::iterator it_s; + TQValueList<MyMoneySchedule> slist = file->scheduleList(m_selectedAccount.id()); + TQValueList<MyMoneySchedule>::iterator it_s; int cnt = 0; slotStatusProgressBar(0, slist.count()); @@ -2792,8 +2792,8 @@ void KMyMoney2App::slotAccountDelete(void) // now fix all budgets { KMSTATUS(i18n("Adjusting budgets...")); - QValueList<MyMoneyBudget> blist = file->budgetList(); - QValueList<MyMoneyBudget>::const_iterator it_b; + TQValueList<MyMoneyBudget> blist = file->budgetList(); + TQValueList<MyMoneyBudget>::const_iterator it_b; for(it_b = blist.begin(); it_b != blist.end(); ++it_b) { if((*it_b).hasReferenceTo(m_selectedAccount.id())) { MyMoneyBudget b = (*it_b); @@ -2809,7 +2809,7 @@ void KMyMoney2App::slotAccountDelete(void) slotStatusProgressBar(blist.count(), 0); } } catch(MyMoneyException *e) { - KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").arg(m_selectedAccount.name()).arg(newCategory.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to exchange category <b>%1</b> with category <b>%2</b>. Reason: %3").tqarg(m_selectedAccount.name()).tqarg(newCategory.name()).tqarg(e->what())); delete e; exit = true; } @@ -2830,14 +2830,14 @@ void KMyMoney2App::slotAccountDelete(void) // case A - only a single, unused category without subcats selected if (m_selectedAccount.accountList().isEmpty()) { - if (!needAskUser || (KMessageBox::questionYesNo(this, QString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").arg(m_selectedAccount.name())+QString("</qt>")) == KMessageBox::Yes)) { + if (!needAskUser || (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to delete category <b>%1</b>?").tqarg(m_selectedAccount.name())+TQString("</qt>")) == KMessageBox::Yes)) { try { file->removeAccount(m_selectedAccount); m_selectedAccount.clearId(); slotUpdateActions(); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error( this, QString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())+QString("</qt>")); + KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete category <b>%1</b>. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>")); delete e; } } @@ -2845,14 +2845,14 @@ void KMyMoney2App::slotAccountDelete(void) } // case B - we have some subcategories, maybe the user does not want to // delete them all, but just the category itself? - MyMoneyAccount parentAccount = file->account(m_selectedAccount.parentAccountId()); + MyMoneyAccount tqparentAccount = file->account(m_selectedAccount.tqparentAccountId()); - QStringList accountsToReparent; - int result = KMessageBox::questionYesNoCancel(this, QString("<qt>")+ + TQStringList accountsToRetqparent; + int result = KMessageBox::questionYesNoCancel(this, TQString("<qt>")+ i18n("Do you want to delete category <b>%1</b> with all its sub-categories or only " "the category itself? If you only delete the category itself, all its sub-categories " - "will be made sub-categories of <b>%2</b>.").arg(m_selectedAccount.name()).arg(parentAccount.name())+QString("</qt>"), - QString::null, + "will be made sub-categories of <b>%2</b>.").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.name())+TQString("</qt>"), + TQString(), KGuiItem(i18n("Delete all")), KGuiItem(i18n("Just the category"))); if (result == KMessageBox::Cancel) @@ -2861,40 +2861,40 @@ void KMyMoney2App::slotAccountDelete(void) bool need_confirmation = false; // case C - User only wants to delete the category itself if (result == KMessageBox::No) - accountsToReparent = m_selectedAccount.accountList(); + accountsToRetqparent = m_selectedAccount.accountList(); else { // case D - User wants to delete all subcategories, now check all subcats of // m_selectedAccount and remember all that cannot be deleted and // must be "reparented" - for (QStringList::const_iterator it = m_selectedAccount.accountList().begin(); + for (TQStringList::const_iterator it = m_selectedAccount.accountList().begin(); it != m_selectedAccount.accountList().end(); ++it) { // reparent account if a transaction is assigned if (file->transactionCount(*it)!=0) - accountsToReparent.push_back(*it); + accountsToRetqparent.push_back(*it); else if (!file->account(*it).accountList().isEmpty()) { // or if we have at least one sub-account that is used for transactions if (!file->hasOnlyUnusedAccounts(file->account(*it).accountList())) { - accountsToReparent.push_back(*it); + accountsToRetqparent.push_back(*it); //kdDebug() << "subaccount not empty" << endl; } } } - if (!accountsToReparent.isEmpty()) + if (!accountsToRetqparent.isEmpty()) need_confirmation = true; } - if (!accountsToReparent.isEmpty() && need_confirmation) { - if (KMessageBox::questionYesNo(this, QString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot " - "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").arg(m_selectedAccount.name()).arg(parentAccount.name())) != KMessageBox::Yes) { + if (!accountsToRetqparent.isEmpty() && need_confirmation) { + if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot " + "be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").tqarg(m_selectedAccount.name()).tqarg(tqparentAccount.name())) != KMessageBox::Yes) { return; // user gets wet feet... } } // all good, now first reparent selected sub-categories try { - MyMoneyAccount parent = file->account(m_selectedAccount.parentAccountId()); - for (QStringList::const_iterator it = accountsToReparent.begin(); it != accountsToReparent.end(); ++it) { + MyMoneyAccount tqparent = file->account(m_selectedAccount.tqparentAccountId()); + for (TQStringList::const_iterator it = accountsToRetqparent.begin(); it != accountsToRetqparent.end(); ++it) { MyMoneyAccount child = file->account(*it); - file->reparentAccount(child, parent); + file->reparentAccount(child, tqparent); } // reload the account because the sub-account list might have changed m_selectedAccount = file->account(m_selectedAccount.id()); @@ -2904,7 +2904,7 @@ void KMyMoney2App::slotAccountDelete(void) // the old account list, which is no longer valid m_selectedAccount = file->account(m_selectedAccount.id()); } catch(MyMoneyException* e) { - KMessageBox::error( this, QString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").arg(m_selectedAccount.name()).arg(e->what())+QString("</qt>")); + KMessageBox::error( this, TQString("<qt>")+i18n("Unable to delete a sub-category of category <b>%1</b>. Reason: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())+TQString("</qt>")); delete e; return; } @@ -2915,8 +2915,8 @@ void KMyMoney2App::slotAccountDelete(void) if (!m_selectedAccount.accountList().isEmpty()) return; // can't delete accounts which still have subaccounts - if (KMessageBox::questionYesNo(this, QString("<p>")+i18n("Do you really want to " - "delete account <b>%1</b>?").arg(m_selectedAccount.name())) != KMessageBox::Yes) { + if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Do you really want to " + "delete account <b>%1</b>?").tqarg(m_selectedAccount.name())) != KMessageBox::Yes) { return; // ok, you don't want to? why did you click then, hmm? } } // switch; @@ -2927,7 +2927,7 @@ void KMyMoney2App::slotAccountDelete(void) slotUpdateActions(); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to delete account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())); delete e; } } @@ -2939,20 +2939,20 @@ void KMyMoney2App::slotAccountEdit(void) if(!file->isStandardAccount(m_selectedAccount.id())) { if(m_selectedAccount.accountType() != MyMoneyAccount::Loan && m_selectedAccount.accountType() != MyMoneyAccount::AssetLoan) { - QString caption; + TQString caption; bool category = false; switch(MyMoneyAccount::accountGroup(m_selectedAccount.accountType())) { default: - caption = i18n("Edit account '%1'").arg(m_selectedAccount.name()); + caption = i18n("Edit account '%1'").tqarg(m_selectedAccount.name()); break; case MyMoneyAccount::Expense: case MyMoneyAccount::Income: - caption = i18n("Edit category '%1'").arg(m_selectedAccount.name()); + caption = i18n("Edit category '%1'").tqarg(m_selectedAccount.name()); category = true; break; } - QString tid = file->openingBalanceTransaction(m_selectedAccount); + TQString tid = file->openingBalanceTransaction(m_selectedAccount); MyMoneyTransaction t; MyMoneySplit s0, s1; KNewAccountDlg dlg(m_selectedAccount, true, category, 0, 0, caption); @@ -2971,34 +2971,34 @@ void KMyMoney2App::slotAccountEdit(void) } } catch(MyMoneyException *e) { kdDebug(2) << "Error retrieving opening balance transaction " << tid << ": " << e->what() << "\n"; - tid = QString(); + tid = TQString(); delete e; } } } // check for online modules - QMap<QString, KMyMoneyPlugin::OnlinePlugin *>::const_iterator it_plugin = m_onlinePlugins.end(); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin *>::const_iterator it_plugin = m_onlinePlugins.end(); const MyMoneyKeyValueContainer& kvp = m_selectedAccount.onlineBankingSettings(); if(!kvp["provider"].isEmpty()) { // if we have an online provider for this account, we need to check // that we have the corresponding plugin. If that exists, we ask it // to provide an additional tab for the account editor. - it_plugin = m_onlinePlugins.find(kvp["provider"]); + it_plugin = m_onlinePlugins.tqfind(kvp["provider"]); if(it_plugin != m_onlinePlugins.end()) { - QString name; - QWidget *w = 0; + TQString name; + TQWidget *w = 0; w = (*it_plugin)->accountConfigTab(m_selectedAccount, name); dlg.addTab(w, name); } } - if (dlg.exec() == QDialog::Accepted) { + if (dlg.exec() == TQDialog::Accepted) { try { MyMoneyFileTransaction ft; MyMoneyAccount account = dlg.account(); - MyMoneyAccount parent = dlg.parentAccount(); + MyMoneyAccount tqparent = dlg.tqparentAccount(); if(it_plugin != m_onlinePlugins.end()) { account.setOnlineBankingSettings((*it_plugin)->onlineBankingSettings(account.onlineBankingSettings())); } @@ -3009,8 +3009,8 @@ void KMyMoney2App::slotAccountEdit(void) // we need to modify first, as reparent would override all other changes file->modifyAccount(account); - if(account.parentAccountId() != parent.id()) { - file->reparentAccount(account, parent); + if(account.tqparentAccountId() != tqparent.id()) { + file->reparentAccount(account, tqparent); } if(!tid.isEmpty() && dlg.openingBalance().isZero()) { file->removeTransaction(t); @@ -3034,15 +3034,15 @@ void KMyMoney2App::slotAccountEdit(void) slotSelectAccount(file->account(account.id())); } catch(MyMoneyException* e) { - KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").arg(m_selectedAccount.name()).arg(e->what())); + KMessageBox::error( this, i18n("Unable to modify account '%1'. Cause: %2").tqarg(m_selectedAccount.name()).tqarg(e->what())); delete e; } } } else { KEditLoanWizard* wizard = new KEditLoanWizard(m_selectedAccount); - connect(wizard, SIGNAL(newCategory(MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&))); - connect(wizard, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - if(wizard->exec() == QDialog::Accepted) { + connect(wizard, TQT_SIGNAL(newCategory(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&))); + connect(wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + if(wizard->exec() == TQDialog::Accepted) { MyMoneySchedule sch = file->schedule(m_selectedAccount.value("schedule").latin1()); if(!(m_selectedAccount == wizard->account()) || !(sch == wizard->schedule())) { @@ -3089,21 +3089,21 @@ void KMyMoney2App::slotAccountReconcileStart(void) try { #if 0 // check if we have overdue schedules for this account - QValueList<MyMoneySchedule> schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, QDate(), QDate(), true); + TQValueList<MyMoneySchedule> schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, TQDate(), TQDate(), true); if(schedules.count() > 0) { if(KMessageBox::questionYesNo(this, i18n("KMyMoney has detected some overdue scheduled transactions for this account. Do you want to enter those scheduled transactions now?"), i18n("Scheduled transactions found")) == KMessageBox::Yes) { - QMap<QString, bool> skipMap; + TQMap<TQString, bool> skipMap; bool processedOne; KMyMoneyUtils::EnterScheduleResultCodeE rc = KMyMoneyUtils::Enter; do { processedOne = false; - QValueList<MyMoneySchedule>::const_iterator it_sch; + TQValueList<MyMoneySchedule>::const_iterator it_sch; for(it_sch = schedules.begin(); (rc != KMyMoneyUtils::Cancel) && (it_sch != schedules.end()); ++it_sch) { MyMoneySchedule sch(*(it_sch)); // and enter it if it is not on the skip list - if(skipMap.find((*it_sch).id()) == skipMap.end()) { + if(skipMap.tqfind((*it_sch).id()) == skipMap.end()) { rc = enterSchedule(sch, false, true); if(rc == KMyMoneyUtils::Ignore) { skipMap[(*it_sch).id()] = true; @@ -3112,7 +3112,7 @@ void KMyMoney2App::slotAccountReconcileStart(void) } // reload list (maybe this schedule needs to be added again) - schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, QDate(), QDate(), true); + schedules = file->scheduleList(m_selectedAccount.id(), MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, TQDate(), TQDate(), true); } while(processedOne); } } @@ -3124,10 +3124,10 @@ void KMyMoney2App::slotAccountReconcileStart(void) delete m_endingBalanceDlg; m_endingBalanceDlg = new KEndingBalanceDlg(account, this); if(account.isAssetLiability()) { - connect(m_endingBalanceDlg, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - connect(m_endingBalanceDlg, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_endingBalanceDlg, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(m_endingBalanceDlg, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); - if(m_endingBalanceDlg->exec() == QDialog::Accepted) { + if(m_endingBalanceDlg->exec() == TQDialog::Accepted) { if(myMoneyView->startReconciliation(account, m_endingBalanceDlg->statementDate(), m_endingBalanceDlg->endingBalance())) { // check if the user requests us to create interest @@ -3167,11 +3167,11 @@ void KMyMoney2App::slotAccountReconcileFinish(void) if(!m_reconciliationAccount.id().isEmpty()) { // retrieve list of all transactions that are not reconciled or cleared - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > transactionList; MyMoneyTransactionFilter filter(m_reconciliationAccount.id()); filter.addState(MyMoneyTransactionFilter::cleared); filter.addState(MyMoneyTransactionFilter::notReconciled); - filter.setDateFilter(QDate(), m_endingBalanceDlg->statementDate()); + filter.setDateFilter(TQDate(), m_endingBalanceDlg->statementDate()); filter.setConsiderCategory(false); filter.setReportAllSplits(true); file->transactionList(transactionList, filter); @@ -3181,7 +3181,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) actBalance = clearedBalance = balance; // walk the list of transactions to figure out the balance(s) - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; for(it = transactionList.begin(); it != transactionList.end(); ++it) { if((*it).second.reconcileFlag() == MyMoneySplit::NotReconciled) { clearedBalance -= (*it).second.shares(); @@ -3189,7 +3189,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) } if(m_endingBalanceDlg->endingBalance() != clearedBalance) { - QString message = i18n("You are about to finish the reconciliation of this account with a difference between your bank statement and the transactions marked as cleared.\n" + TQString message = i18n("You are about to finish the reconciliation of this account with a difference between your bank statement and the transactions marked as cleared.\n" "Are you sure you want to finish the reconciliation ?"); if (KMessageBox::questionYesNo(this, message, i18n("Confirm end of reconciliation"), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::No) return; @@ -3225,7 +3225,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) */ // walk the list of transactions/splits and mark the cleared ones as reconciled - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::iterator it; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::iterator it; for(it = transactionList.begin(); it != transactionList.end(); ++it) { MyMoneySplit sp = (*it).second; @@ -3244,7 +3244,7 @@ void KMyMoney2App::slotAccountReconcileFinish(void) file->modifyTransaction(t); // ... and the list - (*it) = qMakePair(t, sp); + (*it) = tqMakePair(t, sp); } ft.commit(); @@ -3302,7 +3302,7 @@ void KMyMoney2App::slotAccountOpen(const MyMoneyObject& obj) return; MyMoneyFile* file = MyMoneyFile::instance(); - QString id = m_selectedAccount.id(); + TQString id = m_selectedAccount.id(); // if the caller passed a non-empty object, we need to select that if(!obj.id().isEmpty()) { @@ -3328,8 +3328,8 @@ bool KMyMoney2App::canCloseAccount(const MyMoneyAccount& acc) const if(!acc.balance().isZero()) return false; - // all children must be already closed - QStringList::const_iterator it_a; + // all tqchildren must be already closed + TQStringList::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount a = MyMoneyFile::instance()->account(*it_a); if(!a.isClosed()) { @@ -3338,8 +3338,8 @@ bool KMyMoney2App::canCloseAccount(const MyMoneyAccount& acc) const } // there must be no unfinished schedule referencing the account - QValueList<MyMoneySchedule> list = MyMoneyFile::instance()->scheduleList(); - QValueList<MyMoneySchedule>::const_iterator it_l; + TQValueList<MyMoneySchedule> list = MyMoneyFile::instance()->scheduleList(); + TQValueList<MyMoneySchedule>::const_iterator it_l; for(it_l = list.begin(); it_l != list.end(); ++it_l) { if((*it_l).isFinished()) continue; @@ -3365,7 +3365,7 @@ void KMyMoney2App::slotAccountClose(void) MyMoneyFile::instance()->modifyAccount(a); ft.commit(); if(KMyMoneyGlobalSettings::hideClosedAccounts()) { - KMessageBox::information(this, QString("<qt>")+i18n("You have closed this account. It remains in the system because you have transactions which still refer to it, but is not shown in the views. You can make it visible again by going to the View menu and selecting <b>Show all accounts</b> or by unselecting the <b>Don't show closed accounts</b> setting.")+QString("</qt>"), i18n("Information"), "CloseAccountInfo"); + KMessageBox::information(this, TQString("<qt>")+i18n("You have closed this account. It remains in the system because you have transactions which still refer to it, but is not shown in the views. You can make it visible again by going to the View menu and selecting <b>Show all accounts</b> or by unselecting the <b>Don't show closed accounts</b> setting.")+TQString("</qt>"), i18n("Information"), "CloseAccountInfo"); } } catch(MyMoneyException* e) { delete e; @@ -3388,7 +3388,7 @@ void KMyMoney2App::slotAccountReopen(void) while(a.isClosed()) { a.setClosed(false); file->modifyAccount(a); - a = file->account(a.parentAccountId()); + a = file->account(a.tqparentAccountId()); } ft.commit(); } catch(MyMoneyException* e) { @@ -3396,7 +3396,7 @@ void KMyMoney2App::slotAccountReopen(void) } } -void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst) +void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyInstitution& _dst) { MyMoneyAccount src(_src); src.setInstitutionId(_dst.id()); @@ -3405,12 +3405,12 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney MyMoneyFile::instance()->modifyAccount(src); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").arg(src.name()).arg(_dst.name()).arg(e->what())); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to institution <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(_dst.name()).tqarg(e->what())); delete e; } } -void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst) +void KMyMoney2App::slotRetqparentAccount(const MyMoneyAccount& _src, const MyMoneyAccount& _dst) { MyMoneyAccount src(_src); MyMoneyAccount dst(_dst); @@ -3419,7 +3419,7 @@ void KMyMoney2App::slotReparentAccount(const MyMoneyAccount& _src, const MyMoney MyMoneyFile::instance()->reparentAccount(src, dst); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, QString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").arg(src.name()).arg(dst.name()).arg(e->what())); + KMessageBox::sorry(this, TQString("<p>")+i18n("<b>%1</b> cannot be moved to <b>%2</b>. Reason: %3").tqarg(src.name()).tqarg(dst.name()).tqarg(e->what())); delete e; } } @@ -3431,10 +3431,10 @@ void KMyMoney2App::slotAccountTransactionReport(void) if(!m_selectedAccount.id().isEmpty()) { MyMoneyReport report( MyMoneyReport::eAccount, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, - i18n("%1 YTD Account Transactions").arg(m_selectedAccount.name()), + i18n("%1 YTD Account Transactions").tqarg(m_selectedAccount.name()), i18n("Generated Report") ); report.setGroup(i18n("Transactions")); @@ -3467,7 +3467,7 @@ void KMyMoney2App::slotScheduleNew(const MyMoneyTransaction& _t, MyMoneySchedule KEditScheduleDlg dlg(schedule, this); TransactionEditor* transactionEditor = dlg.startEdit(); if(transactionEditor) { - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { schedule = dlg.schedule(); @@ -3475,7 +3475,7 @@ void KMyMoney2App::slotScheduleNew(const MyMoneyTransaction& _t, MyMoneySchedule ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").arg(e->what()), i18n("Add scheduled transaction")); + KMessageBox::error(this, i18n("Unable to add scheduled transaction: %1").tqarg(e->what()), i18n("Add scheduled transaction")); delete e; } } @@ -3500,7 +3500,7 @@ void KMyMoney2App::slotScheduleEdit(void) sched_dlg = new KEditScheduleDlg(schedule, this); m_transactionEditor = sched_dlg->startEdit(); if(m_transactionEditor) { - if(sched_dlg->exec() == QDialog::Accepted) { + if(sched_dlg->exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { MyMoneySchedule sched = sched_dlg->schedule(); @@ -3508,15 +3508,15 @@ void KMyMoney2App::slotScheduleEdit(void) // is at or before the lastPaymentDate // If it is, ask the user whether to clear the // lastPaymentDate - const QDate& next = sched.nextDueDate(); - const QDate& last = sched.lastPayment(); + const TQDate& next = sched.nextDueDate(); + const TQDate& last = sched.lastPayment(); if ( next.isValid() && last.isValid() && next <= last ) { // Entered a date effectively no later // than previous payment. Date would be // updated automatically so we probably // want to clear it. Let's ask the user. - if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").arg(KGlobal::locale()->formatDate(next, true)).arg(KGlobal::locale()->formatDate(last, true))+QString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) { - sched.setLastPayment( QDate() ); + if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered a scheduled transaction date of <b>%1</b>. Because the scheduled transaction was last paid on <b>%2</b>, KMyMoney will automatically adjust the scheduled transaction date to the next date unless the last payment date is reset. Do you want to reset the last payment date?").tqarg(KGlobal::locale()->formatDate(next, true)).tqarg(KGlobal::locale()->formatDate(last, true))+TQString("</qt>"),i18n("Reset Last Payment Date" ), KStdGuiItem::yes(), KStdGuiItem::no()) == KMessageBox::Yes) { + sched.setLastPayment( TQDate() ); } } MyMoneyFile::instance()->modifySchedule(sched); @@ -3525,7 +3525,7 @@ void KMyMoney2App::slotScheduleEdit(void) deleteTransactionEditor(); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3536,16 +3536,16 @@ void KMyMoney2App::slotScheduleEdit(void) case MyMoneySchedule::TYPE_LOANPAYMENT: loan_wiz = new KEditLoanWizard(schedule.account(2)); - connect(loan_wiz, SIGNAL(newCategory(MyMoneyAccount&)), this, SLOT(slotCategoryNew(MyMoneyAccount&))); - connect(loan_wiz, SIGNAL(createPayee(const QString&, QString&)), this, SLOT(slotPayeeNew(const QString&, QString&))); - if (loan_wiz->exec() == QDialog::Accepted) { + connect(loan_wiz, TQT_SIGNAL(newCategory(MyMoneyAccount&)), TQT_TQOBJECT(this), TQT_SLOT(slotCategoryNew(MyMoneyAccount&))); + connect(loan_wiz, TQT_SIGNAL(createPayee(const TQString&, TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + if (loan_wiz->exec() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { MyMoneyFile::instance()->modifySchedule(loan_wiz->schedule()); MyMoneyFile::instance()->modifyAccount(loan_wiz->account()); ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3557,7 +3557,7 @@ void KMyMoney2App::slotScheduleEdit(void) } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to modify scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3569,9 +3569,9 @@ void KMyMoney2App::slotScheduleDelete(void) MyMoneyFileTransaction ft; try { MyMoneySchedule sched = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); - QString msg = QString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").arg(m_selectedSchedule.name()); + TQString msg = TQString("<p>")+i18n("Are you sure you want to delete the scheduled transaction <b>%1</b>?").tqarg(m_selectedSchedule.name()); if(sched.type() == MyMoneySchedule::TYPE_LOANPAYMENT) { - msg += QString(" "); + msg += TQString(" "); msg += i18n("In case of loan payments it is currently not possible to recreate the scheduled transaction."); } if (KMessageBox::questionYesNo(this, msg) == KMessageBox::No) @@ -3581,7 +3581,7 @@ void KMyMoney2App::slotScheduleDelete(void) ft.commit(); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to remove scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3594,8 +3594,8 @@ void KMyMoney2App::slotScheduleDuplicate(void) if(kmymoney2->action("schedule_duplicate")->isEnabled()) { MyMoneySchedule sch = m_selectedSchedule; sch.clearId(); - sch.setLastPayment(QDate()); - sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").arg(sch.name())); + sch.setLastPayment(TQDate()); + sch.setName(i18n("Copy of scheduled transaction name", "Copy of %1").tqarg(sch.name())); MyMoneyFileTransaction ft; try { @@ -3607,7 +3607,7 @@ void KMyMoney2App::slotScheduleDuplicate(void) myMoneyView->slotScheduleSelected(sch.id()); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -3620,8 +3620,8 @@ void KMyMoney2App::slotScheduleSkip(void) MyMoneySchedule schedule = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); if(!schedule.isFinished()) { if(schedule.occurence() != MyMoneySchedule::OCCUR_ONCE) { - QDate next = schedule.nextDueDate(); - if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, QString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").arg(schedule.name(), KGlobal::locale()->formatDate(next, true))+QString("</qt>"))) == KMessageBox::Yes) { + TQDate next = schedule.nextDueDate(); + if(!schedule.isFinished() && (KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("Do you really want to skip the <b>%1</b> transaction scheduled for <b>%2</b>?").tqarg(schedule.name(), KGlobal::locale()->formatDate(next, true))+TQString("</qt>"))) == KMessageBox::Yes) { MyMoneyFileTransaction ft; schedule.setLastPayment(next); schedule.setNextDueDate(schedule.nextPayment(next)); @@ -3631,7 +3631,7 @@ void KMyMoney2App::slotScheduleSkip(void) } } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, QString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").arg(m_selectedSchedule.name())+QString("</qt>"), e->what()); + KMessageBox::detailedSorry(this, TQString("<qt>")+i18n("Unable to skip scheduled transaction <b>%1</b>.").tqarg(m_selectedSchedule.name())+TQString("</qt>"), e->what()); delete e; } } @@ -3644,7 +3644,7 @@ void KMyMoney2App::slotScheduleEnter(void) MyMoneySchedule schedule = MyMoneyFile::instance()->schedule(m_selectedSchedule.id()); enterSchedule(schedule); } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unknown scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } @@ -3656,7 +3656,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if (!schedule.id().isEmpty()) { try { schedule = MyMoneyFile::instance()->schedule(schedule.id()); - QDate origDueDate = schedule.nextDueDate(); + TQDate origDueDate = schedule.nextDueDate(); KEnterScheduleDlg dlg(this, schedule); dlg.showExtendedKeys(extendedKeys); @@ -3674,7 +3674,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if(!autoEnter || !schedule.isFixed()) { for(;;) { rc = KMyMoneyUtils::Cancel; - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { rc = dlg.resultCode(); if(rc == KMyMoneyUtils::Enter) { m_transactionEditor->createTransaction(taccepted, torig, torig.splits()[0], true); @@ -3683,7 +3683,7 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched if(torig != taccepted) { KConfirmManualEnterDlg cdlg(schedule, this); cdlg.loadTransactions(torig, taccepted); - if(cdlg.exec() == QDialog::Accepted) { + if(cdlg.exec() == TQDialog::Accepted) { action = cdlg.action(); break; } @@ -3734,8 +3734,8 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched break; } - QString newId; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString newId; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); if(m_transactionEditor->enterTransactions(newId, false)) { if(!newId.isEmpty()) { MyMoneyTransaction t = MyMoneyFile::instance()->transaction(newId); @@ -3751,35 +3751,35 @@ KMyMoneyUtils::EnterScheduleResultCodeE KMyMoney2App::enterSchedule(MyMoneySched ft.commit(); } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } deleteTransactionEditor(); } } } catch (MyMoneyException *e) { - KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").arg(m_selectedSchedule.name()), e->what()); + KMessageBox::detailedSorry(this, i18n("Unable to enter scheduled transaction '%1'").tqarg(m_selectedSchedule.name()), e->what()); delete e; } } return rc; } -void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) +void KMyMoney2App::slotPayeeNew(const TQString& newnameBase, TQString& id) { bool doit = true; if(newnameBase != i18n("New Payee")) { // Ask the user if that is what he intended to do? - QString msg = QString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").arg(newnameBase) + QString("</qt>"); - const QString dontAskAgain = QString::fromLatin1("NewPayee"); + TQString msg = TQString("<qt>") + i18n("Do you want to add <b>%1</b> as payer/receiver ?").tqarg(newnameBase) + TQString("</qt>"); + const TQString dontAskAgain = TQString::tqfromLatin1("NewPayee"); if(KMessageBox::questionYesNo(this, msg, i18n("New payee/receiver"), KStdGuiItem::yes(), KStdGuiItem::no(), dontAskAgain) == KMessageBox::No) { doit = false; // we should not keep the 'no' setting because that can confuse people like // I have seen in some usability tests. So we just delete it right away. KConfig *kconfig = KGlobal::config(); if(kconfig) { - kconfig->setGroup(QString::fromLatin1("Notification Messages")); + kconfig->setGroup(TQString::tqfromLatin1("Notification Messages")); kconfig->deleteEntry(dontAskAgain); } } @@ -3788,13 +3788,13 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) if(doit) { MyMoneyFileTransaction ft; try { - QString newname(newnameBase); + TQString newname(newnameBase); // adjust name until a unique name has been created int count = 0; for(;;) { try { MyMoneyFile::instance()->payeeByName(newname); - newname = QString("%1 [%2]").arg(newnameBase).arg(++count); + newname = TQString("%1 [%2]").tqarg(newnameBase).tqarg(++count); } catch(MyMoneyException* e) { delete e; break; @@ -3808,7 +3808,7 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) ft.commit(); } catch (MyMoneyException *e) { KMessageBox::detailedSorry(this, i18n("Unable to add payee"), - QString("%1 thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + TQString("%1 thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -3816,7 +3816,7 @@ void KMyMoney2App::slotPayeeNew(const QString& newnameBase, QString& id) void KMyMoney2App::slotPayeeNew(void) { - QString id; + TQString id; slotPayeeNew(i18n("New Payee"), id); // the callbacks should have made sure, that the payees view has been @@ -3825,10 +3825,10 @@ void KMyMoney2App::slotPayeeNew(void) emit payeeCreated(id); } -bool KMyMoney2App::payeeInList(const QValueList<MyMoneyPayee>& list, const QString& id) const +bool KMyMoney2App::payeeInList(const TQValueList<MyMoneyPayee>& list, const TQString& id) const { bool rc = false; - QValueList<MyMoneyPayee>::const_iterator it_p = list.begin(); + TQValueList<MyMoneyPayee>::const_iterator it_p = list.begin(); while(it_p != list.end()) { if((*it_p).id() == id) { rc = true; @@ -3847,10 +3847,10 @@ void KMyMoney2App::slotPayeeDelete(void) MyMoneyFile * file = MyMoneyFile::instance(); // first create list with all non-selected payees - QValueList<MyMoneyPayee> remainingPayees = file->payeeList(); - QValueList<MyMoneyPayee>::iterator it_p; + TQValueList<MyMoneyPayee> remainingPayees = file->payeeList(); + TQValueList<MyMoneyPayee>::iterator it_p; for(it_p = remainingPayees.begin(); it_p != remainingPayees.end(); ) { - if(m_selectedPayees.find(*it_p) != m_selectedPayees.end()) { + if(m_selectedPayees.tqfind(*it_p) != m_selectedPayees.end()) { it_p = remainingPayees.erase(it_p); } else { ++it_p; @@ -3858,9 +3858,9 @@ void KMyMoney2App::slotPayeeDelete(void) } // get confirmation from user - QString prompt; + TQString prompt; if (m_selectedPayees.size() == 1) - prompt = QString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").arg(m_selectedPayees.front().name()); + prompt = TQString("<p>")+i18n("Do you really want to remove the payee <b>%1</b>?").tqarg(m_selectedPayees.front().name()); else prompt = i18n("Do you really want to remove all selected payees?"); @@ -3871,22 +3871,22 @@ void KMyMoney2App::slotPayeeDelete(void) try { // create a transaction filter that contains all payees selected for removal MyMoneyTransactionFilter f = MyMoneyTransactionFilter(); - for (QValueList<MyMoneyPayee>::const_iterator it = m_selectedPayees.begin(); + for (TQValueList<MyMoneyPayee>::const_iterator it = m_selectedPayees.begin(); it != m_selectedPayees.end(); ++it) { f.addPayee( (*it).id() ); } // request a list of all transactions that still use the payees in question - QValueList<MyMoneyTransaction> translist = file->transactionList(f); + TQValueList<MyMoneyTransaction> translist = file->transactionList(f); // kdDebug() << "[KPayeesView::slotDeletePayee] " << translist.count() << " transaction still assigned to payees" << endl; // now get a list of all schedules that make use of one of the payees - QValueList<MyMoneySchedule> all_schedules = file->scheduleList(); - QValueList<MyMoneySchedule> used_schedules; - for (QValueList<MyMoneySchedule>::ConstIterator it = all_schedules.begin(); + TQValueList<MyMoneySchedule> all_schedules = file->scheduleList(); + TQValueList<MyMoneySchedule> used_schedules; + for (TQValueList<MyMoneySchedule>::ConstIterator it = all_schedules.begin(); it != all_schedules.end(); ++it) { // loop over all splits in the transaction of the schedule - for (QValueList<MyMoneySplit>::ConstIterator s_it = (*it).transaction().splits().begin(); + for (TQValueList<MyMoneySplit>::ConstIterator s_it = (*it).transaction().splits().begin(); s_it != (*it).transaction().splits().end(); ++s_it) { // is the payee in the split to be deleted? @@ -3912,7 +3912,7 @@ void KMyMoney2App::slotPayeeDelete(void) // show transaction reassignment dialog KPayeeReassignDlg * dlg = new KPayeeReassignDlg(this); - QString payee_id = dlg->show(remainingPayees); + TQString payee_id = dlg->show(remainingPayees); addToMatchList = dlg->addToMatchList(); delete dlg; // and kill the dialog if (payee_id.isEmpty()) @@ -3923,11 +3923,11 @@ void KMyMoney2App::slotPayeeDelete(void) // TODO : check if we have a report that explicitely uses one of our payees // and issue an appropriate warning try { - QValueList<MyMoneySplit>::iterator s_it; + TQValueList<MyMoneySplit>::iterator s_it; // now loop over all transactions and reassign payee - for (QValueList<MyMoneyTransaction>::iterator it = translist.begin(); it != translist.end(); ++it) { + for (TQValueList<MyMoneyTransaction>::iterator it = translist.begin(); it != translist.end(); ++it) { // create a copy of the splits list in the transaction - QValueList<MyMoneySplit> splits = (*it).splits(); + TQValueList<MyMoneySplit> splits = (*it).splits(); // loop over all splits for (s_it = splits.begin(); s_it != splits.end(); ++s_it) { // if the split is assigned to one of the selected payees, we need to modify it @@ -3941,13 +3941,13 @@ void KMyMoney2App::slotPayeeDelete(void) } // for - Transactions // now loop over all schedules and reassign payees - for (QValueList<MyMoneySchedule>::iterator it = used_schedules.begin(); + for (TQValueList<MyMoneySchedule>::iterator it = used_schedules.begin(); it != used_schedules.end(); ++it) { // create copy of transaction in current schedule MyMoneyTransaction trans = (*it).transaction(); // create copy of lists of splits - QValueList<MyMoneySplit> splits = trans.splits(); + TQValueList<MyMoneySplit> splits = trans.splits(); for (s_it = splits.begin(); s_it != splits.end(); ++s_it) { if(payeeInList(m_selectedPayees, (*s_it).payeeId())) { (*s_it).setPayeeId(payee_id); @@ -3960,18 +3960,18 @@ void KMyMoney2App::slotPayeeDelete(void) } // for - Schedules } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to reassign payee of transaction/split"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } // if !translist.isEmpty() bool ignorecase; - QStringList payeeNames; + TQStringList payeeNames; MyMoneyPayee::payeeMatchType matchType = newPayee.matchData(ignorecase, payeeNames); - QStringList deletedPayeeNames; + TQStringList deletedPayeeNames; // now loop over all selected payees and remove them - for (QValueList<MyMoneyPayee>::iterator it = m_selectedPayees.begin(); + for (TQValueList<MyMoneyPayee>::iterator it = m_selectedPayees.begin(); it != m_selectedPayees.end(); ++it) { if(addToMatchList) { deletedPayeeNames << (*it).name(); @@ -3989,20 +3989,20 @@ void KMyMoney2App::slotPayeeDelete(void) // TODO: it would be cool to somehow shrink the list to make better use // of regular expressions at this point. For now, we leave this task // to the user himeself. - QStringList::const_iterator it_n; + TQStringList::const_iterator it_n; for(it_n = deletedPayeeNames.begin(); it_n != deletedPayeeNames.end(); ++it_n) { if(matchType == MyMoneyPayee::matchKey) { // make sure we really need it and it is not caught by an existing regexp - QStringList::const_iterator it_k; + TQStringList::const_iterator it_k; for(it_k = payeeNames.begin(); it_k != payeeNames.end(); ++it_k) { - QRegExp exp(*it_k, ignorecase); + TQRegExp exp(*it_k, ignorecase); if(exp.search(*it_n) != -1) break; } if(it_k == payeeNames.end()) - payeeNames << QRegExp::escape(*it_n); - } else if(payeeNames.contains(*it_n) == 0) - payeeNames << QRegExp::escape(*it_n); + payeeNames << TQRegExp::escape(*it_n); + } else if(payeeNames.tqcontains(*it_n) == 0) + payeeNames << TQRegExp::escape(*it_n); } // and update the payee in the engine context @@ -4013,34 +4013,34 @@ void KMyMoney2App::slotPayeeDelete(void) ft.commit(); // If we just deleted the payees, they sure don't exist anymore - slotSelectPayees(QValueList<MyMoneyPayee>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to remove payee(s)"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } void KMyMoney2App::slotCurrencyNew(void) { - QString sid = KInputDialog::getText(i18n("New currency"), i18n("Enter ISO 4217 code for the new currency"), QString::null, 0, 0, 0, 0, ">AAA"); + TQString sid = KInputDialog::getText(i18n("New currency"), i18n("Enter ISO 4217 code for the new currency"), TQString(), 0, 0, 0, 0, ">AAA"); if(!sid.isEmpty()) { - QString id(sid); + TQString id(sid); MyMoneySecurity currency(id, i18n("New currency")); MyMoneyFileTransaction ft; try { MyMoneyFile::instance()->addCurrency(currency); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot create new currency. %1").arg(e->what()), i18n("New currency")); + KMessageBox::sorry(this, i18n("Cannot create new currency. %1").tqarg(e->what()), i18n("New currency")); delete e; } emit currencyCreated(id); } } -void KMyMoney2App::slotCurrencyRename(QListViewItem* item, int, const QString& txt) +void KMyMoney2App::slotCurrencyRename(TQListViewItem* item, int, const TQString& txt) { MyMoneyFile* file = MyMoneyFile::instance(); KMyMoneyListViewItem* p = static_cast<KMyMoneyListViewItem *>(item); @@ -4055,12 +4055,12 @@ void KMyMoney2App::slotCurrencyRename(QListViewItem* item, int, const QString& t m_selectedCurrency = currency; ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency")); + KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency")); delete e; } } } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot rename currency. %1").arg(e->what()), i18n("Rename currency")); + KMessageBox::sorry(this, i18n("Cannot rename currency. %1").tqarg(e->what()), i18n("Rename currency")); delete e; } } @@ -4073,7 +4073,7 @@ void KMyMoney2App::slotCurrencyDelete(void) MyMoneyFile::instance()->removeCurrency(m_selectedCurrency); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Delete currency")); + KMessageBox::sorry(this, i18n("Cannot delete currency %1. %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Delete currency")); delete e; } } @@ -4088,7 +4088,7 @@ void KMyMoney2App::slotCurrencySetBase(void) MyMoneyFile::instance()->setBaseCurrency(m_selectedCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(m_selectedCurrency.name()).arg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(m_selectedCurrency.name()).tqarg(e->what()), i18n("Set base currency")); delete e; } } @@ -4097,9 +4097,9 @@ void KMyMoney2App::slotCurrencySetBase(void) void KMyMoney2App::slotBudgetNew(void) { - QDate date = QDate::currentDate(Qt::LocalTime); + TQDate date = TQDate::tqcurrentDate(Qt::LocalTime); date.setYMD(date.year(), 1, 1); - QString newname = i18n("Budget %1").arg(QString::number(date.year())); + TQString newname = i18n("Budget %1").tqarg(TQString::number(date.year())); MyMoneyBudget budget; @@ -4109,7 +4109,7 @@ void KMyMoney2App::slotBudgetNew(void) // Exception thrown when the name is not found while (1) { MyMoneyFile::instance()->budgetByName(newname); - newname = i18n("Budget %1 (%2)").arg(QString::number(date.year()), QString::number(i++)); + newname = i18n("Budget %1 (%2)").tqarg(TQString::number(date.year()), TQString::number(i++)); } } catch(MyMoneyException *e) { // all ok, the name is unique @@ -4124,7 +4124,7 @@ void KMyMoney2App::slotBudgetNew(void) MyMoneyFile::instance()->addBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4137,9 +4137,9 @@ void KMyMoney2App::slotBudgetDelete(void) MyMoneyFile * file = MyMoneyFile::instance(); // get confirmation from user - QString prompt; + TQString prompt; if (m_selectedBudgets.size() == 1) - prompt = QString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").arg(m_selectedBudgets.front().name()); + prompt = TQString("<p>")+i18n("Do you really want to remove the budget <b>%1</b>?").tqarg(m_selectedBudgets.front().name()); else prompt = i18n("Do you really want to remove all selected budgets?"); @@ -4149,14 +4149,14 @@ void KMyMoney2App::slotBudgetDelete(void) MyMoneyFileTransaction ft; try { // now loop over all selected budgets and remove them - for (QValueList<MyMoneyBudget>::iterator it = m_selectedBudgets.begin(); + for (TQValueList<MyMoneyBudget>::iterator it = m_selectedBudgets.begin(); it != m_selectedBudgets.end(); ++it) { file->removeBudget(*it); } ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to remove budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4168,12 +4168,12 @@ void KMyMoney2App::slotBudgetCopy(void) try { MyMoneyBudget budget = m_selectedBudgets[0]; budget.clearId(); - budget.setName(i18n("Copy of %1").arg(budget.name())); + budget.setName(i18n("Copy of %1").tqarg(budget.name())); MyMoneyFile::instance()->addBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to add budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4182,12 +4182,12 @@ void KMyMoney2App::slotBudgetCopy(void) void KMyMoney2App::slotBudgetChangeYear(void) { if(m_selectedBudgets.size() == 1) { - QStringList years; + TQStringList years; int current = 0; bool haveCurrent = false; MyMoneyBudget budget = *(m_selectedBudgets.begin()); - for(int i = (QDate::currentDate().year()-3); i < (QDate::currentDate().year()+5); ++i) { - years << QString("%1").arg(i); + for(int i = (TQDate::tqcurrentDate().year()-3); i < (TQDate::tqcurrentDate().year()+5); ++i) { + years << TQString("%1").tqarg(i); if(i == budget.budgetStart().year()) { haveCurrent = true; } @@ -4198,11 +4198,11 @@ void KMyMoney2App::slotBudgetChangeYear(void) current = 0; bool ok = false; - QString yearString = KInputDialog::getItem(i18n("Select year"), i18n("Budget year"), years, current, false, &ok, this); + TQString yearString = KInputDialog::getItem(i18n("Select year"), i18n("Budget year"), years, current, false, &ok, this); if(ok) { int year = yearString.toInt(0, 0); - QDate newYear = QDate(year, 1, 1); + TQDate newYear = TQDate(year, 1, 1); if(newYear != budget.budgetStart()) { MyMoneyFileTransaction ft; try { @@ -4210,7 +4210,7 @@ void KMyMoney2App::slotBudgetChangeYear(void) MyMoneyFile::instance()->modifyBudget(budget); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3"). tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4231,10 +4231,10 @@ void KMyMoney2App::slotBudgetForecast(void) } if(calcBudget) { - QDate historyStart; - QDate historyEnd; - QDate budgetStart; - QDate budgetEnd; + TQDate historyStart; + TQDate historyEnd; + TQDate budgetStart; + TQDate budgetEnd; budgetStart = budget.budgetStart(); budgetEnd = budgetStart.addYears(1).addDays(-1); @@ -4248,7 +4248,7 @@ void KMyMoney2App::slotBudgetForecast(void) ft.commit(); } } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4258,9 +4258,9 @@ void KMyMoney2App::slotKDELanguageSettings(void) { KMessageBox::information(this, i18n("Please be aware that changes made in the following dialog affect all KDE applications not only KMyMoney."), i18n("Warning"), "LanguageSettingsWarning"); - QStringList args; + TQStringList args; args << "language"; - QString error; + TQString error; int pid; KApplication::kdeinitExec("kcmshell", args, &error, &pid); @@ -4289,10 +4289,10 @@ void KMyMoney2App::slotNewFeature(void) } if(calcBudget) { - QDate historyStart; - QDate historyEnd; - QDate budgetStart; - QDate budgetEnd; + TQDate historyStart; + TQDate historyEnd; + TQDate budgetStart; + TQDate budgetEnd; budgetStart = budget.budgetStart(); budgetEnd = budgetStart.addYears(1).addDays(-1); @@ -4308,7 +4308,7 @@ void KMyMoney2App::slotNewFeature(void) ft.commit(); } } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify budget: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4333,11 +4333,11 @@ void KMyMoney2App::slotTransactionsDelete(void) "DeleteReconciledTransaction") == KMessageBox::Cancel) return; } - QString msg; + TQString msg; if(m_selectedTransactions.count() == 1) { msg = i18n("Do you really want to delete the selected transaction?"); } else { - msg = i18n("Do you really want to delete all %1 selected transactions?").arg(m_selectedTransactions.count()); + msg = i18n("Do you really want to delete all %1 selected transactions?").tqarg(m_selectedTransactions.count()); } if(KMessageBox::questionYesNo(this, msg, i18n("Delete transaction")) == KMessageBox::Yes) { KMSTATUS(i18n("Deleting transactions")); @@ -4362,18 +4362,18 @@ void KMyMoney2App::slotTransactionDuplicate(void) try { for(it_t = list.begin(); it_t != list.end(); ++it_t) { MyMoneyTransaction t = (*it_t).transaction(); - QValueList<MyMoneySplit>::iterator it_s; + TQValueList<MyMoneySplit>::iterator it_s; // wipe out any reconciliation information for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { (*it_s).setReconcileFlag(MyMoneySplit::NotReconciled); - (*it_s).setReconcileDate(QDate()); - (*it_s).setBankID(QString()); + (*it_s).setReconcileDate(TQDate()); + (*it_s).setBankID(TQString()); } // clear invalid data - t.setEntryDate(QDate()); + t.setEntryDate(TQDate()); t.clearId(); // and set the post date to today - t.setPostDate(QDate::currentDate()); + t.setPostDate(TQDate::tqcurrentDate()); MyMoneyFile::instance()->addTransaction(t); lt = t; @@ -4386,7 +4386,7 @@ void KMyMoney2App::slotTransactionDuplicate(void) myMoneyView->slotLedgerSelected(m_selectedAccount.id(), lt.id()); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to duplicate transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } // switch off the progress bar @@ -4412,7 +4412,7 @@ void KMyMoney2App::doDeleteTransactions(void) } ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to delete transaction(s): %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } slotStatusProgressBar(-1, -1); @@ -4435,7 +4435,7 @@ void KMyMoney2App::slotTransactionsNew(void) // close the completion list payeeEdit->setCurrentText(d->m_lastPayeeEntered); payeeEdit->completion()->slotMakeCompletion(d->m_lastPayeeEntered); - QStringList payeeId; + TQStringList payeeId; payeeEdit->selector()->selectedItems(payeeId); if(payeeId.count() == 1) { payeeEdit->setSelectedItem(payeeId[0]); @@ -4444,10 +4444,10 @@ void KMyMoney2App::slotTransactionsNew(void) payeeEdit->completion()->hide(); } if(m_transactionEditor) { - connect(m_transactionEditor, SIGNAL(statusProgress(int, int)), this, SLOT(slotStatusProgressBar(int, int))); - connect(m_transactionEditor, SIGNAL(statusMsg(const QString&)), this, SLOT(slotStatusMsg(const QString&))); - connect(m_transactionEditor, SIGNAL(scheduleTransaction(const MyMoneyTransaction&, MyMoneySchedule::occurenceE)), this, SLOT(slotScheduleNew(const MyMoneyTransaction&, MyMoneySchedule::occurenceE))); - connect(m_transactionEditor, SIGNAL(transactionDataSufficient(bool)), this, SLOT(slotUpdateActions())); + connect(m_transactionEditor, TQT_SIGNAL(statusProgress(int, int)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusProgressBar(int, int))); + connect(m_transactionEditor, TQT_SIGNAL(statusMsg(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString&))); + connect(m_transactionEditor, TQT_SIGNAL(scheduleTransaction(const MyMoneyTransaction&, MyMoneySchedule::occurenceE)), TQT_TQOBJECT(this), TQT_SLOT(slotScheduleNew(const MyMoneyTransaction&, MyMoneySchedule::occurenceE))); + connect(m_transactionEditor, TQT_SIGNAL(transactionDataSufficient(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateActions())); } slotUpdateActions(); } @@ -4461,9 +4461,9 @@ void KMyMoney2App::slotTransactionsEdit(void) // if the action is enabled if(kmymoney2->action("transaction_edit")->isEnabled()) { // as soon as we edit a transaction, we don't remember the last payee entered - d->m_lastPayeeEntered = QString(); + d->m_lastPayeeEntered = TQString(); m_transactionEditor = myMoneyView->startEdit(m_selectedTransactions); - connect(m_transactionEditor, SIGNAL(transactionDataSufficient(bool)), this, SLOT(slotUpdateActions())); + connect(m_transactionEditor, TQT_SIGNAL(transactionDataSufficient(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotUpdateActions())); slotUpdateActions(); } } @@ -4483,20 +4483,20 @@ void KMyMoney2App::slotTransactionsEditSplits(void) // if the action is enabled if(kmymoney2->action("transaction_editsplits")->isEnabled()) { // as soon as we edit a transaction, we don't remember the last payee entered - d->m_lastPayeeEntered = QString(); + d->m_lastPayeeEntered = TQString(); m_transactionEditor = myMoneyView->startEdit(m_selectedTransactions); slotUpdateActions(); if(m_transactionEditor) { - if(m_transactionEditor->slotEditSplits() == QDialog::Accepted) { + if(m_transactionEditor->slotEditSplits() == TQDialog::Accepted) { MyMoneyFileTransaction ft; try { - QString id; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString id; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); m_transactionEditor->enterTransactions(id); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4526,9 +4526,9 @@ void KMyMoney2App::slotTransactionsEnter(void) if(kmymoney2->action("transaction_enter")->isEnabled()) { // qDebug("KMyMoney2App::slotTransactionsEnter"); if(m_transactionEditor) { - QString accountId = m_selectedAccount.id(); - QString newId; - connect(m_transactionEditor, SIGNAL(balanceWarning(QWidget*, const MyMoneyAccount&, const QString&)), d->m_balanceWarning, SLOT(slotShowMessage(QWidget*, const MyMoneyAccount&, const QString&))); + TQString accountId = m_selectedAccount.id(); + TQString newId; + connect(m_transactionEditor, TQT_SIGNAL(balanceWarning(TQWidget*, const MyMoneyAccount&, const TQString&)), d->m_balanceWarning, TQT_SLOT(slotShowMessage(TQWidget*, const MyMoneyAccount&, const TQString&))); if(m_transactionEditor->enterTransactions(newId)) { KMyMoneyPayeeCombo* payeeEdit = dynamic_cast<KMyMoneyPayeeCombo*>(m_transactionEditor->haveWidget("payee")); if(payeeEdit && !newId.isEmpty()) { @@ -4549,7 +4549,7 @@ void KMyMoney2App::slotTransactionsCancelOrEnter(bool& okToSelect) static bool oneTime = false; if(!oneTime) { oneTime = true; - QString dontShowAgain = "CancelOrEditTransaction"; + TQString dontShowAgain = "CancelOrEditTransaction"; // qDebug("KMyMoney2App::slotCancelOrEndEdit"); if(m_transactionEditor) { if(KMyMoneyGlobalSettings::focusChangeIsEnter() && kmymoney2->action("transaction_enter")->isEnabled()) { @@ -4558,10 +4558,10 @@ void KMyMoney2App::slotTransactionsCancelOrEnter(bool& okToSelect) // okToSelect is preset to true if a cancel of the dialog is useful and false if it is not int rc; if(okToSelect == true) { - rc = KMessageBox::warningYesNoCancel(0, QString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling and<br>- <b>Cancel</b> returns to the transaction editor.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); + rc = KMessageBox::warningYesNoCancel(0, TQString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling and<br>- <b>Cancel</b> returns to the transaction editor.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); } else { - rc = KMessageBox::warningYesNo(0, QString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); + rc = KMessageBox::warningYesNo(0, TQString("<p>")+i18n("Do you really want to cancel editing this transaction without saving it?<p>- <b>Yes</b> cancels editing the transaction<br>- <b>No</b> saves the transaction prior to cancelling.<p>You can also select an option to save the transaction automatically when e.g. selecting another transaction."), i18n("Cancel transaction edit"), KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain); } switch(rc) { @@ -4666,7 +4666,7 @@ void KMyMoney2App::markTransaction(MyMoneySplit::reconcileFlagE flag) slotStatusProgressBar(-1, -1); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to modify transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4686,8 +4686,8 @@ void KMyMoney2App::slotTransactionsAccept(void) if(t.isImported()) { t.setImported(false); if(!m_selectedAccount.id().isEmpty()) { - QValueList<MyMoneySplit> list = t.splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit> list = t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).accountId() == m_selectedAccount.id()) { if((*it_s).reconcileFlag() == MyMoneySplit::NotReconciled) { @@ -4711,7 +4711,7 @@ void KMyMoney2App::slotTransactionsAccept(void) slotStatusProgressBar(-1, -1); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").arg(e->what()).arg(e->file()).arg(e->line())); + KMessageBox::detailedSorry(0, i18n("Error"), i18n("Unable to accept transaction: %1, thrown in %2:%3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); delete e; } } @@ -4720,13 +4720,13 @@ void KMyMoney2App::slotTransactionGotoAccount(void) { if(!m_accountGoto.isEmpty()) { try { - QString transactionId; + TQString transactionId; if(m_selectedTransactions.count() == 1) { transactionId = m_selectedTransactions[0].transaction().id(); } // make sure to pass a copy, as myMoneyView->slotLedgerSelected() overrides // m_accountGoto while calling slotUpdateActions() - QString accountId = m_accountGoto; + TQString accountId = m_accountGoto; myMoneyView->slotLedgerSelected(accountId, transactionId); } catch(MyMoneyException* e) { delete e; @@ -4738,14 +4738,14 @@ void KMyMoney2App::slotTransactionGotoPayee(void) { if(!m_payeeGoto.isEmpty()) { try { - QString transactionId; + TQString transactionId; if(m_selectedTransactions.count() == 1) { transactionId = m_selectedTransactions[0].transaction().id(); } // make sure to pass copies, as myMoneyView->slotPayeeSelected() overrides // m_payeeGoto and m_selectedAccount while calling slotUpdateActions() - QString payeeId = m_payeeGoto; - QString accountId = m_selectedAccount.id(); + TQString payeeId = m_payeeGoto; + TQString accountId = m_selectedAccount.id(); myMoneyView->slotPayeeSelected(payeeId, accountId, transactionId); } catch(MyMoneyException* e) { delete e; @@ -4759,20 +4759,20 @@ void KMyMoney2App::slotTransactionCreateSchedule(void) // make sure to have the current selected split as first split in the schedule MyMoneyTransaction t = m_selectedTransactions[0].transaction(); MyMoneySplit s = m_selectedTransactions[0].split(); - QString splitId = s.id(); + TQString splitId = s.id(); s.clearId(); s.setReconcileFlag(MyMoneySplit::NotReconciled); - s.setReconcileDate(QDate()); + s.setReconcileDate(TQDate()); t.removeSplits(); t.addSplit(s); - const QValueList<MyMoneySplit>& splits = m_selectedTransactions[0].transaction().splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& splits = m_selectedTransactions[0].transaction().splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { if((*it_s).id() != splitId) { MyMoneySplit s0 = (*it_s); s0.clearId(); s0.setReconcileFlag(MyMoneySplit::NotReconciled); - s0.setReconcileDate(QDate()); + s0.setReconcileDate(TQDate()); t.addSplit(s0); } } @@ -4791,10 +4791,10 @@ void KMyMoney2App::slotTransactionCombine(void) qDebug("slotTransactionCombine() not implemented yet"); } -void KMyMoney2App::slotMoveToAccount(const QString& id) +void KMyMoney2App::slotMoveToAccount(const TQString& id) { // close the menu, if it is still open - QWidget* w = factory()->container("transaction_move_menu", this); + TQWidget* w = factory()->container("transaction_move_menu", this); if(w) { if(w->isVisible()) { w->close(); @@ -4810,7 +4810,7 @@ void KMyMoney2App::slotMoveToAccount(const QString& id) d->moveInvestmentTransaction(m_selectedAccount.id(), id, (*it_t).transaction()); } else { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; bool changed = false; MyMoneyTransaction t = (*it_t).transaction(); for(it_s = (*it_t).transaction().splits().begin(); it_s != (*it_t).transaction().splits().end(); ++it_s) { @@ -4834,17 +4834,17 @@ void KMyMoney2App::slotMoveToAccount(const QString& id) } // move a stock transaction from one investment account to another -void KMyMoney2App::Private::moveInvestmentTransaction(const QString& fromId, - const QString& toId, +void KMyMoney2App::Private::moveInvestmentTransaction(const TQString& fromId, + const TQString& toId, const MyMoneyTransaction& tx) { MyMoneyAccount toInvAcc = MyMoneyFile::instance()->account(toId); MyMoneyTransaction t(tx); // first determine which stock we are dealing with. // fortunately, investment transactions have only one stock involved - QString stockAccountId; - QString stockSecurityId; - QValueList<MyMoneySplit>::const_iterator it_s; + TQString stockAccountId; + TQString stockSecurityId; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { stockAccountId = (*it_s).accountId(); stockSecurityId = @@ -4854,9 +4854,9 @@ void KMyMoney2App::Private::moveInvestmentTransaction(const QString& fromId, } // Now check the target investment account to see if it // contains a stock with this id - QString newStockAccountId = QString(); - QStringList accountList = toInvAcc.accountList(); - QStringList::const_iterator it_a; + TQString newStockAccountId = TQString(); + TQStringList accountList = toInvAcc.accountList(); + TQStringList::const_iterator it_a; for (it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { if (MyMoneyFile::instance()->account((*it_a)).currencyId() == stockSecurityId) { @@ -4915,7 +4915,7 @@ void KMyMoney2App::slotUpdateMoveToAccountMenu(void) // remove those accounts that we currently reference KMyMoneyRegister::SelectedTransactions::const_iterator it_t; for(it_t = m_selectedTransactions.begin(); it_t != m_selectedTransactions.end(); ++it_t) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = (*it_t).transaction().splits().begin(); it_s != (*it_t).transaction().splits().end(); ++it_s) { d->m_moveToAccountSelector->removeItem((*it_s).accountId()); } @@ -4924,8 +4924,8 @@ void KMyMoney2App::slotUpdateMoveToAccountMenu(void) // in a different currency // also remove the selected account itself //(for investments, which will not have been removed above) - QStringList list = d->m_moveToAccountSelector->accountList(); - QValueList<QString>::const_iterator it_a; + TQStringList list = d->m_moveToAccountSelector->accountList(); + TQValueList<TQString>::const_iterator it_a; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.currencyId() != m_selectedAccount.currencyId()) @@ -4992,7 +4992,7 @@ void KMyMoney2App::transactionMatch(void) KMergeTransactionsDlg dlg(m_selectedAccount); dlg.addTransaction(startMatchTransaction); dlg.addTransaction(endMatchTransaction); - if (dlg.exec() == QDialog::Accepted) + if (dlg.exec() == TQDialog::Accepted) #endif { MyMoneyFileTransaction ft; @@ -5016,12 +5016,12 @@ void KMyMoney2App::transactionMatch(void) } -void KMyMoney2App::showContextMenu(const QString& containerName) +void KMyMoney2App::showContextMenu(const TQString& containerName) { - QWidget* w = factory()->container(containerName, this); - QPopupMenu *menu = dynamic_cast<QPopupMenu*>(w); + TQWidget* w = factory()->container(containerName, this); + TQPopupMenu *menu = dynamic_cast<TQPopupMenu*>(w); if(menu) - menu->exec(QCursor::pos()); + menu->exec(TQCursor::pos()); } void KMyMoney2App::slotShowTransactionContextMenu(void) @@ -5092,7 +5092,7 @@ void KMyMoney2App::slotPrintView(void) void KMyMoney2App::updateCaption(bool skipActions) { - QString caption; + TQString caption; caption = m_fileName.filename(false); @@ -5113,7 +5113,7 @@ void KMyMoney2App::updateCaption(bool skipActions) } #if KMM_DEBUG - caption += QString(" (%1 x %2)").arg(width()).arg(height()); + caption += TQString(" (%1 x %2)").tqarg(width()).tqarg(height()); #endif caption = kapp->makeStdCaption(caption, false, modified); @@ -5133,7 +5133,7 @@ void KMyMoney2App::slotUpdateActions(void) MyMoneyFile* file = MyMoneyFile::instance(); bool fileOpen = myMoneyView->fileOpen(); bool modified = file->dirty(); - QWidget* w; + TQWidget* w; action("open_database")->setEnabled(true); action("saveas_database")->setEnabled(fileOpen); @@ -5211,7 +5211,7 @@ void KMyMoney2App::slotUpdateActions(void) action("budget_copy")->setEnabled(false); action("budget_forecast")->setEnabled(false); - QString tooltip = i18n("Create a new transaction"); + TQString tooltip = i18n("Create a new transaction"); action("transaction_new")->setEnabled(fileOpen && myMoneyView->canCreateTransactions(KMyMoneyRegister::SelectedTransactions(), tooltip)); action("transaction_new")->setToolTip(tooltip); @@ -5348,23 +5348,23 @@ void KMyMoney2App::slotUpdateActions(void) action("transaction_assign_number")->setEnabled(m_transactionEditor->canAssignNumber()); action("transaction_new")->setEnabled(false); action("transaction_delete")->setEnabled(false); - QString reason; + TQString reason; action("transaction_enter")->setEnabled(m_transactionEditor->isComplete(reason)); action("transaction_enter")->setToolTip(reason); action("transaction_cancel")->setEnabled(true); } } - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; file->accountList(accList); - QValueList<MyMoneyAccount>::const_iterator it_a; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p = m_onlinePlugins.end(); + TQValueList<MyMoneyAccount>::const_iterator it_a; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p = m_onlinePlugins.end(); for(it_a = accList.begin(); (it_p == m_onlinePlugins.end()) && (it_a != accList.end()); ++it_a) { if ( !(*it_a).onlineBankingSettings().value("provider").isEmpty() ) { // check if provider is available - it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { - QStringList protocols; + TQStringList protocols; (*it_p)->protocols(protocols); if(protocols.count() > 0) { action("account_online_update_all")->setEnabled(true); @@ -5406,10 +5406,10 @@ void KMyMoney2App::slotUpdateActions(void) if ( !m_selectedAccount.onlineBankingSettings().value("provider").isEmpty() ) { action("account_online_unmap")->setEnabled(true); // check if provider is available - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { - QStringList protocols; + TQStringList protocols; (*it_p)->protocols(protocols); if(protocols.count() > 0) { action("account_online_update")->setEnabled(true); @@ -5516,8 +5516,8 @@ void KMyMoney2App::slotResetSelections(void) slotSelectInvestment(); slotSelectSchedule(); slotSelectCurrency(); - slotSelectPayees(QValueList<MyMoneyPayee>()); - slotSelectBudget(QValueList<MyMoneyBudget>()); + slotSelectPayees(TQValueList<MyMoneyPayee>()); + slotSelectBudget(TQValueList<MyMoneyBudget>()); slotSelectTransactions(KMyMoneyRegister::SelectedTransactions()); slotUpdateActions(); } @@ -5529,14 +5529,14 @@ void KMyMoney2App::slotSelectCurrency(const MyMoneySecurity& currency) emit currencySelected(m_selectedCurrency); } -void KMyMoney2App::slotSelectBudget(const QValueList<MyMoneyBudget>& list) +void KMyMoney2App::slotSelectBudget(const TQValueList<MyMoneyBudget>& list) { m_selectedBudgets = list; slotUpdateActions(); emit budgetSelected(m_selectedBudgets); } -void KMyMoney2App::slotSelectPayees(const QValueList<MyMoneyPayee>& list) +void KMyMoney2App::slotSelectPayees(const TQValueList<MyMoneyPayee>& list) { m_selectedPayees = list; slotUpdateActions(); @@ -5554,8 +5554,8 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa m_selectedTransactions.clear(); m_selectedSchedule = MyMoneySchedule(); - m_accountGoto = QString(); - m_payeeGoto = QString(); + m_accountGoto = TQString(); + m_payeeGoto = TQString(); if(list.count() > 0 && !list.first().isScheduled()) { m_selectedTransactions = list; if(list.count() == 1) { @@ -5565,16 +5565,16 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa MyMoneyPayee payee = MyMoneyFile::instance()->payee(sp.payeeId()); if(!payee.name().isEmpty()) { m_payeeGoto = payee.id(); - QString name = payee.name(); - name.replace(QRegExp("&(?!&)"), "&&"); - action("transaction_goto_payee")->setText(i18n("Goto '%1'").arg(name)); + TQString name = payee.name(); + name.tqreplace(TQRegExp("&(?!&)"), "&&"); + action("transaction_goto_payee")->setText(i18n("Goto '%1'").tqarg(name)); } } catch(MyMoneyException *e) { delete e; } } try { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; const MyMoneyTransaction& t = m_selectedTransactions[0].transaction(); // search the first non-income/non-expense accunt and use it for the 'goto account' const MyMoneySplit& sp = m_selectedTransactions[0].split(); @@ -5584,12 +5584,12 @@ void KMyMoney2App::slotSelectTransactions(const KMyMoneyRegister::SelectedTransa if(!acc.isIncomeExpense()) { // for stock accounts we show the portfolio account if(acc.isInvest()) { - acc = MyMoneyFile::instance()->account(acc.parentAccountId()); + acc = MyMoneyFile::instance()->account(acc.tqparentAccountId()); } m_accountGoto = acc.id(); - QString name = acc.name(); - name.replace(QRegExp("&(?!&)"), "&&"); - action("transaction_goto_account")->setText(i18n("Goto '%1'").arg(name)); + TQString name = acc.name(); + name.tqreplace(TQRegExp("&(?!&)"), "&&"); + action("transaction_goto_account")->setText(i18n("Goto '%1'").tqarg(name)); break; } } @@ -5678,12 +5678,12 @@ void KMyMoney2App::slotDataChanged(void) void KMyMoney2App::slotCurrencyDialog(void) { KCurrencyEditDlg dlg(this, "Currency Editor"); - connect(&dlg, SIGNAL(selectObject(const MyMoneySecurity&)), this, SLOT(slotSelectCurrency(const MyMoneySecurity&))); - connect(&dlg, SIGNAL(openContextMenu(const MyMoneySecurity&)), this, SLOT(slotShowCurrencyContextMenu())); - connect(this, SIGNAL(currencyRename()), &dlg, SLOT(slotStartRename())); - connect(&dlg, SIGNAL(renameCurrency(QListViewItem*, int, const QString&)), this, SLOT(slotCurrencyRename(QListViewItem*,int,const QString&))); - connect(this, SIGNAL(currencyCreated(const QString&)), &dlg, SLOT(slotSelectCurrency(const QString&))); - connect(&dlg, SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, SLOT(slotCurrencySetBase())); + connect(&dlg, TQT_SIGNAL(selectObject(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotSelectCurrency(const MyMoneySecurity&))); + connect(&dlg, TQT_SIGNAL(openContextMenu(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotShowCurrencyContextMenu())); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(currencyRename()), &dlg, TQT_SLOT(slotStartRename())); + connect(&dlg, TQT_SIGNAL(renameCurrency(TQListViewItem*, int, const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrencyRename(TQListViewItem*,int,const TQString&))); + connect(TQT_TQOBJECT(this), TQT_SIGNAL(currencyCreated(const TQString&)), &dlg, TQT_SLOT(slotSelectCurrency(const TQString&))); + connect(&dlg, TQT_SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), TQT_TQOBJECT(this), TQT_SLOT(slotCurrencySetBase())); dlg.exec(); @@ -5700,13 +5700,13 @@ void KMyMoney2App::slotFileConsitencyCheck(void) { KMSTATUS(i18n("Running consistency check...")); - QStringList msg; + TQStringList msg; MyMoneyFileTransaction ft; try { msg = MyMoneyFile::instance()->consistencyCheck(); ft.commit(); } catch(MyMoneyException *e) { - msg = i18n("Consistency check failed: %1").arg(e->what()); + msg = i18n("Consistency check failed: %1").tqarg(e->what()); delete e; } @@ -5721,10 +5721,10 @@ void KMyMoney2App::slotCheckSchedules(void) KMSTATUS(i18n("Checking for overdue scheduled transactions...")); MyMoneyFile *file = MyMoneyFile::instance(); - QDate checkDate = QDate::currentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview()); + TQDate checkDate = TQDate::tqcurrentDate().addDays(KMyMoneyGlobalSettings::checkSchedulePreview()); - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); - QValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneySchedule>::Iterator it; KMyMoneyUtils::EnterScheduleResultCodeE rc = KMyMoneyUtils::Enter; for (it=scheduleList.begin(); (it != scheduleList.end()) && (rc != KMyMoneyUtils::Cancel); ++it) { @@ -5748,7 +5748,7 @@ void KMyMoney2App::slotCheckSchedules(void) } } -void KMyMoney2App::writeLastUsedDir(const QString& directory) +void KMyMoney2App::writeLastUsedDir(const TQString& directory) { //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5761,7 +5761,7 @@ void KMyMoney2App::writeLastUsedDir(const QString& directory) } } -void KMyMoney2App::writeLastUsedFile(const QString& fileName) +void KMyMoney2App::writeLastUsedFile(const TQString& fileName) { //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5776,9 +5776,9 @@ void KMyMoney2App::writeLastUsedFile(const QString& fileName) } } -QString KMyMoney2App::readLastUsedDir(void) const +TQString KMyMoney2App::readLastUsedDir(void) const { - QString str; + TQString str; //get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5796,9 +5796,9 @@ QString KMyMoney2App::readLastUsedDir(void) const return str; } -QString KMyMoney2App::readLastUsedFile(void) const +TQString KMyMoney2App::readLastUsedFile(void) const { - QString str; + TQString str; // get global config object for our app. KConfig *kconfig = KGlobal::config(); @@ -5813,22 +5813,22 @@ QString KMyMoney2App::readLastUsedFile(void) const return str; } -const QString KMyMoney2App::filename(void) const +const TQString KMyMoney2App::filename(void) const { return m_fileName.url(); } -const QValueList<QCString> KMyMoney2App::instanceList(void) const +const TQValueList<TQCString> KMyMoney2App::instanceList(void) const { - QValueList<QCString> list; - QValueList<QCString> apps = kapp->dcopClient()->registeredApplications(); - QValueList<QCString>::ConstIterator it; + TQValueList<TQCString> list; + TQValueList<TQCString> apps = kapp->dcopClient()->registeredApplications(); + TQValueList<TQCString>::ConstIterator it; for(it = apps.begin(); it != apps.end(); ++it) { // skip over myself if((*it) == kapp->dcopClient()->appId()) continue; - if((*it).find("kmymoney-") == 0) { + if((*it).tqfind("kmymoney-") == 0) { list += (*it); } } @@ -5838,11 +5838,11 @@ const QValueList<QCString> KMyMoney2App::instanceList(void) const void KMyMoney2App::slotEquityPriceUpdate(void) { KEquityPriceUpdateDlg dlg(this); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } -void KMyMoney2App::webConnect(const QString& url, const QCString& asn_id) +void KMyMoney2App::webConnect(const TQString& url, const TQCString& asn_id) { // // Web connect attempts to go through the known importers and see if the file @@ -5867,15 +5867,15 @@ void KMyMoney2App::webConnect(const QString& url, const QCString& asn_id) // remove the statement files d->unlinkStatementXML(); - QMap<QString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); + TQMap<TQString,KMyMoneyPlugin::ImporterPlugin*>::const_iterator it_plugin = m_importerPlugins.begin(); while ( it_plugin != m_importerPlugins.end() ) { if ( (*it_plugin)->isMyFormat(url) ) { - QValueList<MyMoneyStatement> statements; + TQValueList<MyMoneyStatement> statements; if (!(*it_plugin)->import(url) ) { - KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").arg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error")); + KMessageBox::error( this, i18n("Unable to import %1 using %2 plugin. The plugin returned the following error: %3").tqarg(url,(*it_plugin)->formatName(),(*it_plugin)->lastError()), i18n("Importing error")); } break; @@ -5908,7 +5908,7 @@ void KMyMoney2App::slotSecurityEditor(void) void KMyMoney2App::createInterfaces(void) { // Sets up the plugin interface, and load the plugins - m_pluginInterface = new QObject( this, "_pluginInterface" ); + m_pluginInterface = new TQObject( this, "_pluginInterface" ); new KMyMoneyPlugin::KMMViewInterface(this, myMoneyView, m_pluginInterface, "view interface"); new KMyMoneyPlugin::KMMStatementInterface(this, m_pluginInterface, "statement interface"); @@ -5917,10 +5917,10 @@ void KMyMoney2App::createInterfaces(void) void KMyMoney2App::loadPlugins(void) { - d->m_pluginLoader = new KMyMoneyPlugin::PluginLoader(this); + d->m_pluginLoader = new KMyMoneyPlugin::PluginLoader(TQT_TQOBJECT(this)); - connect( d->m_pluginLoader, SIGNAL( plug(KPluginInfo*) ), this, SLOT( slotPluginPlug(KPluginInfo*) ) ); - connect( d->m_pluginLoader, SIGNAL( unplug(KPluginInfo*) ), this, SLOT( slotPluginUnplug(KPluginInfo*) ) ); + connect( d->m_pluginLoader, TQT_SIGNAL( plug(KPluginInfo*) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginPlug(KPluginInfo*) ) ); + connect( d->m_pluginLoader, TQT_SIGNAL( unplug(KPluginInfo*) ), TQT_TQOBJECT(this), TQT_SLOT( slotPluginUnplug(KPluginInfo*) ) ); d->m_pluginLoader->loadPlugins(); } @@ -5987,22 +5987,22 @@ void KMyMoney2App::slotAutoSave(void) void KMyMoney2App::slotDateChanged(void) { - QDateTime dt = QDateTime::currentDateTime(); - QDateTime nextDay( QDate(dt.date().addDays(1)), QTime(0, 0, 0) ); + TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime nextDay( TQDate(dt.date().addDays(1)), TQTime(0, 0, 0) ); - QTimer::singleShot(dt.secsTo(nextDay)*1000, this, SLOT(slotDateChanged())); + TQTimer::singleShot(dt.secsTo(nextDay)*1000, TQT_TQOBJECT(this), TQT_SLOT(slotDateChanged())); myMoneyView->slotRefreshViews(); } -const MyMoneyAccount& KMyMoney2App::account(const QString& key, const QString& value) const +const MyMoneyAccount& KMyMoney2App::account(const TQString& key, const TQString& value) const { - QValueList<MyMoneyAccount> list; - QValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::const_iterator it_a; MyMoneyFile::instance()->accountList(list); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; for(it_a = list.begin(); it_a != list.end(); ++it_a) { - const QString& id = (*it_a).onlineBankingSettings().value(key); - if(id.contains(value)) { + const TQString& id = (*it_a).onlineBankingSettings().value(key); + if(id.tqcontains(value)) { accList << MyMoneyFile::instance()->account((*it_a).id()); } if(id == value) { @@ -6016,7 +6016,7 @@ const MyMoneyAccount& KMyMoney2App::account(const QString& key, const QString& v } // return reference to empty element - return MyMoneyFile::instance()->account(QString()); + return MyMoneyFile::instance()->account(TQString()); } void KMyMoney2App::setAccountOnlineParameters(const MyMoneyAccount& _acc, const MyMoneyKeyValueContainer& kvps) @@ -6029,7 +6029,7 @@ void KMyMoney2App::setAccountOnlineParameters(const MyMoneyAccount& _acc, const ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").arg(_acc.name()), e->what() ); + KMessageBox::detailedSorry(0, i18n("Unable to setup online parameters for account ''%1'").tqarg(_acc.name()), e->what() ); delete e; } } @@ -6044,7 +6044,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void) if(m_selectedAccount.onlineBankingSettings().value("provider").isEmpty()) return; - if(KMessageBox::warningYesNo(this, QString("<qt>%1</qt>").arg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").arg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) { + if(KMessageBox::warningYesNo(this, TQString("<qt>%1</qt>").tqarg(i18n("Do you really want to remove the mapping of account <b>%1</b> to an online account? Depending on the details of the online banking method used, this action cannot be reverted.").tqarg(m_selectedAccount.name())), i18n("Remove mapping to online account")) == KMessageBox::Yes) { MyMoneyFileTransaction ft; try { m_selectedAccount.setOnlineBankingSettings(MyMoneyKeyValueContainer()); @@ -6055,7 +6055,7 @@ void KMyMoney2App::slotAccountUnmapOnline(void) MyMoneyFile::instance()->modifyAccount(m_selectedAccount); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to unmap account from online account: %1").tqarg(e->what())); delete e; } } @@ -6072,7 +6072,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // check if user tries to map a brokerageAccount - if(m_selectedAccount.name().contains(i18n(" (Brokerage)"))) { + if(m_selectedAccount.name().tqcontains(i18n(" (Brokerage)"))) { if(KMessageBox::warningContinueCancel(this, i18n("You try to map a brokerage account to an online account. This is usually not advisable. In general, the investment account should be mapped to the online account. Please cancel if you intended to map the investment account, continue otherwise"), i18n("Mapping brokerage account")) == KMessageBox::Cancel) { return; } @@ -6082,8 +6082,8 @@ void KMyMoney2App::slotAccountMapOnline(void) KPluginDlg dlg(this); dlg.setCaption(i18n("Select online banking plugin")); dlg.closeButton->hide(); - QString provider; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + TQString provider; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; switch(m_onlinePlugins.count()) { case 0: break; @@ -6092,11 +6092,11 @@ void KMyMoney2App::slotAccountMapOnline(void) break; default: for(it_p = m_onlinePlugins.begin(); it_p != m_onlinePlugins.end(); ++it_p) { - QStringList protocolList; + TQStringList protocolList; (*it_p)->protocols(protocolList); new KListViewItem(dlg.m_listView, it_p.key(), "Loaded", protocolList.join(", ")); } - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { if(dlg.m_listView->selectedItem()) { provider = dlg.m_listView->selectedItem()->text(0); } @@ -6108,7 +6108,7 @@ void KMyMoney2App::slotAccountMapOnline(void) return; // find the provider - it_p = m_onlinePlugins.find(provider); + it_p = m_onlinePlugins.tqfind(provider); if(it_p != m_onlinePlugins.end()) { // plugin found, call it MyMoneyKeyValueContainer settings; @@ -6121,7 +6121,7 @@ void KMyMoney2App::slotAccountMapOnline(void) MyMoneyFile::instance()->modifyAccount(acc); ft.commit(); } catch(MyMoneyException* e) { - KMessageBox::error(this, i18n("Unable to map account to online account: %1").arg(e->what())); + KMessageBox::error(this, i18n("Unable to map account to online account: %1").tqarg(e->what())); delete e; } } @@ -6130,10 +6130,10 @@ void KMyMoney2App::slotAccountMapOnline(void) void KMyMoney2App::slotAccountUpdateOnlineAll(void) { - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; MyMoneyFile::instance()->accountList(accList); - QValueList<MyMoneyAccount>::iterator it_a; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + TQValueList<MyMoneyAccount>::iterator it_a; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; d->m_statementResults.clear(); d->m_collectingStatements = true; @@ -6141,7 +6141,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // provider is not currently present for(it_a = accList.begin(); it_a != accList.end();) { if ((*it_a).onlineBankingSettings().value("provider").isEmpty() - || m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { + || m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")) == m_onlinePlugins.end() ) { it_a = accList.remove(it_a); } else ++it_a; @@ -6150,7 +6150,7 @@ void KMyMoney2App::slotAccountUpdateOnlineAll(void) // now work on the remaining list of accounts int cnt = accList.count() - 1; for(it_a = accList.begin(); it_a != accList.end(); ++it_a) { - it_p = m_onlinePlugins.find((*it_a).onlineBankingSettings().value("provider")); + it_p = m_onlinePlugins.tqfind((*it_a).onlineBankingSettings().value("provider")); (*it_p)->updateAccount(*it_a, cnt != 0); --cnt; } @@ -6171,8 +6171,8 @@ void KMyMoney2App::slotAccountUpdateOnline(void) return; // find the provider - QMap<QString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; - it_p = m_onlinePlugins.find(m_selectedAccount.onlineBankingSettings().value("provider")); + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*>::const_iterator it_p; + it_p = m_onlinePlugins.tqfind(m_selectedAccount.onlineBankingSettings().value("provider")); if(it_p != m_onlinePlugins.end()) { // plugin found, call it d->m_collectingStatements = true; @@ -6184,22 +6184,22 @@ void KMyMoney2App::slotAccountUpdateOnline(void) } } -KMStatus::KMStatus (const QString &text) +KMtqStatus::KMtqStatus (const TQString &text) { m_prevText = kmymoney2->slotStatusMsg(text); } -KMStatus::~KMStatus() +KMtqStatus::~KMtqStatus() { kmymoney2->slotStatusMsg(m_prevText); } void KMyMoney2App::Private::unlinkStatementXML(void) { - QDir d("/home/thb", "kmm-statement*"); + TQDir d("/home/thb", "kmm-statement*"); for(int i=0; i < d.count(); ++i) { qDebug("Remove %s", d[i].data()); - d.remove(QString("/home/thb/%1").arg(d[i])); + d.remove(TQString("/home/thb/%1").tqarg(d[i])); } statementXMLindex = 0; } diff --git a/kmymoney2/kmymoney2.h b/kmymoney2/kmymoney2.h index 77d5c86..e63d861 100644 --- a/kmymoney2/kmymoney2.h +++ b/kmymoney2/kmymoney2.h @@ -23,9 +23,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> -class QTimer; -class QLabel; +#include <tqapplication.h> +class TQTimer; +class TQLabel; // ---------------------------------------------------------------------------- // KDE Includes @@ -53,7 +53,7 @@ class KPushButton; #include <kmymoney/register.h> #include <kmymoney/kmymoneyutils.h> -class QSignalMapper; +class TQSignalMapper; class KProgress; class KMyMoneyView; class MyMoneyQifReader; @@ -96,14 +96,15 @@ namespace KMyMoneyPlugin { class ImporterPlugin; } class KMyMoney2App : public KMainWindow, public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP protected slots: - void slotFileSaveAsFilterChanged(const QString& filter); + void slotFileSaveAsFilterChanged(const TQString& filter); /** * This slot is intended to be used as part of auto saving. This is used when the - * QTimer emits the timeout signal and simply checks that the file is dirty (has + * TQTimer emits the timeout signal and simply checks that the file is dirty (has * received modifications to it's contents), and call the apropriate method to * save the file. Furthermore, re-starts the timer (possibly not needed). * @author mvillarino 2005 @@ -149,7 +150,7 @@ protected slots: void slotQifImport(void); /** - * Called when a QIF import is finished. + * Called when a TQIF import is finished. */ void slotQifImportFinished(void); @@ -179,7 +180,7 @@ protected slots: /** * Called when the user wishes to export some transaction to a - * QIF formatted file. An account must be open for this to work. + * TQIF formatted file. An account must be open for this to work. * Uses MyMoneyQifWriter() for the actual output. */ void slotQifExport(void); @@ -229,17 +230,17 @@ protected slots: /** * Brings up the new category editor and saves the information. - * The dialog will be preset with the name. The parent defaults to + * The dialog will be preset with the name. The tqparent defaults to * MyMoneyFile::expense() * * @param name Name of the account to be created. Could include a full hierarchy * @param id reference to storage which will receive the id after successful creation * * @note Typically, this slot can be connected to the - * StdTransactionEditor::createCategory(const QString&, QString&) or - * KMyMoneyCombo::createItem(const QString&, QString&) signal. + * StdTransactionEditor::createCategory(const TQString&, TQString&) or + * KMyMoneyCombo::createItem(const TQString&, TQString&) signal. */ - void slotCategoryNew(const QString& name, QString& id); + void slotCategoryNew(const TQString& name, TQString& id); /** * Calls the print logic for the current view @@ -252,9 +253,9 @@ protected slots: void slotInvestmentNew(void); /** - * Create a new investment in a given @p parent investment account + * Create a new investment in a given @p tqparent investment account */ - void slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& parent); + void slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent); /** * This slot opens the investment editor to edit the currently @@ -284,7 +285,7 @@ protected slots: /** */ - void slotPayeeNew(const QString& newnameBase, QString& id); + void slotPayeeNew(const TQString& newnameBase, TQString& id); void slotPayeeNew(void); /** @@ -317,7 +318,7 @@ protected slots: /** */ - void slotCurrencyRename(QListViewItem* item, int, const QString& txt); + void slotCurrencyRename(TQListViewItem* item, int, const TQString& txt); /** */ @@ -418,7 +419,7 @@ protected slots: */ void slotDataChanged(void); - void slotMoveToAccount(const QString& id); + void slotMoveToAccount(const TQString& id); void slotUpdateMoveToAccountMenu(void); @@ -463,7 +464,7 @@ public: /** * construtor of KMyMoney2App, calls all init functions to create the application. */ - KMyMoney2App(QWidget* parent=0, const char* name=0); + KMyMoney2App(TQWidget* tqparent=0, const char* name=0); /** * Destructor @@ -473,12 +474,12 @@ public: /** Init wizard dialog */ bool initWizard(void); - static void progressCallback(int current, int total, const QString&); + static void progressCallback(int current, int total, const TQString&); - void writeLastUsedDir(const QString& directory); - QString readLastUsedDir(void) const; - void writeLastUsedFile(const QString& fileName); - QString readLastUsedFile(void) const; + void writeLastUsedDir(const TQString& directory); + TQString readLastUsedDir(void) const; + void writeLastUsedFile(const TQString& fileName); + TQString readLastUsedFile(void) const; /** * Returns whether there is an importer available that can handle this file @@ -499,9 +500,9 @@ public: * This method returns a list of all 'other' dcop registered kmymoney processes. * It's a subset of the return of DCOPclient()->registeredApplications(). * - * @retval QStringList of process ids + * @retval TQStringList of process ids */ - const QValueList<QCString> instanceList(void) const; + const TQValueList<TQCString> instanceList(void) const; /** * Dump a list of the names of all defined KActions to stdout. @@ -512,21 +513,21 @@ public: * Popup the context menu with the respective @p containerName. * Valid container names are defined in kmymoney2ui.rc */ - void showContextMenu(const QString& containerName); + void showContextMenu(const TQString& containerName); /** * This method opens the category editor with the data found in @a account. The - * parent account is preset to @a parent but can be modified. If the user + * tqparent account is preset to @a tqparent but can be modified. If the user * acknowledges, the category is created. */ - void createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent); + void createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent); /** * This method returns the account for a given @a key - @a value pair. * If the account is not found in the list of accounts, MyMoneyAccount() * is returned. */ - const MyMoneyAccount& account(const QString& key, const QString& value) const; + const MyMoneyAccount& account(const TQString& key, const TQString& value) const; /** * This method set the online parameters stored in @a kvps with the @@ -534,18 +535,18 @@ public: */ void setAccountOnlineParameters(const MyMoneyAccount& acc, const MyMoneyKeyValueContainer& kvps); - KURL selectFile(const QString& title, const QString& path, const QString& mask, KFile::Mode mode); + KURL selectFile(const TQString& title, const TQString& path, const TQString& tqmask, KFile::Mode mode); - const MyMoneyAccount& findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& parent) const; + const MyMoneyAccount& findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent) const; - void createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& parentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal); + void createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& tqparentAccount, MyMoneyAccount& brokerageAccount, MyMoneyMoney openingBal); k_dcop: // Note: Don't use e.g. filename(void) but use filename() because // otherwise the kidl compiler produces uncompilable results. - const QString filename() const; + const TQString filename() const; - void webConnect(const QString&, const QCString& asn_id); + void webConnect(const TQString&, const TQCString& asn_id); /** * Checks if the file with the @a url already exists. If so, @@ -555,10 +556,10 @@ k_dcop: */ bool okToWriteFile(const KURL& url); - // QValueList<MyMoneyAccount> accountList() const; + // TQValueList<MyMoneyAccount> accountList() const; protected: - /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration * file */ void saveOptions(void); @@ -607,7 +608,7 @@ protected: void slotCheckSchedules(void); - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); void createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& newAccount); @@ -616,7 +617,7 @@ protected: * can be closed if: * * - the balance is zero and - * - all children are already closed and + * - all tqchildren are already closed and * - there is no unfinished schedule referencing the account * * @param acc reference to MyMoneyAccount object in question @@ -634,7 +635,7 @@ protected: * @retval true object has been found * @retval false object is not in list */ - bool payeeInList(const QValueList<MyMoneyPayee>& list, const QString& id) const; + bool payeeInList(const TQValueList<MyMoneyPayee>& list, const TQString& id) const; /** * Mark the selected transactions as provided by @a flag. If @@ -774,7 +775,7 @@ public slots: * * @param text the text that is displayed in the statusbar */ - const QString slotStatusMsg(const QString &text); + const TQString slotStatusMsg(const TQString &text); /** * This method changes the progress bar in the status line according @@ -810,7 +811,7 @@ public slots: * Essentially similiar to the above slot, except this will load the file * from disk first, given the URL. */ - bool slotStatementImport(const QString& url); + bool slotStatementImport(const TQString& url); /** * This slot starts the reconciliation of the currently selected account @@ -857,17 +858,17 @@ public slots: * This slot reparents account @p src to be a child of account @p dest * * @param src account to be reparented - * @param dest new parent + * @param dest new tqparent */ - void slotReparentAccount(const MyMoneyAccount& src, const MyMoneyAccount& dest); + void slotRetqparentAccount(const MyMoneyAccount& src, const MyMoneyAccount& dest); /** * This slot reparents account @p src to be a held at institution @p dest * * @param src account to be reparented - * @param dest new parent institution + * @param dest new tqparent institution */ - void slotReparentAccount(const MyMoneyAccount& src, const MyMoneyInstitution& dest); + void slotRetqparentAccount(const MyMoneyAccount& src, const MyMoneyInstitution& dest); /** * This slot creates a transaction report for the selected account @@ -966,9 +967,9 @@ public slots: void slotSelectSchedule(const MyMoneySchedule& schedule = MyMoneySchedule()); - void slotSelectPayees(const QValueList<MyMoneyPayee>& list); + void slotSelectPayees(const TQValueList<MyMoneyPayee>& list); - void slotSelectBudget(const QValueList<MyMoneyBudget>& list); + void slotSelectBudget(const TQValueList<MyMoneyBudget>& list); void slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions& list); @@ -989,15 +990,15 @@ public slots: /** * Brings up the new category editor and saves the information. - * The dialog will be preset with the name and parent account. + * The dialog will be preset with the name and tqparent account. * * @param account reference of category to be created. The @p name member * should be filled by the caller. The object will be filled * with additional information during the creation process * esp. the @p id member. - * @param parent reference to parent account (defaults to none) + * @param tqparent reference to tqparent account (defaults to none) */ - void slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& parent = MyMoneyAccount()); + void slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent = MyMoneyAccount()); /** * This method updates all KAction items to the current state. @@ -1063,7 +1064,7 @@ private: * into references to account @a toId. Returns @a true if at least * one split has been changed, @a false otherwise. */ - bool exchangeAccountInTransaction(MyMoneyTransaction& _t, const QString& fromId, const QString& toId); + bool exchangeAccountInTransaction(MyMoneyTransaction& _t, const TQString& fromId, const TQString& toId); signals: /** @@ -1075,15 +1076,15 @@ signals: /** * This signal is emitted when a payee/list of payees has been selected by * the GUI. If no payee is selected or the selection is removed, - * @p payees is identical to an empty QValueList. This signal is used + * @p payees is identical to an empty TQValueList. This signal is used * by plugins to get information about changes. */ - void payeesSelected(const QValueList<MyMoneyPayee>& payees); + void payeesSelected(const TQValueList<MyMoneyPayee>& payees); /** * This signal is emitted when a transaction/list of transactions has been selected by * the GUI. If no transaction is selected or the selection is removed, - * @p transactions is identical to an empty QValueList. This signal is used + * @p transactions is identical to an empty TQValueList. This signal is used * by plugins to get information about changes. */ void transactionsSelected(const KMyMoneyRegister::SelectedTransactions& transactions); @@ -1097,10 +1098,10 @@ signals: /** * This signal is emitted when a list of budgets has been selected by * the GUI. If no budget is selected or the selection is removed, - * @a budget is identical to an empty QValueList. This signal is used + * @a budget is identical to an empty TQValueList. This signal is used * by plugins to get information about changes. */ - void budgetSelected(const QValueList<MyMoneyBudget>& budget); + void budgetSelected(const TQValueList<MyMoneyBudget>& budget); void budgetRename(void); /** @@ -1137,10 +1138,10 @@ signals: void currencySelected(const MyMoneySecurity& currency); void payeeRename(void); - void payeeCreated(const QString& id); + void payeeCreated(const TQString& id); void currencyRename(void); - void currencyCreated(const QString& id); + void currencyCreated(const TQString& id); void startMatchTransaction(const MyMoneyTransaction& t); void cancelMatchTransaction(void); @@ -1154,10 +1155,10 @@ signals: * @param date the reconciliation date as provided through the dialog * @param startingBalance the starting balance as provided through the dialog * @param endingBalance the ending balance as provided through the dialog - * @param transactionList reference to QValueList of QPair containing all + * @param transactionList reference to TQValueList of TQPair containing all * transaction/split pairs processed by the reconciliation. */ - void accountReconciled(const MyMoneyAccount& account, const QDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); + void accountReconciled(const MyMoneyAccount& account, const TQDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); public: /** @@ -1169,7 +1170,7 @@ public: * @param actionName name of the action to be retrieved * @return pointer to KAction object (or derivative) */ - KAction* action(const QString& actionName) const; + KAction* action(const TQString& actionName) const; /** * This method is implemented for convenience. It returns a dynamic_cast-ed @@ -1178,7 +1179,7 @@ public: * is not of type KToggleAction, a pointer to a static non-configured * KToggleAction object is returned and a warning is printed to stderr. */ - KToggleAction* toggleAction(const QString& actionName) const; + KToggleAction* toggleAction(const TQString& actionName) const; private: @@ -1195,9 +1196,9 @@ private: /** the configuration object of the application */ KConfig *config; - QMap<QString,KMyMoneyPlugin::ImporterPlugin*> m_importerPlugins; + TQMap<TQString,KMyMoneyPlugin::ImporterPlugin*> m_importerPlugins; - QMap<QString, KMyMoneyPlugin::OnlinePlugin*> m_onlinePlugins; + TQMap<TQString, KMyMoneyPlugin::OnlinePlugin*> m_onlinePlugins; enum backupStateE { BACKUP_IDLE = 0, @@ -1236,11 +1237,11 @@ private: KURL m_fileName; bool m_startDialog; - QString m_mountpoint; + TQString m_mountpoint; KProgress* progressBar; - QString m_statusMsg; + TQString m_statusMsg; int m_progressUpdate; int m_nextUpdate; @@ -1254,7 +1255,7 @@ private: KToolBarPopupAction* m_previousViewButton; KToolBarPopupAction* m_nextViewButton; - QObject* m_pluginInterface; + TQObject* m_pluginInterface; MyMoneyAccount m_selectedAccount; MyMoneyAccount m_reconciliationAccount; @@ -1262,13 +1263,13 @@ private: MyMoneyInstitution m_selectedInstitution; MyMoneySchedule m_selectedSchedule; MyMoneySecurity m_selectedCurrency; - QValueList<MyMoneyPayee> m_selectedPayees; - QValueList<MyMoneyBudget> m_selectedBudgets; + TQValueList<MyMoneyPayee> m_selectedPayees; + TQValueList<MyMoneyBudget> m_selectedBudgets; KMyMoneyRegister::SelectedTransactions m_selectedTransactions; // This is Auto Saving related bool m_autoSaveEnabled; - QTimer* m_autoSaveTimer; + TQTimer* m_autoSaveTimer; int m_autoSavePeriod; bool m_inAutoSaving; @@ -1283,24 +1284,24 @@ private: KEndingBalanceDlg* m_endingBalanceDlg; // id's that need to be remembered - QString m_accountGoto, m_payeeGoto; + TQString m_accountGoto, m_payeeGoto; - QStringList m_additionalGpgKeys; - QLabel* m_additionalKeyLabel; + TQStringList m_additionalGpgKeys; + TQLabel* m_additionalKeyLabel; KPushButton* m_additionalKeyButton; }; extern KMyMoney2App *kmymoney2; -class KMStatus +class KMtqStatus { public: - KMStatus (const QString &text); - ~KMStatus(); + KMtqStatus (const TQString &text); + ~KMtqStatus(); private: - QString m_prevText; + TQString m_prevText; }; -#define KMSTATUS(msg) KMStatus _thisStatus(msg) +#define KMSTATUS(msg) KMtqStatus _thistqStatus(msg) #endif // KMYMONEY2_H diff --git a/kmymoney2/kmymoneyglobalsettings.cpp b/kmymoney2/kmymoneyglobalsettings.cpp index 2dcd964..8daaa2f 100644 --- a/kmymoney2/kmymoneyglobalsettings.cpp +++ b/kmymoney2/kmymoneyglobalsettings.cpp @@ -17,7 +17,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -29,7 +29,7 @@ #include <kmymoney/kmymoneyglobalsettings.h> -QFont KMyMoneyGlobalSettings::listCellFont(void) +TQFont KMyMoneyGlobalSettings::listCellFont(void) { if(useSystemFont()) { return KGlobalSettings::generalFont(); @@ -38,10 +38,10 @@ QFont KMyMoneyGlobalSettings::listCellFont(void) } } -QFont KMyMoneyGlobalSettings::listHeaderFont(void) +TQFont KMyMoneyGlobalSettings::listHeaderFont(void) { if(useSystemFont()) { - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); font.setBold(true); return font; } else { @@ -49,7 +49,7 @@ QFont KMyMoneyGlobalSettings::listHeaderFont(void) } } -QColor KMyMoneyGlobalSettings::listColor(void) +TQColor KMyMoneyGlobalSettings::listColor(void) { if(useSystemColors()) return KGlobalSettings::baseColor(); @@ -57,7 +57,7 @@ QColor KMyMoneyGlobalSettings::listColor(void) return KMyMoneySettings::listColor(); } -QColor KMyMoneyGlobalSettings::listBGColor(void) +TQColor KMyMoneyGlobalSettings::listBGColor(void) { if(useSystemColors()) return KGlobalSettings::alternateBackgroundColor(); @@ -65,19 +65,19 @@ QColor KMyMoneyGlobalSettings::listBGColor(void) return KMyMoneySettings::listBGColor(); } -QStringList KMyMoneyGlobalSettings::itemList(void) +TQStringList KMyMoneyGlobalSettings::itemList(void) { bool prevValue = self()->useDefaults(true); - QStringList all = QStringList::split(",", KMyMoneySettings::itemList()); + TQStringList all = TQStringList::split(",", KMyMoneySettings::itemList()); self()->useDefaults(prevValue); - QStringList list = QStringList::split(",", KMyMoneySettings::itemList()); + TQStringList list = TQStringList::split(",", KMyMoneySettings::itemList()); // now add all from 'all' that are missing in 'list' - QRegExp exp("-?(\\d+)"); - QStringList::iterator it_s; + TQRegExp exp("-?(\\d+)"); + TQStringList::iterator it_s; for(it_s = all.begin(); it_s != all.end(); ++it_s) { exp.search(*it_s); - if(!list.contains(exp.cap(1)) && !list.contains(QString("-%1").arg(exp.cap(1)))) { + if(!list.tqcontains(exp.cap(1)) && !list.tqcontains(TQString("-%1").tqarg(exp.cap(1)))) { list << *it_s; } } diff --git a/kmymoney2/kmymoneyglobalsettings.h b/kmymoney2/kmymoneyglobalsettings.h index 16ca4a2..6ef9c1b 100644 --- a/kmymoney2/kmymoneyglobalsettings.h +++ b/kmymoney2/kmymoneyglobalsettings.h @@ -35,11 +35,11 @@ class KMyMoneyGlobalSettings : public KMyMoneySettings { public: - static QFont listCellFont(void); - static QFont listHeaderFont(void); - static QColor listColor(void); - static QColor listBGColor(void); - static QStringList itemList(void); + static TQFont listCellFont(void); + static TQFont listHeaderFont(void); + static TQColor listColor(void); + static TQColor listBGColor(void); + static TQStringList itemList(void); static int firstFiscalMonth(void); static int firstFiscalDay(void); }; diff --git a/kmymoney2/kmymoneytest.cpp b/kmymoney2/kmymoneytest.cpp index f3c7222..fd89b69 100644 --- a/kmymoney2/kmymoneytest.cpp +++ b/kmymoney2/kmymoneytest.cpp @@ -21,7 +21,7 @@ #include <stdexcept> /* required for Q_UNUSED( ) */ -#include <qglobal.h> +#include <tqglobal.h> #ifdef HAVE_LIBCPPUNIT @@ -63,7 +63,7 @@ #include "reports/pivottabletest.h" #include "reports/pivotgridtest.h" -#include "reports/querytabletest.h" +#include "reports/tquerytabletest.h" #include "converter/convertertest.h" @@ -72,12 +72,12 @@ class MyProgressListener : public CppUnit::TextTestProgressListener { void startTest(CppUnit::Test *test) { - QString name = test->getName().c_str(); - if(name.find('.') != -1) { // in CPPUNIT 1.8.0 + TQString name = test->getName().c_str(); + if(name.tqfind('.') != -1) { // in CPPUNIT 1.8.0 name = name.mid(2); // cut off first 2 chars - name = name.left(name.find('.')); - } else if(name.find("::") != -1) { // in CPPUNIT 1.9.14 - name = name.left(name.find("::")); + name = name.left(name.tqfind('.')); + } else if(name.tqfind("::") != -1) { // in CPPUNIT 1.9.14 + name = name.left(name.tqfind("::")); } if(m_name != name) { if(m_name != "") @@ -87,7 +87,7 @@ class MyProgressListener : public CppUnit::TextTestProgressListener } } private: - QString m_name; + TQString m_name; }; void unexpectedException(MyMoneyException *e) diff --git a/kmymoney2/kmymoneyutils.cpp b/kmymoney2/kmymoneyutils.cpp index 83cf113..fdff861 100644 --- a/kmymoney2/kmymoneyutils.cpp +++ b/kmymoney2/kmymoneyutils.cpp @@ -51,15 +51,15 @@ KMyMoneyUtils::~KMyMoneyUtils() { } -const QString KMyMoneyUtils::accountTypeToString(const MyMoneyAccount::accountTypeE accountType) +const TQString KMyMoneyUtils::accountTypeToString(const MyMoneyAccount::accountTypeE accountType) { return MyMoneyAccount::accountTypeToString(accountType); } -MyMoneyAccount::accountTypeE KMyMoneyUtils::stringToAccountType(const QString& type) +MyMoneyAccount::accountTypeE KMyMoneyUtils::stringToAccountType(const TQString& type) { MyMoneyAccount::accountTypeE rc = MyMoneyAccount::UnknownAccountType; - QString tmp = type.lower(); + TQString tmp = type.lower(); if(tmp == i18n("Checking").lower()) rc = MyMoneyAccount::Checkings; @@ -97,10 +97,10 @@ MyMoneyAccount::accountTypeE KMyMoneyUtils::stringToAccountType(const QString& t return rc; } -MyMoneySecurity::eSECURITYTYPE KMyMoneyUtils::stringToSecurity(const QString& txt) +MyMoneySecurity::eSECURITYTYPE KMyMoneyUtils::stringToSecurity(const TQString& txt) { MyMoneySecurity::eSECURITYTYPE rc = MyMoneySecurity::SECURITY_NONE; - QString tmp = txt.lower(); + TQString tmp = txt.lower(); if(tmp == i18n("Stock").lower()) rc = MyMoneySecurity::SECURITY_STOCK; @@ -114,27 +114,27 @@ MyMoneySecurity::eSECURITYTYPE KMyMoneyUtils::stringToSecurity(const QString& tx return rc; } -const QString KMyMoneyUtils::securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType) +const TQString KMyMoneyUtils::securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType) { return i18n(MyMoneySecurity::securityTypeToString(securityType)); } -const QString KMyMoneyUtils::occurenceToString(const MyMoneySchedule::occurenceE occurence) +const TQString KMyMoneyUtils::occurenceToString(const MyMoneySchedule::occurenceE occurence) { return i18n(MyMoneySchedule::occurenceToString(occurence)); } -const QString KMyMoneyUtils::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType) +const TQString KMyMoneyUtils::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType) { return i18n(MyMoneySchedule::paymentMethodToString(paymentType)); } -const QString KMyMoneyUtils::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption) +const TQString KMyMoneyUtils::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption) { return i18n(MyMoneySchedule::weekendOptionToString(weekendOption)); } -const QString KMyMoneyUtils::scheduleTypeToString(MyMoneySchedule::typeE type) +const TQString KMyMoneyUtils::scheduleTypeToString(MyMoneySchedule::typeE type) { return i18n(MyMoneySchedule::scheduleTypeToString(type)); } @@ -144,7 +144,7 @@ KGuiItem KMyMoneyUtils::scheduleNewGuiItem(void) KIconLoader *ic = KGlobal::iconLoader(); KGuiItem splitGuiItem( i18n("&New Schedule..."), - QIconSet(ic->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(ic->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new schedule."), i18n("Use this to create a new schedule.")); @@ -156,32 +156,32 @@ KGuiItem KMyMoneyUtils::accountsFilterGuiItem(void) KIconLoader *ic = KGlobal::iconLoader(); KGuiItem splitGuiItem( i18n("&Filter"), - QIconSet(ic->loadIcon("filter", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(ic->loadIcon("filter", KIcon::Small, KIcon::SizeSmall)), i18n("Filter out accounts"), i18n("Use this to filter out accounts")); return splitGuiItem; } -QPixmap KMyMoneyUtils::billScheduleIcon(int size) +TQPixmap KMyMoneyUtils::billScheduleIcon(int size) { KIconLoader *ic = KGlobal::iconLoader(); return ic->loadIcon("billschedule", KIcon::User, size); } -QPixmap KMyMoneyUtils::depositScheduleIcon(int size) +TQPixmap KMyMoneyUtils::depositScheduleIcon(int size) { KIconLoader *ic = KGlobal::iconLoader(); return ic->loadIcon("depositschedule", KIcon::User, size); } -QPixmap KMyMoneyUtils::transferScheduleIcon(int size) +TQPixmap KMyMoneyUtils::transferScheduleIcon(int size) { KIconLoader *ic = KGlobal::iconLoader(); return ic->loadIcon("transferschedule", KIcon::User, size); } -QPixmap KMyMoneyUtils::scheduleIcon(int size) +TQPixmap KMyMoneyUtils::scheduleIcon(int size) { KIconLoader *ic = KGlobal::iconLoader(); return ic->loadIcon("schedule", KIcon::User, size); @@ -202,16 +202,16 @@ const char* homePageItems[] = { 0 }; -const QString KMyMoneyUtils::homePageItemToString(const int idx) +const TQString KMyMoneyUtils::homePageItemToString(const int idx) { - QString rc; + TQString rc; if(abs(idx) > 0 && abs(idx) < static_cast<int>(sizeof(homePageItems)/sizeof(homePageItems[0]))) { rc = i18n(homePageItems[abs(idx-1)]); } return rc; } -int KMyMoneyUtils::stringToHomePageItem(const QString& txt) +int KMyMoneyUtils::stringToHomePageItem(const TQString& txt) { int idx = 0; for(idx = 0; homePageItems[idx] != 0; ++idx) { @@ -221,20 +221,20 @@ int KMyMoneyUtils::stringToHomePageItem(const QString& txt) return 0; } -bool KMyMoneyUtils::appendCorrectFileExt(QString& str, const QString& strExtToUse) +bool KMyMoneyUtils::appendCorrectFileExt(TQString& str, const TQString& strExtToUse) { bool rc = false; if(!str.isEmpty()) { //find last . delminator - int nLoc = str.findRev('.'); + int nLoc = str.tqfindRev('.'); if(nLoc != -1) { - QString strExt, strTemp; + TQString strExt, strTemp; strTemp = str.left(nLoc + 1); strExt = str.right(str.length() - (nLoc + 1)); - if(strExt.find(strExtToUse, 0, FALSE) == -1) { + if(strExt.tqfind(strExtToUse, 0, FALSE) == -1) { // if the extension given contains a period, we remove our's - if(strExtToUse.find('.') != -1) + if(strExtToUse.tqfind('.') != -1) strTemp = strTemp.left(strTemp.length()-1); //append extension to make complete file name strTemp.append(strExtToUse); @@ -259,45 +259,45 @@ void KMyMoneyUtils::checkConstants(void) Q_ASSERT(static_cast<int>(KLocale::AfterMoney) == static_cast<int>(MyMoneyMoney::AfterMoney)); } -QString KMyMoneyUtils::variableCSS(void) +TQString KMyMoneyUtils::variableCSS(void) { - QColor tcolor = KGlobalSettings::textColor(); + TQColor tcolor = KGlobalSettings::textColor(); - QString css; + TQString css; css += "<style type=\"text/css\">\n<!--\n"; - css += QString(".row-even, .item0 { background-color: %1; color: %2 }\n") - .arg((KMyMoneyGlobalSettings::listBGColor()).name()).arg(tcolor.name()); - css += QString(".row-odd, .item1 { background-color: %1; color: %2 }\n") - .arg((KMyMoneyGlobalSettings::listColor()).name()).arg(tcolor.name()); + css += TQString(".row-even, .item0 { background-color: %1; color: %2 }\n") + .tqarg((KMyMoneyGlobalSettings::listBGColor()).name()).tqarg(tcolor.name()); + css += TQString(".row-odd, .item1 { background-color: %1; color: %2 }\n") + .tqarg((KMyMoneyGlobalSettings::listColor()).name()).tqarg(tcolor.name()); css += "-->\n</style>\n"; return css; } -QString KMyMoneyUtils::findResource(const char* type, const QString& filename) +TQString KMyMoneyUtils::findResource(const char* type, const TQString& filename) { - QString language = KGlobal::locale()->language(); - QString country = KGlobal::locale()->country(); - QString rc, mask; + TQString language = KGlobal::locale()->language(); + TQString country = KGlobal::locale()->country(); + TQString rc, tqmask; // check that the placeholder is present - if(!filename.find("%1")) { + if(!filename.tqfind("%1")) { qWarning("%%1 not found in '%s'", filename.latin1()); return filename; } // search the given resource - mask = filename.arg("_%1.%2"); - rc = KGlobal::dirs()->findResource(type, mask.arg(country).arg(language)); + tqmask = filename.tqarg("_%1.%2"); + rc = KGlobal::dirs()->findResource(type, tqmask.tqarg(country).tqarg(language)); if(rc.isEmpty()) { - mask = filename.arg("_%1"); - rc = KGlobal::dirs()->findResource(type, mask.arg(language)); + tqmask = filename.tqarg("_%1"); + rc = KGlobal::dirs()->findResource(type, tqmask.tqarg(language)); } if(rc.isEmpty()) { - // qDebug(QString("html/home_%1.html not found").arg(country).latin1()); - rc = KGlobal::dirs()->findResource(type, mask.arg(country)); + // qDebug(TQString("html/home_%1.html not found").tqarg(country).latin1()); + rc = KGlobal::dirs()->findResource(type, tqmask.tqarg(country)); } if(rc.isEmpty()) { - rc = KGlobal::dirs()->findResource(type, filename.arg("")); + rc = KGlobal::dirs()->findResource(type, filename.tqarg("")); } if(rc.isEmpty()) { @@ -308,7 +308,7 @@ QString KMyMoneyUtils::findResource(const char* type, const QString& filename) const MyMoneySplit KMyMoneyUtils::stockSplit(const MyMoneyTransaction& t) { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; MyMoneySplit investmentAccountSplit; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if(!(*it_s).accountId().isEmpty()) { @@ -341,7 +341,7 @@ KMyMoneyUtils::transactionTypeE KMyMoneyUtils::transactionType(const MyMoneyTran // FIXME check for loan transaction here return SplitTransaction; } - QString ida, idb; + TQString ida, idb; ida = t.splits()[0].accountId(); idb = t.splits()[1].accountId(); if(ida.isEmpty() || idb.isEmpty()) @@ -358,7 +358,7 @@ KMyMoneyUtils::transactionTypeE KMyMoneyUtils::transactionType(const MyMoneyTran return Normal; } -void KMyMoneyUtils::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const QMap<QString, MyMoneyMoney>& balances) +void KMyMoneyUtils::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const TQMap<TQString, MyMoneyMoney>& balances) { try { MyMoneyForecast::calculateAutoLoan(schedule, transaction, balances); @@ -368,22 +368,22 @@ void KMyMoneyUtils::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTr } } -QString KMyMoneyUtils::nextCheckNumber(const MyMoneyAccount& acc) +TQString KMyMoneyUtils::nextCheckNumber(const MyMoneyAccount& acc) { // determine next check number - QString number; - QRegExp exp(QString("(.*\\D)?(\\d+)(\\D.*)?")); + TQString number; + TQRegExp exp(TQString("(.*\\D)?(\\d+)(\\D.*)?")); if(exp.search(acc.value("lastNumberUsed")) != -1) { - number = QString("%1%2%3").arg(exp.cap(1)).arg(exp.cap(2).toULongLong() + 1).arg(exp.cap(3)); + number = TQString("%1%2%3").tqarg(exp.cap(1)).tqarg(exp.cap(2).toULongLong() + 1).tqarg(exp.cap(3)); } else { number = "1"; } return number; } -QString KMyMoneyUtils::reconcileStateToString(MyMoneySplit::reconcileFlagE flag, bool text) +TQString KMyMoneyUtils::reconcileStateToString(MyMoneySplit::reconcileFlagE flag, bool text) { - QString txt; + TQString txt; if(text) { switch(flag) { case MyMoneySplit::NotReconciled: @@ -429,7 +429,7 @@ MyMoneyTransaction KMyMoneyUtils::scheduledTransaction(const MyMoneySchedule& sc try { if (schedule.type() == MyMoneySchedule::TYPE_LOANPAYMENT) { - calculateAutoLoan(schedule, t, QMap<QString, MyMoneyMoney>()); + calculateAutoLoan(schedule, t, TQMap<TQString, MyMoneyMoney>()); } } catch (MyMoneyException* e) { qDebug("Unable to load schedule details for '%s' during transaction match: %s", schedule.name().data(), e->what().data()); @@ -437,13 +437,13 @@ MyMoneyTransaction KMyMoneyUtils::scheduledTransaction(const MyMoneySchedule& sc } t.clearId(); - t.setEntryDate(QDate()); + t.setEntryDate(TQDate()); return t; } -void KMyMoneyUtils::previouslyUsedCategories(const QString& investmentAccount, QString& feesId, QString& interestId) +void KMyMoneyUtils::previouslyUsedCategories(const TQString& investmentAccount, TQString& feesId, TQString& interestId) { - feesId = interestId = QString(); + feesId = interestId = TQString(); MyMoneyFile* file = MyMoneyFile::instance(); try { MyMoneyAccount acc = file->account(investmentAccount); @@ -451,15 +451,15 @@ void KMyMoneyUtils::previouslyUsedCategories(const QString& investmentAccount, Q filter.setReportAllSplits(false); // since we assume an investment account here, we need to collect the stock accounts as well filter.addAccount(acc.accountList()); - QValueList< QPair<MyMoneyTransaction, MyMoneySplit> > list; + TQValueList< TQPair<MyMoneyTransaction, MyMoneySplit> > list; file->transactionList(list, filter); - QValueList< QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it_t; + TQValueList< TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it_t; for(it_t = list.begin(); it_t != list.end(); ++it_t) { const MyMoneyTransaction& t = (*it_t).first; const MyMoneySplit&s = (*it_t).second; MyMoneySplit assetAccountSplit; - QValueList<MyMoneySplit> feeSplits; - QValueList<MyMoneySplit> interestSplits; + TQValueList<MyMoneySplit> feeSplits; + TQValueList<MyMoneySplit> interestSplits; MyMoneySecurity security; MyMoneySecurity currency; MyMoneySplit::investTransactionTypeE transactionType; diff --git a/kmymoney2/kmymoneyutils.h b/kmymoney2/kmymoneyutils.h index 8acb5c4..c6054e5 100644 --- a/kmymoney2/kmymoneyutils.h +++ b/kmymoney2/kmymoneyutils.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> // ---------------------------------------------------------------------------- // KDE Headers @@ -50,11 +50,11 @@ class KMyMoneyUtils { public: /** - * This enum is used to describe the bits of an account type filter mask. + * This enum is used to describe the bits of an account type filter tqmask. * Each bit is used to define a specific account class. Multiple classes * can be specified by OR'ing multiple entries. The special entry @p last - * marks the left most bit in the mask and is used by scanners of this - * bitmask to determine the end of processing. + * marks the left most bit in the tqmask and is used by scanners of this + * bittqmask to determine the end of processing. */ enum categoryTypeE { none = 0x00, ///< no account class selected @@ -63,7 +63,7 @@ public: expense = 0x04, ///< expense accounts selected income = 0x08, ///< income accounts selected equity = 0x10, ///< equity accounts selected - last = 0x20 ///< the leftmost bit in the mask + last = 0x20 ///< the leftmost bit in the tqmask }; enum transactionTypeE { @@ -126,31 +126,31 @@ public: * * @param accountType numerical representation of the account type. * For possible values, see MyMoneyAccount::accountTypeE - * @return QString representing the human readable form translated according to the language cataglogue + * @return TQString representing the human readable form translated according to the language cataglogue * * @sa MyMoneyAccount::accountTypeToString() */ - static const QString accountTypeToString(const MyMoneyAccount::accountTypeE accountType); + static const TQString accountTypeToString(const MyMoneyAccount::accountTypeE accountType); /** * This method is used to convert an account type from it's * string form to the internal used numeric value. * - * @param type reference to a QString containing the string to convert + * @param type reference to a TQString containing the string to convert * @return accountTypeE containing the internal used numeric value. For possible * values see MyMoneyAccount::accountTypeE */ - static MyMoneyAccount::accountTypeE stringToAccountType(const QString& type); + static MyMoneyAccount::accountTypeE stringToAccountType(const TQString& type); /** * This method is used to convert a security type from it's * string form to the internal used numeric value. * - * @param txt reference to a QString containing the string to convert + * @param txt reference to a TQString containing the string to convert * @return eSECURITYTYPE containing the internal used numeric value. For possible * values see MyMoneySecurity::eSECURITYTYPE */ - static MyMoneySecurity::eSECURITYTYPE stringToSecurity(const QString& txt); + static MyMoneySecurity::eSECURITYTYPE stringToSecurity(const TQString& txt); /** * This method is used to convert the internal representation of @@ -158,11 +158,11 @@ public: * * @param securityType enumerated representation of the security type. * For possible values, see MyMoneySecurity::eSECURITYTYPE - * @return QString representing the human readable form translated according to the language cataglogue + * @return TQString representing the human readable form translated according to the language cataglogue * * @sa MyMoneySecurity::securityTypeToString() */ - static const QString securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType); + static const TQString securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType); /** * This method is used to convert the occurence type from it's @@ -171,13 +171,13 @@ public: * @param occurence numerical representation of the MyMoneySchedule * occurence type * - * @return QString representing the human readable format translated according to the language cataglogue + * @return TQString representing the human readable format translated according to the language cataglogue * * @sa MyMoneySchedule::occurenceToString() * * @deprecated Use i18n(MyMoneySchedule::occurenceToString(occurence)) instead */ - static const QString occurenceToString(const MyMoneySchedule::occurenceE occurence); + static const TQString occurenceToString(const MyMoneySchedule::occurenceE occurence); /** * This method is used to convert the payment type from it's @@ -186,11 +186,11 @@ public: * @param paymentType numerical representation of the MyMoneySchedule * payment type * - * @return QString representing the human readable format translated according to the language cataglogue + * @return TQString representing the human readable format translated according to the language cataglogue * * @sa MyMoneySchedule::paymentMethodToString() */ - static const QString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); + static const TQString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); /** * This method is used to convert the schedule weekend option from it's @@ -199,11 +199,11 @@ public: * @param weekendOption numerical representation of the MyMoneySchedule * weekend option * - * @return QString representing the human readable format translated according to the language cataglogue + * @return TQString representing the human readable format translated according to the language cataglogue * * @sa MyMoneySchedule::weekendOptionToString() */ - static const QString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); + static const TQString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); /** * This method is used to convert the schedule type from it's @@ -212,11 +212,11 @@ public: * @param type numerical representation of the MyMoneySchedule * schedule type * - * @return QString representing the human readable format translated according to the language cataglogue + * @return TQString representing the human readable format translated according to the language cataglogue * * @sa MyMoneySchedule::scheduleTypeToString() */ - static const QString scheduleTypeToString(MyMoneySchedule::typeE type); + static const TQString scheduleTypeToString(MyMoneySchedule::typeE type); /** * This method is used to convert a numeric index of an item @@ -224,20 +224,20 @@ public: * * @param idx numeric index of item * - * @return QString with text of this item + * @return TQString with text of this item */ - static const QString homePageItemToString(const int idx); + static const TQString homePageItemToString(const int idx); /** * This method is used to convert the name of a home page item * to it's internal numerical representation * - * @param txt QString reference of the items name + * @param txt TQString reference of the items name * * @retval 0 @p txt is unknown * @retval >0 numeric value for @p txt */ - static int stringToHomePageItem(const QString& txt); + static int stringToHomePageItem(const TQString& txt); /** * Retrieve a KDE KGuiItem for the new schedule button. @@ -264,12 +264,12 @@ public: * @retval true if @p name was changed * @retval false if @p name remained unchanged */ - static bool appendCorrectFileExt(QString& name, const QString& extension); + static bool appendCorrectFileExt(TQString& name, const TQString& extension); - static QPixmap billScheduleIcon(int size); - static QPixmap depositScheduleIcon(int size); - static QPixmap transferScheduleIcon(int size); - static QPixmap scheduleIcon(int size); + static TQPixmap billScheduleIcon(int size); + static TQPixmap depositScheduleIcon(int size); + static TQPixmap transferScheduleIcon(int size); + static TQPixmap scheduleIcon(int size); /** * Check that internal MyMoney engine constants use the same @@ -277,7 +277,7 @@ public: */ static void checkConstants(void); - static QString variableCSS(void); + static TQString variableCSS(void); /** * This method searches a KDE specific resource and applies country and @@ -298,7 +298,7 @@ public: * @code * * : - * QString fname = KMyMoneyUtils::findResource("appdata", "html/home%1.html") + * TQString fname = KMyMoneyUtils::findResource("appdata", "html/home%1.html") * : * * @endcode @@ -313,7 +313,7 @@ public: * * @note See KStandardDirs::findResource() for details on the parameters */ - static QString findResource(const char* type, const QString& filename); + static TQString findResource(const char* type, const TQString& filename); /** * This method returns the split referencing a stock account if @@ -343,22 +343,22 @@ public: * * @param schedule const reference to the schedule the transaction is based on * @param transaction reference to the transaction to be checked and modified - * @param balances QMap of (account-id,balance) pairs to be used as current balance + * @param balances TQMap of (account-id,balance) pairs to be used as current balance * for the calculation of interest. If map is empty, the engine * will be interrogated for current balances. */ - static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const QMap<QString, MyMoneyMoney>& balances); + static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const TQMap<TQString, MyMoneyMoney>& balances); /** * Return next check number for account @a acc. */ - static QString nextCheckNumber(const MyMoneyAccount& acc); + static TQString nextCheckNumber(const MyMoneyAccount& acc); /** * Returns the text representing the reconcile flag. If @a text is @p true * then the full text will be returned otherwise a short form (usually one character). */ - static QString reconcileStateToString(MyMoneySplit::reconcileFlagE flag, bool text = false); + static TQString reconcileStateToString(MyMoneySplit::reconcileFlagE flag, bool text = false); /** * Returns the transaction for @a schedule. In case of a loan payment the @@ -375,7 +375,7 @@ public: * ids of those categories in @a feesId and @a interestId. The last used category * will be returned. */ - static void previouslyUsedCategories(const QString& investmentAccount, QString& feesId, QString& interestId); + static void previouslyUsedCategories(const TQString& investmentAccount, TQString& feesId, TQString& interestId); }; diff --git a/kmymoney2/kstartuplogo.cpp b/kmymoney2/kstartuplogo.cpp index 566f8ad..a0d8ac6 100644 --- a/kmymoney2/kstartuplogo.cpp +++ b/kmymoney2/kstartuplogo.cpp @@ -19,10 +19,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> -#include <qpixmap.h> -#include <qframe.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqpixmap.h> +#include <tqframe.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,12 +41,12 @@ class KStartupSplash::Private { public: - QString message; - QColor color; + TQString message; + TQColor color; int align; }; -KStartupSplash::KStartupSplash(const QPixmap &pixmap, WFlags f) : +KStartupSplash::KStartupSplash(const TQPixmap &pixmap, WFlags f) : KSplashScreen(pixmap, f), d(new Private) { @@ -57,39 +57,39 @@ KStartupSplash::~KStartupSplash() delete d; } -void KStartupSplash::message( const QString &message, int alignment, const QColor &color) +void KStartupSplash::message( const TQString &message, int tqalignment, const TQColor &color) { d->message = message; - d->align = alignment; + d->align = tqalignment; d->color = color; // the next line causes the base class signal management to happen - // and also forces a repaint + // and also forces a tqrepaint KSplashScreen::clear(); } -void KStartupSplash::drawContents( QPainter *painter ) +void KStartupSplash::drawContents( TQPainter *painter ) { painter->setPen( d->color ); - QRect r = rect(); + TQRect r = rect(); r.setRect( r.x() + 15, r.y() + r.height() - 28, r.width() - 20, 20 ); painter->drawText( r, d->align, d->message); } KStartupLogo::KStartupLogo() : - QObject(0, 0), + TQObject(0, 0), m_splash(0) { // splash screen setting if(!KMyMoneyGlobalSettings::showSplash()) return; - QString filename = KGlobal::dirs()->findResource("appdata", "pics/startlogo.png"); - QPixmap splashPixmap(filename); + TQString filename = KGlobal::dirs()->findResource("appdata", "pics/startlogo.png"); + TQPixmap splashPixmap(filename); if(!splashPixmap.isNull()) { - QPixmap backGround(splashPixmap); + TQPixmap backGround(splashPixmap); backGround.fill(KGlobalSettings::highlightColor()); - bitBlt ( &backGround, 0, 0, &splashPixmap, 0, 0, splashPixmap.width(), splashPixmap.height(), Qt::CopyROP ); + bitBlt ( &backGround, 0, 0, &splashPixmap, 0, 0, splashPixmap.width(), splashPixmap.height(), TQt::CopyROP ); KStartupSplash* splash = new KStartupSplash(backGround); splash->setFixedSize(backGround.size()); @@ -100,7 +100,7 @@ KStartupLogo::KStartupLogo() : splash->message(i18n("Loading..."), AlignLeft, white); splash->show(); - splash->repaint(); + splash->tqrepaint(); m_splash = splash; } } diff --git a/kmymoney2/kstartuplogo.h b/kmymoney2/kstartuplogo.h index 2d3b305..0f340f9 100644 --- a/kmymoney2/kstartuplogo.h +++ b/kmymoney2/kstartuplogo.h @@ -20,8 +20,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qguardedptr.h> +#include <tqwidget.h> +#include <tqguardedptr.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,13 +34,14 @@ class KStartupSplash : public KSplashScreen { Q_OBJECT + TQ_OBJECT public: - KStartupSplash(const QPixmap &pixmap, WFlags f = 0); + KStartupSplash(const TQPixmap &pixmap, WFlags f = 0); ~KStartupSplash(); - void message( const QString &message, int alignment = AlignLeft, const QColor &color = black); + void message( const TQString &message, int tqalignment = AlignLeft, const TQColor &color = black); protected: - void drawContents(QPainter *p); + void drawContents(TQPainter *p); private: class Private; @@ -48,15 +49,16 @@ class KStartupSplash : public KSplashScreen }; // Simple class that just shows a picture -class KStartupLogo : public QObject +class KStartupLogo : public TQObject { Q_OBJECT + TQ_OBJECT public: KStartupLogo(); ~KStartupLogo(); private: - QGuardedPtr<QWidget> m_splash; + TQGuardedPtr<TQWidget> m_splash; }; #endif diff --git a/kmymoney2/main.cpp b/kmymoney2/main.cpp index 008210d..79d731c 100644 --- a/kmymoney2/main.cpp +++ b/kmymoney2/main.cpp @@ -23,10 +23,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidgetlist.h> -#include <qdatetime.h> -#include <qstringlist.h> -#include <qeventloop.h> +#include <tqwidgetlist.h> +#include <tqdatetime.h> +#include <tqstringlist.h> +#include <tqeventloop.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -67,7 +67,7 @@ static KCmdLineOptions options[] = KCmdLineLastOption }; -QTime timer; +TQTime timer; bool timersOn = false; KMyMoney2App* kmymoney2; @@ -86,7 +86,7 @@ int main(int argc, char *argv[]) { timer.start(); - QString feature; + TQString feature; #ifdef _CHECK_MEMORY feature += "\t- " I18N_NOOP("Memory leakage detection") "\n"; @@ -152,7 +152,7 @@ int main(int argc, char *argv[]) MyMoneyMoney::setNegativePrefixCurrencySymbol(KGlobal::locale()->negativePrefixCurrencySymbol()); MyMoneyMoney::setPositivePrefixCurrencySymbol(KGlobal::locale()->positivePrefixCurrencySymbol()); - QCString language = args->getOption("lang"); + TQCString language = args->getOption("lang"); if(!language.isEmpty()) { if(!KGlobal::locale()->setLanguage(language)) { qWarning("Unable to select language '%s'. This has one of two reasons:\n\ta) the standard KDE message catalogue is not installed\n\tb) the KMyMoney message catalogue is not installed", language.data()); @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) // Before we delete the application, we make sure that we destroy all // widgets by running the event loop for some time to catch all those // widgets that are requested to be destroyed using the deleteLater() method. - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); delete kmymoney2; delete splash; @@ -204,20 +204,20 @@ int main(int argc, char *argv[]) if ( kmymoney2->isImportableFile( url.path() ) ) { // if there are multiple instances, we'll send this to the first one - QCString primary = instances[0]; + TQCString primary = instances[0]; // send a message to the primary client to import this file - QByteArray data; - QDataStream arg(data, IO_WriteOnly); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); arg << url.path(); arg << kapp->startupId(); - if (!client->send(primary, "kmymoney2app", "webConnect(QString,QCString)",data)) + if (!client->send(primary, "kmymoney2app", "webConnect(TQString,TQCString)",data)) qDebug("Unable to launch WebConnect via DCOP."); // Before we delete the application, we make sure that we destroy all // widgets by running the event loop for some time to catch all those // widgets that are requested to be destroyed using the deleteLater() method. - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); delete kmymoney2; delete splash; @@ -242,9 +242,9 @@ int main(int argc, char *argv[]) delete splash; // force complete paint of widgets - qApp->processEvents(); + tqApp->processEvents(); - QString importfile; + TQString importfile; KURL url; // make sure, we take the file provided on the command // line before we go and open the last one used @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) } while(0); } catch(MyMoneyException *e) { KMessageBox::detailedError(0, i18n("Uncaught error. Please report the details to the developers"), - QString("%1 in file %2 line %3").arg(e->what()).arg(e->file()).arg(e->line())); + TQString("%1 in file %2 line %3").tqarg(e->what()).tqarg(e->file()).tqarg(e->line())); throw e; } diff --git a/kmymoney2/mymoney/mymoneyaccount.cpp b/kmymoney2/mymoney/mymoneyaccount.cpp index 8c304cd..d0d98d1 100644 --- a/kmymoney2/mymoney/mymoneyaccount.cpp +++ b/kmymoney2/mymoney/mymoneyaccount.cpp @@ -19,7 +19,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> +#include <tqregexp.h> #include <kstandarddirs.h> #include <kiconloader.h> @@ -45,14 +45,14 @@ MyMoneyAccount::~MyMoneyAccount() { } -MyMoneyAccount::MyMoneyAccount(const QString& id, const MyMoneyAccount& right) : +MyMoneyAccount::MyMoneyAccount(const TQString& id, const MyMoneyAccount& right) : MyMoneyObject(id) { *this = right; setId(id); } -MyMoneyAccount::MyMoneyAccount(const QDomElement& node) : +MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) : MyMoneyObject(node), MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()), m_fraction(-1) @@ -64,9 +64,9 @@ MyMoneyAccount::MyMoneyAccount(const QDomElement& node) : // qDebug("Reading information for account %s", acc.name().data()); - setParentAccountId(QStringEmpty(node.attribute("parentaccount"))); - setLastModified(stringToDate(QStringEmpty(node.attribute("lastmodified")))); - setLastReconciliationDate(stringToDate(QStringEmpty(node.attribute("lastreconciled")))); + setParentAccountId(TQStringEmpty(node.attribute("tqparentaccount"))); + setLastModified(stringToDate(TQStringEmpty(node.attribute("lastmodified")))); + setLastReconciliationDate(stringToDate(TQStringEmpty(node.attribute("lastreconciled")))); if(!m_lastReconciliationDate.isValid()) { // for some reason, I was unable to access our own kvp at this point through @@ -76,18 +76,18 @@ MyMoneyAccount::MyMoneyAccount(const QDomElement& node) : // // Since we want to get rid of the lastStatementDate record anyway, this seems // to be ok for now. (ipwizard - 2008-08-14) - QString txt = MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()).value("lastStatementDate"); + TQString txt = MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()).value("lastStatementDate"); if(!txt.isEmpty()) { - setLastReconciliationDate(QDate::fromString(txt, Qt::ISODate)); + setLastReconciliationDate(TQDate::fromString(txt, Qt::ISODate)); } } - setInstitutionId(QStringEmpty(node.attribute("institution"))); - setNumber(QStringEmpty(node.attribute("number"))); - setOpeningDate(stringToDate(QStringEmpty(node.attribute("opened")))); - setCurrencyId(QStringEmpty(node.attribute("currency"))); + setInstitutionId(TQStringEmpty(node.attribute("institution"))); + setNumber(TQStringEmpty(node.attribute("number"))); + setOpeningDate(stringToDate(TQStringEmpty(node.attribute("opened")))); + setCurrencyId(TQStringEmpty(node.attribute("currency"))); - QString tmp = QStringEmpty(node.attribute("type")); + TQString tmp = TQStringEmpty(node.attribute("type")); bool bOK = false; int type = tmp.toInt(&bOK); if(bOK) { @@ -98,67 +98,67 @@ MyMoneyAccount::MyMoneyAccount(const QDomElement& node) : if(node.hasAttribute("openingbalance")) { if(!MyMoneyMoney(node.attribute("openingbalance")).isZero()) { - QString msg = i18n("Account %1 contains an opening balance. Please use a KMyMoney version >= 0.8 and < 0.9 to correct the problem.").arg(m_name); + TQString msg = i18n("Account %1 contains an opening balance. Please use a KMyMoney version >= 0.8 and < 0.9 to correct the problem.").tqarg(m_name); throw new MYMONEYEXCEPTION(msg); } } setDescription(node.attribute("description")); - m_id = QStringEmpty(node.attribute("id")); - // qDebug("Account %s has id of %s, type of %d, parent is %s.", acc.name().data(), id.data(), type, acc.parentAccountId().data()); + m_id = TQStringEmpty(node.attribute("id")); + // qDebug("Account %s has id of %s, type of %d, tqparent is %s.", acc.name().data(), id.data(), type, acc.tqparentAccountId().data()); // Process any Sub-Account information found inside the account entry. m_accountList.clear(); - QDomNodeList nodeList = node.elementsByTagName("SUBACCOUNTS"); + TQDomNodeList nodeList = node.elementsByTagName("SUBACCOUNTS"); if(nodeList.count() > 0) { nodeList = nodeList.item(0).toElement().elementsByTagName("SUBACCOUNT"); for(unsigned int i = 0; i < nodeList.count(); ++i) { - addAccountId(QString(nodeList.item(i).toElement().attribute("id"))); + addAccountId(TQString(nodeList.item(i).toElement().attribute("id"))); } } nodeList = node.elementsByTagName("ONLINEBANKING"); if(nodeList.count() > 0) { - QDomNamedNodeMap attributes = nodeList.item(0).toElement().attributes(); + TQDomNamedNodeMap attributes = nodeList.item(0).toElement().attributes(); for(unsigned int i = 0; i < attributes.count(); ++i) { - const QDomAttr& it_attr = attributes.item(i).toAttr(); + const TQDomAttr& it_attr = attributes.item(i).toAttr(); m_onlineBankingSettings.setValue(it_attr.name().utf8(), it_attr.value()); } } } -void MyMoneyAccount::setName(const QString& name) +void MyMoneyAccount::setName(const TQString& name) { m_name = name; } -void MyMoneyAccount::setNumber(const QString& number) +void MyMoneyAccount::setNumber(const TQString& number) { m_number = number; } -void MyMoneyAccount::setDescription(const QString& desc) +void MyMoneyAccount::setDescription(const TQString& desc) { m_description = desc; } -void MyMoneyAccount::setInstitutionId(const QString& id) +void MyMoneyAccount::setInstitutionId(const TQString& id) { m_institution = id; } -void MyMoneyAccount::setLastModified(const QDate& date) +void MyMoneyAccount::setLastModified(const TQDate& date) { m_lastModified = date; } -void MyMoneyAccount::setOpeningDate(const QDate& date) +void MyMoneyAccount::setOpeningDate(const TQDate& date) { m_openingDate = date; } -void MyMoneyAccount::setLastReconciliationDate(const QDate& date) +void MyMoneyAccount::setLastReconciliationDate(const TQDate& date) { // FIXME: for a limited time (maybe until we delivered 1.0) we // keep the last reconciliation date also in the KVP for backward @@ -168,9 +168,9 @@ void MyMoneyAccount::setLastReconciliationDate(const QDate& date) m_lastReconciliationDate = date; } -void MyMoneyAccount::setParentAccountId(const QString& parent) +void MyMoneyAccount::setParentAccountId(const TQString& tqparent) { - m_parentAccount = parent; + m_parentAccount = tqparent; } void MyMoneyAccount::setAccountType(const accountTypeE type) @@ -178,9 +178,9 @@ void MyMoneyAccount::setAccountType(const accountTypeE type) m_accountType = type; } -void MyMoneyAccount::addAccountId(const QString& account) +void MyMoneyAccount::addAccountId(const TQString& account) { - if(!m_accountList.contains(account)) + if(!m_accountList.tqcontains(account)) m_accountList += account; } @@ -189,11 +189,11 @@ void MyMoneyAccount::removeAccountIds(void) m_accountList.clear(); } -void MyMoneyAccount::removeAccountId(const QString& account) +void MyMoneyAccount::removeAccountId(const TQString& account) { - QStringList::Iterator it; + TQStringList::Iterator it; - it = m_accountList.find(account); + it = m_accountList.tqfind(account); if(it != m_accountList.end()) m_accountList.remove(it); } @@ -243,7 +243,7 @@ MyMoneyAccount::accountTypeE MyMoneyAccount::accountGroup(void) const return accountGroup(m_accountType); } -void MyMoneyAccount::setCurrencyId(const QString& id) +void MyMoneyAccount::setCurrencyId(const TQString& id) { m_currencyId = id; } @@ -284,20 +284,20 @@ void MyMoneyAccountLoan::setLoanAmount(const MyMoneyMoney& amount) setValue("loan-amount", amount.toString()); } -const MyMoneyMoney MyMoneyAccountLoan::interestRate(const QDate& date) const +const MyMoneyMoney MyMoneyAccountLoan::interestRate(const TQDate& date) const { MyMoneyMoney rate; - QString key; - QString val; + TQString key; + TQString val; if(!date.isValid()) return rate; key.sprintf("ir-%04d-%02d-%02d", date.year(), date.month(), date.day()); - QRegExp regExp("ir-(\\d{4})-(\\d{2})-(\\d{2})"); + TQRegExp regExp("ir-(\\d{4})-(\\d{2})-(\\d{2})"); - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for(it = pairs().begin(); it != pairs().end(); ++it) { if(regExp.search(it.key()) > -1) { @@ -317,19 +317,19 @@ const MyMoneyMoney MyMoneyAccountLoan::interestRate(const QDate& date) const return rate; } -void MyMoneyAccountLoan::setInterestRate(const QDate& date, const MyMoneyMoney& value) +void MyMoneyAccountLoan::setInterestRate(const TQDate& date, const MyMoneyMoney& value) { if(!date.isValid()) return; - QString key; + TQString key; key.sprintf("ir-%04d-%02d-%02d", date.year(), date.month(), date.day()); setValue(key, value.toString()); } MyMoneyAccountLoan::interestDueE MyMoneyAccountLoan::interestCalculation(void) const { - QString payTime(value("interest-calculation")); + TQString payTime(value("interest-calculation")); if(payTime == "paymentDue") return paymentDue; return paymentReceived; @@ -343,18 +343,18 @@ void MyMoneyAccountLoan::setInterestCalculation(const MyMoneyAccountLoan::intere setValue("interest-calculation", "paymentReceived"); } -const QDate MyMoneyAccountLoan::nextInterestChange(void) const +const TQDate MyMoneyAccountLoan::nextInterestChange(void) const { - QDate rc; + TQDate rc; - QRegExp regExp("(\\d{4})-(\\d{2})-(\\d{2})"); + TQRegExp regExp("(\\d{4})-(\\d{2})-(\\d{2})"); if(regExp.search(value("interest-nextchange")) != -1) { rc.setYMD(regExp.cap(1).toInt(), regExp.cap(2).toInt(), regExp.cap(3).toInt()); } return rc; } -void MyMoneyAccountLoan::setNextInterestChange(const QDate& date) +void MyMoneyAccountLoan::setNextInterestChange(const TQDate& date) { setValue("interest-nextchange", date.toString(Qt::ISODate)); } @@ -366,7 +366,7 @@ int MyMoneyAccountLoan::interestChangeFrequency(int* unit) const if(unit) *unit = 1; - QRegExp regExp("(\\d+)/(\\d{1})"); + TQRegExp regExp("(\\d+)/(\\d{1})"); if(regExp.search(value("interest-changefrequency")) != -1) { rc = regExp.cap(1).toInt(); if(unit != 0) { @@ -378,17 +378,17 @@ int MyMoneyAccountLoan::interestChangeFrequency(int* unit) const void MyMoneyAccountLoan::setInterestChangeFrequency(const int amount, const int unit) { - QString val; + TQString val; val.sprintf("%d/%d", amount, unit); setValue("interest-changeFrequency", val); } -const QString MyMoneyAccountLoan::schedule(void) const +const TQString MyMoneyAccountLoan::schedule(void) const { - return QString(value("schedule").latin1()); + return TQString(value("schedule").latin1()); } -void MyMoneyAccountLoan::setSchedule(const QString& sched) +void MyMoneyAccountLoan::setSchedule(const TQString& sched) { setValue("schedule", sched); } @@ -425,7 +425,7 @@ unsigned int MyMoneyAccountLoan::term(void) const void MyMoneyAccountLoan::setTerm(const unsigned int payments) { - setValue("term", QString::number(payments)); + setValue("term", TQString::number(payments)); } const MyMoneyMoney MyMoneyAccountLoan::periodicPayment(void) const @@ -438,27 +438,27 @@ void MyMoneyAccountLoan::setPeriodicPayment(const MyMoneyMoney& payment) setValue("periodic-payment", payment.toString()); } -const QString MyMoneyAccountLoan::payee(void) const +const TQString MyMoneyAccountLoan::payee(void) const { return value("payee"); } -void MyMoneyAccountLoan::setPayee(const QString& payee) +void MyMoneyAccountLoan::setPayee(const TQString& payee) { setValue("payee", payee); } -const QString MyMoneyAccountLoan::interestAccountId(void) const +const TQString MyMoneyAccountLoan::interestAccountId(void) const { - return QString(); + return TQString(); } -void MyMoneyAccountLoan::setInterestAccountId(const QString& /* id */) +void MyMoneyAccountLoan::setInterestAccountId(const TQString& /* id */) { } -bool MyMoneyAccountLoan::hasReferenceTo(const QString& id) const +bool MyMoneyAccountLoan::hasReferenceTo(const TQString& id) const { return MyMoneyAccount::hasReferenceTo(id) || (id == payee()) @@ -467,7 +467,7 @@ bool MyMoneyAccountLoan::hasReferenceTo(const QString& id) const void MyMoneyAccountLoan::setInterestCompounding(int frequency) { - setValue("compoundingFrequency", QString("%1").arg(frequency)); + setValue("compoundingFrequency", TQString("%1").tqarg(frequency)); } int MyMoneyAccountLoan::interestCompounding(void) const @@ -475,13 +475,13 @@ int MyMoneyAccountLoan::interestCompounding(void) const return value("compoundingFrequency").toInt(); } -void MyMoneyAccount::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyAccount::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("ACCOUNT"); + TQDomElement el = document.createElement("ACCOUNT"); writeBaseXML(document, el); - el.setAttribute("parentaccount", parentAccountId()); + el.setAttribute("tqparentaccount", tqparentAccountId()); el.setAttribute("lastreconciled", dateToString(lastReconciliationDate())); el.setAttribute("lastmodified", dateToString(lastModified())); el.setAttribute("institution", institutionId()); @@ -497,11 +497,11 @@ void MyMoneyAccount::writeXML(QDomDocument& document, QDomElement& parent) const //Add in subaccount information, if this account has subaccounts. if(accountCount()) { - QDomElement subAccounts = document.createElement("SUBACCOUNTS"); - QStringList::ConstIterator it; + TQDomElement subAccounts = document.createElement("SUBACCOUNTS"); + TQStringList::ConstIterator it; for(it = accountList().begin(); it != accountList().end(); ++it) { - QDomElement temp = document.createElement("SUBACCOUNT"); + TQDomElement temp = document.createElement("SUBACCOUNT"); temp.setAttribute("id", (*it)); subAccounts.appendChild(temp); } @@ -511,8 +511,8 @@ void MyMoneyAccount::writeXML(QDomDocument& document, QDomElement& parent) const // Write online banking settings if(m_onlineBankingSettings.pairs().count()) { - QDomElement onlinesettings = document.createElement("ONLINEBANKING"); - QMap<QString,QString>::const_iterator it_key = m_onlineBankingSettings.pairs().begin(); + TQDomElement onlinesettings = document.createElement("ONLINEBANKING"); + TQMap<TQString,TQString>::const_iterator it_key = m_onlineBankingSettings.pairs().begin(); while ( it_key != m_onlineBankingSettings.pairs().end() ) { onlinesettings.setAttribute(it_key.key(), it_key.data()); ++it_key; @@ -529,10 +529,10 @@ void MyMoneyAccount::writeXML(QDomDocument& document, QDomElement& parent) const //Add in Key-Value Pairs for accounts. MyMoneyKeyValueContainer::writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneyAccount::hasReferenceTo(const QString& id) const +bool MyMoneyAccount::hasReferenceTo(const TQString& id) const { return (id == m_institution) || (id == m_parentAccount) || (id == m_currencyId); } @@ -591,10 +591,10 @@ bool MyMoneyAccount::isCategory(void) const return m_accountType == Income || m_accountType == Expense; } -QString MyMoneyAccount::brokerageName(void) const +TQString MyMoneyAccount::brokerageName(void) const { if(m_accountType == Investment) - return QString("%1 (%2)").arg(m_name, i18n("Brokerage (suffix for account names)", "Brokerage")); + return TQString("%1 (%2)").tqarg(m_name, i18n("Brokerage (suffix for account names)", "Brokerage")); return m_name; } @@ -614,9 +614,9 @@ void MyMoneyAccount::adjustBalance(const MyMoneySplit& s, bool reverse) } -QPixmap MyMoneyAccount::accountPixmap(bool reconcileFlag, int size) const +TQPixmap MyMoneyAccount::accountPixmap(bool reconcileFlag, int size) const { - QString icon; + TQString icon; switch(accountType()) { default: if(accountGroup() == MyMoneyAccount::Asset) @@ -669,23 +669,23 @@ QPixmap MyMoneyAccount::accountPixmap(bool reconcileFlag, int size) const break; } - QPixmap result = DesktopIcon(icon, size); + TQPixmap result = DesktopIcon(icon, size); if(isClosed()) { - QPixmap ovly = DesktopIcon("account-types_closed", size); - bitBlt(&result, 0, 0, &ovly, 0, 0, ovly.width(), ovly.height(), Qt::CopyROP, false); + TQPixmap ovly = DesktopIcon("account-types_closed", size); + bitBlt(TQT_TQPAINTDEVICE(&result), 0, 0, TQT_TQPAINTDEVICE(&ovly), 0, 0, ovly.width(), ovly.height(), TQt::CopyROP, false); } else if(reconcileFlag) { - QPixmap ovly = DesktopIcon("account-types_reconcile.png", size); - bitBlt(&result, 0, 0, &ovly, 0, 0, ovly.width(), ovly.height(), Qt::CopyROP, false); + TQPixmap ovly = DesktopIcon("account-types_reconcile.png", size); + bitBlt(TQT_TQPAINTDEVICE(&result), 0, 0, TQT_TQPAINTDEVICE(&ovly), 0, 0, ovly.width(), ovly.height(), TQt::CopyROP, false); } else if(!onlineBankingSettings().value("provider").isEmpty()) { - QPixmap ovly = DesktopIcon("account-types_online.png", size); - bitBlt(&result, 0, 0, &ovly, 0, 0, ovly.width(), ovly.height(), Qt::CopyROP, false); + TQPixmap ovly = DesktopIcon("account-types_online.png", size); + bitBlt(TQT_TQPAINTDEVICE(&result), 0, 0, TQT_TQPAINTDEVICE(&ovly), 0, 0, ovly.width(), ovly.height(), TQt::CopyROP, false); } return result; } -QString MyMoneyAccount::accountTypeToString(const MyMoneyAccount::accountTypeE accountType) +TQString MyMoneyAccount::accountTypeToString(const MyMoneyAccount::accountTypeE accountType) { - QString returnString; + TQString returnString; switch (accountType) { case MyMoneyAccount::Checkings: diff --git a/kmymoney2/mymoney/mymoneyaccount.h b/kmymoney2/mymoney/mymoneyaccount.h index 333c500..30e1185 100644 --- a/kmymoney2/mymoney/mymoneyaccount.h +++ b/kmymoney2/mymoney/mymoneyaccount.h @@ -24,12 +24,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qdom.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqdom.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // Project Includes @@ -122,16 +122,16 @@ public: * @param id id assigned to the account * @param right account definition */ - MyMoneyAccount(const QString& id, const MyMoneyAccount& right); + MyMoneyAccount(const TQString& id, const MyMoneyAccount& right); /** * This is the constructor for an account that is described by a - * QDomElement (e.g. from a file). + * TQDomElement (e.g. from a file). * - * @param el const reference to the QDomElement from which to + * @param el const reference to the TQDomElement from which to * create the object */ - MyMoneyAccount(const QDomElement& el); + MyMoneyAccount(const TQDomElement& el); /** * This is the destructor for any MyMoneyAccount object @@ -182,66 +182,66 @@ public: /** * This method returns the id of the MyMoneyInstitution object this account * belongs to. - * @return id of MyMoneyInstitution object. QString() if it is + * @return id of MyMoneyInstitution object. TQString() if it is * an internal account * @see setInstitution */ - const QString& institutionId(void) const { return m_institution; } + const TQString& institutionId(void) const { return m_institution; } /** * This method returns the name of the account * @return name of account * @see setName() */ - const QString& name(void) const { return m_name; } + const TQString& name(void) const { return m_name; } /** * This method returns the number of the account at the institution * @return number of account at the institution * @see setNumber */ - const QString& number(void) const { return m_number; } + const TQString& number(void) const { return m_number; } /** * This method returns the descriptive text of the account. * @return description of account * @see setDescription */ - const QString& description(void) const { return m_description; } + const TQString& description(void) const { return m_description; } /** * This method returns the opening date of this account - * @return date of opening of this account as const QDate value + * @return date of opening of this account as const TQDate value * @see setOpeningDate() */ - const QDate& openingDate(void) const { return m_openingDate; } + const TQDate& openingDate(void) const { return m_openingDate; } /** * This method returns the date of the last reconciliation of this account - * @return date of last reconciliation as const QDate value + * @return date of last reconciliation as const TQDate value * @see setLastReconciliationDate */ - const QDate& lastReconciliationDate(void) const { return m_lastReconciliationDate; } + const TQDate& lastReconciliationDate(void) const { return m_lastReconciliationDate; } /** * This method returns the date the account was last modified - * @return date of last modification as const QDate value + * @return date of last modification as const TQDate value * @see setLastModified */ - const QDate& lastModified(void) const { return m_lastModified; } + const TQDate& lastModified(void) const { return m_lastModified; } /** - * This method is used to return the ID of the parent account - * @return QString with the ID of the parent of this account + * This method is used to return the ID of the tqparent account + * @return TQString with the ID of the tqparent of this account */ - const QString& parentAccountId(void) const { return m_parentAccount; }; + const TQString& tqparentAccountId(void) const { return m_parentAccount; }; /** * This method returns the list of the account id's of * subordinate accounts - * @return QStringList account ids + * @return TQStringList account ids */ - const QStringList& accountList(void) const { return m_accountList; }; + const TQStringList& accountList(void) const { return m_accountList; }; /** * This method returns the number of entries in the m_accountList @@ -251,16 +251,16 @@ public: /** * This method is used to add an account id as sub-ordinate account - * @param account const QString reference to account ID + * @param account const TQString reference to account ID */ - void addAccountId(const QString& account); + void addAccountId(const TQString& account); /** * This method is used to remove an account from the list of * sub-ordinate accounts. - * @param account const QString reference to account ID to be removed + * @param account const TQString reference to account ID to be removed */ - void removeAccountId(const QString& account); + void removeAccountId(const TQString& account); /** * This method is used to remove all accounts from the list of @@ -274,21 +274,21 @@ public: * @param date date of last modification * @see lastModified */ - void setLastModified(const QDate& date); + void setLastModified(const TQDate& date); /** * This method is used to set the name of the account * @param name name of the account * @see name */ - void setName(const QString& name); + void setName(const TQString& name); /** * This method is used to set the number of the account at the institution * @param number number of the account * @see number */ - void setNumber(const QString& number); + void setNumber(const TQString& number); /** * This method is used to set the descriptive text of the account @@ -296,7 +296,7 @@ public: * @param desc text that serves as description * @see setDescription */ - void setDescription(const QString& desc); + void setDescription(const TQString& desc); /** * This method is used to set the id of the institution this account @@ -305,24 +305,24 @@ public: * @param id id of the institution this account belongs to * @see institution */ - void setInstitutionId(const QString& id); + void setInstitutionId(const TQString& id); /** * This method is used to set the opening date information of an * account. * - * @param date QDate of opening date + * @param date TQDate of opening date * @see openingDate */ - void setOpeningDate(const QDate& date); + void setOpeningDate(const TQDate& date); /** * This method is used to set the date of the last reconciliation * of an account. - * @param date QDate of last reconciliation + * @param date TQDate of last reconciliation * @see lastReconciliationDate */ - void setLastReconciliationDate(const QDate& date); + void setLastReconciliationDate(const TQDate& date); /** * This method is used to change the account type @@ -332,15 +332,15 @@ public: void setAccountType(const accountTypeE type); /** - * This method is used to set a new parent account id - * @param parent QString reference to new parent account + * This method is used to set a new tqparent account id + * @param tqparent TQString reference to new tqparent account */ - void setParentAccountId(const QString& parent); + void setParentAccountId(const TQString& tqparent); /** * This method is used to update m_lastModified to the current date */ - void touch(void) { setLastModified(QDate::currentDate()); } + void touch(void) { setLastModified(TQDate::tqcurrentDate()); } /** * This method returns the type of the account. @@ -353,16 +353,16 @@ public: * * @return id of currency */ - const QString& currencyId(void) const { return m_currencyId; }; + const TQString& currencyId(void) const { return m_currencyId; }; /** * This method sets the id of the currency used with this account. * * @param id ID of currency to be associated with this account. */ - void setCurrencyId(const QString& id); + void setCurrencyId(const TQString& id); - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -373,7 +373,7 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; /** * This member returns the balance of this account based on @@ -514,13 +514,13 @@ public: * the current name. It only works on investment accounts and * returns the name for all other cases. */ - QString brokerageName(void) const; + TQString brokerageName(void) const; /** * @param size is a hint for the size of the icon * @return a pixmap using DesktopIcon for the account type */ - QPixmap accountPixmap(bool reconcileFlag = false, int size = 0) const; + TQPixmap accountPixmap(bool reconcileFlag = false, int size = 0) const; /** * This method is used to convert the internal representation of @@ -528,12 +528,12 @@ public: * * @param accountType numerical representation of the account type. * For possible values, see MyMoneyAccount::accountTypeE - * @return QString representing the human readable form + * @return TQString representing the human readable form */ - static QString accountTypeToString(const MyMoneyAccount::accountTypeE accountType); + static TQString accountTypeToString(const MyMoneyAccount::accountTypeE accountType); - KMYMONEY_EXPORT QDataStream &operator<<( const MyMoneyAccount & ); - KMYMONEY_EXPORT QDataStream &operator>>( MyMoneyAccount & ); + KMYMONEY_EXPORT TQDataStream &operator<<( const MyMoneyAccount & ); + KMYMONEY_EXPORT TQDataStream &operator>>( MyMoneyAccount & ); private: /** @@ -545,61 +545,61 @@ private: * This member variable keeps the ID of the MyMoneyInstitution object * that this object belongs to. */ - QString m_institution; + TQString m_institution; /** * This member variable keeps the name of the account * It is solely for documentation purposes and it's contents is not * used otherwise by the mymoney-engine. */ - QString m_name; + TQString m_name; /** * This member variable keeps the account number at the institution * It is solely for documentation purposes and it's contents is not * used otherwise by the mymoney-engine. */ - QString m_number; + TQString m_number; /** * This member variable is a description of the account. * It is solely for documentation purposes and it's contents is not * used otherwise by the mymoney-engine. */ - QString m_description; + TQString m_description; /** * This member variable keeps the date when the account * was last modified. */ - QDate m_lastModified; + TQDate m_lastModified; /** * This member variable keeps the date when the * account was created as an object in a MyMoneyFile */ - QDate m_openingDate; + TQDate m_openingDate; /** * This member variable keeps the date of the last * reconciliation of this account */ - QDate m_lastReconciliationDate; + TQDate m_lastReconciliationDate; /** * This member holds the ID's of all sub-ordinate accounts */ - QStringList m_accountList; + TQStringList m_accountList; /** - * This member contains the ID of the parent account + * This member contains the ID of the tqparent account */ - QString m_parentAccount; + TQString m_parentAccount; /** * This member contains the ID of the currency associated with this account */ - QString m_currencyId; + TQString m_currencyId; /** * This member holds the balance of all transactions stored in the journal @@ -649,14 +649,14 @@ public: const MyMoneyMoney loanAmount(void) const; void setLoanAmount(const MyMoneyMoney& amount); - const MyMoneyMoney interestRate(const QDate& date) const; - void setInterestRate(const QDate& date, const MyMoneyMoney& rate); + const MyMoneyMoney interestRate(const TQDate& date) const; + void setInterestRate(const TQDate& date, const MyMoneyMoney& rate); interestDueE interestCalculation(void) const; void setInterestCalculation(const interestDueE onReception); - const QDate nextInterestChange(void) const; - void setNextInterestChange(const QDate& date); - const QString schedule(void) const; - void setSchedule(const QString& sched); + const TQDate nextInterestChange(void) const; + void setNextInterestChange(const TQDate& date); + const TQString schedule(void) const; + void setSchedule(const TQString& sched); bool fixedInterestRate(void) const; void setFixedInterestRate(const bool fixed); const MyMoneyMoney finalPayment(void) const; @@ -669,10 +669,10 @@ public: void setPeriodicPayment(const MyMoneyMoney& payment); int interestCompounding(void) const; void setInterestCompounding(int frequency); - const QString payee(void) const; - void setPayee(const QString& payee); - const QString interestAccountId(void) const; - void setInterestAccountId(const QString& id); + const TQString payee(void) const; + void setPayee(const TQString& payee); + const TQString interestAccountId(void) const; + void setInterestAccountId(const TQString& id); /** * This method checks if a reference to the given object exists. It returns, @@ -683,7 +683,7 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; }; diff --git a/kmymoney2/mymoney/mymoneyaccounttest.cpp b/kmymoney2/mymoney/mymoneyaccounttest.cpp index 1384c5c..0e1fbbf 100644 --- a/kmymoney2/mymoney/mymoneyaccounttest.cpp +++ b/kmymoney2/mymoney/mymoneyaccounttest.cpp @@ -35,26 +35,26 @@ void MyMoneyAccountTest::testEmptyConstructor() { CPPUNIT_ASSERT(a.id().isEmpty()); CPPUNIT_ASSERT(a.name().isEmpty()); CPPUNIT_ASSERT(a.accountType() == MyMoneyAccount::UnknownAccountType); - CPPUNIT_ASSERT(a.openingDate() == QDate()); - CPPUNIT_ASSERT(a.lastModified() == QDate()); - CPPUNIT_ASSERT(a.lastReconciliationDate() == QDate()); + CPPUNIT_ASSERT(a.openingDate() == TQDate()); + CPPUNIT_ASSERT(a.lastModified() == TQDate()); + CPPUNIT_ASSERT(a.lastReconciliationDate() == TQDate()); CPPUNIT_ASSERT(a.accountList().count() == 0); CPPUNIT_ASSERT(a.balance().isZero()); } void MyMoneyAccountTest::testConstructor() { - QString id = "A000001"; - QString institutionid = "B000001"; - QString parent = "Parent"; + TQString id = "A000001"; + TQString institutionid = "B000001"; + TQString tqparent = "Parent"; MyMoneyAccount r; MyMoneySplit s; r.setAccountType(MyMoneyAccount::Asset); - r.setOpeningDate(QDate::currentDate()); - r.setLastModified(QDate::currentDate()); + r.setOpeningDate(TQDate::tqcurrentDate()); + r.setLastModified(TQDate::tqcurrentDate()); r.setDescription("Desc"); r.setNumber("465500"); - r.setParentAccountId(parent); - r.setValue(QString("key"), "value"); + r.setParentAccountId(tqparent); + r.setValue(TQString("key"), "value"); s.setShares(MyMoneyMoney(1,1)); r.adjustBalance(s); CPPUNIT_ASSERT(r.m_kvp.count() == 1); @@ -65,26 +65,26 @@ void MyMoneyAccountTest::testConstructor() { CPPUNIT_ASSERT(a.id() == id); CPPUNIT_ASSERT(a.institutionId().isEmpty()); CPPUNIT_ASSERT(a.accountType() == MyMoneyAccount::Asset); - CPPUNIT_ASSERT(a.openingDate() == QDate::currentDate()); - CPPUNIT_ASSERT(a.lastModified() == QDate::currentDate()); + CPPUNIT_ASSERT(a.openingDate() == TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(a.lastModified() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.number() == "465500"); CPPUNIT_ASSERT(a.description() == "Desc"); CPPUNIT_ASSERT(a.accountList().count() == 0); - CPPUNIT_ASSERT(a.parentAccountId() == "Parent"); + CPPUNIT_ASSERT(a.tqparentAccountId() == "Parent"); CPPUNIT_ASSERT(a.balance() == MyMoneyMoney(1,1)); - QMap<QString, QString> copy; + TQMap<TQString, TQString> copy; copy = r.pairs(); CPPUNIT_ASSERT(copy.count() == 1); - CPPUNIT_ASSERT(copy[QString("key")] == "value"); + CPPUNIT_ASSERT(copy[TQString("key")] == "value"); } void MyMoneyAccountTest::testSetFunctions() { MyMoneyAccount a; - QDate today(QDate::currentDate()); + TQDate today(TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.name().isEmpty()); - CPPUNIT_ASSERT(a.lastModified() == QDate()); + CPPUNIT_ASSERT(a.lastModified() == TQDate()); CPPUNIT_ASSERT(a.description().isEmpty()); a.setName("Account"); @@ -103,18 +103,18 @@ void MyMoneyAccountTest::testSetFunctions() { } void MyMoneyAccountTest::testCopyConstructor() { - QString id = "A000001"; - QString institutionid = "B000001"; - QString parent = "ParentAccount"; + TQString id = "A000001"; + TQString institutionid = "B000001"; + TQString tqparent = "ParentAccount"; MyMoneyAccount r; r.setAccountType(MyMoneyAccount::Expense); - r.setOpeningDate(QDate::currentDate()); - r.setLastModified(QDate::currentDate()); + r.setOpeningDate(TQDate::tqcurrentDate()); + r.setLastModified(TQDate::tqcurrentDate()); r.setName("Account"); r.setInstitutionId("Inst1"); r.setDescription("Desc1"); r.setNumber("Number"); - r.setParentAccountId(parent); + r.setParentAccountId(tqparent); r.setValue("Key", "Value"); MyMoneyAccount a(id, r); @@ -125,11 +125,11 @@ void MyMoneyAccountTest::testCopyConstructor() { CPPUNIT_ASSERT(b.name() == "Account"); CPPUNIT_ASSERT(b.institutionId() == institutionid); CPPUNIT_ASSERT(b.accountType() == MyMoneyAccount::Expense); - CPPUNIT_ASSERT(b.lastModified() == QDate::currentDate()); - CPPUNIT_ASSERT(b.openingDate() == QDate::currentDate()); + CPPUNIT_ASSERT(b.lastModified() == TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(b.openingDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(b.description() == "Desc1"); CPPUNIT_ASSERT(b.number() == "Number"); - CPPUNIT_ASSERT(b.parentAccountId() == "ParentAccount"); + CPPUNIT_ASSERT(b.tqparentAccountId() == "ParentAccount"); CPPUNIT_ASSERT(b.value("Key") == "Value"); } @@ -146,14 +146,14 @@ void MyMoneyAccountTest::testAssignmentConstructor() { MyMoneyAccount b; - b.setLastModified(QDate::currentDate()); + b.setLastModified(TQDate::tqcurrentDate()); b = a; CPPUNIT_ASSERT(b.name() == "Account"); CPPUNIT_ASSERT(b.institutionId() == "Inst1"); CPPUNIT_ASSERT(b.accountType() == MyMoneyAccount::Checkings); - CPPUNIT_ASSERT(b.lastModified() == QDate()); + CPPUNIT_ASSERT(b.lastModified() == TQDate()); CPPUNIT_ASSERT(b.openingDate() == a.openingDate()); CPPUNIT_ASSERT(b.description() == "Bla"); CPPUNIT_ASSERT(b.number() == "assigned Number"); @@ -176,7 +176,7 @@ void MyMoneyAccountTest::testAdjustBalance() { a.adjustBalance(s); CPPUNIT_ASSERT(a.balance() == MyMoneyMoney(-4,1)); s.setShares(MyMoneyMoney(4,1)); - s.setAction(QString()); + s.setAction(TQString()); a.adjustBalance(s); CPPUNIT_ASSERT(a.balance().isZero()); } @@ -199,13 +199,13 @@ void MyMoneyAccountTest::testEquality() { MyMoneyAccount a; - a.setLastModified(QDate::currentDate()); + a.setLastModified(TQDate::tqcurrentDate()); a.setName("Name"); a.setNumber("Number"); a.setDescription("Desc"); a.setInstitutionId("I-ID"); - a.setOpeningDate(QDate::currentDate()); - a.setLastReconciliationDate(QDate::currentDate()); + a.setOpeningDate(TQDate::tqcurrentDate()); + a.setLastReconciliationDate(TQDate::tqcurrentDate()); a.setAccountType(MyMoneyAccount::Asset); a.setParentAccountId("P-ID"); a.setId("A-ID"); @@ -221,7 +221,7 @@ void MyMoneyAccountTest::testEquality() CPPUNIT_ASSERT(!(b == a)); b = a; - a.setLastModified(QDate::currentDate().addDays(-1)); + a.setLastModified(TQDate::tqcurrentDate().addDays(-1)); CPPUNIT_ASSERT(!(b == a)); b = a; @@ -237,11 +237,11 @@ void MyMoneyAccountTest::testEquality() CPPUNIT_ASSERT(!(b == a)); b = a; - a.setOpeningDate(QDate::currentDate().addDays(-1)); + a.setOpeningDate(TQDate::tqcurrentDate().addDays(-1)); CPPUNIT_ASSERT(!(b == a)); b = a; - a.setLastReconciliationDate(QDate::currentDate().addDays(-1)); + a.setLastReconciliationDate(TQDate::tqcurrentDate().addDays(-1)); CPPUNIT_ASSERT(!(b == a)); b = a; @@ -272,35 +272,35 @@ void MyMoneyAccountTest::testEquality() } void MyMoneyAccountTest::testWriteXML() { - QString id = "A000001"; - QString institutionid = "B000001"; - QString parent = "Parent"; + TQString id = "A000001"; + TQString institutionid = "B000001"; + TQString tqparent = "Parent"; MyMoneyAccount r; r.setAccountType(MyMoneyAccount::Asset); - r.setOpeningDate(QDate::currentDate()); - r.setLastModified(QDate::currentDate()); + r.setOpeningDate(TQDate::tqcurrentDate()); + r.setLastModified(TQDate::tqcurrentDate()); r.setDescription("Desc"); r.setName("AccountName"); r.setNumber("465500"); - r.setParentAccountId(parent); + r.setParentAccountId(tqparent); r.setInstitutionId(institutionid); - r.setValue(QString("key"), "value"); + r.setValue(TQString("key"), "value"); r.addAccountId("A000002"); // CPPUNIT_ASSERT(r.m_kvp.count() == 1); // CPPUNIT_ASSERT(r.value("key") == "value"); MyMoneyAccount a(id, r); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("ACCOUNT-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("ACCOUNT-CONTAINER"); doc.appendChild(el); a.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<ACCOUNT-CONTAINER>\n" - " <ACCOUNT parentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" + " <ACCOUNT tqparentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" " <SUBACCOUNTS>\n" " <SUBACCOUNT id=\"A000002\" />\n" " </SUBACCOUNTS>\n" @@ -309,17 +309,17 @@ void MyMoneyAccountTest::testWriteXML() { " </KEYVALUEPAIRS>\n" " </ACCOUNT>\n" "</ACCOUNT-CONTAINER>\n"). - arg(QDate::currentDate().toString(Qt::ISODate)).arg(QDate::currentDate().toString(Qt::ISODate)); + arg(TQDate::tqcurrentDate().toString(Qt::ISODate)).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); CPPUNIT_ASSERT(doc.toString() == ref); } void MyMoneyAccountTest::testReadXML() { MyMoneyAccount a; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<ACCOUNT-CONTAINER>\n" - " <ACCOUNT parentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" + " <ACCOUNT tqparentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" " <SUBACCOUNTS>\n" " <SUBACCOUNT id=\"A000002\" />\n" " <SUBACCOUNT id=\"A000003\" />\n" @@ -330,12 +330,12 @@ void MyMoneyAccountTest::testReadXML() { " </KEYVALUEPAIRS>\n" " </ACCOUNT>\n" "</ACCOUNT-CONTAINER>\n"). - arg(QDate::currentDate().toString(Qt::ISODate)).arg(QDate::currentDate().toString(Qt::ISODate)); + arg(TQDate::tqcurrentDate().toString(Qt::ISODate)).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<ACCOUNT-CONTAINER>\n" - " <KACCOUNT parentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" + " <KACCOUNT tqparentaccount=\"Parent\" lastmodified=\"%1\" lastreconciled=\"\" institution=\"B000001\" number=\"465500\" opened=\"%2\" type=\"9\" id=\"A000001\" name=\"AccountName\" description=\"Desc\" >\n" " <SUBACCOUNTS>\n" " <SUBACCOUNT id=\"A000002\" />\n" " <SUBACCOUNT id=\"A000003\" />\n" @@ -346,10 +346,10 @@ void MyMoneyAccountTest::testReadXML() { " </KEYVALUEPAIRS>\n" " </KACCOUNT>\n" "</ACCOUNT-CONTAINER>\n"). - arg(QDate::currentDate().toString(Qt::ISODate)).arg(QDate::currentDate().toString(Qt::ISODate)); + arg(TQDate::tqcurrentDate().toString(Qt::ISODate)).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -371,11 +371,11 @@ void MyMoneyAccountTest::testReadXML() { CPPUNIT_ASSERT(a.id() == "A000001"); CPPUNIT_ASSERT(a.m_name == "AccountName"); CPPUNIT_ASSERT(a.m_parentAccount == "Parent"); - CPPUNIT_ASSERT(a.m_lastModified == QDate::currentDate()); - CPPUNIT_ASSERT(a.m_lastReconciliationDate == QDate()); + CPPUNIT_ASSERT(a.m_lastModified == TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(a.m_lastReconciliationDate == TQDate()); CPPUNIT_ASSERT(a.m_institution == "B000001"); CPPUNIT_ASSERT(a.m_number == "465500"); - CPPUNIT_ASSERT(a.m_openingDate == QDate::currentDate()); + CPPUNIT_ASSERT(a.m_openingDate == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.m_accountType == MyMoneyAccount::Asset); CPPUNIT_ASSERT(a.m_description == "Desc"); CPPUNIT_ASSERT(a.accountList().count() == 2); diff --git a/kmymoney2/mymoney/mymoneybudget.cpp b/kmymoney2/mymoney/mymoneybudget.cpp index 46b8ca8..3cb7793 100644 --- a/kmymoney2/mymoney/mymoneybudget.cpp +++ b/kmymoney2/mymoney/mymoneybudget.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdom.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -33,7 +33,7 @@ #include "mymoneybudget.h" -const QStringList MyMoneyBudget::AccountGroup::kBudgetLevelText = QStringList::split(",","none,monthly,monthbymonth,yearly,invalid",true); +const TQStringList MyMoneyBudget::AccountGroup::kBudgetLevelText = TQStringList::split(",","none,monthly,monthbymonth,yearly,invalid",true); const int BUDGET_VERSION = 2; bool MyMoneyBudget::AccountGroup::isZero(void) const @@ -80,7 +80,7 @@ void MyMoneyBudget::AccountGroup::convertToYearly(void) void MyMoneyBudget::AccountGroup::convertToMonthByMonth(void) { MyMoneyBudget::PeriodGroup period; - QDate date; + TQDate date; switch(m_budgetlevel) { case eMonthByMonth: @@ -126,14 +126,14 @@ MyMoneyBudget::AccountGroup MyMoneyBudget::AccountGroup::operator += (const MyMo // now both budgets should be of the same type and we simply need // to iterate over the period list and add the values - QMap<QDate, MyMoneyBudget::PeriodGroup> periods = m_periods; - QMap<QDate, MyMoneyBudget::PeriodGroup> rPeriods = r.m_periods; - QMap<QDate, MyMoneyBudget::PeriodGroup>::const_iterator it_p; - QMap<QDate, MyMoneyBudget::PeriodGroup>::const_iterator it_pr; + TQMap<TQDate, MyMoneyBudget::PeriodGroup> periods = m_periods; + TQMap<TQDate, MyMoneyBudget::PeriodGroup> rPeriods = r.m_periods; + TQMap<TQDate, MyMoneyBudget::PeriodGroup>::const_iterator it_p; + TQMap<TQDate, MyMoneyBudget::PeriodGroup>::const_iterator it_pr; m_periods.clear(); it_p = periods.begin(); it_pr = rPeriods.begin(); - QDate date = (*it_p).startDate(); + TQDate date = (*it_p).startDate(); while(it_p != periods.end()) { MyMoneyBudget::PeriodGroup period = *it_p; if(it_pr != rPeriods.end()) { @@ -161,19 +161,19 @@ MyMoneyBudget::MyMoneyBudget(void) : { } -MyMoneyBudget::MyMoneyBudget(const QString& _name) : +MyMoneyBudget::MyMoneyBudget(const TQString& _name) : m_name(_name) { } -MyMoneyBudget::MyMoneyBudget(const QDomElement& node) : +MyMoneyBudget::MyMoneyBudget(const TQDomElement& node) : MyMoneyObject(node) { if(!read(node)) clearId(); } -MyMoneyBudget::MyMoneyBudget(const QString& id, const MyMoneyBudget& budget) +MyMoneyBudget::MyMoneyBudget(const TQString& id, const MyMoneyBudget& budget) { *this = budget; m_id = id; @@ -193,7 +193,7 @@ bool MyMoneyBudget::operator == (const MyMoneyBudget& right) const (m_start == right.m_start) ); } -void MyMoneyBudget::write(QDomElement& e, QDomDocument *doc) const +void MyMoneyBudget::write(TQDomElement& e, TQDomDocument *doc) const { writeBaseXML(*doc, e); @@ -201,20 +201,20 @@ void MyMoneyBudget::write(QDomElement& e, QDomDocument *doc) const e.setAttribute("start", m_start.toString(Qt::ISODate) ); e.setAttribute("version", BUDGET_VERSION); - QMap<QString, AccountGroup>::const_iterator it; + TQMap<TQString, AccountGroup>::const_iterator it; for(it = m_accounts.begin(); it != m_accounts.end(); ++it) { // only add the account if there is a budget entered if(!(*it).balance().isZero()) { - QDomElement domAccount = doc->createElement("ACCOUNT"); + TQDomElement domAccount = doc->createElement("ACCOUNT"); domAccount.setAttribute("id", it.key()); domAccount.setAttribute("budgetlevel", AccountGroup::kBudgetLevelText[it.data().budgetLevel()]); domAccount.setAttribute("budgetsubaccounts", it.data().budgetSubaccounts()); - const QMap<QDate, PeriodGroup> periods = it.data().getPeriods(); - QMap<QDate, PeriodGroup>::const_iterator it_per; + const TQMap<TQDate, PeriodGroup> periods = it.data().getPeriods(); + TQMap<TQDate, PeriodGroup>::const_iterator it_per; for(it_per = periods.begin(); it_per != periods.end(); ++it_per) { if(!(*it_per).amount().isZero()) { - QDomElement domPeriod = doc->createElement("PERIOD"); + TQDomElement domPeriod = doc->createElement("PERIOD"); domPeriod.setAttribute("amount", (*it_per).amount().toString()); domPeriod.setAttribute("start", (*it_per).startDate().toString(Qt::ISODate)); @@ -227,7 +227,7 @@ void MyMoneyBudget::write(QDomElement& e, QDomDocument *doc) const } } -bool MyMoneyBudget::read(const QDomElement& e) +bool MyMoneyBudget::read(const TQDomElement& e) { // The goal of this reading method is 100% backward AND 100% forward // compatability. Any Budget ever created with any version of KMyMoney @@ -240,13 +240,13 @@ bool MyMoneyBudget::read(const QDomElement& e) { result = true; m_name = e.attribute("name"); - m_start = QDate::fromString(e.attribute("start"), Qt::ISODate); + m_start = TQDate::fromString(e.attribute("start"), Qt::ISODate); m_id = e.attribute("id"); - QDomNode child = e.firstChild(); + TQDomNode child = e.firstChild(); while(!child.isNull() && child.isElement()) { - QDomElement c = child.toElement(); + TQDomElement c = child.toElement(); AccountGroup account; @@ -255,7 +255,7 @@ bool MyMoneyBudget::read(const QDomElement& e) account.setId(c.attribute("id")); if(c.hasAttribute("budgetlevel")) { - int i = AccountGroup::kBudgetLevelText.findIndex(c.attribute("budgetlevel")); + int i = AccountGroup::kBudgetLevelText.tqfindIndex(c.attribute("budgetlevel")); if ( i != -1 ) account.setBudgetLevel(static_cast<AccountGroup::eBudgetLevel>(i)); } @@ -264,16 +264,16 @@ bool MyMoneyBudget::read(const QDomElement& e) account.setBudgetSubaccounts(c.attribute("budgetsubaccounts").toUInt()); } - QDomNode period = c.firstChild(); + TQDomNode period = c.firstChild(); while(!period.isNull() && period.isElement()) { - QDomElement per = period.toElement(); + TQDomElement per = period.toElement(); PeriodGroup pGroup; if("PERIOD" == per.tagName() && per.hasAttribute("amount") && per.hasAttribute("start")) { pGroup.setAmount( MyMoneyMoney(per.attribute("amount")) ); - pGroup.setStartDate( QDate::fromString(per.attribute("start"), Qt::ISODate) ); + pGroup.setStartDate( TQDate::fromString(per.attribute("start"), Qt::ISODate) ); account.addPeriod(pGroup.startDate(), pGroup); } @@ -289,27 +289,27 @@ bool MyMoneyBudget::read(const QDomElement& e) return result; } -void MyMoneyBudget::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyBudget::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("BUDGET"); + TQDomElement el = document.createElement("BUDGET"); write(el,&document); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneyBudget::hasReferenceTo(const QString& id) const +bool MyMoneyBudget::hasReferenceTo(const TQString& id) const { // return true if we have an assignment for this id - return (m_accounts.contains(id)); + return (m_accounts.tqcontains(id)); } -void MyMoneyBudget::removeReference(const QString& id) +void MyMoneyBudget::removeReference(const TQString& id) { - if(m_accounts.contains(id)) { + if(m_accounts.tqcontains(id)) { m_accounts.remove(id); } } -void MyMoneyBudget::setAccount(const AccountGroup &_account, const QString _id) +void MyMoneyBudget::setAccount(const AccountGroup &_account, const TQString _id) { if(_account.isZero()) { m_accounts.remove(_id); @@ -322,25 +322,25 @@ void MyMoneyBudget::setAccount(const AccountGroup &_account, const QString _id) } } -const MyMoneyBudget::AccountGroup& MyMoneyBudget::account(const QString _id) const +const MyMoneyBudget::AccountGroup& MyMoneyBudget::account(const TQString _id) const { static AccountGroup empty; - if ( m_accounts.contains(_id) ) + if ( m_accounts.tqcontains(_id) ) return m_accounts[_id]; return empty; } -void MyMoneyBudget::setBudgetStart(const QDate& _start) +void MyMoneyBudget::setBudgetStart(const TQDate& _start) { - QDate oldDate = QDate(m_start.year(), m_start.month(), 1); - m_start = QDate(_start.year(), _start.month(), 1); + TQDate oldDate = TQDate(m_start.year(), m_start.month(), 1); + m_start = TQDate(_start.year(), _start.month(), 1); if(oldDate.isValid()) { int adjust = ((m_start.year() - oldDate.year())*12) + (m_start.month() - oldDate.month()); - QMap<QString, AccountGroup>::iterator it; + TQMap<TQString, AccountGroup>::iterator it; for(it = m_accounts.begin(); it != m_accounts.end(); ++it) { - const QMap<QDate, PeriodGroup> periods = (*it).getPeriods(); - QMap<QDate, PeriodGroup>::const_iterator it_per; + const TQMap<TQDate, PeriodGroup> periods = (*it).getPeriods(); + TQMap<TQDate, PeriodGroup>::const_iterator it_per; (*it).clearPeriods(); for(it_per = periods.begin(); it_per != periods.end(); ++it_per) { PeriodGroup pgroup = (*it_per); diff --git a/kmymoney2/mymoney/mymoneybudget.h b/kmymoney2/mymoney/mymoneybudget.h index a2eea02..e7e44b4 100644 --- a/kmymoney2/mymoney/mymoneybudget.h +++ b/kmymoney2/mymoney/mymoneybudget.h @@ -25,11 +25,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qvaluelist.h> -#include <qstring.h> -class QDomElement; -class QDomDocument; +#include <tqmap.h> +#include <tqvaluelist.h> +#include <tqstring.h> +class TQDomElement; +class TQDomDocument; // ---------------------------------------------------------------------------- // Project Includes @@ -55,19 +55,19 @@ class KMYMONEY_EXPORT MyMoneyBudget: public MyMoneyObject public: MyMoneyBudget(void); ~MyMoneyBudget(); - MyMoneyBudget(const QString& _name); + MyMoneyBudget(const TQString& _name); /** * This constructor creates an object based on the data found in the - * QDomElement referenced by @p node. If problems arise, the @p id of + * TQDomElement referenced by @p node. If problems arise, the @p id of * the object is cleared (see MyMoneyObject::clearId()). */ - MyMoneyBudget(const QDomElement& node); + MyMoneyBudget(const TQDomElement& node); /** * This constructor creates an object based on the data found in the * MyMoneyBudget budget object. */ - MyMoneyBudget(const QString& id, const MyMoneyBudget& budget); + MyMoneyBudget(const TQString& id, const MyMoneyBudget& budget); /** * Helper class for MyMoneyBudget @@ -80,17 +80,17 @@ public: { public: // get functions - const QDate& startDate ( void ) const { return m_start; } + const TQDate& startDate ( void ) const { return m_start; } const MyMoneyMoney& amount( void ) const { return m_amount; } // set functions - void setStartDate ( const QDate& _start ) { m_start = _start; } + void setStartDate ( const TQDate& _start ) { m_start = _start; } void setAmount( const MyMoneyMoney& _amount ) { m_amount = _amount;} bool operator == (const PeriodGroup &r) const { return (m_start == r.m_start && m_amount == r.m_amount); } private: - QDate m_start; + TQDate m_start; MyMoneyMoney m_amount; }; @@ -113,23 +113,23 @@ public: eMax } eBudgetLevel; - static const QStringList kBudgetLevelText; + static const TQStringList kBudgetLevelText; public: AccountGroup() : m_budgetlevel(eNone), m_budgetsubaccounts(false) {} // get functions - const QString& id( void ) const { return m_id; } + const TQString& id( void ) const { return m_id; } bool budgetSubaccounts( void ) const { return m_budgetsubaccounts; } eBudgetLevel budgetLevel( void ) const { return m_budgetlevel; } - const PeriodGroup& period( const QDate &_date ) const { return m_periods[_date]; } - const QMap<QDate, PeriodGroup>& getPeriods( void ) const { return m_periods; } + const PeriodGroup& period( const TQDate &_date ) const { return m_periods[_date]; } + const TQMap<TQDate, PeriodGroup>& getPeriods( void ) const { return m_periods; } void clearPeriods(void) { m_periods.clear(); } const MyMoneyMoney balance( void ) const { MyMoneyMoney balance; - QMap<QDate, PeriodGroup>::const_iterator it; + TQMap<TQDate, PeriodGroup>::const_iterator it; for(it = m_periods.begin(); it != m_periods.end(); ++it) { balance += (*it).amount(); @@ -151,10 +151,10 @@ public: } // set functions - void setId( QString _id ) { m_id = _id; } + void setId( TQString _id ) { m_id = _id; } void setBudgetLevel( eBudgetLevel _level ) { m_budgetlevel = _level; } void setBudgetSubaccounts( bool _b ) { m_budgetsubaccounts = _b; } - void addPeriod( const QDate& _date, PeriodGroup &period ) { m_periods[_date] = period; } + void addPeriod( const TQDate& _date, PeriodGroup &period ) { m_periods[_date] = period; } // This member adds the value of another account group // m_budgetlevel is adjusted to the larger one of both @@ -171,11 +171,11 @@ public: void convertToMonthByMonth(void); private: - QString m_id; + TQString m_id; eBudgetLevel m_budgetlevel; bool m_budgetsubaccounts; - QMap<QDate, PeriodGroup> m_periods; + TQMap<TQDate, PeriodGroup> m_periods; }; /** @@ -184,17 +184,17 @@ public: bool operator == (const MyMoneyBudget &) const; // Simple get operations - const QString& name(void) const { return m_name; } - const QDate& budgetStart(void) const { return m_start; } - QString id(void) const { return m_id; } - const AccountGroup & account(const QString _id) const; - bool contains(const QString _id) const { return m_accounts.contains(_id); } - QValueList<AccountGroup> getaccounts(void) const { return m_accounts.values(); } + const TQString& name(void) const { return m_name; } + const TQDate& budgetStart(void) const { return m_start; } + TQString id(void) const { return m_id; } + const AccountGroup & account(const TQString _id) const; + bool tqcontains(const TQString _id) const { return m_accounts.tqcontains(_id); } + TQValueList<AccountGroup> getaccounts(void) const { return m_accounts.values(); } // Simple set operations - void setName(const QString& _name) { m_name = _name; } - void setBudgetStart(const QDate& _start); - void setAccount(const AccountGroup &_account, const QString _id); + void setName(const TQString& _name) { m_name = _name; } + void setBudgetStart(const TQDate& _start); + void setAccount(const AccountGroup &_account, const TQString _id); /** * This method writes this Budget to the DOM element @p e, @@ -204,7 +204,7 @@ public: * @param doc The document which we can use to create new sub-elements * if needed */ - void write(QDomElement& e, QDomDocument *doc) const; + void write(TQDomElement& e, TQDomDocument *doc) const; /** * This method reads a Budget from the DOM element @p e, and @@ -216,17 +216,17 @@ public: * element @p e. If false is returned, the contents of this Budget * object are undefined. */ - bool read(const QDomElement& e); + bool read(const TQDomElement& e); /** - * This method creates a QDomElement for the @p document - * under the parent node @p parent. (This version overwrites the + * This method creates a TQDomElement for the @p document + * under the tqparent node @p tqparent. (This version overwrites the * MMObject base class.) * - * @param document reference to QDomDocument - * @param parent reference to QDomElement parent node + * @param document reference to TQDomDocument + * @param tqparent reference to TQDomElement tqparent node */ - virtual void writeXML(QDomDocument& document, QDomElement& parent) const; + virtual void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -238,31 +238,31 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; /** * This member removes all references to object identified by @p id. Used * to remove objects which are about to be removed from the engine. */ - void removeReference(const QString& id); + void removeReference(const TQString& id); private: /** * The user-assigned name of the Budget */ - QString m_name; + TQString m_name; /** * The user-assigned year of the Budget */ - QDate m_start; + TQDate m_start; /** * Map the budgeted accounts * * Each account Id is stored against the AccountGroup information */ - QMap<QString, AccountGroup> m_accounts; + TQMap<TQString, AccountGroup> m_accounts; }; #endif // MYMONEYBudget_H diff --git a/kmymoney2/mymoney/mymoneycategory.cpp b/kmymoney2/mymoney/mymoneycategory.cpp index 5bf55ab..8717237 100644 --- a/kmymoney2/mymoney/mymoneycategory.cpp +++ b/kmymoney2/mymoney/mymoneycategory.cpp @@ -21,13 +21,13 @@ MyMoneyCategory::MyMoneyCategory() m_income = true; } -MyMoneyCategory::MyMoneyCategory(const bool income, const QString name) +MyMoneyCategory::MyMoneyCategory(const bool income, const TQString name) { m_income = income; m_name = name; } -MyMoneyCategory::MyMoneyCategory(const bool income, const QString name, QStringList minors) +MyMoneyCategory::MyMoneyCategory(const bool income, const TQString name, TQStringList minors) { m_income = income; m_name = name; @@ -39,12 +39,12 @@ MyMoneyCategory::~MyMoneyCategory() } // Functions use the find method to search the list -bool MyMoneyCategory::addMinorCategory(const QString val) +bool MyMoneyCategory::addMinorCategory(const TQString val) { if (val.isEmpty() || val.isNull()) return false; - if (m_minorCategories.find(val) == m_minorCategories.end()) { + if (m_minorCategories.tqfind(val) == m_minorCategories.end()) { m_minorCategories.append(val); return true; } @@ -52,12 +52,12 @@ bool MyMoneyCategory::addMinorCategory(const QString val) return false; } -bool MyMoneyCategory::removeMinorCategory(const QString val) +bool MyMoneyCategory::removeMinorCategory(const TQString val) { if (val.isEmpty() || val.isNull()) return false; - if (m_minorCategories.find(val) != m_minorCategories.end()) { + if (m_minorCategories.tqfind(val) != m_minorCategories.end()) { m_minorCategories.remove(val); return true; } @@ -65,13 +65,13 @@ bool MyMoneyCategory::removeMinorCategory(const QString val) return false; } -bool MyMoneyCategory::renameMinorCategory(const QString oldVal, const QString newVal) +bool MyMoneyCategory::renameMinorCategory(const TQString oldVal, const TQString newVal) { if (oldVal.isEmpty() || oldVal.isNull() || newVal.isEmpty() || newVal.isNull()) return false; - if (m_minorCategories.find(oldVal) != m_minorCategories.end() && - m_minorCategories.find(newVal) == m_minorCategories.end() ) { + if (m_minorCategories.tqfind(oldVal) != m_minorCategories.end() && + m_minorCategories.tqfind(newVal) == m_minorCategories.end() ) { m_minorCategories.remove(oldVal); return addMinorCategory(newVal); @@ -80,16 +80,16 @@ bool MyMoneyCategory::renameMinorCategory(const QString oldVal, const QString ne return false; } -bool MyMoneyCategory::addMinorCategory(QStringList values) +bool MyMoneyCategory::addMinorCategory(TQStringList values) { - for (QStringList::Iterator it = values.begin(); it!=values.end(); ++it) { + for (TQStringList::Iterator it = values.begin(); it!=values.end(); ++it) { addMinorCategory(*it); } return true; } -bool MyMoneyCategory::setMinorCategories(QStringList values) +bool MyMoneyCategory::setMinorCategories(TQStringList values) { m_minorCategories.clear(); return addMinorCategory(values); @@ -101,7 +101,7 @@ bool MyMoneyCategory::removeAllMinors(void) return true; } -QString MyMoneyCategory::firstMinor(void) +TQString MyMoneyCategory::firstMinor(void) { return m_minorCategories.first(); } @@ -123,26 +123,26 @@ MyMoneyCategory& MyMoneyCategory::operator = (const MyMoneyCategory& right) return *this; } -QDataStream &operator<<(QDataStream &s, MyMoneyCategory &category) +TQDataStream &operator<<(TQDataStream &s, MyMoneyCategory &category) { if (category.m_income) - s << (Q_INT32)1; + s << (TQ_INT32)1; else - s << (Q_INT32)0; + s << (TQ_INT32)0; s << category.m_name; - s << (Q_UINT32)category.m_minorCategories.count(); - for (QStringList::Iterator it = category.m_minorCategories.begin(); it!=category.m_minorCategories.end(); ++it) { + s << (TQ_UINT32)category.m_minorCategories.count(); + for (TQStringList::Iterator it = category.m_minorCategories.begin(); it!=category.m_minorCategories.end(); ++it) { s << (*it); } return s; } -QDataStream &operator>>(QDataStream &s, MyMoneyCategory &category) +TQDataStream &operator>>(TQDataStream &s, MyMoneyCategory &category) { - Q_INT32 inc; + TQ_INT32 inc; s >> inc; if (inc==0) category.m_income = false; @@ -151,8 +151,8 @@ QDataStream &operator>>(QDataStream &s, MyMoneyCategory &category) s >> category.m_name; - Q_UINT32 minorCount; - QString buffer; + TQ_UINT32 minorCount; + TQString buffer; s >> minorCount; category.m_minorCategories.clear(); diff --git a/kmymoney2/mymoney/mymoneycategory.h b/kmymoney2/mymoney/mymoneycategory.h index 3f4babc..b642c74 100644 --- a/kmymoney2/mymoney/mymoneycategory.h +++ b/kmymoney2/mymoney/mymoneycategory.h @@ -20,8 +20,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> /** * @deprecated This class represents an Income or Expense category. Please don't @@ -29,34 +29,34 @@ */ class MyMoneyCategory { bool m_income; // if false, m_income == expense - QString m_name; - QStringList m_minorCategories; + TQString m_name; + TQStringList m_minorCategories; - friend QDataStream &operator<<(QDataStream &, MyMoneyCategory &); - friend QDataStream &operator>>(QDataStream &, MyMoneyCategory &); + friend TQDataStream &operator<<(TQDataStream &, MyMoneyCategory &); + friend TQDataStream &operator>>(TQDataStream &, MyMoneyCategory &); public: MyMoneyCategory(); - MyMoneyCategory(const bool income, const QString name); - MyMoneyCategory(const bool income, const QString name, QStringList minors); + MyMoneyCategory(const bool income, const TQString name); + MyMoneyCategory(const bool income, const TQString name, TQStringList minors); ~MyMoneyCategory(); // Simple get operations - QString name(void) { return m_name; } - QStringList& minorCategories(void) { return m_minorCategories; } + TQString name(void) { return m_name; } + TQStringList& minorCategories(void) { return m_minorCategories; } // Simple set operations bool isIncome(void) { return m_income; } void setIncome(const bool val) { m_income = val; } - void setName(const QString val) { m_name = val; } + void setName(const TQString val) { m_name = val; } - bool setMinorCategories(QStringList values); - bool addMinorCategory(const QString val); - bool removeMinorCategory(const QString val); - bool renameMinorCategory(const QString oldVal, const QString newVal); - bool addMinorCategory(QStringList values); + bool setMinorCategories(TQStringList values); + bool addMinorCategory(const TQString val); + bool removeMinorCategory(const TQString val); + bool renameMinorCategory(const TQString oldVal, const TQString newVal); + bool addMinorCategory(TQStringList values); bool removeAllMinors(void); - QString firstMinor(void); + TQString firstMinor(void); void clear(void); diff --git a/kmymoney2/mymoney/mymoneyexception.cpp b/kmymoney2/mymoney/mymoneyexception.cpp index 6b61e67..4ee0970 100644 --- a/kmymoney2/mymoney/mymoneyexception.cpp +++ b/kmymoney2/mymoney/mymoneyexception.cpp @@ -22,7 +22,7 @@ #include "mymoneyexception.h" -MyMoneyException::MyMoneyException(const QString& msg, const QString& file, const unsigned long line) +MyMoneyException::MyMoneyException(const TQString& msg, const TQString& file, const unsigned long line) { // qDebug("MyMoneyException(%s,%s,%d)", msg.data(), file.data(), line); m_msg = msg; diff --git a/kmymoney2/mymoney/mymoneyexception.h b/kmymoney2/mymoney/mymoneyexception.h index 68cf2af..41020b3 100644 --- a/kmymoney2/mymoney/mymoneyexception.h +++ b/kmymoney2/mymoney/mymoneyexception.h @@ -30,7 +30,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> +#include <tqstring.h> #include <kmymoney/export.h> /** * @file @@ -57,8 +57,8 @@ public: /** * The constructor to create a new MyMoneyException object. * - * @param msg reference to QString containing the message - * @param file reference to QString containing the name of the sourcefile where + * @param msg reference to TQString containing the message + * @param file reference to TQString containing the name of the sourcefile where * the exception was thrown * @param line unsigned long containing the line number of the line where * the exception was thrown in the file. @@ -67,7 +67,7 @@ public: * MYMONEYEXCEPTION(text) instead. It automatically assigns the file * and line parameter to the correct values. */ - MyMoneyException(const QString& msg, const QString& file, const unsigned long line); + MyMoneyException(const TQString& msg, const TQString& file, const unsigned long line); ~MyMoneyException(); @@ -75,17 +75,17 @@ public: * This method is used to return the message that was passed * during the creation of the exception object. * - * @return reference to QString containing the message + * @return reference to TQString containing the message */ - const QString& what(void) const { return m_msg; }; + const TQString& what(void) const { return m_msg; }; /** * This method is used to return the filename that was passed * during the creation of the exception object. * - * @return reference to QString containing the filename + * @return reference to TQString containing the filename */ - const QString& file(void) const { return m_file; }; + const TQString& file(void) const { return m_file; }; /** * This method is used to return the linenumber that was passed @@ -99,12 +99,12 @@ private: /** * This member variable holds the message */ - QString m_msg; + TQString m_msg; /** * This member variable holds the filename */ - QString m_file; + TQString m_file; /** * This member variable holds the line number diff --git a/kmymoney2/mymoney/mymoneyfile.cpp b/kmymoney2/mymoney/mymoneyfile.cpp index 3245746..8707614 100644 --- a/kmymoney2/mymoney/mymoneyfile.cpp +++ b/kmymoney2/mymoney/mymoneyfile.cpp @@ -19,9 +19,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -44,8 +44,8 @@ #include "config.h" #endif -const QString MyMoneyFile::OpeningBalancesPrefix = I18N_NOOP("Opening Balances"); -const QString MyMoneyFile::AccountSeperator = ":"; +const TQString MyMoneyFile::OpeningBalancesPrefix = I18N_NOOP("Opening Balances"); +const TQString MyMoneyFile::AccountSeperator = ":"; // include the following line to get a 'cout' for debug purposes // #include <iostream> @@ -71,7 +71,7 @@ public: * false - don't reload the object immediately * true - reload the object immediately */ - QMap<QString, bool> m_notificationList; + TQMap<TQString, bool> m_notificationList; }; @@ -146,7 +146,7 @@ void MyMoneyFile::checkTransaction(const char* txt) const { checkStorage(); if(!d->m_inTransaction) { - throw new MYMONEYEXCEPTION(QString("No transaction started for %1").arg(txt)); + throw new MYMONEYEXCEPTION(TQString("No transaction started for %1").tqarg(txt)); } } @@ -175,7 +175,7 @@ void MyMoneyFile::addInstitution(MyMoneyInstitution& institution) { // perform some checks to see that the institution stuff is OK. For // now we assume that the institution must have a name, the ID is not set - // and it does not have a parent (MyMoneyFile). + // and it does not have a tqparent (MyMoneyFile). if(institution.name().length() == 0 || institution.id().length() != 0) @@ -212,7 +212,7 @@ void MyMoneyFile::modifyTransaction(const MyMoneyTransaction& transaction) // now check the splits bool loanAccountAffected = false; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following line will throw an exception if the // account does not exist @@ -229,7 +229,7 @@ void MyMoneyFile::modifyTransaction(const MyMoneyTransaction& transaction) // into amortization splits if(loanAccountAffected) { tCopy = transaction; - QValueList<MyMoneySplit> list = transaction.splits(); + TQValueList<MyMoneySplit> list = transaction.splits(); for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).action() == MyMoneySplit::ActionTransfer) { MyMoneyAccount acc = MyMoneyFile::account((*it_s).accountId()); @@ -318,7 +318,7 @@ void MyMoneyFile::modifyAccount(const MyMoneyAccount& _account) addNotification(account.id()); } -void MyMoneyFile::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent) +void MyMoneyFile::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent) { checkTransaction(__PRETTY_FUNCTION__); @@ -326,47 +326,47 @@ void MyMoneyFile::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& paren if(isStandardAccount(account.id())) throw new MYMONEYEXCEPTION("Unable to reparent the standard account groups"); - if(account.accountGroup() == parent.accountGroup() - || (account.accountType() == MyMoneyAccount::Income && parent.accountType() == MyMoneyAccount::Expense) - || (account.accountType() == MyMoneyAccount::Expense && parent.accountType() == MyMoneyAccount::Income)) { + if(account.accountGroup() == tqparent.accountGroup() + || (account.accountType() == MyMoneyAccount::Income && tqparent.accountType() == MyMoneyAccount::Expense) + || (account.accountType() == MyMoneyAccount::Expense && tqparent.accountType() == MyMoneyAccount::Income)) { - if(account.isInvest() && parent.accountType() != MyMoneyAccount::Investment) + if(account.isInvest() && tqparent.accountType() != MyMoneyAccount::Investment) throw new MYMONEYEXCEPTION("Unable to reparent Stock to non-investment account"); - if(parent.accountType() == MyMoneyAccount::Investment && !account.isInvest()) + if(tqparent.accountType() == MyMoneyAccount::Investment && !account.isInvest()) throw new MYMONEYEXCEPTION("Unable to reparent non-stock to investment account"); // clear all changed objects from cache MyMoneyNotifier notifier(this); - // keep a notification of the current parent - addNotification(account.parentAccountId()); + // keep a notification of the current tqparent + addNotification(account.tqparentAccountId()); - m_storage->reparentAccount(account, parent); + m_storage->reparentAccount(account, tqparent); - // and also keep one for the account itself and the new parent + // and also keep one for the account itself and the new tqparent addNotification(account.id()); - addNotification(parent.id()); + addNotification(tqparent.id()); } else throw new MYMONEYEXCEPTION("Unable to reparent to different account type"); } -const MyMoneyInstitution& MyMoneyFile::institution(const QString& id) const +const MyMoneyInstitution& MyMoneyFile::institution(const TQString& id) const { return d->m_cache.institution(id); } -const MyMoneyAccount& MyMoneyFile::account(const QString& id) const +const MyMoneyAccount& MyMoneyFile::account(const TQString& id) const { return d->m_cache.account(id); } -const MyMoneyAccount& MyMoneyFile::subAccountByName(const MyMoneyAccount& acc, const QString& name) const +const MyMoneyAccount& MyMoneyFile::subAccountByName(const MyMoneyAccount& acc, const TQString& name) const { static MyMoneyAccount nullAccount; - QValueList<QString>::const_iterator it_a; + TQValueList<TQString>::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { const MyMoneyAccount& sacc = account(*it_a); if(sacc.name() == name) @@ -375,7 +375,7 @@ const MyMoneyAccount& MyMoneyFile::subAccountByName(const MyMoneyAccount& acc, c return nullAccount; } -const MyMoneyAccount& MyMoneyFile::accountByName(const QString& name) const +const MyMoneyAccount& MyMoneyFile::accountByName(const TQString& name) const { return d->m_cache.accountByName(name); } @@ -389,7 +389,7 @@ void MyMoneyFile::removeTransaction(const MyMoneyTransaction& transaction) // get the engine's idea about this transaction MyMoneyTransaction tr = MyMoneyFile::transaction(transaction.id()); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; // scan the splits again to update notification list for(it_s = tr.splits().begin(); it_s != tr.splits().end(); ++it_s) { @@ -404,21 +404,21 @@ void MyMoneyFile::removeTransaction(const MyMoneyTransaction& transaction) } -bool MyMoneyFile::hasActiveSplits(const QString& id) const +bool MyMoneyFile::hasActiveSplits(const TQString& id) const { checkStorage(); return m_storage->hasActiveSplits(id); } -bool MyMoneyFile::isStandardAccount(const QString& id) const +bool MyMoneyFile::isStandardAccount(const TQString& id) const { checkStorage(); return m_storage->isStandardAccount(id); } -void MyMoneyFile::setAccountName(const QString& id, const QString& name) const +void MyMoneyFile::setAccountName(const TQString& id, const TQString& name) const { checkTransaction(__PRETTY_FUNCTION__); @@ -429,14 +429,14 @@ void MyMoneyFile::removeAccount(const MyMoneyAccount& account) { checkTransaction(__PRETTY_FUNCTION__); - MyMoneyAccount parent; + MyMoneyAccount tqparent; MyMoneyAccount acc; MyMoneyInstitution institution; - // check that the account and its parent exist + // check that the account and its tqparent exist // this will throw an exception if the id is unknown acc = MyMoneyFile::account(account.id()); - parent = MyMoneyFile::account(account.parentAccountId()); + tqparent = MyMoneyFile::account(account.tqparentAccountId()); if(!acc.institutionId().isEmpty()) institution = MyMoneyFile::institution(acc.institutionId()); @@ -452,25 +452,25 @@ void MyMoneyFile::removeAccount(const MyMoneyAccount& account) MyMoneyNotifier notifier(this); // collect all sub-ordinate accounts for notification - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = acc.accountList().begin(); it != acc.accountList().end(); ++it) addNotification(*it); - // don't forget the parent and a possible institution - addNotification(parent.id()); + // don't forget the tqparent and a possible institution + addNotification(tqparent.id()); addNotification(account.institutionId()); if(!institution.id().isEmpty()) { institution.removeAccountId(account.id()); m_storage->modifyInstitution(institution); } - acc.setInstitutionId(QString()); + acc.setInstitutionId(TQString()); m_storage->removeAccount(acc); addNotification(acc.id(), false); d->m_cache.clear(acc.id()); } -void MyMoneyFile::removeAccountList(const QStringList& account_list, unsigned int level) { +void MyMoneyFile::removeAccountList(const TQStringList& account_list, unsigned int level) { if (level > 100) throw new MYMONEYEXCEPTION("Too deep recursion in [MyMoneyFile::removeAccountList]!"); @@ -486,7 +486,7 @@ void MyMoneyFile::removeAccountList(const QStringList& account_list, unsigned in } // process all accounts in the list and test if they have transactions assigned - for (QStringList::const_iterator it = account_list.begin(); it != account_list.end(); ++it) { + for (TQStringList::const_iterator it = account_list.begin(); it != account_list.end(); ++it) { MyMoneyAccount a = m_storage->account(*it); //kdDebug() << "Deleting account '"<< a.name() << "'" << endl; @@ -503,12 +503,12 @@ void MyMoneyFile::removeAccountList(const QStringList& account_list, unsigned in } } -bool MyMoneyFile::hasOnlyUnusedAccounts(const QStringList& account_list, unsigned int level) +bool MyMoneyFile::hasOnlyUnusedAccounts(const TQStringList& account_list, unsigned int level) { if (level > 100) throw new MYMONEYEXCEPTION("Too deep recursion in [MyMoneyFile::hasOnlyUnusedAccounts]!"); // process all accounts in the list and test if they have transactions assigned - for (QStringList::const_iterator it = account_list.begin(); it != account_list.end(); ++it) { + for (TQStringList::const_iterator it = account_list.begin(); it != account_list.end(); ++it) { if (transactionCount(*it) != 0) return false; // the current account has a transaction assigned if (!hasOnlyUnusedAccounts(account(*it).accountList(), level+1)) @@ -525,14 +525,14 @@ void MyMoneyFile::removeInstitution(const MyMoneyInstitution& institution) // clear all changed objects from cache MyMoneyNotifier notifier(this); - QValueList<QString>::ConstIterator it_a; + TQValueList<TQString>::ConstIterator it_a; MyMoneyInstitution inst = MyMoneyFile::institution(institution.id()); bool blocked = signalsBlocked(); blockSignals(true); for(it_a = inst.accountList().begin(); it_a != inst.accountList().end(); ++it_a) { MyMoneyAccount acc = account(*it_a); - acc.setInstitutionId(QString()); + acc.setInstitutionId(TQString()); modifyAccount(acc); } blockSignals(blocked); @@ -542,7 +542,7 @@ void MyMoneyFile::removeInstitution(const MyMoneyInstitution& institution) addNotification(institution.id(), false); } -void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) +void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& tqparent) { checkTransaction(__PRETTY_FUNCTION__); @@ -550,7 +550,7 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) // perform some checks to see that the account stuff is OK. For // now we assume that the account must have a name, has no - // transaction and sub-accounts and parent account + // transaction and sub-accounts and tqparent account // it's own ID is not set and it does not have a pointer to (MyMoneyFile) if(account.name().length() == 0) @@ -562,16 +562,16 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) if(account.accountList().count() != 0) throw new MYMONEYEXCEPTION("New account must have no sub-accounts"); - if(!account.parentAccountId().isEmpty()) - throw new MYMONEYEXCEPTION("New account must have no parent-id"); + if(!account.tqparentAccountId().isEmpty()) + throw new MYMONEYEXCEPTION("New account must have no tqparent-id"); if(account.accountType() == MyMoneyAccount::UnknownAccountType) throw new MYMONEYEXCEPTION("Account has invalid type"); - // make sure, that the parent account exists + // make sure, that the tqparent account exists // if not, an exception is thrown. If it exists, // get a copy of the current data - MyMoneyAccount acc = MyMoneyFile::account(parent.id()); + MyMoneyAccount acc = MyMoneyFile::account(tqparent.id()); #if 0 // TODO: remove the following code as we now can have multiple accounts @@ -579,7 +579,7 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) // // check if the selected name is currently not among the child accounts // if we find one, then return it as the new account - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount a = MyMoneyFile::account(*it_a); if(account.name() == a.name()) { @@ -589,23 +589,23 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) } #endif - // FIXME: make sure, that the parent has the same type + // FIXME: make sure, that the tqparent has the same type // I left it out here because I don't know, if there is // a tight coupling between e.g. checking accounts and the // class asset. It certainly does not make sense to create an // expense account under an income account. Maybe it does, I don't know. - // We enforce, that a stock account can never be a parent and - // that the parent for a stock account must be an investment. Also, - // an investment cannot have another investment account as it's parent - if(parent.isInvest()) - throw new MYMONEYEXCEPTION("Stock account cannot be parent account"); + // We enforce, that a stock account can never be a tqparent and + // that the tqparent for a stock account must be an investment. Also, + // an investment cannot have another investment account as it's tqparent + if(tqparent.isInvest()) + throw new MYMONEYEXCEPTION("Stock account cannot be tqparent account"); - if(account.isInvest() && parent.accountType() != MyMoneyAccount::Investment) - throw new MYMONEYEXCEPTION("Stock account must have investment account as parent "); + if(account.isInvest() && tqparent.accountType() != MyMoneyAccount::Investment) + throw new MYMONEYEXCEPTION("Stock account must have investment account as tqparent "); - if(!account.isInvest() && parent.accountType() == MyMoneyAccount::Investment) - throw new MYMONEYEXCEPTION("Investment account can only have stock accounts as children"); + if(!account.isInvest() && tqparent.accountType() == MyMoneyAccount::Investment) + throw new MYMONEYEXCEPTION("Investment account can only have stock accounts as tqchildren"); // clear all changed objects from cache MyMoneyNotifier notifier(this); @@ -619,13 +619,13 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) if(!account.openingDate().isValid()) { - account.setOpeningDate(QDate::currentDate()); + account.setOpeningDate(TQDate::tqcurrentDate()); } - account.setParentAccountId(parent.id()); + account.setParentAccountId(tqparent.id()); m_storage->addAccount(account); - m_storage->addAccount(parent, account); + m_storage->addAccount(tqparent, account); if(account.institutionId().length() != 0) { institution.addAccountId(account.id()); @@ -634,7 +634,7 @@ void MyMoneyFile::addAccount(MyMoneyAccount& account, MyMoneyAccount& parent) } d->m_cache.preloadAccount(account); - addNotification(parent.id()); + addNotification(tqparent.id()); } MyMoneyTransaction MyMoneyFile::createOpeningBalanceTransaction(const MyMoneyAccount& acc, const MyMoneyMoney& balance) @@ -674,9 +674,9 @@ MyMoneyTransaction MyMoneyFile::createOpeningBalanceTransaction(const MyMoneyAcc return t; } -QString MyMoneyFile::openingBalanceTransaction(const MyMoneyAccount& acc) const +TQString MyMoneyFile::openingBalanceTransaction(const MyMoneyAccount& acc) const { - QString result; + TQString result; MyMoneySecurity currency = security(acc.currencyId()); MyMoneyAccount openAcc; @@ -694,8 +694,8 @@ QString MyMoneyFile::openingBalanceTransaction(const MyMoneyAccount& acc) const // Iterate over all the opening balance transactions for this currency MyMoneyTransactionFilter filter; filter.addAccount(openAcc.id()); - QValueList<MyMoneyTransaction> transactions = transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); while ( it_t != transactions.end() ) { try @@ -757,10 +757,10 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount_internal(const MyMoneySe throw new MYMONEYEXCEPTION("Opening balance for non currencies not supported"); MyMoneyAccount acc; - QRegExp match(QString("^%1").arg(i18n(MyMoneyFile::OpeningBalancesPrefix))); + TQRegExp match(TQString("^%1").tqarg(i18n(MyMoneyFile::OpeningBalancesPrefix))); - QValueList<MyMoneyAccount> accounts; - QValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount>::Iterator it; accountList(accounts, equity().accountList(), true); @@ -774,7 +774,7 @@ const MyMoneyAccount MyMoneyFile::openingBalanceAccount_internal(const MyMoneySe } if(acc.id().isEmpty()) { - throw new MYMONEYEXCEPTION(QString("No opening balance account for %1").arg(security.tradingSymbol())); + throw new MYMONEYEXCEPTION(TQString("No opening balance account for %1").tqarg(security.tradingSymbol())); } return acc; @@ -785,16 +785,16 @@ const MyMoneyAccount MyMoneyFile::createOpeningBalanceAccount(const MyMoneySecur checkTransaction(__PRETTY_FUNCTION__); MyMoneyAccount acc; - QString name(i18n(MyMoneyFile::OpeningBalancesPrefix)); + TQString name(i18n(MyMoneyFile::OpeningBalancesPrefix)); if(security.id() != baseCurrency().id()) { - name += QString(" (%1)").arg(security.id()); + name += TQString(" (%1)").tqarg(security.id()); } acc.setName(name); acc.setAccountType(MyMoneyAccount::Equity); acc.setCurrencyId(security.id()); - MyMoneyAccount parent = equity(); - this->addAccount(acc, parent); + MyMoneyAccount tqparent = equity(); + this->addAccount(acc, tqparent); return acc; } @@ -819,7 +819,7 @@ void MyMoneyFile::addTransaction(MyMoneyTransaction& transaction) // now check the splits bool loanAccountAffected = false; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following line will throw an exception if the // account does not exist or is one of the standard accounts @@ -835,7 +835,7 @@ void MyMoneyFile::addTransaction(MyMoneyTransaction& transaction) // change transfer splits between asset/liability and loan accounts // into amortization splits if(loanAccountAffected) { - QValueList<MyMoneySplit> list = transaction.splits(); + TQValueList<MyMoneySplit> list = transaction.splits(); for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).action() == MyMoneySplit::ActionTransfer) { MyMoneyAccount acc = MyMoneyFile::account((*it_s).accountId()); @@ -864,14 +864,14 @@ void MyMoneyFile::addTransaction(MyMoneyTransaction& transaction) } } -const MyMoneyTransaction MyMoneyFile::transaction(const QString& id) const +const MyMoneyTransaction MyMoneyFile::transaction(const TQString& id) const { checkStorage(); return m_storage->transaction(id); } -const MyMoneyTransaction MyMoneyFile::transaction(const QString& account, const int idx) const +const MyMoneyTransaction MyMoneyFile::transaction(const TQString& account, const int idx) const { checkStorage(); @@ -890,12 +890,12 @@ void MyMoneyFile::addPayee(MyMoneyPayee& payee) d->m_cache.preloadPayee(payee); } -const MyMoneyPayee& MyMoneyFile::payee(const QString& id) const +const MyMoneyPayee& MyMoneyFile::payee(const TQString& id) const { return d->m_cache.payee(id); } -const MyMoneyPayee& MyMoneyFile::payeeByName(const QString& name) const +const MyMoneyPayee& MyMoneyFile::payeeByName(const TQString& name) const { checkStorage(); @@ -926,7 +926,7 @@ void MyMoneyFile::removePayee(const MyMoneyPayee& payee) addNotification(payee.id(), false); } -void MyMoneyFile::accountList(QValueList<MyMoneyAccount>& list, const QStringList& idlist, const bool recursive) const +void MyMoneyFile::accountList(TQValueList<MyMoneyAccount>& list, const TQStringList& idlist, const bool recursive) const { if(idlist.isEmpty()) { d->m_cache.account(list); @@ -940,8 +940,8 @@ void MyMoneyFile::accountList(QValueList<MyMoneyAccount>& list, const QStringLis } #endif - QValueList<MyMoneyAccount>::Iterator it; - QValueList<MyMoneyAccount>::Iterator next; + TQValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount>::Iterator next; for(it = list.begin(); it != list.end(); ) { if(isStandardAccount( (*it).id() )) { it = list.erase(it); @@ -950,13 +950,13 @@ void MyMoneyFile::accountList(QValueList<MyMoneyAccount>& list, const QStringLis } } } else { - QValueList<MyMoneyAccount>::ConstIterator it; - QValueList<MyMoneyAccount> list_a; + TQValueList<MyMoneyAccount>::ConstIterator it; + TQValueList<MyMoneyAccount> list_a; d->m_cache.account(list_a); for(it = list_a.begin(); it != list_a.end(); ++it) { if(!isStandardAccount((*it).id())) { - if(idlist.findIndex((*it).id()) != -1) { + if(idlist.tqfindIndex((*it).id()) != -1) { list.append(*it); if(recursive == true) { accountList(list, (*it).accountList(), true); @@ -967,14 +967,14 @@ void MyMoneyFile::accountList(QValueList<MyMoneyAccount>& list, const QStringLis } } -void MyMoneyFile::institutionList(QValueList<MyMoneyInstitution>& list) const +void MyMoneyFile::institutionList(TQValueList<MyMoneyInstitution>& list) const { d->m_cache.institution(list); } -const QValueList<MyMoneyInstitution> MyMoneyFile::institutionList(void) const +const TQValueList<MyMoneyInstitution> MyMoneyFile::institutionList(void) const { - QValueList<MyMoneyInstitution> list; + TQValueList<MyMoneyInstitution> list; institutionList(list); return list; } @@ -1055,17 +1055,17 @@ const MyMoneyAccount& MyMoneyFile::equity(void) const { checkStorage(); - return d->m_cache.account (STD_ACC_EQUITY); + return d->m_cache.account (STD_ACC_ETQUITY); } -unsigned int MyMoneyFile::transactionCount(const QString& account) const +unsigned int MyMoneyFile::transactionCount(const TQString& account) const { checkStorage(); return m_storage->transactionCount(account); } -const QMap<QString, unsigned long> MyMoneyFile::transactionCountMap(void) const +const TQMap<TQString, unsigned long> MyMoneyFile::transactionCountMap(void) const { checkStorage(); @@ -1079,21 +1079,21 @@ unsigned int MyMoneyFile::institutionCount(void) const return m_storage->institutionCount(); } -const MyMoneyMoney MyMoneyFile::balance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneyFile::balance(const TQString& id, const TQDate& date) const { checkStorage(); return m_storage->balance(id, date); } -const MyMoneyMoney MyMoneyFile::totalBalance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneyFile::totalBalance(const TQString& id, const TQDate& date) const { checkStorage(); return m_storage->totalBalance(id, date); } -void MyMoneyFile::warningMissingRate(const QString& fromId, const QString& toId) const +void MyMoneyFile::warningMissingRate(const TQString& fromId, const TQString& toId) const { MyMoneySecurity from, to; try { @@ -1109,7 +1109,7 @@ void MyMoneyFile::warningMissingRate(const QString& fromId, const QString& toId) void MyMoneyFile::notify(void) { - QMap<QString, bool>::ConstIterator it; + TQMap<TQString, bool>::ConstIterator it; for(it = d->m_notificationList.begin(); it != d->m_notificationList.end(); ++it) { if(*it) d->m_cache.refresh(it.key()); @@ -1119,7 +1119,7 @@ void MyMoneyFile::notify(void) clearNotification(); } -void MyMoneyFile::addNotification(const QString& id, bool reload) +void MyMoneyFile::addNotification(const TQString& id, bool reload) { if(!id.isEmpty()) d->m_notificationList[id] = reload; @@ -1131,36 +1131,36 @@ void MyMoneyFile::clearNotification() d->m_notificationList.clear(); } -void MyMoneyFile::transactionList(QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const +void MyMoneyFile::transactionList(TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const { checkStorage(); m_storage->transactionList(list, filter); } -void MyMoneyFile::transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const +void MyMoneyFile::transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const { checkStorage(); m_storage->transactionList(list, filter); } -const QValueList<MyMoneyTransaction> MyMoneyFile::transactionList(MyMoneyTransactionFilter& filter) const +const TQValueList<MyMoneyTransaction> MyMoneyFile::transactionList(MyMoneyTransactionFilter& filter) const { - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; transactionList(list, filter); return list; } -const QValueList<MyMoneyPayee> MyMoneyFile::payeeList(void) const +const TQValueList<MyMoneyPayee> MyMoneyFile::payeeList(void) const { - QValueList<MyMoneyPayee> list; + TQValueList<MyMoneyPayee> list; d->m_cache.payee(list); return list; } -QString MyMoneyFile::accountToCategory(const QString& accountId, bool includeStandardAccounts) const +TQString MyMoneyFile::accountToCategory(const TQString& accountId, bool includeStandardAccounts) const { MyMoneyAccount acc; - QString rc; + TQString rc; if(!accountId.isEmpty()) { acc = account(accountId); @@ -1168,15 +1168,15 @@ QString MyMoneyFile::accountToCategory(const QString& accountId, bool includeSta if(!rc.isEmpty()) rc = AccountSeperator + rc; rc = acc.name() + rc; - acc = account(acc.parentAccountId()); + acc = account(acc.tqparentAccountId()); } while(!acc.id().isEmpty() && (includeStandardAccounts || !isStandardAccount(acc.id()))); } return rc; } -QString MyMoneyFile::categoryToAccount(const QString& category, MyMoneyAccount::accountTypeE type) const +TQString MyMoneyFile::categoryToAccount(const TQString& category, MyMoneyAccount::accountTypeE type) const { - QString id; + TQString id; // search the category in the expense accounts and if it is not found, try // to locate it in the income accounts @@ -1193,9 +1193,9 @@ QString MyMoneyFile::categoryToAccount(const QString& category, MyMoneyAccount:: return id; } -QString MyMoneyFile::nameToAccount(const QString& name) const +TQString MyMoneyFile::nameToAccount(const TQString& name) const { - QString id; + TQString id; // search the category in the asset accounts and if it is not found, try // to locate it in the liability accounts @@ -1206,20 +1206,20 @@ QString MyMoneyFile::nameToAccount(const QString& name) const return id; } -QString MyMoneyFile::parentName(const QString& name) const +TQString MyMoneyFile::tqparentName(const TQString& name) const { return name.section(AccountSeperator, 0, -2); } -QString MyMoneyFile::locateSubAccount(const MyMoneyAccount& base, const QString& category) const +TQString MyMoneyFile::locateSubAccount(const MyMoneyAccount& base, const TQString& category) const { MyMoneyAccount nextBase; - QString level, remainder; + TQString level, remainder; level = category.section(AccountSeperator, 0, 0); remainder = category.section(AccountSeperator, 1); - QStringList list = base.accountList(); - QStringList::ConstIterator it_a; + TQStringList list = base.accountList(); + TQStringList::ConstIterator it_a; for(it_a = list.begin(); it_a != list.end(); ++it_a) { nextBase = account(*it_a); @@ -1230,17 +1230,17 @@ QString MyMoneyFile::locateSubAccount(const MyMoneyAccount& base, const QString& return locateSubAccount(nextBase, remainder); } } - return QString(); + return TQString(); } -QString MyMoneyFile::value(const QString& key) const +TQString MyMoneyFile::value(const TQString& key) const { checkStorage(); return m_storage->value(key); } -void MyMoneyFile::setValue(const QString& key, const QString& val) +void MyMoneyFile::setValue(const TQString& key, const TQString& val) { checkTransaction(__PRETTY_FUNCTION__); @@ -1250,7 +1250,7 @@ void MyMoneyFile::setValue(const QString& key, const QString& val) m_storage->setValue(key, val); } -void MyMoneyFile::deletePair(const QString& key) +void MyMoneyFile::deletePair(const TQString& key) { checkTransaction(__PRETTY_FUNCTION__); @@ -1265,7 +1265,7 @@ void MyMoneyFile::addSchedule(MyMoneySchedule& sched) checkTransaction(__PRETTY_FUNCTION__); MyMoneyTransaction transaction = sched.transaction(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following line will throw an exception if the // account does not exist or is one of the standard accounts @@ -1287,7 +1287,7 @@ void MyMoneyFile::modifySchedule(const MyMoneySchedule& sched) checkTransaction(__PRETTY_FUNCTION__); MyMoneyTransaction transaction = sched.transaction(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following line will throw an exception if the // account does not exist or is one of the standard accounts @@ -1318,18 +1318,18 @@ void MyMoneyFile::removeSchedule(const MyMoneySchedule& sched) addNotification(sched.id(), false); } -const MyMoneySchedule MyMoneyFile::schedule(const QString& id) const +const MyMoneySchedule MyMoneyFile::schedule(const TQString& id) const { return d->m_cache.schedule(id); } -const QValueList<MyMoneySchedule> MyMoneyFile::scheduleList( - const QString& accountId, +const TQValueList<MyMoneySchedule> MyMoneyFile::scheduleList( + const TQString& accountId, const MyMoneySchedule::typeE type, const MyMoneySchedule::occurenceE occurence, const MyMoneySchedule::paymentTypeE paymentType, - const QDate& startDate, - const QDate& endDate, + const TQDate& startDate, + const TQDate& endDate, const bool overdue) const { checkStorage(); @@ -1338,29 +1338,29 @@ const QValueList<MyMoneySchedule> MyMoneyFile::scheduleList( } -const QStringList MyMoneyFile::consistencyCheck(void) +const TQStringList MyMoneyFile::consistencyCheck(void) { - QValueList<MyMoneyAccount> list; - QValueList<MyMoneyAccount>::Iterator it_a; - QValueList<MyMoneySchedule>::Iterator it_sch; - QValueList<MyMoneyPayee>::Iterator it_p; - QValueList<MyMoneyTransaction>::Iterator it_t; - QValueList<MyMoneyReport>::Iterator it_r; - QStringList accountRebuild; - QStringList::ConstIterator it_c; + TQValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount>::Iterator it_a; + TQValueList<MyMoneySchedule>::Iterator it_sch; + TQValueList<MyMoneyPayee>::Iterator it_p; + TQValueList<MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneyReport>::Iterator it_r; + TQStringList accountRebuild; + TQStringList::ConstIterator it_c; - QMap<QString, bool> interestAccounts; + TQMap<TQString, bool> interestAccounts; - MyMoneyAccount parent; + MyMoneyAccount tqparent; MyMoneyAccount child; MyMoneyAccount toplevel; - QString parentId; - QStringList rc; + TQString tqparentId; + TQStringList rc; int problemCount = 0; int unfixedCount = 0; - QString problemAccount; + TQString problemAccount; // check that we have a storage object checkTransaction(__PRETTY_FUNCTION__); @@ -1404,27 +1404,27 @@ const QStringList MyMoneyFile::consistencyCheck(void) } // check for loops in the hierarchy - parentId = (*it_a).parentAccountId(); + tqparentId = (*it_a).tqparentAccountId(); try { bool dropOut = false; - while(!isStandardAccount(parentId) && !dropOut) { - parent = account(parentId); - if(parent.id() == (*it_a).id()) { - // parent loops, so we need to re-parent to toplevel account - // find parent account in our list + while(!isStandardAccount(tqparentId) && !dropOut) { + tqparent = account(tqparentId); + if(tqparent.id() == (*it_a).id()) { + // tqparent loops, so we need to re-tqparent to toplevel account + // find tqparent account in our list problemCount++; - QValueList<MyMoneyAccount>::Iterator it_b; + TQValueList<MyMoneyAccount>::Iterator it_b; for(it_b = list.begin(); it_b != list.end(); ++it_b) { - if((*it_b).id() == parent.id()) { + if((*it_b).id() == tqparent.id()) { if(problemAccount != (*it_a).name()) { problemAccount = (*it_a).name(); - rc << i18n("* Problem with account '%1'").arg(problemAccount); - rc << i18n(" * Loop detected between this account and account '%2'.").arg((*it_b).name()); - rc << i18n(" Reparenting account '%2' to top level account '%1'.").arg(toplevel.name(), (*it_a).name()); + rc << i18n("* Problem with account '%1'").tqarg(problemAccount); + rc << i18n(" * Loop detected between this account and account '%2'.").tqarg((*it_b).name()); + rc << i18n(" Retqparenting account '%2' to top level account '%1'.").tqarg(toplevel.name(), (*it_a).name()); (*it_a).setParentAccountId(toplevel.id()); - if(accountRebuild.contains(toplevel.id()) == 0) + if(accountRebuild.tqcontains(toplevel.id()) == 0) accountRebuild << toplevel.id(); - if(accountRebuild.contains((*it_a).id()) == 0) + if(accountRebuild.tqcontains((*it_a).id()) == 0) accountRebuild << (*it_a).id(); dropOut = true; break; @@ -1432,70 +1432,70 @@ const QStringList MyMoneyFile::consistencyCheck(void) } } } - parentId = parent.parentAccountId(); + tqparentId = tqparent.tqparentAccountId(); } } catch(MyMoneyException *e) { - // if we don't know about a parent, we catch it later + // if we don't know about a tqparent, we catch it later delete e; } - // check that the parent exists - parentId = (*it_a).parentAccountId(); + // check that the tqparent exists + tqparentId = (*it_a).tqparentAccountId(); try { - parent = account(parentId); - if((*it_a).accountGroup() != parent.accountGroup()) { + tqparent = account(tqparentId); + if((*it_a).accountGroup() != tqparent.accountGroup()) { problemCount++; if(problemAccount != (*it_a).name()) { problemAccount = (*it_a).name(); - rc << i18n("* Problem with account '%1'").arg(problemAccount); + rc << i18n("* Problem with account '%1'").tqarg(problemAccount); } - // the parent belongs to a different group, so we reconnect to the + // the tqparent belongs to a different group, so we reconnect to the // master group account (asset, liability, etc) to which this account // should belong and update it in the engine. - rc << i18n(" * Parent account '%1' belongs to a different group.").arg(parent.name()); - rc << i18n(" New parent account is the top level account '%1'.").arg(toplevel.name()); + rc << i18n(" * Parent account '%1' belongs to a different group.").tqarg(tqparent.name()); + rc << i18n(" New tqparent account is the top level account '%1'.").tqarg(toplevel.name()); (*it_a).setParentAccountId(toplevel.id()); // make sure to rebuild the sub-accounts of the top account // and the one we removed this account from - if(accountRebuild.contains(toplevel.id()) == 0) + if(accountRebuild.tqcontains(toplevel.id()) == 0) accountRebuild << toplevel.id(); - if(accountRebuild.contains(parent.id()) == 0) - accountRebuild << parent.id(); - } else if(!parent.accountList().contains((*it_a).id())) { + if(accountRebuild.tqcontains(tqparent.id()) == 0) + accountRebuild << tqparent.id(); + } else if(!tqparent.accountList().tqcontains((*it_a).id())) { problemCount++; if(problemAccount != (*it_a).name()) { problemAccount = (*it_a).name(); - rc << i18n("* Problem with account '%1'").arg(problemAccount); + rc << i18n("* Problem with account '%1'").tqarg(problemAccount); } - // parent exists, but does not have a reference to the account - rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").arg(parent.name(), problemAccount); - if(accountRebuild.contains(parent.id()) == 0) - accountRebuild << parent.id(); + // tqparent exists, but does not have a reference to the account + rc << i18n(" * Parent account '%1' does not contain '%2' as sub-account.").tqarg(tqparent.name(), problemAccount); + if(accountRebuild.tqcontains(tqparent.id()) == 0) + accountRebuild << tqparent.id(); } } catch(MyMoneyException *e) { delete e; - // apparently, the parent does not exist anymore. we reconnect to the + // aptqparently, the tqparent does not exist anymore. we reconnect to the // master group account (asset, liability, etc) to which this account // should belong and update it in the engine. problemCount++; if(problemAccount != (*it_a).name()) { problemAccount = (*it_a).name(); - rc << i18n("* Problem with account '%1'").arg(problemAccount); + rc << i18n("* Problem with account '%1'").tqarg(problemAccount); } - rc << i18n(" * The parent with id %1 does not exist anymore.").arg(parentId); - rc << i18n(" New parent account is the top level account '%1'.").arg(toplevel.name()); + rc << i18n(" * The tqparent with id %1 does not exist anymore.").tqarg(tqparentId); + rc << i18n(" New tqparent account is the top level account '%1'.").tqarg(toplevel.name()); (*it_a).setParentAccountId(toplevel.id()); addNotification((*it_a).id()); // make sure to rebuild the sub-accounts of the top account - if(accountRebuild.contains(toplevel.id()) == 0) + if(accountRebuild.tqcontains(toplevel.id()) == 0) accountRebuild << toplevel.id(); } - // now check that all the children exist and have the correct type + // now check that all the tqchildren exist and have the correct type for(it_c = (*it_a).accountList().begin(); it_c != (*it_a).accountList().end(); ++it_c) { // check that the child exists try { @@ -1504,11 +1504,11 @@ const QStringList MyMoneyFile::consistencyCheck(void) problemCount++; if(problemAccount != (*it_a).name()) { problemAccount = (*it_a).name(); - rc << i18n("* Problem with account '%1'").arg(problemAccount); + rc << i18n("* Problem with account '%1'").tqarg(problemAccount); } - rc << i18n(" * Child account with id %1 does not exist anymore.").arg(*it_c); + rc << i18n(" * Child account with id %1 does not exist anymore.").tqarg(*it_c); rc << i18n(" The child account list will be reconstructed."); - if(accountRebuild.contains((*it_a).id()) == 0) + if(accountRebuild.tqcontains((*it_a).id()) == 0) accountRebuild << (*it_a).id(); } } @@ -1539,8 +1539,8 @@ const QStringList MyMoneyFile::consistencyCheck(void) // clear the affected lists for(it_a = list.begin(); it_a != list.end(); ++it_a) { - if(accountRebuild.contains((*it_a).id())) { - rc << QString(" %1").arg((*it_a).name()); + if(accountRebuild.tqcontains((*it_a).id())) { + rc << TQString(" %1").tqarg((*it_a).name()); // clear the account list for(it_c = (*it_a).accountList().begin(); it_c != (*it_a).accountList().end();) { (*it_a).removeAccountId(*it_c); @@ -1551,11 +1551,11 @@ const QStringList MyMoneyFile::consistencyCheck(void) // reconstruct the lists for(it_a = list.begin(); it_a != list.end(); ++it_a) { - QValueList<MyMoneyAccount>::Iterator it; - parentId = (*it_a).parentAccountId(); - if(accountRebuild.contains(parentId)) { + TQValueList<MyMoneyAccount>::Iterator it; + tqparentId = (*it_a).tqparentAccountId(); + if(accountRebuild.tqcontains(tqparentId)) { for(it = list.begin(); it != list.end(); ++it) { - if((*it).id() == parentId) { + if((*it).id() == tqparentId) { (*it).addAccountId((*it_a).id()); break; } @@ -1565,21 +1565,21 @@ const QStringList MyMoneyFile::consistencyCheck(void) // update the engine objects for(it_a = list.begin(); it_a != list.end(); ++it_a) { - if(accountRebuild.contains((*it_a).id())) { + if(accountRebuild.tqcontains((*it_a).id())) { try { m_storage->modifyAccount(*it_a, true); addNotification((*it_a).id()); } catch (MyMoneyException *e) { delete e; - rc << i18n(" * Unable to update account data for account %1 in engine").arg((*it_a).name()); + rc << i18n(" * Unable to update account data for account %1 in engine").tqarg((*it_a).name()); } } } // For some reason, files exist with invalid ids. This has been found in the payee id // so we fix them here - QValueList<MyMoneyPayee> pList = payeeList(); - QMap<QString, QString>payeeConversionMap; + TQValueList<MyMoneyPayee> pList = payeeList(); + TQMap<TQString, TQString>payeeConversionMap; for(it_p = pList.begin(); it_p != pList.end(); ++it_p) { if((*it_p).id().length() > 7) { @@ -1589,20 +1589,20 @@ const QStringList MyMoneyFile::consistencyCheck(void) payee.clearId(); m_storage->addPayee(payee); payeeConversionMap[(*it_p).id()] = payee.id(); - rc << i18n(" * Payee %1 recreated with fixed id").arg(payee.name()); + rc << i18n(" * Payee %1 recreated with fixed id").tqarg(payee.name()); ++problemCount; } } // Fix the transactions - QValueList<MyMoneyTransaction> tList; + TQValueList<MyMoneyTransaction> tList; MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); m_storage->transactionList(tList, filter); // Generate the list of interest accounts for(it_t = tList.begin(); it_t != tList.end(); ++it_t) { const MyMoneyTransaction& t = (*it_t); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).action() == MyMoneySplit::ActionInterest) interestAccounts[(*it_s).accountId()] = true; @@ -1610,15 +1610,15 @@ const QStringList MyMoneyFile::consistencyCheck(void) } for(it_t = tList.begin(); it_t != tList.end(); ++it_t) { MyMoneyTransaction t = (*it_t); - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; bool tChanged = false; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { bool sChanged = false; MyMoneySplit s = (*it_s); - if(payeeConversionMap.find((*it_s).payeeId()) != payeeConversionMap.end()) { + if(payeeConversionMap.tqfind((*it_s).payeeId()) != payeeConversionMap.end()) { s.setPayeeId(payeeConversionMap[s.payeeId()]); sChanged = true; - rc << i18n(" * Payee id updated in split of transaction '%1'.").arg(t.id()); + rc << i18n(" * Payee id updated in split of transaction '%1'.").tqarg(t.id()); ++problemCount; } @@ -1631,27 +1631,27 @@ const QStringList MyMoneyFile::consistencyCheck(void) // use the value as master if the transaction is balanced if(t.splitSum().isZero()) { s.setShares(s.value()); - rc << i18n(" * shares set to value in split of transaction '%1'.").arg(t.id()); + rc << i18n(" * shares set to value in split of transaction '%1'.").tqarg(t.id()); } else { s.setValue(s.shares()); - rc << i18n(" * value set to shares in split of transaction '%1'.").arg(t.id()); + rc << i18n(" * value set to shares in split of transaction '%1'.").tqarg(t.id()); } sChanged = true; ++problemCount; } } catch(MyMoneyException *e) { - rc << i18n(" * Split %2 in transaction '%1' contains a reference to invalid account %3. Please fix manually.").arg(t.id(), (*it_s).id(), (*it_s).accountId()); + rc << i18n(" * Split %2 in transaction '%1' contains a reference to invalid account %3. Please fix manually.").tqarg(t.id(), (*it_s).id(), (*it_s).accountId()); ++problemCount; ++unfixedCount; delete e; } // make sure the interest splits are marked correct as such - if(interestAccounts.find(s.accountId()) != interestAccounts.end() + if(interestAccounts.tqfind(s.accountId()) != interestAccounts.end() && s.action() != MyMoneySplit::ActionInterest) { s.setAction(MyMoneySplit::ActionInterest); sChanged = true; - rc << i18n(" * action marked as interest in split of transaction '%1'.").arg(t.id()); + rc << i18n(" * action marked as interest in split of transaction '%1'.").tqarg(t.id()); ++problemCount; } @@ -1666,34 +1666,34 @@ const QStringList MyMoneyFile::consistencyCheck(void) } // Fix the schedules - QValueList<MyMoneySchedule> schList = scheduleList(); + TQValueList<MyMoneySchedule> schList = scheduleList(); for(it_sch = schList.begin(); it_sch != schList.end(); ++it_sch) { MyMoneySchedule sch = (*it_sch); MyMoneyTransaction t = sch.transaction(); bool tChanged = false; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { MyMoneySplit s = (*it_s); bool sChanged = false; - if(payeeConversionMap.find((*it_s).payeeId()) != payeeConversionMap.end()) { + if(payeeConversionMap.tqfind((*it_s).payeeId()) != payeeConversionMap.end()) { s.setPayeeId(payeeConversionMap[s.payeeId()]); sChanged = true; - rc << i18n(" * Payee id updated in split of schedule '%1'.").arg((*it_sch).name()); + rc << i18n(" * Payee id updated in split of schedule '%1'.").tqarg((*it_sch).name()); ++problemCount; } if(!(*it_s).value().isZero() && (*it_s).shares().isZero()) { s.setShares(s.value()); sChanged = true; - rc << i18n(" * Split in scheduled transaction '%1' contained value != 0 and shares == 0.").arg((*it_sch).name()); + rc << i18n(" * Split in scheduled transaction '%1' contained value != 0 and shares == 0.").tqarg((*it_sch).name()); rc << i18n(" Shares set to value."); ++problemCount; } // make sure, we don't have a bankid stored with a split in a schedule if(!(*it_s).bankID().isEmpty()) { - s.setBankID(QString()); + s.setBankID(TQString()); sChanged = true; - rc << i18n(" * Removed bankid from split in scheduled transaction '%1'.").arg((*it_sch).name()); + rc << i18n(" * Removed bankid from split in scheduled transaction '%1'.").tqarg((*it_sch).name()); ++problemCount; } @@ -1706,16 +1706,16 @@ const QStringList MyMoneyFile::consistencyCheck(void) // use the value as master if the transaction is balanced if(t.splitSum().isZero()) { s.setShares(s.value()); - rc << i18n(" * shares set to value in split in schedule '%1'.").arg((*it_sch).name()); + rc << i18n(" * shares set to value in split in schedule '%1'.").tqarg((*it_sch).name()); } else { s.setValue(s.shares()); - rc << i18n(" * value set to shares in split in schedule '%1'.").arg((*it_sch).name()); + rc << i18n(" * value set to shares in split in schedule '%1'.").tqarg((*it_sch).name()); } sChanged = true; ++problemCount; } } catch(MyMoneyException *e) { - rc << i18n(" * Split %2 in schedule '%1' contains a reference to invalid account %3. Please fix manually.").arg((*it_sch).name(), (*it_s).id(), (*it_s).accountId()); + rc << i18n(" * Split %2 in schedule '%1' contains a reference to invalid account %3. Please fix manually.").tqarg((*it_sch).name(), (*it_s).id(), (*it_s).accountId()); ++problemCount; ++unfixedCount; delete e; @@ -1732,16 +1732,16 @@ const QStringList MyMoneyFile::consistencyCheck(void) } // Fix the reports - QValueList<MyMoneyReport> rList = reportList(); + TQValueList<MyMoneyReport> rList = reportList(); for(it_r = rList.begin(); it_r != rList.end(); ++it_r) { MyMoneyReport r = *it_r; - QStringList pList; - QStringList::Iterator it_p; + TQStringList pList; + TQStringList::Iterator it_p; (*it_r).payees(pList); bool rChanged = false; for(it_p = pList.begin(); it_p != pList.end(); ++it_p) { - if(payeeConversionMap.find(*it_p) != payeeConversionMap.end()) { - rc << i18n(" * Payee id updated in report '%1'.").arg((*it_r).name()); + if(payeeConversionMap.tqfind(*it_p) != payeeConversionMap.end()) { + rc << i18n(" * Payee id updated in report '%1'.").tqarg((*it_r).name()); ++problemCount; r.removeReference(*it_p); r.addPayee(payeeConversionMap[*it_p]); @@ -1754,11 +1754,11 @@ const QStringList MyMoneyFile::consistencyCheck(void) } // erase old payee ids - QMap<QString, QString>::Iterator it_m; + TQMap<TQString, TQString>::Iterator it_m; for(it_m = payeeConversionMap.begin(); it_m != payeeConversionMap.end(); ++it_m) { MyMoneyPayee payee = this->payee(it_m.key()); removePayee(payee); - rc << i18n(" * Payee '%1' removed.").arg(payee.id()); + rc << i18n(" * Payee '%1' removed.").tqarg(payee.id()); ++problemCount; } @@ -1768,23 +1768,23 @@ const QStringList MyMoneyFile::consistencyCheck(void) rc << i18n("Finish! Data is consistent."); else rc << i18n("Finish! %1 problem(s) corrected. %2 problem(s) still present.") - .arg(problemCount).arg(unfixedCount); + .tqarg(problemCount).tqarg(unfixedCount); return rc; } -QString MyMoneyFile::createCategory(const MyMoneyAccount& base, const QString& name) +TQString MyMoneyFile::createCategory(const MyMoneyAccount& base, const TQString& name) { checkTransaction(__PRETTY_FUNCTION__); - MyMoneyAccount parent = base; - QString categoryText; + MyMoneyAccount tqparent = base; + TQString categoryText; if(base.id() != expense().id() && base.id() != income().id()) throw new MYMONEYEXCEPTION("Invalid base category"); - QStringList subAccounts = QStringList::split(AccountSeperator, name); - QStringList::Iterator it; + TQStringList subAccounts = TQStringList::split(AccountSeperator, name); + TQStringList::Iterator it; for (it = subAccounts.begin(); it != subAccounts.end(); ++it) { MyMoneyAccount categoryAccount; @@ -1800,9 +1800,9 @@ QString MyMoneyFile::createCategory(const MyMoneyAccount& base, const QString& n // Only create the account if it doesn't exist try { - QString categoryId = categoryToAccount(categoryText); + TQString categoryId = categoryToAccount(categoryText); if (categoryId.isEmpty()) - addAccount(categoryAccount, parent); + addAccount(categoryAccount, tqparent); else { categoryAccount = account(categoryId); @@ -1812,23 +1812,23 @@ QString MyMoneyFile::createCategory(const MyMoneyAccount& base, const QString& n { qDebug("Unable to add account %s, %s, %s: %s", categoryAccount.name().latin1(), - parent.name().latin1(), + tqparent.name().latin1(), categoryText.latin1(), e->what().latin1()); delete e; } - parent = categoryAccount; + tqparent = categoryAccount; } return categoryToAccount(name); } -const QValueList<MyMoneySchedule> MyMoneyFile::scheduleListEx( int scheduleTypes, +const TQValueList<MyMoneySchedule> MyMoneyFile::scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts) const + TQDate startDate, + const TQStringList& accounts) const { checkStorage(); @@ -1871,7 +1871,7 @@ void MyMoneyFile::removeSecurity(const MyMoneySecurity& security) addNotification(security.id(), false); } -const MyMoneySecurity& MyMoneyFile::security(const QString& id) const +const MyMoneySecurity& MyMoneyFile::security(const TQString& id) const { if(id.isEmpty()) return baseCurrency(); @@ -1879,7 +1879,7 @@ const MyMoneySecurity& MyMoneyFile::security(const QString& id) const return d->m_cache.security(id); } -const QValueList<MyMoneySecurity> MyMoneyFile::securityList(void) const +const TQValueList<MyMoneySecurity> MyMoneyFile::securityList(void) const { checkStorage(); @@ -1933,7 +1933,7 @@ void MyMoneyFile::removeCurrency(const MyMoneySecurity& currency) addNotification(currency.id(), false); } -const MyMoneySecurity& MyMoneyFile::currency(const QString& id) const +const MyMoneySecurity& MyMoneyFile::currency(const TQString& id) const { if(id.isEmpty()) return baseCurrency(); @@ -1944,14 +1944,14 @@ const MyMoneySecurity& MyMoneyFile::currency(const QString& id) const return curr; } -const QValueList<MyMoneySecurity> MyMoneyFile::currencyList(void) const +const TQValueList<MyMoneySecurity> MyMoneyFile::currencyList(void) const { checkStorage(); return m_storage->currencyList(); } -const QString& MyMoneyFile::foreignCurrency(const QString& first, const QString& second) const +const TQString& MyMoneyFile::foreignCurrency(const TQString& first, const TQString& second) const { if(baseCurrency().id() == second) return first; @@ -1961,7 +1961,7 @@ const QString& MyMoneyFile::foreignCurrency(const QString& first, const QString& const MyMoneySecurity& MyMoneyFile::baseCurrency(void) const { if(d->m_baseCurrency.id().isEmpty()) { - QString id = QString(value("kmm-baseCurrency")); + TQString id = TQString(value("kmm-baseCurrency")); if(!id.isEmpty()) d->m_baseCurrency = currency(id); } @@ -1986,7 +1986,7 @@ void MyMoneyFile::setBaseCurrency(const MyMoneySecurity& curr) void MyMoneyFile::addPrice(const MyMoneyPrice& price) { - if(price.rate(QString()).isZero()) + if(price.rate(TQString()).isZero()) return; checkTransaction(__PRETTY_FUNCTION__); @@ -2007,11 +2007,11 @@ void MyMoneyFile::removePrice(const MyMoneyPrice& price) m_storage->removePrice(price); } -const MyMoneyPrice MyMoneyFile::price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const +const MyMoneyPrice MyMoneyFile::price(const TQString& fromId, const TQString& toId, const TQDate& date, const bool exactDate) const { checkStorage(); - QString to(toId); + TQString to(toId); if(to.isEmpty()) to = value("kmm-baseCurrency"); // if some id is missing, we can return an empty price object @@ -2039,11 +2039,11 @@ const MyMoneyPriceList MyMoneyFile::priceList(void) const return m_storage->priceList(); } -bool MyMoneyFile::hasAccount(const QString& id, const QString& name) const +bool MyMoneyFile::hasAccount(const TQString& id, const TQString& name) const { MyMoneyAccount acc = d->m_cache.account(id); - QStringList list = acc.accountList(); - QStringList::ConstIterator it; + TQStringList list = acc.accountList(); + TQStringList::ConstIterator it; bool rc = false; for(it = list.begin(); rc == false && it != list.end(); ++it) { MyMoneyAccount a = d->m_cache.account(*it); @@ -2053,7 +2053,7 @@ bool MyMoneyFile::hasAccount(const QString& id, const QString& name) const return rc; } -const QValueList<MyMoneyReport> MyMoneyFile::reportList( void ) const +const TQValueList<MyMoneyReport> MyMoneyFile::reportList( void ) const { checkStorage(); @@ -2089,7 +2089,7 @@ unsigned MyMoneyFile::countReports(void) const return m_storage->countReports(); } -const MyMoneyReport MyMoneyFile::report( const QString& id ) const +const MyMoneyReport MyMoneyFile::report( const TQString& id ) const { checkStorage(); @@ -2107,7 +2107,7 @@ void MyMoneyFile::removeReport(const MyMoneyReport& report) } -const QValueList<MyMoneyBudget> MyMoneyFile::budgetList( void ) const +const TQValueList<MyMoneyBudget> MyMoneyFile::budgetList( void ) const { checkStorage(); @@ -2124,7 +2124,7 @@ void MyMoneyFile::addBudget( MyMoneyBudget& budget ) m_storage->addBudget( budget ); } -const MyMoneyBudget MyMoneyFile::budgetByName(const QString& name) const +const MyMoneyBudget MyMoneyFile::budgetByName(const TQString& name) const { checkStorage(); @@ -2150,7 +2150,7 @@ unsigned MyMoneyFile::countBudgets(void) const return m_storage->countBudgets(); } -const MyMoneyBudget MyMoneyFile::budget( const QString& id ) const +const MyMoneyBudget MyMoneyFile::budget( const TQString& id ) const { checkStorage(); @@ -2175,17 +2175,17 @@ bool MyMoneyFile::isReferenced(const MyMoneyObject& obj, const MyMoneyFileBitArr return m_storage->isReferenced(obj, skipChecks); } -bool MyMoneyFile::checkNoUsed(const QString& accId, const QString& no) const +bool MyMoneyFile::checkNoUsed(const TQString& accId, const TQString& no) const { // by definition, an empty string or a non-numeric string is not used - QRegExp exp(QString("(.*\\D)?(\\d+)(\\D.*)?")); + TQRegExp exp(TQString("(.*\\D)?(\\d+)(\\D.*)?")); if(no.isEmpty() || exp.search(no) == -1) return false; MyMoneyTransactionFilter filter; filter.addAccount(accId); - QValueList<MyMoneyTransaction> transactions = transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); while ( it_t != transactions.end() ) { try { MyMoneySplit split; @@ -2202,14 +2202,14 @@ bool MyMoneyFile::checkNoUsed(const QString& accId, const QString& no) const return false; } -QString MyMoneyFile::highestCheckNo(const QString& accId) const +TQString MyMoneyFile::highestCheckNo(const TQString& accId) const { unsigned64 lno = 0, cno; - QString no; + TQString no; MyMoneyTransactionFilter filter; filter.addAccount(accId); - QValueList<MyMoneyTransaction> transactions = transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); while ( it_t != transactions.end() ) { try { // Test whether the transaction also includes a split into @@ -2243,7 +2243,7 @@ void MyMoneyFile::preloadCache(void) checkStorage(); d->m_cache.clear(); - QValueList<MyMoneyAccount> a_list; + TQValueList<MyMoneyAccount> a_list; m_storage->accountList(a_list); d->m_cache.preloadAccount(a_list); d->m_cache.preloadPayee(m_storage->payeeList()); @@ -2256,7 +2256,7 @@ bool MyMoneyFile::isTransfer(const MyMoneyTransaction& t) const { bool rc = false; if(t.splitCount() == 2) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { MyMoneyAccount acc = account((*it_s).accountId()); if(acc.isIncomeExpense()) @@ -2270,8 +2270,8 @@ bool MyMoneyFile::isTransfer(const MyMoneyTransaction& t) const bool MyMoneyFile::referencesClosedAccount(const MyMoneyTransaction& t) const { - QValueList<MyMoneySplit>::const_iterator it_s; - const QValueList<MyMoneySplit>& list = t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& list = t.splits(); for(it_s = list.begin(); it_s != list.end(); ++it_s) { if(referencesClosedAccount(*it_s)) break; diff --git a/kmymoney2/mymoney/mymoneyfile.h b/kmymoney2/mymoney/mymoneyfile.h index 39552c9..c59f9da 100644 --- a/kmymoney2/mymoney/mymoneyfile.h +++ b/kmymoney2/mymoney/mymoneyfile.h @@ -24,10 +24,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qstring.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -90,22 +90,22 @@ class MyMoneyTransactionFilter; * general account maintenance functions. The method reparentAccount() is * available to move an account from one superordinate account to another. * account() and accountList() are used to retrieve a single instance or a - * QValueList of MyMoneyAccount objects. + * TQValueList of MyMoneyAccount objects. * * The methods addInstitution(), modifyInstitution() and removeInstitution() * implement the general institution maintenance functions. institution() and * institutionList() are used to retrieve a single instance or a - * QValueList of MyMoneyInstitution objects. + * TQValueList of MyMoneyInstitution objects. * * The methods addPayee(), modifyPayee() and removePayee() * implement the general institution maintenance functions. * payee() and payeeList() are used to retrieve a single instance or a - * QValueList of MyMoneyPayee objects. + * TQValueList of MyMoneyPayee objects. * * The methods addTransaction(), modifyTransaction() and removeTransaction() * implement the general transaction maintenance functions. * transaction() and transactionList() are used to retrieve - * a single instance or a QValueList of MyMoneyTransaction objects. + * a single instance or a TQValueList of MyMoneyTransaction objects. * * The methods addSecurity(), modifySecurity() and removeSecurity() * implement the general access to equities held in the engine. @@ -134,9 +134,10 @@ class MyMoneyTransactionFilter; * while the engine code is running. The MyMoneyException:: object * describes the problem. */ -class KMYMONEY_EXPORT MyMoneyFile : public QObject +class KMYMONEY_EXPORT MyMoneyFile : public TQObject { Q_OBJECT + TQ_OBJECT public: class MyMoneyNotifier @@ -329,13 +330,13 @@ public: /** * Retrieve the opening balance transaction for the account @p acc. - * If there is no opening balance transaction, QString() will be returned. + * If there is no opening balance transaction, TQString() will be returned. * * @param acc reference to account for which the opening balance transaction * should be retrieved - * @return QString id for the transaction, or QString() if no transaction exists + * @return TQString id for the transaction, or TQString() if no transaction exists */ - QString openingBalanceTransaction(const MyMoneyAccount& acc) const; + TQString openingBalanceTransaction(const MyMoneyAccount& acc) const; /** * This method returns an indicator if the MyMoneyFile object has been @@ -356,7 +357,7 @@ public: /** * Adds an institution to the file-global institution pool. A * respective institution-ID will be generated for this object. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -401,15 +402,15 @@ public: * b) the account must not have an id assigned * c) the transaction list must be empty * d) the account must not have any sub-ordinate accounts - * e) the account must have no parent account + * e) the account must have no tqparent account * f) the account must not have any reference to a MyMoneyFile object * * An exception will be thrown upon error conditions. * * @param account The complete account information in a MyMoneyAccount object - * @param parent The complete account information of the parent account + * @param tqparent The complete account information of the tqparent account */ - void addAccount(MyMoneyAccount& account, MyMoneyAccount& parent); + void addAccount(MyMoneyAccount& account, MyMoneyAccount& tqparent); /** * Modifies an already existing account in the file global account pool. @@ -421,14 +422,14 @@ public: void modifyAccount(const MyMoneyAccount& account); /** - * This method re-parents an existing account + * This method re-tqparents an existing account * * An exception will be thrown upon error conditions. * - * @param account MyMoneyAccount reference to account to be re-parented - * @param parent MyMoneyAccount reference to new parent account + * @param account MyMoneyAccount reference to account to be re-tqparented + * @param tqparent MyMoneyAccount reference to new tqparent account */ - void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent); + void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent); /** * moves splits from one account to another @@ -438,7 +439,7 @@ public: * * @return the number of modified splits */ - unsigned int moveSplits(const QString& oldAccount, const QString& newAccount); + unsigned int moveSplits(const TQString& oldAccount, const TQString& newAccount); /** * This method is used to determince, if the account with the @@ -447,7 +448,7 @@ public: * @param id id of the account to be checked for * @return true if account is referenced, false otherwise */ - bool hasActiveSplits(const QString& id) const; + bool hasActiveSplits(const TQString& id) const; /** * This method is used to check whether a given @@ -458,7 +459,7 @@ public: * @param id account id * @return true if account-id is one of the standards, false otherwise */ - bool isStandardAccount(const QString& id) const; + bool isStandardAccount(const TQString& id) const; /** * Returns @a true, if transaction @p t is a transfer transaction. @@ -472,11 +473,11 @@ public: * within the storage area. An exception will be thrown, if an error * occurs * - * @param id QString reference to one of the standard accounts. - * @param name QString reference to the name to be set + * @param id TQString reference to one of the standard accounts. + * @param name TQString reference to the name to be set * */ - void setAccountName(const QString& id, const QString& name) const; + void setAccountName(const TQString& id, const TQString& name) const; /** * Deletes an existing account from the file global account pool @@ -503,7 +504,7 @@ public: * @param account_list Reference to a list of account IDs to be deleted. * @param level Parameter to keep track of recursion level (do not pass a value here). */ - void removeAccountList(const QStringList& account_list, unsigned int level = 0); + void removeAccountList(const TQStringList& account_list, unsigned int level = 0); /** * This member function checks all accounts identified by account_list @@ -515,17 +516,17 @@ public: * If the recursion level exceeds 100 (some arbitrary number which seems a good * maximum), an exception is thrown. * - * @param account_list A QStringList with account IDs that need to be checked. + * @param account_list A TQStringList with account IDs that need to be checked. * @param level (optional) Optional parameter to indicate recursion level. * @return Returns 'false' if at least one account has been found that * is still referenced by a transaction. */ - bool hasOnlyUnusedAccounts(const QStringList& account_list, unsigned int level = 0); + bool hasOnlyUnusedAccounts(const TQStringList& account_list, unsigned int level = 0); /** * Adds a transaction to the file-global transaction pool. A respective * transaction-ID will be generated for this object. The ID is stored - * as QString in the object passed as argument. + * as TQString in the object passed as argument. * Splits must reference valid accounts and valid payees. The payee * id can be empty. * @@ -552,20 +553,20 @@ public: * transaction pool through an id. In case of an invalid id, an * exception will be thrown. * - * @param id id of transaction as QString. + * @param id id of transaction as TQString. * @return reference to the requested transaction */ - const MyMoneyTransaction transaction(const QString& id) const; + const MyMoneyTransaction transaction(const TQString& id) const; /** * This method is used to extract a transaction from the file global * transaction pool through an index into an account. * - * @param account id of the account as QString + * @param account id of the account as TQString * @param idx number of transaction in this account * @return reference to MyMoneyTransaction object */ - const MyMoneyTransaction transaction(const QString& account, const int idx) const; + const MyMoneyTransaction transaction(const TQString& account, const int idx) const; /** * This method is used to pull a list of transactions from the file @@ -578,13 +579,13 @@ public: * * @param filter MyMoneyTransactionFilter object with the match criteria * - * @return set of transactions in form of a QValueList<MyMoneyTransaction> + * @return set of transactions in form of a TQValueList<MyMoneyTransaction> */ - const QValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; + const TQValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; - void transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; + void transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; - void transactionList(QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; + void transactionList(TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; /** * This method is used to remove a transaction from the transaction @@ -602,10 +603,10 @@ public: * transactions are included in the balance. * * @param id id of the account in question - * @param date return balance for specific date (default = QDate()) + * @param date return balance for specific date (default = TQDate()) * @return balance of the account as MyMoneyMoney object */ - const MyMoneyMoney balance(const QString& id, const QDate& date = QDate()) const; + const MyMoneyMoney balance(const TQString& id, const TQDate& date = TQDate()) const; /** * This method is used to return the actual balance of an account @@ -615,34 +616,34 @@ public: * transactions are included in the balance. * * @param id id of the account in question - * @param date return balance for specific date (default = QDate()) + * @param date return balance for specific date (default = TQDate()) * @return balance of the account as MyMoneyMoney object */ - const MyMoneyMoney totalBalance(const QString& id, const QDate& date = QDate()) const; + const MyMoneyMoney totalBalance(const TQString& id, const TQDate& date = TQDate()) const; /** * This method returns the number of transactions currently known to file * in the range 0..MAXUINT * - * @param account QString reference to account id. If account is empty + * @param account TQString reference to account id. If account is empty + all transactions (the journal) will be counted. If account * is not empty it returns the number of transactions * that have splits in this account. * * @return number of transactions in journal/account */ - unsigned int transactionCount(const QString& account = QString()) const; + unsigned int transactionCount(const TQString& account = TQString()) const; /** - * This method returns a QMap filled with the number of transactions + * This method returns a TQMap filled with the number of transactions * per account. The account id serves as index into the map. If one * needs to have all transactionCounts() for many accounts, this method - * is faster than calling transactionCount(const QString& account) many + * is faster than calling transactionCount(const TQString& account) many * times. * - * @return QMap with numbers of transactions per account + * @return TQMap with numbers of transactions per account */ - const QMap<QString, unsigned long> transactionCountMap(void) const; + const TQMap<TQString, unsigned long> transactionCountMap(void) const; /** * This method returns the number of institutions currently known to file @@ -667,7 +668,7 @@ public: * @return MyMoneyInstitution object filled with data. If the institution * could not be found, an exception will be thrown */ - const MyMoneyInstitution& institution(const QString& id) const; + const MyMoneyInstitution& institution(const TQString& id) const; /** * This method returns a list of the institutions @@ -675,16 +676,16 @@ public: * * @param list reference to the list. It will be cleared by this method first */ - void institutionList(QValueList<MyMoneyInstitution>& list) const; + void institutionList(TQValueList<MyMoneyInstitution>& list) const; /** * This method returns a list of the institutions * inside a MyMoneyFile object. This is a convenience method * to the one above * - * @return QValueList containing the institution objects + * @return TQValueList containing the institution objects */ - const QValueList<MyMoneyInstitution> institutionList(void) const; + const TQValueList<MyMoneyInstitution> institutionList(void) const; /** * Returns the account addressed by its id. @@ -693,7 +694,7 @@ public: * @return MyMoneyAccount object carrying the @p id. An exception is thrown * if the id is unknown */ - const MyMoneyAccount& account(const QString& id) const; + const MyMoneyAccount& account(const TQString& id) const; /** * Returns the account addressed by its name. @@ -702,7 +703,7 @@ public: * @return First MyMoneyAccount object found carrying the @p name. * An empty MyMoneyAccount object will be returned if the name is not found. */ - const MyMoneyAccount& accountByName(const QString& name) const; + const MyMoneyAccount& accountByName(const TQString& name) const; /** * Returns the sub-account addressed by its name. @@ -712,7 +713,7 @@ public: * @return First MyMoneyAccount object found carrying the @p name. * An empty MyMoneyAccount object will be returned if the name is not found. */ - const MyMoneyAccount& subAccountByName(const MyMoneyAccount& acc, const QString& name) const; + const MyMoneyAccount& subAccountByName(const MyMoneyAccount& acc, const TQString& name) const; /** * This method returns a list of accounts inside a MyMoneyFile object. @@ -720,14 +721,14 @@ public: * the returned list contains all accounts, otherwise only those referenced * in the id-list. * - * @param list reference to QValueList receiving the account objects - * @param idlist QStringList of account ids of those accounts that + * @param list reference to TQValueList receiving the account objects + * @param idlist TQStringList of account ids of those accounts that * should be returned. If this list is empty, all accounts * currently known will be returned. * * @param recursive if @p true, then recurse in all found accounts. The default is @p false */ - void accountList(QValueList<MyMoneyAccount>& list, const QStringList& idlist = QStringList(), const bool recursive = false) const; + void accountList(TQValueList<MyMoneyAccount>& list, const TQStringList& idlist = TQStringList(), const bool recursive = false) const; /** * This method is used to convert an account id to a string representation @@ -735,13 +736,13 @@ public: * is part of a hierarchy, the category name will be the concatenation of * the single account names seperated by MyMoneyAccount::AccountSeperator. * - * @param accountId QString reference of the account's id + * @param accountId TQString reference of the account's id * @param includeStandardAccounts if true, the standard top account will be part * of the name, otherwise it will not be included (default is @c false) * - * @return QString of the constructed name. + * @return TQString of the constructed name. */ - QString accountToCategory(const QString& accountId, bool includeStandardAccounts = false) const; + TQString accountToCategory(const TQString& accountId, bool includeStandardAccounts = false) const; /** * This method is used to convert a string representing a category to @@ -749,13 +750,13 @@ public: * representing a hierarchy of accounts. They have to be seperated by * MyMoneyAccount::AccountSeperator. * - * @param category const reference to QString containing the category + * @param category const reference to TQString containing the category * @param type account type if a specific type is required (defaults to UnknownAccountType) * - * @return QString of the corresponding account. If account was not found + * @return TQString of the corresponding account. If account was not found * the return value will be an empty string. */ - QString categoryToAccount(const QString& category, MyMoneyAccount::accountTypeE type = MyMoneyAccount::UnknownAccountType) const; + TQString categoryToAccount(const TQString& category, MyMoneyAccount::accountTypeE type = MyMoneyAccount::UnknownAccountType) const; /** * This method is used to convert a string representing an asset or @@ -763,21 +764,21 @@ public: * concatenation of multiple accounts representing a hierarchy of * accounts. They have to be seperated by MyMoneyAccount::AccountSeperator. * - * @param name const reference to QString containing the account name + * @param name const reference to TQString containing the account name * - * @return QString of the corresponding account. If account was not found + * @return TQString of the corresponding account. If account was not found * the return value will be an empty string. */ - QString nameToAccount(const QString& name) const; + TQString nameToAccount(const TQString& name) const; /** - * This method is used to extract the parent part of an account hierarchy + * This method is used to extract the tqparent part of an account hierarchy * name who's parts are seperated by MyMoneyAccount::AccountSeperator. * * @param name full account name - * @return parent name (full account name excluding the last part) + * @return tqparent name (full account name excluding the last part) */ - QString parentName(const QString& name) const; + TQString tqparentName(const TQString& name) const; /** * This method is used to create a new payee @@ -792,22 +793,22 @@ public: * This method is used to retrieve information about a payee * An exception will be thrown upon error conditions. * - * @param id QString reference to id of payee + * @param id TQString reference to id of payee * * @return MyMoneyPayee object of payee */ - const MyMoneyPayee& payee(const QString& id) const; + const MyMoneyPayee& payee(const TQString& id) const; /** * This method is used to retrieve the id to a corresponding * name of a payee/receiver. * An exception will be thrown upon error conditions. * - * @param payee QString reference to name of payee + * @param payee TQString reference to name of payee * * @return MyMoneyPayee object of payee */ - const MyMoneyPayee& payeeByName(const QString& payee) const; + const MyMoneyPayee& payeeByName(const TQString& payee) const; /** * This method is used to modify an existing payee @@ -833,39 +834,39 @@ public: * This method returns a list of the payees * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyPayee> containing the payee information + * @return TQValueList<MyMoneyPayee> containing the payee information */ - const QValueList<MyMoneyPayee> payeeList(void) const; + const TQValueList<MyMoneyPayee> payeeList(void) const; /** * This method is used to extract a value from the storage's * KeyValueContainer. For details see MyMoneyKeyValueContainer::value(). * - * @param key const reference to QString containing the key - * @return QString containing the value + * @param key const reference to TQString containing the key + * @return TQString containing the value */ - QString value(const QString& key) const; + TQString value(const TQString& key) const; /** * This method is used to set a value in the storage's * KeyValueContainer. For details see MyMoneyKeyValueContainer::setValue(). * - * @param key const reference to QString containing the key - * @param val const reference to QString containing the value + * @param key const reference to TQString containing the key + * @param val const reference to TQString containing the value * * @note Keys starting with the leadin @p kmm- are reserved for internal use * by the MyMoneyFile object. */ - void setValue(const QString& key, const QString& val); + void setValue(const TQString& key, const TQString& val); /** * This method is used to delete a key-value-pair from the * storage's KeyValueContainer identified by the parameter * @p key. For details see MyMoneyKeyValueContainer::deletePair(). * - * @param key const reference to QString containing the key + * @param key const reference to TQString containing the key */ - void deletePair(const QString& key); + void deletePair(const TQString& key); /** * This method is used to add a scheduled transaction to the engine. @@ -905,10 +906,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - const MyMoneySchedule schedule(const QString& id) const; + const MyMoneySchedule schedule(const TQString& id) const; /** * This method is used to extract a list of scheduled transactions @@ -916,7 +917,7 @@ public: * * @param accountId only search for scheduled transactions that reference * account @p accountId. If accountId is the empty string, - * this filter is off. Default is @p QString(). + * this filter is off. Default is @p TQString(). * @param type only schedules of type @p type are searched for. * See MyMoneySchedule::typeE for details. * Default is MyMoneySchedule::TYPE_ANY @@ -928,36 +929,36 @@ public: * See MyMoneySchedule::paymentTypeE for details. * Default is MyMoneySchedule::STYPE_ANY * @param startDate only schedules with payment dates after @p startDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param endDate only schedules with payment dates ending prior to @p endDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param overdue if true, only those schedules that are overdue are * searched for. Default is false (all schedules will be returned). * - * @return const QValueList<MyMoneySchedule> list of schedule objects. + * @return const TQValueList<MyMoneySchedule> list of schedule objects. */ - const QValueList<MyMoneySchedule> scheduleList(const QString& accountId = QString(), + const TQValueList<MyMoneySchedule> scheduleList(const TQString& accountId = TQString(), const MyMoneySchedule::typeE type = MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE paymentType = MyMoneySchedule::STYPE_ANY, - const QDate& startDate = QDate(), - const QDate& endDate = QDate(), + const TQDate& startDate = TQDate(), + const TQDate& endDate = TQDate(), const bool overdue = false) const; - const QStringList consistencyCheck(void); + const TQStringList consistencyCheck(void); /** * MyMoneyFile::OpeningBalancesPrefix is a special string used * to generate the name for opening balances accounts. See openingBalanceAccount() * for details. */ - static const QString OpeningBalancesPrefix; + static const TQString OpeningBalancesPrefix; /** * MyMoneyFile::AccountSeperator is used as the seperator * between account names to form a hierarchy. */ - static const QString AccountSeperator; + static const TQString AccountSeperator; /** * createCategory creates a category from a text name. @@ -966,7 +967,7 @@ public: * already exist. e.g if name = Bills:Credit Card and * base = expense(), Bills will first be checked to see if * it exists and created if not. Credit Card will then - * be created with Bills as it's parent. The Credit Card account + * be created with Bills as it's tqparent. The Credit Card account * will have it's id returned. * * @param base The base account (expense or income) @@ -977,13 +978,13 @@ public: * @exception An exception will be thrown, if @p base is not equal * expense() or income(). **/ - QString createCategory(const MyMoneyAccount& base, const QString& name); + TQString createCategory(const MyMoneyAccount& base, const TQString& name); - const QValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, + const TQValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts=QStringList()) const; + TQDate startDate, + const TQStringList& accounts=TQStringList()) const; /** * This method is used to add a new security object to the engine. @@ -1024,15 +1025,15 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySecurity object + * @param id TQString containing the id of the MyMoneySecurity object * @return MyMoneySecurity object */ - const MyMoneySecurity& security(const QString& id) const; + const MyMoneySecurity& security(const TQString& id) const; /** * This method is used to retrieve a list of all MyMoneySecurity objects. */ - const QValueList<MyMoneySecurity> securityList(void) const; + const TQValueList<MyMoneySecurity> securityList(void) const; /** * This method is used to add a new currency object to the engine. @@ -1072,10 +1073,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - const MyMoneySecurity& currency(const QString& id) const; + const MyMoneySecurity& currency(const TQString& id) const; /** * This method is used to retrieve the list of all currencies @@ -1083,9 +1084,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneySecurity objects. + * @return TQValueList of all MyMoneySecurity objects. */ - const QValueList<MyMoneySecurity> currencyList(void) const; + const TQValueList<MyMoneySecurity> currencyList(void) const; /** * This method retrieves a MyMoneySecurity object representing @@ -1105,7 +1106,7 @@ public: * currency ids. If second is the base currency id then @a first * is returned otherwise @a second is returned. */ - const QString& foreignCurrency(const QString& first, const QString& second) const; + const TQString& foreignCurrency(const TQString& first, const TQString& second) const; /** * This method allows to select the base currency. It does @@ -1144,7 +1145,7 @@ public: * @return price found as MyMoneyPrice object * @note This throws an exception when the base currency is not set and toId is empty */ - const MyMoneyPrice price(const QString& fromId, const QString& toId = QString(), const QDate& date = QDate::currentDate(), const bool exactDate = false) const; + const MyMoneyPrice price(const TQString& fromId, const TQString& toId = TQString(), const TQDate& date = TQDate::tqcurrentDate(), const bool exactDate = false) const; /** * This method returns a list of all prices. @@ -1162,7 +1163,7 @@ public: * @retval true account with name @p name found as subaccounts * @retval false no subaccount present with that name */ - bool hasAccount(const QString& id, const QString& name) const; + bool hasAccount(const TQString& id, const TQString& name) const; /** * This method is used to retrieve the list of all reports @@ -1170,14 +1171,14 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyReport objects. + * @return TQValueList of all MyMoneyReport objects. */ - const QValueList<MyMoneyReport> reportList( void ) const; + const TQValueList<MyMoneyReport> reportList( void ) const; /** * Adds a report to the file-global institution pool. A * respective report-ID will be generated for this object. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -1210,10 +1211,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyReport object + * @param id TQString containing the id of the MyMoneyReport object * @return MyMoneyReport object */ - const MyMoneyReport report( const QString& id ) const; + const MyMoneyReport report( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyReport object @@ -1231,14 +1232,14 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyBudget objects. + * @return TQValueList of all MyMoneyBudget objects. */ - const QValueList<MyMoneyBudget> budgetList( void ) const; + const TQValueList<MyMoneyBudget> budgetList( void ) const; /** * Adds a budget to the file-global institution pool. A * respective budget-ID will be generated for this object. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -1253,11 +1254,11 @@ public: * name of a budget. * An exception will be thrown upon error conditions. * - * @param budget QString reference to name of budget + * @param budget TQString reference to name of budget * * @return MyMoneyBudget refernce to object of budget */ - const MyMoneyBudget budgetByName(const QString& budget) const; + const MyMoneyBudget budgetByName(const TQString& budget) const; /** @@ -1284,10 +1285,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyBudget object + * @param id TQString containing the id of the MyMoneyBudget object * @return MyMoneyBudget object */ - const MyMoneyBudget budget( const QString& id ) const; + const MyMoneyBudget budget( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyBudget object @@ -1334,7 +1335,7 @@ public: * @retval false @p no is not in use * @retval true @p no is already assigned */ - bool checkNoUsed(const QString& accId, const QString& no) const; + bool checkNoUsed(const TQString& accId, const TQString& no) const; /** * This method returns the highest assigned check no for @@ -1343,7 +1344,7 @@ public: * @param accId id of account to be scanned * @return highest check no. used */ - QString highestCheckNo(const QString& accId) const; + TQString highestCheckNo(const TQString& accId) const; /** * Clear all internal caches (used internally for performance measurements) @@ -1373,11 +1374,11 @@ private: MyMoneyFile& operator=(MyMoneyFile&); // not allowed for singleton MyMoneyFile(const MyMoneyFile&); // not allowed for singleton - QString locateSubAccount(const MyMoneyAccount& base, const QString& category) const; + TQString locateSubAccount(const MyMoneyAccount& base, const TQString& category) const; void ensureDefaultCurrency(MyMoneyAccount& acc) const; - void warningMissingRate(const QString& fromId, const QString& toId) const; + void warningMissingRate(const TQString& fromId, const TQString& toId) const; /** * This method creates an opening balances account. The name is constructed @@ -1400,7 +1401,7 @@ private: * @param reload reload the object (@c true) or not (@c false). The default is @c true * @see attach, detach */ - void addNotification(const QString& id, bool reload = true); + void addNotification(const TQString& id, bool reload = true); /** * This method is used to clear the notification list diff --git a/kmymoney2/mymoney/mymoneyfiletest.cpp b/kmymoney2/mymoney/mymoneyfiletest.cpp index e081fa0..72dd006 100644 --- a/kmymoney2/mymoney/mymoneyfiletest.cpp +++ b/kmymoney2/mymoney/mymoneyfiletest.cpp @@ -19,8 +19,8 @@ #include <memory> #include <unistd.h> -#include <qfile.h> -#include <qdatastream.h> +#include <tqfile.h> +#include <tqdatastream.h> MyMoneyFileTest:: MyMoneyFileTest () {} @@ -66,9 +66,9 @@ void MyMoneyFileTest::testAddOneInstitution() { // MyMoneyInstitution institution_file("", institution); MyMoneyInstitution institution_id("I000002", institution); MyMoneyInstitution institution_noname(institution); - institution_noname.setName(QString()); + institution_noname.setName(TQString()); - QString id; + TQString id; CPPUNIT_ASSERT(m->institutionCount() == 0); storage->m_dirty = false; @@ -117,7 +117,7 @@ void MyMoneyFileTest::testAddTwoInstitutions() { institution.setManager("manager"); institution.setSortcode("sortcode"); - QString id; + TQString id; storage->m_dirty = false; MyMoneyFileTransaction ft; @@ -228,7 +228,7 @@ void MyMoneyFileTest::testInstitutionRetrieval () { } void MyMoneyFileTest::testInstitutionListRetrieval () { - QValueList<MyMoneyInstitution> list; + TQValueList<MyMoneyInstitution> list; storage->m_dirty = false; list = m->institutionList(); @@ -242,7 +242,7 @@ void MyMoneyFileTest::testInstitutionListRetrieval () { CPPUNIT_ASSERT(m->dirty() == false); CPPUNIT_ASSERT(list.count() == 2); - QValueList<MyMoneyInstitution>::ConstIterator it; + TQValueList<MyMoneyInstitution>::ConstIterator it; it = list.begin(); CPPUNIT_ASSERT((*it).name() == "institution1"); @@ -380,11 +380,11 @@ void MyMoneyFileTest::testAddAccounts() { MyMoneyFileTransaction ft; try { - MyMoneyAccount parent = m->asset(); - m->addAccount(a, parent); + MyMoneyAccount tqparent = m->asset(); + m->addAccount(a, tqparent); ft.commit(); CPPUNIT_ASSERT(m->accountCount() == 6); - CPPUNIT_ASSERT(a.parentAccountId() == "AStd::Asset"); + CPPUNIT_ASSERT(a.tqparentAccountId() == "AStd::Asset"); CPPUNIT_ASSERT(a.id() == "A000001"); CPPUNIT_ASSERT(a.institutionId() == "I000001"); CPPUNIT_ASSERT(m->dirty() == true); @@ -403,8 +403,8 @@ void MyMoneyFileTest::testAddAccounts() { // try to add this account again, should not work ft.restart(); try { - MyMoneyAccount parent = m->asset(); - m->addAccount(a, parent); + MyMoneyAccount tqparent = m->asset(); + m->addAccount(a, tqparent); CPPUNIT_FAIL("Expecting exception!"); } catch(MyMoneyException *e) { ft.commit(); @@ -434,12 +434,12 @@ void MyMoneyFileTest::testAddAccounts() { b.setInstitutionId(institution.id()); ft.restart(); try { - MyMoneyAccount parent = m->asset(); - m->addAccount(b, parent); + MyMoneyAccount tqparent = m->asset(); + m->addAccount(b, tqparent); ft.commit(); CPPUNIT_ASSERT(m->dirty() == true); CPPUNIT_ASSERT(b.id() == "A000002"); - CPPUNIT_ASSERT(b.parentAccountId() == "AStd::Asset"); + CPPUNIT_ASSERT(b.tqparentAccountId() == "AStd::Asset"); CPPUNIT_ASSERT(m->accountCount() == 7); institution = m->institution("I000001"); @@ -534,24 +534,24 @@ void MyMoneyFileTest::testModifyAccount() { } } -void MyMoneyFileTest::testReparentAccount() { +void MyMoneyFileTest::testRetqparentAccount() { testAddAccounts(); storage->m_dirty = false; MyMoneyAccount p = m->account("A000001"); MyMoneyAccount q = m->account("A000002"); - MyMoneyAccount o = m->account(p.parentAccountId()); + MyMoneyAccount o = m->account(p.tqparentAccountId()); // make A000001 a child of A000002 MyMoneyFileTransaction ft; try { - CPPUNIT_ASSERT(p.parentAccountId() != q.id()); + CPPUNIT_ASSERT(p.tqparentAccountId() != q.id()); CPPUNIT_ASSERT(o.accountCount() == 2); CPPUNIT_ASSERT(q.accountCount() == 0); m->reparentAccount(p, q); ft.commit(); CPPUNIT_ASSERT(m->dirty() == true); - CPPUNIT_ASSERT(p.parentAccountId() == q.id()); + CPPUNIT_ASSERT(p.tqparentAccountId() == q.id()); CPPUNIT_ASSERT(q.accountCount() == 1); CPPUNIT_ASSERT(q.id() == "A000002"); CPPUNIT_ASSERT(p.id() == "A000001"); @@ -566,7 +566,7 @@ void MyMoneyFileTest::testReparentAccount() { } void MyMoneyFileTest::testRemoveStdAccount(const MyMoneyAccount& acc) { - QString txt("Exception expected while removing account "); + TQString txt("Exception expected while removing account "); txt += acc.id(); MyMoneyFileTransaction ft; try { @@ -585,7 +585,7 @@ void MyMoneyFileTest::testRemoveAccount() { CPPUNIT_ASSERT(m->accountCount() == 7); storage->m_dirty = false; - QString id; + TQString id; MyMoneyAccount p = m->account("A000001"); MyMoneyFileTransaction ft; @@ -624,7 +624,7 @@ void MyMoneyFileTest::testRemoveAccount() { } void MyMoneyFileTest::testRemoveAccountTree() { - testReparentAccount(); + testRetqparentAccount(); MyMoneyAccount a = m->account("A000002"); MyMoneyFileTransaction ft; @@ -646,10 +646,10 @@ void MyMoneyFileTest::testRemoveAccountTree() { delete e; } - // make sure that children are re-parented to parent account + // make sure that tqchildren are re-tqparented to tqparent account try { a = m->account("A000001"); - CPPUNIT_ASSERT(a.parentAccountId() == m->asset().id()); + CPPUNIT_ASSERT(a.tqparentAccountId() == m->asset().id()); } catch(MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception!"); @@ -658,7 +658,7 @@ void MyMoneyFileTest::testRemoveAccountTree() { } void MyMoneyFileTest::testAccountListRetrieval () { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; storage->m_dirty = false; m->accountList(list); @@ -690,9 +690,9 @@ void MyMoneyFileTest::testAddTransaction () { MyMoneyFileTransaction ft; try { - MyMoneyAccount parent = m->expense(); - m->addAccount(exp1, parent); - m->addAccount(exp2, parent); + MyMoneyAccount tqparent = m->expense(); + m->addAccount(exp1, tqparent); + m->addAccount(exp2, tqparent); ft.commit(); } catch(MyMoneyException *e) { delete e; @@ -702,7 +702,7 @@ void MyMoneyFileTest::testAddTransaction () { // fake the last modified flag to check that the // date is updated when we add the transaction MyMoneyAccount a = m->account("A000001"); - a.setLastModified(QDate(1,2,3)); + a.setLastModified(TQDate(1,2,3)); ft.restart(); try { m->modifyAccount(a); @@ -715,10 +715,10 @@ void MyMoneyFileTest::testAddTransaction () { CPPUNIT_ASSERT(m->accountCount() == 9); a = m->account("A000001"); - CPPUNIT_ASSERT(a.lastModified() == QDate(1,2,3)); + CPPUNIT_ASSERT(a.lastModified() == TQDate(1,2,3)); // construct a transaction and add it to the pool - t.setPostDate(QDate(2002,2,1)); + t.setPostDate(TQDate(2002,2,1)); t.setMemo("Memotext"); MyMoneySplit split1; @@ -760,17 +760,17 @@ void MyMoneyFileTest::testAddTransaction () { ft.restart(); CPPUNIT_ASSERT(t.id() == "T000000000000000001"); - CPPUNIT_ASSERT(t.postDate() == QDate(2002,2,1)); - CPPUNIT_ASSERT(t.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(t.postDate() == TQDate(2002,2,1)); + CPPUNIT_ASSERT(t.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(m->dirty() == true); // check the balance of the accounts a = m->account("A000001"); - CPPUNIT_ASSERT(a.lastModified() == QDate::currentDate()); + CPPUNIT_ASSERT(a.lastModified() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.balance() == MyMoneyMoney(-1000)); MyMoneyAccount b = m->account("A000003"); - CPPUNIT_ASSERT(b.lastModified() == QDate::currentDate()); + CPPUNIT_ASSERT(b.lastModified() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(b.balance() == MyMoneyMoney(1000)); storage->m_dirty = false; @@ -859,7 +859,7 @@ void MyMoneyFileTest::testModifyTransactionNewPostDate() { testAddTransaction(); MyMoneyTransaction t = m->transaction("T000000000000000001"); - t.setPostDate(QDate(2004,2,1)); + t.setPostDate(TQDate(2004,2,1)); storage->m_dirty = false; MyMoneyFileTransaction ft; @@ -867,7 +867,7 @@ void MyMoneyFileTest::testModifyTransactionNewPostDate() { m->modifyTransaction(t); ft.commit(); t = m->transaction("T000000000000000001"); - CPPUNIT_ASSERT(t.postDate() == QDate(2004,2,1)); + CPPUNIT_ASSERT(t.postDate() == TQDate(2004,2,1)); t = m->transaction("A000001", 0); CPPUNIT_ASSERT(t.id() == "T000000000000000001"); CPPUNIT_ASSERT(m->dirty() == true); @@ -907,7 +907,7 @@ void MyMoneyFileTest::testModifyTransactionNewAccount() { m->modifyTransaction(t); ft.commit(); t = m->transaction("T000000000000000001"); - CPPUNIT_ASSERT(t.postDate() == QDate(2002,2,1)); + CPPUNIT_ASSERT(t.postDate() == TQDate(2002,2,1)); t = m->transaction("A000002", 0); CPPUNIT_ASSERT(m->dirty() == true); /* removed with MyMoneyAccount::Transaction @@ -986,7 +986,7 @@ void MyMoneyFileTest::testBalanceTotal() { MyMoneyTransaction t; // construct a transaction and add it to the pool - t.setPostDate(QDate(2002,2,1)); + t.setPostDate(TQDate(2002,2,1)); t.setMemo("Memotext"); MyMoneySplit split1; @@ -1135,7 +1135,7 @@ void MyMoneyFileTest::testAddTransactionStd() { a = m->account("A000001"); // construct a transaction and add it to the pool - t.setPostDate(QDate(2002,2,1)); + t.setPostDate(TQDate(2002,2,1)); t.setMemo("Memotext"); MyMoneySplit split1; @@ -1219,7 +1219,7 @@ void MyMoneyFileTest::testAttachStorage() { void MyMoneyFileTest::testAccount2Category() { - testReparentAccount(); + testRetqparentAccount(); CPPUNIT_ASSERT(m->accountToCategory("A000001") == "Account2:Account1"); CPPUNIT_ASSERT(m->accountToCategory("A000002") == "Account2"); } @@ -1265,7 +1265,7 @@ void MyMoneyFileTest::testHasAccount() { m->addAccount(a, b); ft.commit(); CPPUNIT_ASSERT(m->accountCount() == 8); - CPPUNIT_ASSERT(a.parentAccountId() == "A000001"); + CPPUNIT_ASSERT(a.tqparentAccountId() == "A000001"); CPPUNIT_ASSERT(m->hasAccount("A000001", "Account3") == true); CPPUNIT_ASSERT(m->hasAccount("A000001", "Account2") == false); CPPUNIT_ASSERT(m->hasAccount("A000002", "Account3") == false); @@ -1281,8 +1281,8 @@ void MyMoneyFileTest::testAddEquityAccount() { MyMoneyFileTransaction ft; try { - MyMoneyAccount parent = m->asset(); - m->addAccount(i, parent); + MyMoneyAccount tqparent = m->asset(); + m->addAccount(i, tqparent); ft.commit(); } catch(MyMoneyException *e) { unexpectedException(e); @@ -1290,10 +1290,10 @@ void MyMoneyFileTest::testAddEquityAccount() { // keep a copy for later use m_inv = i; - // make sure, that only equity accounts can be children to it + // make sure, that only equity accounts can be tqchildren to it MyMoneyAccount a; a.setName("Testaccount"); - QValueList<MyMoneyAccount::accountTypeE> list; + TQValueList<MyMoneyAccount::accountTypeE> list; list << MyMoneyAccount::Checkings; list << MyMoneyAccount::Savings; list << MyMoneyAccount::Cash; @@ -1309,7 +1309,7 @@ void MyMoneyFileTest::testAddEquityAccount() { list << MyMoneyAccount::Expense; list << MyMoneyAccount::AssetLoan; - QValueList<MyMoneyAccount::accountTypeE>::Iterator it; + TQValueList<MyMoneyAccount::accountTypeE>::Iterator it; for(it = list.begin(); it != list.end(); ++it) { a.setAccountType(*it); ft.restart(); @@ -1334,13 +1334,13 @@ void MyMoneyFileTest::testAddEquityAccount() { } } -void MyMoneyFileTest::testReparentEquity() { +void MyMoneyFileTest::testRetqparentEquity() { testAddEquityAccount(); testAddEquityAccount(); - MyMoneyAccount parent; + MyMoneyAccount tqparent; // check the bad cases - QValueList<MyMoneyAccount::accountTypeE> list; + TQValueList<MyMoneyAccount::accountTypeE> list; list << MyMoneyAccount::Checkings; list << MyMoneyAccount::Savings; list << MyMoneyAccount::Cash; @@ -1349,25 +1349,25 @@ void MyMoneyFileTest::testReparentEquity() { list << MyMoneyAccount::Asset; list << MyMoneyAccount::AssetLoan; list << MyMoneyAccount::Currency; - parent = m->asset(); - testReparentEquity(list, parent); + tqparent = m->asset(); + testRetqparentEquity(list, tqparent); list.clear(); list << MyMoneyAccount::CreditCard; list << MyMoneyAccount::Loan; list << MyMoneyAccount::Liability; - parent = m->liability(); - testReparentEquity(list, parent); + tqparent = m->liability(); + testRetqparentEquity(list, tqparent); list.clear(); list << MyMoneyAccount::Income; - parent = m->income(); - testReparentEquity(list, parent); + tqparent = m->income(); + testRetqparentEquity(list, tqparent); list.clear(); list << MyMoneyAccount::Expense; - parent = m->expense(); - testReparentEquity(list, parent); + tqparent = m->expense(); + testRetqparentEquity(list, tqparent); // now check the good case MyMoneyAccount stock = m->account("A000002"); @@ -1381,18 +1381,18 @@ void MyMoneyFileTest::testReparentEquity() { } } -void MyMoneyFileTest::testReparentEquity(QValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& parent) +void MyMoneyFileTest::testRetqparentEquity(TQValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& tqparent) { MyMoneyAccount a; MyMoneyAccount stock = m->account("A000002"); - QValueList<MyMoneyAccount::accountTypeE>::Iterator it; + TQValueList<MyMoneyAccount::accountTypeE>::Iterator it; MyMoneyFileTransaction ft; for(it = list.begin(); it != list.end(); ++it) { - a.setName(QString("Testaccount %1").arg(*it)); + a.setName(TQString("Testaccount %1").tqarg(*it)); a.setAccountType(*it); try { - m->addAccount(a, parent); + m->addAccount(a, tqparent); char msg[100]; m->reparentAccount(stock, a); sprintf(msg, "Can reparent stock to non-investment type %d account", *it); @@ -1407,7 +1407,7 @@ void MyMoneyFileTest::testReparentEquity(QValueList<MyMoneyAccount::accountTypeE void MyMoneyFileTest::testBaseCurrency(void) { - MyMoneySecurity base("EUR", "Euro", QChar(0x20ac)); + MyMoneySecurity base("EUR", "Euro", TQChar(0x20ac)); MyMoneySecurity ref; // make sure, no base currency is set @@ -1442,7 +1442,7 @@ void MyMoneyFileTest::testBaseCurrency(void) ref = m->baseCurrency(); CPPUNIT_ASSERT(ref.id() == "EUR"); CPPUNIT_ASSERT(ref.name() == "Euro"); - CPPUNIT_ASSERT(ref.tradingSymbol() == QChar(0x20ac)); + CPPUNIT_ASSERT(ref.tradingSymbol() == TQChar(0x20ac)); } catch(MyMoneyException *e) { unexpectedException(e); } @@ -1463,7 +1463,7 @@ void MyMoneyFileTest::testBaseCurrency(void) ref = m->baseCurrency(); CPPUNIT_ASSERT(ref.id() == "EUR"); CPPUNIT_ASSERT(ref.name() == "Euro"); - CPPUNIT_ASSERT(ref.tradingSymbol() == QChar(0x20ac)); + CPPUNIT_ASSERT(ref.tradingSymbol() == TQChar(0x20ac)); } void MyMoneyFileTest::testOpeningBalanceNoBase(void) @@ -1488,9 +1488,9 @@ void MyMoneyFileTest::testOpeningBalance(void) try { openingAcc = m->openingBalanceAccount(m->baseCurrency()); - CPPUNIT_ASSERT(openingAcc.parentAccountId() == m->equity().id()); + CPPUNIT_ASSERT(openingAcc.tqparentAccountId() == m->equity().id()); CPPUNIT_ASSERT(openingAcc.name() == MyMoneyFile::OpeningBalancesPrefix); - CPPUNIT_ASSERT(openingAcc.openingDate() == QDate::currentDate()); + CPPUNIT_ASSERT(openingAcc.openingDate() == TQDate::tqcurrentDate()); } catch(MyMoneyException *e) { unexpectedException(e); } @@ -1504,12 +1504,12 @@ void MyMoneyFileTest::testOpeningBalance(void) unexpectedException(e); } - QString refName = QString("%1 (%2)").arg(MyMoneyFile::OpeningBalancesPrefix).arg("USD"); + TQString refName = TQString("%1 (%2)").tqarg(MyMoneyFile::OpeningBalancesPrefix).tqarg("USD"); try { openingAcc = m->openingBalanceAccount(second); - CPPUNIT_ASSERT(openingAcc.parentAccountId() == m->equity().id()); + CPPUNIT_ASSERT(openingAcc.tqparentAccountId() == m->equity().id()); CPPUNIT_ASSERT(openingAcc.name() == refName); - CPPUNIT_ASSERT(openingAcc.openingDate() == QDate::currentDate()); + CPPUNIT_ASSERT(openingAcc.openingDate() == TQDate::tqcurrentDate()); } catch(MyMoneyException *e) { unexpectedException(e); } diff --git a/kmymoney2/mymoney/mymoneyfiletest.h b/kmymoney2/mymoney/mymoneyfiletest.h index b54af25..133f047 100644 --- a/kmymoney2/mymoney/mymoneyfiletest.h +++ b/kmymoney2/mymoney/mymoneyfiletest.h @@ -40,7 +40,7 @@ class MyMoneyFileTest : public CppUnit::TestFixture { CPPUNIT_TEST(testAddAccounts); CPPUNIT_TEST(testModifyAccount); CPPUNIT_TEST(testModifyStdAccount); - CPPUNIT_TEST(testReparentAccount); + CPPUNIT_TEST(testRetqparentAccount); CPPUNIT_TEST(testRemoveAccount); CPPUNIT_TEST(testRemoveAccountTree); CPPUNIT_TEST(testAccountListRetrieval); @@ -63,7 +63,7 @@ class MyMoneyFileTest : public CppUnit::TestFixture { CPPUNIT_TEST(testAttachedStorage); CPPUNIT_TEST(testHasAccount); CPPUNIT_TEST(testAddEquityAccount); - CPPUNIT_TEST(testReparentEquity); + CPPUNIT_TEST(testRetqparentEquity); CPPUNIT_TEST(testBaseCurrency); CPPUNIT_TEST(testOpeningBalanceNoBase); CPPUNIT_TEST(testOpeningBalance); @@ -92,7 +92,7 @@ public: void testAddAccounts(); void testModifyAccount(); void testModifyStdAccount(); - void testReparentAccount(); + void testRetqparentAccount(); void testRemoveAccount(); void testRemoveAccountTree(); void testAccountListRetrieval (); @@ -115,8 +115,8 @@ public: void testAttachedStorage(); void testHasAccount(); void testAddEquityAccount(); - void testReparentEquity(); - void testReparentEquity(QValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& parent); + void testRetqparentEquity(); + void testRetqparentEquity(TQValueList<MyMoneyAccount::accountTypeE>& list, MyMoneyAccount& tqparent); void testBaseCurrency(); void testOpeningBalanceNoBase(); void testOpeningBalance(); diff --git a/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp b/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp index d6686a6..33d5855 100644 --- a/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp +++ b/kmymoney2/mymoney/mymoneyfinancialcalculator.cpp @@ -86,8 +86,8 @@ MyMoneyFinancialCalculator::MyMoneyFinancialCalculator() setPmt(0.0); setFv(0.0); - // clear the mask - m_mask = 0; + // clear the tqmask + m_tqmask = 0; } MyMoneyFinancialCalculator::~MyMoneyFinancialCalculator() @@ -122,38 +122,38 @@ void MyMoneyFinancialCalculator::setDisc(const bool disc) void MyMoneyFinancialCalculator::setIr(const FCALC_DOUBLE ir) { m_ir = ir; - m_mask |= IR_SET; + m_tqmask |= IR_SET; } void MyMoneyFinancialCalculator::setPv(const FCALC_DOUBLE pv) { m_pv = pv; - m_mask |= PV_SET; + m_tqmask |= PV_SET; } void MyMoneyFinancialCalculator::setPmt(const FCALC_DOUBLE pmt) { m_pmt = pmt; - m_mask |= PMT_SET; + m_tqmask |= PMT_SET; } void MyMoneyFinancialCalculator::setNpp(const FCALC_DOUBLE npp) { m_npp = npp; - m_mask |= NPP_SET; + m_tqmask |= NPP_SET; } void MyMoneyFinancialCalculator::setFv(const FCALC_DOUBLE fv) { m_fv = fv; - m_mask |= FV_SET; + m_tqmask |= FV_SET; } FCALC_DOUBLE MyMoneyFinancialCalculator::numPayments(void) { - const unsigned short mask = PV_SET | IR_SET | PMT_SET | FV_SET; + const unsigned short tqmask = PV_SET | IR_SET | PMT_SET | FV_SET; - if((m_mask & mask) != mask) + if((m_tqmask & tqmask) != tqmask) throw new MYMONEYEXCEPTION("Not all parameters set for calculation of numPayments"); FCALC_DOUBLE eint = eff_int(); @@ -162,15 +162,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::numPayments(void) CC = (CC - m_fv) / (CC + m_pv); m_npp = (CC > 0.0) ? logl (CC) / logl (eint +1.0) : 0.0; - m_mask |= NPP_SET; + m_tqmask |= NPP_SET; return m_npp; } FCALC_DOUBLE MyMoneyFinancialCalculator::payment(void) { - const unsigned short mask = PV_SET | IR_SET | NPP_SET | FV_SET; + const unsigned short tqmask = PV_SET | IR_SET | NPP_SET | FV_SET; - if((m_mask & mask) != mask) + if((m_tqmask & tqmask) != tqmask) throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment"); FCALC_DOUBLE eint = eff_int(); @@ -180,15 +180,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::payment(void) m_pmt = -rnd((m_fv + m_pv * (AA + 1.0)) / (AA * BB)); //m_pmt = -floorl((m_fv + m_pv * (AA + 1.0)) / (AA * BB)); - m_mask |= PMT_SET; + m_tqmask |= PMT_SET; return m_pmt; } FCALC_DOUBLE MyMoneyFinancialCalculator::presentValue(void) { - const unsigned short mask = PMT_SET | IR_SET | NPP_SET | FV_SET; + const unsigned short tqmask = PMT_SET | IR_SET | NPP_SET | FV_SET; - if((m_mask & mask) != mask) + if((m_tqmask & tqmask) != tqmask) throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment"); FCALC_DOUBLE eint = eff_int(); @@ -197,15 +197,15 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::presentValue(void) m_pv = rnd(-(m_fv + (AA * CC)) / (AA + 1.0)); - m_mask |= PV_SET; + m_tqmask |= PV_SET; return m_pv; } FCALC_DOUBLE MyMoneyFinancialCalculator::futureValue(void) { - const unsigned short mask = PMT_SET | IR_SET | NPP_SET | PV_SET; + const unsigned short tqmask = PMT_SET | IR_SET | NPP_SET | PV_SET; - if((m_mask & mask) != mask) + if((m_tqmask & tqmask) != tqmask) throw new MYMONEYEXCEPTION("Not all parameters set for calculation of payment"); FCALC_DOUBLE eint = eff_int(); @@ -213,7 +213,7 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::futureValue(void) FCALC_DOUBLE CC = _Cx(eint); m_fv = rnd(-(m_pv + AA * (m_pv + CC))); - m_mask |= FV_SET; + m_tqmask |= FV_SET; return m_fv; } @@ -260,7 +260,7 @@ FCALC_DOUBLE MyMoneyFinancialCalculator::interestRate(void) } while (ri); } - m_mask |= IR_SET; + m_tqmask |= IR_SET; m_ir = rnd(nom_int(eint) * 100.0); return m_ir; } diff --git a/kmymoney2/mymoney/mymoneyfinancialcalculator.h b/kmymoney2/mymoney/mymoneyfinancialcalculator.h index c603d12..8bc7033 100644 --- a/kmymoney2/mymoney/mymoneyfinancialcalculator.h +++ b/kmymoney2/mymoney/mymoneyfinancialcalculator.h @@ -306,7 +306,7 @@ private: bool m_bep; // beginning/end of period payment flag bool m_disc; // discrete/continous compounding flag - unsigned short m_mask; // available value mask + unsigned short m_tqmask; // available value tqmask #define PV_SET 0x0001 #define IR_SET 0x0002 #define PMT_SET 0x0004 diff --git a/kmymoney2/mymoney/mymoneyfinancialcalculatortest.cpp b/kmymoney2/mymoney/mymoneyfinancialcalculatortest.cpp index fa5b1a3..aae78ab 100644 --- a/kmymoney2/mymoney/mymoneyfinancialcalculatortest.cpp +++ b/kmymoney2/mymoney/mymoneyfinancialcalculatortest.cpp @@ -41,7 +41,7 @@ void MyMoneyFinancialCalculatorTest::testEmptyConstructor() { CPPUNIT_ASSERT(m->m_prec == 2); CPPUNIT_ASSERT(m->m_bep == false); CPPUNIT_ASSERT(m->m_disc == true); - CPPUNIT_ASSERT(m->m_mask == 0); + CPPUNIT_ASSERT(m->m_tqmask == 0); } void MyMoneyFinancialCalculatorTest::testSetPrec() { @@ -52,7 +52,7 @@ void MyMoneyFinancialCalculatorTest::testSetPrec() { void MyMoneyFinancialCalculatorTest::testSetNpp() { m->setNpp(20); CPPUNIT_ASSERT(m->m_npp == 20); - CPPUNIT_ASSERT(m->m_mask == NPP_SET); + CPPUNIT_ASSERT(m->m_tqmask == NPP_SET); } void MyMoneyFinancialCalculatorTest::testSetPF() { @@ -86,25 +86,25 @@ void MyMoneyFinancialCalculatorTest::testSetDisc() { void MyMoneyFinancialCalculatorTest::testSetIr() { m->setIr(12.3); CPPUNIT_ASSERT(m->m_ir == 12.3); - CPPUNIT_ASSERT(m->m_mask == IR_SET); + CPPUNIT_ASSERT(m->m_tqmask == IR_SET); } void MyMoneyFinancialCalculatorTest::testSetPv() { m->setPv(23.4); CPPUNIT_ASSERT(m->m_pv == 23.4); - CPPUNIT_ASSERT(m->m_mask == PV_SET); + CPPUNIT_ASSERT(m->m_tqmask == PV_SET); } void MyMoneyFinancialCalculatorTest::testSetPmt() { m->setPmt(34.5); CPPUNIT_ASSERT(m->m_pmt == 34.5); - CPPUNIT_ASSERT(m->m_mask == PMT_SET); + CPPUNIT_ASSERT(m->m_tqmask == PMT_SET); } void MyMoneyFinancialCalculatorTest::testSetFv() { m->setFv(45.6); CPPUNIT_ASSERT(m->m_fv == 45.6); - CPPUNIT_ASSERT(m->m_mask == FV_SET); + CPPUNIT_ASSERT(m->m_tqmask == FV_SET); } void MyMoneyFinancialCalculatorTest::testCombinedSet() { @@ -114,7 +114,7 @@ void MyMoneyFinancialCalculatorTest::testCombinedSet() { m->setPmt(34.5); m->setFv(45.6); - CPPUNIT_ASSERT(m->m_mask == (NPP_SET | PV_SET | IR_SET | PMT_SET | FV_SET)); + CPPUNIT_ASSERT(m->m_tqmask == (NPP_SET | PV_SET | IR_SET | PMT_SET | FV_SET)); } void MyMoneyFinancialCalculatorTest::testNumPayments() { diff --git a/kmymoney2/mymoney/mymoneyforecast.cpp b/kmymoney2/mymoney/mymoneyforecast.cpp index 56125ea..59a565d 100644 --- a/kmymoney2/mymoney/mymoneyforecast.cpp +++ b/kmymoney2/mymoney/mymoneyforecast.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,8 +47,8 @@ MyMoneyForecast::MyMoneyForecast() : { setForecastCycles(KMyMoneyGlobalSettings::forecastCycles()); setAccountsCycle(KMyMoneyGlobalSettings::forecastAccountCycle()); - setHistoryStartDate(QDate::currentDate().addDays(-forecastCycles()*accountsCycle())); - setHistoryEndDate(QDate::currentDate().addDays(-1)); + setHistoryStartDate(TQDate::tqcurrentDate().addDays(-forecastCycles()*accountsCycle())); + setHistoryEndDate(TQDate::tqcurrentDate().addDays(-1)); setForecastDays(KMyMoneyGlobalSettings::forecastDays()); setBeginForecastDay(KMyMoneyGlobalSettings::beginForecastDay()); setForecastMethod(KMyMoneyGlobalSettings::forecastMethod()); @@ -75,12 +75,12 @@ void MyMoneyForecast::doForecast() //initialize global variables setForecastDays(fDays); - setForecastStartDate(QDate::currentDate().addDays(1)); - setForecastEndDate(QDate::currentDate().addDays(fDays)); + setForecastStartDate(TQDate::tqcurrentDate().addDays(1)); + setForecastEndDate(TQDate::tqcurrentDate().addDays(fDays)); setAccountsCycle(fAccCycle); setForecastCycles(fCycles); setHistoryStartDate(forecastCycles() * accountsCycle()); - setHistoryEndDate(QDate::currentDate().addDays(-1)); //yesterday + setHistoryEndDate(TQDate::tqcurrentDate().addDays(-1)); //yesterday //clear all data before calculating m_accountListPast.clear(); @@ -120,22 +120,22 @@ void MyMoneyForecast::pastTransactions() filter.setDateFilter(historyStartDate(), historyEndDate()); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); //Check past transactions for(; it_t != transactions.end(); ++it_t ) { - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); for(; it_s != splits.end(); ++it_s ) { if(!(*it_s).shares().isZero()) { MyMoneyAccount acc = file->account((*it_s).accountId()); //workaround for stock accounts which have faulty opening dates - QDate openingDate; + TQDate openingDate; if(acc.accountType() == MyMoneyAccount::Stock) { - MyMoneyAccount parentAccount = file->account(acc.parentAccountId()); - openingDate = parentAccount.openingDate(); + MyMoneyAccount tqparentAccount = file->account(acc.tqparentAccountId()); + openingDate = tqparentAccount.openingDate(); } else { openingDate = acc.openingDate(); } @@ -163,11 +163,11 @@ void MyMoneyForecast::pastTransactions() purgeForecastAccountsList(m_accountListPast); //calculate running sum - QMap<QString, QString>::Iterator it_n; + TQMap<TQString, TQString>::Iterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); m_accountListPast[acc.id()][historyStartDate().addDays(-1)] = file->balance(acc.id(), historyStartDate().addDays(-1)); - for(QDate it_date = historyStartDate(); it_date <= historyEndDate(); ) { + for(TQDate it_date = historyStartDate(); it_date <= historyEndDate(); ) { m_accountListPast[acc.id()][it_date] += m_accountListPast[acc.id()][it_date.addDays(-1)]; //Running sum it_date = it_date.addDays(1); } @@ -185,7 +185,7 @@ void MyMoneyForecast::pastTransactions() MyMoneyMoney rate = MyMoneyMoney ( 1, 1 ); //set the default value MyMoneyPrice price; - for ( QDate it_date = historyStartDate().addDays(-1) ; it_date <= historyEndDate();) { + for ( TQDate it_date = historyStartDate().addDays(-1) ; it_date <= historyEndDate();) { //get the price for the tradingCurrency that day price = file->price ( undersecurity.id(), undersecurity.tradingCurrency(), it_date ); if ( price.isValid() ) @@ -207,7 +207,7 @@ bool MyMoneyForecast::isForecastAccount(const MyMoneyAccount& acc) { setForecastAccountList(); } - QMap<QString, QString>::Iterator it_n; + TQMap<TQString, TQString>::Iterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { if(*it_n == acc.id()) { @@ -224,7 +224,7 @@ void MyMoneyForecast::calculateAccountTrendList() int totalWeight = 0; //Calculate account trends - QMap<QString, QString>::Iterator it_n; + TQMap<TQString, TQString>::Iterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); m_accountTrendList[acc.id()][0] = MyMoneyMoney(0,1); // for today, the trend is 0 @@ -232,10 +232,10 @@ void MyMoneyForecast::calculateAccountTrendList() auxForecastTerms = forecastCycles(); if(skipOpeningDate()) { - QDate openingDate; + TQDate openingDate; if(acc.accountType() == MyMoneyAccount::Stock) { - MyMoneyAccount parentAccount = file->account(acc.parentAccountId()); - openingDate = parentAccount.openingDate(); + MyMoneyAccount tqparentAccount = file->account(acc.tqparentAccountId()); + openingDate = tqparentAccount.openingDate(); } else { openingDate = acc.openingDate(); } @@ -284,14 +284,14 @@ void MyMoneyForecast::calculateAccountTrendList() } } -QValueList<MyMoneyAccount> MyMoneyForecast::forecastAccountList(void) +TQValueList<MyMoneyAccount> MyMoneyForecast::forecastAccountList(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; //Get all accounts from the file and check if they are of the right type to calculate forecast file->accountList(accList); - QValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ) { MyMoneyAccount acc = *accList_t; if(acc.isClosed() //check the account is not closed @@ -306,15 +306,15 @@ QValueList<MyMoneyAccount> MyMoneyForecast::forecastAccountList(void) return accList; } -QValueList<MyMoneyAccount> MyMoneyForecast::accountList(void) +TQValueList<MyMoneyAccount> MyMoneyForecast::accountList(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accList; - QStringList emptyStringList; + TQValueList<MyMoneyAccount> accList; + TQStringList emptyStringList; //Get all accounts from the file and check if they are present file->accountList(accList, emptyStringList, false); - QValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ) { MyMoneyAccount acc = *accList_t; if(!isForecastAccount( acc ) ) { @@ -332,8 +332,8 @@ MyMoneyMoney MyMoneyForecast::calculateAccountTrend(const MyMoneyAccount& acc, i MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyTransactionFilter filter; MyMoneyMoney netIncome; - QDate startDate; - QDate openingDate = acc.openingDate(); + TQDate startDate; + TQDate openingDate = acc.openingDate(); //validate arguments if(trendDays < 1) @@ -343,14 +343,14 @@ MyMoneyMoney MyMoneyForecast::calculateAccountTrend(const MyMoneyAccount& acc, i //If it is a new account, we don't take into account the first day //because it is usually a weird one and it would mess up the trend - if(openingDate.daysTo(QDate::currentDate())<trendDays){ + if(openingDate.daysTo(TQDate::tqcurrentDate())<trendDays){ startDate = (acc.openingDate()).addDays(1); } else { - startDate = QDate::currentDate().addDays(-trendDays); + startDate = TQDate::tqcurrentDate().addDays(-trendDays); } //get all transactions for the period - filter.setDateFilter(startDate, QDate::currentDate()); + filter.setDateFilter(startDate, TQDate::tqcurrentDate()); if(acc.accountGroup() == MyMoneyAccount::Income || acc.accountGroup() == MyMoneyAccount::Expense) { filter.addCategory(acc.id()); @@ -359,13 +359,13 @@ MyMoneyMoney MyMoneyForecast::calculateAccountTrend(const MyMoneyAccount& acc, i } filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); //add all transactions for that account for(; it_t != transactions.end(); ++it_t ) { - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); for(; it_s != splits.end(); ++it_s ) { if(!(*it_s).shares().isZero()) { if(acc.id()==(*it_s).accountId()) netIncome += (*it_s).value(); @@ -377,8 +377,8 @@ MyMoneyMoney MyMoneyForecast::calculateAccountTrend(const MyMoneyAccount& acc, i MyMoneyMoney accTrend; //don't take into account the first day of the account - if(openingDate.daysTo(QDate::currentDate())<trendDays) { - accTrend = netIncome/MyMoneyMoney(openingDate.daysTo(QDate::currentDate())-1,1); + if(openingDate.daysTo(TQDate::tqcurrentDate())<trendDays) { + accTrend = netIncome/MyMoneyMoney(openingDate.daysTo(TQDate::tqcurrentDate())-1,1); } else { accTrend = netIncome/MyMoneyMoney(trendDays,1); } @@ -463,7 +463,7 @@ void MyMoneyForecast::calculateHistoricDailyBalances() calculateAccountTrendList(); //Calculate account daily balances - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); @@ -474,7 +474,7 @@ void MyMoneyForecast::calculateHistoricDailyBalances() case 0: case 1: { - for(QDate f_day = forecastStartDate(); f_day <= forecastEndDate(); ) { + for(TQDate f_day = forecastStartDate(); f_day <= forecastEndDate(); ) { for(int t_day = 1; t_day <= accountsCycle(); ++t_day) { MyMoneyMoney balanceDayBefore = m_accountList[acc.id()][(f_day.addDays(-1))];//balance of the day before MyMoneyMoney accountDailyTrend = m_accountTrendList[acc.id()][t_day]; //trend for that day @@ -490,10 +490,10 @@ void MyMoneyForecast::calculateHistoricDailyBalances() break; case 2: { - QDate baseDate = QDate::currentDate().addDays(-accountsCycle()); + TQDate baseDate = TQDate::tqcurrentDate().addDays(-accountsCycle()); for(int t_day = 1; t_day <= accountsCycle(); ++t_day) { int f_day = 1; - QDate fDate = baseDate.addDays(accountsCycle()+1); + TQDate fDate = baseDate.addDays(accountsCycle()+1); while (fDate <= forecastEndDate()) { //the calculation is based on the balance for the last month, that is then multiplied by the trend @@ -509,7 +509,7 @@ void MyMoneyForecast::calculateHistoricDailyBalances() } } -MyMoneyMoney MyMoneyForecast::forecastBalance(const MyMoneyAccount& acc, QDate forecastDate) +MyMoneyMoney MyMoneyForecast::forecastBalance(const MyMoneyAccount& acc, TQDate forecastDate) { dailyBalances balance; @@ -522,7 +522,7 @@ MyMoneyMoney MyMoneyForecast::forecastBalance(const MyMoneyAccount& acc, QDate f } balance = m_accountList[acc.id() ]; - if ( balance.contains ( forecastDate ) ) + if ( balance.tqcontains ( forecastDate ) ) { //if the date is not in the forecast, it returns 0 MM_amount = m_accountList[acc.id() ][forecastDate]; } @@ -536,7 +536,7 @@ MyMoneyMoney MyMoneyForecast::forecastBalance(const MyMoneyAccount& acc, QDate f */ MyMoneyMoney MyMoneyForecast::forecastBalance (const MyMoneyAccount& acc, int offset ) { - QDate forecastDate = QDate::currentDate().addDays(offset); + TQDate forecastDate = TQDate::tqcurrentDate().addDays(offset); return forecastBalance(acc, forecastDate); } @@ -555,7 +555,7 @@ void MyMoneyForecast::doFutureScheduledForecast(void) purgeForecastAccountsList(m_accountList); //adjust value of investments to deep currency - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, TQString>::ConstIterator it_n; for ( it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n ) { MyMoneyAccount acc = file->account ( *it_n ); @@ -570,7 +570,7 @@ void MyMoneyForecast::doFutureScheduledForecast(void) MyMoneyMoney rate = MyMoneyMoney ( 1, 1 ); MyMoneyPrice price; - for (QDate it_day = QDate::currentDate(); it_day <= forecastEndDate(); ) { + for (TQDate it_day = TQDate::tqcurrentDate(); it_day <= forecastEndDate(); ) { //get the price for the tradingCurrency that day price = file->price ( undersecurity.id(), undersecurity.tradingCurrency(), it_day ); if ( price.isValid() ) @@ -596,12 +596,12 @@ void MyMoneyForecast::addFutureTransactions(void) filter.setDateFilter(forecastStartDate(), forecastEndDate()); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_t = transactions.begin(); for(; it_t != transactions.end(); ++it_t ) { - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); for(; it_s != splits.end(); ++it_s ) { if(!(*it_s).shares().isZero()) { MyMoneyAccount acc = file->account((*it_s).accountId()); @@ -621,17 +621,17 @@ void MyMoneyForecast::addFutureTransactions(void) } #if 0 - QFile trcFile("forecast.csv"); + TQFile trcFile("forecast.csv"); trcFile.open(IO_WriteOnly); - QTextStream s(&trcFile); + TQTextStream s(&trcFile); { s << "Already present transactions\n"; - QMap<QString, dailyBalances>::Iterator it_a; - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, dailyBalances>::Iterator it_a; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); - it_a = m_accountList.find(*it_n); + it_a = m_accountList.tqfind(*it_n); s << "\"" << acc.name() << "\","; for(int i = 0; i < 90; ++i) { s << "\"" << (*it_a)[i].formatMoney("") << "\","; @@ -648,12 +648,12 @@ void MyMoneyForecast::addScheduledTransactions (void) MyMoneyFile* file = MyMoneyFile::instance(); // now process all the schedules that may have an impact - QValueList<MyMoneySchedule> schedule; + TQValueList<MyMoneySchedule> schedule; schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate::currentDate(), forecastEndDate()); + TQDate::tqcurrentDate(), forecastEndDate()); if(schedule.count() > 0) { - QValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule>::Iterator it; do { qBubbleSort(schedule); it = schedule.begin(); @@ -665,13 +665,13 @@ void MyMoneyForecast::addScheduledTransactions (void) continue; } - QDate date = (*it).nextPayment((*it).lastPayment()); + TQDate date = (*it).nextPayment((*it).lastPayment()); if(!date.isValid()) { schedule.remove(it); continue; } - QDate nextDate = (*it).adjustedNextPayment((*it).lastPayment()); + TQDate nextDate = (*it).adjustedNextPayment((*it).lastPayment()); if (nextDate > forecastEndDate()) { // We're done with this schedule, let's move on to the next schedule.remove(it); @@ -688,22 +688,22 @@ void MyMoneyForecast::addScheduledTransactions (void) MyMoneyTransaction t = (*it).transaction(); // only process the entry, if it is still active - if(!(*it).isFinished() && nextDate != QDate()) { + if(!(*it).isFinished() && nextDate != TQDate()) { // make sure we have all 'starting balances' so that the autocalc works - QValueList<MyMoneySplit>::const_iterator it_s; - QMap<QString, MyMoneyMoney> balanceMap; + TQValueList<MyMoneySplit>::const_iterator it_s; + TQMap<TQString, MyMoneyMoney> balanceMap; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s ) { MyMoneyAccount acc = file->account((*it_s).accountId()); if(isForecastAccount(acc)) { // collect all overdues on the first day - QDate forecastDate = nextDate; - if(QDate::currentDate() >= nextDate) - forecastDate = QDate::currentDate().addDays(1); + TQDate forecastDate = nextDate; + if(TQDate::tqcurrentDate() >= nextDate) + forecastDate = TQDate::tqcurrentDate().addDays(1); dailyBalances balance; balance = m_accountList[acc.id()]; - for(QDate f_day = QDate::currentDate(); f_day < forecastDate; ) { + for(TQDate f_day = TQDate::tqcurrentDate(); f_day < forecastDate; ) { balanceMap[acc.id()] += m_accountList[acc.id()][f_day]; f_day = f_day.addDays(1); } @@ -719,14 +719,14 @@ void MyMoneyForecast::addScheduledTransactions (void) if(isForecastAccount(acc)) { dailyBalances balance; balance = m_accountList[acc.id()]; - //int offset = QDate::currentDate().daysTo(nextDate); + //int offset = TQDate::tqcurrentDate().daysTo(nextDate); //if(offset <= 0) { // collect all overdues on the first day // offset = 1; //} // collect all overdues on the first day - QDate forecastDate = nextDate; - if(QDate::currentDate() >= nextDate) - forecastDate = QDate::currentDate().addDays(1); + TQDate forecastDate = nextDate; + if(TQDate::tqcurrentDate() >= nextDate) + forecastDate = TQDate::tqcurrentDate().addDays(1); if(acc.accountType() == MyMoneyAccount::Income) { balance[forecastDate] += ((*it_s).shares() * MyMoneyMoney(-1, 1)); @@ -757,11 +757,11 @@ void MyMoneyForecast::addScheduledTransactions (void) #if 0 { s << "\n\nAdded scheduled transactions\n"; - QMap<QString, dailyBalances>::Iterator it_a; - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, dailyBalances>::Iterator it_a; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); - it_a = m_accountList.find(*it_n); + it_a = m_accountList.tqfind(*it_n); s << "\"" << acc.name() << "\","; for(int i = 0; i < 90; ++i) { s << "\"" << (*it_a)[i].formatMoney("") << "\","; @@ -777,14 +777,14 @@ void MyMoneyForecast::calculateScheduledDailyBalances (void) MyMoneyFile* file = MyMoneyFile::instance(); //Calculate account daily balances - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); //set the starting balance of the account setStartingBalance(acc); - for(QDate f_day = forecastStartDate(); f_day <= forecastEndDate(); ) { + for(TQDate f_day = forecastStartDate(); f_day <= forecastEndDate(); ) { MyMoneyMoney balanceDayBefore = m_accountList[acc.id()][(f_day.addDays(-1))];//balance of the day before m_accountList[acc.id()][f_day] += balanceDayBefore; //running sum f_day = f_day.addDays(1); @@ -796,7 +796,7 @@ void MyMoneyForecast::calculateScheduledDailyBalances (void) int MyMoneyForecast::daysToMinimumBalance(const MyMoneyAccount& acc) { - QString minimumBalance = acc.value("minBalanceAbsolute"); + TQString minimumBalance = acc.value("minBalanceAbsolute"); MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance); dailyBalances balance; @@ -807,9 +807,9 @@ int MyMoneyForecast::daysToMinimumBalance(const MyMoneyAccount& acc) balance = m_accountList[acc.id()]; - for(QDate it_day = QDate::currentDate() ; it_day <= forecastEndDate(); ) { + for(TQDate it_day = TQDate::tqcurrentDate() ; it_day <= forecastEndDate(); ) { if(minBalance > balance[it_day]) { - return QDate::currentDate().daysTo(it_day); + return TQDate::tqcurrentDate().daysTo(it_day); } it_day = it_day.addDays(1); } @@ -828,20 +828,20 @@ int MyMoneyForecast::daysToZeroBalance(const MyMoneyAccount& acc) balance = m_accountList[acc.id()]; if (acc.accountGroup() == MyMoneyAccount::Asset) { - for (QDate it_day = QDate::currentDate() ; it_day <= forecastEndDate(); ) + for (TQDate it_day = TQDate::tqcurrentDate() ; it_day <= forecastEndDate(); ) { if ( balance[it_day] < MyMoneyMoney ( 0, 1 ) ) { - return QDate::currentDate().daysTo(it_day); + return TQDate::tqcurrentDate().daysTo(it_day); } it_day = it_day.addDays(1); } } else if (acc.accountGroup() == MyMoneyAccount::Liability) { - for (QDate it_day = QDate::currentDate() ; it_day <= forecastEndDate(); ) + for (TQDate it_day = TQDate::tqcurrentDate() ; it_day <= forecastEndDate(); ) { if ( balance[it_day] > MyMoneyMoney ( 0, 1 ) ) { - return QDate::currentDate().daysTo(it_day); + return TQDate::tqcurrentDate().daysTo(it_day); } it_day = it_day.addDays(1); } @@ -853,10 +853,10 @@ void MyMoneyForecast::setForecastAccountList(void) { //get forecast accounts - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; accList = forecastAccountList(); - QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ++accList_t ) { MyMoneyAccount acc = *accList_t; // check if this is a new account for us @@ -882,24 +882,24 @@ MyMoneyMoney MyMoneyForecast::accountTotalVariation(const MyMoneyAccount& acc) { MyMoneyMoney totalVariation; - totalVariation = forecastBalance(acc, forecastEndDate()) - forecastBalance(acc, QDate::currentDate()); + totalVariation = forecastBalance(acc, forecastEndDate()) - forecastBalance(acc, TQDate::tqcurrentDate()); return totalVariation; } -QValueList<QDate> MyMoneyForecast::accountMinimumBalanceDateList(const MyMoneyAccount& acc) +TQValueList<TQDate> MyMoneyForecast::accountMinimumBalanceDateList(const MyMoneyAccount& acc) { - QValueList<QDate> minBalanceList; + TQValueList<TQDate> minBalanceList; int daysToBeginDay; - daysToBeginDay = QDate::currentDate().daysTo(beginForecastDate()); + daysToBeginDay = TQDate::tqcurrentDate().daysTo(beginForecastDate()); for(int t_cycle = 0; ((t_cycle * accountsCycle()) + daysToBeginDay) < forecastDays() ; ++t_cycle) { MyMoneyMoney minBalance = forecastBalance(acc, (t_cycle * accountsCycle() + daysToBeginDay)); - QDate minDate = QDate::currentDate().addDays(t_cycle * accountsCycle() + daysToBeginDay); + TQDate minDate = TQDate::tqcurrentDate().addDays(t_cycle * accountsCycle() + daysToBeginDay); for(int t_day = 1; t_day <= accountsCycle() ; ++t_day) { if( minBalance > forecastBalance(acc, (t_cycle * accountsCycle()) + daysToBeginDay + t_day) ) { minBalance = forecastBalance(acc, (t_cycle * accountsCycle()) + daysToBeginDay + t_day ); - minDate = QDate::currentDate().addDays( (t_cycle * accountsCycle()) + daysToBeginDay + t_day); + minDate = TQDate::tqcurrentDate().addDays( (t_cycle * accountsCycle()) + daysToBeginDay + t_day); } } minBalanceList.append(minDate); @@ -907,21 +907,21 @@ QValueList<QDate> MyMoneyForecast::accountMinimumBalanceDateList(const MyMoneyAc return minBalanceList; } -QValueList<QDate> MyMoneyForecast::accountMaximumBalanceDateList(const MyMoneyAccount& acc) +TQValueList<TQDate> MyMoneyForecast::accountMaximumBalanceDateList(const MyMoneyAccount& acc) { - QValueList<QDate> maxBalanceList; + TQValueList<TQDate> maxBalanceList; int daysToBeginDay; - daysToBeginDay = QDate::currentDate().daysTo(beginForecastDate()); + daysToBeginDay = TQDate::tqcurrentDate().daysTo(beginForecastDate()); for(int t_cycle = 0; ((t_cycle * accountsCycle()) + daysToBeginDay) < forecastDays() ; ++t_cycle) { MyMoneyMoney maxBalance = forecastBalance(acc, ((t_cycle * accountsCycle()) + daysToBeginDay)); - QDate maxDate = QDate::currentDate().addDays((t_cycle * accountsCycle()) + daysToBeginDay); + TQDate maxDate = TQDate::tqcurrentDate().addDays((t_cycle * accountsCycle()) + daysToBeginDay); for(int t_day = 0; t_day < accountsCycle() ; ++t_day) { if( maxBalance < forecastBalance(acc, (t_cycle * accountsCycle()) + daysToBeginDay + t_day) ) { maxBalance = forecastBalance(acc, (t_cycle * accountsCycle()) + daysToBeginDay + t_day ); - maxDate = QDate::currentDate().addDays((t_cycle * accountsCycle()) + daysToBeginDay + t_day); + maxDate = TQDate::tqcurrentDate().addDays((t_cycle * accountsCycle()) + daysToBeginDay + t_day); } } maxBalanceList.append(maxDate); @@ -943,53 +943,53 @@ int MyMoneyForecast::calculateBeginForecastDay() int fDays = forecastDays(); int beginDay = beginForecastDay(); int accCycle = accountsCycle(); - QDate beginDate; + TQDate beginDate; //if 0, beginDate is current date and forecastDays remains unchanged if(beginDay == 0) { - setBeginForecastDate(QDate::currentDate()); + setBeginForecastDate(TQDate::tqcurrentDate()); return fDays; } //adjust if beginDay more than days of current month - if(QDate::currentDate().daysInMonth() < beginDay) - beginDay = QDate::currentDate().daysInMonth(); + if(TQDate::tqcurrentDate().daysInMonth() < beginDay) + beginDay = TQDate::tqcurrentDate().daysInMonth(); //if beginDay still to come, calculate and return - if(QDate::currentDate().day() <= beginDay) { - beginDate = QDate( QDate::currentDate().year(), QDate::currentDate().month(), beginDay); - fDays += QDate::currentDate().daysTo(beginDate); + if(TQDate::tqcurrentDate().day() <= beginDay) { + beginDate = TQDate( TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), beginDay); + fDays += TQDate::tqcurrentDate().daysTo(beginDate); setBeginForecastDate(beginDate); return fDays; } //adjust beginDay for next month - if(QDate::currentDate().addMonths(1).daysInMonth() < beginDay) - beginDay = QDate::currentDate().addMonths(1).daysInMonth(); + if(TQDate::tqcurrentDate().addMonths(1).daysInMonth() < beginDay) + beginDay = TQDate::tqcurrentDate().addMonths(1).daysInMonth(); //if beginDay of next month comes before 1 interval, use beginDay next month - if(QDate::currentDate().addDays(accCycle) >= - (QDate(QDate::currentDate().addMonths(1).year(), QDate::currentDate().addMonths(1).month(), 1).addDays(beginDay-1) ) ) + if(TQDate::tqcurrentDate().addDays(accCycle) >= + (TQDate(TQDate::tqcurrentDate().addMonths(1).year(), TQDate::tqcurrentDate().addMonths(1).month(), 1).addDays(beginDay-1) ) ) { - beginDate = QDate(QDate::currentDate().addMonths(1).year(), QDate::currentDate().addMonths(1).month(), 1).addDays(beginDay-1); - fDays += QDate::currentDate().daysTo(beginDate); + beginDate = TQDate(TQDate::tqcurrentDate().addMonths(1).year(), TQDate::tqcurrentDate().addMonths(1).month(), 1).addDays(beginDay-1); + fDays += TQDate::tqcurrentDate().daysTo(beginDate); } else //add intervals to current beginDay and take the first after current date { - beginDay = ((((QDate::currentDate().day()-beginDay)/accCycle) + 1) * accCycle) + beginDay; - beginDate = QDate::currentDate().addDays(beginDay - QDate::currentDate().day()); - fDays += QDate::currentDate().daysTo(beginDate); + beginDay = ((((TQDate::tqcurrentDate().day()-beginDay)/accCycle) + 1) * accCycle) + beginDay; + beginDate = TQDate::tqcurrentDate().addDays(beginDay - TQDate::tqcurrentDate().day()); + fDays += TQDate::tqcurrentDate().daysTo(beginDate); } setBeginForecastDate(beginDate); return fDays; } -void MyMoneyForecast::purgeForecastAccountsList(QMap<QString, dailyBalances>& accountList) +void MyMoneyForecast::purgeForecastAccountsList(TQMap<TQString, dailyBalances>& accountList) { - QMap<QString, QString>::Iterator it_n; + TQMap<TQString, TQString>::Iterator it_n; for ( it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ) { - if(!accountList.contains(*it_n)) { + if(!accountList.tqcontains(*it_n)) { m_nameIdx.remove(it_n); it_n = m_nameIdx.begin(); } else @@ -997,10 +997,10 @@ void MyMoneyForecast::purgeForecastAccountsList(QMap<QString, dailyBalances>& ac } } -void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, QDate historyStart, QDate historyEnd, QDate budgetStart, QDate budgetEnd, const bool returnBudget ) +void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, TQDate historyStart, TQDate historyEnd, TQDate budgetStart, TQDate budgetEnd, const bool returnBudget ) { // clear all data except the id and name - QString name = budget.name(); + TQString name = budget.name(); budget = MyMoneyBudget(budget.id(), MyMoneyBudget()); budget.setName(name); @@ -1016,10 +1016,10 @@ void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, QDate historyStart, int fMethod = forecastMethod(); //set start date to 1st of month and end dates to last day of month, since we deal with full months in budget - historyStart = QDate ( historyStart.year(), historyStart.month(), 1 ); - historyEnd = QDate ( historyEnd.year(), historyEnd.month(), historyEnd.daysInMonth() ); - budgetStart = QDate ( budgetStart.year(), budgetStart.month(), 1 ); - budgetEnd = QDate ( budgetEnd.year(), budgetEnd.month(), budgetEnd.daysInMonth() ); + historyStart = TQDate ( historyStart.year(), historyStart.month(), 1 ); + historyEnd = TQDate ( historyEnd.year(), historyEnd.month(), historyEnd.daysInMonth() ); + budgetStart = TQDate ( budgetStart.year(), budgetStart.month(), 1 ); + budgetEnd = TQDate ( budgetEnd.year(), budgetEnd.month(), budgetEnd.daysInMonth() ); //set forecast parameters setHistoryStartDate ( historyStart ); @@ -1069,7 +1069,7 @@ void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, QDate historyStart, budget.setBudgetStart ( budgetStart ); //go through all the accounts and add them to budget - QMap<QString, QString>::ConstIterator it_nc; + TQMap<TQString, TQString>::ConstIterator it_nc; for ( it_nc = m_nameIdx.begin(); it_nc != m_nameIdx.end(); ++it_nc ) { MyMoneyAccount acc = file->account ( *it_nc ); @@ -1077,7 +1077,7 @@ void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, QDate historyStart, budgetAcc.setId ( acc.id() ); budgetAcc.setBudgetLevel ( MyMoneyBudget::AccountGroup::eMonthByMonth ); - for ( QDate f_date = forecastStartDate(); f_date <= forecastEndDate(); ) { + for ( TQDate f_date = forecastStartDate(); f_date <= forecastEndDate(); ) { MyMoneyBudget::PeriodGroup period; //add period to budget account @@ -1097,10 +1097,10 @@ void MyMoneyForecast::createBudget ( MyMoneyBudget& budget, QDate historyStart, void MyMoneyForecast::setBudgetAccountList(void) { //get budget accounts - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; accList = budgetAccountList(); - QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ++accList_t ) { MyMoneyAccount acc = *accList_t; // check if this is a new account for us @@ -1110,15 +1110,15 @@ void MyMoneyForecast::setBudgetAccountList(void) } } -QValueList<MyMoneyAccount> MyMoneyForecast::budgetAccountList(void) +TQValueList<MyMoneyAccount> MyMoneyForecast::budgetAccountList(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accList; - QStringList emptyStringList; + TQValueList<MyMoneyAccount> accList; + TQStringList emptyStringList; //Get all accounts from the file and check if they are of the right type to calculate forecast file->accountList(accList, emptyStringList, false); - QValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ) { MyMoneyAccount acc = *accList_t; if(acc.isClosed() //check the account is not closed @@ -1137,17 +1137,17 @@ void MyMoneyForecast::calculateHistoricMonthlyBalances() MyMoneyFile* file = MyMoneyFile::instance(); //Calculate account monthly balances - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); - for( QDate f_date = forecastStartDate(); f_date <= forecastEndDate(); ) { + for( TQDate f_date = forecastStartDate(); f_date <= forecastEndDate(); ) { for(int f_day = 1; f_day <= accountsCycle() && f_date <= forecastEndDate(); ++f_day) { MyMoneyMoney accountDailyTrend = m_accountTrendList[acc.id()][f_day]; //trend for that day //check for leap year if(f_date.month() == 2 && f_date.day() == 29) f_date = f_date.addDays(1); //skip 1 day - m_accountList[acc.id()][QDate(f_date.year(), f_date.month(), 1)] += accountDailyTrend; //movement trend for that particular day + m_accountList[acc.id()][TQDate(f_date.year(), f_date.month(), 1)] += accountDailyTrend; //movement trend for that particular day f_date = f_date.addDays(1); } } @@ -1159,18 +1159,18 @@ void MyMoneyForecast::calculateScheduledMonthlyBalances() MyMoneyFile* file = MyMoneyFile::instance(); //Calculate account monthly balances - QMap<QString, QString>::ConstIterator it_n; + TQMap<TQString, TQString>::ConstIterator it_n; for(it_n = m_nameIdx.begin(); it_n != m_nameIdx.end(); ++it_n) { MyMoneyAccount acc = file->account(*it_n); - for( QDate f_date = forecastStartDate(); f_date <= forecastEndDate(); f_date = f_date.addDays(1) ) { + for( TQDate f_date = forecastStartDate(); f_date <= forecastEndDate(); f_date = f_date.addDays(1) ) { //get the trend for the day MyMoneyMoney accountDailyBalance = m_accountList[acc.id()][f_date]; //do not add if it is the beginning of the month //otherwise we end up with duplicated values as reported by Marko Käning - if(f_date != QDate(f_date.year(), f_date.month(), 1) ) - m_accountList[acc.id()][QDate(f_date.year(), f_date.month(), 1)] += accountDailyBalance; + if(f_date != TQDate(f_date.year(), f_date.month(), 1) ) + m_accountList[acc.id()][TQDate(f_date.year(), f_date.month(), 1)] += accountDailyBalance; } } } @@ -1190,24 +1190,24 @@ void MyMoneyForecast::setStartingBalance(const MyMoneyAccount &acc) //set the default value MyMoneyMoney rate = MyMoneyMoney ( 1, 1 ); //get te - MyMoneyPrice price = file->price ( undersecurity.id(), undersecurity.tradingCurrency(), QDate::currentDate() ); + MyMoneyPrice price = file->price ( undersecurity.id(), undersecurity.tradingCurrency(), TQDate::tqcurrentDate() ); if ( price.isValid() ) { rate = price.rate ( undersecurity.tradingCurrency() ); } - m_accountList[acc.id()][QDate::currentDate()] = file->balance(acc.id(), QDate::currentDate()) * rate; + m_accountList[acc.id()][TQDate::tqcurrentDate()] = file->balance(acc.id(), TQDate::tqcurrentDate()) * rate; } } else { - m_accountList[acc.id()][QDate::currentDate()] = file->balance(acc.id(), QDate::currentDate()); + m_accountList[acc.id()][TQDate::tqcurrentDate()] = file->balance(acc.id(), TQDate::tqcurrentDate()); } //if the method is linear regression, we have to add the opening balance to m_accountListPast if(forecastMethod() == eHistoric && historyMethod() == 2) { //FIXME workaround for stock opening dates - QDate openingDate; + TQDate openingDate; if(acc.accountType() == MyMoneyAccount::Stock) { - MyMoneyAccount parentAccount = file->account(acc.parentAccountId()); - openingDate = parentAccount.openingDate(); + MyMoneyAccount tqparentAccount = file->account(acc.tqparentAccountId()); + openingDate = tqparentAccount.openingDate(); } else { openingDate = acc.openingDate(); } @@ -1220,7 +1220,7 @@ void MyMoneyForecast::setStartingBalance(const MyMoneyAccount &acc) openingBalance = file->balance(acc.id(), openingDate); //calculate running sum - for(QDate it_date = openingDate; it_date <= historyEndDate(); it_date = it_date.addDays(1) ) { + for(TQDate it_date = openingDate; it_date <= historyEndDate(); it_date = it_date.addDays(1) ) { //investments require special treatment if ( acc.isInvest() ) { //get the security id of that account @@ -1248,7 +1248,7 @@ void MyMoneyForecast::setStartingBalance(const MyMoneyAccount &acc) } } -void MyMoneyForecast::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const QMap<QString, MyMoneyMoney>& balances) +void MyMoneyForecast::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const TQMap<TQString, MyMoneyMoney>& balances) { if (schedule.type() == MyMoneySchedule::TYPE_LOANPAYMENT) { @@ -1259,7 +1259,7 @@ void MyMoneyForecast::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoney if(!amortizationSplit.id().isEmpty() && !interestSplit.id().isEmpty()) { MyMoneyAccountLoan acc(MyMoneyFile::instance()->account(amortizationSplit.accountId())); MyMoneyFinancialCalculator calc; - QDate dueDate; + TQDate dueDate; // FIXME: setup dueDate according to when the interest should be calculated // current implementation: take the date of the next payment according to @@ -1267,8 +1267,8 @@ void MyMoneyForecast::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoney // the payment is overdue then take the current date dueDate = schedule.nextDueDate(); if(acc.interestCalculation() == MyMoneyAccountLoan::paymentReceived) { - if(dueDate < QDate::currentDate()) - dueDate = QDate::currentDate(); + if(dueDate < TQDate::tqcurrentDate()) + dueDate = TQDate::tqcurrentDate(); } // we need to calculate the balance at the time the payment is due @@ -1280,12 +1280,12 @@ void MyMoneyForecast::calculateAutoLoan(const MyMoneySchedule& schedule, MyMoney balance = balances[acc.id()]; /* - QValueList<MyMoneyTransaction> list; - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction>::ConstIterator it; MyMoneySplit split; MyMoneyTransactionFilter filter(acc.id()); - filter.setDateFilter(QDate(), dueDate.addDays(-1)); + filter.setDateFilter(TQDate(), dueDate.addDays(-1)); list = MyMoneyFile::instance()->transactionList(filter); for(it = list.begin(); it != list.end(); ++it) { diff --git a/kmymoney2/mymoney/mymoneyforecast.h b/kmymoney2/mymoney/mymoneyforecast.h index f69e596..7291b2b 100644 --- a/kmymoney2/mymoney/mymoneyforecast.h +++ b/kmymoney2/mymoney/mymoneyforecast.h @@ -25,9 +25,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qvaluelist.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqvaluelist.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // Project Includes @@ -59,7 +59,7 @@ public: /** * Returns the list of accounts to be forecast. */ - QValueList<MyMoneyAccount> accountList(void); + TQValueList<MyMoneyAccount> accountList(void); /** * Returns the balance trend for account @a acc based on a number of days @p forecastDays @@ -69,9 +69,9 @@ public: static MyMoneyMoney calculateAccountTrend(const MyMoneyAccount& acc, int forecastDays); /** - * Returns the forecast balance trend for account @a acc for day @p QDate + * Returns the forecast balance trend for account @a acc for day @p TQDate */ - MyMoneyMoney forecastBalance(const MyMoneyAccount& acc, QDate forecastDate); + MyMoneyMoney forecastBalance(const MyMoneyAccount& acc, TQDate forecastDate); /** * Returns the forecast balance trend for account @a acc for offset @p int @@ -111,12 +111,12 @@ public: /** * returns a list of the dates where the account was on its lowest balance in each cycle */ - QValueList<QDate> accountMinimumBalanceDateList(const MyMoneyAccount& acc); + TQValueList<TQDate> accountMinimumBalanceDateList(const MyMoneyAccount& acc); /** * returns a list of the dates where the account was on its highest balance in each cycle */ - QValueList<QDate> accountMaximumBalanceDateList(const MyMoneyAccount& acc); + TQValueList<TQDate> accountMaximumBalanceDateList(const MyMoneyAccount& acc); /** * returns the average balance of the account within the forecast period @@ -126,7 +126,7 @@ public: /** * creates a budget based on the history of a given timeframe */ - void createBudget(MyMoneyBudget& budget, QDate historyStart, QDate historyEnd, QDate budgetStart, QDate budgetEnd, const bool returnBudget); + void createBudget(MyMoneyBudget& budget, TQDate historyStart, TQDate historyEnd, TQDate budgetStart, TQDate budgetEnd, const bool returnBudget); /** * number of days to go back in history to calculate forecast @@ -136,15 +136,15 @@ public: void setAccountsCycle(int accountsCycle) { m_accountsCycle = accountsCycle; } void setForecastCycles(int forecastCycles) { m_forecastCycles = forecastCycles; } void setForecastDays(int forecastDays) { m_forecastDays = forecastDays; } - void setBeginForecastDate(QDate beginForecastDate) { m_beginForecastDate = beginForecastDate; } + void setBeginForecastDate(TQDate beginForecastDate) { m_beginForecastDate = beginForecastDate; } void setBeginForecastDay(int beginDay) { m_beginForecastDay = beginDay; } void setForecastMethod(int forecastMethod) { m_forecastMethod = forecastMethod; } - void setHistoryStartDate(QDate historyStartDate) { m_historyStartDate = historyStartDate; } - void setHistoryEndDate(QDate historyEndDate) { m_historyEndDate = historyEndDate; } - void setHistoryStartDate(int daysToStartDate) { setHistoryStartDate(QDate::currentDate().addDays(-daysToStartDate)); } - void setHistoryEndDate(int daysToEndDate) { setHistoryEndDate(QDate::currentDate().addDays(-daysToEndDate)); } - void setForecastStartDate(QDate _startDate) { m_forecastStartDate = _startDate; } - void setForecastEndDate(QDate _endDate) { m_forecastEndDate = _endDate; } + void setHistoryStartDate(TQDate historyStartDate) { m_historyStartDate = historyStartDate; } + void setHistoryEndDate(TQDate historyEndDate) { m_historyEndDate = historyEndDate; } + void setHistoryStartDate(int daysToStartDate) { setHistoryStartDate(TQDate::tqcurrentDate().addDays(-daysToStartDate)); } + void setHistoryEndDate(int daysToEndDate) { setHistoryEndDate(TQDate::tqcurrentDate().addDays(-daysToEndDate)); } + void setForecastStartDate(TQDate _startDate) { m_forecastStartDate = _startDate; } + void setForecastEndDate(TQDate _endDate) { m_forecastEndDate = _endDate; } void setSkipOpeningDate(bool _skip) { m_skipOpeningDate = _skip; } void setHistoryMethod(int historyMethod) { m_historyMethod = historyMethod; } void setIncludeUnusedAccounts(bool _bool) { m_includeUnusedAccounts = _bool; } @@ -155,13 +155,13 @@ public: int accountsCycle(void) const { return m_accountsCycle; } int forecastCycles(void) const { return m_forecastCycles; } int forecastDays(void) const { return m_forecastDays; } - QDate beginForecastDate(void) const { return m_beginForecastDate; } + TQDate beginForecastDate(void) const { return m_beginForecastDate; } int beginForecastDay(void) const { return m_beginForecastDay; } int forecastMethod(void) const { return m_forecastMethod; } - QDate historyStartDate(void) const { return m_historyStartDate; } - QDate historyEndDate(void) const { return m_historyEndDate; } - QDate forecastStartDate(void) const { return m_forecastStartDate; } - QDate forecastEndDate(void) const { return m_forecastEndDate; } + TQDate historyStartDate(void) const { return m_historyStartDate; } + TQDate historyEndDate(void) const { return m_historyEndDate; } + TQDate forecastStartDate(void) const { return m_forecastStartDate; } + TQDate forecastEndDate(void) const { return m_forecastEndDate; } bool skipOpeningDate(void) const { return m_skipOpeningDate; } int historyMethod(void) const { return m_historyMethod; } bool isIncludingUnusedAccounts(void) const { return m_includeUnusedAccounts; } @@ -175,11 +175,11 @@ public: * * @param schedule const reference to the schedule the transaction is based on * @param transaction reference to the transaction to be checked and modified - * @param balances QMap of (account-id,balance) pairs to be used as current balance + * @param balances TQMap of (account-id,balance) pairs to be used as current balance * for the calculation of interest. If map is empty, the engine * will be interrogated for current balances. */ - static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const QMap<QString, MyMoneyMoney>& balances); + static void calculateAutoLoan(const MyMoneySchedule& schedule, MyMoneyTransaction& transaction, const TQMap<TQString, MyMoneyMoney>& balances); private: @@ -188,22 +188,22 @@ private: /** * daily balances of an account */ - typedef QMap<QDate, MyMoneyMoney> dailyBalances; + typedef TQMap<TQDate, MyMoneyMoney> dailyBalances; /** * map of trends of an account */ - typedef QMap<int, MyMoneyMoney> trendBalances; + typedef TQMap<int, MyMoneyMoney> trendBalances; /** * Returns the list of accounts to be forecast. Only Asset and Liability are returned. */ - static QValueList<MyMoneyAccount> forecastAccountList(void); + static TQValueList<MyMoneyAccount> forecastAccountList(void); /** * Returns the list of accounts to create a budget. Only Income and Expenses are returned. */ - QValueList<MyMoneyAccount> budgetAccountList(void); + TQValueList<MyMoneyAccount> budgetAccountList(void); /** * calculate daily forecast balance based on historic transactions @@ -300,27 +300,27 @@ private: * remove accounts from the list if the accounts has no transactions in the forecast timeframe. * Used for scheduled-forecast method. */ - void purgeForecastAccountsList(QMap<QString, dailyBalances>& accountList); + void purgeForecastAccountsList(TQMap<TQString, dailyBalances>& accountList); /** * daily forecast balance of accounts */ - QMap<QString, dailyBalances> m_accountList; + TQMap<TQString, dailyBalances> m_accountList; /** * daily past balance of accounts */ - QMap<QString, dailyBalances> m_accountListPast; + TQMap<TQString, dailyBalances> m_accountListPast; /** * daily forecast trends of accounts */ - QMap<QString, trendBalances> m_accountTrendList; + TQMap<TQString, trendBalances> m_accountTrendList; /** * list of forecast accounts */ - QMap<QString, QString> m_nameIdx; + TQMap<TQString, TQString> m_nameIdx; /** * cycle of accounts in days @@ -340,7 +340,7 @@ private: /** * date to start forecast */ - QDate m_beginForecastDate; + TQDate m_beginForecastDate; /** * day to start forecast @@ -360,22 +360,22 @@ private: /** * start date of history */ - QDate m_historyStartDate; + TQDate m_historyStartDate; /** * end date of history */ - QDate m_historyEndDate; + TQDate m_historyEndDate; /** * start date of forecast */ - QDate m_forecastStartDate; + TQDate m_forecastStartDate; /** * end date of forecast */ - QDate m_forecastEndDate; + TQDate m_forecastEndDate; /** * skip opening date when fetching transactions of an account diff --git a/kmymoney2/mymoney/mymoneyforecasttest.cpp b/kmymoney2/mymoney/mymoneyforecasttest.cpp index dbe96ac..c200a1f 100644 --- a/kmymoney2/mymoney/mymoneyforecasttest.cpp +++ b/kmymoney2/mymoney/mymoneyforecasttest.cpp @@ -17,7 +17,7 @@ #include "mymoneyforecasttest.h" #include <iostream> -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "mymoneybudget.h" @@ -52,7 +52,7 @@ void MyMoneyForecastTest::setUp () { MyMoneyFileTransaction ft; file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$")); file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$")); - file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1)); + file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1)); file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#")); file->setBaseCurrency(file->currency("USD")); @@ -65,20 +65,20 @@ void MyMoneyForecastTest::setUp () { acLiability = (MyMoneyFile::instance()->liability().id()); acExpense = (MyMoneyFile::instance()->expense().id()); acIncome = (MyMoneyFile::instance()->income().id()); - acChecking = makeAccount(QString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,QDate(2004,5,15),acAsset, "USD"); - acCredit = makeAccount(QString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,QDate(2004,7,15),acLiability, "USD"); - acSolo = makeAccount(QString("Solo"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense, "USD"); - acParent = makeAccount(QString("Parent"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense, "USD"); - acChild = makeAccount(QString("Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent, "USD"); - acForeign = makeAccount(QString("Foreign"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense, "USD"); - acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,QDate(2004,1,1),acAsset, "USD"); - - acSecondChild = makeAccount(QString("Second Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent, "USD"); - acGrandChild1 = makeAccount(QString("Grand Child 1"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild, "USD"); - acGrandChild2 = makeAccount(QString("Grand Child 2"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild, "USD"); + acChecking = makeAccount(TQString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,TQDate(2004,5,15),acAsset, "USD"); + acCredit = makeAccount(TQString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,TQDate(2004,7,15),acLiability, "USD"); + acSolo = makeAccount(TQString("Solo"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense, "USD"); + acParent = makeAccount(TQString("Parent"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense, "USD"); + acChild = makeAccount(TQString("Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent, "USD"); + acForeign = makeAccount(TQString("Foreign"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense, "USD"); + acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,TQDate(2004,1,1),acAsset, "USD"); + + acSecondChild = makeAccount(TQString("Second Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent, "USD"); + acGrandChild1 = makeAccount(TQString("Grand Child 1"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild, "USD"); + acGrandChild2 = makeAccount(TQString("Grand Child 2"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild, "USD"); //this account added to have an account to test opening date calculations - acCash = makeAccount(QString("Cash"),MyMoneyAccount::Cash,moCreditOpen,QDate::currentDate().addDays(-2),acAsset, "USD"); + acCash = makeAccount(TQString("Cash"),MyMoneyAccount::Cash,moCreditOpen,TQDate::tqcurrentDate().addDays(-2),acAsset, "USD"); MyMoneyInstitution i("Bank of the World","","","","","",""); @@ -97,18 +97,18 @@ void MyMoneyForecastTest::testEmptyConstructor() { MyMoneyForecast a; MyMoneyAccount b; - int f = a.forecastBalance(b, QDate::currentDate()); + int f = a.forecastBalance(b, TQDate::tqcurrentDate()); CPPUNIT_ASSERT(f == 0); CPPUNIT_ASSERT(!a.isForecastAccount(b)); - CPPUNIT_ASSERT(a.forecastBalance(b, QDate::currentDate()) == MyMoneyMoney(0,1)); + CPPUNIT_ASSERT(a.forecastBalance(b, TQDate::tqcurrentDate()) == MyMoneyMoney(0,1)); CPPUNIT_ASSERT(a.daysToMinimumBalance(b) == -1); CPPUNIT_ASSERT(a.daysToZeroBalance(b) == -2); CPPUNIT_ASSERT(a.forecastDays() == KMyMoneyGlobalSettings::forecastDays()); CPPUNIT_ASSERT(a.accountsCycle() == KMyMoneyGlobalSettings::forecastAccountCycle()); CPPUNIT_ASSERT(a.forecastCycles() == KMyMoneyGlobalSettings::forecastCycles()); - CPPUNIT_ASSERT(a.historyStartDate() == QDate::currentDate().addDays(-KMyMoneyGlobalSettings::forecastCycles()*KMyMoneyGlobalSettings::forecastAccountCycle())); - CPPUNIT_ASSERT(a.historyEndDate() == QDate::currentDate().addDays(-1)); + CPPUNIT_ASSERT(a.historyStartDate() == TQDate::tqcurrentDate().addDays(-KMyMoneyGlobalSettings::forecastCycles()*KMyMoneyGlobalSettings::forecastAccountCycle())); + CPPUNIT_ASSERT(a.historyEndDate() == TQDate::tqcurrentDate().addDays(-1)); CPPUNIT_ASSERT(a.historyDays() == KMyMoneyGlobalSettings::forecastAccountCycle() * KMyMoneyGlobalSettings::forecastCycles()); } @@ -177,9 +177,9 @@ void MyMoneyForecastTest::testDoForecast() { a.doForecast(); //this is just to check nothing goes wrong if forecast is run agains an empty template //setup some transactions - TransactionHelper t1( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); - TransactionHelper t3( QDate::currentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); a.setForecastMethod(1); a.setForecastDays(3); @@ -190,32 +190,32 @@ void MyMoneyForecastTest::testDoForecast() { a.doForecast(); //checking didn't have balance variations, so the forecast should be equal to the current balance - MyMoneyMoney b_checking = file->balance(a_checking.id(), QDate::currentDate()); + MyMoneyMoney b_checking = file->balance(a_checking.id(), TQDate::tqcurrentDate()); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(1))==b_checking); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(2))==b_checking); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(3))==b_checking); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate())==b_checking); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(1))==b_checking); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(2))==b_checking); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(3))==b_checking); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate())==b_checking); //credit had a variation so the forecast should be different for each day - MyMoneyMoney b_credit = file->balance(a_credit.id(), QDate::currentDate()); + MyMoneyMoney b_credit = file->balance(a_credit.id(), TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.forecastBalance(a_credit, 0) == b_credit); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(1)) == (b_credit+(moT2-moT1))); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(2)) == (b_credit+((moT2-moT1)*2))); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(3)) == b_credit+((moT2-moT1)*3)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(1)) == (b_credit+(moT2-moT1))); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(2)) == (b_credit+((moT2-moT1)*2))); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(3)) == b_credit+((moT2-moT1)*3)); a.setHistoryMethod(1); //weighted moving average a.doForecast(); CPPUNIT_ASSERT(a.forecastBalance(a_credit, 0) == b_credit); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(1)) == (b_credit+(moT2-moT1))); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(2)) == (b_credit+((moT2-moT1)*2))); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(3)) == b_credit+((moT2-moT1)*3)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(1)) == (b_credit+(moT2-moT1))); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(2)) == (b_credit+((moT2-moT1)*2))); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(3)) == b_credit+((moT2-moT1)*3)); //insert transactions outside the forecast period. The calculation should be the same. - TransactionHelper t4( QDate::currentDate().addDays(-2), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); - TransactionHelper t5( QDate::currentDate().addDays(-10), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); - TransactionHelper t6( QDate::currentDate().addDays(-3), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); + TransactionHelper t4( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); + TransactionHelper t5( TQDate::tqcurrentDate().addDays(-10), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); + TransactionHelper t6( TQDate::tqcurrentDate().addDays(-3), MyMoneySplit::ActionDeposit, -moT2, acCredit, acParent ); a.setForecastMethod(1); a.setForecastDays(3); @@ -225,14 +225,14 @@ void MyMoneyForecastTest::testDoForecast() { a.setHistoryMethod(0); //moving average a.doForecast(); //check forecast - b_credit = file->balance(a_credit.id(), QDate::currentDate()); + b_credit = file->balance(a_credit.id(), TQDate::tqcurrentDate()); MyMoneyMoney b_credit_1_exp = (b_credit+((moT2-moT1))); - MyMoneyMoney b_credit_2 = a.forecastBalance(a_credit, QDate::currentDate().addDays(2)); + MyMoneyMoney b_credit_2 = a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(2)); MyMoneyMoney b_credit_2_exp = (b_credit+((moT2-moT1)*2)); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate())==file->balance(a_credit.id(), QDate::currentDate())); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(1))==b_credit+(moT2-moT1)); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(2))==b_credit+((moT2-moT1)*2)); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(3))==b_credit+((moT2-moT1)*3)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate())==file->balance(a_credit.id(), TQDate::tqcurrentDate())); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(1))==b_credit+(moT2-moT1)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(2))==b_credit+((moT2-moT1)*2)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(3))==b_credit+((moT2-moT1)*3)); //test weighted moving average a.setForecastMethod(1); @@ -244,7 +244,7 @@ void MyMoneyForecastTest::testDoForecast() { a.doForecast(); CPPUNIT_ASSERT(a.forecastBalance(a_credit, 0) == b_credit); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(1)) == (b_credit+(((moT2-moT1)*3+moT2*2+moT2)/MyMoneyMoney(6,1)))); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(1)) == (b_credit+(((moT2-moT1)*3+moT2*2+moT2)/MyMoneyMoney(6,1)))); } @@ -253,19 +253,19 @@ void MyMoneyForecastTest::testGetForecastAccountList() MyMoneyForecast a; MyMoneyAccount a_checking = file->account(acChecking); MyMoneyAccount a_parent = file->account(acParent); - QValueList<MyMoneyAccount> b; + TQValueList<MyMoneyAccount> b; b = a.forecastAccountList(); //check that it contains asset account, but not expense accounts - CPPUNIT_ASSERT(b.contains(a_checking)); - CPPUNIT_ASSERT(!b.contains(a_parent)); + CPPUNIT_ASSERT(b.tqcontains(a_checking)); + CPPUNIT_ASSERT(!b.tqcontains(a_parent)); } void MyMoneyForecastTest::testCalculateAccountTrend() { //set up environment - TransactionHelper t1( QDate::currentDate().addDays(-3), MyMoneySplit::ActionDeposit, -moT2, acChecking, acSolo ); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-3), MyMoneySplit::ActionDeposit, -moT2, acChecking, acSolo ); MyMoneyAccount a_checking = file->account(acChecking); //test invalid arguments @@ -296,8 +296,8 @@ void MyMoneyForecastTest::testCalculateAccountTrend() //test that it does not take into account the transactions of the opening date of the account MyMoneyAccount a_cash = file->account(acCash); - TransactionHelper t2( QDate::currentDate().addDays(-2), MyMoneySplit::ActionDeposit, moT2, acCash, acParent ); - TransactionHelper t3( QDate::currentDate().addDays(-1), MyMoneySplit::ActionDeposit, moT1, acCash, acParent ); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionDeposit, moT2, acCash, acParent ); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionDeposit, moT1, acCash, acParent ); CPPUNIT_ASSERT(MyMoneyForecast::calculateAccountTrend(a_cash,3) == -moT1); } @@ -307,9 +307,9 @@ void MyMoneyForecastTest::testGetForecastBalance() //set up environment MyMoneyForecast a; - TransactionHelper t1( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); - TransactionHelper t3( QDate::currentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); a.setForecastMethod(1); a.setForecastDays(3); @@ -322,23 +322,23 @@ void MyMoneyForecastTest::testGetForecastBalance() MyMoneyAccount a_credit = file->account(acCredit); //test invalid arguments - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(-1))==MyMoneyMoney(0,1)); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(-10))==MyMoneyMoney(0,1)); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(-1))==MyMoneyMoney(0,1)); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(-10))==MyMoneyMoney(0,1)); CPPUNIT_ASSERT(a.forecastBalance(a_checking, -1)==MyMoneyMoney(0,1)); CPPUNIT_ASSERT(a.forecastBalance(a_checking, -100)==MyMoneyMoney(0,1)); //test a date outside the forecast days - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(4))==MyMoneyMoney(0,1)); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(4))==MyMoneyMoney(0,1)); CPPUNIT_ASSERT(a.forecastBalance(a_checking, 4)==MyMoneyMoney(0,1)); - CPPUNIT_ASSERT(a.forecastBalance(a_checking, QDate::currentDate().addDays(10))==MyMoneyMoney(0,1)); + CPPUNIT_ASSERT(a.forecastBalance(a_checking, TQDate::tqcurrentDate().addDays(10))==MyMoneyMoney(0,1)); CPPUNIT_ASSERT(a.forecastBalance(a_checking, 10)==MyMoneyMoney(0,1)); //test it returns valid results - MyMoneyMoney b_credit = file->balance(a_credit.id(), QDate::currentDate()); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate())==file->balance(a_credit.id(), QDate::currentDate())); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(1))==b_credit+(moT2-moT1)); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(2))==b_credit+((moT2-moT1)*2)); - CPPUNIT_ASSERT(a.forecastBalance(a_credit, QDate::currentDate().addDays(3))==b_credit+((moT2-moT1)*3)); + MyMoneyMoney b_credit = file->balance(a_credit.id(), TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate())==file->balance(a_credit.id(), TQDate::tqcurrentDate())); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(1))==b_credit+(moT2-moT1)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(2))==b_credit+((moT2-moT1)*2)); + CPPUNIT_ASSERT(a.forecastBalance(a_credit, TQDate::tqcurrentDate().addDays(3))==b_credit+((moT2-moT1)*3)); } void MyMoneyForecastTest::testIsForecastAccount() @@ -364,10 +364,10 @@ void MyMoneyForecastTest::testDoFutureScheduledForecast() MyMoneyForecast a; MyMoneyAccount a_cash = file->account(acCash); - TransactionHelper t1( QDate::currentDate().addDays(1), MyMoneySplit::ActionDeposit, -moT1, acCash, acParent ); - TransactionHelper t2( QDate::currentDate().addDays(2), MyMoneySplit::ActionDeposit, -moT2, acCash, acParent ); - TransactionHelper t3( QDate::currentDate().addDays(3), MyMoneySplit::ActionDeposit, -moT3, acCash, acParent ); - TransactionHelper t4( QDate::currentDate().addDays(10), MyMoneySplit::ActionDeposit, -moT4, acCash, acParent ); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(1), MyMoneySplit::ActionDeposit, -moT1, acCash, acParent ); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(2), MyMoneySplit::ActionDeposit, -moT2, acCash, acParent ); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(3), MyMoneySplit::ActionDeposit, -moT3, acCash, acParent ); + TransactionHelper t4( TQDate::tqcurrentDate().addDays(10), MyMoneySplit::ActionDeposit, -moT4, acCash, acParent ); a.setForecastMethod(0); a.setForecastDays(3); @@ -375,13 +375,13 @@ void MyMoneyForecastTest::testDoFutureScheduledForecast() a.setForecastCycles(1); a.doForecast(); - MyMoneyMoney b_cash = file->balance(a_cash.id(), QDate::currentDate()); + MyMoneyMoney b_cash = file->balance(a_cash.id(), TQDate::tqcurrentDate()); //test valid results - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate())==b_cash); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(1))==b_cash+moT1); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(2))==b_cash+moT1+moT2); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(3))==b_cash+moT1+moT2+moT3); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate())==b_cash); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(1))==b_cash+moT1); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(2))==b_cash+moT1+moT2); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(3))==b_cash+moT1+moT2+moT3); } void MyMoneyForecastTest::testScheduleForecast() @@ -395,14 +395,14 @@ void MyMoneyForecastTest::testScheduleForecast() MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate().addDays(1), - QDate(), + TQDate::tqcurrentDate().addDays(1), + TQDate(), true, true); MyMoneyTransaction t; - t.setPostDate(QDate::currentDate().addDays(1)); - t.setEntryDate(QDate::currentDate().addDays(1)); + t.setPostDate(TQDate::tqcurrentDate().addDays(1)); + t.setEntryDate(TQDate::tqcurrentDate().addDays(1)); //t.setId("T000000000000000001"); t.setBankID("BID"); t.setMemo("Wohnung:Miete"); @@ -437,18 +437,18 @@ void MyMoneyForecastTest::testScheduleForecast() MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate().addDays(5), - QDate(), + TQDate::tqcurrentDate().addDays(5), + TQDate(), true, true); - //sch.setLastPayment(QDate::currentDate()); - //sch.recordPayment(QDate::currentDate().addDays(1)); + //sch.setLastPayment(TQDate::tqcurrentDate()); + //sch.recordPayment(TQDate::tqcurrentDate().addDays(1)); //sch.setId("SCH0001"); MyMoneyTransaction t3; - t3.setPostDate(QDate::currentDate().addDays(5)); - t3.setEntryDate(QDate::currentDate().addDays(5)); + t3.setPostDate(TQDate::tqcurrentDate().addDays(5)); + t3.setEntryDate(TQDate::tqcurrentDate().addDays(5)); //t.setId("T000000000000000001"); t3.setBankID("BID"); t3.setMemo("Wohnung:Miete"); @@ -484,18 +484,18 @@ void MyMoneyForecastTest::testScheduleForecast() MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate().addDays(2), - QDate(), + TQDate::tqcurrentDate().addDays(2), + TQDate(), true, true); - //sch.setLastPayment(QDate::currentDate()); - //sch.recordPayment(QDate::currentDate().addDays(1)); + //sch.setLastPayment(TQDate::tqcurrentDate()); + //sch.recordPayment(TQDate::tqcurrentDate().addDays(1)); //sch.setId("SCH0001"); MyMoneyTransaction t2; - t2.setPostDate(QDate::currentDate().addDays(2)); - t2.setEntryDate(QDate::currentDate().addDays(2)); + t2.setPostDate(TQDate::tqcurrentDate().addDays(2)); + t2.setEntryDate(TQDate::tqcurrentDate().addDays(2)); //t.setId("T000000000000000001"); t2.setBankID("BID"); t2.setMemo("Wohnung:Miete"); @@ -535,13 +535,13 @@ void MyMoneyForecastTest::testScheduleForecast() a.doForecast(); //check result for single schedule - MyMoneyMoney b_cash = file->balance(a_cash.id(), QDate::currentDate()); - MyMoneyMoney b_cash1 = a.forecastBalance(a_cash, QDate::currentDate().addDays(1)); + MyMoneyMoney b_cash = file->balance(a_cash.id(), TQDate::tqcurrentDate()); + MyMoneyMoney b_cash1 = a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(1)); //test valid results - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate())==b_cash); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(1))==b_cash-moT2); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(2))==b_cash-moT2-moT1); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate())==b_cash); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(1))==b_cash-moT2); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(2))==b_cash-moT2-moT1); } @@ -555,10 +555,10 @@ void MyMoneyForecastTest::testDaysToMinimumBalance() MyMoneyAccount a_parent = file->account(acParent); a_cash.setValue("minBalanceAbsolute", "50"); a_credit.setValue("minBalanceAbsolute", "50"); - TransactionHelper t1( QDate::currentDate().addDays(-1), MyMoneySplit::ActionDeposit, -moT1, acCash, acParent ); - TransactionHelper t2( QDate::currentDate().addDays(2), MyMoneySplit::ActionDeposit, moT2, acCash, acParent ); - TransactionHelper t3( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, -moT1, acCredit, acParent ); - TransactionHelper t4( QDate::currentDate().addDays(4), MyMoneySplit::ActionWithdrawal, moT5, acCredit, acParent ); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionDeposit, -moT1, acCash, acParent ); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(2), MyMoneySplit::ActionDeposit, moT2, acCash, acParent ); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, -moT1, acCredit, acParent ); + TransactionHelper t4( TQDate::tqcurrentDate().addDays(4), MyMoneySplit::ActionWithdrawal, moT5, acCredit, acParent ); a.setForecastMethod(0); a.setForecastDays(3); @@ -588,9 +588,9 @@ void MyMoneyForecastTest::testDaysToZeroBalance() MyMoneyAccount a_Credit = file->account(acCredit); //MyMoneyFileTransaction ft; - TransactionHelper t1( QDate::currentDate().addDays(2), MyMoneySplit::ActionWithdrawal, -moT1, acChecking, acSolo ); - TransactionHelper t2( QDate::currentDate().addDays(2), MyMoneySplit::ActionTransfer, (moT5), acCash, acCredit ); - TransactionHelper t3( QDate::currentDate().addDays(2), MyMoneySplit::ActionWithdrawal, (moT5*100), acCredit, acParent ); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(2), MyMoneySplit::ActionWithdrawal, -moT1, acChecking, acSolo ); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(2), MyMoneySplit::ActionTransfer, (moT5), acCash, acCredit ); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(2), MyMoneySplit::ActionWithdrawal, (moT5*100), acCredit, acParent ); //ft.commit(); MyMoneyForecast a; @@ -618,7 +618,7 @@ void MyMoneyForecastTest::testDaysToZeroBalance() //test it warns when inside the forecast period - MyMoneyMoney fCash = a.forecastBalance(a_Cash, QDate::currentDate().addDays(2)); + MyMoneyMoney fCash = a.forecastBalance(a_Cash, TQDate::tqcurrentDate().addDays(2)); CPPUNIT_ASSERT(a.daysToZeroBalance(a_Cash) == 2); @@ -631,8 +631,8 @@ void MyMoneyForecastTest::testSkipOpeningDate() //set up environment MyMoneyForecast a; - TransactionHelper t1( QDate::currentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); a.setForecastMethod(1); a.setForecastDays(3); @@ -644,12 +644,12 @@ void MyMoneyForecastTest::testSkipOpeningDate() MyMoneyAccount a_cash = file->account(acCash); //test it has no variation because it skipped the variation of the opening date - MyMoneyMoney b_cash = file->balance(a_cash.id(), QDate::currentDate()); + MyMoneyMoney b_cash = file->balance(a_cash.id(), TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.skipOpeningDate() == true); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate())==b_cash); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(1))==b_cash); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(2))==b_cash-moT2); - CPPUNIT_ASSERT(a.forecastBalance(a_cash, QDate::currentDate().addDays(3))==b_cash-moT2); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate())==b_cash); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(1))==b_cash); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(2))==b_cash-moT2); + CPPUNIT_ASSERT(a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(3))==b_cash-moT2); } void MyMoneyForecastTest::testAccountMinimumBalanceDateList() { @@ -657,34 +657,34 @@ void MyMoneyForecastTest::testAccountMinimumBalanceDateList() { //set up environment MyMoneyForecast a; - TransactionHelper t1( QDate::currentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); a.setForecastMethod(1); a.setForecastDays(6); a.setAccountsCycle(2); a.setForecastCycles(3); a.setHistoryMethod(0); - a.setBeginForecastDay(QDate::currentDate().addDays(1).day()); + a.setBeginForecastDay(TQDate::tqcurrentDate().addDays(1).day()); a.doForecast(); MyMoneyAccount a_cash = file->account(acCash); //test - QValueList<QDate> dateList; + TQValueList<TQDate> dateList; dateList = a.accountMinimumBalanceDateList(a_cash); - QValueList<QDate>::iterator it = dateList.begin(); + TQValueList<TQDate>::iterator it = dateList.begin(); - QDate minDate = *it; + TQDate minDate = *it; - CPPUNIT_ASSERT(minDate==QDate::currentDate().addDays(2)); + CPPUNIT_ASSERT(minDate==TQDate::tqcurrentDate().addDays(2)); it++; minDate = *it; - CPPUNIT_ASSERT(minDate==QDate::currentDate().addDays(4)); + CPPUNIT_ASSERT(minDate==TQDate::tqcurrentDate().addDays(4)); it++; minDate = *it; - CPPUNIT_ASSERT(minDate==QDate::currentDate().addDays(6)); + CPPUNIT_ASSERT(minDate==TQDate::tqcurrentDate().addDays(6)); } @@ -692,34 +692,34 @@ void MyMoneyForecastTest::testAccountMaximumBalanceDateList() { //set up environment MyMoneyForecast a; - TransactionHelper t1( QDate::currentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); a.setForecastMethod(1); a.setForecastDays(6); a.setAccountsCycle(2); a.setForecastCycles(3); a.setHistoryMethod(0); - a.setBeginForecastDay(QDate::currentDate().addDays(1).day()); + a.setBeginForecastDay(TQDate::tqcurrentDate().addDays(1).day()); a.doForecast(); MyMoneyAccount a_cash = file->account(acCash); //test - QValueList<QDate> dateList; + TQValueList<TQDate> dateList; dateList = a.accountMaximumBalanceDateList(a_cash); - QValueList<QDate>::iterator it = dateList.begin(); + TQValueList<TQDate>::iterator it = dateList.begin(); - QDate maxDate = *it; + TQDate maxDate = *it; - CPPUNIT_ASSERT(maxDate==QDate::currentDate().addDays(1)); + CPPUNIT_ASSERT(maxDate==TQDate::tqcurrentDate().addDays(1)); it++; maxDate = *it; - CPPUNIT_ASSERT(maxDate==QDate::currentDate().addDays(3)); + CPPUNIT_ASSERT(maxDate==TQDate::tqcurrentDate().addDays(3)); it++; maxDate = *it; - CPPUNIT_ASSERT(maxDate==QDate::currentDate().addDays(5)); + CPPUNIT_ASSERT(maxDate==TQDate::tqcurrentDate().addDays(5)); } @@ -728,8 +728,8 @@ void MyMoneyForecastTest::testAccountAverageBalance() { //set up environment MyMoneyForecast a; - TransactionHelper t1( QDate::currentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-2), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acSolo); a.setForecastMethod(1); a.setForecastDays(3); @@ -741,9 +741,9 @@ void MyMoneyForecastTest::testAccountAverageBalance() { MyMoneyAccount a_cash = file->account(acCash); //test - MyMoneyMoney b_cash1 = a.forecastBalance(a_cash, QDate::currentDate().addDays(1)); - MyMoneyMoney b_cash2 = a.forecastBalance(a_cash, QDate::currentDate().addDays(2)); - MyMoneyMoney b_cash3 = a.forecastBalance(a_cash, QDate::currentDate().addDays(3)); + MyMoneyMoney b_cash1 = a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(1)); + MyMoneyMoney b_cash2 = a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(2)); + MyMoneyMoney b_cash3 = a.forecastBalance(a_cash, TQDate::tqcurrentDate().addDays(3)); MyMoneyMoney average = (b_cash1 + b_cash2 +b_cash3)/MyMoneyMoney(3,1); @@ -754,7 +754,7 @@ void MyMoneyForecastTest::testAccountAverageBalance() { void MyMoneyForecastTest::testBeginForecastDate() { //set up environment MyMoneyForecast a; - QDate beginDate; + TQDate beginDate; int beginDay; a.setForecastMethod(1); @@ -765,7 +765,7 @@ void MyMoneyForecastTest::testBeginForecastDate() { a.doForecast(); //test when using old method without begin day - CPPUNIT_ASSERT(QDate::currentDate() == a.beginForecastDate()); + CPPUNIT_ASSERT(TQDate::tqcurrentDate() == a.beginForecastDate()); //setup begin to last day of month a.setBeginForecastDay(31); @@ -773,22 +773,22 @@ void MyMoneyForecastTest::testBeginForecastDate() { a.doForecast(); //test - if(QDate::currentDate().day() < beginDay) + if(TQDate::tqcurrentDate().day() < beginDay) { - if(QDate::currentDate().daysInMonth() < beginDay) - beginDay = QDate::currentDate().daysInMonth(); + if(TQDate::tqcurrentDate().daysInMonth() < beginDay) + beginDay = TQDate::tqcurrentDate().daysInMonth(); - beginDate = QDate(QDate::currentDate().year(), QDate::currentDate().month(), beginDay); + beginDate = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), beginDay); CPPUNIT_ASSERT(beginDate == a.beginForecastDate()); } //setup begin day to same date - a.setBeginForecastDay(QDate::currentDate().day()); + a.setBeginForecastDay(TQDate::tqcurrentDate().day()); beginDay = a.beginForecastDay(); a.doForecast(); - CPPUNIT_ASSERT(QDate::currentDate() == a.beginForecastDate()); + CPPUNIT_ASSERT(TQDate::tqcurrentDate() == a.beginForecastDate()); //setup to first day of month with small interval a.setBeginForecastDay(1); @@ -797,14 +797,14 @@ void MyMoneyForecastTest::testBeginForecastDate() { a.doForecast(); //test - if(QDate::currentDate() == a.beginForecastDate()) { - CPPUNIT_ASSERT(QDate::currentDate() == a.beginForecastDate()); + if(TQDate::tqcurrentDate() == a.beginForecastDate()) { + CPPUNIT_ASSERT(TQDate::tqcurrentDate() == a.beginForecastDate()); } else { - beginDay = ((((QDate::currentDate().day() - beginDay)/a.accountsCycle()) + 1) * a.accountsCycle()) + beginDay; - if(beginDay > QDate::currentDate().daysInMonth()) - beginDay = QDate::currentDate().daysInMonth(); - beginDate = QDate(QDate::currentDate().year(), QDate::currentDate().month(), beginDay); - if(QDate::currentDate().day() == QDate::currentDate().daysInMonth() ) { + beginDay = ((((TQDate::tqcurrentDate().day() - beginDay)/a.accountsCycle()) + 1) * a.accountsCycle()) + beginDay; + if(beginDay > TQDate::tqcurrentDate().daysInMonth()) + beginDay = TQDate::tqcurrentDate().daysInMonth(); + beginDate = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), beginDay); + if(TQDate::tqcurrentDate().day() == TQDate::tqcurrentDate().daysInMonth() ) { std::cout << std::endl << "testBeginForecastDate(): test of first day of month with small interval skipped because it is the last day of month" << std::endl; } else { CPPUNIT_ASSERT(beginDate == a.beginForecastDate()); @@ -813,9 +813,9 @@ void MyMoneyForecastTest::testBeginForecastDate() { //setup to test when current date plus cycle equals begin day a.setAccountsCycle(14); - beginDay = QDate::currentDate().addDays(14).day(); + beginDay = TQDate::tqcurrentDate().addDays(14).day(); a.setBeginForecastDay(beginDay); - beginDate = QDate::currentDate().addDays(14); + beginDate = TQDate::tqcurrentDate().addDays(14); a.doForecast(); //test @@ -826,10 +826,10 @@ void MyMoneyForecastTest::testBeginForecastDate() { a.setAccountsCycle(40); a.doForecast(); - beginDate = QDate(QDate::currentDate().addMonths(1).year(), QDate::currentDate().addMonths(1).month(), 1); + beginDate = TQDate(TQDate::tqcurrentDate().addMonths(1).year(), TQDate::tqcurrentDate().addMonths(1).month(), 1); //test - if(QDate::currentDate().day() > 1) { + if(TQDate::tqcurrentDate().day() > 1) { CPPUNIT_ASSERT(beginDate == a.beginForecastDate()); } else { //test is not valid if today is 1st of month @@ -841,8 +841,8 @@ void MyMoneyForecastTest::testBeginForecastDate() { { MyMoneyForecast a; - CPPUNIT_ASSERT(a.historyStartDate() == QDate::currentDate().addDays(-a.forecastCycles()*a.accountsCycle()) ); - CPPUNIT_ASSERT(a.historyEndDate() == QDate::currentDate().addDays(-1) ); + CPPUNIT_ASSERT(a.historyStartDate() == TQDate::tqcurrentDate().addDays(-a.forecastCycles()*a.accountsCycle()) ); + CPPUNIT_ASSERT(a.historyEndDate() == TQDate::tqcurrentDate().addDays(-1) ); CPPUNIT_ASSERT(a.historyDays() == a.forecastCycles()*a.accountsCycle()); a.setForecastMethod(1); @@ -852,9 +852,9 @@ void MyMoneyForecastTest::testBeginForecastDate() { a.setBeginForecastDay(0); a.doForecast(); - CPPUNIT_ASSERT(a.historyStartDate() == QDate::currentDate().addDays(-14*3) ); + CPPUNIT_ASSERT(a.historyStartDate() == TQDate::tqcurrentDate().addDays(-14*3) ); CPPUNIT_ASSERT(a.historyDays() == (14*3)); - CPPUNIT_ASSERT(a.historyEndDate() == (QDate::currentDate().addDays(-1)) ); + CPPUNIT_ASSERT(a.historyEndDate() == (TQDate::tqcurrentDate().addDays(-1)) ); } void MyMoneyForecastTest::testCreateBudget() @@ -864,43 +864,43 @@ void MyMoneyForecastTest::testCreateBudget() MyMoneyForecast b; MyMoneyBudget budget; - TransactionHelper t1( QDate(2005, 1, 3), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t2( QDate(2005, 1, 15), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acParent); - TransactionHelper t3( QDate(2005, 1, 30), MyMoneySplit::ActionWithdrawal, this->moT3, acCash, acSolo); - TransactionHelper t4( QDate(2006, 1, 25), MyMoneySplit::ActionWithdrawal, this->moT4, acCash, acParent); - TransactionHelper t5( QDate(2005, 4, 3), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); - TransactionHelper t6( QDate(2006, 5, 15), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acParent); - TransactionHelper t7( QDate(2005, 8, 3), MyMoneySplit::ActionWithdrawal, this->moT3, acCash, acSolo); - TransactionHelper t8( QDate(2006, 9, 15), MyMoneySplit::ActionWithdrawal, this->moT4, acCash, acParent); + TransactionHelper t1( TQDate(2005, 1, 3), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t2( TQDate(2005, 1, 15), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acParent); + TransactionHelper t3( TQDate(2005, 1, 30), MyMoneySplit::ActionWithdrawal, this->moT3, acCash, acSolo); + TransactionHelper t4( TQDate(2006, 1, 25), MyMoneySplit::ActionWithdrawal, this->moT4, acCash, acParent); + TransactionHelper t5( TQDate(2005, 4, 3), MyMoneySplit::ActionWithdrawal, this->moT1, acCash, acSolo); + TransactionHelper t6( TQDate(2006, 5, 15), MyMoneySplit::ActionWithdrawal, this->moT2, acCash, acParent); + TransactionHelper t7( TQDate(2005, 8, 3), MyMoneySplit::ActionWithdrawal, this->moT3, acCash, acSolo); + TransactionHelper t8( TQDate(2006, 9, 15), MyMoneySplit::ActionWithdrawal, this->moT4, acCash, acParent); a.setHistoryMethod(0); a.setForecastMethod(1); - a.createBudget(budget, QDate(2005, 1, 1), QDate(2006, 12, 31), QDate(2007, 1, 1), QDate(2007, 12, 31), true); + a.createBudget(budget, TQDate(2005, 1, 1), TQDate(2006, 12, 31), TQDate(2007, 1, 1), TQDate(2007, 12, 31), true); //test MyMoneyAccount a_solo = file->account(acSolo); MyMoneyAccount a_parent = file->account(acParent); //test it has no variation because it skipped the variation of the opening date - CPPUNIT_ASSERT(a.forecastBalance(a_solo, QDate(2007, 1, 1)) == ((moT1+moT3)/MyMoneyMoney(2, 1))); - CPPUNIT_ASSERT(a.forecastBalance(a_parent, QDate(2007, 1, 1)) == ((moT2+moT4)/MyMoneyMoney(2, 1))); - CPPUNIT_ASSERT(a.forecastBalance(a_solo, QDate(2007, 4, 1)) == ((moT1)/MyMoneyMoney(2, 1))); - CPPUNIT_ASSERT(a.forecastBalance(a_parent, QDate(2007, 5, 1)) == ((moT2)/MyMoneyMoney(2, 1))); - CPPUNIT_ASSERT(a.forecastBalance(a_solo, QDate(2007, 8, 1)) == ((moT3)/MyMoneyMoney(2, 1))); - CPPUNIT_ASSERT(a.forecastBalance(a_parent, QDate(2007, 9, 1)) == ((moT4)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_solo, TQDate(2007, 1, 1)) == ((moT1+moT3)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_parent, TQDate(2007, 1, 1)) == ((moT2+moT4)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_solo, TQDate(2007, 4, 1)) == ((moT1)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_parent, TQDate(2007, 5, 1)) == ((moT2)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_solo, TQDate(2007, 8, 1)) == ((moT3)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(a.forecastBalance(a_parent, TQDate(2007, 9, 1)) == ((moT4)/MyMoneyMoney(2, 1))); //test the budget object returned by the method - CPPUNIT_ASSERT(budget.account(a_parent.id()).period(QDate(2007, 9, 1)).amount() == ((moT4)/MyMoneyMoney(2, 1))); + CPPUNIT_ASSERT(budget.account(a_parent.id()).period(TQDate(2007, 9, 1)).amount() == ((moT4)/MyMoneyMoney(2, 1))); //setup test for a length lower than a year b.setForecastMethod(1); b.setHistoryMethod(0); - b.createBudget(budget, QDate(2005, 1, 1), QDate(2005, 6, 30), QDate(2007, 1, 1), QDate(2007, 6, 30), true); + b.createBudget(budget, TQDate(2005, 1, 1), TQDate(2005, 6, 30), TQDate(2007, 1, 1), TQDate(2007, 6, 30), true); //test - CPPUNIT_ASSERT(b.forecastBalance(a_solo, QDate(2007, 1, 1)) == (moT1+moT3)); - CPPUNIT_ASSERT(b.forecastBalance(a_parent, QDate(2007, 1, 1)) == (moT2)); - CPPUNIT_ASSERT(b.forecastBalance(a_solo, QDate(2007, 4, 1)) == (moT1)); - CPPUNIT_ASSERT(b.forecastBalance(a_parent, QDate(2007, 5, 1)) == (MyMoneyMoney(0, 1))); + CPPUNIT_ASSERT(b.forecastBalance(a_solo, TQDate(2007, 1, 1)) == (moT1+moT3)); + CPPUNIT_ASSERT(b.forecastBalance(a_parent, TQDate(2007, 1, 1)) == (moT2)); + CPPUNIT_ASSERT(b.forecastBalance(a_solo, TQDate(2007, 4, 1)) == (moT1)); + CPPUNIT_ASSERT(b.forecastBalance(a_parent, TQDate(2007, 5, 1)) == (MyMoneyMoney(0, 1))); //set up schedule environment for testing MyMoneyAccount a_cash = file->account(acCash); @@ -910,14 +910,14 @@ void MyMoneyForecastTest::testCreateBudget() MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_MONTHLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate(), - QDate(), + TQDate::tqcurrentDate(), + TQDate(), true, true); MyMoneyTransaction t10; - t10.setPostDate(QDate::currentDate().addMonths(1)); - t10.setEntryDate(QDate::currentDate().addMonths(1)); + t10.setPostDate(TQDate::tqcurrentDate().addMonths(1)); + t10.setEntryDate(TQDate::tqcurrentDate().addMonths(1)); //t.setId("T000000000000000001"); t10.setBankID("BID"); t10.setMemo("Wohnung:Miete"); @@ -951,12 +951,12 @@ void MyMoneyForecastTest::testCreateBudget() MyMoneyForecast c; c.setForecastMethod(0); c.setForecastCycles(1); - c.createBudget(budget, QDate::currentDate().addYears(-2), QDate::currentDate().addYears(-1), QDate::currentDate().addMonths(-2), QDate::currentDate().addMonths(6), true); + c.createBudget(budget, TQDate::tqcurrentDate().addYears(-2), TQDate::tqcurrentDate().addYears(-1), TQDate::tqcurrentDate().addMonths(-2), TQDate::tqcurrentDate().addMonths(6), true); - MyMoneyMoney c_parent = c.forecastBalance(a_parent, QDate(QDate::currentDate().addMonths(1).year(), QDate::currentDate().addMonths(1).month(), 1) ); + MyMoneyMoney c_parent = c.forecastBalance(a_parent, TQDate(TQDate::tqcurrentDate().addMonths(1).year(), TQDate::tqcurrentDate().addMonths(1).month(), 1) ); //test valid results - CPPUNIT_ASSERT(c.forecastBalance(a_parent, QDate(QDate::currentDate().addMonths(1).year(), QDate::currentDate().addMonths(1).month(), 1) ) == (moT2)); + CPPUNIT_ASSERT(c.forecastBalance(a_parent, TQDate(TQDate::tqcurrentDate().addMonths(1).year(), TQDate::tqcurrentDate().addMonths(1).month(), 1) ) == (moT2)); } void MyMoneyForecastTest::testLinearRegression() { @@ -967,9 +967,9 @@ void MyMoneyForecastTest::testLinearRegression() { MyMoneyAccount a_credit = file->account(acCredit); //setup some transactions - TransactionHelper t1( QDate::currentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); - TransactionHelper t2( QDate::currentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); - TransactionHelper t3( QDate::currentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); + TransactionHelper t1( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionWithdrawal, this->moT1, acChecking, acSolo); + TransactionHelper t2( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionDeposit, -(this->moT2), acCredit, acParent); + TransactionHelper t3( TQDate::tqcurrentDate().addDays(-1), MyMoneySplit::ActionTransfer, this->moT1, acCredit, acChecking); //TODO Add tests specific for linear regression diff --git a/kmymoney2/mymoney/mymoneyinstitution.cpp b/kmymoney2/mymoney/mymoneyinstitution.cpp index 9969ee7..5b3b19e 100644 --- a/kmymoney2/mymoney/mymoneyinstitution.cpp +++ b/kmymoney2/mymoney/mymoneyinstitution.cpp @@ -34,20 +34,20 @@ MyMoneyInstitution::MyMoneyInstitution() { } -MyMoneyInstitution::MyMoneyInstitution(const QString& id, const MyMoneyInstitution& right) : +MyMoneyInstitution::MyMoneyInstitution(const TQString& id, const MyMoneyInstitution& right) : MyMoneyObject(id) { *this = right; m_id = id; } -MyMoneyInstitution::MyMoneyInstitution(const QString& name, - const QString& town, - const QString& street, - const QString& postcode, - const QString& telephone, - const QString& manager, - const QString& sortcode) +MyMoneyInstitution::MyMoneyInstitution(const TQString& name, + const TQString& town, + const TQString& street, + const TQString& postcode, + const TQString& telephone, + const TQString& manager, + const TQString& sortcode) { clearId(); m_name = name; @@ -59,7 +59,7 @@ MyMoneyInstitution::MyMoneyInstitution(const QString& name, m_sortcode = sortcode; } -MyMoneyInstitution::MyMoneyInstitution(const QDomElement& node) : +MyMoneyInstitution::MyMoneyInstitution(const TQDomElement& node) : MyMoneyObject(node), MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()) { @@ -70,13 +70,13 @@ MyMoneyInstitution::MyMoneyInstitution(const QDomElement& node) : m_name = node.attribute("name"); m_manager = node.attribute("manager"); - QDomNodeList nodeList = node.elementsByTagName("ADDRESS"); + TQDomNodeList nodeList = node.elementsByTagName("ADDRESS"); if(nodeList.count() == 0) { - QString msg = QString("No ADDRESS in institution %1").arg(m_name); + TQString msg = TQString("No ADDRESS in institution %1").tqarg(m_name); throw new MYMONEYEXCEPTION(msg); } - QDomElement addrNode = nodeList.item(0).toElement(); + TQDomElement addrNode = nodeList.item(0).toElement(); m_street = addrNode.attribute("street"); m_town = addrNode.attribute("city"); m_postcode = addrNode.attribute("zip"); @@ -97,19 +97,19 @@ MyMoneyInstitution::~MyMoneyInstitution() { } -void MyMoneyInstitution::addAccountId(const QString& account) +void MyMoneyInstitution::addAccountId(const TQString& account) { // only add this account if it is not yet presently in the list - if(m_accountList.contains(account) == 0) + if(m_accountList.tqcontains(account) == 0) m_accountList.append(account); } -QString MyMoneyInstitution::removeAccountId(const QString& account) +TQString MyMoneyInstitution::removeAccountId(const TQString& account) { - QStringList::Iterator pos; - QString rc; + TQStringList::Iterator pos; + TQString rc; - pos = m_accountList.find(account); + pos = m_accountList.tqfind(account); if(pos != m_accountList.end()) { m_accountList.remove(pos); rc = account; @@ -138,9 +138,9 @@ bool MyMoneyInstitution::operator == (const MyMoneyInstitution& right) const return false; } -void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyInstitution::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("INSTITUTION"); + TQDomElement el = document.createElement("INSTITUTION"); writeBaseXML(document, el); @@ -148,7 +148,7 @@ void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) c el.setAttribute("manager", m_manager); el.setAttribute("sortcode", m_sortcode); - QDomElement address = document.createElement("ADDRESS"); + TQDomElement address = document.createElement("ADDRESS"); address.setAttribute("street", m_street); address.setAttribute("city", m_town); address.setAttribute("zip", m_postcode); @@ -156,9 +156,9 @@ void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) c el.appendChild(address); - QDomElement accounts = document.createElement("ACCOUNTIDS"); - for(QStringList::ConstIterator it = accountList().begin(); it != accountList().end(); ++it){ - QDomElement temp = document.createElement("ACCOUNTID"); + TQDomElement accounts = document.createElement("ACCOUNTIDS"); + for(TQStringList::ConstIterator it = accountList().begin(); it != accountList().end(); ++it){ + TQDomElement temp = document.createElement("ACCOUNTID"); temp.setAttribute("id", (*it)); accounts.appendChild(temp); } @@ -167,16 +167,16 @@ void MyMoneyInstitution::writeXML(QDomDocument& document, QDomElement& parent) c //Add in Key-Value Pairs for institutions. MyMoneyKeyValueContainer::writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneyInstitution::hasReferenceTo(const QString& /* id */) const +bool MyMoneyInstitution::hasReferenceTo(const TQString& /* id */) const { bool rc = false; return rc; } -QPixmap MyMoneyInstitution::pixmap() const { - return QPixmap(KGlobal::dirs()->findResource("appdata",QString( "icons/hicolor/22x22/actions/%1.png").arg("bank"))); +TQPixmap MyMoneyInstitution::pixmap() const { + return TQPixmap(KGlobal::dirs()->findResource("appdata",TQString( "icons/hicolor/22x22/actions/%1.png").tqarg("bank"))); } diff --git a/kmymoney2/mymoney/mymoneyinstitution.h b/kmymoney2/mymoney/mymoneyinstitution.h index 35b44c5..47d9321 100644 --- a/kmymoney2/mymoney/mymoneyinstitution.h +++ b/kmymoney2/mymoney/mymoneyinstitution.h @@ -24,10 +24,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qmap.h> -#include <qstringlist.h> -#include <qpixmap.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqstringlist.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // Project Includes @@ -58,13 +58,13 @@ public: * values required for a new institution. This object should then be * passed to @see MyMoneyFile::addInstitution */ - MyMoneyInstitution(const QString& name, - const QString& city, - const QString& street, - const QString& postcode, - const QString& telephone, - const QString& manager, - const QString& sortCode); + MyMoneyInstitution(const TQString& name, + const TQString& city, + const TQString& street, + const TQString& postcode, + const TQString& telephone, + const TQString& manager, + const TQString& sortCode); /** * This is the destructor for any MyMoneyInstitution object @@ -77,34 +77,34 @@ public: * @param id id assigned to the new institution object * @param right institution definition */ - MyMoneyInstitution(const QString& id, const MyMoneyInstitution& right); + MyMoneyInstitution(const TQString& id, const MyMoneyInstitution& right); /** * This is the constructor for an institution that is described by a - * QDomElement (e.g. from a file). + * TQDomElement (e.g. from a file). * - * @param el const reference to the QDomElement from which to + * @param el const reference to the TQDomElement from which to * create the object */ - MyMoneyInstitution(const QDomElement& el); + MyMoneyInstitution(const TQDomElement& el); - const QString& manager(void) const { return m_manager; } - const QString& name(void) const { return m_name; } - const QString& postcode(void) const { return m_postcode; } - const QString& street(void) const { return m_street; } - const QString& telephone(void) const { return m_telephone; } - const QString& town(void) const { return m_town; } - const QString& city(void) const { return town(); } - const QString& sortcode(void) const { return m_sortcode; } + const TQString& manager(void) const { return m_manager; } + const TQString& name(void) const { return m_name; } + const TQString& postcode(void) const { return m_postcode; } + const TQString& street(void) const { return m_street; } + const TQString& telephone(void) const { return m_telephone; } + const TQString& town(void) const { return m_town; } + const TQString& city(void) const { return town(); } + const TQString& sortcode(void) const { return m_sortcode; } - void setManager(QString manager) { m_manager = manager; } - void setName(QString name) { m_name = name; } - void setPostcode(QString code) { m_postcode = code; } - void setStreet(QString street) { m_street = street; } - void setTelephone(QString tel) { m_telephone = tel; } - void setTown(QString town) { m_town = town; } - void setCity(QString town) { setTown(town); } - void setSortcode(QString code) { m_sortcode = code; } + void setManager(TQString manager) { m_manager = manager; } + void setName(TQString name) { m_name = name; } + void setPostcode(TQString code) { m_postcode = code; } + void setStreet(TQString street) { m_street = street; } + void setTelephone(TQString tel) { m_telephone = tel; } + void setTown(TQString town) { m_town = town; } + void setCity(TQString town) { setTown(town); } + void setSortcode(TQString code) { m_sortcode = code; } /** * This method adds the id of an account to the account list of @@ -113,7 +113,7 @@ public: * * @param account id of the account to be added */ - void addAccountId(const QString& account); + void addAccountId(const TQString& account); /** * This method deletes the id of an account from the account list @@ -122,14 +122,14 @@ public: * @param account id of the account to be deleted * @return id of account deleted, otherwise empty string */ - QString removeAccountId(const QString& account); + TQString removeAccountId(const TQString& account); /** * This method is used to return the set of accounts known to * this institution - * return QStringList of account ids + * return TQStringList of account ids */ - const QStringList& accountList(void) const { return m_accountList; } + const TQStringList& accountList(void) const { return m_accountList; } /** * This method returns the number of accounts known to @@ -141,7 +141,7 @@ public: bool operator == (const MyMoneyInstitution&) const; bool operator < (const MyMoneyInstitution& right) const; - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -152,55 +152,55 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; - QPixmap pixmap() const; + TQPixmap pixmap() const; private: // Bank 'fields' /** * This member variable keeps the name of the institution */ - QString m_name; + TQString m_name; /** * This member variable keeps the city of the institution */ - QString m_town; + TQString m_town; /** * This member variable keeps the street of the institution */ - QString m_street; + TQString m_street; /** * This member variable keeps the zip-code of the institution */ - QString m_postcode; + TQString m_postcode; /** * This member variable keeps the telephone number of the institution */ - QString m_telephone; + TQString m_telephone; /** * This member variable keeps the name of the representative of * the institution */ - QString m_manager; + TQString m_manager; /** * This member variable keeps the sort code of the institution. * FIXME: I have no idea * what it is good for. I keep it because it was in the old engine. */ - QString m_sortcode; + TQString m_sortcode; /** * This member variable keeps the sorted list of the account ids * available at this institution */ - QStringList m_accountList; + TQStringList m_accountList; }; #endif diff --git a/kmymoney2/mymoney/mymoneyinstitutiontest.cpp b/kmymoney2/mymoney/mymoneyinstitutiontest.cpp index ce707ec..bf889b0 100644 --- a/kmymoney2/mymoney/mymoneyinstitutiontest.cpp +++ b/kmymoney2/mymoney/mymoneyinstitutiontest.cpp @@ -161,8 +161,8 @@ void MyMoneyInstitutionTest::testInequality () { void MyMoneyInstitutionTest::testAccountIDList () { MyMoneyInstitution institution; - QStringList list; - QString id; + TQStringList list; + TQString id; // list must be empty list = institution.accountList(); @@ -172,26 +172,26 @@ void MyMoneyInstitutionTest::testAccountIDList () { institution.addAccountId("A000002"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); // adding same account shouldn't make a difference institution.addAccountId("A000002"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); // now add another account institution.addAccountId("A000001"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 2); - CPPUNIT_ASSERT(list.contains("A000002") == 1); - CPPUNIT_ASSERT(list.contains("A000001") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000001") == 1); id = institution.removeAccountId("A000001"); CPPUNIT_ASSERT(id == "A000001"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); } @@ -200,17 +200,17 @@ void MyMoneyInstitutionTest::testWriteXML() { n->addAccountId("A000001"); n->addAccountId("A000003"); - n->setValue(QString("key"), "value"); + n->setValue(TQString("key"), "value"); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("INSTITUTION-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("INSTITUTION-CONTAINER"); doc.appendChild(el); MyMoneyInstitution i("I00001", *n); i.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<INSTITUTION-CONTAINER>\n" " <INSTITUTION sortcode=\"sortcode\" id=\"I00001\" manager=\"manager\" name=\"name\" >\n" @@ -230,7 +230,7 @@ void MyMoneyInstitutionTest::testWriteXML() { void MyMoneyInstitutionTest::testReadXML() { MyMoneyInstitution i; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<INSTITUTION-CONTAINER>\n" " <INSTITUTION sortcode=\"sortcode\" id=\"I00001\" manager=\"manager\" name=\"name\" >\n" @@ -245,7 +245,7 @@ void MyMoneyInstitutionTest::testReadXML() { " </INSTITUTION>\n" "</INSTITUTION-CONTAINER>\n"); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<INSTITUTION-CONTAINER>\n" " <KINSTITUTION sortcode=\"sortcode\" id=\"I00001\" manager=\"manager\" name=\"name\" >\n" @@ -257,8 +257,8 @@ void MyMoneyInstitutionTest::testReadXML() { " </KINSTITUTION>\n" "</INSTITUTION-CONTAINER>\n"); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -274,7 +274,7 @@ void MyMoneyInstitutionTest::testReadXML() { doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); try { - QStringList alist; + TQStringList alist; alist << "A000001" << "A000003"; i = MyMoneyInstitution(node); @@ -287,7 +287,7 @@ void MyMoneyInstitutionTest::testReadXML() { CPPUNIT_ASSERT(i.city() == "town"); CPPUNIT_ASSERT(i.telephone() == "telephone"); CPPUNIT_ASSERT(i.accountList() == alist); - CPPUNIT_ASSERT(i.value(QString("key")) == "value"); + CPPUNIT_ASSERT(i.value(TQString("key")) == "value"); } catch(MyMoneyException *e) { delete e; diff --git a/kmymoney2/mymoney/mymoneyinvesttransaction.cpp b/kmymoney2/mymoney/mymoneyinvesttransaction.cpp index a7cf082..89bef92 100644 --- a/kmymoney2/mymoney/mymoneyinvesttransaction.cpp +++ b/kmymoney2/mymoney/mymoneyinvesttransaction.cpp @@ -23,10 +23,10 @@ #include "mymoneyinvesttransaction.h" #if 0 -MyMoneyInvestTransaction::MyMoneyInvestTransaction(MyMoneyAccount *parent, const long id, transactionMethod method, const QString& number, const QString& memo, - const MyMoneyMoney& amount, const QDate& date, const QString& categoryMajor, const QString& categoryMinor, const QString& atmName, - const QString& fromTo, const QString& bankFrom, const QString& bankTo, stateE state) - : MyMoneyTransaction(parent, id, method, number, memo, amount, date, categoryMajor, categoryMinor, atmName, fromTo, bankFrom, bankTo, state) +MyMoneyInvestTransaction::MyMoneyInvestTransaction(MyMoneyAccount *tqparent, const long id, transactionMethod method, const TQString& number, const TQString& memo, + const MyMoneyMoney& amount, const TQDate& date, const TQString& categoryMajor, const TQString& categoryMinor, const TQString& atmName, + const TQString& fromTo, const TQString& bankFrom, const TQString& bankTo, stateE state) + : MyMoneyTransaction(tqparent, id, method, number, memo, amount, date, categoryMajor, categoryMinor, atmName, fromTo, bankFrom, bankTo, state) { } diff --git a/kmymoney2/mymoney/mymoneyinvesttransaction.h b/kmymoney2/mymoney/mymoneyinvesttransaction.h index 59f5d5b..e414b3a 100644 --- a/kmymoney2/mymoney/mymoneyinvesttransaction.h +++ b/kmymoney2/mymoney/mymoneyinvesttransaction.h @@ -33,9 +33,9 @@ class MyMoneyInvestTransaction : public MyMoneyTransaction { public: MyMoneyInvestTransaction(); - MyMoneyInvestTransaction(MyMoneyAccount *parent, const long id, transactionMethod method, const QString& number, const QString& memo, - const MyMoneyMoney& amount, const QDate& date, const QString& categoryMajor, const QString& categoryMinor, const QString& atmName, - const QString& fromTo, const QString& bankFrom, const QString& bankTo, stateE state); + MyMoneyInvestTransaction(MyMoneyAccount *tqparent, const long id, transactionMethod method, const TQString& number, const TQString& memo, + const MyMoneyMoney& amount, const TQDate& date, const TQString& categoryMajor, const TQString& categoryMinor, const TQString& atmName, + const TQString& fromTo, const TQString& bankFrom, const TQString& bankTo, stateE state); ~MyMoneyInvestTransaction(); }; #endif diff --git a/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp b/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp index 4df855b..382893a 100644 --- a/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp +++ b/kmymoney2/mymoney/mymoneykeyvaluecontainer.cpp @@ -28,7 +28,7 @@ MyMoneyKeyValueContainer::MyMoneyKeyValueContainer() { } -MyMoneyKeyValueContainer::MyMoneyKeyValueContainer(const QDomElement& node) +MyMoneyKeyValueContainer::MyMoneyKeyValueContainer(const TQDomElement& node) { if(!node.isNull()) { if("KEYVALUEPAIRS" != node.tagName()) @@ -36,9 +36,9 @@ MyMoneyKeyValueContainer::MyMoneyKeyValueContainer(const QDomElement& node) m_kvp.clear(); - QDomNodeList nodeList = node.elementsByTagName("PAIR"); + TQDomNodeList nodeList = node.elementsByTagName("PAIR"); for(unsigned int i = 0; i < nodeList.count(); ++i) { - const QDomElement& el(nodeList.item(i).toElement()); + const TQDomElement& el(nodeList.item(i).toElement()); m_kvp[el.attribute("key")] = el.attribute("value"); } } @@ -48,32 +48,32 @@ MyMoneyKeyValueContainer::~MyMoneyKeyValueContainer() { } -const QString& MyMoneyKeyValueContainer::value(const QString& key) const +const TQString& MyMoneyKeyValueContainer::value(const TQString& key) const { - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; - it = m_kvp.find(key); + it = m_kvp.tqfind(key); if(it != m_kvp.end()) return (*it); - return QString::null; + return TQString(); } -void MyMoneyKeyValueContainer::setValue(const QString& key, const QString& value) +void MyMoneyKeyValueContainer::setValue(const TQString& key, const TQString& value) { m_kvp[key] = value; } -void MyMoneyKeyValueContainer::setPairs(const QMap<QString, QString>& list) +void MyMoneyKeyValueContainer::setPairs(const TQMap<TQString, TQString>& list) { m_kvp = list; } -void MyMoneyKeyValueContainer::deletePair(const QString& key) +void MyMoneyKeyValueContainer::deletePair(const TQString& key) { - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; - it = m_kvp.find(key); + it = m_kvp.tqfind(key); if(it != m_kvp.end()) m_kvp.remove(it); } @@ -85,7 +85,7 @@ void MyMoneyKeyValueContainer::clear(void) bool MyMoneyKeyValueContainer::operator == (const MyMoneyKeyValueContainer& right) const { - QMap<QString, QString>::ConstIterator it_a, it_b; + TQMap<TQString, TQString>::ConstIterator it_a, it_b; it_a = m_kvp.begin(); it_b = right.m_kvp.begin(); @@ -101,20 +101,20 @@ bool MyMoneyKeyValueContainer::operator == (const MyMoneyKeyValueContainer& righ return (it_a == m_kvp.end() && it_b == right.m_kvp.end()); } -void MyMoneyKeyValueContainer::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyKeyValueContainer::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { if(m_kvp.count() != 0) { - QDomElement el = document.createElement("KEYVALUEPAIRS"); + TQDomElement el = document.createElement("KEYVALUEPAIRS"); - QMap<QString, QString>::ConstIterator it; + TQMap<TQString, TQString>::ConstIterator it; for(it = m_kvp.begin(); it != m_kvp.end(); ++it) { - QDomElement pair = document.createElement("PAIR"); + TQDomElement pair = document.createElement("PAIR"); pair.setAttribute("key", it.key()); pair.setAttribute("value", it.data()); el.appendChild(pair); } - parent.appendChild(el); + tqparent.appendChild(el); } } diff --git a/kmymoney2/mymoney/mymoneykeyvaluecontainer.h b/kmymoney2/mymoney/mymoneykeyvaluecontainer.h index fa045b9..42169d5 100644 --- a/kmymoney2/mymoney/mymoneykeyvaluecontainer.h +++ b/kmymoney2/mymoney/mymoneykeyvaluecontainer.h @@ -30,9 +30,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qmap.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqdom.h> #include <kmymoney/export.h> // ---------------------------------------------------------------------------- @@ -53,7 +53,7 @@ class KMYMONEY_EXPORT MyMoneyKeyValueContainer { public: MyMoneyKeyValueContainer(); - MyMoneyKeyValueContainer(const QDomElement& node); + MyMoneyKeyValueContainer(const TQDomElement& node); ~MyMoneyKeyValueContainer(); @@ -61,28 +61,28 @@ public: * This method can be used to retrieve the value for a specific @p key. * If the key is unknown in this container, an empty string will be returned. * - * @param key const reference to QString with the key to search for + * @param key const reference to TQString with the key to search for * @return reference to value of this key. If the key does not exist, * an emtpy string is returned. */ - const QString& value(const QString& key) const; + const TQString& value(const TQString& key) const; /** * This method is used to add a key/value pair to the container or * modify an existing pair. * - * @param key const reference to QString with the key to search for - * @param value const reference to QString with the value for this key + * @param key const reference to TQString with the key to search for + * @param value const reference to TQString with the value for this key */ - void setValue(const QString& key, const QString& value); + void setValue(const TQString& key, const TQString& value); /** * This method is used to remove an existing key/value pair from the * container. If the key does not exist, the container is not changed. * - * @param key const reference to QString with the key to remove + * @param key const reference to TQString with the key to remove */ - void deletePair(const QString& key); + void deletePair(const TQString& key); /** * This method clears all pairs currently in the container. @@ -94,46 +94,46 @@ public: * from the container. It is meant to be used for permanent storage * functionality. * - * @return QMap<QString, QString> containing all key/value pairs of + * @return TQMap<TQString, TQString> containing all key/value pairs of * this container. */ - const QMap<QString, QString>& pairs(void) const { return m_kvp; }; + const TQMap<TQString, TQString>& pairs(void) const { return m_kvp; }; /** * This method is used to initially store a set of key/value pairs * in the container. It is meant to be used for loading functionality * from permanent storage. * - * @param list const QMap<QString, QString> containing the set of + * @param list const TQMap<TQString, TQString> containing the set of * key/value pairs to be loaded into the container. * * @note All existing key/value pairs in the container will be deleted. */ - void setPairs(const QMap<QString, QString>& list); + void setPairs(const TQMap<TQString, TQString>& list); /** * This operator tests for equality of two MyMoneyKeyValueContainer objects */ bool operator == (const MyMoneyKeyValueContainer &) const; - const QString& operator[] ( const QString& k ) const { return value(k); } + const TQString& operator[] ( const TQString& k ) const { return value(k); } - QString& operator[] ( const QString& k) { return m_kvp[k]; } + TQString& operator[] ( const TQString& k) { return m_kvp[k]; } /** - * This method creates a QDomElement for the @p document - * under the parent node @p parent. + * This method creates a TQDomElement for the @p document + * under the tqparent node @p tqparent. * - * @param document reference to QDomDocument - * @param parent reference to QDomElement parent node + * @param document reference to TQDomDocument + * @param tqparent reference to TQDomElement tqparent node */ - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; private: /** * This member variable represents the container of key/value pairs. */ - QMap<QString, QString> m_kvp; + TQMap<TQString, TQString> m_kvp; }; #endif diff --git a/kmymoney2/mymoney/mymoneykeyvaluecontainertest.cpp b/kmymoney2/mymoney/mymoneykeyvaluecontainertest.cpp index 6d3d1db..bc1757d 100644 --- a/kmymoney2/mymoney/mymoneykeyvaluecontainertest.cpp +++ b/kmymoney2/mymoney/mymoneykeyvaluecontainertest.cpp @@ -70,7 +70,7 @@ void MyMoneyKeyValueContainerTest::testClear() { } void MyMoneyKeyValueContainerTest::testRetrieveList() { - QMap<QString, QString> copy; + TQMap<TQString, TQString> copy; copy = m->pairs(); CPPUNIT_ASSERT(copy.count() == 0); @@ -95,12 +95,12 @@ void MyMoneyKeyValueContainerTest::testWriteXML() { m->setValue("Key", "Value"); m->setValue("key", "value"); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("KVP-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("KVP-CONTAINER"); doc.appendChild(el); m->writeXML(doc, el); - QString ref( + TQString ref( "<!DOCTYPE TEST>\n" "<KVP-CONTAINER>\n" " <KEYVALUEPAIRS>\n" @@ -116,7 +116,7 @@ void MyMoneyKeyValueContainerTest::testReadXML() { m->setValue("Key", "Value"); m->setValue("key", "value"); - QString ref_ok( + TQString ref_ok( "<!DOCTYPE TEST>\n" "<KVP-CONTAINER>\n" " <KEYVALUEPAIRS>\n" @@ -125,7 +125,7 @@ void MyMoneyKeyValueContainerTest::testReadXML() { " </KEYVALUEPAIRS>\n" "</KVP-CONTAINER>\n"); - QString ref_false( + TQString ref_false( "<!DOCTYPE TEST>\n" "<KVP-CONTAINER>\n" " <KEYVALUE-PAIRS>\n" @@ -135,14 +135,14 @@ void MyMoneyKeyValueContainerTest::testReadXML() { "</KVP-CONTAINER>\n"); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); // make sure, an empty node does not trigger an exception try { - MyMoneyKeyValueContainer k(QDomNode()); + MyMoneyKeyValueContainer k(TQDomNode()); } catch(MyMoneyException *e) { CPPUNIT_FAIL("Unexpected exception"); delete e; diff --git a/kmymoney2/mymoney/mymoneymoney.cpp b/kmymoney2/mymoney/mymoneymoney.cpp index 993a872..ccf1d80 100644 --- a/kmymoney2/mymoney/mymoneymoney.cpp +++ b/kmymoney2/mymoney/mymoneymoney.cpp @@ -28,7 +28,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // Project Includes @@ -111,7 +111,7 @@ void MyMoneyMoney::setFileVersion(fileVersionE version) _fileVersion = version; } -MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) +MyMoneyMoney::MyMoneyMoney(const TQString& pszAmount) { m_num = 0; m_denom = 1; @@ -122,15 +122,15 @@ MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) // take care of prices given in the form "8 5/16" // and our own internal represenation - QRegExp regExp("^((\\d+)\\s+|-)?(\\d+)/(\\d+)"); + TQRegExp regExp("^((\\d+)\\s+|-)?(\\d+)/(\\d+)"); // +-#2-+ +-#3-+ +-#4-+ // +-----#1-----+ if (regExp.search(pszAmount) > -1) { m_num = regExp.cap(3).toLongLong(); m_denom = regExp.cap(4).toLongLong(); - const QString& part1 = regExp.cap(1); + const TQString& part1 = regExp.cap(1); if(!part1.isEmpty()) { - if(part1 == QString("-")) { + if(part1 == TQString("-")) { m_num = -m_num; } else { @@ -140,16 +140,16 @@ MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) return; } - QString res = pszAmount; + TQString res = pszAmount; // get rid of anything that is not // a) numeric // b) _decimalSeparator // c) negative indicator - QString validChars = QString("\\d%1").arg(QChar(decimalSeparator())); + TQString validChars = TQString("\\d%1").tqarg(TQChar(decimalSeparator())); // we need to escape the minus sign here, because later on it will be // part of "\d,-()" and that does not work. It needs to be "\d,\-()" // And we need two of them, because we're in C - QString negChars("\\-"); + TQString negChars("\\-"); if(_negativeMonetarySignPosition == ParensAround) { // Since we want to allow '-' as well as '()' for negative entry // we just add the parens here. @@ -158,13 +158,13 @@ MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) validChars += negChars; // qDebug("0: '%s'", validChars.data()); - QRegExp invChars(QString("[^%1]").arg(validChars)); + TQRegExp invChars(TQString("[^%1]").tqarg(validChars)); // qDebug("1: '%s'", res.data()); res.remove(invChars); - QRegExp negCharSet(QString("[%1]").arg(negChars)); + TQRegExp negCharSet(TQString("[%1]").tqarg(negChars)); bool isNegative = false; - if(res.find(negCharSet) != -1) { + if(res.tqfind(negCharSet) != -1) { isNegative = true; res.remove(negCharSet); } @@ -172,7 +172,7 @@ MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) int pos; // qDebug("3: '%s'", res.data()); - if((pos = res.find(_decimalSeparator)) != -1) { + if((pos = res.tqfind(_decimalSeparator)) != -1) { // make sure, we get the denominator right m_denom = precToDenom(res.length() - pos - 1); @@ -187,25 +187,25 @@ MyMoneyMoney::MyMoneyMoney(const QString& pszAmount) m_num = -m_num; } -QString MyMoneyMoney::formatMoney(int denom, bool showThousandSeparator) const +TQString MyMoneyMoney::formatMoney(int denom, bool showThousandSeparator) const { return formatMoney("", denomToPrec(denom), showThousandSeparator); } -QString MyMoneyMoney::formatMoney(const MyMoneyAccount& acc, const MyMoneySecurity& sec, bool showThousandSeparator) const +TQString MyMoneyMoney::formatMoney(const MyMoneyAccount& acc, const MyMoneySecurity& sec, bool showThousandSeparator) const { return formatMoney(sec.tradingSymbol(), denomToPrec(acc.fraction()), showThousandSeparator); } -QString MyMoneyMoney::formatMoney(const MyMoneySecurity& sec, bool showThousandSeparator) const +TQString MyMoneyMoney::formatMoney(const MyMoneySecurity& sec, bool showThousandSeparator) const { return formatMoney(sec.tradingSymbol(), denomToPrec(sec.smallestAccountFraction()), showThousandSeparator); } -QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool showThousandSeparator) const +TQString MyMoneyMoney::formatMoney(const TQString& currency, const int prec, bool showThousandSeparator) const { - QString res; - QString tmpCurrency = currency; + TQString res; + TQString tmpCurrency = currency; int tmpPrec = prec; signed64 denom = 1; signed64 m_64Value; @@ -240,15 +240,15 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool if(left & 0xFFFFFFFF00000000LL) { signed64 tmp = left; - // QString.sprintf("%Ld") did not work :-(, so I had to + // TQString.sprintf("%Ld") did not work :-(, so I had to // do it the old ugly way. while(tmp) { - res.insert(0, QString("%1").arg(static_cast<int>(tmp % 10))); + res.insert(0, TQString("%1").tqarg(static_cast<int>(tmp % 10))); tmp /= 10; } } else - res = QString("%1").arg((long)left); + res = TQString("%1").tqarg((long)left); if(showThousandSeparator) { int pos = res.length(); @@ -262,13 +262,13 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool // using // - // res += QString("%1").arg(right).rightJustify(prec, '0', true); + // res += TQString("%1").tqarg(right).rightJustify(prec, '0', true); // // caused some weird results if right was rather large. Eg: right being // 666600000 should have appended a 0, but instead it prepended a 0. With // res being "2," the result wasn't "2,6666000000" as expected, but rather // "2,0666600000" which was not usable. The code below works for me. - QString rs = QString("%1").arg(right); + TQString rs = TQString("%1").tqarg(right); if(prec != -1) rs = rs.rightJustify(prec, '0', true); else { @@ -276,14 +276,14 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool // no trailing zeroes or decimal separators while(rs.endsWith("0")) rs.truncate(rs.length()-1); - while(rs.endsWith(QChar(decimalSeparator()))) + while(rs.endsWith(TQChar(decimalSeparator()))) rs.truncate(rs.length()-1); } res += rs; } signPosition signpos = bNegative ? _negativeMonetarySignPosition : _positiveMonetarySignPosition; - QString sign = bNegative ? "-" : ""; + TQString sign = bNegative ? "-" : ""; switch(signpos) { case ParensAround: @@ -316,37 +316,37 @@ QString MyMoneyMoney::formatMoney(const QString& currency, const int prec, bool return res; } -const QString MyMoneyMoney::toString(void) const +const TQString MyMoneyMoney::toString(void) const { signed64 tmp = m_num < 0 ? - m_num : m_num; - QString res; - QString resf; + TQString res; + TQString resf; - // QString.sprintf("%Ld") did not work :-(, so I had to + // TQString.sprintf("%Ld") did not work :-(, so I had to // do it the old ugly way. while(tmp) { - res.prepend(QString("%1").arg(static_cast<int>(tmp % 10))); + res.prepend(TQString("%1").tqarg(static_cast<int>(tmp % 10))); tmp /= 10; } if(res.isEmpty()) - res = QString("0"); + res = TQString("0"); if(m_num < 0) res.prepend('-'); tmp = m_denom; while(tmp) { - resf.prepend(QString("%1").arg(static_cast<int>(tmp % 10))); + resf.prepend(TQString("%1").tqarg(static_cast<int>(tmp % 10))); tmp /= 10; } return res + "/" + resf; } -QDataStream &operator<<(QDataStream &s, const MyMoneyMoney &_money) +TQDataStream &operator<<(TQDataStream &s, const MyMoneyMoney &_money) { // We WILL lose data here if the user has more than 2 billion pounds :-( // QT defined it here as long: - // qglobal.h:typedef long Q_INT64; + // qglobal.h:typedef long TQ_INT64; MyMoneyMoney money = _money.convert(100); @@ -355,7 +355,7 @@ QDataStream &operator<<(QDataStream &s, const MyMoneyMoney &_money) if(money.m_num & 0xffffffff00000000LL) qWarning("Lost data while writing out MyMoneyMoney object using deprecated 4 byte writer"); - s << static_cast<Q_INT32> (money.m_num & 0xffffffff); + s << static_cast<TQ_INT32> (money.m_num & 0xffffffff); break; default: @@ -363,16 +363,16 @@ QDataStream &operator<<(QDataStream &s, const MyMoneyMoney &_money) // tricky fall through here case MyMoneyMoney::FILE_8_BYTE_VALUE: - s << static_cast<Q_INT32> (money.m_num >> 32); - s << static_cast<Q_INT32> (money.m_num & 0xffffffff); + s << static_cast<TQ_INT32> (money.m_num >> 32); + s << static_cast<TQ_INT32> (money.m_num & 0xffffffff); break; } return s; } -QDataStream &operator>>(QDataStream &s, MyMoneyMoney &money) +TQDataStream &operator>>(TQDataStream &s, MyMoneyMoney &money) { - Q_INT32 tmp; + TQ_INT32 tmp; switch(MyMoneyMoney::_fileVersion) { case MyMoneyMoney::FILE_4_BYTE_VALUE: s >> tmp; diff --git a/kmymoney2/mymoney/mymoneymoney.h b/kmymoney2/mymoney/mymoneymoney.h index 74235c7..6ff1cae 100644 --- a/kmymoney2/mymoney/mymoneymoney.h +++ b/kmymoney2/mymoney/mymoneymoney.h @@ -39,8 +39,8 @@ #endif // So we can save this object -#include <qstring.h> -#include <qdatastream.h> +#include <tqstring.h> +#include <tqdatastream.h> #include <kmymoney/export.h> #include <kmymoney/mymoneyexception.h> @@ -98,7 +98,7 @@ public: // construction MyMoneyMoney(); MyMoneyMoney( const int iAmount, const signed64 denom = 100 ); - MyMoneyMoney( const QString& pszAmount ); + MyMoneyMoney( const TQString& pszAmount ); MyMoneyMoney( const signed64 Amount, const signed64 denom = 100 ); MyMoneyMoney( const double dAmount, const signed64 denom = 100 ); #if HAVE_LONG_DOUBLE @@ -123,20 +123,20 @@ public: * @param showThousandSeparator should the thousandSeparator symbol be inserted * (@a true) or not (@a false) (default true) */ - QString formatMoney(const QString& currency, const int prec, bool showThousandSeparator = true) const; + TQString formatMoney(const TQString& currency, const int prec, bool showThousandSeparator = true) const; /** * This is a convenience method. It behaves exactly as the above one, but takes the information * about currency symbol and precision out of the MyMoneySecurity and MyMoneyAccount objects * @a acc and @a sec. */ - QString formatMoney(const MyMoneyAccount& acc, const MyMoneySecurity& sec, bool showThousandSeparator = true) const; + TQString formatMoney(const MyMoneyAccount& acc, const MyMoneySecurity& sec, bool showThousandSeparator = true) const; /** * This is a convenience method. It behaves exactly as the above one, but takes the information * about currency symbol and precision out of the MyMoneySecurity object @a sec. */ - QString formatMoney(const MyMoneySecurity& sec, bool showThousandSeparator = true) const; + TQString formatMoney(const MyMoneySecurity& sec, bool showThousandSeparator = true) const; /** * This is a convenience method. It behaves exactly as the above one, but takes the information @@ -146,7 +146,7 @@ public: * * @note denom is often set to account.fraction(security). */ - QString formatMoney(int denom, bool showThousandSeparator = true) const; + TQString formatMoney(int denom, bool showThousandSeparator = true) const; /** * This method is used to convert the smallest fraction information into @@ -157,7 +157,7 @@ public: */ static int denomToPrec(signed64 fract); - const QString toString(void) const; + const TQString toString(void) const; const MyMoneyMoney convert(const signed64 denom = 100, const roundingMethod how = RndRound) const; static signed64 precToDenom(int prec); double toDouble(void) const; @@ -177,7 +177,7 @@ public: // assignment const MyMoneyMoney& operator=( const MyMoneyMoney& Amount ); - const MyMoneyMoney& operator=( const QString& pszAmount ); + const MyMoneyMoney& operator=( const TQString& pszAmount ); // comparison bool operator==( const MyMoneyMoney& Amount ) const; @@ -187,12 +187,12 @@ public: bool operator<=( const MyMoneyMoney& Amount ) const; bool operator>=( const MyMoneyMoney& Amount ) const; - bool operator==( const QString& pszAmount ) const; - bool operator!=( const QString& pszAmount ) const; - bool operator<( const QString& pszAmount ) const; - bool operator>( const QString& pszAmount ) const; - bool operator<=( const QString& pszAmount ) const; - bool operator>=( const QString& pszAmount ) const; + bool operator==( const TQString& pszAmount ) const; + bool operator!=( const TQString& pszAmount ) const; + bool operator<( const TQString& pszAmount ) const; + bool operator>( const TQString& pszAmount ) const; + bool operator<=( const TQString& pszAmount ) const; + bool operator>=( const TQString& pszAmount ) const; // calculation MyMoneyMoney operator+( const MyMoneyMoney& Amount ) const; @@ -230,8 +230,8 @@ private: signed64 getLcd(const MyMoneyMoney& b) const; - KMYMONEY_EXPORT friend QDataStream &operator<<(QDataStream &, const MyMoneyMoney &); - KMYMONEY_EXPORT friend QDataStream &operator>>(QDataStream &, MyMoneyMoney &); + KMYMONEY_EXPORT friend TQDataStream &operator<<(TQDataStream &, const MyMoneyMoney &); + KMYMONEY_EXPORT friend TQDataStream &operator>>(TQDataStream &, MyMoneyMoney &); static unsigned char _thousandSeparator; static unsigned char _decimalSeparator; @@ -371,7 +371,7 @@ inline const MyMoneyMoney& MyMoneyMoney::operator=(const MyMoneyMoney& Amount) // Arguments: pszAmount - NULL terminated string that contains amount // //////////////////////////////////////////////////////////////////////////////// -inline const MyMoneyMoney& MyMoneyMoney::operator=(const QString& pszAmount) +inline const MyMoneyMoney& MyMoneyMoney::operator=(const TQString& pszAmount) { *this = MyMoneyMoney( pszAmount ); return *this; @@ -508,7 +508,7 @@ inline bool MyMoneyMoney::operator>=(const MyMoneyMoney& Amount) const // Arguments: pszAmount - NULL terminated string that contains amount // //////////////////////////////////////////////////////////////////////////////// -inline bool MyMoneyMoney::operator==(const QString& pszAmount) const +inline bool MyMoneyMoney::operator==(const TQString& pszAmount) const { MyMoneyMoney Amount( pszAmount ); return ( *this == Amount ) ; @@ -523,7 +523,7 @@ inline bool MyMoneyMoney::operator==(const QString& pszAmount) const // Arguments: pszAmount - NULL terminated string that contains amount // //////////////////////////////////////////////////////////////////////////////// -inline bool MyMoneyMoney::operator!=(const QString& pszAmount) const +inline bool MyMoneyMoney::operator!=(const TQString& pszAmount) const { MyMoneyMoney Amount( pszAmount ); return ( *this != Amount ) ; diff --git a/kmymoney2/mymoney/mymoneymoneytest.cpp b/kmymoney2/mymoney/mymoneymoneytest.cpp index 64c2961..81967a1 100644 --- a/kmymoney2/mymoney/mymoneymoneytest.cpp +++ b/kmymoney2/mymoney/mymoneymoneytest.cpp @@ -97,15 +97,15 @@ void MyMoneyMoneyTest::testAssignment() CPPUNIT_ASSERT(m->m_num == -5678); CPPUNIT_ASSERT(m->m_denom == 100); - *m = QString("-987"); + *m = TQString("-987"); CPPUNIT_ASSERT(m->m_num == -987); CPPUNIT_ASSERT(m->m_denom == 1); - *m = QString("9998887776665554.44"); + *m = TQString("9998887776665554.44"); CPPUNIT_ASSERT(m->m_num == 999888777666555444LL); CPPUNIT_ASSERT(m->m_denom == 100); - *m = QString("-99988877766655.444"); + *m = TQString("-99988877766655.444"); CPPUNIT_ASSERT(m->m_num == -99988877766655444LL); CPPUNIT_ASSERT(m->m_denom == 1000); @@ -179,22 +179,22 @@ void MyMoneyMoneyTest::testConvert() MyMoneyMoney b = a.convert(100); CPPUNIT_ASSERT(b.m_num == 12346); CPPUNIT_ASSERT(b.m_denom == 100); - a = QString("-123.456"); + a = TQString("-123.456"); b = a.convert(100); CPPUNIT_ASSERT(b.m_num == -12346); CPPUNIT_ASSERT(b.m_denom == 100); - a = QString("123.1"); + a = TQString("123.1"); b = a.convert(100); CPPUNIT_ASSERT(b.m_num == 12310); CPPUNIT_ASSERT(b.m_denom == 100); - a = QString("-73010.28"); - b = QString("1.95583"); - CPPUNIT_ASSERT((a * b).convert(100) == QString("-142795.70")); + a = TQString("-73010.28"); + b = TQString("1.95583"); + CPPUNIT_ASSERT((a * b).convert(100) == TQString("-142795.70")); - a = QString("-142795.69"); - CPPUNIT_ASSERT((a / b).convert(100) == QString("-73010.28")); + a = TQString("-142795.69"); + CPPUNIT_ASSERT((a / b).convert(100) == TQString("-73010.28")); } void MyMoneyMoneyTest::testEquality() @@ -216,7 +216,7 @@ void MyMoneyMoneyTest::testEquality() CPPUNIT_ASSERT(m5 == m6); CPPUNIT_ASSERT(m5 == m7); - CPPUNIT_ASSERT(m5 == QString("369/30")); + CPPUNIT_ASSERT(m5 == TQString("369/30")); CPPUNIT_ASSERT(MyMoneyMoney::autoCalc == MyMoneyMoney::autoCalc); } @@ -234,7 +234,7 @@ void MyMoneyMoneyTest::testInequality() MyMoneyMoney m4(LLCONST(999666555444)); CPPUNIT_ASSERT(m3 != m4); - CPPUNIT_ASSERT(m4 != QString("999666555444")); + CPPUNIT_ASSERT(m4 != TQString("999666555444")); CPPUNIT_ASSERT(MyMoneyMoney::autoCalc != MyMoneyMoney(1,100)); CPPUNIT_ASSERT(MyMoneyMoney(1,100) != MyMoneyMoney::autoCalc); @@ -258,9 +258,9 @@ void MyMoneyMoneyTest::testAddition() // CPPUNIT_ASSERT(m1 == MyMoneyMoney(101)); // CPPUNIT_ASSERT((++m1) == MyMoneyMoney(102)); - m1 = QString("123.20"); + m1 = TQString("123.20"); MyMoneyMoney m2(40, 1000); - CPPUNIT_ASSERT((m1 + m2) == QString("123.24")); + CPPUNIT_ASSERT((m1 + m2) == TQString("123.24")); m1 += m2; CPPUNIT_ASSERT(m1.m_num == 123240); @@ -284,7 +284,7 @@ void MyMoneyMoneyTest::testSubtraction() // CPPUNIT_ASSERT(m1 == MyMoneyMoney(99)); // CPPUNIT_ASSERT((--m1) == MyMoneyMoney(98)); - m1 = QString("123.20"); + m1 = TQString("123.20"); MyMoneyMoney m2(1, 5); CPPUNIT_ASSERT((m1 - m2) == MyMoneyMoney(123,1)); @@ -301,9 +301,9 @@ void MyMoneyMoneyTest::testMultiplication() CPPUNIT_ASSERT((m1 * MyMoneyMoney(10000000,1)) == MyMoneyMoney(1000000000,1)); CPPUNIT_ASSERT((m1 * (*m_0)) == MyMoneyMoney(1200)); - MyMoneyMoney m2 = QString("-73010.28"); - m1 = QString("1.95583"); - CPPUNIT_ASSERT((m1 * m2) == QString("-142795.6959324")); + MyMoneyMoney m2 = TQString("-73010.28"); + m1 = TQString("1.95583"); + CPPUNIT_ASSERT((m1 * m2) == TQString("-142795.6959324")); } void MyMoneyMoneyTest::testDivision() @@ -311,9 +311,9 @@ void MyMoneyMoneyTest::testDivision() MyMoneyMoney m1(100); CPPUNIT_ASSERT((m1 / MyMoneyMoney(50)) == MyMoneyMoney(2,1)); - MyMoneyMoney m2 = QString("-142795.69"); - m1 = QString("1.95583"); - CPPUNIT_ASSERT((m2 / m1).convert(100000000) == QString("-73010.27696681")); + MyMoneyMoney m2 = TQString("-142795.69"); + m1 = TQString("1.95583"); + CPPUNIT_ASSERT((m2 / m1).convert(100000000) == TQString("-73010.27696681")); MyMoneyMoney m3 = MyMoneyMoney(0) / MyMoneyMoney(100); CPPUNIT_ASSERT(m3.m_num == 0); @@ -325,12 +325,12 @@ void MyMoneyMoneyTest::testSetDecimalSeparator() MyMoneyMoney m1(100000); MyMoneyMoney m2(200000); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("1,000.00")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("1,000.00")); CPPUNIT_ASSERT(MyMoneyMoney::decimalSeparator() == '.'); MyMoneyMoney::setDecimalSeparator(':'); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("1,000:00")); - CPPUNIT_ASSERT(m2.formatMoney("", 2) == QString("2,000:00")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("1,000:00")); + CPPUNIT_ASSERT(m2.formatMoney("", 2) == TQString("2,000:00")); CPPUNIT_ASSERT(MyMoneyMoney::decimalSeparator() == ':'); } @@ -340,57 +340,57 @@ void MyMoneyMoneyTest::testSetThousandSeparator() MyMoneyMoney m1(100000); MyMoneyMoney m2(200000); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("1,000.00")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("1,000.00")); CPPUNIT_ASSERT(MyMoneyMoney::thousandSeparator() == ','); MyMoneyMoney::setThousandSeparator(':'); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("1:000.00")); - CPPUNIT_ASSERT(m2.formatMoney("", 2) == QString("2:000.00")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("1:000.00")); + CPPUNIT_ASSERT(m2.formatMoney("", 2) == TQString("2:000.00")); CPPUNIT_ASSERT(MyMoneyMoney::thousandSeparator() == ':'); } void MyMoneyMoneyTest::testFormatMoney() { - CPPUNIT_ASSERT(m_0->formatMoney("", 2) == QString("0.12")); - CPPUNIT_ASSERT(m_1->formatMoney("", 2) == QString("-0.10")); + CPPUNIT_ASSERT(m_0->formatMoney("", 2) == TQString("0.12")); + CPPUNIT_ASSERT(m_1->formatMoney("", 2) == TQString("-0.10")); MyMoneyMoney m1(10099); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("100.99")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("100.99")); m1 = MyMoneyMoney(100,1); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("100.00")); - CPPUNIT_ASSERT(m1.formatMoney("", -1) == QString("100")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("100.00")); + CPPUNIT_ASSERT(m1.formatMoney("", -1) == TQString("100")); m1 = m1 * 10; - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("1,000.00")); - CPPUNIT_ASSERT(m1.formatMoney("", -1) == QString("1,000")); - CPPUNIT_ASSERT(m1.formatMoney("", -1, false) == QString("1000")); - CPPUNIT_ASSERT(m1.formatMoney("", 3, false) == QString("1000.000")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("1,000.00")); + CPPUNIT_ASSERT(m1.formatMoney("", -1) == TQString("1,000")); + CPPUNIT_ASSERT(m1.formatMoney("", -1, false) == TQString("1000")); + CPPUNIT_ASSERT(m1.formatMoney("", 3, false) == TQString("1000.000")); m1 = MyMoneyMoney(INT64_MAX, 100); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("92,233,720,368,547,758.07")); - CPPUNIT_ASSERT(m1.formatMoney(100) == QString("92,233,720,368,547,758.07")); - CPPUNIT_ASSERT(m1.formatMoney("", 2, false) == QString("92233720368547758.07")); - CPPUNIT_ASSERT(m1.formatMoney(100, false) == QString("92233720368547758.07")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("92,233,720,368,547,758.07")); + CPPUNIT_ASSERT(m1.formatMoney(100) == TQString("92,233,720,368,547,758.07")); + CPPUNIT_ASSERT(m1.formatMoney("", 2, false) == TQString("92233720368547758.07")); + CPPUNIT_ASSERT(m1.formatMoney(100, false) == TQString("92233720368547758.07")); m1 = MyMoneyMoney(INT64_MIN, 100); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("-92,233,720,368,547,758.08")); - CPPUNIT_ASSERT(m1.formatMoney(100) == QString("-92,233,720,368,547,758.08")); - CPPUNIT_ASSERT(m1.formatMoney("", 2, false) == QString("-92233720368547758.08")); - CPPUNIT_ASSERT(m1.formatMoney(100, false) == QString("-92233720368547758.08")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("-92,233,720,368,547,758.08")); + CPPUNIT_ASSERT(m1.formatMoney(100) == TQString("-92,233,720,368,547,758.08")); + CPPUNIT_ASSERT(m1.formatMoney("", 2, false) == TQString("-92233720368547758.08")); + CPPUNIT_ASSERT(m1.formatMoney(100, false) == TQString("-92233720368547758.08")); m1 = MyMoneyMoney(1,5); - CPPUNIT_ASSERT(m1.formatMoney("", 2) == QString("0.20")); - CPPUNIT_ASSERT(m1.formatMoney(1000) == QString("0.200")); - CPPUNIT_ASSERT(m1.formatMoney(100) == QString("0.20")); - CPPUNIT_ASSERT(m1.formatMoney(10) == QString("0.2")); + CPPUNIT_ASSERT(m1.formatMoney("", 2) == TQString("0.20")); + CPPUNIT_ASSERT(m1.formatMoney(1000) == TQString("0.200")); + CPPUNIT_ASSERT(m1.formatMoney(100) == TQString("0.20")); + CPPUNIT_ASSERT(m1.formatMoney(10) == TQString("0.2")); m1 = MyMoneyMoney(13333,5000); - CPPUNIT_ASSERT(m1.formatMoney("", 10) == QString("2.6666000000")); + CPPUNIT_ASSERT(m1.formatMoney("", 10) == TQString("2.6666000000")); m1 = MyMoneyMoney(-1404,100); - CPPUNIT_ASSERT(m1.formatMoney("",-1) == QString("-14.04")); + CPPUNIT_ASSERT(m1.formatMoney("",-1) == TQString("-14.04")); } void MyMoneyMoneyTest::testRelation() @@ -409,17 +409,17 @@ void MyMoneyMoneyTest::testRelation() CPPUNIT_ASSERT(m3 >= m3); // tests with different denominator - m1 = QString("1/8"); - m2 = QString("1/7"); + m1 = TQString("1/8"); + m2 = TQString("1/7"); CPPUNIT_ASSERT(m1 < m2); CPPUNIT_ASSERT(m2 > m1); - m2 = QString("-1/7"); + m2 = TQString("-1/7"); CPPUNIT_ASSERT(m2 < m1); CPPUNIT_ASSERT(m1 > m2); CPPUNIT_ASSERT(m1 >= m2); CPPUNIT_ASSERT(m2 <= m1); - m1 = QString("-2/14"); + m1 = TQString("-2/14"); CPPUNIT_ASSERT(m1 >= m2); CPPUNIT_ASSERT(m1 <= m2); @@ -462,9 +462,9 @@ void MyMoneyMoneyTest::testToString() MyMoneyMoney m2(1234); MyMoneyMoney m3; - CPPUNIT_ASSERT(m1.toString() == QString("-100/100")); - CPPUNIT_ASSERT(m2.toString() == QString("1234/100")); - CPPUNIT_ASSERT(m3.toString() == QString("0/1")); + CPPUNIT_ASSERT(m1.toString() == TQString("-100/100")); + CPPUNIT_ASSERT(m2.toString() == TQString("1234/100")); + CPPUNIT_ASSERT(m3.toString() == TQString("0/1")); } void MyMoneyMoneyTest::testNegativeSignPos(void) diff --git a/kmymoney2/mymoney/mymoneyobject.cpp b/kmymoney2/mymoney/mymoneyobject.cpp index 7939ff0..a415a7c 100644 --- a/kmymoney2/mymoney/mymoneyobject.cpp +++ b/kmymoney2/mymoney/mymoneyobject.cpp @@ -24,16 +24,16 @@ #include "mymoneyutils.h" #include "mymoneyexception.h" -const QString MyMoneyObject::m_emptyId; +const TQString MyMoneyObject::m_emptyId; -MyMoneyObject::MyMoneyObject(const QString& id) +MyMoneyObject::MyMoneyObject(const TQString& id) { m_id = id; } -MyMoneyObject::MyMoneyObject(const QDomElement& el, const bool forceId) +MyMoneyObject::MyMoneyObject(const TQDomElement& el, const bool forceId) { - m_id = QStringEmpty(el.attribute("id")); + m_id = TQStringEmpty(el.attribute("id")); if(m_id.length() == 0 && forceId) throw new MYMONEYEXCEPTION("Node has no ID"); } @@ -46,7 +46,7 @@ MyMoneyObject::~MyMoneyObject() { } -void MyMoneyObject::setId(const QString& id) +void MyMoneyObject::setId(const TQString& id) { m_id = id; } @@ -58,15 +58,15 @@ bool MyMoneyObject::operator == (const MyMoneyObject& right) const void MyMoneyObject::clearId(void) { - m_id = QString(); + m_id = TQString(); } -const QString& MyMoneyObject::emptyId(void) +const TQString& MyMoneyObject::emptyId(void) { return m_emptyId; } -void MyMoneyObject::writeBaseXML(QDomDocument& document, QDomElement& el) const +void MyMoneyObject::writeBaseXML(TQDomDocument& document, TQDomElement& el) const { Q_UNUSED(document); diff --git a/kmymoney2/mymoney/mymoneyobject.h b/kmymoney2/mymoney/mymoneyobject.h index d07296b..854bf4d 100644 --- a/kmymoney2/mymoney/mymoneyobject.h +++ b/kmymoney2/mymoney/mymoneyobject.h @@ -24,9 +24,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdom.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdom.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // Project Includes @@ -58,7 +58,7 @@ public: * * @return ID of object */ - const QString& id(void) const { return m_id; }; + const TQString& id(void) const { return m_id; }; /** * This method clears the id of the object @@ -74,20 +74,20 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const = 0; + virtual bool hasReferenceTo(const TQString& id) const = 0; /** - * This method creates a QDomElement for the @p document - * under the parent node @p parent. + * This method creates a TQDomElement for the @p document + * under the tqparent node @p tqparent. * - * @param document reference to QDomDocument - * @param parent reference to QDomElement parent node + * @param document reference to TQDomDocument + * @param tqparent reference to TQDomElement tqparent node */ - virtual void writeXML(QDomDocument& document, QDomElement& parent) const = 0; + virtual void writeXML(TQDomDocument& document, TQDomElement& tqparent) const = 0; bool operator == (const MyMoneyObject& right) const; - static const QString& emptyId(void); + static const TQString& emptyId(void); protected: /** @@ -95,13 +95,13 @@ protected: * * @param id ID of object */ - MyMoneyObject(const QString& id); + MyMoneyObject(const TQString& id); /** * This contructor reads the id from the @p id attribute of the - * QDomElement. + * TQDomElement. * - * @param node const reference to the QDomElement from which to + * @param node const reference to the TQDomElement from which to * obtain the id of the object * @param forceId flag to be able to suppress enforcement of an id * defaults to true which requires the node to have an @@ -111,18 +111,18 @@ protected: * used by objects, which are stored w/o id (eg. splits, * transactions within schedules) */ - MyMoneyObject(const QDomElement& node, const bool forceId = true); + MyMoneyObject(const TQDomElement& node, const bool forceId = true); - void setId(const QString& id) /* __attribute__ ((deprecated)) */; + void setId(const TQString& id) /* __attribute__ ((deprecated)) */; /** * This method writes out the members contained in this object. */ - void writeBaseXML(QDomDocument& document, QDomElement& el) const; + void writeBaseXML(TQDomDocument& document, TQDomElement& el) const; protected: - QString m_id; - static const QString m_emptyId; + TQString m_id; + static const TQString m_emptyId; }; #endif diff --git a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp index 666da3b..c842f0d 100644 --- a/kmymoney2/mymoney/mymoneyobjectcontainer.cpp +++ b/kmymoney2/mymoney/mymoneyobjectcontainer.cpp @@ -34,7 +34,7 @@ MyMoneyObjectContainer::~MyMoneyObjectContainer() void MyMoneyObjectContainer::clear(IMyMoneyStorage* storage) { // delete all objects - QMap<QString, MyMoneyObject const *>::const_iterator it; + TQMap<TQString, MyMoneyObject const *>::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { delete (*it); } @@ -46,10 +46,10 @@ void MyMoneyObjectContainer::clear(IMyMoneyStorage* storage) m_storage = storage; } -void MyMoneyObjectContainer::clear(const QString& id) +void MyMoneyObjectContainer::clear(const TQString& id) { - QMap<QString, MyMoneyObject const *>::iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::iterator it; + it = m_map.tqfind(id); if(it != m_map.end()) { delete (*it); m_map.erase(it); @@ -57,9 +57,9 @@ void MyMoneyObjectContainer::clear(const QString& id) } #define listMethod(a, T) \ -void MyMoneyObjectContainer::a(QValueList<T>& list) \ +void MyMoneyObjectContainer::a(TQValueList<T>& list) \ { \ - QMap<QString, const MyMoneyObject*>::const_iterator it; \ + TQMap<TQString, const MyMoneyObject*>::const_iterator it; \ for(it = m_map.begin(); it != m_map.end(); ++it) { \ const T* node = dynamic_cast<const T*>(*it); \ if(node) { \ @@ -69,9 +69,9 @@ void MyMoneyObjectContainer::a(QValueList<T>& list) \ } #define preloadListMethod(a, T) \ -void MyMoneyObjectContainer::preload##a(const QValueList<T>& list) \ +void MyMoneyObjectContainer::preload##a(const TQValueList<T>& list) \ { \ - QValueList<T>::const_iterator it; \ + TQValueList<T>::const_iterator it; \ for(it = list.begin(); it != list.end(); ++it) { \ delete m_map[(*it).id()]; \ m_map[(*it).id()] = new T(*it); \ @@ -86,13 +86,13 @@ void MyMoneyObjectContainer::preload##a(const T& obj) \ } #define objectAccessMethod(a, T) \ -const T& MyMoneyObjectContainer::a(const QString& id) \ +const T& MyMoneyObjectContainer::a(const TQString& id) \ { \ static T nullElement; \ if(id.isEmpty()) \ return nullElement; \ - QMap<QString, MyMoneyObject const *>::const_iterator it; \ - it = m_map.find(id); \ + TQMap<TQString, MyMoneyObject const *>::const_iterator it; \ + it = m_map.tqfind(id); \ if(it == m_map.end()) { \ /* not found, need to load from engine */ \ T x = m_storage->a(id); \ @@ -102,9 +102,9 @@ const T& MyMoneyObjectContainer::a(const QString& id) \ return dynamic_cast<const T&>(*(*it)); \ } -void MyMoneyObjectContainer::account(QValueList<MyMoneyAccount>& list) +void MyMoneyObjectContainer::account(TQValueList<MyMoneyAccount>& list) { - QMap<QString, const MyMoneyObject*>::const_iterator it; + TQMap<TQString, const MyMoneyObject*>::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast<const MyMoneyAccount*>(*it); if(node) { @@ -114,13 +114,13 @@ void MyMoneyObjectContainer::account(QValueList<MyMoneyAccount>& list) } } -const MyMoneyAccount& MyMoneyObjectContainer::account(const QString& id) +const MyMoneyAccount& MyMoneyObjectContainer::account(const TQString& id) { static MyMoneyAccount nullElement; if(id.isEmpty()) return nullElement; - QMap<QString, MyMoneyObject const *>::iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::iterator it; + it = m_map.tqfind(id); if(it == m_map.end()) { /* not found, need to load from engine */ MyMoneyAccount x = m_storage->account(id); @@ -141,10 +141,10 @@ void MyMoneyObjectContainer::assignFraction(MyMoneyAccount* acc) } } -const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const QString& name) const +const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const TQString& name) const { static MyMoneyAccount nullElement; - QMap<QString, MyMoneyObject const *>::const_iterator it; + TQMap<TQString, MyMoneyObject const *>::const_iterator it; for(it = m_map.begin(); it != m_map.end(); ++it) { const MyMoneyAccount* node = dynamic_cast<const MyMoneyAccount *>(*it); if(node) { @@ -155,13 +155,13 @@ const MyMoneyAccount& MyMoneyObjectContainer::accountByName(const QString& name) return nullElement; } -void MyMoneyObjectContainer::refresh(const QString& id) +void MyMoneyObjectContainer::refresh(const TQString& id) { if(id.isEmpty()) return; - QMap<QString, MyMoneyObject const *>::const_iterator it; - it = m_map.find(id); + TQMap<TQString, MyMoneyObject const *>::const_iterator it; + it = m_map.tqfind(id); if(it != m_map.end()) { const MyMoneyAccount* account = dynamic_cast<const MyMoneyAccount *>(*it); const MyMoneyPayee* payee = dynamic_cast<const MyMoneyPayee *>(*it); diff --git a/kmymoney2/mymoney/mymoneyobjectcontainer.h b/kmymoney2/mymoney/mymoneyobjectcontainer.h index 1f3b598..715154c 100644 --- a/kmymoney2/mymoney/mymoneyobjectcontainer.h +++ b/kmymoney2/mymoney/mymoneyobjectcontainer.h @@ -24,8 +24,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // Project Includes @@ -46,51 +46,52 @@ /** * This class represents a generic container for all MyMoneyObject derived objects. */ -class KMYMONEY_EXPORT MyMoneyObjectContainer : public QObject +class KMYMONEY_EXPORT MyMoneyObjectContainer : public TQObject { Q_OBJECT + TQ_OBJECT public: MyMoneyObjectContainer(); ~MyMoneyObjectContainer(); - const MyMoneyAccount& account(const QString& id); - const MyMoneyPayee& payee(const QString& id); - const MyMoneySecurity& security(const QString& id); - const MyMoneyInstitution& institution(const QString& id); - const MyMoneySchedule& schedule(const QString& id); + const MyMoneyAccount& account(const TQString& id); + const MyMoneyPayee& payee(const TQString& id); + const MyMoneySecurity& security(const TQString& id); + const MyMoneyInstitution& institution(const TQString& id); + const MyMoneySchedule& schedule(const TQString& id); - void account(QValueList<MyMoneyAccount>& list); - void payee(QValueList<MyMoneyPayee>& list); - void institution(QValueList<MyMoneyInstitution>& list); + void account(TQValueList<MyMoneyAccount>& list); + void payee(TQValueList<MyMoneyPayee>& list); + void institution(TQValueList<MyMoneyInstitution>& list); - void preloadAccount(const QValueList<MyMoneyAccount>& list); - void preloadPayee(const QValueList<MyMoneyPayee>& list); - void preloadInstitution(const QValueList<MyMoneyInstitution>& list); - void preloadSecurity(const QValueList<MyMoneySecurity>& list); - void preloadSchedule(const QValueList<MyMoneySchedule>& list); + void preloadAccount(const TQValueList<MyMoneyAccount>& list); + void preloadPayee(const TQValueList<MyMoneyPayee>& list); + void preloadInstitution(const TQValueList<MyMoneyInstitution>& list); + void preloadSecurity(const TQValueList<MyMoneySecurity>& list); + void preloadSchedule(const TQValueList<MyMoneySchedule>& list); void preloadAccount(const MyMoneyAccount& account); void preloadSecurity(const MyMoneySecurity& security); void preloadPayee(const MyMoneyPayee& payee); void preloadInstitution(const MyMoneyInstitution& institution); - void clear(const QString& id); + void clear(const TQString& id); void clear(IMyMoneyStorage* storage = 0); - const MyMoneyAccount& accountByName(const QString& name) const; + const MyMoneyAccount& accountByName(const TQString& name) const; /** * This method refreshes an already existing object in the container * with a copy from the engine. The object is identified by its @a id. * If the object is unknown or the @a id is empty, nothing is done. */ - void refresh(const QString& id); + void refresh(const TQString& id); private: void assignFraction(MyMoneyAccount* acc); private: - QMap<QString, MyMoneyObject const *> m_map; + TQMap<TQString, MyMoneyObject const *> m_map; IMyMoneyStorage* m_storage; }; diff --git a/kmymoney2/mymoney/mymoneyobjecttest.cpp b/kmymoney2/mymoney/mymoneyobjecttest.cpp index f7201a9..b69d63a 100644 --- a/kmymoney2/mymoney/mymoneyobjecttest.cpp +++ b/kmymoney2/mymoney/mymoneyobjecttest.cpp @@ -34,14 +34,14 @@ void MyMoneyObjectTest::testEmptyConstructor() { } void MyMoneyObjectTest::testConstructor() { - MyMoneyAccount a(QString("thb"), MyMoneyAccount()); + MyMoneyAccount a(TQString("thb"), MyMoneyAccount()); CPPUNIT_ASSERT(!a.id().isEmpty()); - CPPUNIT_ASSERT(a.id() == QString("thb")); + CPPUNIT_ASSERT(a.id() == TQString("thb")); } void MyMoneyObjectTest::testClearId() { - MyMoneyAccount a(QString("thb"), MyMoneyAccount()); + MyMoneyAccount a(TQString("thb"), MyMoneyAccount()); CPPUNIT_ASSERT(!a.id().isEmpty()); a.clearId(); @@ -49,23 +49,23 @@ void MyMoneyObjectTest::testClearId() { } void MyMoneyObjectTest::testCopyConstructor() { - MyMoneyAccount a(QString("thb"), MyMoneyAccount()); + MyMoneyAccount a(TQString("thb"), MyMoneyAccount()); MyMoneyAccount b(a); CPPUNIT_ASSERT(a.MyMoneyObject::operator==(b)); } void MyMoneyObjectTest::testAssignmentConstructor() { - MyMoneyAccount a(QString("thb"), MyMoneyAccount()); + MyMoneyAccount a(TQString("thb"), MyMoneyAccount()); MyMoneyAccount b = a; CPPUNIT_ASSERT(a.MyMoneyObject::operator==(b)); } void MyMoneyObjectTest::testEquality() { - MyMoneyAccount a(QString("thb"), MyMoneyAccount()); - MyMoneyAccount b(QString("thb"), MyMoneyAccount()); - MyMoneyAccount c(QString("ace"), MyMoneyAccount()); + MyMoneyAccount a(TQString("thb"), MyMoneyAccount()); + MyMoneyAccount b(TQString("thb"), MyMoneyAccount()); + MyMoneyAccount c(TQString("ace"), MyMoneyAccount()); CPPUNIT_ASSERT(a.MyMoneyObject::operator==(b)); CPPUNIT_ASSERT(!(a.MyMoneyObject::operator==(c))); diff --git a/kmymoney2/mymoney/mymoneyobserver.h b/kmymoney2/mymoney/mymoneyobserver.h index 3e6c922..3ec05d0 100644 --- a/kmymoney2/mymoney/mymoneyobserver.h +++ b/kmymoney2/mymoney/mymoneyobserver.h @@ -35,7 +35,7 @@ #include <kmymoney/export.h> class MyMoneySubject; -class QString; +class TQString; /** * This is the base class to be used to construct an @@ -46,7 +46,7 @@ class QString; class KMYMONEY_EXPORT MyMoneyObserver { public: virtual ~MyMoneyObserver(); - virtual void update(const QString& id) = 0; + virtual void update(const TQString& id) = 0; protected: MyMoneyObserver(); diff --git a/kmymoney2/mymoney/mymoneyobservertest.h b/kmymoney2/mymoney/mymoneyobservertest.h index a806882..51ca900 100644 --- a/kmymoney2/mymoney/mymoneyobservertest.h +++ b/kmymoney2/mymoney/mymoneyobservertest.h @@ -23,11 +23,11 @@ class TestObserver : public MyMoneyObserver { public: TestObserver() { m_updated = ""; } - void update(const QString& id) { m_updated = id; }; - const QString& updated(void) { return m_updated; }; + void update(const TQString& id) { m_updated = id; }; + const TQString& updated(void) { return m_updated; }; void reset(void) { m_updated = ""; }; private: - QString m_updated; + TQString m_updated; }; class TestSubject : public MyMoneySubject diff --git a/kmymoney2/mymoney/mymoneypayee.cpp b/kmymoney2/mymoney/mymoneypayee.cpp index cbfbbb7..7023e51 100644 --- a/kmymoney2/mymoney/mymoneypayee.cpp +++ b/kmymoney2/mymoney/mymoneypayee.cpp @@ -19,7 +19,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -37,7 +37,7 @@ MyMoneyPayee::MyMoneyPayee() : { } -MyMoneyPayee::MyMoneyPayee(const QString& id, const MyMoneyPayee& payee) : +MyMoneyPayee::MyMoneyPayee(const TQString& id, const MyMoneyPayee& payee) : m_matchingEnabled(false), m_usingMatchKey(false), m_matchKeyIgnoreCase(true) @@ -46,9 +46,9 @@ MyMoneyPayee::MyMoneyPayee(const QString& id, const MyMoneyPayee& payee) : m_id = id; } -MyMoneyPayee::MyMoneyPayee(const QString& name, const QString& address, - const QString& city, const QString& state, const QString& postcode, - const QString& telephone, const QString& email) : +MyMoneyPayee::MyMoneyPayee(const TQString& name, const TQString& address, + const TQString& city, const TQString& state, const TQString& postcode, + const TQString& telephone, const TQString& email) : m_matchingEnabled(false), m_usingMatchKey(false), m_matchKeyIgnoreCase(true) @@ -62,7 +62,7 @@ MyMoneyPayee::MyMoneyPayee(const QString& name, const QString& address, m_email = email; } -MyMoneyPayee::MyMoneyPayee(const QDomElement& node) : +MyMoneyPayee::MyMoneyPayee(const TQDomElement& node) : MyMoneyObject(node) { if ("PAYEE" != node.tagName()) { @@ -89,13 +89,13 @@ MyMoneyPayee::MyMoneyPayee(const QDomElement& node) : m_defaultAccountId = node.attribute("defaultaccountid"); } - QDomNodeList nodeList = node.elementsByTagName("ADDRESS"); + TQDomNodeList nodeList = node.elementsByTagName("ADDRESS"); if(nodeList.count() == 0) { - QString msg = QString("No ADDRESS in payee %1").arg(m_name); + TQString msg = TQString("No ADDRESS in payee %1").tqarg(m_name); throw new MYMONEYEXCEPTION(msg); } - QDomElement addrNode = nodeList.item(0).toElement(); + TQDomElement addrNode = nodeList.item(0).toElement(); m_address = addrNode.attribute("street"); m_city = addrNode.attribute("city"); m_postcode = addrNode.attribute("postcode"); @@ -131,9 +131,9 @@ bool MyMoneyPayee::operator == (const MyMoneyPayee& right) const ((m_defaultAccountId.length() == 0 && right.m_defaultAccountId.length() == 0) || m_defaultAccountId == right.m_defaultAccountId) ); } -void MyMoneyPayee::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyPayee::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("PAYEE"); + TQDomElement el = document.createElement("PAYEE"); writeBaseXML(document, el); @@ -155,7 +155,7 @@ void MyMoneyPayee::writeXML(QDomDocument& document, QDomElement& parent) const el.setAttribute("defaultaccountid", m_defaultAccountId); } - QDomElement address = document.createElement("ADDRESS"); + TQDomElement address = document.createElement("ADDRESS"); address.setAttribute("street", m_address); address.setAttribute("city", m_city); address.setAttribute("postcode", m_postcode); @@ -164,16 +164,16 @@ void MyMoneyPayee::writeXML(QDomDocument& document, QDomElement& parent) const el.appendChild(address); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneyPayee::hasReferenceTo(const QString& id) const +bool MyMoneyPayee::hasReferenceTo(const TQString& id) const { return id == m_defaultAccountId; } -MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, QStringList& keys) const +MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, TQStringList& keys) const { payeeMatchType type = matchDisabled; keys.clear(); @@ -183,25 +183,25 @@ MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, QStringLi { type = m_usingMatchKey ? matchKey : matchName; if(type == matchKey) - keys = QStringList::split(";", m_matchKey); + keys = TQStringList::split(";", m_matchKey); } return type; } -MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, QString& keyString) const +MyMoneyPayee::payeeMatchType MyMoneyPayee::matchData(bool& ignorecase, TQString& keyString) const { - QStringList keys; + TQStringList keys; payeeMatchType type = matchData(ignorecase, keys); keyString = keys.join(";"); return type; } -void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const QStringList& keys) +void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const TQStringList& keys) { m_matchingEnabled = (type != matchDisabled); m_matchKeyIgnoreCase = ignorecase; - m_matchKey = QString(); + m_matchKey = TQString(); if ( m_matchingEnabled ) { @@ -212,9 +212,9 @@ void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const QStr } } -void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const QString& keys) +void MyMoneyPayee::setMatchData(payeeMatchType type, bool ignorecase, const TQString& keys) { - setMatchData(type, ignorecase, QStringList::split(";", keys)); + setMatchData(type, ignorecase, TQStringList::split(";", keys)); } // vim:cin:si:ai:et:ts=2:sw=2: diff --git a/kmymoney2/mymoney/mymoneypayee.h b/kmymoney2/mymoney/mymoneypayee.h index c2c711b..b1d2fce 100644 --- a/kmymoney2/mymoney/mymoneypayee.h +++ b/kmymoney2/mymoney/mymoneypayee.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -class QStringList; +#include <tqstring.h> +class TQStringList; // ---------------------------------------------------------------------------- // Project Includes @@ -46,14 +46,14 @@ class KMYMONEY_EXPORT MyMoneyPayee : public MyMoneyObject { private: // Simple fields - QString m_name; - QString m_address; - QString m_city; - QString m_state; - QString m_postcode; - QString m_telephone; - QString m_email; - QString m_notes; + TQString m_name; + TQString m_address; + TQString m_city; + TQString m_state; + TQString m_postcode; + TQString m_telephone; + TQString m_email; + TQString m_notes; // Transaction matching fields bool m_matchingEnabled; //< Whether this payee should be matched at all @@ -64,10 +64,10 @@ private: * Semicolon separated list of matching keys used when trying to find a suitable * payee for imported transactions. */ - QString m_matchKey; + TQString m_matchKey; // Category (account) matching fields - QString m_defaultAccountId; + TQString m_defaultAccountId; /** * This member keeps a reference to an external database @@ -78,7 +78,7 @@ private: * If no external database is available it should be kept * empty by the application. */ - QString m_reference; + TQString m_reference; public: typedef enum { @@ -88,48 +88,48 @@ public: } payeeMatchType; MyMoneyPayee(); - MyMoneyPayee(const QString& id, const MyMoneyPayee& payee); - MyMoneyPayee(const QString& name, - const QString& address=QString::null, - const QString& city=QString::null, - const QString& state=QString::null, - const QString& postcode=QString::null, - const QString& telephone=QString::null, - const QString& email=QString::null); + MyMoneyPayee(const TQString& id, const MyMoneyPayee& payee); + MyMoneyPayee(const TQString& name, + const TQString& address=TQString(), + const TQString& city=TQString(), + const TQString& state=TQString(), + const TQString& postcode=TQString(), + const TQString& telephone=TQString(), + const TQString& email=TQString()); /** * This is the constructor for a payee that is described by a - * QDomElement (e.g. from a file). + * TQDomElement (e.g. from a file). * - * @param el const reference to the QDomElement from which to + * @param el const reference to the TQDomElement from which to * create the object */ - MyMoneyPayee(const QDomElement& el); + MyMoneyPayee(const TQDomElement& el); ~MyMoneyPayee(); // Simple get operations - QString name(void) const { return m_name; } - QString address(void) const { return m_address; } - QString city(void) const { return m_city; } - QString state(void) const { return m_state; } - QString postcode(void) const { return m_postcode; } - QString telephone(void) const { return m_telephone; } - QString email(void) const { return m_email; } - QString notes(void) const { return m_notes; } - - const QString id(void) const { return m_id; }; - const QString reference(void) const { return m_reference; }; + TQString name(void) const { return m_name; } + TQString address(void) const { return m_address; } + TQString city(void) const { return m_city; } + TQString state(void) const { return m_state; } + TQString postcode(void) const { return m_postcode; } + TQString telephone(void) const { return m_telephone; } + TQString email(void) const { return m_email; } + TQString notes(void) const { return m_notes; } + + const TQString id(void) const { return m_id; }; + const TQString reference(void) const { return m_reference; }; // Simple set operations - void setName(const QString& val) { m_name = val; } - void setAddress(const QString& val) { m_address = val; } - void setCity(const QString& val) { m_city = val; } - void setState(const QString& val) { m_state = val; } - void setPostcode(const QString& val) { m_postcode = val; } - void setTelephone(const QString& val) { m_telephone = val; } - void setEmail(const QString& val) { m_email = val; } - void setNotes(const QString& val) { m_notes = val; } - void setReference(const QString& ref) { m_reference = ref; } + void setName(const TQString& val) { m_name = val; } + void setAddress(const TQString& val) { m_address = val; } + void setCity(const TQString& val) { m_city = val; } + void setState(const TQString& val) { m_state = val; } + void setPostcode(const TQString& val) { m_postcode = val; } + void setTelephone(const TQString& val) { m_telephone = val; } + void setEmail(const TQString& val) { m_email = val; } + void setNotes(const TQString& val) { m_notes = val; } + void setReference(const TQString& ref) { m_reference = ref; } /** * Get all match data in one call @@ -140,7 +140,7 @@ public: * * @return the matching type (see payeeMatchType for details) */ - payeeMatchType matchData(bool& ignorecase, QStringList& keys) const; + payeeMatchType matchData(bool& ignorecase, TQStringList& keys) const; /** * Set all match data in one call @@ -149,7 +149,7 @@ public: * @param ignorecase Whether case should be ignored for the key/name match * @param keys A list of keys themselves, if applicable */ - void setMatchData(payeeMatchType type, bool ignorecase, const QStringList& keys); + void setMatchData(payeeMatchType type, bool ignorecase, const TQStringList& keys); /** * Get all match data in one call (overloaded version for database module) @@ -160,7 +160,7 @@ public: * * @return the matching type (see payeeMatchType for details) */ - payeeMatchType matchData(bool& ignorecase, QString& keyString) const; + payeeMatchType matchData(bool& ignorecase, TQString& keyString) const; /** * Set all match data in one call (overloaded version for database module) @@ -169,12 +169,12 @@ public: * @param ignorecase Whether case should be ignored for the key/name match * @param keys A list of keys in single-string format, if applicable */ - void setMatchData(payeeMatchType type, bool ignorecase, const QString& keys); + void setMatchData(payeeMatchType type, bool ignorecase, const TQString& keys); bool defaultAccountEnabled() const { return !m_defaultAccountId.isEmpty(); } - const QString& defaultAccountId() const { return m_defaultAccountId; } - void setDefaultAccountId(const QString& id = QString()) { + const TQString& defaultAccountId() const { return m_defaultAccountId; } + void setDefaultAccountId(const TQString& id = TQString()) { m_defaultAccountId = id; } @@ -184,7 +184,7 @@ public: // Equality operator bool operator == (const MyMoneyPayee &) const; - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -195,12 +195,12 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; static MyMoneyPayee null; }; -inline bool operator==(const MyMoneyPayee& lhs, const QString& rhs) { return lhs.id() == rhs; } +inline bool operator==(const MyMoneyPayee& lhs, const TQString& rhs) { return lhs.id() == rhs; } #endif // vim:cin:si:ai:et:ts=2:sw=2: diff --git a/kmymoney2/mymoney/mymoneypayeetest.cpp b/kmymoney2/mymoney/mymoneypayeetest.cpp index 601679c..124cc65 100644 --- a/kmymoney2/mymoney/mymoneypayeetest.cpp +++ b/kmymoney2/mymoney/mymoneypayeetest.cpp @@ -26,21 +26,21 @@ void MyMoneyPayeeTest::tearDown () { } void MyMoneyPayeeTest::testXml(){ - QDomDocument doc; - QDomElement parent = doc.createElement("Test"); - doc.appendChild(parent); + TQDomDocument doc; + TQDomElement tqparent = doc.createElement("Test"); + doc.appendChild(tqparent); MyMoneyPayee payee1; payee1.m_id = "some random id";//if the ID isn't set, w ethrow an exception - payee1.writeXML(doc,parent); - QString temp1 = "Account1"; + payee1.writeXML(doc,tqparent); + TQString temp1 = "Account1"; payee1.setDefaultAccountId(temp1); - payee1.writeXML(doc,parent); - QString temp2 = "Account2"; + payee1.writeXML(doc,tqparent); + TQString temp2 = "Account2"; payee1.setDefaultAccountId(temp2); - payee1.writeXML(doc,parent); + payee1.writeXML(doc,tqparent); payee1.setDefaultAccountId(); - payee1.writeXML(doc,parent); - QDomElement el = parent.firstChild().toElement(); + payee1.writeXML(doc,tqparent); + TQDomElement el = tqparent.firstChild().toElement(); CPPUNIT_ASSERT(!el.isNull()); MyMoneyPayee payee2(el); CPPUNIT_ASSERT(!payee2.defaultAccountEnabled()); @@ -66,7 +66,7 @@ void MyMoneyPayeeTest::testDefaultAccount(){ MyMoneyPayee payee; CPPUNIT_ASSERT(!payee.defaultAccountEnabled()); CPPUNIT_ASSERT(payee.defaultAccountId().isEmpty()); - QString temp = "Account1"; + TQString temp = "Account1"; payee.setDefaultAccountId(temp); CPPUNIT_ASSERT(payee.defaultAccountEnabled()); CPPUNIT_ASSERT(payee.defaultAccountId()==temp); diff --git a/kmymoney2/mymoney/mymoneyprice.cpp b/kmymoney2/mymoney/mymoneyprice.cpp index b674776..df43221 100644 --- a/kmymoney2/mymoney/mymoneyprice.cpp +++ b/kmymoney2/mymoney/mymoneyprice.cpp @@ -37,11 +37,11 @@ #include "mymoneyexception.h" MyMoneyPrice::MyMoneyPrice() : - m_date(QDate()) + m_date(TQDate()) { } -MyMoneyPrice::MyMoneyPrice(const QString& from, const QString& to, const QDomElement& node) +MyMoneyPrice::MyMoneyPrice(const TQString& from, const TQString& to, const TQDomElement& node) { if("PRICE" != node.tagName()) throw new MYMONEYEXCEPTION("Node was not PRICE"); @@ -49,7 +49,7 @@ MyMoneyPrice::MyMoneyPrice(const QString& from, const QString& to, const QDomEle m_fromSecurity = from; m_toSecurity = to; - m_date = QDate::fromString(node.attribute("date"), Qt::ISODate); + m_date = TQDate::fromString(node.attribute("date"), Qt::ISODate); m_rate = MyMoneyMoney(node.attribute("price")); m_source = node.attribute("source"); @@ -59,7 +59,7 @@ MyMoneyPrice::MyMoneyPrice(const QString& from, const QString& to, const QDomEle qDebug("Price with zero value loaded"); } -MyMoneyPrice::MyMoneyPrice(const QString& from, const QString& to, const QDate& date, const MyMoneyMoney& rate, const QString& source) : +MyMoneyPrice::MyMoneyPrice(const TQString& from, const TQString& to, const TQDate& date, const MyMoneyMoney& rate, const TQString& source) : m_fromSecurity(from), m_toSecurity(to), m_date(date), @@ -76,7 +76,7 @@ MyMoneyPrice::~MyMoneyPrice() { } -const MyMoneyMoney MyMoneyPrice::rate(const QString& id) const +const MyMoneyMoney MyMoneyPrice::rate(const TQString& id) const { static MyMoneyMoney dummyPrice(1,1); @@ -88,7 +88,7 @@ const MyMoneyMoney MyMoneyPrice::rate(const QString& id) const if(id == m_fromSecurity) return m_invRate; - QString msg = QString("Unknown security id %1 for price info %2/%3.").arg(id).arg(m_fromSecurity).arg(m_toSecurity); + TQString msg = TQString("Unknown security id %1 for price info %2/%3.").tqarg(id).tqarg(m_fromSecurity).tqarg(m_toSecurity); throw new MYMONEYEXCEPTION(msg); } @@ -107,7 +107,7 @@ bool MyMoneyPrice::operator == (const MyMoneyPrice &right) const ((m_source.length() == 0 && right.m_source.length() == 0) || (m_source == right.m_source))); } -bool MyMoneyPrice::hasReferenceTo(const QString& id) const +bool MyMoneyPrice::hasReferenceTo(const TQString& id) const { return (id == m_fromSecurity) || (id == m_toSecurity); } diff --git a/kmymoney2/mymoney/mymoneyprice.h b/kmymoney2/mymoney/mymoneyprice.h index faf6454..9c4f1c0 100644 --- a/kmymoney2/mymoney/mymoneyprice.h +++ b/kmymoney2/mymoney/mymoneyprice.h @@ -30,11 +30,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qpair.h> -#include <qmap.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqpair.h> +#include <tqmap.h> +#include <tqdom.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -71,8 +71,8 @@ class KMYMONEY_EXPORT MyMoneyPrice { public: MyMoneyPrice(); - MyMoneyPrice(const QString& from, const QString& to, const QDomElement& node); - MyMoneyPrice(const QString& from, const QString& to, const QDate& date, const MyMoneyMoney& rate, const QString& source = QString()); + MyMoneyPrice(const TQString& from, const TQString& to, const TQDomElement& node); + MyMoneyPrice(const TQString& from, const TQString& to, const TQDate& date, const MyMoneyMoney& rate, const TQString& source = TQString()); virtual ~MyMoneyPrice(); /** @@ -96,7 +96,7 @@ public: * * @code * - * MyMoneyPrice price("ADF", "GBP", QDate(2005,9,20), MyMoneyMoney(1,3), "User"); + * MyMoneyPrice price("ADF", "GBP", TQDate(2005,9,20), MyMoneyMoney(1,3), "User"); * MyMoneyMoney valADF, valGBP(100,1); * * valADF = valGBP * price.rate("ADF"); @@ -107,12 +107,12 @@ public: * @p 3/1 even though the price information kept with the object was @p 1/3, but based on the other * conversion direction (from ADF to GBP). */ - const MyMoneyMoney rate(const QString& id) const; + const MyMoneyMoney rate(const TQString& id) const; - const QDate& date(void) const { return m_date; }; - const QString& source(void) const { return m_source; }; - const QString& from(void) const { return m_fromSecurity; }; - const QString& to(void) const { return m_toSecurity; }; + const TQDate& date(void) const { return m_date; }; + const TQString& source(void) const { return m_source; }; + const TQString& from(void) const { return m_fromSecurity; }; + const TQString& to(void) const { return m_toSecurity; }; /** * Check whether the object is valid or not. A MyMoneyPrice object @@ -139,20 +139,20 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - bool hasReferenceTo(const QString& id) const; + bool hasReferenceTo(const TQString& id) const; private: - QString m_fromSecurity; - QString m_toSecurity; - QDate m_date; + TQString m_fromSecurity; + TQString m_toSecurity; + TQDate m_date; MyMoneyMoney m_rate; MyMoneyMoney m_invRate; - QString m_source; + TQString m_source; }; -typedef QPair<QString, QString> MyMoneySecurityPair; -typedef QMap<QDate, MyMoneyPrice> MyMoneyPriceEntries; -typedef QMap<MyMoneySecurityPair, MyMoneyPriceEntries> MyMoneyPriceList; +typedef TQPair<TQString, TQString> MyMoneySecurityPair; +typedef TQMap<TQDate, MyMoneyPrice> MyMoneyPriceEntries; +typedef TQMap<MyMoneySecurityPair, MyMoneyPriceEntries> MyMoneyPriceList; #endif diff --git a/kmymoney2/mymoney/mymoneypricetest.cpp b/kmymoney2/mymoney/mymoneypricetest.cpp index 203e9ca..444754a 100644 --- a/kmymoney2/mymoney/mymoneypricetest.cpp +++ b/kmymoney2/mymoney/mymoneypricetest.cpp @@ -39,23 +39,23 @@ void MyMoneyPriceTest::testDefaultConstructor() void MyMoneyPriceTest::testConstructor() { - MyMoneyPrice n(QString("from"), QString("to"), QDate(2005,9,23), MyMoneyMoney(1,3), QString("MySource")); + MyMoneyPrice n(TQString("from"), TQString("to"), TQDate(2005,9,23), MyMoneyMoney(1,3), TQString("MySource")); CPPUNIT_ASSERT(n.isValid() == true); - CPPUNIT_ASSERT(n.from() == QString("from")); - CPPUNIT_ASSERT(n.to() == QString("to")); - CPPUNIT_ASSERT(n.date() == QDate(2005,9,23)); - CPPUNIT_ASSERT(n.source() == QString("MySource")); + CPPUNIT_ASSERT(n.from() == TQString("from")); + CPPUNIT_ASSERT(n.to() == TQString("to")); + CPPUNIT_ASSERT(n.date() == TQDate(2005,9,23)); + CPPUNIT_ASSERT(n.source() == TQString("MySource")); CPPUNIT_ASSERT(n.rate("to") == MyMoneyMoney(1,3)); } void MyMoneyPriceTest::testValidity() { - QString emptyId; - MyMoneyPrice n1(emptyId, QString("to"), QDate(2005,9,23), MyMoneyMoney(1,3), QString("MySource")); - MyMoneyPrice n2(QString("from"), emptyId, QDate(2005,9,23), MyMoneyMoney(1,3), QString("MySource")); - MyMoneyPrice n3(QString("from"), QString("to"), QDate(), MyMoneyMoney(1,3), QString("MySource")); - MyMoneyPrice n4(QString("from"), QString("to"), QDate(2005,9,23), MyMoneyMoney(1,3), QString("MySource")); + TQString emptyId; + MyMoneyPrice n1(emptyId, TQString("to"), TQDate(2005,9,23), MyMoneyMoney(1,3), TQString("MySource")); + MyMoneyPrice n2(TQString("from"), emptyId, TQDate(2005,9,23), MyMoneyMoney(1,3), TQString("MySource")); + MyMoneyPrice n3(TQString("from"), TQString("to"), TQDate(), MyMoneyMoney(1,3), TQString("MySource")); + MyMoneyPrice n4(TQString("from"), TQString("to"), TQDate(2005,9,23), MyMoneyMoney(1,3), TQString("MySource")); CPPUNIT_ASSERT(n1.isValid() == false); CPPUNIT_ASSERT(n2.isValid() == false); @@ -65,13 +65,13 @@ void MyMoneyPriceTest::testValidity() void MyMoneyPriceTest::testRate() { - MyMoneyPrice n1(QString("from"), QString("to"), QDate(2005,9,23), MyMoneyMoney(1,3), QString("MySource")); - MyMoneyPrice n2(QString("from"), QString("to"), QDate(), MyMoneyMoney(1,3), QString("MySource")); + MyMoneyPrice n1(TQString("from"), TQString("to"), TQDate(2005,9,23), MyMoneyMoney(1,3), TQString("MySource")); + MyMoneyPrice n2(TQString("from"), TQString("to"), TQDate(), MyMoneyMoney(1,3), TQString("MySource")); try { CPPUNIT_ASSERT(n1.rate("to") == MyMoneyMoney(1,3)); CPPUNIT_ASSERT(n1.rate("from") == MyMoneyMoney(3,1)); - CPPUNIT_ASSERT(n1.rate(QString()) == MyMoneyMoney(1,3)); + CPPUNIT_ASSERT(n1.rate(TQString()) == MyMoneyMoney(1,3)); CPPUNIT_ASSERT(n2.isValid() == false); CPPUNIT_ASSERT(n2.rate("to") == MyMoneyMoney(1,1)); diff --git a/kmymoney2/mymoney/mymoneyreport.cpp b/kmymoney2/mymoney/mymoneyreport.cpp index 63c4ca7..4cd667b 100644 --- a/kmymoney2/mymoney/mymoneyreport.cpp +++ b/kmymoney2/mymoney/mymoneyreport.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqdom.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,22 +34,22 @@ #include "mymoneyfile.h" #include "mymoneyreport.h" -const QStringList MyMoneyReport::kRowTypeText = QStringList::split ( ",", "none,assetliability,expenseincome,category,topcategory,account,payee,month,week,topaccount,topaccount-account,equitytype,accounttype,institution,budget,budgetactual,schedule,accountinfo,accountloaninfo,accountreconcile,cashflow", true ); -const QStringList MyMoneyReport::kColumnTypeText = QStringList::split ( ",", "none,months,bimonths,quarters,4,5,6,weeks,8,9,10,11,years", true ); +const TQStringList MyMoneyReport::kRowTypeText = TQStringList::split ( ",", "none,assetliability,expenseincome,category,topcategory,account,payee,month,week,topaccount,topaccount-account,equitytype,accounttype,institution,budget,budgetactual,schedule,accountinfo,accountloaninfo,accountreconcile,cashflow", true ); +const TQStringList MyMoneyReport::kColumnTypeText = TQStringList::split ( ",", "none,months,bimonths,quarters,4,5,6,weeks,8,9,10,11,years", true ); // if you add names here, don't forget to update the bitmap for EQueryColumns -// and shift the bit for eQCend one position to the left -const QStringList MyMoneyReport::kQueryColumnsText = QStringList::split ( ",", "none,number,payee,category,memo,account,reconcileflag,action,shares,price,performance,loan,balance", true ); +// and shift the bit for eTQCend one position to the left +const TQStringList MyMoneyReport::kQueryColumnsText = TQStringList::split ( ",", "none,number,payee,category,memo,account,reconcileflag,action,shares,price,performance,loan,balance", true ); const MyMoneyReport::EReportType MyMoneyReport::kTypeArray[] = { eNoReport, ePivotTable, ePivotTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, eQueryTable, ePivotTable, ePivotTable, eInfoTable, eInfoTable, eInfoTable, eQueryTable, eQueryTable, eNoReport }; -const QStringList MyMoneyReport::kDetailLevelText = QStringList::split ( ",", "none,all,top,group,total,invalid", true ); -const QStringList MyMoneyReport::kChartTypeText = QStringList::split ( ",", "none,line,bar,pie,ring,stackedbar,invalid", true ); +const TQStringList MyMoneyReport::kDetailLevelText = TQStringList::split ( ",", "none,all,top,group,total,invalid", true ); +const TQStringList MyMoneyReport::kChartTypeText = TQStringList::split ( ",", "none,line,bar,pie,ring,stackedbar,invalid", true ); // This should live in mymoney/mymoneytransactionfilter.h -static const QStringList kTypeText = QStringList::split ( ",", "all,payments,deposits,transfers,none" ); -static const QStringList kStateText = QStringList::split ( ",", "all,notreconciled,cleared,reconciled,frozen,none" ); -static const QStringList kDateLockText = QStringList::split ( ",", "alldates,untiltoday,currentmonth,currentyear,monthtodate,yeartodate,yeartomonth,lastmonth,lastyear,last7days,last30days,last3months,last6months,last12months,next7days,next30days,next3months,next6months,next12months,userdefined,last3tonext3months,last11Months,currentQuarter,lastQuarter,nextQuarter,currentFiscalYear,lastFiscalYear,today" ); -static const QStringList kAccountTypeText = QStringList::split ( ",", "unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid" ); +static const TQStringList kTypeText = TQStringList::split ( ",", "all,payments,deposits,transfers,none" ); +static const TQStringList kStateText = TQStringList::split ( ",", "all,notreconciled,cleared,reconciled,frozen,none" ); +static const TQStringList kDateLockText = TQStringList::split ( ",", "alldates,untiltoday,currentmonth,currentyear,monthtodate,yeartodate,yeartomonth,lastmonth,lastyear,last7days,last30days,last3months,last6months,last12months,next7days,next30days,next3months,next6months,next12months,userdefined,last3tonext3months,last11Months,currentQuarter,lastQuarter,nextQuarter,currentFiscalYear,lastFiscalYear,today" ); +static const TQStringList kAccountTypeText = TQStringList::split ( ",", "unknown,checkings,savings,cash,creditcard,loan,certificatedep,investment,moneymarket,asset,liability,currency,income,expense,assetloan,stock,equity,invalid" ); MyMoneyReport::MyMoneyReport() : m_name ( "Unconfigured Pivot Table Report" ), @@ -63,7 +63,7 @@ MyMoneyReport::MyMoneyReport() : m_rowType ( eExpenseIncome ), m_columnType ( eMonths ), m_columnsAreDays ( false ), - m_queryColumns ( eQCnone ), + m_queryColumns ( eTQCnone ), m_dateLock ( userDefined ), m_accountGroupFilter ( false ), m_chartType ( eChartLine ), @@ -83,14 +83,14 @@ MyMoneyReport::MyMoneyReport() : { } -MyMoneyReport::MyMoneyReport ( const QString& id, const MyMoneyReport& right ) : +MyMoneyReport::MyMoneyReport ( const TQString& id, const MyMoneyReport& right ) : MyMoneyObject ( id ) { *this = right; setId ( id ); } -MyMoneyReport::MyMoneyReport ( ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment ) : +MyMoneyReport::MyMoneyReport ( ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const TQString& _name, const TQString& _comment ) : m_name ( _name ), m_comment ( _comment ), m_detailLevel ( _ss ), @@ -162,7 +162,7 @@ MyMoneyReport::MyMoneyReport ( ERowType _rt, unsigned _ct, dateOptionE _dl, EDet } } -MyMoneyReport::MyMoneyReport ( const QDomElement& node ) : +MyMoneyReport::MyMoneyReport ( const TQDomElement& node ) : MyMoneyObject ( node ) { if ( !read ( node ) ) @@ -177,7 +177,7 @@ void MyMoneyReport::clear ( void ) MyMoneyTransactionFilter::clear(); } -void MyMoneyReport::validDateRange ( QDate& _db, QDate& _de ) +void MyMoneyReport::validDateRange ( TQDate& _db, TQDate& _de ) { _db = fromDate(); _de = toDate(); @@ -193,16 +193,16 @@ void MyMoneyReport::validDateRange ( QDate& _db, QDate& _de ) // year as the filter criteria. if ( !_db.isValid() || !_de.isValid() ) { - QValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList ( *this ); - QDate tmpBegin, tmpEnd; + TQValueList<MyMoneyTransaction> list = MyMoneyFile::instance()->transactionList ( *this ); + TQDate tmpBegin, tmpEnd; if ( !list.isEmpty() ) { qHeapSort ( list ); tmpBegin = list.front().postDate(); tmpEnd = list.back().postDate(); } else { - tmpBegin = QDate ( QDate::currentDate().year(), 1, 1 ); // the first date in the file - tmpEnd = QDate ( QDate::currentDate().year(), 12, 31 );// the last date in the file + tmpBegin = TQDate ( TQDate::tqcurrentDate().year(), 1, 1 ); // the first date in the file + tmpEnd = TQDate ( TQDate::tqcurrentDate().year(), 12, 31 );// the last date in the file } if ( !_db.isValid() ) _db = tmpBegin; @@ -233,14 +233,14 @@ void MyMoneyReport::setRowType ( ERowType _rt ) } } -bool MyMoneyReport::accountGroups(QValueList<MyMoneyAccount::accountTypeE>& list) const +bool MyMoneyReport::accountGroups(TQValueList<MyMoneyAccount::accountTypeE>& list) const { bool result = m_accountGroupFilter; if ( result ) { - QValueList<MyMoneyAccount::accountTypeE>::const_iterator it_group = m_accountGroups.begin(); + TQValueList<MyMoneyAccount::accountTypeE>::const_iterator it_group = m_accountGroups.begin(); while ( it_group != m_accountGroups.end() ) { list += ( *it_group ); @@ -253,7 +253,7 @@ bool MyMoneyReport::accountGroups(QValueList<MyMoneyAccount::accountTypeE>& list void MyMoneyReport::addAccountGroup ( MyMoneyAccount::accountTypeE type ) { if ( !m_accountGroups.isEmpty() && type != MyMoneyAccount::UnknownAccountType ) { - if ( m_accountGroups.contains ( type ) ) + if ( m_accountGroups.tqcontains ( type ) ) return; } m_accountGroupFilter = true; @@ -265,7 +265,7 @@ bool MyMoneyReport::includesAccountGroup( MyMoneyAccount::accountTypeE type ) co { bool result = ( ! m_accountGroupFilter ) || ( isIncludingTransfers() && m_rowType == MyMoneyReport::eExpenseIncome ) - || m_accountGroups.contains ( type ); + || m_accountGroups.tqcontains ( type ); return result; } @@ -305,7 +305,7 @@ bool MyMoneyReport::includes( const MyMoneyAccount& acc ) const return result; } -void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) const +void MyMoneyReport::write ( TQDomElement& e, TQDomDocument *doc, bool anonymous ) const { // No matter what changes, be sure to have a 'type' attribute. Only change // the major type if it becomes impossible to maintain compatability with @@ -317,7 +317,7 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) if ( anonymous ) { e.setAttribute ( "name", m_id ); - e.setAttribute ( "comment", QString ( m_comment ).fill ( 'x' ) ); + e.setAttribute ( "comment", TQString ( m_comment ).fill ( 'x' ) ); } else { @@ -363,11 +363,11 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) { e.setAttribute ( "type", "querytable 1.14" ); - QStringList columns; + TQStringList columns; unsigned qc = m_queryColumns; - unsigned it_qc = eQCbegin; + unsigned it_qc = eTQCbegin; unsigned index = 1; - while ( it_qc != eQCend ) + while ( it_qc != eTQCend ) { if ( qc & it_qc ) columns += kQueryColumnsText[index]; @@ -387,10 +387,10 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // Text Filter // - QRegExp textfilter; + TQRegExp textfilter; if ( textFilter ( textfilter ) ) { - QDomElement f = doc->createElement ( "TEXT" ); + TQDomElement f = doc->createElement ( "TEXT" ); f.setAttribute ( "pattern", textfilter.pattern() ); f.setAttribute ( "casesensitive", textfilter.caseSensitive() ); f.setAttribute ( "regex", !textfilter.wildcard() ); @@ -401,14 +401,14 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // // Type & State Filters // - QValueList<int> typelist; + TQValueList<int> typelist; if ( types ( typelist ) && ! typelist.empty() ) { // iterate over payees, and add each one - QValueList<int>::const_iterator it_type = typelist.begin(); + TQValueList<int>::const_iterator it_type = typelist.begin(); while ( it_type != typelist.end() ) { - QDomElement p = doc->createElement ( "TYPE" ); + TQDomElement p = doc->createElement ( "TYPE" ); p.setAttribute ( "type", kTypeText[*it_type] ); e.appendChild ( p ); @@ -416,14 +416,14 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) } } - QValueList<int> statelist; + TQValueList<int> statelist; if ( states ( statelist ) && ! statelist.empty() ) { // iterate over payees, and add each one - QValueList<int>::const_iterator it_state = statelist.begin(); + TQValueList<int>::const_iterator it_state = statelist.begin(); while ( it_state != statelist.end() ) { - QDomElement p = doc->createElement ( "STATE" ); + TQDomElement p = doc->createElement ( "STATE" ); p.setAttribute ( "state", kStateText[*it_state] ); e.appendChild ( p ); @@ -434,10 +434,10 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // Number Filter // - QString nrFrom, nrTo; + TQString nrFrom, nrTo; if ( numberFilter ( nrFrom, nrTo ) ) { - QDomElement f = doc->createElement ( "NUMBER" ); + TQDomElement f = doc->createElement ( "NUMBER" ); f.setAttribute ( "from", nrFrom ); f.setAttribute ( "to", nrTo ); e.appendChild ( f ); @@ -450,7 +450,7 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) MyMoneyMoney from, to; if ( amountFilter ( from, to ) ) // bool getAmountFilter(MyMoneyMoney&,MyMoneyMoney&); { - QDomElement f = doc->createElement ( "AMOUNT" ); + TQDomElement f = doc->createElement ( "AMOUNT" ); f.setAttribute ( "from", from.toString() ); f.setAttribute ( "to", to.toString() ); e.appendChild ( f ); @@ -460,21 +460,21 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // Payees Filter // - QStringList payeelist; + TQStringList payeelist; if ( payees ( payeelist ) ) { if ( payeelist.empty() ) { - QDomElement p = doc->createElement ( "PAYEE" ); + TQDomElement p = doc->createElement ( "PAYEE" ); e.appendChild ( p ); } else { // iterate over payees, and add each one - QStringList::const_iterator it_payee = payeelist.begin(); + TQStringList::const_iterator it_payee = payeelist.begin(); while ( it_payee != payeelist.end() ) { - QDomElement p = doc->createElement ( "PAYEE" ); + TQDomElement p = doc->createElement ( "PAYEE" ); p.setAttribute ( "id", *it_payee ); e.appendChild ( p ); @@ -487,14 +487,14 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // Account Groups Filter // - QValueList<MyMoneyAccount::accountTypeE> accountgrouplist; + TQValueList<MyMoneyAccount::accountTypeE> accountgrouplist; if ( accountGroups ( accountgrouplist ) ) { // iterate over accounts, and add each one - QValueList<MyMoneyAccount::accountTypeE>::const_iterator it_group = accountgrouplist.begin(); + TQValueList<MyMoneyAccount::accountTypeE>::const_iterator it_group = accountgrouplist.begin(); while ( it_group != accountgrouplist.end() ) { - QDomElement p = doc->createElement ( "ACCOUNTGROUP" ); + TQDomElement p = doc->createElement ( "ACCOUNTGROUP" ); p.setAttribute ( "group", kAccountTypeText[*it_group] ); e.appendChild ( p ); @@ -506,14 +506,14 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) // Accounts Filter // - QStringList accountlist; + TQStringList accountlist; if ( accounts ( accountlist ) ) { // iterate over accounts, and add each one - QStringList::const_iterator it_account = accountlist.begin(); + TQStringList::const_iterator it_account = accountlist.begin(); while ( it_account != accountlist.end() ) { - QDomElement p = doc->createElement ( "ACCOUNT" ); + TQDomElement p = doc->createElement ( "ACCOUNT" ); p.setAttribute ( "id", *it_account ); e.appendChild ( p ); @@ -529,10 +529,10 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) if ( categories ( accountlist ) ) { // iterate over accounts, and add each one - QStringList::const_iterator it_account = accountlist.begin(); + TQStringList::const_iterator it_account = accountlist.begin(); while ( it_account != accountlist.end() ) { - QDomElement p = doc->createElement ( "CATEGORY" ); + TQDomElement p = doc->createElement ( "CATEGORY" ); p.setAttribute ( "id", *it_account ); e.appendChild ( p ); @@ -546,10 +546,10 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) if ( m_dateLock == userDefined ) { - QDate dateFrom, dateTo; + TQDate dateFrom, dateTo; if ( dateFilter ( dateFrom, dateTo ) ) { - QDomElement f = doc->createElement ( "DATES" ); + TQDomElement f = doc->createElement ( "DATES" ); if ( dateFrom.isValid() ) f.setAttribute ( "from", dateFrom.toString ( Qt::ISODate ) ); if ( dateTo.isValid() ) @@ -559,7 +559,7 @@ void MyMoneyReport::write ( QDomElement& e, QDomDocument *doc, bool anonymous ) } } -bool MyMoneyReport::read ( const QDomElement& e ) +bool MyMoneyReport::read ( const TQDomElement& e ) { // The goal of this reading method is 100% backward AND 100% forward // compatability. Any report ever created with any version of KMyMoney @@ -572,11 +572,11 @@ bool MyMoneyReport::read ( const QDomElement& e ) "REPORT" == e.tagName() && ( - ( e.attribute ( "type" ).find ( "pivottable 1." ) == 0 ) + ( e.attribute ( "type" ).tqfind ( "pivottable 1." ) == 0 ) || - ( e.attribute ( "type" ).find ( "querytable 1." ) == 0 ) + ( e.attribute ( "type" ).tqfind ( "querytable 1." ) == 0 ) || - ( e.attribute ( "type" ).find ( "infotable 1." ) == 0 ) + ( e.attribute ( "type" ).tqfind ( "infotable 1." ) == 0 ) ) ) { @@ -588,11 +588,11 @@ bool MyMoneyReport::read ( const QDomElement& e ) m_comment = e.attribute ( "comment", "Extremely old report" ); //set report type - if(!e.attribute ( "type" ).find ( "pivottable" )) { + if(!e.attribute ( "type" ).tqfind ( "pivottable" )) { m_reportType = MyMoneyReport::ePivotTable; - } else if(!e.attribute ( "type" ).find ( "querytable" )) { + } else if(!e.attribute ( "type" ).tqfind ( "querytable" )) { m_reportType = MyMoneyReport::eQueryTable; - } else if(!e.attribute ( "type" ).find ( "infotable" )) { + } else if(!e.attribute ( "type" ).tqfind ( "infotable" )) { m_reportType = MyMoneyReport::eInfoTable; } else { m_reportType = MyMoneyReport::eNoReport; @@ -607,7 +607,7 @@ bool MyMoneyReport::read ( const QDomElement& e ) //check for reports with older settings which didn't have the detail attribute if ( e.hasAttribute ( "detail" ) ) { - i = kDetailLevelText.findIndex ( e.attribute ( "detail", "all" ) ); + i = kDetailLevelText.tqfindIndex ( e.attribute ( "detail", "all" ) ); if ( i != -1 ) m_detailLevel = static_cast<EDetailLevel> ( i ); } else if ( e.attribute ( "showsubaccounts", "0" ).toUInt() ) { @@ -639,7 +639,7 @@ bool MyMoneyReport::read ( const QDomElement& e ) //only load chart data if it is a pivot table if ( m_reportType == ePivotTable ) { - i = kChartTypeText.findIndex ( e.attribute ( "charttype" ) ); + i = kChartTypeText.tqfindIndex ( e.attribute ( "charttype" ) ); if ( i != -1 ) m_chartType = static_cast<EChartType> ( i ); @@ -660,20 +660,20 @@ bool MyMoneyReport::read ( const QDomElement& e ) m_chartLineWidth = 1; } - QString datelockstr = e.attribute ( "datelock", "userdefined" ); + TQString datelockstr = e.attribute ( "datelock", "userdefined" ); // Handle the pivot 1.2/query 1.1 case where the values were saved as // numbers bool ok = false; i = datelockstr.toUInt ( &ok ); if ( !ok ) { - i = kDateLockText.findIndex ( datelockstr ); + i = kDateLockText.tqfindIndex ( datelockstr ); if ( i == -1 ) i = userDefined; } setDateFilter ( static_cast<dateOptionE> ( i ) ); - i = kRowTypeText.findIndex ( e.attribute ( "rowtype", "expenseincome" ) ); + i = kRowTypeText.tqfindIndex ( e.attribute ( "rowtype", "expenseincome" ) ); if ( i != -1 ) { setRowType ( static_cast<ERowType> ( i ) ); @@ -687,16 +687,16 @@ bool MyMoneyReport::read ( const QDomElement& e ) if ( e.hasAttribute ( "showrowtotals" ) ) m_showRowTotals = e.attribute ( "showrowtotals" ).toUInt(); - i = kColumnTypeText.findIndex ( e.attribute ( "columntype", "months" ) ); + i = kColumnTypeText.tqfindIndex ( e.attribute ( "columntype", "months" ) ); if ( i != -1 ) setColumnType ( static_cast<EColumnType> ( i ) ); unsigned qc = 0; - QStringList columns = QStringList::split ( ",", e.attribute ( "querycolumns", "none" ) ); - QStringList::const_iterator it_column = columns.begin(); + TQStringList columns = TQStringList::split ( ",", e.attribute ( "querycolumns", "none" ) ); + TQStringList::const_iterator it_column = columns.begin(); while ( it_column != columns.end() ) { - i = kQueryColumnsText.findIndex ( *it_column ); + i = kQueryColumnsText.tqfindIndex ( *it_column ); if ( i > 0 ) qc |= ( 1 << ( i - 1 ) ); @@ -704,23 +704,23 @@ bool MyMoneyReport::read ( const QDomElement& e ) } setQueryColumns ( static_cast<EQueryColumns> ( qc ) ); - QDomNode child = e.firstChild(); + TQDomNode child = e.firstChild(); while ( !child.isNull() && child.isElement() ) { - QDomElement c = child.toElement(); + TQDomElement c = child.toElement(); if ( "TEXT" == c.tagName() && c.hasAttribute ( "pattern" ) ) { - setTextFilter ( QRegExp ( c.attribute ( "pattern" ), c.attribute ( "casesensitive", "1" ).toUInt(), !c.attribute ( "regex", "1" ).toUInt() ), c.attribute ( "inverttext", "0" ).toUInt() ); + setTextFilter ( TQRegExp ( c.attribute ( "pattern" ), c.attribute ( "casesensitive", "1" ).toUInt(), !c.attribute ( "regex", "1" ).toUInt() ), c.attribute ( "inverttext", "0" ).toUInt() ); } if ( "TYPE" == c.tagName() && c.hasAttribute ( "type" ) ) { - i = kTypeText.findIndex ( c.attribute ( "type" ) ); + i = kTypeText.tqfindIndex ( c.attribute ( "type" ) ); if ( i != -1 ) addType ( i ); } if ( "STATE" == c.tagName() && c.hasAttribute ( "state" ) ) { - i = kStateText.findIndex ( c.attribute ( "state" ) ); + i = kStateText.tqfindIndex ( c.attribute ( "state" ) ); if ( i != -1 ) addState ( i ); } @@ -734,11 +734,11 @@ bool MyMoneyReport::read ( const QDomElement& e ) } if ( "DATES" == c.tagName() ) { - QDate from, to; + TQDate from, to; if ( c.hasAttribute ( "from" ) ) - from = QDate::fromString ( c.attribute ( "from" ), Qt::ISODate ); + from = TQDate::fromString ( c.attribute ( "from" ), Qt::ISODate ); if ( c.hasAttribute ( "to" ) ) - to = QDate::fromString ( c.attribute ( "to" ), Qt::ISODate ); + to = TQDate::fromString ( c.attribute ( "to" ), Qt::ISODate ); MyMoneyTransactionFilter::setDateFilter ( from, to ); } if ( "PAYEE" == c.tagName() ) @@ -755,7 +755,7 @@ bool MyMoneyReport::read ( const QDomElement& e ) } if ( "ACCOUNTGROUP" == c.tagName() && c.hasAttribute ( "group" ) ) { - i = kAccountTypeText.findIndex ( c.attribute ( "group" ) ); + i = kAccountTypeText.tqfindIndex ( c.attribute ( "group" ) ); if ( i != -1 ) addAccountGroup ( static_cast<MyMoneyAccount::accountTypeE> ( i ) ); } @@ -765,23 +765,23 @@ bool MyMoneyReport::read ( const QDomElement& e ) return result; } -void MyMoneyReport::writeXML ( QDomDocument& document, QDomElement& parent ) const +void MyMoneyReport::writeXML ( TQDomDocument& document, TQDomElement& tqparent ) const { - QDomElement el = document.createElement ( "REPORT" ); + TQDomElement el = document.createElement ( "REPORT" ); write ( el, &document, false ); - parent.appendChild ( el ); + tqparent.appendChild ( el ); } -bool MyMoneyReport::hasReferenceTo ( const QString& id ) const +bool MyMoneyReport::hasReferenceTo ( const TQString& id ) const { - QStringList list; + TQStringList list; // collect all ids accounts ( list ); categories ( list ); payees ( list ); - return ( list.contains ( id ) > 0 ); + return ( list.tqcontains ( id ) > 0 ); } // vim:cin:si:ai:et:ts=2:sw=2: diff --git a/kmymoney2/mymoney/mymoneyreport.h b/kmymoney2/mymoney/mymoneyreport.h index e467179..a541042 100644 --- a/kmymoney2/mymoney/mymoneyreport.h +++ b/kmymoney2/mymoney/mymoneyreport.h @@ -24,11 +24,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qvaluelist.h> -#include <qstring.h> -class QDomElement; -class QDomDocument; +#include <tqmap.h> +#include <tqvaluelist.h> +#include <tqstring.h> +class TQDomElement; +class TQDomDocument; // ---------------------------------------------------------------------------- // Project Includes @@ -45,8 +45,8 @@ class QDomDocument; * A report is a transactionfilter, so any report can specify which * transactions it's interested down to the most minute level of detail. * It extends the transactionfilter by providing identification (name, - * comments, group type, etc) as well as layout information (what kind - * of layout should be used, how the rows & columns should be presented, + * comments, group type, etc) as well as tqlayout information (what kind + * of tqlayout should be used, how the rows & columns should be presented, * currency converted, etc.) * * As noted above, this class only provides a report DEFINITION. The @@ -64,34 +64,34 @@ public: enum EReportType { eNoReport = 0, ePivotTable, eQueryTable, eInfoTable }; enum EColumnType { eNoColumns = 0, eDays = 1, eMonths = 1, eBiMonths = 2, eQuarters = 3, eWeeks = 7, eYears = 12 }; - // if you add bits to this bitmask, start with the value currently assigned to eQCend and update its value afterwards + // if you add bits to this bittqmask, start with the value currently assigned to eTQCend and update its value afterwards // also don't forget to add column names to kQueryColumnsText in mymoneyreport.cpp - enum EQueryColumns { eQCnone = 0x0, eQCbegin = 0x1, eQCnumber = 0x1, eQCpayee = 0x2, eQCcategory = 0x4, eQCmemo = 0x8, eQCaccount = 0x10, eQCreconciled = 0x20, eQCaction = 0x40, eQCshares = 0x80, eQCprice = 0x100, eQCperformance = 0x200, eQCloan = 0x400, eQCbalance = 0x800, eQCend = 0x1000 }; + enum EQueryColumns { eTQCnone = 0x0, eTQCbegin = 0x1, eTQCnumber = 0x1, eTQCpayee = 0x2, eTQCcategory = 0x4, eTQCmemo = 0x8, eTQCaccount = 0x10, eTQCreconciled = 0x20, eTQCaction = 0x40, eTQCshares = 0x80, eTQCprice = 0x100, eTQCperformance = 0x200, eTQCloan = 0x400, eTQCbalance = 0x800, eTQCend = 0x1000 }; enum EDetailLevel { eDetailNone = 0, eDetailAll, eDetailTop, eDetailGroup, eDetailTotal, eDetailEnd }; enum EChartType { eChartNone = 0, eChartLine, eChartBar, eChartPie, eChartRing, eChartStackedBar, eChartEnd }; - static const QStringList kRowTypeText; - static const QStringList kColumnTypeText; - static const QStringList kQueryColumnsText; - static const QStringList kDetailLevelText; - static const QStringList kChartTypeText; + static const TQStringList kRowTypeText; + static const TQStringList kColumnTypeText; + static const TQStringList kQueryColumnsText; + static const TQStringList kDetailLevelText; + static const TQStringList kChartTypeText; static const EReportType kTypeArray[]; public: MyMoneyReport(void); - MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const QString& _name, const QString& _comment ); - MyMoneyReport(const QString& id, const MyMoneyReport& right); + MyMoneyReport(ERowType _rt, unsigned _ct, dateOptionE _dl, EDetailLevel _ss, const TQString& _name, const TQString& _comment ); + MyMoneyReport(const TQString& id, const MyMoneyReport& right); /** * This constructor creates an object based on the data found in the - * QDomElement referenced by @p node. If problems arise, the @p id of + * TQDomElement referenced by @p node. If problems arise, the @p id of * the object is cleared (see MyMoneyObject::clearId()). */ - MyMoneyReport(const QDomElement& node); + MyMoneyReport(const TQDomElement& node); // Simple get operations - const QString& name(void) const { return m_name; } + const TQString& name(void) const { return m_name; } bool isShowingRowTotals(void) const { return (m_showRowTotals); } EReportType reportType(void) const { return m_reportType; } ERowType rowType(void) const { return m_rowType; } @@ -100,9 +100,9 @@ public: bool isConvertCurrency(void) const { return m_convertCurrency; } unsigned columnPitch(void) const { return static_cast<unsigned>(m_columnType); } bool isShowingColumnTotals(void) const { return m_convertCurrency; } - const QString& comment( void ) const { return m_comment; } + const TQString& comment( void ) const { return m_comment; } EQueryColumns queryColumns(void) const { return m_queryColumns; } - const QString& group( void ) const { return m_group; } + const TQString& group( void ) const { return m_group; } bool isFavorite(void) const { return m_favorite; } bool isTax(void) const { return m_tax; } bool isInvestmentsOnly(void) const { return m_investments; } @@ -118,7 +118,7 @@ public: bool isIncludingTransfers(void) const { return m_includeTransfers; } bool isIncludingUnusedAccounts(void) const { return m_includeUnusedAccounts; } bool hasBudget(void) const { return !m_budgetId.isEmpty(); } - const QString& budget(void) const { return m_budgetId; } + const TQString& budget(void) const { return m_budgetId; } bool isIncludingBudgetActuals(void) const { return m_includeBudgetActuals; } bool isIncludingForecast(void) const { return m_includeForecast; } bool isIncludingMovingAverage(void) const { return m_includeMovingAverage; } @@ -128,12 +128,12 @@ public: bool isUserDefined(void) const { return m_dateLock == userDefined; } // Simple set operations - void setName(const QString& _s) { m_name = _s; } + void setName(const TQString& _s) { m_name = _s; } void setConvertCurrency(bool _f) { m_convertCurrency = _f; } void setRowType(ERowType _rt); void setColumnType(EColumnType _ct) { m_columnType = _ct; } - void setComment( const QString& _comment ) { m_comment = _comment; } - void setGroup( const QString& _group ) { m_group = _group; } + void setComment( const TQString& _comment ) { m_comment = _comment; } + void setGroup( const TQString& _group ) { m_group = _group; } void setFavorite(bool _f) { m_favorite = _f; } void setQueryColumns( EQueryColumns _qc ) { m_queryColumns = _qc; } void setTax(bool _f) { m_tax = _f; } @@ -168,7 +168,7 @@ public: * simply checked for any non-empty string, and if so, hasBudget() * will return true. */ - void setBudget( const QString& _budget, bool _fa = true ) { m_budgetId = _budget; m_includeBudgetActuals=_fa; } + void setBudget( const TQString& _budget, bool _fa = true ) { m_budgetId = _budget; m_includeBudgetActuals=_fa; } /** * This method allows you to clear the underlying transaction filter @@ -212,7 +212,7 @@ public: * @param _de The inclusive end date of the date range */ - void setDateFilter(const QDate& _db,const QDate& _de) { MyMoneyTransactionFilter::setDateFilter( _db,_de ); } + void setDateFilter(const TQDate& _db,const TQDate& _de) { MyMoneyTransactionFilter::setDateFilter( _db,_de ); } /** * Set the underlying date filter using the 'date lock' property. @@ -230,19 +230,19 @@ public: /** * Retrieves a VALID beginning & ending date for this report. * - * The underlying date filter can return en empty QDate() for either the + * The underlying date filter can return en empty TQDate() for either the * begin or end date or both. This is typically unacceptable for reports, * which need the REAL begin and end date. * * This function gets the underlying date filter range, and if either is - * an empty QDate(), it determines the missing date from looking at all + * an empty TQDate(), it determines the missing date from looking at all * the transactions which match the underlying filter, and returning the * date of the first or last transaction (as appropriate). * * @param _db The inclusive begin date of the date range * @param _de The inclusive end date of the date range */ - void validDateRange(QDate& _db, QDate& _de); + void validDateRange(TQDate& _db, TQDate& _de); /** * This method turns on the account group filter and adds the @@ -251,7 +251,7 @@ public: * Note that account group filtering is handled differently * than all the filters of the underlying class. This filter * is meant to be applied to individual splits of matched - * transactions AFTER the underlying filter is used to find + * transactions AFTER the underlying filter is used to tqfind * the matching transactions. * * @param type the account group to add to the allowed groups list @@ -265,7 +265,7 @@ public: * @param list list to append account groups into * @return return true if an account group filter has been set */ - bool accountGroups(QValueList<MyMoneyAccount::accountTypeE>& list) const; + bool accountGroups(TQValueList<MyMoneyAccount::accountTypeE>& list) const; /** * This method returns whether the specified account group @@ -296,9 +296,9 @@ public: * @param doc The document which we can use to create new sub-elements * if needed * @param anonymous Whether the sensitive parts of the report should be - * masked + * tqmasked */ - void write(QDomElement& e, QDomDocument *doc, bool anonymous=false) const; + void write(TQDomElement& e, TQDomDocument *doc, bool anonymous=false) const; /** * This method reads a report from the DOM element @p e, and @@ -310,17 +310,17 @@ public: * element @p e. If false is returned, the contents of this report * object are undefined. */ - bool read(const QDomElement& e); + bool read(const TQDomElement& e); /** - * This method creates a QDomElement for the @p document - * under the parent node @p parent. (This version overwrites the + * This method creates a TQDomElement for the @p document + * under the tqparent node @p tqparent. (This version overwrites the * MMObject base class.) * - * @param document reference to QDomDocument - * @param parent reference to QDomElement parent node + * @param document reference to TQDomDocument + * @param tqparent reference to TQDomElement tqparent node */ - virtual void writeXML(QDomDocument& document, QDomElement& parent) const; + virtual void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -331,23 +331,23 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; private: /** * The user-assigned name of the report */ - QString m_name; + TQString m_name; /** * The user-assigned comment for the report, in case they want to make * additional notes for themselves about the report. */ - QString m_comment; + TQString m_comment; /** * Where to group this report amongst the others in the UI view. This * should be assigned by the UI system. */ - QString m_group; + TQString m_group; /** * How much detail to show in the accounts */ @@ -417,7 +417,7 @@ private: * is applied to the individual splits AFTER a transaction has been * matched using the underlying filter. */ - QValueList<MyMoneyAccount::accountTypeE> m_accountGroups; + TQValueList<MyMoneyAccount::accountTypeE> m_accountGroups; /** * Whether an account group filter has been set (see m_accountGroups) */ @@ -454,7 +454,7 @@ private: /** * The id of the budget associated with this report. */ - QString m_budgetId; + TQString m_budgetId; /** * Whether this report should print the actual data to go along with * the budget. This is only valid if the report has a budget. diff --git a/kmymoney2/mymoney/mymoneyscheduled.cpp b/kmymoney2/mymoney/mymoneyscheduled.cpp index 88b4c7b..ef8264c 100644 --- a/kmymoney2/mymoney/mymoneyscheduled.cpp +++ b/kmymoney2/mymoney/mymoneyscheduled.cpp @@ -40,17 +40,17 @@ MyMoneySchedule::MyMoneySchedule() : m_paymentType = STYPE_ANY; m_fixed = false; m_autoEnter = false; - m_startDate = QDate(); - m_endDate = QDate(); - m_lastPayment = QDate(); + m_startDate = TQDate(); + m_endDate = TQDate(); + m_lastPayment = TQDate(); m_weekendOption = MoveNothing; } -MyMoneySchedule::MyMoneySchedule(const QString& name, typeE type, +MyMoneySchedule::MyMoneySchedule(const TQString& name, typeE type, occurenceE occurence, int occurenceMultiplier, paymentTypeE paymentType, - const QDate& /* startDate */, - const QDate& endDate, + const TQDate& /* startDate */, + const TQDate& endDate, bool fixed, bool autoEnter) : MyMoneyObject() { @@ -63,13 +63,13 @@ MyMoneySchedule::MyMoneySchedule(const QString& name, typeE type, m_paymentType = paymentType; m_fixed = fixed; m_autoEnter = autoEnter; - m_startDate = QDate(); + m_startDate = TQDate(); m_endDate = endDate; - m_lastPayment = QDate(); + m_lastPayment = TQDate(); m_weekendOption = MoveNothing; } -MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : +MyMoneySchedule::MyMoneySchedule(const TQDomElement& node) : MyMoneyObject(node) { if("SCHEDULED_TX" != node.tagName()) @@ -91,7 +91,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : m_weekendOption = static_cast<MyMoneySchedule::weekendOptionE>(node.attribute("weekendOption").toInt()); // read in the associated transaction - QDomNodeList nodeList = node.elementsByTagName("TRANSACTION"); + TQDomNodeList nodeList = node.elementsByTagName("TRANSACTION"); if(nodeList.count() == 0) throw new MYMONEYEXCEPTION("SCHEDULED_TX has no TRANSACTION node"); @@ -101,8 +101,8 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : // in the schedule. So if this is the case, we deal with a very old transaction // and can't use the post date field as next due date. Hence, we wipe it out here if(m_transaction.entryDate().isValid()) { - m_transaction.setPostDate(QDate()); - m_transaction.setEntryDate(QDate()); + m_transaction.setPostDate(TQDate()); + m_transaction.setEntryDate(TQDate()); } // readin the recorded payments @@ -119,7 +119,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : if(!nextDueDate().isValid() && !m_lastPayment.isValid()) { m_transaction.setPostDate(m_startDate); // clear it, because the schedule has never been used - m_startDate = QDate(); + m_startDate = TQDate(); } // There are reports that lastPayment and nextDueDate are identical or @@ -127,7 +127,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : // be caused by older versions of the application. In this case, we just // clear out the nextDueDate and let it calculate from the lastPayment. if(nextDueDate().isValid() && nextDueDate() <= m_lastPayment) { - m_transaction.setPostDate(QDate()); + m_transaction.setPostDate(TQDate()); } if(!nextDueDate().isValid()) { @@ -136,7 +136,7 @@ MyMoneySchedule::MyMoneySchedule(const QDomElement& node) : } } -MyMoneySchedule::MyMoneySchedule(const QString& id, const MyMoneySchedule& right) : +MyMoneySchedule::MyMoneySchedule(const TQString& id, const MyMoneySchedule& right) : MyMoneyObject(id) { *this = right; @@ -151,7 +151,7 @@ MyMoneySchedule::occurenceE MyMoneySchedule::occurence(void) const return occ; } -void MyMoneySchedule::setStartDate(const QDate& date) +void MyMoneySchedule::setStartDate(const TQDate& date) { m_startDate = date; } @@ -190,14 +190,14 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool // make sure to clear out some unused information in scheduled transactions // we need to do this for the case that the transaction passed as argument // is a matched or imported transaction. - QValueList<MyMoneySplit> splits = t.splits(); + TQValueList<MyMoneySplit> splits = t.splits(); if(splits.count() > 0) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneySplit s = *it_s; // clear out the bankID if(!(*it_s).bankID().isEmpty()) { - s.setBankID(QString()); + s.setBankID(TQString()); t.modifySplit(s); } @@ -212,10 +212,10 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool // simply skip the test // Don't check for accounts with an id of 'Phony-ID' which is used // internally for non-existing accounts (during creation of accounts) - if(file->storageAttached() && s.accountId() != QString("Phony-ID")) { + if(file->storageAttached() && s.accountId() != TQString("Phony-ID")) { MyMoneyAccount acc = file->account(s.accountId()); if(acc.isIncomeExpense()) { - s.setPayeeId(QString()); + s.setPayeeId(TQString()); t.modifySplit(s); } } @@ -229,7 +229,7 @@ void MyMoneySchedule::setTransaction(const MyMoneyTransaction& transaction, bool m_transaction.clearId(); } -void MyMoneySchedule::setEndDate(const QDate& date) +void MyMoneySchedule::setEndDate(const TQDate& date) { m_endDate = date; } @@ -239,27 +239,27 @@ void MyMoneySchedule::setAutoEnter(bool autoenter) m_autoEnter = autoenter; } -const QDate& MyMoneySchedule::startDate(void) const +const TQDate& MyMoneySchedule::startDate(void) const { if(m_startDate.isValid()) return m_startDate; return nextDueDate(); } -const QDate& MyMoneySchedule::nextDueDate(void) const +const TQDate& MyMoneySchedule::nextDueDate(void) const { return m_transaction.postDate(); } -QDate MyMoneySchedule::adjustedNextDueDate(void) const +TQDate MyMoneySchedule::adjustedNextDueDate(void) const { if(isFinished()) - return QDate(); + return TQDate(); return adjustedDate(nextDueDate(), weekendOption()); } -QDate MyMoneySchedule::adjustedDate(QDate date, weekendOptionE option) const +TQDate MyMoneySchedule::adjustedDate(TQDate date, weekendOptionE option) const { if (option == MyMoneySchedule::MoveNothing) return date; @@ -274,7 +274,7 @@ QDate MyMoneySchedule::adjustedDate(QDate date, weekendOptionE option) const return date; } -void MyMoneySchedule::setNextDueDate(const QDate& date) +void MyMoneySchedule::setNextDueDate(const TQDate& date) { if(date.isValid()) { m_transaction.setPostDate(date); @@ -282,11 +282,11 @@ void MyMoneySchedule::setNextDueDate(const QDate& date) } } -void MyMoneySchedule::setLastPayment(const QDate& date) +void MyMoneySchedule::setLastPayment(const TQDate& date) { // Delete all payments older than date - QValueList<QDate>::Iterator it; - QValueList<QDate> delList; + TQValueList<TQDate>::Iterator it; + TQValueList<TQDate> delList; for (it=m_recordedPayments.begin(); it!=m_recordedPayments.end(); ++it) { @@ -304,7 +304,7 @@ void MyMoneySchedule::setLastPayment(const QDate& date) m_startDate = date; } -void MyMoneySchedule::setName(const QString& nm) +void MyMoneySchedule::setName(const TQString& nm) { m_name = nm; } @@ -373,7 +373,7 @@ void MyMoneySchedule::validate(bool id_check) const break; case TYPE_DEPOSIT: - if (m_paymentType == STYPE_DIRECTDEBIT || m_paymentType == STYPE_WRITECHEQUE) + if (m_paymentType == STYPE_DIRECTDEBIT || m_paymentType == STYPE_WRITECHETQUE) throw new MYMONEYEXCEPTION("Invalid payment type for deposits"); break; @@ -391,21 +391,21 @@ void MyMoneySchedule::validate(bool id_check) const } } -QDate MyMoneySchedule::adjustedNextPayment(const QDate& refDate) const +TQDate MyMoneySchedule::adjustedNextPayment(const TQDate& refDate) const { - QDate date(nextPayment(refDate)); + TQDate date(nextPayment(refDate)); return date.isValid() ? adjustedDate(date, weekendOption()) : date; } -QDate MyMoneySchedule::nextPayment(const QDate& refDate) const +TQDate MyMoneySchedule::nextPayment(const TQDate& refDate) const { // if the enddate is valid and it is before the reference date, // then there will be no more payments. if(m_endDate.isValid() && m_endDate < refDate) { - return QDate(); + return TQDate(); } - QDate paymentDate(nextDueDate()); + TQDate paymentDate(nextDueDate()); if(refDate >= paymentDate) { switch (m_occurence) @@ -414,11 +414,11 @@ QDate MyMoneySchedule::nextPayment(const QDate& refDate) const // if the lastPayment is already set, then there will be no more payments // otherwise, the start date is the payment date if(m_lastPayment.isValid()) - return QDate(); + return TQDate(); // if the only payment should have been prior to the reference date, // then don't show it if(paymentDate < refDate) - return QDate(); + return TQDate(); break; case OCCUR_DAILY: @@ -461,39 +461,39 @@ QDate MyMoneySchedule::nextPayment(const QDate& refDate) const case OCCUR_ANY: default: - paymentDate = QDate(); + paymentDate = TQDate(); break; } } if(paymentDate.isValid()) { if(m_endDate.isValid() && paymentDate > m_endDate) - paymentDate = QDate(); + paymentDate = TQDate(); } - if (paymentDate.isValid() && m_recordedPayments.contains(paymentDate)) + if (paymentDate.isValid() && m_recordedPayments.tqcontains(paymentDate)) paymentDate = nextPayment(paymentDate); return paymentDate; } -QValueList<QDate> MyMoneySchedule::paymentDates(const QDate& _startDate, const QDate& _endDate) const +TQValueList<TQDate> MyMoneySchedule::paymentDates(const TQDate& _startDate, const TQDate& _endDate) const { - QDate paymentDate(nextDueDate()); - QValueList<QDate> theDates; + TQDate paymentDate(nextDueDate()); + TQValueList<TQDate> theDates; - QDate endDate(_endDate); + TQDate endDate(_endDate); if ( willEnd() && m_endDate < endDate ) endDate = m_endDate; weekendOptionE option(weekendOption()); - QDate start_date(adjustedDate(startDate(), option)); + TQDate start_date(adjustedDate(startDate(), option)); // if the period specified by the parameters and the period // defined for this schedule don't overlap, then the list remains empty if ((willEnd() && m_endDate < _startDate) || start_date > endDate) return theDates; - QDate date(adjustedDate(paymentDate, option)); + TQDate date(adjustedDate(paymentDate, option)); switch (m_occurence) { @@ -594,7 +594,7 @@ int MyMoneySchedule::transactionsRemaining(void) const if (m_endDate.isValid()) { - QValueList<QDate> dates = paymentDates(m_lastPayment, m_endDate); + TQValueList<TQDate> dates = paymentDates(m_lastPayment, m_endDate); // Dont include the last payment so -1 counter = dates.count(); } @@ -603,8 +603,8 @@ int MyMoneySchedule::transactionsRemaining(void) const MyMoneyAccount MyMoneySchedule::account(int cnt) const { - QValueList<MyMoneySplit> splits = m_transaction.splits(); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> splits = m_transaction.splits(); + TQValueList<MyMoneySplit>::ConstIterator it; MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount acc; @@ -627,10 +627,10 @@ MyMoneyAccount MyMoneySchedule::account(int cnt) const return MyMoneyAccount(); } -QDate MyMoneySchedule::dateAfter(int transactions) const +TQDate MyMoneySchedule::dateAfter(int transactions) const { int counter=1; - QDate paymentDate(startDate()); + TQDate paymentDate(startDate()); if (transactions<=0) return paymentDate; @@ -680,7 +680,7 @@ bool MyMoneySchedule::isOverdue() const if (isFinished()) return false; - if(adjustedNextDueDate() >= QDate::currentDate()) + if(adjustedNextDueDate() >= TQDate::tqcurrentDate()) return false; return true; @@ -705,19 +705,19 @@ bool MyMoneySchedule::isFinished() const return false; } -bool MyMoneySchedule::hasRecordedPayment(const QDate& date) const +bool MyMoneySchedule::hasRecordedPayment(const TQDate& date) const { // m_lastPayment should always be > recordedPayments() if (m_lastPayment.isValid() && m_lastPayment >= date) return true; - if (m_recordedPayments.contains(date)) + if (m_recordedPayments.tqcontains(date)) return true; return false; } -void MyMoneySchedule::recordPayment(const QDate& date) +void MyMoneySchedule::recordPayment(const TQDate& date) { m_recordedPayments.append(date); } @@ -737,19 +737,19 @@ void MyMoneySchedule::setWeekendOption(const weekendOptionE option) } } -void MyMoneySchedule::fixDate(QDate& date) const +void MyMoneySchedule::fixDate(TQDate& date) const { - QDate fixDate(m_startDate); + TQDate fixDate(m_startDate); if(fixDate.isValid() && date.day() != fixDate.day() - && QDate::isValid(date.year(), date.month(), fixDate.day())) { + && TQDate::isValid(date.year(), date.month(), fixDate.day())) { date.setYMD(date.year(), date.month(), fixDate.day()); } } -void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneySchedule::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("SCHEDULED_TX"); + TQDomElement el = document.createElement("SCHEDULED_TX"); writeBaseXML(document, el); @@ -766,11 +766,11 @@ void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) cons el.setAttribute("weekendOption", m_weekendOption); //store the payment history for this scheduled task. - QValueList<QDate> payments = recordedPayments(); - QValueList<QDate>::ConstIterator it; - QDomElement paymentsElement = document.createElement("PAYMENTS"); + TQValueList<TQDate> payments = recordedPayments(); + TQValueList<TQDate>::ConstIterator it; + TQDomElement paymentsElement = document.createElement("PAYMENTS"); for (it=payments.begin(); it!=payments.end(); ++it) { - QDomElement paymentEntry = document.createElement("PAYMENT"); + TQDomElement paymentEntry = document.createElement("PAYMENT"); paymentEntry.setAttribute("date", dateToString(*it)); paymentsElement.appendChild(paymentEntry); } @@ -779,22 +779,22 @@ void MyMoneySchedule::writeXML(QDomDocument& document, QDomElement& parent) cons //store the transaction data for this task. m_transaction.writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneySchedule::hasReferenceTo(const QString& id) const +bool MyMoneySchedule::hasReferenceTo(const TQString& id) const { return m_transaction.hasReferenceTo(id); } -QString MyMoneySchedule::occurenceToString() const +TQString MyMoneySchedule::occurenceToString() const { return occurenceToString( occurenceMultiplier(), occurencePeriod() ); } -QString MyMoneySchedule::occurenceToString(occurenceE occurence) +TQString MyMoneySchedule::occurenceToString(occurenceE occurence) { - QString occurenceString = I18N_NOOP("Any"); + TQString occurenceString = I18N_NOOP("Any"); if(occurence == MyMoneySchedule::OCCUR_ONCE) occurenceString = I18N_NOOP("Once"); @@ -822,7 +822,7 @@ QString MyMoneySchedule::occurenceToString(occurenceE occurence) occurenceString = I18N_NOOP("Every two months"); else if(occurence == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) occurenceString = I18N_NOOP("Every three months"); - else if(occurence == MyMoneySchedule::OCCUR_QUARTERLY) + else if(occurence == MyMoneySchedule::OCCUR_TQUARTERLY) occurenceString = I18N_NOOP("Quarterly"); else if(occurence == MyMoneySchedule::OCCUR_EVERYFOURMONTHS) occurenceString = I18N_NOOP("Every four months"); @@ -835,22 +835,22 @@ QString MyMoneySchedule::occurenceToString(occurenceE occurence) return occurenceString; } -QString MyMoneySchedule::occurenceToString(int mult, occurenceE type) +TQString MyMoneySchedule::occurenceToString(int mult, occurenceE type) { - QString occurenceString = I18N_NOOP("Any"); + TQString occurenceString = I18N_NOOP("Any"); if (type == MyMoneySchedule::OCCUR_ONCE) switch (mult) { case 1: occurenceString = I18N_NOOP("Once"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("%1 times").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("%1 times").tqarg(mult)); } else if(type == MyMoneySchedule::OCCUR_DAILY) switch (mult) { case 1: occurenceString = I18N_NOOP("Daily"); break; case 30: occurenceString = I18N_NOOP("Every thirty days"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 days").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 days").tqarg(mult)); } else if(type == MyMoneySchedule::OCCUR_WEEKLY) switch (mult) @@ -860,13 +860,13 @@ QString MyMoneySchedule::occurenceToString(int mult, occurenceE type) case 3: occurenceString = I18N_NOOP("Every three weeks"); break; case 4: occurenceString = I18N_NOOP("Every four weeks"); break; case 8: occurenceString = I18N_NOOP("Every eight weeks"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 weeks").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 weeks").tqarg(mult)); } else if(type == MyMoneySchedule::OCCUR_EVERYHALFMONTH) switch (mult) { case 1: occurenceString = I18N_NOOP("Every half month"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 half months").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 half months").tqarg(mult)); } else if(type == MyMoneySchedule::OCCUR_MONTHLY) switch (mult) @@ -876,21 +876,21 @@ QString MyMoneySchedule::occurenceToString(int mult, occurenceE type) case 3: occurenceString = I18N_NOOP("Every three months"); break; case 4: occurenceString = I18N_NOOP("Every four months"); break; case 6: occurenceString = I18N_NOOP("Twice yearly"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 months").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 months").tqarg(mult)); } else if(type == MyMoneySchedule::OCCUR_YEARLY) switch (mult) { case 1: occurenceString = I18N_NOOP("Yearly"); break; case 2: occurenceString = I18N_NOOP("Every other year"); break; - default: occurenceString = I18N_NOOP(static_cast<QString>("Every %1 years").arg(mult)); + default: occurenceString = I18N_NOOP(static_cast<TQString>("Every %1 years").tqarg(mult)); } return occurenceString; } -QString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE type) +TQString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE type) { - QString occurenceString = I18N_NOOP("Any"); + TQString occurenceString = I18N_NOOP("Any"); if(type == MyMoneySchedule::OCCUR_ONCE) occurenceString = I18N_NOOP("Once"); @@ -907,9 +907,9 @@ QString MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::occurenceE typ return occurenceString; } -QString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type) +TQString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type) { - QString text; + TQString text; switch (type) { case MyMoneySchedule::TYPE_BILL: @@ -932,9 +932,9 @@ QString MyMoneySchedule::scheduleTypeToString(MyMoneySchedule::typeE type) } -QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType) +TQString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType) { - QString text; + TQString text; switch (paymentType) { case MyMoneySchedule::STYPE_DIRECTDEBIT: @@ -949,7 +949,7 @@ QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE pay case MyMoneySchedule::STYPE_OTHER: text = I18N_NOOP("Other"); break; - case MyMoneySchedule::STYPE_WRITECHEQUE: + case MyMoneySchedule::STYPE_WRITECHETQUE: text = I18N_NOOP("Write check"); break; case MyMoneySchedule::STYPE_STANDINGORDER: @@ -965,9 +965,9 @@ QString MyMoneySchedule::paymentMethodToString(MyMoneySchedule::paymentTypeE pay return text; } -QString MyMoneySchedule::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption) +TQString MyMoneySchedule::weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption) { - QString text; + TQString text; switch (weekendOption) { case MyMoneySchedule::MoveFriday: @@ -995,7 +995,7 @@ int MyMoneySchedule::variation(void) const if(!isFixed()) { rc = 10; #if 0 - QString var = value("kmm-variation"); + TQString var = value("kmm-variation"); if(!var.isEmpty()) rc = var.toInt(); #endif @@ -1008,7 +1008,7 @@ void MyMoneySchedule::setVariation(int var) #if 0 deletePair("kmm-variation"); if(var != 0) - setValue("kmm-variation", QString("%1").arg(var)); + setValue("kmm-variation", TQString("%1").tqarg(var)); #endif } @@ -1049,7 +1049,7 @@ int MyMoneySchedule::eventsPerYear(MyMoneySchedule::occurenceE occurence) rc = 6; break; case MyMoneySchedule::OCCUR_EVERYTHREEMONTHS: - case MyMoneySchedule::OCCUR_QUARTERLY: + case MyMoneySchedule::OCCUR_TQUARTERLY: rc = 4; break; case MyMoneySchedule::OCCUR_EVERYFOURMONTHS: @@ -1107,7 +1107,7 @@ int MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::occurenceE occurence) rc = 60; break; case MyMoneySchedule::OCCUR_EVERYTHREEMONTHS: - case MyMoneySchedule::OCCUR_QUARTERLY: + case MyMoneySchedule::OCCUR_TQUARTERLY: rc = 90; break; case MyMoneySchedule::OCCUR_EVERYFOURMONTHS: @@ -1126,9 +1126,9 @@ int MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::occurenceE occurence) return rc; } -QDate MyMoneySchedule::addHalfMonths( QDate date, int mult ) const +TQDate MyMoneySchedule::addHalfMonths( TQDate date, int mult ) const { - QDate newdate = date; + TQDate newdate = date; int d, dm; if ( mult > 0 ) { @@ -1184,10 +1184,10 @@ QDate MyMoneySchedule::addHalfMonths( QDate date, int mult ) const return newdate; } -MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const QString& text) +MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const TQString& text) { MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY; - QString tmp = text.lower(); + TQString tmp = text.lower(); if(tmp == i18n("Once").lower()) occurence = MyMoneySchedule::OCCUR_ONCE; @@ -1216,7 +1216,7 @@ MyMoneySchedule::occurenceE MyMoneySchedule::stringToOccurence(const QString& te else if(tmp == i18n("Every three months").lower()) occurence = MyMoneySchedule::OCCUR_EVERYTHREEMONTHS; else if(tmp == i18n("Quarterly").lower()) - occurence = MyMoneySchedule::OCCUR_QUARTERLY; + occurence = MyMoneySchedule::OCCUR_TQUARTERLY; else if(tmp == i18n("Every four months").lower()) occurence = MyMoneySchedule::OCCUR_EVERYFOURMONTHS; else if(tmp == i18n("Twice yearly").lower()) @@ -1279,7 +1279,7 @@ void MyMoneySchedule::simpleToCompoundOccurence(int& multiplier,occurenceE& occu newMulti = 2; } else if(occurence == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS || - occurence == MyMoneySchedule::OCCUR_QUARTERLY ) + occurence == MyMoneySchedule::OCCUR_TQUARTERLY ) { newOcc = MyMoneySchedule::OCCUR_MONTHLY; newMulti = 3; diff --git a/kmymoney2/mymoney/mymoneyscheduled.h b/kmymoney2/mymoney/mymoneyscheduled.h index 46303b2..cc92b1d 100644 --- a/kmymoney2/mymoney/mymoneyscheduled.h +++ b/kmymoney2/mymoney/mymoneyscheduled.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> -#include <qmap.h> -#include <qdatetime.h> +#include <tqstringlist.h> +#include <tqmap.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- @@ -68,7 +68,7 @@ public: OCCUR_MONTHLY=32, OCCUR_EVERYFOURWEEKS=64, OCCUR_EVERYEIGHTWEEKS=126, OCCUR_EVERYOTHERMONTH=128, OCCUR_EVERYTHREEMONTHS=256, - OCCUR_TWICEYEARLY=1024, OCCUR_EVERYOTHERYEAR=2048, OCCUR_QUARTERLY=4096, + OCCUR_TWICEYEARLY=1024, OCCUR_EVERYOTHERYEAR=2048, OCCUR_TQUARTERLY=4096, OCCUR_EVERYFOURMONTHS=8192, OCCUR_YEARLY=16384 }; @@ -82,7 +82,7 @@ public: */ enum paymentTypeE { STYPE_ANY=0, STYPE_DIRECTDEBIT=1, STYPE_DIRECTDEPOSIT=2, STYPE_MANUALDEPOSIT=4, STYPE_OTHER=8, - STYPE_WRITECHEQUE=16, + STYPE_WRITECHETQUE=16, STYPE_STANDINGORDER=32, STYPE_BANKTRANSFER=64 }; @@ -105,14 +105,14 @@ public: * Please note that the optional fields are not set and the transaction * MUST be set before it can be used. * - * @a startDate is not used anymore and internally set to QDate() + * @a startDate is not used anymore and internally set to TQDate() */ - MyMoneySchedule(const QString& name, typeE type, occurenceE occurence, int occurenceMultiplier, - paymentTypeE paymentType, const QDate& startDate, const QDate& endDate, bool fixed, bool autoEnter); + MyMoneySchedule(const TQString& name, typeE type, occurenceE occurence, int occurenceMultiplier, + paymentTypeE paymentType, const TQDate& startDate, const TQDate& endDate, bool fixed, bool autoEnter); - MyMoneySchedule(const QDomElement& node); + MyMoneySchedule(const TQDomElement& node); - MyMoneySchedule(const QString& id, const MyMoneySchedule& right); + MyMoneySchedule(const TQString& id, const MyMoneySchedule& right); /** * Standard destructor @@ -155,9 +155,9 @@ public: * execution is returned. Otherwise, the next due date is * returned. * - * @return reference to QDate containing the start date. + * @return reference to TQDate containing the start date. */ - const QDate& startDate(void) const; + const TQDate& startDate(void) const; /** * Simple get method that returns the schedule paymentType. @@ -191,9 +191,9 @@ public: /** * Simple get method that returns the schedule end date. * - * @return QDate The end date for the instance. + * @return TQDate The end date for the instance. */ - const QDate& endDate(void) const { return m_endDate; } + const TQDate& endDate(void) const { return m_endDate; } /** * Simple get method that returns true if the transaction should be @@ -212,43 +212,43 @@ public: /** * Simple method that returns the schedules last payment. If the - * schedule has never been executed, QDate() will be returned. + * schedule has never been executed, TQDate() will be returned. * - * @return QDate The last payment for the schedule. + * @return TQDate The last payment for the schedule. */ - const QDate& lastPayment(void) const { return m_lastPayment; } + const TQDate& lastPayment(void) const { return m_lastPayment; } /** * Simple method that returns the next due date for the schedule. * - * @return reference to QDate containing the next due date. + * @return reference to TQDate containing the next due date. * * @note The date returned can represent a value that is past * a possible end of the schedule. Make sure to consider * the return value of isFinished() when using the value returned. */ - const QDate& nextDueDate(void) const; + const TQDate& nextDueDate(void) const; /** * This method adjusts returns the next due date adjusted * according to the rules specified by the schedule's weekend option. * - * @return QDate containing the adjusted next due date. If the + * @return TQDate containing the adjusted next due date. If the * schedule is finished (@sa isFinished()) then the method - * returns an invalid QDate. + * returns an invalid TQDate. * * @sa weekendOption() * @sa adjustedDate() */ - QDate adjustedNextDueDate(void) const; + TQDate adjustedNextDueDate(void) const; /** * This method adjusts returns the date adjusted according to the * rules specified by the schedule's weekend option. * - * @return QDate containing the adjusted date. + * @return TQDate containing the adjusted date. */ - QDate adjustedDate(QDate date, weekendOptionE option) const; + TQDate adjustedDate(TQDate date, weekendOptionE option) const; /** * Get the weekendOption that determines how the schedule check code @@ -296,7 +296,7 @@ public: * @param date The new start date. * @return none */ - void setStartDate(const QDate& date); + void setStartDate(const TQDate& date); /** * Simple method that sets the payment type for the schedule. @@ -330,7 +330,7 @@ public: * @param date The new end date. * @return none */ - void setEndDate(const QDate& date); + void setEndDate(const TQDate& date); /** * Simple set method to set whether this transaction should be automatically @@ -348,7 +348,7 @@ public: * @param date The next payment date. * @return none */ - void setNextDueDate(const QDate& date); + void setNextDueDate(const TQDate& date); /** * Simple set method to set the schedule's last payment. If @@ -360,7 +360,7 @@ public: * @param date The last payment date. * @return none */ - void setLastPayment(const QDate& date); + void setLastPayment(const TQDate& date); /** * Set the weekendOption that determines how the schedule check code @@ -404,12 +404,12 @@ public: * @param refDate The reference date from which the next payment * date will be calculated (defaults to current date) * - * @return QDate The adjusted date the next payment is due. This date is + * @return TQDate The adjusted date the next payment is due. This date is * always past @a refDate. In case of an error or if there - * are no more payments then an empty/invalid QDate() will + * are no more payments then an empty/invalid TQDate() will * be returned. */ - QDate adjustedNextPayment(const QDate& refDate = QDate::currentDate()) const; + TQDate adjustedNextPayment(const TQDate& refDate = TQDate::tqcurrentDate()) const; /** * Calculates the date of the next payment. @@ -417,12 +417,12 @@ public: * @param refDate The reference date from which the next payment * date will be calculated (defaults to current date) * - * @return QDate The date the next payment is due. This date is + * @return TQDate The date the next payment is due. This date is * always past @a refDate. In case of an error or - * if there is no more payments then an empty/invalid QDate() + * if there is no more payments then an empty/invalid TQDate() * will be returned. */ - QDate nextPayment(const QDate& refDate = QDate::currentDate()) const; + TQDate nextPayment(const TQDate& refDate = TQDate::tqcurrentDate()) const; /** * Calculates the dates of the payment over a certain period of time. @@ -431,16 +431,16 @@ public: * * @param startDate The start date for the range calculations * @param endDate The end date for the range calculations. - * @return QValueList<QDate> The dates on which the payments are due. + * @return TQValueList<TQDate> The dates on which the payments are due. */ - QValueList<QDate> paymentDates(const QDate& startDate, const QDate& endDate) const; + TQValueList<TQDate> paymentDates(const TQDate& startDate, const TQDate& endDate) const; /** * Returns the instances name * * @return The name */ - const QString& name(void) const { return m_name; } + const TQString& name(void) const { return m_name; } /** * Changes the instance name @@ -448,7 +448,7 @@ public: * @param nm The new name * @return none */ - void setName(const QString& nm); + void setName(const TQString& nm); bool operator ==(const MyMoneySchedule& right) const; bool operator !=(const MyMoneySchedule& right) const { return ! operator==(right); } @@ -457,15 +457,15 @@ public: MyMoneyAccount account(int cnt = 1) const; MyMoneyAccount transferAccount(void) const { return account(2); }; - QDate dateAfter(int transactions) const; + TQDate dateAfter(int transactions) const; bool isOverdue() const; bool isFinished() const; - bool hasRecordedPayment(const QDate&) const; - void recordPayment(const QDate&); - QValueList<QDate> recordedPayments(void) const { return m_recordedPayments; } + bool hasRecordedPayment(const TQDate&) const; + void recordPayment(const TQDate&); + TQValueList<TQDate> recordedPayments(void) const { return m_recordedPayments; } - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -476,14 +476,14 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; /** * Returns the human-readable format of Schedule's occurence * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - QString occurenceToString() const; + TQString occurenceToString() const; /** * This method is used to convert the occurence type from it's @@ -492,9 +492,9 @@ public: * @param type numerical representation of the MyMoneySchedule * occurence type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurenceToString(occurenceE type); + static TQString occurenceToString(occurenceE type); /** * This method is used to convert a multiplier and base occurence type @@ -505,9 +505,9 @@ public: * @param mult occurence multiplier * @param type occurence period * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurenceToString(int mult, occurenceE type); + static TQString occurenceToString(int mult, occurenceE type); /** * This method is used to convert an occurence period from @@ -516,9 +516,9 @@ public: * @param type numerical representation of the MyMoneySchedule * occurence type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString occurencePeriodToString(occurenceE type); + static TQString occurencePeriodToString(occurenceE type); /** * This method is used to convert the payment type from it's @@ -527,9 +527,9 @@ public: * @param paymentType numerical representation of the MyMoneySchedule * payment type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); + static TQString paymentMethodToString(MyMoneySchedule::paymentTypeE paymentType); /** * This method is used to convert the schedule weekend option from it's @@ -538,9 +538,9 @@ public: * @param weekendOption numerical representation of the MyMoneySchedule * weekend option * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); + static TQString weekendOptionToString(MyMoneySchedule::weekendOptionE weekendOption); /** * This method is used to convert the schedule type from it's @@ -549,9 +549,9 @@ public: * @param type numerical representation of the MyMoneySchedule * schedule type * - * @return QString representing the human readable format + * @return TQString representing the human readable format */ - static QString scheduleTypeToString(MyMoneySchedule::typeE type); + static TQString scheduleTypeToString(MyMoneySchedule::typeE type); int variation(void) const; void setVariation(int var); @@ -600,10 +600,10 @@ public: * This method is used to convert the occurence type from the * human readable form into it's internal representation. * - * @param text reference to QString representing the human readable format + * @param text reference to TQString representing the human readable format * @return numerical representation of the occurence */ - static MyMoneySchedule::occurenceE stringToOccurence(const QString& text); + static MyMoneySchedule::occurenceE stringToOccurence(const TQString& text); private: /** @@ -612,9 +612,9 @@ private: * in m_startDate. It is internally used when calculating * the payment dates over several periods. * - * @param date reference to QDate object to be checked and adjusted + * @param date reference to TQDate object to be checked and adjusted */ - void fixDate(QDate& date) const; + void fixDate(TQDate& date) const; /** * Simple method that sets the transaction for the schedule. @@ -648,9 +648,9 @@ private: * @param date The date * @param mult The number of half months to add. Default is 1. * - * @return QDate date with mult half months added + * @return TQDate date with mult half months added */ - QDate addHalfMonths( QDate date, int mult = 1 ) const; + TQDate addHalfMonths( TQDate date, int mult = 1 ) const; private: /// Its occurence @@ -663,7 +663,7 @@ private: typeE m_type; /// The date the schedule commences - QDate m_startDate; + TQDate m_startDate; /// The payment type paymentTypeE m_paymentType; @@ -675,19 +675,19 @@ private: MyMoneyTransaction m_transaction; /// The last transaction date if the schedule does end at a fixed date - QDate m_endDate; + TQDate m_endDate; /// Enter the transaction into the register automatically bool m_autoEnter; /// Internal date used for calculations - QDate m_lastPayment; + TQDate m_lastPayment; /// The name - QString m_name; + TQString m_name; /// The recorded payments - QValueList<QDate> m_recordedPayments; + TQValueList<TQDate> m_recordedPayments; /// The weekend option weekendOptionE m_weekendOption; diff --git a/kmymoney2/mymoney/mymoneyscheduletest.cpp b/kmymoney2/mymoney/mymoneyscheduletest.cpp index 0a4a380..07b3cc6 100644 --- a/kmymoney2/mymoney/mymoneyscheduletest.cpp +++ b/kmymoney2/mymoney/mymoneyscheduletest.cpp @@ -55,8 +55,8 @@ void MyMoneyScheduleTest::testConstructor() { MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate(), - QDate(), + TQDate::tqcurrentDate(), + TQDate(), true, true); @@ -64,7 +64,7 @@ void MyMoneyScheduleTest::testConstructor() { CPPUNIT_ASSERT(s.occurence() == MyMoneySchedule::OCCUR_WEEKLY); CPPUNIT_ASSERT(s.occurenceMultiplier() == 1 ); CPPUNIT_ASSERT(s.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT); - CPPUNIT_ASSERT(s.startDate() == QDate()); + CPPUNIT_ASSERT(s.startDate() == TQDate()); CPPUNIT_ASSERT(s.willEnd() == false); CPPUNIT_ASSERT(s.isFixed() == true); CPPUNIT_ASSERT(s.autoEnter() == true); @@ -82,8 +82,8 @@ void MyMoneyScheduleTest::testSetFunctions() { s.setType(MyMoneySchedule::TYPE_BILL); CPPUNIT_ASSERT(s.type() == MyMoneySchedule::TYPE_BILL); - s.setEndDate(QDate::currentDate()); - CPPUNIT_ASSERT(s.endDate() == QDate::currentDate()); + s.setEndDate(TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(s.endDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(s.willEnd() == true); } @@ -151,7 +151,7 @@ void MyMoneyScheduleTest::testAddSchedule() MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate(2001, 1, 1), + TQDate(2001, 1, 1), false, true, true); @@ -160,7 +160,7 @@ void MyMoneyScheduleTest::testAddSchedule() MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_MONTHLY, 1, MyMoneySchedule::STYPE_MANUALDEPOSIT, - QDate(2001, 2, 1), + TQDate(2001, 2, 1), false, true, true); @@ -168,8 +168,8 @@ void MyMoneyScheduleTest::testAddSchedule() MyMoneySchedule s3( "s3", MyMoneySchedule::TYPE_TRANSFER, MyMoneySchedule::OCCUR_YEARLY, 1, - MyMoneySchedule::STYPE_WRITECHEQUE, - QDate(2001, 3, 1), + MyMoneySchedule::STYPE_WRITECHETQUE, + TQDate(2001, 3, 1), false, true, true); @@ -216,7 +216,7 @@ void MyMoneyScheduleTest::testAnyScheduled() MyMoneySchedule::STYPE_MANUALDEPOSIT)); CPPUNIT_ASSERT(m->anyScheduled("A000001", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, - MyMoneySchedule::STYPE_WRITECHEQUE)); + MyMoneySchedule::STYPE_WRITECHETQUE)); // Failures CPPUNIT_ASSERT(m->anyScheduled("A000001", MyMoneySchedule::TYPE_BILL, @@ -229,18 +229,18 @@ void MyMoneyScheduleTest::testOverdue() MyMoneySchedule sch_overdue; MyMoneySchedule sch_intime; - // the following checks only work correctly, if currentDate() is + // the following checks only work correctly, if tqcurrentDate() is // between the 1st and 27th. If it is between 28th and 31st // we don't perform them. Note: this should be fixed. - if(QDate::currentDate().day() > 27 || QDate::currentDate().day() == 1) { + if(TQDate::tqcurrentDate().day() > 27 || TQDate::tqcurrentDate().day() == 1) { std::cout << std::endl << "testOverdue() skipped because current day is between 28th and 2nd" << std::endl; return; } - QDate startDate = QDate::currentDate().addDays(-1).addMonths(-23); - QDate lastPaymentDate = QDate::currentDate().addDays(-1).addMonths(-1); + TQDate startDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-23); + TQDate lastPaymentDate = TQDate::tqcurrentDate().addDays(-1).addMonths(-1); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"0\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"8\" endDate=\"\" type=\"5\" id=\"SCH0002\" name=\"A Name\" fixed=\"0\" occurenceMultiplier=\"1\" occurence=\"32\" >\n" @@ -258,16 +258,16 @@ void MyMoneyScheduleTest::testOverdue() " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n"); - QString ref_overdue = ref.arg(startDate.toString(Qt::ISODate)) - .arg(lastPaymentDate.toString(Qt::ISODate)) - .arg(lastPaymentDate.toString(Qt::ISODate)); + TQString ref_overdue = ref.tqarg(startDate.toString(Qt::ISODate)) + .tqarg(lastPaymentDate.toString(Qt::ISODate)) + .tqarg(lastPaymentDate.toString(Qt::ISODate)); - QString ref_intime = ref.arg(startDate.addDays(1).toString(Qt::ISODate)) - .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate)) - .arg(lastPaymentDate.addDays(1).toString(Qt::ISODate)); + TQString ref_intime = ref.tqarg(startDate.addDays(1).toString(Qt::ISODate)) + .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate)) + .tqarg(lastPaymentDate.addDays(1).toString(Qt::ISODate)); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; // std::cout << ref_intime << std::endl; try { @@ -318,7 +318,7 @@ void MyMoneyScheduleTest::testGetSchedule() CPPUNIT_ASSERT(s.occurence() == MyMoneySchedule::OCCUR_MONTHLY); CPPUNIT_ASSERT(s.occurenceMultiplier() == 1); CPPUNIT_ASSERT(s.paymentType() == MyMoneySchedule::STYPE_MANUALDEPOSIT); - CPPUNIT_ASSERT(s.startDate() == QDate(2001, 2, 1)); + CPPUNIT_ASSERT(s.startDate() == TQDate(2001, 2, 1)); CPPUNIT_ASSERT(s.willEnd() == false); CPPUNIT_ASSERT(s.isFixed() == true); CPPUNIT_ASSERT(s.autoEnter() == true); @@ -344,7 +344,7 @@ void MyMoneyScheduleTest::testGetScheduled() try { - QValueList<QString> testList; + TQValueList<TQString> testList; testList = m->getScheduled("A000001"); CPPUNIT_ASSERT(testList.size() == 3); @@ -370,7 +370,7 @@ void MyMoneyScheduleTest::testGetScheduled() CPPUNIT_ASSERT(testList.size() == 1); CPPUNIT_ASSERT(testList[0] == "SCHED00002"); - testList = m->getScheduled("A000001", QDate(2001, 1, 1), QDate(2001, 2, 1)); + testList = m->getScheduled("A000001", TQDate(2001, 1, 1), TQDate(2001, 2, 1)); CPPUNIT_ASSERT(testList.size() == 2); CPPUNIT_ASSERT(testList[0] == "SCHED00001"); CPPUNIT_ASSERT(testList[1] == "SCHED00002"); @@ -392,7 +392,7 @@ void MyMoneyScheduleTest::testGetOverdue() try { - QValueList<QString> testList; + TQValueList<TQString> testList; testList = m->getOverdue("A000001"); CPPUNIT_ASSERT(testList.size() == 3); @@ -433,7 +433,7 @@ void MyMoneyScheduleTest::testNextPayment() */ { MyMoneySchedule sch; - QString future_sched = QString( + TQString future_sched = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" "<SCHEDULED_TX startDate=\"2007-02-17\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH000058\" name=\"Car Tax\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"16384\" >\n" @@ -449,16 +449,16 @@ void MyMoneyScheduleTest::testNextPayment() "</SCHEDULE-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(future_sched); node = doc.documentElement().firstChild().toElement(); try { sch = MyMoneySchedule(node); - CPPUNIT_ASSERT(sch.nextPayment(QDate(2007,2,14)) == QDate(2007,2,17)); - CPPUNIT_ASSERT(sch.nextPayment(QDate(2007,2,17)) == QDate(2008,2,17)); - CPPUNIT_ASSERT(sch.nextPayment(QDate(2007,2,18)) == QDate(2008,2,17)); + CPPUNIT_ASSERT(sch.nextPayment(TQDate(2007,2,14)) == TQDate(2007,2,17)); + CPPUNIT_ASSERT(sch.nextPayment(TQDate(2007,2,17)) == TQDate(2008,2,17)); + CPPUNIT_ASSERT(sch.nextPayment(TQDate(2007,2,18)) == TQDate(2008,2,17)); } catch(MyMoneyException *e) { delete e; @@ -474,9 +474,9 @@ void MyMoneyScheduleTest::testNextPayment() MyMoneySchedule s2 = m->getSchedule("A000001", "SCHED00002"); MyMoneySchedule s3 = m->getSchedule("A000001", "SCHED00003"); - QDate nextPayment1 = s1.nextPayment(); - QDate nextPayment2 = s2.nextPayment(); - QDate nextPayment3 = s3.nextPayment(); + TQDate nextPayment1 = s1.nextPayment(); + TQDate nextPayment2 = s2.nextPayment(); + TQDate nextPayment3 = s3.nextPayment(); CPPUNIT_ASSERT(nextPayment1.year() != 1900); CPPUNIT_ASSERT(nextPayment2.year() != 1900); @@ -494,148 +494,148 @@ void MyMoneyScheduleTest::testAddHalfMonths() // addHalfMonths is private // Test a Schedule with occurence OCCUR_EVERYHALFMONTH using nextPayment MyMoneySchedule s; - s.setStartDate(QDate(2007, 1, 1)); + s.setStartDate(TQDate(2007, 1, 1)); s.setOccurence(MyMoneySchedule::OCCUR_EVERYHALFMONTH); s.setNextDueDate(s.startDate()); s.setLastPayment(s.startDate()); - QString format("yyyy-MM-dd"); + TQString format("yyyy-MM-dd"); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-16" ); - s.setNextDueDate(QDate(2007, 1, 2)); + s.setNextDueDate(TQDate(2007, 1, 2)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-17" ); - s.setNextDueDate(QDate(2007, 1, 3)); + s.setNextDueDate(TQDate(2007, 1, 3)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-18" ); - s.setNextDueDate(QDate(2007, 1, 4)); + s.setNextDueDate(TQDate(2007, 1, 4)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-19" ); - s.setNextDueDate(QDate(2007, 1, 5)); + s.setNextDueDate(TQDate(2007, 1, 5)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-20" ); - s.setNextDueDate(QDate(2007, 1, 6)); + s.setNextDueDate(TQDate(2007, 1, 6)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-21" ); - s.setNextDueDate(QDate(2007, 1, 7)); + s.setNextDueDate(TQDate(2007, 1, 7)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-22" ); - s.setNextDueDate(QDate(2007, 1, 8)); + s.setNextDueDate(TQDate(2007, 1, 8)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-23" ); - s.setNextDueDate(QDate(2007, 1, 9)); + s.setNextDueDate(TQDate(2007, 1, 9)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-24" ); - s.setNextDueDate(QDate(2007, 1, 10)); + s.setNextDueDate(TQDate(2007, 1, 10)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-25" ); - s.setNextDueDate(QDate(2007, 1, 11)); + s.setNextDueDate(TQDate(2007, 1, 11)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-26" ); - s.setNextDueDate(QDate(2007, 1, 12)); + s.setNextDueDate(TQDate(2007, 1, 12)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-27" ); - s.setNextDueDate(QDate(2007, 1, 13)); + s.setNextDueDate(TQDate(2007, 1, 13)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-28" ); - s.setNextDueDate(QDate(2007, 1, 14)); + s.setNextDueDate(TQDate(2007, 1, 14)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-29" ); // 15 -> Last Day - s.setNextDueDate(QDate(2007, 1, 15)); + s.setNextDueDate(TQDate(2007, 1, 15)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-01-31" ); - s.setNextDueDate(QDate(2007, 1, 16)); + s.setNextDueDate(TQDate(2007, 1, 16)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-01" ); - s.setNextDueDate(QDate(2007, 1, 17)); + s.setNextDueDate(TQDate(2007, 1, 17)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-02" ); - s.setNextDueDate(QDate(2007, 1, 18)); + s.setNextDueDate(TQDate(2007, 1, 18)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-03" ); - s.setNextDueDate(QDate(2007, 1, 19)); + s.setNextDueDate(TQDate(2007, 1, 19)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-04" ); - s.setNextDueDate(QDate(2007, 1, 20)); + s.setNextDueDate(TQDate(2007, 1, 20)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-05" ); - s.setNextDueDate(QDate(2007, 1, 21)); + s.setNextDueDate(TQDate(2007, 1, 21)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-06" ); - s.setNextDueDate(QDate(2007, 1, 22)); + s.setNextDueDate(TQDate(2007, 1, 22)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-07" ); - s.setNextDueDate(QDate(2007, 1, 23)); + s.setNextDueDate(TQDate(2007, 1, 23)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-08" ); - s.setNextDueDate(QDate(2007, 1, 24)); + s.setNextDueDate(TQDate(2007, 1, 24)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-09" ); - s.setNextDueDate(QDate(2007, 1, 25)); + s.setNextDueDate(TQDate(2007, 1, 25)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-10" ); - s.setNextDueDate(QDate(2007, 1, 26)); + s.setNextDueDate(TQDate(2007, 1, 26)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-11" ); - s.setNextDueDate(QDate(2007, 1, 27)); + s.setNextDueDate(TQDate(2007, 1, 27)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-12" ); - s.setNextDueDate(QDate(2007, 1, 28)); + s.setNextDueDate(TQDate(2007, 1, 28)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-13" ); - s.setNextDueDate(QDate(2007, 1, 29)); + s.setNextDueDate(TQDate(2007, 1, 29)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-14" ); // 30th,31st -> 15th - s.setNextDueDate(QDate(2007, 1, 30)); + s.setNextDueDate(TQDate(2007, 1, 30)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-15" ); - s.setNextDueDate(QDate(2007, 1, 31)); + s.setNextDueDate(TQDate(2007, 1, 31)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-02-15" ); // 30th (last day) - s.setNextDueDate(QDate(2007, 4, 30)); + s.setNextDueDate(TQDate(2007, 4, 30)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2007-05-15" ); // 28th of February (Last day): to 15th - s.setNextDueDate(QDate(1900, 2, 28)); + s.setNextDueDate(TQDate(1900, 2, 28)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "1900-03-15" ); // 28th of February (Leap year): to 13th - s.setNextDueDate(QDate(2000, 2, 28)); + s.setNextDueDate(TQDate(2000, 2, 28)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2000-03-13" ); // 29th of February (Leap year) - s.setNextDueDate(QDate(2000, 2, 29)); + s.setNextDueDate(TQDate(2000, 2, 29)); CPPUNIT_ASSERT( s.nextPayment(s.nextDueDate()).toString(format) == "2000-03-15" ); // Add multiple transactions - s.setStartDate(QDate(2007, 1, 1)); + s.setStartDate(TQDate(2007, 1, 1)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-01-16" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-01" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-02-16" ); - s.setStartDate(QDate(2007, 1, 12)); + s.setStartDate(TQDate(2007, 1, 12)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-01-27" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-12" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-02-27" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-12" ); - s.setStartDate(QDate(2007, 1, 13)); + s.setStartDate(TQDate(2007, 1, 13)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-01-28" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-13" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-15" ); - s.setStartDate(QDate(2007, 1, 14)); + s.setStartDate(TQDate(2007, 1, 14)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-01-29" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-14" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-15" ); - s.setStartDate(QDate(2007, 1, 15)); + s.setStartDate(TQDate(2007, 1, 15)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-01-31" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-15" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-15" ); - s.setStartDate(QDate(2007, 1, 16)); + s.setStartDate(TQDate(2007, 1, 16)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-01" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-16" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-01" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-16" ); - s.setStartDate(QDate(2007, 1, 27)); + s.setStartDate(TQDate(2007, 1, 27)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-12" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-27" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-12" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-27" ); - s.setStartDate(QDate(2007, 1, 28)); + s.setStartDate(TQDate(2007, 1, 28)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-13" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-15" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-31" ); - s.setStartDate(QDate(2007, 1, 29)); + s.setStartDate(TQDate(2007, 1, 29)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-14" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-15" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-31" ); - s.setStartDate(QDate(2007, 1, 30)); + s.setStartDate(TQDate(2007, 1, 30)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-15" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-15" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-31" ); - s.setStartDate(QDate(2007, 1, 31)); + s.setStartDate(TQDate(2007, 1, 31)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-02-15" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-02-28" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-03-15" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-03-31" ); - s.setStartDate(QDate(2007, 4, 29)); + s.setStartDate(TQDate(2007, 4, 29)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-05-14" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-05-29" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-06-14" ); CPPUNIT_ASSERT( s.dateAfter(5).toString(format) == "2007-06-29" ); - s.setStartDate(QDate(2007, 4, 30)); + s.setStartDate(TQDate(2007, 4, 30)); CPPUNIT_ASSERT( s.dateAfter(2).toString(format) == "2007-05-15" ); CPPUNIT_ASSERT( s.dateAfter(3).toString(format) == "2007-05-31" ); CPPUNIT_ASSERT( s.dateAfter(4).toString(format) == "2007-06-15" ); @@ -645,7 +645,7 @@ void MyMoneyScheduleTest::testAddHalfMonths() void MyMoneyScheduleTest::testPaymentDates() { MyMoneySchedule sch; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" @@ -663,23 +663,23 @@ void MyMoneyScheduleTest::testPaymentDates() "</SCHEDULE-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); - QDate startDate(2006,1,28); - QDate endDate(2006,5,30); + TQDate startDate(2006,1,28); + TQDate endDate(2006,5,30); try { sch = MyMoneySchedule(node); - QDate nextPayment = sch.nextPayment(startDate); - QValueList<QDate> list = sch.paymentDates(nextPayment, endDate); + TQDate nextPayment = sch.nextPayment(startDate); + TQValueList<TQDate> list = sch.paymentDates(nextPayment, endDate); CPPUNIT_ASSERT(list.count() == 3); - CPPUNIT_ASSERT(list[0] == QDate(2006,2,28)); - CPPUNIT_ASSERT(list[1] == QDate(2006,3,31)); + CPPUNIT_ASSERT(list[0] == TQDate(2006,2,28)); + CPPUNIT_ASSERT(list[1] == TQDate(2006,3,31)); // Would fall on a Sunday so gets moved back to 28th. - CPPUNIT_ASSERT(list[2] == QDate(2006,4,28)); + CPPUNIT_ASSERT(list[2] == TQDate(2006,4,28)); // Add tests for each possible occurence. // Check how paymentDates is meant to work @@ -692,7 +692,7 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list[0] == QDate(2009,1,1)); + CPPUNIT_ASSERT(list[0] == TQDate(2009,1,1)); // MyMoneySchedule::OCCUR_DAILY sch.setOccurence(MyMoneySchedule::OCCUR_DAILY); startDate.setYMD(2009,1,1); @@ -701,20 +701,20 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009, 1, 1)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 1, 2)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 1, 1)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 1, 2)); // Would fall on Saturday so gets moved to 2nd. - CPPUNIT_ASSERT(list[2] == QDate(2009, 1, 2)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 1, 2)); // Would fall on Sunday so gets moved to 2nd. - CPPUNIT_ASSERT(list[3] == QDate(2009, 1, 2)); - CPPUNIT_ASSERT(list[4] == QDate(2009, 1, 5)); + CPPUNIT_ASSERT(list[3] == TQDate(2009, 1, 2)); + CPPUNIT_ASSERT(list[4] == TQDate(2009, 1, 5)); // MyMoneySchedule::OCCUR_DAILY with multiplier 2 sch.setOccurenceMultiplier(2); list = sch.paymentDates(startDate.addDays(1),endDate); CPPUNIT_ASSERT(list.count() == 2); // Would fall on Sunday so gets moved to 2nd. - CPPUNIT_ASSERT(list[0] == QDate(2009, 1, 2)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 1, 5)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 1, 2)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 1, 5)); sch.setOccurenceMultiplier(1); // MyMoneySchedule::OCCUR_WEEKLY sch.setOccurence(MyMoneySchedule::OCCUR_WEEKLY); @@ -724,11 +724,11 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009, 1, 6)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 1,13)); - CPPUNIT_ASSERT(list[2] == QDate(2009, 1,20)); - CPPUNIT_ASSERT(list[3] == QDate(2009, 1,27)); - CPPUNIT_ASSERT(list[4] == QDate(2009, 2, 3)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 1, 6)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 1,13)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 1,20)); + CPPUNIT_ASSERT(list[3] == TQDate(2009, 1,27)); + CPPUNIT_ASSERT(list[4] == TQDate(2009, 2, 3)); // MyMoneySchedule::OCCUR_EVERYOTHERWEEK sch.setOccurence(MyMoneySchedule::OCCUR_EVERYOTHERWEEK); startDate.setYMD(2009,2,5); @@ -737,11 +737,11 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009, 2, 5)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 2,19)); - CPPUNIT_ASSERT(list[2] == QDate(2009, 3, 5)); - CPPUNIT_ASSERT(list[3] == QDate(2009, 3,19)); - CPPUNIT_ASSERT(list[4] == QDate(2009, 4, 2)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 2, 5)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 2,19)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 3, 5)); + CPPUNIT_ASSERT(list[3] == TQDate(2009, 3,19)); + CPPUNIT_ASSERT(list[4] == TQDate(2009, 4, 2)); // MyMoneySchedule::OCCUR_FORTNIGHTLY sch.setOccurence(MyMoneySchedule::OCCUR_FORTNIGHTLY); startDate.setYMD(2009,4,4); @@ -753,13 +753,13 @@ void MyMoneyScheduleTest::testPaymentDates() // First one would fall on a Saturday and would get moved // to 3rd which is before start date so is not in list. // Would fall on a Saturday so gets moved to 17th. - CPPUNIT_ASSERT(list[0] == QDate(2009, 4,17)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 4,17)); // Would fall on a Saturday so gets moved to 1st. - CPPUNIT_ASSERT(list[1] == QDate(2009, 5, 1)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 5, 1)); // Would fall on a Saturday so gets moved to 15th. - CPPUNIT_ASSERT(list[2] == QDate(2009, 5,15)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 5,15)); // Would fall on a Saturday so gets moved to 29th. - CPPUNIT_ASSERT(list[3] == QDate(2009, 5,29)); + CPPUNIT_ASSERT(list[3] == TQDate(2009, 5,29)); // MyMoneySchedule::OCCUR_EVERYHALFMONTH sch.setOccurence(MyMoneySchedule::OCCUR_EVERYHALFMONTH); startDate.setYMD(2009,6,1); @@ -768,12 +768,12 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009, 6, 1)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 6,16)); - CPPUNIT_ASSERT(list[2] == QDate(2009, 7, 1)); - CPPUNIT_ASSERT(list[3] == QDate(2009, 7,16)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 6, 1)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 6,16)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 7, 1)); + CPPUNIT_ASSERT(list[3] == TQDate(2009, 7,16)); // Would fall on a Saturday so gets moved to 31st. - CPPUNIT_ASSERT(list[4] == QDate(2009, 7, 31)); + CPPUNIT_ASSERT(list[4] == TQDate(2009, 7, 31)); // MyMoneySchedule::OCCUR_EVERYTHREEWEEKS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYTHREEWEEKS); startDate.setYMD(2009,8,12); @@ -782,11 +782,11 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009, 8,12)); - CPPUNIT_ASSERT(list[1] == QDate(2009, 9, 2)); - CPPUNIT_ASSERT(list[2] == QDate(2009, 9,23)); - CPPUNIT_ASSERT(list[3] == QDate(2009,10,14)); - CPPUNIT_ASSERT(list[4] == QDate(2009,11, 4)); + CPPUNIT_ASSERT(list[0] == TQDate(2009, 8,12)); + CPPUNIT_ASSERT(list[1] == TQDate(2009, 9, 2)); + CPPUNIT_ASSERT(list[2] == TQDate(2009, 9,23)); + CPPUNIT_ASSERT(list[3] == TQDate(2009,10,14)); + CPPUNIT_ASSERT(list[4] == TQDate(2009,11, 4)); // MyMoneySchedule::OCCUR_EVERYFOURWEEKS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYFOURWEEKS); startDate.setYMD(2009,11,13); @@ -795,11 +795,11 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2009,11,13)); - CPPUNIT_ASSERT(list[1] == QDate(2009,12,11)); - CPPUNIT_ASSERT(list[2] == QDate(2010, 1, 8)); - CPPUNIT_ASSERT(list[3] == QDate(2010, 2, 5)); - CPPUNIT_ASSERT(list[4] == QDate(2010, 3, 5)); + CPPUNIT_ASSERT(list[0] == TQDate(2009,11,13)); + CPPUNIT_ASSERT(list[1] == TQDate(2009,12,11)); + CPPUNIT_ASSERT(list[2] == TQDate(2010, 1, 8)); + CPPUNIT_ASSERT(list[3] == TQDate(2010, 2, 5)); + CPPUNIT_ASSERT(list[4] == TQDate(2010, 3, 5)); // MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYTHIRTYDAYS); startDate.setYMD(2010,3,19); @@ -808,13 +808,13 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2010, 3,19)); + CPPUNIT_ASSERT(list[0] == TQDate(2010, 3,19)); // Would fall on a Sunday so gets moved to 16th. - CPPUNIT_ASSERT(list[1] == QDate(2010, 4,16)); - CPPUNIT_ASSERT(list[2] == QDate(2010, 5,18)); - CPPUNIT_ASSERT(list[3] == QDate(2010, 6,17)); + CPPUNIT_ASSERT(list[1] == TQDate(2010, 4,16)); + CPPUNIT_ASSERT(list[2] == TQDate(2010, 5,18)); + CPPUNIT_ASSERT(list[3] == TQDate(2010, 6,17)); // Would fall on a Saturday so gets moved to 16th. - CPPUNIT_ASSERT(list[4] == QDate(2010, 7,16)); + CPPUNIT_ASSERT(list[4] == TQDate(2010, 7,16)); // MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS); startDate.setYMD(2010,7,26); @@ -823,11 +823,11 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2010, 7,26)); - CPPUNIT_ASSERT(list[1] == QDate(2010, 9,20)); - CPPUNIT_ASSERT(list[2] == QDate(2010,11,15)); - CPPUNIT_ASSERT(list[3] == QDate(2011, 1,10)); - CPPUNIT_ASSERT(list[4] == QDate(2011, 3, 7)); + CPPUNIT_ASSERT(list[0] == TQDate(2010, 7,26)); + CPPUNIT_ASSERT(list[1] == TQDate(2010, 9,20)); + CPPUNIT_ASSERT(list[2] == TQDate(2010,11,15)); + CPPUNIT_ASSERT(list[3] == TQDate(2011, 1,10)); + CPPUNIT_ASSERT(list[4] == TQDate(2011, 3, 7)); // MyMoneySchedule::OCCUR_EVERYOTHERMONTH sch.setOccurence(MyMoneySchedule::OCCUR_EVERYOTHERMONTH); startDate.setYMD(2011,3,14); @@ -836,12 +836,12 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2011, 3,14)); + CPPUNIT_ASSERT(list[0] == TQDate(2011, 3,14)); // Would fall on a Saturday so gets moved to 13th. - CPPUNIT_ASSERT(list[1] == QDate(2011, 5,13)); - CPPUNIT_ASSERT(list[2] == QDate(2011, 7,14)); - CPPUNIT_ASSERT(list[3] == QDate(2011, 9,14)); - CPPUNIT_ASSERT(list[4] == QDate(2011,11,14)); + CPPUNIT_ASSERT(list[1] == TQDate(2011, 5,13)); + CPPUNIT_ASSERT(list[2] == TQDate(2011, 7,14)); + CPPUNIT_ASSERT(list[3] == TQDate(2011, 9,14)); + CPPUNIT_ASSERT(list[4] == TQDate(2011,11,14)); // MyMoneySchedule::OCCUR_EVERYTHREEMONTHS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS); startDate.setYMD(2011,11,15); @@ -850,24 +850,24 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2011,11,15)); - CPPUNIT_ASSERT(list[1] == QDate(2012, 2,15)); - CPPUNIT_ASSERT(list[2] == QDate(2012, 5,15)); - CPPUNIT_ASSERT(list[3] == QDate(2012, 8,15)); - CPPUNIT_ASSERT(list[4] == QDate(2012,11,15)); - // MyMoneySchedule::OCCUR_QUARTERLY - sch.setOccurence(MyMoneySchedule::OCCUR_QUARTERLY); + CPPUNIT_ASSERT(list[0] == TQDate(2011,11,15)); + CPPUNIT_ASSERT(list[1] == TQDate(2012, 2,15)); + CPPUNIT_ASSERT(list[2] == TQDate(2012, 5,15)); + CPPUNIT_ASSERT(list[3] == TQDate(2012, 8,15)); + CPPUNIT_ASSERT(list[4] == TQDate(2012,11,15)); + // MyMoneySchedule::OCCUR_TQUARTERLY + sch.setOccurence(MyMoneySchedule::OCCUR_TQUARTERLY); startDate.setYMD(2012,11,20); endDate.setYMD(2013,11,23); sch.setStartDate(startDate); sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2012,11,20)); - CPPUNIT_ASSERT(list[1] == QDate(2013, 2,20)); - CPPUNIT_ASSERT(list[2] == QDate(2013, 5,20)); - CPPUNIT_ASSERT(list[3] == QDate(2013, 8,20)); - CPPUNIT_ASSERT(list[4] == QDate(2013,11,20)); + CPPUNIT_ASSERT(list[0] == TQDate(2012,11,20)); + CPPUNIT_ASSERT(list[1] == TQDate(2013, 2,20)); + CPPUNIT_ASSERT(list[2] == TQDate(2013, 5,20)); + CPPUNIT_ASSERT(list[3] == TQDate(2013, 8,20)); + CPPUNIT_ASSERT(list[4] == TQDate(2013,11,20)); // MyMoneySchedule::OCCUR_EVERYFOURMONTHS sch.setOccurence(MyMoneySchedule::OCCUR_EVERYFOURMONTHS); startDate.setYMD(2013,11,21); @@ -876,12 +876,12 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2013,11,21)); - CPPUNIT_ASSERT(list[1] == QDate(2014, 3,21)); - CPPUNIT_ASSERT(list[2] == QDate(2014, 7,21)); - CPPUNIT_ASSERT(list[3] == QDate(2014,11,21)); + CPPUNIT_ASSERT(list[0] == TQDate(2013,11,21)); + CPPUNIT_ASSERT(list[1] == TQDate(2014, 3,21)); + CPPUNIT_ASSERT(list[2] == TQDate(2014, 7,21)); + CPPUNIT_ASSERT(list[3] == TQDate(2014,11,21)); // Would fall on a Saturday so gets moved to 20th. - CPPUNIT_ASSERT(list[4] == QDate(2015, 3,20)); + CPPUNIT_ASSERT(list[4] == TQDate(2015, 3,20)); // MyMoneySchedule::OCCUR_TWICEYEARLY sch.setOccurence(MyMoneySchedule::OCCUR_TWICEYEARLY); startDate.setYMD(2015, 3,22); @@ -892,10 +892,10 @@ void MyMoneyScheduleTest::testPaymentDates() CPPUNIT_ASSERT(list.count() == 4); // First date would fall on a Sunday which would get moved // to 20th which is before start date so not in list. - CPPUNIT_ASSERT(list[0] == QDate(2015, 9,22)); - CPPUNIT_ASSERT(list[1] == QDate(2016, 3,22)); - CPPUNIT_ASSERT(list[2] == QDate(2016, 9,22)); - CPPUNIT_ASSERT(list[3] == QDate(2017, 3,22)); + CPPUNIT_ASSERT(list[0] == TQDate(2015, 9,22)); + CPPUNIT_ASSERT(list[1] == TQDate(2016, 3,22)); + CPPUNIT_ASSERT(list[2] == TQDate(2016, 9,22)); + CPPUNIT_ASSERT(list[3] == TQDate(2017, 3,22)); // MyMoneySchedule::OCCUR_YEARLY sch.setOccurence(MyMoneySchedule::OCCUR_YEARLY); startDate.setYMD(2017, 3,23); @@ -904,12 +904,12 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2017, 3,23)); - CPPUNIT_ASSERT(list[1] == QDate(2018, 3,23)); + CPPUNIT_ASSERT(list[0] == TQDate(2017, 3,23)); + CPPUNIT_ASSERT(list[1] == TQDate(2018, 3,23)); // Would fall on a Saturday so gets moved to 22nd. - CPPUNIT_ASSERT(list[2] == QDate(2019, 3,22)); - CPPUNIT_ASSERT(list[3] == QDate(2020, 3,23)); - CPPUNIT_ASSERT(list[4] == QDate(2021, 3,23)); + CPPUNIT_ASSERT(list[2] == TQDate(2019, 3,22)); + CPPUNIT_ASSERT(list[3] == TQDate(2020, 3,23)); + CPPUNIT_ASSERT(list[4] == TQDate(2021, 3,23)); // MyMoneySchedule::OCCUR_EVERYOTHERYEAR sch.setOccurence(MyMoneySchedule::OCCUR_EVERYOTHERYEAR); startDate.setYMD(2021, 3,24); @@ -918,12 +918,12 @@ void MyMoneyScheduleTest::testPaymentDates() sch.setNextDueDate(startDate); list = sch.paymentDates(startDate,endDate); CPPUNIT_ASSERT(list.count() == 5); - CPPUNIT_ASSERT(list[0] == QDate(2021, 3,24)); - CPPUNIT_ASSERT(list[1] == QDate(2023, 3,24)); - CPPUNIT_ASSERT(list[2] == QDate(2025, 3,24)); - CPPUNIT_ASSERT(list[3] == QDate(2027, 3,24)); + CPPUNIT_ASSERT(list[0] == TQDate(2021, 3,24)); + CPPUNIT_ASSERT(list[1] == TQDate(2023, 3,24)); + CPPUNIT_ASSERT(list[2] == TQDate(2025, 3,24)); + CPPUNIT_ASSERT(list[3] == TQDate(2027, 3,24)); // Would fall on a Saturday so gets moved to 23rd. - CPPUNIT_ASSERT(list[4] == QDate(2029, 3,23)); + CPPUNIT_ASSERT(list[4] == TQDate(2029, 3,23)); } catch(MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); @@ -938,9 +938,9 @@ void MyMoneyScheduleTest::testPaymentDates() MyMoneySchedule s2 = m->getSchedule("A000001", "SCHED00002"); MyMoneySchedule s3 = m->getSchedule("A000001", "SCHED00003"); - QValueList<QDate> payments1 = s1.paymentDates(QDate(2001, 1, 1), QDate(2001, 2, 1)); - QValueList<QDate> payments2 = s2.paymentDates(QDate(2001, 2, 1), QDate(2001, 6, 1)); - QValueList<QDate> payments3 = s3.paymentDates(QDate(2001, 3, 1), QDate(2005, 3, 1)); + TQValueList<TQDate> payments1 = s1.paymentDates(TQDate(2001, 1, 1), TQDate(2001, 2, 1)); + TQValueList<TQDate> payments2 = s2.paymentDates(TQDate(2001, 2, 1), TQDate(2001, 6, 1)); + TQValueList<TQDate> payments3 = s3.paymentDates(TQDate(2001, 3, 1), TQDate(2005, 3, 1)); CPPUNIT_ASSERT(payments1.size() == 5); CPPUNIT_ASSERT(payments2.size() == 5); @@ -985,7 +985,7 @@ void MyMoneyScheduleTest::testRemoveSchedule() try { - QValueList<QString> testList; + TQValueList<TQString> testList; testList = m->getScheduled("A000001"); CPPUNIT_ASSERT(testList.size() == 3); @@ -1010,18 +1010,18 @@ void MyMoneyScheduleTest::testWriteXML() { MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 123, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate::currentDate(), - QDate(), + TQDate::tqcurrentDate(), + TQDate(), true, true); - sch.setLastPayment(QDate::currentDate()); - sch.recordPayment(QDate::currentDate()); + sch.setLastPayment(TQDate::tqcurrentDate()); + sch.recordPayment(TQDate::tqcurrentDate()); sch.setId("SCH0001"); MyMoneyTransaction t; - t.setPostDate(QDate(2001,12,28)); - t.setEntryDate(QDate(2003,9,29)); + t.setPostDate(TQDate(2001,12,28)); + t.setEntryDate(TQDate(2003,9,29)); t.setId("T000000000000000001"); t.setMemo("Wohnung:Miete"); t.setCommodity("EUR"); @@ -1047,12 +1047,12 @@ void MyMoneyScheduleTest::testWriteXML() { sch.setTransaction(t); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("SCHEDULE-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("SCHEDULE-CONTAINER"); doc.appendChild(el); sch.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH0001\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"123\" occurence=\"4\" >\n" @@ -1070,9 +1070,9 @@ void MyMoneyScheduleTest::testWriteXML() { " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); CPPUNIT_ASSERT(doc.toString() == ref); } @@ -1080,7 +1080,7 @@ void MyMoneyScheduleTest::testWriteXML() { void MyMoneyScheduleTest::testReadXML() { MyMoneySchedule sch; - QString ref_ok1 = QString( + TQString ref_ok1 = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH0002\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"4\" >\n" @@ -1098,13 +1098,13 @@ void MyMoneyScheduleTest::testReadXML() { " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); // diff to ref_ok1 is that we now have an empty entrydate // in the transaction parameters - QString ref_ok2 = QString( + TQString ref_ok2 = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH0002\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"4\" >\n" @@ -1122,11 +1122,11 @@ void MyMoneyScheduleTest::testReadXML() { " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULE startDate=\"%1\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH0002\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"4\" >\n" @@ -1144,12 +1144,12 @@ void MyMoneyScheduleTest::testReadXML() { " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -1167,13 +1167,13 @@ void MyMoneyScheduleTest::testReadXML() { try { sch = MyMoneySchedule(node); CPPUNIT_ASSERT(sch.id() == "SCH0002"); - CPPUNIT_ASSERT(sch.nextDueDate() == QDate::currentDate().addDays(7)); - CPPUNIT_ASSERT(sch.startDate() == QDate::currentDate()); - CPPUNIT_ASSERT(sch.endDate() == QDate()); + CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7)); + CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(sch.endDate() == TQDate()); CPPUNIT_ASSERT(sch.autoEnter() == true); CPPUNIT_ASSERT(sch.isFixed() == true); CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing); - CPPUNIT_ASSERT(sch.lastPayment() == QDate::currentDate()); + CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT); CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL); CPPUNIT_ASSERT(sch.name() == "A Name"); @@ -1181,7 +1181,7 @@ void MyMoneyScheduleTest::testReadXML() { CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1); CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7)); CPPUNIT_ASSERT(sch.recordedPayments().count() == 1); - CPPUNIT_ASSERT(sch.recordedPayments()[0] == QDate::currentDate()); + CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate()); } catch(MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); @@ -1194,13 +1194,13 @@ void MyMoneyScheduleTest::testReadXML() { try { sch = MyMoneySchedule(node); CPPUNIT_ASSERT(sch.id() == "SCH0002"); - CPPUNIT_ASSERT(sch.nextDueDate() == QDate::currentDate().addDays(7)); - CPPUNIT_ASSERT(sch.startDate() == QDate::currentDate()); - CPPUNIT_ASSERT(sch.endDate() == QDate()); + CPPUNIT_ASSERT(sch.nextDueDate() == TQDate::tqcurrentDate().addDays(7)); + CPPUNIT_ASSERT(sch.startDate() == TQDate::tqcurrentDate()); + CPPUNIT_ASSERT(sch.endDate() == TQDate()); CPPUNIT_ASSERT(sch.autoEnter() == true); CPPUNIT_ASSERT(sch.isFixed() == true); CPPUNIT_ASSERT(sch.weekendOption() == MyMoneySchedule::MoveNothing); - CPPUNIT_ASSERT(sch.lastPayment() == QDate::currentDate()); + CPPUNIT_ASSERT(sch.lastPayment() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(sch.paymentType() == MyMoneySchedule::STYPE_DIRECTDEBIT); CPPUNIT_ASSERT(sch.type() == MyMoneySchedule::TYPE_BILL); CPPUNIT_ASSERT(sch.name() == "A Name"); @@ -1208,7 +1208,7 @@ void MyMoneyScheduleTest::testReadXML() { CPPUNIT_ASSERT(sch.occurenceMultiplier() == 1); CPPUNIT_ASSERT(sch.nextDueDate() == sch.lastPayment().addDays(7)); CPPUNIT_ASSERT(sch.recordedPayments().count() == 1); - CPPUNIT_ASSERT(sch.recordedPayments()[0] == QDate::currentDate()); + CPPUNIT_ASSERT(sch.recordedPayments()[0] == TQDate::tqcurrentDate()); } catch(MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); @@ -1218,7 +1218,7 @@ void MyMoneyScheduleTest::testReadXML() { void MyMoneyScheduleTest::testHasReferenceTo() { MyMoneySchedule sch; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"1\" weekendOption=\"2\" lastPayment=\"%2\" paymentType=\"1\" endDate=\"\" type=\"1\" id=\"SCH0002\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"4\" >\n" @@ -1236,12 +1236,12 @@ void MyMoneyScheduleTest::testHasReferenceTo() " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)) - .arg(QDate::currentDate().toString(Qt::ISODate)); + ).tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)) + .tqarg(TQDate::tqcurrentDate().toString(Qt::ISODate)); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); @@ -1263,7 +1263,7 @@ void MyMoneyScheduleTest::testAdjustedNextDueDate() { MyMoneySchedule s; - QDate dueDate(2007,9,3); // start on a monday + TQDate dueDate(2007,9,3); // start on a monday for(int i = 0; i < 7; ++i) { s.setNextDueDate(dueDate); s.setWeekendOption(MyMoneySchedule::MoveNothing); @@ -1274,7 +1274,7 @@ void MyMoneyScheduleTest::testAdjustedNextDueDate() case 5: // saturday case 6: // sunday break; - CPPUNIT_ASSERT(s.adjustedNextDueDate() == QDate(2007,9,7)); + CPPUNIT_ASSERT(s.adjustedNextDueDate() == TQDate(2007,9,7)); default: CPPUNIT_ASSERT(s.adjustedNextDueDate() == dueDate); break; @@ -1284,7 +1284,7 @@ void MyMoneyScheduleTest::testAdjustedNextDueDate() switch(i) { case 5: // saturday case 6: // sunday - CPPUNIT_ASSERT(s.adjustedNextDueDate() == QDate(2007,9,10)); + CPPUNIT_ASSERT(s.adjustedNextDueDate() == TQDate(2007,9,10)); break; default: CPPUNIT_ASSERT(s.adjustedNextDueDate() == dueDate); @@ -1297,30 +1297,30 @@ void MyMoneyScheduleTest::testAdjustedNextDueDate() void MyMoneyScheduleTest::testModifyNextDueDate(void) { MyMoneySchedule s; - s.setStartDate(QDate(2007, 1, 1)); + s.setStartDate(TQDate(2007, 1, 1)); s.setOccurence(MyMoneySchedule::OCCUR_MONTHLY); s.setNextDueDate(s.startDate().addMonths(1)); s.setLastPayment(s.startDate()); - QValueList<QDate> dates; - dates = s.paymentDates(QDate(2007,2,1), QDate(2007,2,1)); - CPPUNIT_ASSERT(s.nextDueDate() == QDate(2007,2,1)); + TQValueList<TQDate> dates; + dates = s.paymentDates(TQDate(2007,2,1), TQDate(2007,2,1)); + CPPUNIT_ASSERT(s.nextDueDate() == TQDate(2007,2,1)); CPPUNIT_ASSERT(dates.count() == 1); - CPPUNIT_ASSERT(dates[0] == QDate(2007,2,1)); + CPPUNIT_ASSERT(dates[0] == TQDate(2007,2,1)); - s.setNextDueDate(QDate(2007,1,24)); + s.setNextDueDate(TQDate(2007,1,24)); - dates = s.paymentDates(QDate(2007,2,1), QDate(2007,2,1)); - CPPUNIT_ASSERT(s.nextDueDate() == QDate(2007,1,24)); + dates = s.paymentDates(TQDate(2007,2,1), TQDate(2007,2,1)); + CPPUNIT_ASSERT(s.nextDueDate() == TQDate(2007,1,24)); CPPUNIT_ASSERT(dates.count() == 0); - dates = s.paymentDates(QDate(2007,1,24), QDate(2007,1,24)); + dates = s.paymentDates(TQDate(2007,1,24), TQDate(2007,1,24)); CPPUNIT_ASSERT(dates.count() == 1); - dates = s.paymentDates(QDate(2007,1,24), QDate(2007,2,24)); + dates = s.paymentDates(TQDate(2007,1,24), TQDate(2007,2,24)); CPPUNIT_ASSERT(dates.count() == 2); - CPPUNIT_ASSERT(dates[0] == QDate(2007,1,24)); - CPPUNIT_ASSERT(dates[1] == QDate(2007,2,24)); + CPPUNIT_ASSERT(dates[0] == TQDate(2007,1,24)); + CPPUNIT_ASSERT(dates[1] == TQDate(2007,2,24)); } @@ -1339,7 +1339,7 @@ void MyMoneyScheduleTest::testDaysBetweenEvents() CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS) == 56); CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_EVERYOTHERMONTH) == 60); CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) == 90); - CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_QUARTERLY) == 90); + CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_TQUARTERLY) == 90); CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_EVERYFOURMONTHS) == 120); CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_TWICEYEARLY) == 180); CPPUNIT_ASSERT(MyMoneySchedule::daysBetweenEvents(MyMoneySchedule::OCCUR_YEARLY) == 360); @@ -1349,7 +1349,7 @@ void MyMoneyScheduleTest::testDaysBetweenEvents() void MyMoneyScheduleTest::testStringToOccurence() { // For each occurenceE: - // test MyMoneySchedule::stringToOccurence(QString) == occurence + // test MyMoneySchedule::stringToOccurence(TQString) == occurence CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Once")) == MyMoneySchedule::OCCUR_ONCE ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Daily")) == MyMoneySchedule::OCCUR_DAILY ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Weekly")) == MyMoneySchedule::OCCUR_WEEKLY ); @@ -1361,7 +1361,7 @@ void MyMoneyScheduleTest::testStringToOccurence() CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Every eight weeks")) == MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Every two months")) == MyMoneySchedule::OCCUR_EVERYOTHERMONTH ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Every three months")) == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS ); - CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Quarterly")) == MyMoneySchedule::OCCUR_QUARTERLY ); + CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Quarterly")) == MyMoneySchedule::OCCUR_TQUARTERLY ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Every four months")) == MyMoneySchedule::OCCUR_EVERYFOURMONTHS ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Twice yearly")) == MyMoneySchedule::OCCUR_TWICEYEARLY ); CPPUNIT_ASSERT( MyMoneySchedule::stringToOccurence(i18n("Yearly")) == MyMoneySchedule::OCCUR_YEARLY ); @@ -1382,7 +1382,7 @@ void MyMoneyScheduleTest::testStringToOccurence() CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS))) ); CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYOTHERMONTH == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH))) ); CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYTHREEMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS))) ); - CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_QUARTERLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY))) ); + CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_TQUARTERLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TQUARTERLY))) ); CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_EVERYFOURMONTHS == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS))) ); CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_TWICEYEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY))) ); CPPUNIT_ASSERT( MyMoneySchedule::OCCUR_YEARLY == MyMoneySchedule::stringToOccurence(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY))) ); @@ -1403,7 +1403,7 @@ void MyMoneyScheduleTest::testEventsPerYear() CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS) == 6); CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_EVERYOTHERMONTH) == 6); CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) == 4); - CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_QUARTERLY) == 4); + CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_TQUARTERLY) == 4); CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_EVERYFOURMONTHS) == 3); CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_TWICEYEARLY) == 2); CPPUNIT_ASSERT(MyMoneySchedule::eventsPerYear(MyMoneySchedule::OCCUR_YEARLY) == 1); @@ -1426,14 +1426,14 @@ void MyMoneyScheduleTest::testOccurenceToString() CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS) == "Every eight weeks" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH) == "Every two months" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) == "Every three months" ); - CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_QUARTERLY) == "Quarterly" ); + CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TQUARTERLY) == "Quarterly" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS) == "Every four months" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY) == "Twice yearly" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY) == "Yearly" ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR) == "Every other year" ); // For each occurenceE set occurence and compare occurenceToString() with oTS(occurence()) MyMoneySchedule s; - s.setStartDate(QDate(2007, 1, 1)); + s.setStartDate(TQDate(2007, 1, 1)); s.setNextDueDate(s.startDate()); s.setLastPayment(s.startDate()); s.setOccurence(MyMoneySchedule::OCCUR_ONCE); CPPUNIT_ASSERT(s.occurenceToString() == "Once" ); @@ -1451,7 +1451,7 @@ void MyMoneyScheduleTest::testOccurenceToString() s.setOccurence(MyMoneySchedule::OCCUR_EVERYOTHERMONTH); CPPUNIT_ASSERT(s.occurenceToString() == "Every two months" ); s.setOccurence(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS); CPPUNIT_ASSERT(s.occurenceToString() == "Every three months" ); // Quarterly no longer used. Every three months used instead - s.setOccurence(MyMoneySchedule::OCCUR_QUARTERLY); CPPUNIT_ASSERT(s.occurenceToString() == "Every three months" ); + s.setOccurence(MyMoneySchedule::OCCUR_TQUARTERLY); CPPUNIT_ASSERT(s.occurenceToString() == "Every three months" ); s.setOccurence(MyMoneySchedule::OCCUR_EVERYFOURMONTHS); CPPUNIT_ASSERT(s.occurenceToString() == "Every four months" ); s.setOccurence(MyMoneySchedule::OCCUR_TWICEYEARLY); CPPUNIT_ASSERT(s.occurenceToString() == "Twice yearly" ); s.setOccurence(MyMoneySchedule::OCCUR_YEARLY); CPPUNIT_ASSERT(s.occurenceToString() == "Yearly" ); @@ -1471,7 +1471,7 @@ void MyMoneyScheduleTest::testOccurenceToString() CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS) == MyMoneySchedule::occurenceToString(8,MyMoneySchedule::OCCUR_WEEKLY) ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH) == MyMoneySchedule::occurenceToString(2,MyMoneySchedule::OCCUR_MONTHLY) ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) == MyMoneySchedule::occurenceToString(3,MyMoneySchedule::OCCUR_MONTHLY) ); - // OCCUR_QUARTERLY will no longer be used: only Every Three Months + // OCCUR_TQUARTERLY will no longer be used: only Every Three Months CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS) == MyMoneySchedule::occurenceToString(4,MyMoneySchedule::OCCUR_MONTHLY) ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_TWICEYEARLY) == MyMoneySchedule::occurenceToString(6,MyMoneySchedule::OCCUR_MONTHLY) ); CPPUNIT_ASSERT(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_YEARLY) == MyMoneySchedule::occurenceToString(1,MyMoneySchedule::OCCUR_YEARLY) ); @@ -1545,7 +1545,7 @@ void MyMoneyScheduleTest::testOccurencePeriodToString() CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYEIGHTWEEKS) == "Any" ); CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYOTHERMONTH) == "Any" ); CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYTHREEMONTHS) == "Any" ); - CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_QUARTERLY) == "Any" ); + CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_TQUARTERLY) == "Any" ); CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYFOURMONTHS) == "Any" ); CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_TWICEYEARLY) == "Any" ); CPPUNIT_ASSERT(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_EVERYOTHERYEAR) == "Any" ); @@ -1561,7 +1561,7 @@ void MyMoneyScheduleTest::testOccurencePeriod() // Once occurence() and setOccurence() are converting between compound and simple occurences // we need to change the occurence() check and add an occurenceMultiplier() check MyMoneySchedule s; - s.setStartDate(QDate(2007, 1, 1)); + s.setStartDate(TQDate(2007, 1, 1)); s.setNextDueDate(s.startDate()); s.setLastPayment(s.startDate()); // Set all base occurences @@ -1730,7 +1730,7 @@ void MyMoneyScheduleTest::testOccurencePeriod() CPPUNIT_ASSERT(s.occurencePeriod() == MyMoneySchedule::OCCUR_MONTHLY); CPPUNIT_ASSERT(s.occurenceMultiplier() == 3); // Quarterly no longer used. Every three months used instead - s.setOccurence(MyMoneySchedule::OCCUR_QUARTERLY); + s.setOccurence(MyMoneySchedule::OCCUR_TQUARTERLY); CPPUNIT_ASSERT(s.occurence() == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS); CPPUNIT_ASSERT(s.occurencePeriod() == MyMoneySchedule::OCCUR_MONTHLY); CPPUNIT_ASSERT(s.occurenceMultiplier() == 3); @@ -1798,7 +1798,7 @@ void MyMoneyScheduleTest::testSimpleToFromCompoundOccurence() occ = MyMoneySchedule::OCCUR_EVERYTHREEMONTHS; mult = 1; MyMoneySchedule::simpleToCompoundOccurence(mult, occ); CPPUNIT_ASSERT( occ == MyMoneySchedule::OCCUR_MONTHLY && mult == 3 ); - occ = MyMoneySchedule::OCCUR_QUARTERLY; mult = 1; + occ = MyMoneySchedule::OCCUR_TQUARTERLY; mult = 1; MyMoneySchedule::simpleToCompoundOccurence(mult, occ); CPPUNIT_ASSERT( occ == MyMoneySchedule::OCCUR_MONTHLY && mult == 3 ); occ = MyMoneySchedule::OCCUR_EVERYFOURMONTHS; mult = 1; @@ -1851,7 +1851,7 @@ void MyMoneyScheduleTest::testSimpleToFromCompoundOccurence() occ = MyMoneySchedule::OCCUR_MONTHLY; mult = 3; MyMoneySchedule::compoundToSimpleOccurence(mult, occ); CPPUNIT_ASSERT( occ == MyMoneySchedule::OCCUR_EVERYTHREEMONTHS && mult == 1 ); - // MyMoneySchedule::OCCUR_QUARTERLY not converted back + // MyMoneySchedule::OCCUR_TQUARTERLY not converted back occ = MyMoneySchedule::OCCUR_MONTHLY; mult = 4; MyMoneySchedule::compoundToSimpleOccurence(mult, occ); CPPUNIT_ASSERT( occ == MyMoneySchedule::OCCUR_EVERYFOURMONTHS && mult == 1 ); @@ -1872,9 +1872,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime() // https://bugs.kde.org/show_bug.cgi?id=231029 MyMoneySchedule sch; - QDate paymentInFuture = QDate::currentDate().addDays(7); + TQDate paymentInFuture = TQDate::tqcurrentDate().addDays(7); - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<SCHEDULE-CONTAINER>\n" " <SCHEDULED_TX startDate=\"%1\" autoEnter=\"0\" weekendOption=\"1\" lastPayment=\"%2\" paymentType=\"2\" endDate=\"%3\" type=\"4\" id=\"SCH0042\" name=\"A Name\" fixed=\"1\" occurenceMultiplier=\"1\" occurence=\"32\" >\n" @@ -1887,12 +1887,12 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime() " </TRANSACTION>\n" " </SCHEDULED_TX>\n" "</SCHEDULE-CONTAINER>\n" - ).arg(paymentInFuture.toString(Qt::ISODate)) - .arg(paymentInFuture.toString(Qt::ISODate)) - .arg(paymentInFuture.toString(Qt::ISODate)); + ).tqarg(paymentInFuture.toString(Qt::ISODate)) + .tqarg(paymentInFuture.toString(Qt::ISODate)) + .tqarg(paymentInFuture.toString(Qt::ISODate)); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); @@ -1900,7 +1900,7 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime() sch = MyMoneySchedule(node); CPPUNIT_ASSERT(sch.isFinished() == true); CPPUNIT_ASSERT(sch.occurencePeriod() == MyMoneySchedule::OCCUR_MONTHLY); - CPPUNIT_ASSERT(sch.paymentDates(QDate::currentDate(), QDate::currentDate().addDays(21)).count() == 0); + CPPUNIT_ASSERT(sch.paymentDates(TQDate::tqcurrentDate(), TQDate::tqcurrentDate().addDays(21)).count() == 0); } catch (MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); diff --git a/kmymoney2/mymoney/mymoneysecurity.cpp b/kmymoney2/mymoney/mymoneysecurity.cpp index 73edbdb..27a1352 100644 --- a/kmymoney2/mymoney/mymoneysecurity.cpp +++ b/kmymoney2/mymoney/mymoneysecurity.cpp @@ -42,7 +42,7 @@ MyMoneySecurity::MyMoneySecurity() : { } -MyMoneySecurity::MyMoneySecurity(const QString& id, const QString& name, const QString& symbol, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) : +MyMoneySecurity::MyMoneySecurity(const TQString& id, const TQString& name, const TQString& symbol, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) : MyMoneyObject(id), m_name(name), m_securityType(SECURITY_CURRENCY) @@ -60,24 +60,24 @@ MyMoneySecurity::MyMoneySecurity(const QString& id, const QString& name, const Q m_smallestAccountFraction = smallestCashFraction; } -MyMoneySecurity::MyMoneySecurity(const QString& id, const MyMoneySecurity& equity) : +MyMoneySecurity::MyMoneySecurity(const TQString& id, const MyMoneySecurity& equity) : MyMoneyObject(id) { *this = equity; m_id = id; } -MyMoneySecurity::MyMoneySecurity(const QDomElement& node) : +MyMoneySecurity::MyMoneySecurity(const TQDomElement& node) : MyMoneyObject(node), MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()) { if(("SECURITY" != node.tagName()) - && ("EQUITY" != node.tagName()) + && ("ETQUITY" != node.tagName()) && ("CURRENCY" != node.tagName())) throw new MYMONEYEXCEPTION("Node was not SECURITY or CURRENCY"); - setName(QStringEmpty(node.attribute("name"))); - setTradingSymbol(QStringEmpty(node.attribute("symbol"))); + setName(TQStringEmpty(node.attribute("name"))); + setTradingSymbol(TQStringEmpty(node.attribute("symbol"))); setSecurityType(static_cast<eSECURITYTYPE>(node.attribute("type").toInt())); setSmallestAccountFraction(node.attribute("saf").toInt()); @@ -85,8 +85,8 @@ MyMoneySecurity::MyMoneySecurity(const QDomElement& node) : setPartsPerUnit(node.attribute("ppu").toInt()); setSmallestCashFraction(node.attribute("scf").toInt()); } else { - setTradingCurrency(QStringEmpty(node.attribute("trading-currency"))); - setTradingMarket(QStringEmpty(node.attribute("trading-market"))); + setTradingCurrency(TQStringEmpty(node.attribute("trading-currency"))); + setTradingMarket(TQStringEmpty(node.attribute("trading-market"))); } } @@ -118,14 +118,14 @@ bool MyMoneySecurity::operator < (const MyMoneySecurity& right) const } -bool MyMoneySecurity::hasReferenceTo(const QString& id) const +bool MyMoneySecurity::hasReferenceTo(const TQString& id) const { return (id == m_tradingCurrency); } -void MyMoneySecurity::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneySecurity::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el; + TQDomElement el; if(isCurrency()) el = document.createElement("CURRENCY"); else @@ -148,12 +148,12 @@ void MyMoneySecurity::writeXML(QDomDocument& document, QDomElement& parent) cons //Add in Key-Value Pairs for securities. MyMoneyKeyValueContainer::writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -QString MyMoneySecurity::securityTypeToString(const eSECURITYTYPE securityType) +TQString MyMoneySecurity::securityTypeToString(const eSECURITYTYPE securityType) { - QString returnString; + TQString returnString; switch (securityType) { case MyMoneySecurity::SECURITY_STOCK: diff --git a/kmymoney2/mymoney/mymoneysecurity.h b/kmymoney2/mymoney/mymoneysecurity.h index 666398e..fa49cb8 100644 --- a/kmymoney2/mymoney/mymoneysecurity.h +++ b/kmymoney2/mymoney/mymoneysecurity.h @@ -30,8 +30,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -57,9 +57,9 @@ class KMYMONEY_EXPORT MyMoneySecurity : public MyMoneyObject, public MyMoneyKeyV { public: MyMoneySecurity(); - MyMoneySecurity(const QString& id, const MyMoneySecurity& equity); - MyMoneySecurity(const QString& id, const QString& name, const QString& symbol = QString(), const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0); - MyMoneySecurity(const QDomElement& node); + MyMoneySecurity(const TQString& id, const MyMoneySecurity& equity); + MyMoneySecurity(const TQString& id, const TQString& name, const TQString& symbol = TQString(), const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0); + MyMoneySecurity(const TQDomElement& node); virtual ~MyMoneySecurity(); bool operator < (const MyMoneySecurity&) const; @@ -86,21 +86,21 @@ public: SECURITY_NONE } eSECURITYTYPE; - const QString& name() const { return m_name; } + const TQString& name() const { return m_name; } void setName(const String& str) { m_name = str; } - const QString& tradingSymbol() const { return m_tradingSymbol; } + const TQString& tradingSymbol() const { return m_tradingSymbol; } void setTradingSymbol(const String& str) { m_tradingSymbol = str; } eSECURITYTYPE securityType() const { return m_securityType; } void setSecurityType(const eSECURITYTYPE& s) { m_securityType = s; } bool isCurrency(void) const { return m_securityType == SECURITY_CURRENCY; }; - const QString& tradingMarket() const { return m_tradingMarket; } - void setTradingMarket(const QString& str) { m_tradingMarket = str; } + const TQString& tradingMarket() const { return m_tradingMarket; } + void setTradingMarket(const TQString& str) { m_tradingMarket = str; } - const QString& tradingCurrency(void) const { return m_tradingCurrency; }; - void setTradingCurrency(const QString& str) { m_tradingCurrency = str; }; + const TQString& tradingCurrency(void) const { return m_tradingCurrency; }; + void setTradingCurrency(const TQString& str) { m_tradingCurrency = str; }; int smallestAccountFraction(void) const { return m_smallestAccountFraction; }; void setSmallestAccountFraction(const int sf) { m_smallestAccountFraction = sf; }; @@ -111,7 +111,7 @@ public: void setPartsPerUnit(const int ppu) { m_partsPerUnit = ppu; }; void setSmallestCashFraction(const int sf) { m_smallestCashFraction = sf; }; - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -122,7 +122,7 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - bool hasReferenceTo(const QString& id) const; + bool hasReferenceTo(const TQString& id) const; /** * This method is used to convert the internal representation of @@ -131,16 +131,16 @@ public: * @param securityType enumerated representation of the security type. * For possible values, see MyMoneySecurity::eSECURITYTYPE * - * @return QString representing the human readable form + * @return TQString representing the human readable form */ - static QString securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType); + static TQString securityTypeToString(const MyMoneySecurity::eSECURITYTYPE securityType); protected: - QString m_name; - QString m_tradingSymbol; - QString m_tradingMarket; - QString m_tradingCurrency; + TQString m_name; + TQString m_tradingSymbol; + TQString m_tradingMarket; + TQString m_tradingCurrency; eSECURITYTYPE m_securityType; int m_smallestAccountFraction; int m_smallestCashFraction; diff --git a/kmymoney2/mymoney/mymoneysecuritytest.cpp b/kmymoney2/mymoney/mymoneysecuritytest.cpp index 77b6764..72911db 100644 --- a/kmymoney2/mymoney/mymoneysecuritytest.cpp +++ b/kmymoney2/mymoney/mymoneysecuritytest.cpp @@ -51,7 +51,7 @@ void MyMoneySecurityTest::testCopyConstructor() { } void MyMoneySecurityTest::testNonemptyConstructor() { - QDate date(2004,4,1); + TQDate date(2004,4,1); MyMoneyMoney val("1234/100"); m->setName("name"); @@ -61,8 +61,8 @@ void MyMoneySecurityTest::testNonemptyConstructor() { MyMoneySecurity n("id", *m); - CPPUNIT_ASSERT(n.id() == QString("id")); - CPPUNIT_ASSERT(n.tradingSymbol() == QString("symbol")); + CPPUNIT_ASSERT(n.id() == TQString("id")); + CPPUNIT_ASSERT(n.tradingSymbol() == TQString("symbol")); CPPUNIT_ASSERT(n.securityType() == MyMoneySecurity::SECURITY_CURRENCY); // CPPUNIT_ASSERT(n.priceHistory().count() == 1); } @@ -173,8 +173,8 @@ void MyMoneySecurityTest::testInequality () { /* void MyMoneySecurityTest::testAccountIDList () { MyMoneySecurity equity; - QStringList list; - QString id; + TQStringList list; + TQString id; // list must be empty list = institution.accountList(); @@ -184,26 +184,26 @@ void MyMoneySecurityTest::testAccountIDList () { institution.addAccountId("A000002"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); // adding same account shouldn't make a difference institution.addAccountId("A000002"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); // now add another account institution.addAccountId("A000001"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 2); - CPPUNIT_ASSERT(list.contains("A000002") == 1); - CPPUNIT_ASSERT(list.contains("A000001") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000001") == 1); id = institution.removeAccountId("A000001"); CPPUNIT_ASSERT(id == "A000001"); list = institution.accountList(); CPPUNIT_ASSERT(list.count() == 1); - CPPUNIT_ASSERT(list.contains("A000002") == 1); + CPPUNIT_ASSERT(list.tqcontains("A000002") == 1); } */ diff --git a/kmymoney2/mymoney/mymoneysplit.cpp b/kmymoney2/mymoney/mymoneysplit.cpp index a19ff43..4af052d 100644 --- a/kmymoney2/mymoney/mymoneysplit.cpp +++ b/kmymoney2/mymoney/mymoneysplit.cpp @@ -44,7 +44,7 @@ MyMoneySplit::MyMoneySplit() m_reconcileFlag = NotReconciled; } -MyMoneySplit::MyMoneySplit(const QDomElement& node) : +MyMoneySplit::MyMoneySplit(const TQDomElement& node) : MyMoneyObject(node, false), MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()) { @@ -53,20 +53,20 @@ MyMoneySplit::MyMoneySplit(const QDomElement& node) : clearId(); - m_payee = QStringEmpty(node.attribute("payee")); - m_reconcileDate = stringToDate(QStringEmpty(node.attribute("reconciledate"))); - m_action = QStringEmpty(node.attribute("action")); + m_payee = TQStringEmpty(node.attribute("payee")); + m_reconcileDate = stringToDate(TQStringEmpty(node.attribute("reconciledate"))); + m_action = TQStringEmpty(node.attribute("action")); m_reconcileFlag = static_cast<MyMoneySplit::reconcileFlagE>(node.attribute("reconcileflag").toInt()); - m_memo = QStringEmpty(node.attribute("memo")); - m_value = MyMoneyMoney(QStringEmpty(node.attribute("value"))); - m_shares = MyMoneyMoney(QStringEmpty(node.attribute("shares"))); - m_price = MyMoneyMoney(QStringEmpty(node.attribute("price"))); - m_account = QStringEmpty(node.attribute("account")); - m_number = QStringEmpty(node.attribute("number")); - m_bankID = QStringEmpty(node.attribute("bankid")); + m_memo = TQStringEmpty(node.attribute("memo")); + m_value = MyMoneyMoney(TQStringEmpty(node.attribute("value"))); + m_shares = MyMoneyMoney(TQStringEmpty(node.attribute("shares"))); + m_price = MyMoneyMoney(TQStringEmpty(node.attribute("price"))); + m_account = TQStringEmpty(node.attribute("account")); + m_number = TQStringEmpty(node.attribute("number")); + m_bankID = TQStringEmpty(node.attribute("bankid")); } -MyMoneySplit::MyMoneySplit(const QString& id, const MyMoneySplit& right) : +MyMoneySplit::MyMoneySplit(const TQString& id, const MyMoneySplit& right) : MyMoneyObject(id) { *this = right; @@ -94,17 +94,17 @@ bool MyMoneySplit::operator == (const MyMoneySplit& right) const m_transactionId == right.m_transactionId; } -void MyMoneySplit::setAccountId(const QString& account) +void MyMoneySplit::setAccountId(const TQString& account) { m_account = account; } -void MyMoneySplit::setMemo(const QString& memo) +void MyMoneySplit::setMemo(const TQString& memo) { m_memo = memo; } -void MyMoneySplit::setReconcileDate(const QDate& date) +void MyMoneySplit::setReconcileDate(const TQDate& date) { m_reconcileDate = date; } @@ -124,7 +124,7 @@ void MyMoneySplit::setValue(const MyMoneyMoney& value) m_value = value; } -void MyMoneySplit::setValue(const MyMoneyMoney& value, const QString& transactionCurrencyId, const QString& splitCurrencyId) +void MyMoneySplit::setValue(const MyMoneyMoney& value, const TQString& transactionCurrencyId, const TQString& splitCurrencyId) { if(transactionCurrencyId == splitCurrencyId) setValue(value); @@ -132,7 +132,7 @@ void MyMoneySplit::setValue(const MyMoneyMoney& value, const QString& transactio setShares(value); } -void MyMoneySplit::setPayeeId(const QString& payee) +void MyMoneySplit::setPayeeId(const TQString& payee) { m_payee = payee; } @@ -165,17 +165,17 @@ void MyMoneySplit::setAction(investTransactionTypeE type) } } -void MyMoneySplit::setAction(const QString& action) +void MyMoneySplit::setAction(const TQString& action) { m_action = action; } -void MyMoneySplit::setNumber(const QString& number) +void MyMoneySplit::setNumber(const TQString& number) { m_number = number; } -const MyMoneyMoney MyMoneySplit::value(const QString& transactionCurrencyId, const QString& splitCurrencyId) const +const MyMoneyMoney MyMoneySplit::value(const TQString& transactionCurrencyId, const TQString& splitCurrencyId) const { return (transactionCurrencyId == splitCurrencyId) ? m_value : m_shares; } @@ -194,9 +194,9 @@ MyMoneyMoney MyMoneySplit::price(void) const return MyMoneyMoney(1,1); } -void MyMoneySplit::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneySplit::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("SPLIT"); + TQDomElement el = document.createElement("SPLIT"); writeBaseXML(document, el); @@ -217,10 +217,10 @@ void MyMoneySplit::writeXML(QDomDocument& document, QDomElement& parent) const MyMoneyKeyValueContainer::writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneySplit::hasReferenceTo(const QString& id) const +bool MyMoneySplit::hasReferenceTo(const TQString& id) const { bool rc = false; if(isMatched()) { @@ -239,12 +239,12 @@ void MyMoneySplit::addMatch(const MyMoneyTransaction& _t) if(_t.isImported() && !isMatched()) { MyMoneyTransaction t(_t); t.clearId(); - QDomDocument doc("MATCH"); - QDomElement el = doc.createElement("CONTAINER"); + TQDomDocument doc("MATCH"); + TQDomElement el = doc.createElement("CONTAINER"); doc.appendChild(el); t.writeXML(doc, el); - QString xml = doc.toString(); - xml.replace("<", "<"); + TQString xml = doc.toString(); + xml.tqreplace("<", "<"); setValue("kmm-matched-tx", xml); } } @@ -256,11 +256,11 @@ void MyMoneySplit::removeMatch(void) MyMoneyTransaction MyMoneySplit::matchedTransaction(void) const { - QString xml = value("kmm-matched-tx"); + TQString xml = value("kmm-matched-tx"); if(!xml.isEmpty()) { - xml.replace("<", "<"); - QDomDocument doc; - QDomElement node; + xml.tqreplace("<", "<"); + TQDomDocument doc; + TQDomElement node; doc.setContent(xml); node = doc.documentElement().firstChild().toElement(); MyMoneyTransaction t(node, false); diff --git a/kmymoney2/mymoney/mymoneysplit.h b/kmymoney2/mymoney/mymoneysplit.h index 3408a6a..de7c849 100644 --- a/kmymoney2/mymoney/mymoneysplit.h +++ b/kmymoney2/mymoney/mymoneysplit.h @@ -30,8 +30,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // Project Includes @@ -92,13 +92,13 @@ public: } investTransactionTypeE; MyMoneySplit(); - MyMoneySplit(const QDomElement& node); - MyMoneySplit(const QString& id, const MyMoneySplit& right); + MyMoneySplit(const TQDomElement& node); + MyMoneySplit(const TQString& id, const MyMoneySplit& right); ~MyMoneySplit(); bool operator == (const MyMoneySplit&) const; - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -109,7 +109,7 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; const MyMoneyMoney& shares(void) const { return m_shares; } const MyMoneyMoney& value(void) const { return m_value; } @@ -126,30 +126,30 @@ public: */ MyMoneyMoney actualPrice(void) const { return m_price; } - const MyMoneyMoney value(const QString& transactionCurrencyId, const QString& splitCurrencyId) const; + const MyMoneyMoney value(const TQString& transactionCurrencyId, const TQString& splitCurrencyId) const; /** * Required to have (direct) access to the MyMoneyKeyValueContainer::value() method. */ - const QString& value(const QString& key) const { return MyMoneyKeyValueContainer::value(key); } + const TQString& value(const TQString& key) const { return MyMoneyKeyValueContainer::value(key); } /** * Required to have (direct) access to the MyMoneyKeyValueContainer::setValue() method. */ - void setValue(const QString& key, const QString& value) { MyMoneyKeyValueContainer::setValue(key, value); } + void setValue(const TQString& key, const TQString& value) { MyMoneyKeyValueContainer::setValue(key, value); } - const QString& accountId(void) const { return m_account; } - const QString& memo(void) const { return m_memo; } + const TQString& accountId(void) const { return m_account; } + const TQString& memo(void) const { return m_memo; } reconcileFlagE reconcileFlag(void) const { return m_reconcileFlag; } - const QDate& reconcileDate(void) const { return m_reconcileDate; } - const QString& payeeId(void) const { return m_payee; } - const QString& action(void) const { return m_action; } - const QString& number(void) const { return m_number; } + const TQDate& reconcileDate(void) const { return m_reconcileDate; } + const TQString& payeeId(void) const { return m_payee; } + const TQString& action(void) const { return m_action; } + const TQString& number(void) const { return m_number; } bool isAmortizationSplit(void) const { return m_action == ActionAmortization; } bool isInterestSplit(void) const { return m_action == ActionInterest; } bool isAutoCalc(void) const { return (m_shares == MyMoneyMoney::autoCalc) || (m_value == MyMoneyMoney::autoCalc); } - const QString& bankID(void) const { return m_bankID; } - const QString& transactionId(void) const { return m_transactionId; } + const TQString& bankID(void) const { return m_bankID; } + const TQString& transactionId(void) const { return m_transactionId; } void setShares(const MyMoneyMoney& shares); void setValue(const MyMoneyMoney& value); @@ -168,18 +168,18 @@ public: * the id of the currency assigned to the account that is * referenced by the split) */ - void setValue(const MyMoneyMoney& value, const QString& transactionCurrencyId, const QString& splitCurrencyId); + void setValue(const MyMoneyMoney& value, const TQString& transactionCurrencyId, const TQString& splitCurrencyId); - void setAccountId(const QString& account); - void setMemo(const QString& memo); + void setAccountId(const TQString& account); + void setMemo(const TQString& memo); void setReconcileFlag(const reconcileFlagE flag); - void setReconcileDate(const QDate& date); - void setPayeeId(const QString& payee); - void setAction(const QString& action); + void setReconcileDate(const TQDate& date); + void setPayeeId(const TQString& payee); + void setAction(const TQString& action); void setAction(investTransactionTypeE type); - void setNumber(const QString& number); - void setBankID(const QString& bankID) { m_bankID = bankID; }; - void setTransactionId(const QString& id) { m_transactionId = id; } + void setNumber(const TQString& number); + void setBankID(const TQString& bankID) { m_bankID = bankID; }; + void setTransactionId(const TQString& id) { m_transactionId = id; } /** * returns @a true if this its a transaction matched against an imported @@ -226,17 +226,17 @@ private: /** * This member contains the ID of the transaction */ - QString m_id; + TQString m_id; /** * This member contains the ID of the payee */ - QString m_payee; + TQString m_payee; /** * This member contains the ID of the account */ - QString m_account; + TQString m_account; /** */ @@ -254,7 +254,7 @@ private: */ MyMoneyMoney m_price; - QString m_memo; + TQString m_memo; /** * This member contains information about the reconciliation @@ -272,20 +272,20 @@ private: * In case the reconciliation flag is set to Reconciled or Frozen * this member contains the date of the reconciliation. */ - QDate m_reconcileDate; + TQDate m_reconcileDate; /** * The m_action member is an arbitrary string, but is intended to * be conveniently limited to a menu of selections such as * "Buy", "Sell", "Interest", etc. */ - QString m_action; + TQString m_action; /** * The m_number member is used to store a reference number to * the split supplied by the user (e.g. check number, etc.). */ - QString m_number; + TQString m_number; /** * This member keeps the bank's unique ID for the split, so we can @@ -294,14 +294,14 @@ private: * This should only be set on the split which refers to the account * that was downloaded. */ - QString m_bankID; + TQString m_bankID; /** * This member keeps a backward id to the transaction that this * split can be found in. It is the purpose of the MyMoneyTransaction * object to maintain this member variable. */ - QString m_transactionId; + TQString m_transactionId; }; #endif diff --git a/kmymoney2/mymoney/mymoneysplittest.cpp b/kmymoney2/mymoney/mymoneysplittest.cpp index a592e1a..806b556 100644 --- a/kmymoney2/mymoney/mymoneysplittest.cpp +++ b/kmymoney2/mymoney/mymoneysplittest.cpp @@ -38,14 +38,14 @@ void MyMoneySplitTest::testEmptyConstructor() { CPPUNIT_ASSERT(m->shares().isZero()); CPPUNIT_ASSERT(m->value().isZero()); CPPUNIT_ASSERT(m->reconcileFlag() == MyMoneySplit::NotReconciled); - CPPUNIT_ASSERT(m->reconcileDate() == QDate()); + CPPUNIT_ASSERT(m->reconcileDate() == TQDate()); CPPUNIT_ASSERT(m->transactionId().isEmpty()); } void MyMoneySplitTest::testSetFunctions() { m->setAccountId("Account"); m->setMemo("Memo"); - m->setReconcileDate(QDate(1,2,3)); + m->setReconcileDate(TQDate(1,2,3)); m->setReconcileFlag(MyMoneySplit::Cleared); m->setShares(1234); m->setValue(3456); @@ -57,7 +57,7 @@ void MyMoneySplitTest::testSetFunctions() { CPPUNIT_ASSERT(m->accountId() == "Account"); CPPUNIT_ASSERT(m->memo() == "Memo"); - CPPUNIT_ASSERT(m->reconcileDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(m->reconcileDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(m->reconcileFlag() == MyMoneySplit::Cleared); CPPUNIT_ASSERT(m->shares() == MyMoneyMoney(1234)); CPPUNIT_ASSERT(m->value() == MyMoneyMoney(3456)); @@ -76,7 +76,7 @@ void MyMoneySplitTest::testCopyConstructor() { CPPUNIT_ASSERT(n.accountId() == "Account"); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.reconcileDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.reconcileDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.reconcileFlag() == MyMoneySplit::Cleared); CPPUNIT_ASSERT(n.shares() == MyMoneyMoney(1234)); CPPUNIT_ASSERT(n.value() == MyMoneyMoney(3456)); @@ -96,7 +96,7 @@ void MyMoneySplitTest::testAssignmentConstructor() { CPPUNIT_ASSERT(n.accountId() == "Account"); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.reconcileDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.reconcileDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.reconcileFlag() == MyMoneySplit::Cleared); CPPUNIT_ASSERT(n.shares() == MyMoneyMoney(1234)); CPPUNIT_ASSERT(n.value() == MyMoneyMoney(3456)); @@ -148,7 +148,7 @@ void MyMoneySplitTest::testInequality() { CPPUNIT_ASSERT(!(n == *m)); n = *m; - n.setReconcileDate(QDate(3,4,5)); + n.setReconcileDate(TQDate(3,4,5)); CPPUNIT_ASSERT(!(n == *m)); n = *m; @@ -200,7 +200,7 @@ void MyMoneySplitTest::testSetValue() { } void MyMoneySplitTest::testSetAction() { - CPPUNIT_ASSERT(m->action() == QString()); + CPPUNIT_ASSERT(m->action() == TQString()); m->setAction(MyMoneySplit::BuyShares); CPPUNIT_ASSERT(m->action() == MyMoneySplit::ActionBuyShares); m->setAction(MyMoneySplit::SellShares); @@ -243,12 +243,12 @@ void MyMoneySplitTest::testWriteXML() { s.setAction(MyMoneySplit::ActionDeposit); s.setReconcileFlag(MyMoneySplit::Reconciled); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("SPLIT-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("SPLIT-CONTAINER"); doc.appendChild(el); s.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<SPLIT-CONTAINER>\n" " <SPLIT payee=\"P000001\" reconciledate=\"\" shares=\"96379/100\" action=\"Deposit\" bankid=\"SPID\" number=\"124\" reconcileflag=\"2\" memo=\"\" value=\"96379/1000\" id=\"\" account=\"A000076\" />\n" @@ -259,20 +259,20 @@ void MyMoneySplitTest::testWriteXML() { void MyMoneySplitTest::testReadXML() { MyMoneySplit s; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<SPLIT-CONTAINER>\n" " <SPLIT payee=\"P000001\" reconciledate=\"\" shares=\"96379/100\" action=\"Deposit\" bankid=\"SPID\" number=\"124\" reconcileflag=\"2\" memo=\"MyMemo\" value=\"96379/1000\" account=\"A000076\" />\n" "</SPLIT-CONTAINER>\n"); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<SPLIT-CONTAINER>\n" " <SPLITS payee=\"P000001\" reconciledate=\"\" shares=\"96379/100\" action=\"Deposit\" bankid=\"SPID\" number=\"124\" reconcileflag=\"2\" memo=\"\" value=\"96379/1000\" account=\"A000076\" />\n" "</SPLIT-CONTAINER>\n"); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -290,7 +290,7 @@ void MyMoneySplitTest::testReadXML() { s = MyMoneySplit(node); CPPUNIT_ASSERT(s.id().isEmpty()); CPPUNIT_ASSERT(s.payeeId() == "P000001"); - CPPUNIT_ASSERT(s.reconcileDate() == QDate()); + CPPUNIT_ASSERT(s.reconcileDate() == TQDate()); CPPUNIT_ASSERT(s.shares() == MyMoneyMoney(96379, 100)); CPPUNIT_ASSERT(s.value() == MyMoneyMoney(96379, 1000)); CPPUNIT_ASSERT(s.number() == "124"); diff --git a/kmymoney2/mymoney/mymoneystatement.cpp b/kmymoney2/mymoney/mymoneystatement.cpp index 0373863..3756520 100644 --- a/kmymoney2/mymoney/mymoneystatement.cpp +++ b/kmymoney2/mymoney/mymoneystatement.cpp @@ -24,10 +24,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdom.h> -#include <qstringlist.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqdom.h> +#include <tqstringlist.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // Project Includes @@ -35,12 +35,12 @@ #include "../../kdecompat.h" #include "mymoneystatement.h" -const QStringList kAccountTypeTxt = QStringList::split(",","none,checkings,savings,investment,creditcard,invalid"); -const QStringList kActionText = QStringList::split(",","none,buy,sell,reinvestdividend,cashdividend,add,remove,stocksplit,fees,interest,invalid"); +const TQStringList kAccountTypeTxt = TQStringList::split(",","none,checkings,savings,investment,creditcard,invalid"); +const TQStringList kActionText = TQStringList::split(",","none,buy,sell,reinvestdividend,cashdividend,add,remove,stocksplit,fees,interest,invalid"); -void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const +void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const { - QDomElement e = _doc->createElement("STATEMENT"); + TQDomElement e = _doc->createElement("STATEMENT"); _root.appendChild(e); e.setAttribute("version","1.1"); @@ -56,10 +56,10 @@ void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const e.setAttribute("skipCategoryMatching", m_skipCategoryMatching); // iterate over transactions, and add each one - QValueList<Transaction>::const_iterator it_t = m_listTransactions.begin(); + TQValueList<Transaction>::const_iterator it_t = m_listTransactions.begin(); while ( it_t != m_listTransactions.end() ) { - QDomElement p = _doc->createElement("TRANSACTION"); + TQDomElement p = _doc->createElement("TRANSACTION"); p.setAttribute("dateposted", (*it_t).m_datePosted.toString(Qt::ISODate)); p.setAttribute("payee", (*it_t).m_strPayee); p.setAttribute("memo", (*it_t).m_strMemo); @@ -77,9 +77,9 @@ void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const } // add all the splits we know of (might be empty) - QValueList<Split>::const_iterator it_s; + TQValueList<Split>::const_iterator it_s; for(it_s = (*it_t).m_listSplits.begin(); it_s != (*it_t).m_listSplits.end(); ++it_s) { - QDomElement split = _doc->createElement("SPLIT"); + TQDomElement split = _doc->createElement("SPLIT"); split.setAttribute("accountid", (*it_s).m_accountId); split.setAttribute("amount", (*it_s).m_amount.toString()); split.setAttribute("reconcile", (*it_s).m_reconcile); @@ -95,10 +95,10 @@ void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const } // iterate over prices, and add each one - QValueList<Price>::const_iterator it_p = m_listPrices.begin(); + TQValueList<Price>::const_iterator it_p = m_listPrices.begin(); while ( it_p != m_listPrices.end() ) { - QDomElement p = _doc->createElement("PRICE"); + TQDomElement p = _doc->createElement("PRICE"); p.setAttribute("dateposted", (*it_p).m_date.toString(Qt::ISODate)); p.setAttribute("security", (*it_p).m_strSecurity); p.setAttribute("amount", (*it_p).m_amount.toString()); @@ -109,10 +109,10 @@ void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const } // iterate over securities, and add each one - QValueList<Security>::const_iterator it_s = m_listSecurities.begin(); + TQValueList<Security>::const_iterator it_s = m_listSecurities.begin(); while ( it_s != m_listSecurities.end() ) { - QDomElement p = _doc->createElement("SECURITY"); + TQDomElement p = _doc->createElement("SECURITY"); p.setAttribute("name", (*it_s).m_strName); p.setAttribute("symbol", (*it_s).m_strSymbol); p.setAttribute("id", (*it_s).m_strId); @@ -124,7 +124,7 @@ void MyMoneyStatement::write(QDomElement& _root,QDomDocument* _doc) const } -bool MyMoneyStatement::read(const QDomElement& _e) +bool MyMoneyStatement::read(const TQDomElement& _e) { bool result = false; @@ -136,33 +136,33 @@ bool MyMoneyStatement::read(const QDomElement& _e) m_strAccountNumber = _e.attribute("accountnumber"); m_strRoutingNumber = _e.attribute("routingnumber"); m_strCurrency = _e.attribute("currency"); - m_dateBegin = QDate::fromString(_e.attribute("begindate"),Qt::ISODate); - m_dateEnd = QDate::fromString(_e.attribute("enddate"),Qt::ISODate); + m_dateBegin = TQDate::fromString(_e.attribute("begindate"),Qt::ISODate); + m_dateEnd = TQDate::fromString(_e.attribute("enddate"),Qt::ISODate); m_closingBalance = MyMoneyMoney(_e.attribute("closingbalance")); m_accountId = _e.attribute("accountid"); m_skipCategoryMatching = _e.attribute("skipCategoryMatching"); - int i = kAccountTypeTxt.findIndex(_e.attribute("type",kAccountTypeTxt[1])); + int i = kAccountTypeTxt.tqfindIndex(_e.attribute("type",kAccountTypeTxt[1])); if ( i != -1 ) m_eType = static_cast<EType>(i); - QDomNode child = _e.firstChild(); + TQDomNode child = _e.firstChild(); while(!child.isNull() && child.isElement()) { - QDomElement c = child.toElement(); + TQDomElement c = child.toElement(); if ( c.tagName() == "TRANSACTION" ) { MyMoneyStatement::Transaction t; - t.m_datePosted = QDate::fromString(c.attribute("dateposted"),Qt::ISODate); + t.m_datePosted = TQDate::fromString(c.attribute("dateposted"),Qt::ISODate); t.m_amount = MyMoneyMoney(c.attribute("amount")); t.m_strMemo = c.attribute("memo"); t.m_strNumber = c.attribute("number"); t.m_strPayee = c.attribute("payee"); t.m_strBankID = c.attribute("bankid"); t.m_reconcile = static_cast<MyMoneySplit::reconcileFlagE>(c.attribute("reconcile").toInt()); - int i = kActionText.findIndex(c.attribute("action",kActionText[1])); + int i = kActionText.tqfindIndex(c.attribute("action",kActionText[1])); if ( i != -1 ) t.m_eAction = static_cast<Transaction::EAction>(i); @@ -174,9 +174,9 @@ bool MyMoneyStatement::read(const QDomElement& _e) } // process splits (if any) - QDomNode child = c.firstChild(); + TQDomNode child = c.firstChild(); while(!child.isNull() && child.isElement()) { - QDomElement c = child.toElement(); + TQDomElement c = child.toElement(); if(c.tagName() == "SPLIT") { MyMoneyStatement::Split s; s.m_accountId = c.attribute("accountid"); @@ -194,7 +194,7 @@ bool MyMoneyStatement::read(const QDomElement& _e) { MyMoneyStatement::Price p; - p.m_date = QDate::fromString(c.attribute("dateposted"), Qt::ISODate); + p.m_date = TQDate::fromString(c.attribute("dateposted"), Qt::ISODate); p.m_strSecurity = c.attribute("security"); p.m_amount = MyMoneyMoney(c.attribute("amount")); @@ -217,20 +217,20 @@ bool MyMoneyStatement::read(const QDomElement& _e) return result; } -bool MyMoneyStatement::isStatementFile(const QString& _filename) +bool MyMoneyStatement::isStatementFile(const TQString& _filename) { - // filename is considered a statement file if it contains + // filename is considered a statement file if it tqcontains // the tag "<KMYMONEY2-STATEMENT>" in the first 20 lines. bool result = false; - QFile f( _filename ); + TQFile f( _filename ); if ( f.open( IO_ReadOnly ) ) { - QTextStream ts( &f ); + TQTextStream ts( &f ); int lineCount = 20; while ( !ts.atEnd() && !result && lineCount != 0) { - if ( ts.readLine().contains("<KMYMONEY-STATEMENT>",false) ) + if ( ts.readLine().tqcontains("<KMYMONEY-STATEMENT>",false) ) result = true; --lineCount; } @@ -240,29 +240,29 @@ bool MyMoneyStatement::isStatementFile(const QString& _filename) return result; } -void MyMoneyStatement::writeXMLFile( const MyMoneyStatement& _s, const QString& _filename ) +void MyMoneyStatement::writeXMLFile( const MyMoneyStatement& _s, const TQString& _filename ) { static unsigned filenum = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("statement-%1%2.xml").arg((filenum<10)?"0":"").arg(filenum); + filename = TQString("statement-%1%2.xml").tqarg((filenum<10)?"0":"").tqarg(filenum); filenum++; } - QDomDocument* doc = new QDomDocument("KMYMONEY-STATEMENT"); + TQDomDocument* doc = new TQDomDocument("KMYMONEY-STATEMENT"); Q_CHECK_PTR(doc); //writeStatementtoXMLDoc(_s,doc); - QDomProcessingInstruction instruct = doc->createProcessingInstruction(QString("xml"), QString("version=\"1.0\" encoding=\"utf-8\"")); + TQDomProcessingInstruction instruct = doc->createProcessingInstruction(TQString("xml"), TQString("version=\"1.0\" encoding=\"utf-8\"")); doc->appendChild(instruct); - QDomElement eroot = doc->createElement("KMYMONEY-STATEMENT"); + TQDomElement eroot = doc->createElement("KMYMONEY-STATEMENT"); doc->appendChild(eroot); _s.write(eroot,doc); - QFile g( filename ); + TQFile g( filename ); if(g.open( IO_WriteOnly )) { - QTextStream stream(&g); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(&g); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << doc->toString(); g.close(); } @@ -270,22 +270,22 @@ void MyMoneyStatement::writeXMLFile( const MyMoneyStatement& _s, const QString& delete doc; } -bool MyMoneyStatement::readXMLFile( MyMoneyStatement& _s, const QString& _filename ) +bool MyMoneyStatement::readXMLFile( MyMoneyStatement& _s, const TQString& _filename ) { bool result = false; - QFile f( _filename ); + TQFile f( _filename ); f.open( IO_ReadOnly ); - QDomDocument* doc = new QDomDocument; + TQDomDocument* doc = new TQDomDocument; if(doc->setContent(&f, false)) { - QDomElement rootElement = doc->documentElement(); + TQDomElement rootElement = doc->documentElement(); if(!rootElement.isNull()) { - QDomNode child = rootElement.firstChild(); + TQDomNode child = rootElement.firstChild(); while(!child.isNull() && child.isElement()) { result = true; - QDomElement childElement = child.toElement(); + TQDomElement childElement = child.toElement(); _s.read(childElement); child = child.nextSibling(); diff --git a/kmymoney2/mymoney/mymoneystatement.h b/kmymoney2/mymoney/mymoneystatement.h index 0bea510..a7f8bfe 100644 --- a/kmymoney2/mymoney/mymoneystatement.h +++ b/kmymoney2/mymoney/mymoneystatement.h @@ -31,9 +31,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qvaluelist.h> -#include <qdatetime.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // Project Includes @@ -42,8 +42,8 @@ #include <kmymoney/mymoneymoney.h> #include <kmymoney/mymoneysplit.h> -class QDomElement; -class QDomDocument; +class TQDomElement; +class TQDomDocument; /** Represents the electronic analog of the paper bank statement just like we used to get in the regular mail. This class is designed to be easy to extend and easy to create with minimal dependencies. So the header file should include as few project files as possible (preferrably NONE). @@ -60,9 +60,9 @@ public: class Split { public: Split() : m_reconcile(MyMoneySplit::NotReconciled) {} - QString m_strCategoryName; - QString m_strMemo; - QString m_accountId; + TQString m_strCategoryName; + TQString m_strMemo; + TQString m_accountId; MyMoneySplit::reconcileFlagE m_reconcile; MyMoneyMoney m_amount; @@ -71,11 +71,11 @@ public: class Transaction { public: Transaction() : m_reconcile(MyMoneySplit::NotReconciled), m_eAction(eaNone) {} - QDate m_datePosted; - QString m_strPayee; - QString m_strMemo; - QString m_strNumber; - QString m_strBankID; + TQDate m_datePosted; + TQString m_strPayee; + TQString m_strMemo; + TQString m_strNumber; + TQString m_strBankID; MyMoneyMoney m_amount; MyMoneySplit::reconcileFlagE m_reconcile; @@ -86,30 +86,30 @@ public: MyMoneyMoney m_shares; MyMoneyMoney m_fees; MyMoneyMoney m_price; - QString m_strInterestCategory; - QString m_strBrokerageAccount; - QString m_strSymbol; - QString m_strSecurity; - QValueList<Split> m_listSplits; + TQString m_strInterestCategory; + TQString m_strBrokerageAccount; + TQString m_strSymbol; + TQString m_strSecurity; + TQValueList<Split> m_listSplits; }; struct Price { - QDate m_date; - QString m_strSecurity; + TQDate m_date; + TQString m_strSecurity; MyMoneyMoney m_amount; }; struct Security { - QString m_strName; - QString m_strSymbol; - QString m_strId; + TQString m_strName; + TQString m_strSymbol; + TQString m_strId; }; - QString m_strAccountName; - QString m_strAccountNumber; - QString m_strRoutingNumber; + TQString m_strAccountName; + TQString m_strAccountNumber; + TQString m_strRoutingNumber; /** * The statement provider's information for the statement reader how to find the @@ -119,26 +119,26 @@ public: * MyMoneyAccount object for this key. The account id of that account should be returned * here. If no id is available, leave it empty. */ - QString m_accountId; + TQString m_accountId; - QString m_strCurrency; - QDate m_dateBegin; - QDate m_dateEnd; + TQString m_strCurrency; + TQDate m_dateBegin; + TQDate m_dateEnd; MyMoneyMoney m_closingBalance; EType m_eType; - QValueList<Transaction> m_listTransactions; - QValueList<Price> m_listPrices; - QValueList<Security> m_listSecurities; + TQValueList<Transaction> m_listTransactions; + TQValueList<Price> m_listPrices; + TQValueList<Security> m_listSecurities; bool m_skipCategoryMatching; - void write(QDomElement&,QDomDocument*) const; - bool read(const QDomElement&); + void write(TQDomElement&,TQDomDocument*) const; + bool read(const TQDomElement&); - KMYMONEY_EXPORT static bool isStatementFile(const QString&); - KMYMONEY_EXPORT static bool readXMLFile( MyMoneyStatement&, const QString& ); - KMYMONEY_EXPORT static void writeXMLFile( const MyMoneyStatement&, const QString& ); + KMYMONEY_EXPORT static bool isStatementFile(const TQString&); + KMYMONEY_EXPORT static bool readXMLFile( MyMoneyStatement&, const TQString& ); + KMYMONEY_EXPORT static void writeXMLFile( const MyMoneyStatement&, const TQString& ); }; #endif diff --git a/kmymoney2/mymoney/mymoneysubject.cpp b/kmymoney2/mymoney/mymoneysubject.cpp index c54d738..8391570 100644 --- a/kmymoney2/mymoney/mymoneysubject.cpp +++ b/kmymoney2/mymoney/mymoneysubject.cpp @@ -22,7 +22,7 @@ #include "mymoneysubject.h" #include "mymoneyobserver.h" -#include <qptrvector.h> +#include <tqptrvector.h> MyMoneySubject::MyMoneySubject() { @@ -42,14 +42,14 @@ void MyMoneySubject::detach (MyMoneyObserver* o) m_observers.remove(o); } -void MyMoneySubject::notify(const QString& id) +void MyMoneySubject::notify(const TQString& id) { - QPtrList<MyMoneyObserver> ptrList = m_observers; + TQPtrList<MyMoneyObserver> ptrList = m_observers; MyMoneyObserver* i; for (i = ptrList.first(); i != 0; i = ptrList.next()) { // only call the observer if it did not detach in the meantime - if(m_observers.findRef(i) != -1) { + if(m_observers.tqfindRef(i) != -1) { // qDebug("call observer @ 0x%08lX with '%s'", (unsigned long)i, id.data()); i->update(id); } diff --git a/kmymoney2/mymoney/mymoneysubject.h b/kmymoney2/mymoney/mymoneysubject.h index 74b8290..5b051e4 100644 --- a/kmymoney2/mymoney/mymoneysubject.h +++ b/kmymoney2/mymoney/mymoneysubject.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qptrlist.h> +#include <tqptrlist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -34,7 +34,7 @@ #include <kmymoney/export.h> class MyMoneyObserver; -class QString; +class TQString; /** * This is the base class to be used to construct a @@ -47,13 +47,13 @@ public: virtual ~MyMoneySubject(); virtual void attach(MyMoneyObserver*); virtual void detach(MyMoneyObserver*); - virtual void notify(const QString& id); + virtual void notify(const TQString& id); protected: MyMoneySubject(); private: - QPtrList<MyMoneyObserver> m_observers; + TQPtrList<MyMoneyObserver> m_observers; }; #endif diff --git a/kmymoney2/mymoney/mymoneytransaction.cpp b/kmymoney2/mymoney/mymoneytransaction.cpp index 10b4c08..662a9c8 100644 --- a/kmymoney2/mymoney/mymoneytransaction.cpp +++ b/kmymoney2/mymoney/mymoneytransaction.cpp @@ -29,25 +29,25 @@ MyMoneyTransaction::MyMoneyTransaction() : MyMoneyObject() { m_nextSplitID = 1; - m_entryDate = QDate(); - m_postDate = QDate(); + m_entryDate = TQDate(); + m_postDate = TQDate(); } -MyMoneyTransaction::MyMoneyTransaction(const QString id, const MyMoneyTransaction& transaction) : +MyMoneyTransaction::MyMoneyTransaction(const TQString id, const MyMoneyTransaction& transaction) : MyMoneyObject(id) { *this = transaction; m_id = id; - if(m_entryDate == QDate()) - m_entryDate = QDate::currentDate(); + if(m_entryDate == TQDate()) + m_entryDate = TQDate::tqcurrentDate(); - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { (*it).setTransactionId(id); } } -MyMoneyTransaction::MyMoneyTransaction(const QDomElement& node, const bool forceId) : +MyMoneyTransaction::MyMoneyTransaction(const TQDomElement& node, const bool forceId) : MyMoneyObject(node, forceId) { if("TRANSACTION" != node.tagName()) @@ -57,17 +57,17 @@ MyMoneyTransaction::MyMoneyTransaction(const QDomElement& node, const bool force m_postDate = stringToDate(node.attribute("postdate")); m_entryDate = stringToDate(node.attribute("entrydate")); - m_bankID = QStringEmpty(node.attribute("bankid")); - m_memo = QStringEmpty(node.attribute("memo")); - m_commodity = QStringEmpty(node.attribute("commodity")); + m_bankID = TQStringEmpty(node.attribute("bankid")); + m_memo = TQStringEmpty(node.attribute("memo")); + m_commodity = TQStringEmpty(node.attribute("commodity")); - QDomNode child = node.firstChild(); + TQDomNode child = node.firstChild(); while ( !child.isNull() && child.isElement() ) { - QDomElement c = child.toElement(); + TQDomElement c = child.toElement(); if(c.tagName() == "SPLITS") { // Process any split information found inside the transaction entry. - QDomNodeList nodeList = c.elementsByTagName("SPLIT"); + TQDomNodeList nodeList = c.elementsByTagName("SPLIT"); for(unsigned int i = 0; i < nodeList.count(); ++i) { MyMoneySplit s(nodeList.item(i).toElement()); if(!m_bankID.isEmpty()) @@ -84,7 +84,7 @@ MyMoneyTransaction::MyMoneyTransaction(const QDomElement& node, const bool force } child = child.nextSibling(); } - m_bankID = QString(); + m_bankID = TQString(); } MyMoneyTransaction::~MyMoneyTransaction() @@ -102,9 +102,9 @@ bool MyMoneyTransaction::operator == (const MyMoneyTransaction& right) const (m_postDate == right.m_postDate) ); } -bool MyMoneyTransaction::accountReferenced(const QString& id) const +bool MyMoneyTransaction::accountReferenced(const TQString& id) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).accountId() == id) @@ -119,7 +119,7 @@ void MyMoneyTransaction::addSplit(MyMoneySplit& split) throw new MYMONEYEXCEPTION("Cannot add split with assigned id (" + split.id() + ")"); /* - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; // if the account referenced in this split is already // referenced in another split, we add the amount of @@ -151,9 +151,9 @@ void MyMoneyTransaction::modifySplit(MyMoneySplit& split) // by another split, the values will be added and the // duplicate removed. /* - QValueList<MyMoneySplit>::Iterator it; - QValueList<MyMoneySplit>::Iterator self = m_splits.end(); - QValueList<MyMoneySplit>::Iterator dup = self; + TQValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator self = m_splits.end(); + TQValueList<MyMoneySplit>::Iterator dup = self; bool duplicateAccount = false; for(it = m_splits.begin(); it != m_splits.end(); ++it) { @@ -181,19 +181,19 @@ void MyMoneyTransaction::modifySplit(MyMoneySplit& split) if(split.accountId().isEmpty()) throw new MYMONEYEXCEPTION("Cannot modify split that does not contain an account reference"); - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if(split.id() == (*it).id()) { *it = split; return; } } - throw new MYMONEYEXCEPTION(QString("Invalid split id '%1'").arg(split.id())); + throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").tqarg(split.id())); } void MyMoneyTransaction::removeSplit(const MyMoneySplit& split) { - QValueList<MyMoneySplit>::Iterator it; + TQValueList<MyMoneySplit>::Iterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if(split.id() == (*it).id()) { @@ -202,7 +202,7 @@ void MyMoneyTransaction::removeSplit(const MyMoneySplit& split) } } if(it == m_splits.end()) - throw new MYMONEYEXCEPTION(QString("Invalid split id '%1'").arg(split.id())); + throw new MYMONEYEXCEPTION(TQString("Invalid split id '%1'").tqarg(split.id())); } void MyMoneyTransaction::removeSplits(void) @@ -211,20 +211,20 @@ void MyMoneyTransaction::removeSplits(void) m_nextSplitID = 1; } -const MyMoneySplit& MyMoneyTransaction::splitByPayee(const QString& payeeId) const +const MyMoneySplit& MyMoneyTransaction::splitByPayee(const TQString& payeeId) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).payeeId() == payeeId) return *it; } - throw new MYMONEYEXCEPTION(QString("Split not found for payee '%1'").arg(QString(payeeId))); + throw new MYMONEYEXCEPTION(TQString("Split not found for payee '%1'").tqarg(TQString(payeeId))); } -const MyMoneySplit& MyMoneyTransaction::splitByAccount(const QString& accountId, const bool match) const +const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQString& accountId, const bool match) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if(match == true && (*it).accountId() == accountId) @@ -232,51 +232,51 @@ const MyMoneySplit& MyMoneyTransaction::splitByAccount(const QString& accountId, if(match == false && (*it).accountId() != accountId) return *it; } - throw new MYMONEYEXCEPTION(QString("Split not found for account %1%2").arg(match?"":"!").arg(QString(accountId))); + throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%2").tqarg(match?"":"!").tqarg(TQString(accountId))); } -const MyMoneySplit& MyMoneyTransaction::splitByAccount(const QStringList& accountIds, const bool match) const +const MyMoneySplit& MyMoneyTransaction::splitByAccount(const TQStringList& accountIds, const bool match) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { - if(match == true && accountIds.contains((*it).accountId()) ) + if(match == true && accountIds.tqcontains((*it).accountId()) ) return *it; - if(match == false && !accountIds.contains((*it).accountId())) + if(match == false && !accountIds.tqcontains((*it).accountId())) return *it; } - throw new MYMONEYEXCEPTION(QString("Split not found for account %1%1...%2").arg(match?"":"!").arg(accountIds.front(),accountIds.back())); + throw new MYMONEYEXCEPTION(TQString("Split not found for account %1%1...%2").tqarg(match?"":"!").tqarg(accountIds.front(),accountIds.back())); } -const MyMoneySplit& MyMoneyTransaction::splitById(const QString& splitId) const +const MyMoneySplit& MyMoneyTransaction::splitById(const TQString& splitId) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).id() == splitId) return *it; } - throw new MYMONEYEXCEPTION(QString("Split not found for id '%1'").arg(QString(splitId))); + throw new MYMONEYEXCEPTION(TQString("Split not found for id '%1'").tqarg(TQString(splitId))); } -const QString MyMoneyTransaction::nextSplitID() +const TQString MyMoneyTransaction::nextSplitID() { - QString id; - id = "S" + id.setNum(m_nextSplitID++).rightJustify(SPLIT_ID_SIZE, '0'); + TQString id; + id = "S" + TQString(id.setNum(m_nextSplitID++)).rightJustify(SPLIT_ID_SIZE, '0'); return id; } -const QString MyMoneyTransaction::firstSplitID() +const TQString MyMoneyTransaction::firstSplitID() { - QString id; - id = "S" + id.setNum(1).rightJustify(SPLIT_ID_SIZE, '0'); + TQString id; + id = "S" + TQString(id.setNum(1)).rightJustify(SPLIT_ID_SIZE, '0'); return id; } const MyMoneyMoney MyMoneyTransaction::splitSum(void) const { MyMoneyMoney result(0); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { result += (*it).value(); @@ -284,14 +284,14 @@ const MyMoneyMoney MyMoneyTransaction::splitSum(void) const return result; } -void MyMoneyTransaction::setPostDate(const QDate& date) { m_postDate = date; } -void MyMoneyTransaction::setEntryDate(const QDate& date) { m_entryDate = date; } -void MyMoneyTransaction::setMemo(const QString& memo) { m_memo = memo; } +void MyMoneyTransaction::setPostDate(const TQDate& date) { m_postDate = date; } +void MyMoneyTransaction::setEntryDate(const TQDate& date) { m_entryDate = date; } +void MyMoneyTransaction::setMemo(const TQString& memo) { m_memo = memo; } bool MyMoneyTransaction::isLoanPayment(void) const { try { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).isAmortizationSplit()) @@ -307,7 +307,7 @@ const MyMoneySplit& MyMoneyTransaction::amortizationSplit(void) const { static MyMoneySplit nullSplit; - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).isAmortizationSplit() && (*it).isAutoCalc()) @@ -320,7 +320,7 @@ const MyMoneySplit& MyMoneyTransaction::interestSplit(void) const { static MyMoneySplit nullSplit; - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).isInterestSplit() && (*it).isAutoCalc()) @@ -329,12 +329,12 @@ const MyMoneySplit& MyMoneyTransaction::interestSplit(void) const return nullSplit; } -unsigned long MyMoneyTransaction::hash(const QString& txt, unsigned long h) +unsigned long MyMoneyTransaction::hash(const TQString& txt, unsigned long h) { unsigned long g; for(unsigned i=0; i < txt.length(); ++i) { - unsigned short uc = txt[i].unicode(); + unsigned short uc = txt[i].tqunicode(); for(unsigned j = 0; j < 2; ++j) { unsigned char c = uc & 0xff; // if either the cell or the row of the Unicode char is 0, stop processing @@ -358,7 +358,7 @@ bool MyMoneyTransaction::isStockSplit(void) const bool MyMoneyTransaction::isImported(void) const { - return value("Imported").lower() == QString("true"); + return value("Imported").lower() == TQString("true"); } void MyMoneyTransaction::setImported(bool state) @@ -384,7 +384,7 @@ bool MyMoneyTransaction::isDuplicate(const MyMoneyTransaction& r) const for(int i = 0; i < 2; ++i) accHash[i] = valHash[i] = numHash[i] = 0; - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = splits().begin(); it != splits().end(); ++it) { accHash[0] += hash((*it).accountId()); valHash[0] += hash((*it).value().formatMoney("", 4)); @@ -408,9 +408,9 @@ bool MyMoneyTransaction::isDuplicate(const MyMoneyTransaction& r) const return rc; } -void MyMoneyTransaction::writeXML(QDomDocument& document, QDomElement& parent) const +void MyMoneyTransaction::writeXML(TQDomDocument& document, TQDomElement& tqparent) const { - QDomElement el = document.createElement("TRANSACTION"); + TQDomElement el = document.createElement("TRANSACTION"); writeBaseXML(document, el); @@ -419,8 +419,8 @@ void MyMoneyTransaction::writeXML(QDomDocument& document, QDomElement& parent) c el.setAttribute("entrydate", dateToString(m_entryDate)); el.setAttribute("commodity", m_commodity); - QDomElement splits = document.createElement("SPLITS"); - QValueList<MyMoneySplit>::ConstIterator it; + TQDomElement splits = document.createElement("SPLITS"); + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { (*it).writeXML(document, splits); } @@ -428,12 +428,12 @@ void MyMoneyTransaction::writeXML(QDomDocument& document, QDomElement& parent) c MyMoneyKeyValueContainer::writeXML(document, el); - parent.appendChild(el); + tqparent.appendChild(el); } -bool MyMoneyTransaction::hasReferenceTo(const QString& id) const +bool MyMoneyTransaction::hasReferenceTo(const TQString& id) const { - QValueList<MyMoneySplit>::const_iterator it; + TQValueList<MyMoneySplit>::const_iterator it; bool rc = (id == m_commodity); for(it = m_splits.begin(); rc == false && it != m_splits.end(); ++it) { rc = (*it).hasReferenceTo(id); @@ -443,7 +443,7 @@ bool MyMoneyTransaction::hasReferenceTo(const QString& id) const bool MyMoneyTransaction::hasAutoCalcSplit(void) const { - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = m_splits.begin(); it != m_splits.end(); ++it) { if((*it).isAutoCalc()) @@ -452,33 +452,33 @@ bool MyMoneyTransaction::hasAutoCalcSplit(void) const return false; } -QString MyMoneyTransaction::accountSignature(bool includeSplitCount) const +TQString MyMoneyTransaction::accountSignature(bool includeSplitCount) const { - QMap<QString, int> accountList; - QValueList<MyMoneySplit>::const_iterator it_s; + TQMap<TQString, int> accountList; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_splits.begin(); it_s != m_splits.end(); ++it_s) { accountList[(*it_s).accountId()] += 1; } - QMap<QString, int>::const_iterator it_a; - QString rc; + TQMap<TQString, int>::const_iterator it_a; + TQString rc; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { if(it_a != accountList.begin()) rc += "-"; rc += it_a.key(); if(includeSplitCount) - rc += QString("*%1").arg(*it_a); + rc += TQString("*%1").tqarg(*it_a); } return rc; } -QString MyMoneyTransaction::uniqueSortKey(void) const +TQString MyMoneyTransaction::uniqueSortKey(void) const { - QString year, month, day, key; - const QDate& postdate = postDate(); - year = year.setNum(postdate.year()).rightJustify(YEAR_SIZE, '0'); - month = month.setNum(postdate.month()).rightJustify(MONTH_SIZE, '0'); - day = day.setNum(postdate.day()).rightJustify(DAY_SIZE, '0'); + TQString year, month, day, key; + const TQDate& postdate = postDate(); + year = TQString(year.setNum(postdate.year())).rightJustify(YEAR_SIZE, '0'); + month = TQString(month.setNum(postdate.month())).rightJustify(MONTH_SIZE, '0'); + day = TQString(day.setNum(postdate.day())).rightJustify(DAY_SIZE, '0'); key = year + "-" + month + "-" + day + "-" + m_id; return key; } diff --git a/kmymoney2/mymoney/mymoneytransaction.h b/kmymoney2/mymoney/mymoneytransaction.h index ce52779..21c28ea 100644 --- a/kmymoney2/mymoney/mymoneytransaction.h +++ b/kmymoney2/mymoney/mymoneytransaction.h @@ -26,10 +26,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqptrlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -43,7 +43,7 @@ /** * This class represents a transaction within the MyMoneyEngine. A transaction * contains none, one or more splits of type MyMoneySplit. They are stored in - * a QValueList<MyMoneySplit> within this object. A transaction containing only + * a TQValueList<MyMoneySplit> within this object. A transaction containing only * a single split with an amount not equal to 0 is an unbalanced transaction. It * is tolerated by the engine, but in general not a good idea as it is financially * wrong. @@ -52,35 +52,35 @@ class KMYMONEY_EXPORT MyMoneyTransaction : public MyMoneyObject, public MyMoneyK { public: MyMoneyTransaction(); - MyMoneyTransaction(const QString id, + MyMoneyTransaction(const TQString id, const MyMoneyTransaction& transaction); /** - * @param node reference to QDomNode - * @param forceId see MyMoneyObject(const QDomElement&, const bool) + * @param node reference to TQDomNode + * @param forceId see MyMoneyObject(const TQDomElement&, const bool) */ - MyMoneyTransaction(const QDomElement& node, const bool forceId = true); + MyMoneyTransaction(const TQDomElement& node, const bool forceId = true); ~MyMoneyTransaction(); public: - friend QDataStream &operator<<(QDataStream &, MyMoneyTransaction &); - friend QDataStream &operator>>(QDataStream &, MyMoneyTransaction &); + friend TQDataStream &operator<<(TQDataStream &, MyMoneyTransaction &); + friend TQDataStream &operator>>(TQDataStream &, MyMoneyTransaction &); // Simple get operations - const QDate& entryDate(void) const { return m_entryDate; }; - const QDate& postDate(void) const { return m_postDate; }; - const QString& memo(void) const { return m_memo; }; - const QValueList<MyMoneySplit>& splits(void) const { return m_splits; }; - QValueList<MyMoneySplit>& splits(void) { return m_splits; }; + const TQDate& entryDate(void) const { return m_entryDate; }; + const TQDate& postDate(void) const { return m_postDate; }; + const TQString& memo(void) const { return m_memo; }; + const TQValueList<MyMoneySplit>& splits(void) const { return m_splits; }; + TQValueList<MyMoneySplit>& splits(void) { return m_splits; }; unsigned int splitCount(void) const { return m_splits.count(); }; - const QString& commodity(void) const { return m_commodity; }; - const QString& bankID(void) const /*__attribute__ ((deprecated))*/ { return m_bankID; }; + const TQString& commodity(void) const { return m_commodity; }; + const TQString& bankID(void) const /*__attribute__ ((deprecated))*/ { return m_bankID; }; // Simple set operations - void setPostDate(const QDate& date); - void setEntryDate(const QDate& date); - void setMemo(const QString& memo); - void setCommodity(const QString& commodityId) { m_commodity = commodityId; }; - void setBankID(const QString& bankID) /*__attribute__ ((deprecated))*/ { m_bankID = bankID; }; + void setPostDate(const TQDate& date); + void setEntryDate(const TQDate& date); + void setMemo(const TQString& memo); + void setCommodity(const TQString& commodityId) { m_commodity = commodityId; }; + void setBankID(const TQString& bankID) /*__attribute__ ((deprecated))*/ { m_bankID = bankID; }; bool operator == (const MyMoneyTransaction&) const; inline bool operator != (const MyMoneyTransaction& r) const { return !(*this == r); }; @@ -100,7 +100,7 @@ public: * * @return reference to split within the transaction is returned */ - const MyMoneySplit& splitByAccount(const QString& accountId, const bool match = true) const; + const MyMoneySplit& splitByAccount(const TQString& accountId, const bool match = true) const; /** * This method is essentially the same as the previous method, except that @@ -112,7 +112,7 @@ public: * * @return reference to split within the transaction is returned */ - const MyMoneySplit& splitByAccount(const QStringList& accountIds, const bool match = true) const; + const MyMoneySplit& splitByAccount(const TQStringList& accountIds, const bool match = true) const; /** * This method is used to extract a split from a transaction. @@ -121,7 +121,7 @@ public: * * @return reference to split within the transaction is returned */ - const MyMoneySplit& splitById(const QString& splitId) const; + const MyMoneySplit& splitById(const TQString& splitId) const; /** * This method is used to extract a split for a given payeeId @@ -131,7 +131,7 @@ public: * * @return reference to split within the transaction is returned */ - const MyMoneySplit& splitByPayee(const QString& payeeId) const; + const MyMoneySplit& splitByPayee(const TQString& payeeId) const; /** * This method is used to check if the given account is used @@ -139,7 +139,7 @@ public: * * @param id account id that should be checked for usage */ - bool accountReferenced(const QString& id) const; + bool accountReferenced(const TQString& id) const; /** * This method is used to add a split to the transaction. The split @@ -237,11 +237,11 @@ public: * out the split that references the account through which a transaction * was entered. * - * @return QString with ID of the first split of transactions + * @return TQString with ID of the first split of transactions */ - static const QString firstSplitID(void); + static const TQString firstSplitID(void); - void writeXML(QDomDocument& document, QDomElement& parent) const; + void writeXML(TQDomDocument& document, TQDomElement& tqparent) const; /** * This method checks if a reference to the given object exists. It returns, @@ -252,7 +252,7 @@ public: * @retval true This object references object with id @p id. * @retval false This object does not reference the object with id @p id. */ - virtual bool hasReferenceTo(const QString& id) const; + virtual bool hasReferenceTo(const TQString& id) const; /** * Checks whether any split contains an autocalc split. @@ -277,9 +277,9 @@ public: * the number of splits referencing this account. The default for * this parameter is @p false. */ - QString accountSignature(bool includeSplitCount = false) const; + TQString accountSignature(bool includeSplitCount = false) const; - QString uniqueSortKey(void) const; + TQString uniqueSortKey(void) const; /** * This module implements an algorithm used by P.J. Weinberger @@ -293,13 +293,13 @@ public: * @param h initial hash value (default 0) * @return non-unique hash value of the text @p txt */ - static unsigned long hash(const QString& txt, unsigned long h = 0); + static unsigned long hash(const TQString& txt, unsigned long h = 0); private: /** * This method returns the next id to be used for a split */ - const QString nextSplitID(void); + const TQString nextSplitID(void); private: static const int SPLIT_ID_SIZE = 4; @@ -308,22 +308,22 @@ private: * This member contains the date when the transaction was entered * into the engine */ - QDate m_entryDate; + TQDate m_entryDate; /** * This member contains the date the transaction was posted */ - QDate m_postDate; + TQDate m_postDate; /** * This member keeps the memo text associated with this transaction */ - QString m_memo; + TQString m_memo; /** * This member contains the splits for this transaction */ - QValueList<MyMoneySplit> m_splits; + TQValueList<MyMoneySplit> m_splits; /** * This member keeps the unique numbers of splits within this @@ -335,7 +335,7 @@ private: /** * This member keeps the base commodity (e.g. currency) for this transaction */ - QString m_commodity; + TQString m_commodity; /** * This member keeps the bank's unique ID for the transaction, so we can @@ -343,7 +343,7 @@ private: * * Note this is now deprecated! Bank ID's should be set on splits, not transactions. */ - QString m_bankID; + TQString m_bankID; /** constants for unique sort key */ static const int YEAR_SIZE = 4; diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.cpp b/kmymoney2/mymoney/mymoneytransactionfilter.cpp index 317400d..d6f4b6a 100644 --- a/kmymoney2/mymoney/mymoneytransactionfilter.cpp +++ b/kmymoney2/mymoney/mymoneytransactionfilter.cpp @@ -40,7 +40,7 @@ MyMoneyTransactionFilter::MyMoneyTransactionFilter() m_invertText = false; } -MyMoneyTransactionFilter::MyMoneyTransactionFilter(const QString& id) +MyMoneyTransactionFilter::MyMoneyTransactionFilter(const TQString& id) { m_filterSet.allFilter = 0; m_reportAllSplits = false; @@ -66,8 +66,8 @@ void MyMoneyTransactionFilter::clear(void) m_states.clear(); m_validity.clear(); m_matchingSplits.clear(); - m_fromDate = QDate(); - m_toDate = QDate(); + m_fromDate = TQDate(); + m_toDate = TQDate(); } void MyMoneyTransactionFilter::clearAccountFilter(void) @@ -76,26 +76,26 @@ void MyMoneyTransactionFilter::clearAccountFilter(void) m_accounts.clear(); } -void MyMoneyTransactionFilter::setTextFilter(const QRegExp& text, bool invert) +void MyMoneyTransactionFilter::setTextFilter(const TQRegExp& text, bool invert) { m_filterSet.singleFilter.textFilter = 1; m_invertText = invert; m_text = text; } -void MyMoneyTransactionFilter::addAccount(const QStringList& ids) +void MyMoneyTransactionFilter::addAccount(const TQStringList& ids) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; m_filterSet.singleFilter.accountFilter = 1; for(it = ids.begin(); it != ids.end(); ++it) addAccount(*it); } -void MyMoneyTransactionFilter::addAccount(const QString& id) +void MyMoneyTransactionFilter::addAccount(const TQString& id) { if(!m_accounts.isEmpty() && !id.isEmpty()) { - if(m_accounts.find(id) != 0) + if(m_accounts.tqfind(id) != 0) return; } if(m_accounts.count() >= m_accounts.size()*2) { @@ -106,19 +106,19 @@ void MyMoneyTransactionFilter::addAccount(const QString& id) m_accounts.insert(id, ""); } -void MyMoneyTransactionFilter::addCategory(const QStringList& ids) +void MyMoneyTransactionFilter::addCategory(const TQStringList& ids) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; m_filterSet.singleFilter.categoryFilter = 1; for(it = ids.begin(); it != ids.end(); ++it) addCategory(*it); } -void MyMoneyTransactionFilter::addCategory(const QString& id) +void MyMoneyTransactionFilter::addCategory(const TQString& id) { if(!m_categories.isEmpty() && !id.isEmpty()) { - if(m_categories.find(id) != 0) + if(m_categories.tqfind(id) != 0) return; } if(m_categories.count() >= m_categories.size()*2) { @@ -129,7 +129,7 @@ void MyMoneyTransactionFilter::addCategory(const QString& id) m_categories.insert(id, ""); } -void MyMoneyTransactionFilter::setDateFilter(const QDate& from, const QDate& to) +void MyMoneyTransactionFilter::setDateFilter(const TQDate& from, const TQDate& to) { m_filterSet.singleFilter.dateFilter = from.isValid() | to.isValid(); m_fromDate = from; @@ -150,10 +150,10 @@ void MyMoneyTransactionFilter::setAmountFilter(const MyMoneyMoney& from, const M } } -void MyMoneyTransactionFilter::addPayee(const QString& id) +void MyMoneyTransactionFilter::addPayee(const TQString& id) { if(!m_payees.isEmpty() && !id.isEmpty()) { - if(m_payees.find(id) != 0) + if(m_payees.tqfind(id) != 0) return; } if(m_payees.count() >= m_payees.size()*2) { @@ -167,11 +167,11 @@ void MyMoneyTransactionFilter::addPayee(const QString& id) void MyMoneyTransactionFilter::addType(const int type) { if(!m_types.isEmpty()) { - if(m_types.find(type) != 0) + if(m_types.tqfind(type) != 0) return; } // we don't have more than 4 or 5 types, so we don't worry about - // the size of the QIntDict object. + // the size of the TQIntDict object. m_filterSet.singleFilter.typeFilter = 1; m_types.insert(type, ""); } @@ -179,11 +179,11 @@ void MyMoneyTransactionFilter::addType(const int type) void MyMoneyTransactionFilter::addState(const int state) { if(!m_states.isEmpty()) { - if(m_states.find(state) != 0) + if(m_states.tqfind(state) != 0) return; } // we don't have more than 4 or 5 states, so we don't worry about - // the size of the QIntDict object. + // the size of the TQIntDict object. m_filterSet.singleFilter.stateFilter = 1; m_states.insert(state, ""); } @@ -191,16 +191,16 @@ void MyMoneyTransactionFilter::addState(const int state) void MyMoneyTransactionFilter::addValidity(const int type) { if(!m_validity.isEmpty()) { - if(m_validity.find(type) != 0) + if(m_validity.tqfind(type) != 0) return; } // we don't have more than 4 or 5 states, so we don't worry about - // the size of the QIntDict object. + // the size of the TQIntDict object. m_filterSet.singleFilter.validityFilter = 1; m_validity.insert(type, ""); } -void MyMoneyTransactionFilter::setNumberFilter(const QString& from, const QString& to) +void MyMoneyTransactionFilter::setNumberFilter(const TQString& from, const TQString& to) { m_filterSet.singleFilter.nrFilter = 1; m_fromNr = from; @@ -217,7 +217,7 @@ void MyMoneyTransactionFilter::setConsiderCategory(const bool check) m_considerCategory = check; } -const QValueList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits(void) const +const TQValueList<MyMoneySplit>& MyMoneyTransactionFilter::matchingSplits(void) const { return m_matchingSplits; } @@ -230,18 +230,18 @@ bool MyMoneyTransactionFilter::matchText(const MyMoneySplit * const sp) const MyMoneyFile* file = MyMoneyFile::instance(); const MyMoneyAccount& acc = file->account(sp->accountId()); const MyMoneySecurity& sec = file->security(acc.currencyId()); - if(sp->memo().contains(m_text) - || sp->shares().formatMoney(acc.fraction(sec)).contains(m_text) - || sp->value().formatMoney(acc.fraction(sec)).contains(m_text) - || sp->number().contains(m_text)) + if(sp->memo().tqcontains(m_text) + || sp->shares().formatMoney(acc.fraction(sec)).tqcontains(m_text) + || sp->value().formatMoney(acc.fraction(sec)).tqcontains(m_text) + || sp->number().tqcontains(m_text)) return !m_invertText; - if(acc.name().contains(m_text)) + if(acc.name().tqcontains(m_text)) return !m_invertText; if(!sp->payeeId().isEmpty()) { const MyMoneyPayee& payee = file->payee(sp->payeeId()); - if(payee.name().contains(m_text)) + if(payee.name().tqcontains(m_text)) return !m_invertText; } return m_invertText; @@ -268,7 +268,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneySplit * const sp) const bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; m_matchingSplits.clear(); @@ -286,12 +286,12 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the date range if(m_filterSet.singleFilter.dateFilter) { - if(m_fromDate != QDate()) { + if(m_fromDate != TQDate()) { if(transaction.postDate() < m_fromDate) return false; } - if(m_toDate != QDate()) { + if(m_toDate != TQDate()) { if(transaction.postDate() > m_toDate) return false; } @@ -300,7 +300,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // construct a local list of pointers to all splits and // remove the ones that do not match account and/or categories. - QPtrList<MyMoneySplit> matchingSplits; + TQPtrList<MyMoneySplit> matchingSplits; for(it = transaction.splits().begin(); it != transaction.splits().end(); ++it) { matchingSplits.append(&(*it)); } @@ -312,7 +312,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the transaction's validity if(m_filterSet.singleFilter.validityFilter) { if(m_validity.count() > 0) { - if(!m_validity.find(validTransaction(transaction))) + if(!m_validity.tqfind(validTransaction(transaction))) return false; } } @@ -332,7 +332,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check if the split references one of the categories in the list if(m_filterSet.singleFilter.categoryFilter) { if(m_categories.count() > 0) { - if(m_categories.find(sp->accountId())) { + if(m_categories.tqfind(sp->accountId())) { categoryMatched = true; removeSplit = 0; } @@ -347,7 +347,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check if the split references one of the accounts in the list if(m_filterSet.singleFilter.accountFilter) { if(m_accounts.count() > 0) { - if(m_accounts.find(sp->accountId())) { + if(m_accounts.tqfind(sp->accountId())) { accountMatched = true; removeSplit = 0; } @@ -361,7 +361,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) } else { if(m_filterSet.singleFilter.accountFilter) { if(m_accounts.count() > 0) { - if(m_accounts.find(sp->accountId())) { + if(m_accounts.tqfind(sp->accountId())) { accountMatched = true; removeSplit = 0; } @@ -420,7 +420,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the payee list if(!removeSplit && m_filterSet.singleFilter.payeeFilter) { if(m_payees.count() > 0) { - if(sp->payeeId().isEmpty() || !m_payees.find(sp->payeeId())) + if(sp->payeeId().isEmpty() || !m_payees.tqfind(sp->payeeId())) removeSplit = sp; } else if(!sp->payeeId().isEmpty()) removeSplit = sp; @@ -429,7 +429,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the type list if(!removeSplit && m_filterSet.singleFilter.typeFilter) { if(m_types.count() > 0) { - if(!m_types.find(splitType(transaction, *sp))) + if(!m_types.tqfind(splitType(transaction, *sp))) removeSplit = sp; } } @@ -437,7 +437,7 @@ bool MyMoneyTransactionFilter::match(const MyMoneyTransaction& transaction) // check the state list if(!removeSplit && m_filterSet.singleFilter.stateFilter) { if(m_states.count() > 0) { - if(!m_states.find(splitState(*sp))) + if(!m_states.tqfind(splitState(*sp))) removeSplit = sp; } } @@ -512,7 +512,7 @@ int MyMoneyTransactionFilter::splitType(const MyMoneyTransaction& t, const MyMon return allTypes; if(t.splitCount() == 2) { - QString ida, idb; + TQString ida, idb; ida = t.splits()[0].accountId(); idb = t.splits()[1].accountId(); @@ -533,7 +533,7 @@ int MyMoneyTransactionFilter::splitType(const MyMoneyTransaction& t, const MyMon MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransaction(const MyMoneyTransaction& t) const { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; MyMoneyMoney val; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { @@ -542,22 +542,22 @@ MyMoneyTransactionFilter::validityOptionE MyMoneyTransactionFilter::validTransac return (val == MyMoneyMoney(0,1)) ? valid : invalid; } -bool MyMoneyTransactionFilter::includesCategory( const QString& cat ) const +bool MyMoneyTransactionFilter::includesCategory( const TQString& cat ) const { - return (! m_filterSet.singleFilter.categoryFilter) || m_categories.find( cat ); + return (! m_filterSet.singleFilter.categoryFilter) || m_categories.tqfind( cat ); } -bool MyMoneyTransactionFilter::includesAccount( const QString& acc ) const +bool MyMoneyTransactionFilter::includesAccount( const TQString& acc ) const { - return (! m_filterSet.singleFilter.accountFilter) || m_accounts.find( acc ); + return (! m_filterSet.singleFilter.accountFilter) || m_accounts.tqfind( acc ); } -bool MyMoneyTransactionFilter::includesPayee( const QString& pye ) const +bool MyMoneyTransactionFilter::includesPayee( const TQString& pye ) const { - return (! m_filterSet.singleFilter.payeeFilter) || m_payees.find( pye ); + return (! m_filterSet.singleFilter.payeeFilter) || m_payees.tqfind( pye ); } -bool MyMoneyTransactionFilter::dateFilter( QDate& from, QDate& to ) const +bool MyMoneyTransactionFilter::dateFilter( TQDate& from, TQDate& to ) const { from = m_fromDate; to = m_toDate; @@ -571,20 +571,20 @@ bool MyMoneyTransactionFilter::amountFilter( MyMoneyMoney& from, MyMoneyMoney& t return m_filterSet.singleFilter.amountFilter==1; } -bool MyMoneyTransactionFilter::numberFilter( QString& from, QString& to ) const +bool MyMoneyTransactionFilter::numberFilter( TQString& from, TQString& to ) const { from = m_fromNr; to = m_toNr; return m_filterSet.singleFilter.nrFilter==1; } -bool MyMoneyTransactionFilter::payees(QStringList& list) const +bool MyMoneyTransactionFilter::payees(TQStringList& list) const { bool result = m_filterSet.singleFilter.payeeFilter; if ( result ) { - QAsciiDictIterator<char> it_payee( m_payees ); + TQAsciiDictIterator<char> it_payee( m_payees ); while ( it_payee.current() ) { list += it_payee.currentKey(); @@ -594,16 +594,16 @@ bool MyMoneyTransactionFilter::payees(QStringList& list) const return result; } -bool MyMoneyTransactionFilter::accounts(QStringList& list) const +bool MyMoneyTransactionFilter::accounts(TQStringList& list) const { bool result = m_filterSet.singleFilter.accountFilter; if ( result ) { - QAsciiDictIterator<char> it_account( m_accounts ); + TQAsciiDictIterator<char> it_account( m_accounts ); while ( it_account.current() ) { - QString account = it_account.currentKey(); + TQString account = it_account.currentKey(); list += account; ++it_account; } @@ -611,13 +611,13 @@ bool MyMoneyTransactionFilter::accounts(QStringList& list) const return result; } -bool MyMoneyTransactionFilter::categories(QStringList& list) const +bool MyMoneyTransactionFilter::categories(TQStringList& list) const { bool result = m_filterSet.singleFilter.categoryFilter; if ( result ) { - QAsciiDictIterator<char> it_category( m_categories ); + TQAsciiDictIterator<char> it_category( m_categories ); while ( it_category.current() ) { list += it_category.currentKey(); @@ -627,13 +627,13 @@ bool MyMoneyTransactionFilter::categories(QStringList& list) const return result; } -bool MyMoneyTransactionFilter::types(QValueList<int>& list) const +bool MyMoneyTransactionFilter::types(TQValueList<int>& list) const { bool result = m_filterSet.singleFilter.typeFilter; if ( result ) { - QIntDictIterator<char> it_type( m_types ); + TQIntDictIterator<char> it_type( m_types ); while ( it_type.current() ) { list += it_type.currentKey(); @@ -643,13 +643,13 @@ bool MyMoneyTransactionFilter::types(QValueList<int>& list) const return result; } -bool MyMoneyTransactionFilter::states(QValueList<int>& list) const +bool MyMoneyTransactionFilter::states(TQValueList<int>& list) const { bool result = m_filterSet.singleFilter.stateFilter; if ( result ) { - QIntDictIterator<char> it_state( m_states ); + TQIntDictIterator<char> it_state( m_states ); while ( it_state.current() ) { list += it_state.currentKey(); @@ -665,7 +665,7 @@ bool MyMoneyTransactionFilter::firstType(int&i) const if ( result ) { - QIntDictIterator<char> it_type( m_types ); + TQIntDictIterator<char> it_type( m_types ); if ( it_type.current() ) i = it_type.currentKey(); } @@ -678,14 +678,14 @@ bool MyMoneyTransactionFilter::firstState(int&i) const if ( result ) { - QIntDictIterator<char> it_state( m_states ); + TQIntDictIterator<char> it_state( m_states ); if ( it_state.current() ) i = it_state.currentKey(); } return result; } -bool MyMoneyTransactionFilter::textFilter(QRegExp& exp) const +bool MyMoneyTransactionFilter::textFilter(TQRegExp& exp) const { exp = m_text; return m_filterSet.singleFilter.textFilter == 1; @@ -693,7 +693,7 @@ bool MyMoneyTransactionFilter::textFilter(QRegExp& exp) const void MyMoneyTransactionFilter::setDateFilter(dateOptionE range) { - QDate from, to; + TQDate from, to; if ( translateDateRange(range,from,to) ) setDateFilter(from,to); } @@ -707,132 +707,132 @@ void MyMoneyTransactionFilter::setFiscalYearStart(int firstMonth, int firstDay) fiscalYearStartDay = firstDay; } -bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, QDate& start, QDate& end) +bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, TQDate& start, TQDate& end) { bool rc = true; int yr, mon, day; - yr = QDate::currentDate().year(); - mon = QDate::currentDate().month(); - day = QDate::currentDate().day(); - QDate tmp; + yr = TQDate::tqcurrentDate().year(); + mon = TQDate::tqcurrentDate().month(); + day = TQDate::tqcurrentDate().day(); + TQDate tmp; switch(id) { case MyMoneyTransactionFilter::allDates: - start = QDate(); - end = QDate(); + start = TQDate(); + end = TQDate(); break; case MyMoneyTransactionFilter::asOfToday: - start = QDate(); - end = QDate::currentDate(); + start = TQDate(); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::currentMonth: - start = QDate(yr,mon,1); - end = QDate(yr,mon,1).addMonths(1).addDays(-1); + start = TQDate(yr,mon,1); + end = TQDate(yr,mon,1).addMonths(1).addDays(-1); break; case MyMoneyTransactionFilter::currentYear: - start = QDate(yr,1,1); - end = QDate(yr,12,31); + start = TQDate(yr,1,1); + end = TQDate(yr,12,31); break; case MyMoneyTransactionFilter::monthToDate: - start = QDate(yr,mon,1); - end = QDate::currentDate(); + start = TQDate(yr,mon,1); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::yearToDate: - start = QDate(yr,1,1); - end = QDate::currentDate(); + start = TQDate(yr,1,1); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::yearToMonth: - start = QDate(yr,1,1); - end = QDate(yr,mon,1).addDays(-1); + start = TQDate(yr,1,1); + end = TQDate(yr,mon,1).addDays(-1); break; case MyMoneyTransactionFilter::lastMonth: - start = QDate(yr,mon,1).addMonths(-1); - end = QDate(yr,mon,1).addDays(-1); + start = TQDate(yr,mon,1).addMonths(-1); + end = TQDate(yr,mon,1).addDays(-1); break; case MyMoneyTransactionFilter::lastYear: - start = QDate(yr,1,1).addYears(-1); - end = QDate(yr,12,31).addYears(-1); + start = TQDate(yr,1,1).addYears(-1); + end = TQDate(yr,12,31).addYears(-1); break; case MyMoneyTransactionFilter::last7Days: - start = QDate::currentDate().addDays(-7); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate().addDays(-7); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::last30Days: - start = QDate::currentDate().addDays(-30); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate().addDays(-30); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::last3Months: - start = QDate::currentDate().addMonths(-3); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate().addMonths(-3); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::last6Months: - start = QDate::currentDate().addMonths(-6); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate().addMonths(-6); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::last11Months: - start = QDate(yr,mon,1).addMonths(-12); - end = QDate(yr,mon,1).addDays(-1); + start = TQDate(yr,mon,1).addMonths(-12); + end = TQDate(yr,mon,1).addDays(-1); break; case MyMoneyTransactionFilter::last12Months: - start = QDate::currentDate().addMonths(-12); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate().addMonths(-12); + end = TQDate::tqcurrentDate(); break; case MyMoneyTransactionFilter::next7Days: - start = QDate::currentDate(); - end = QDate::currentDate().addDays(7); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate().addDays(7); break; case MyMoneyTransactionFilter::next30Days: - start = QDate::currentDate(); - end = QDate::currentDate().addDays(30); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate().addDays(30); break; case MyMoneyTransactionFilter::next3Months: - start = QDate::currentDate(); - end = QDate::currentDate().addMonths(3); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate().addMonths(3); break; case MyMoneyTransactionFilter::next6Months: - start = QDate::currentDate(); - end = QDate::currentDate().addMonths(6); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate().addMonths(6); break; case MyMoneyTransactionFilter::next12Months: - start = QDate::currentDate(); - end = QDate::currentDate().addMonths(12); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate().addMonths(12); break; case MyMoneyTransactionFilter::userDefined: - start = QDate(); - end = QDate(); + start = TQDate(); + end = TQDate(); break; case MyMoneyTransactionFilter::last3ToNext3Months: - start = QDate::currentDate().addMonths(-3); - end = QDate::currentDate().addMonths(3); + start = TQDate::tqcurrentDate().addMonths(-3); + end = TQDate::tqcurrentDate().addMonths(3); break; case MyMoneyTransactionFilter::currentQuarter: - start = QDate(yr, mon - ((mon-1) % 3), 1); + start = TQDate(yr, mon - ((mon-1) % 3), 1); end = start.addMonths(3).addDays(-1); break; case MyMoneyTransactionFilter::lastQuarter: - start = QDate(yr, mon - ((mon-1) % 3), 1).addMonths(-3); + start = TQDate(yr, mon - ((mon-1) % 3), 1).addMonths(-3); end = start.addMonths(3).addDays(-1); break; case MyMoneyTransactionFilter::nextQuarter: - start = QDate(yr, mon - ((mon-1) % 3), 1).addMonths(3); + start = TQDate(yr, mon - ((mon-1) % 3), 1).addMonths(3); end = start.addMonths(3).addDays(-1); break; case MyMoneyTransactionFilter::currentFiscalYear: - start = QDate(QDate::currentDate().year(), fiscalYearStartMonth, fiscalYearStartDay); - if(QDate::currentDate() < start) + start = TQDate(TQDate::tqcurrentDate().year(), fiscalYearStartMonth, fiscalYearStartDay); + if(TQDate::tqcurrentDate() < start) start = start.addYears(-1); end = start.addYears(1).addDays(-1); break; case MyMoneyTransactionFilter::lastFiscalYear: - start = QDate(QDate::currentDate().year(), fiscalYearStartMonth, fiscalYearStartDay); - if(QDate::currentDate() < start) + start = TQDate(TQDate::tqcurrentDate().year(), fiscalYearStartMonth, fiscalYearStartDay); + if(TQDate::tqcurrentDate() < start) start = start.addYears(-1); start = start.addYears(-1); end = start.addYears(1).addDays(-1); break; case MyMoneyTransactionFilter::today: - start = QDate::currentDate(); - end = QDate::currentDate(); + start = TQDate::tqcurrentDate(); + end = TQDate::tqcurrentDate(); break; default: qFatal("Unknown date identifier %d in MyMoneyTransactionFilter::translateDateRange()", id); @@ -842,16 +842,16 @@ bool MyMoneyTransactionFilter::translateDateRange(dateOptionE id, QDate& start, return rc; } -void MyMoneyTransactionFilter::removeReference(const QString& id) +void MyMoneyTransactionFilter::removeReference(const TQString& id) { - if(m_accounts.find(id)) { - qDebug("%s", (QString("Remove account '%1' from report").arg(id)).data()); + if(m_accounts.tqfind(id)) { + qDebug("%s", (TQString("Remove account '%1' from report").tqarg(id)).data()); m_accounts.remove(id); - } else if(m_categories.find(id)) { - qDebug("%s", (QString("Remove category '%1' from report").arg(id)).data()); + } else if(m_categories.tqfind(id)) { + qDebug("%s", (TQString("Remove category '%1' from report").tqarg(id)).data()); m_categories.remove(id); - } else if(m_payees.find(id)) { - qDebug("%s", (QString("Remove payee '%1' from report").arg(id)).data()); + } else if(m_payees.tqfind(id)) { + qDebug("%s", (TQString("Remove payee '%1' from report").tqarg(id)).data()); m_payees.remove(id); } } diff --git a/kmymoney2/mymoney/mymoneytransactionfilter.h b/kmymoney2/mymoney/mymoneytransactionfilter.h index edad9cc..50226cf 100644 --- a/kmymoney2/mymoney/mymoneytransactionfilter.h +++ b/kmymoney2/mymoney/mymoneytransactionfilter.h @@ -30,12 +30,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qmap.h> -#include <qasciidict.h> -#include <qintdict.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqmap.h> +#include <tqasciidict.h> +#include <tqintdict.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -160,7 +160,7 @@ public: * * @param id reference to account id */ - MyMoneyTransactionFilter(const QString& id); + MyMoneyTransactionFilter(const TQString& id); ~MyMoneyTransactionFilter(); @@ -190,7 +190,7 @@ public: * @param invert If true, value must not be contained in any of the above mentioned fields * */ - void setTextFilter(const QRegExp& exp, bool invert = false); + void setTextFilter(const TQRegExp& exp, bool invert = false); /** * This method will add the account with id @p id to the list of matching accounts. @@ -198,13 +198,13 @@ public: * * @param id internal ID of the account */ - void addAccount(const QString& id); + void addAccount(const TQString& id); /** * This is a convenience method and behaves exactly like the above * method but for a list of id's. */ - void addAccount(const QStringList& ids); + void addAccount(const TQStringList& ids); /** * This method will add the category with id @p id to the list of matching categories. @@ -212,25 +212,25 @@ public: * * @param id internal ID of the account */ - void addCategory(const QString& id); + void addCategory(const TQString& id); /** * This is a convenience method and behaves exactly like the above * method but for a list of id's. */ - void addCategory(const QStringList& ids); + void addCategory(const TQStringList& ids); /** * This method sets the date filter to match only transactions with posting dates in - * the date range specified by @p from and @p to. If @p from equal QDate() - * all transactions with dates prior to @p to match. If @p to equals QDate() + * the date range specified by @p from and @p to. If @p from equal TQDate() + * all transactions with dates prior to @p to match. If @p to equals TQDate() * all transactions with posting dates past @p from match. If @p from and @p to - * are equal QDate() the filter is not activated and all transactions match. + * are equal TQDate() the filter is not activated and all transactions match. * * @param from from date * @param to to date */ - void setDateFilter(const QDate& from, const QDate& to); + void setDateFilter(const TQDate& from, const TQDate& to); void setDateFilter(dateOptionE range); @@ -251,7 +251,7 @@ public: * * @param id internal id of the payee */ - void addPayee(const QString& id); + void addPayee(const TQString& id); /** */ @@ -276,7 +276,7 @@ public: * * @note @p from and @p to can contain alphanumeric text */ - void setNumberFilter(const QString& from, const QString& to); + void setNumberFilter(const TQString& from, const TQString& to); /** * This method is used to check a specific transaction against the filter. @@ -355,27 +355,27 @@ public: * * @note The constructors set m_reportAllSplits differently. Please * see the documentation of the constructors MyMoneyTransactionFilter() - * and MyMoneyTransactionFilter(const QString&) for details. + * and MyMoneyTransactionFilter(const TQString&) for details. */ - const QValueList<MyMoneySplit>& matchingSplits(void) const; + const TQValueList<MyMoneySplit>& matchingSplits(void) const; /** * This method returns the from date set in the filter. If - * no value has been set up for this filter, then QDate() is + * no value has been set up for this filter, then TQDate() is * returned. * * @return returns m_fromDate */ - const QDate fromDate(void) const { return m_fromDate; }; + const TQDate fromDate(void) const { return m_fromDate; }; /** * This method returns the to date set in the filter. If - * no value has been set up for this filter, then QDate() is + * no value has been set up for this filter, then TQDate() is * returned. * * @return returns m_toDate */ - const QDate toDate(void) const { return m_toDate; }; + const TQDate toDate(void) const { return m_toDate; }; /** * This method is used to return information about the @@ -386,7 +386,7 @@ public: * @param cat id of category in question * @return true if category is in filter set, false otherwise */ - bool includesCategory( const QString& cat ) const; + bool includesCategory( const TQString& cat ) const; /** * This method is used to return information about the @@ -397,7 +397,7 @@ public: * @param acc id of account in question * @return true if account is in filter set, false otherwise */ - bool includesAccount( const QString& acc ) const; + bool includesAccount( const TQString& acc ) const; /** * This method is used to return information about the @@ -408,7 +408,7 @@ public: * @param pye id of payee in question * @return true if payee is in filter set, false otherwise */ - bool includesPayee( const QString& pye ) const; + bool includesPayee( const TQString& pye ) const; /** * This method is used to return information about the @@ -418,7 +418,7 @@ public: * @param to result value for the end of the date range * @return true if an amount filter is set */ - bool dateFilter( QDate& from, QDate& to ) const; + bool dateFilter( TQDate& from, TQDate& to ) const; /** * This method is used to return information about the @@ -438,7 +438,7 @@ public: * @param to result value for the high end of the number range * @return true if a number filter is set */ - bool numberFilter( QString& from, QString& to ) const; + bool numberFilter( TQString& from, TQString& to ) const; /** * This method returns whether a payee filter has been set, @@ -447,7 +447,7 @@ public: * @param list list to append payees into * @return return true if a payee filter has been set */ - bool payees(QStringList& list) const; + bool payees(TQStringList& list) const; /** * This method returns whether an account filter has been set, @@ -456,7 +456,7 @@ public: * @param list list to append accounts into * @return return true if an account filter has been set */ - bool accounts(QStringList& list) const; + bool accounts(TQStringList& list) const; /** * This method returns whether a category filter has been set, @@ -465,7 +465,7 @@ public: * @param list list to append categories into * @return return true if a category filter has been set */ - bool categories(QStringList& list) const; + bool categories(TQStringList& list) const; /** * This method returns whether a type filter has been set, @@ -476,7 +476,7 @@ public: */ bool firstType(int& i) const; - bool types(QValueList<int>& list) const; + bool types(TQValueList<int>& list) const; /** * This method returns whether a state filter has been set, @@ -487,7 +487,7 @@ public: */ bool firstState(int& i) const; - bool states(QValueList<int>& list) const; + bool states(TQValueList<int>& list) const; /** * This method returns whether a text filter has been set, * and if so, it returns the text filter. @@ -495,7 +495,7 @@ public: * @param text regexp to replace with text filter, or blank if none set * @return return true if a text filter has been set */ - bool textFilter(QRegExp& text) const; + bool textFilter(TQRegExp& text) const; /** * This method returns whether the text filter should return @@ -504,15 +504,15 @@ public: bool isInvertingText(void) const {return m_invertText;}; /** - * This method translates a plain-language date range into QDate + * This method translates a plain-language date range into TQDate * start & end * * @param range Plain-language range of dates, e.g. 'CurrentYear' - * @param start QDate will be set to corresponding to the first date in @p range - * @param end QDate will be set to corresponding to the last date in @p range + * @param start TQDate will be set to corresponding to the first date in @p range + * @param end TQDate will be set to corresponding to the last date in @p range * @return return true if a range was successfully set, or false if @p range was invalid */ - static bool translateDateRange(dateOptionE range, QDate& start, QDate& end); + static bool translateDateRange(dateOptionE range, TQDate& start, TQDate& end); static void setFiscalYearStart(int firstMonth, int firstDay); @@ -522,7 +522,7 @@ public: * This member removes all references to object identified by @p id. Used * to remove objects which are about to be removed from the engine. */ - void removeReference(const QString& id); + void removeReference(const TQString& id); private: /** @@ -561,18 +561,18 @@ protected: bool m_reportAllSplits; bool m_considerCategory; - QRegExp m_text; + TQRegExp m_text; bool m_invertText; - QAsciiDict<char> m_accounts; - QAsciiDict<char> m_payees; - QAsciiDict<char> m_categories; - QIntDict<char> m_states; - QIntDict<char> m_types; - QIntDict<char> m_validity; - QString m_fromNr, m_toNr; - QDate m_fromDate, m_toDate; + TQAsciiDict<char> m_accounts; + TQAsciiDict<char> m_payees; + TQAsciiDict<char> m_categories; + TQIntDict<char> m_states; + TQIntDict<char> m_types; + TQIntDict<char> m_validity; + TQString m_fromNr, m_toNr; + TQDate m_fromDate, m_toDate; MyMoneyMoney m_fromAmount, m_toAmount; - QValueList<MyMoneySplit> m_matchingSplits; + TQValueList<MyMoneySplit> m_matchingSplits; }; #endif diff --git a/kmymoney2/mymoney/mymoneytransactiontest.cpp b/kmymoney2/mymoney/mymoneytransactiontest.cpp index 11af6b3..155dfe0 100644 --- a/kmymoney2/mymoney/mymoneytransactiontest.cpp +++ b/kmymoney2/mymoney/mymoneytransactiontest.cpp @@ -31,16 +31,16 @@ void MyMoneyTransactionTest::tearDown () { void MyMoneyTransactionTest::testEmptyConstructor() { CPPUNIT_ASSERT(m->id().isEmpty()); - CPPUNIT_ASSERT(m->entryDate() == QDate()); + CPPUNIT_ASSERT(m->entryDate() == TQDate()); CPPUNIT_ASSERT(m->memo().isEmpty()); CPPUNIT_ASSERT(m->splits().count() == 0); } void MyMoneyTransactionTest::testSetFunctions() { m->setMemo("Memo"); - m->setPostDate(QDate(1,2,3)); + m->setPostDate(TQDate(1,2,3)); - CPPUNIT_ASSERT(m->postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(m->postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(m->memo() == "Memo"); } @@ -49,9 +49,9 @@ void MyMoneyTransactionTest::testConstructor() { MyMoneyTransaction a("ID", *m); CPPUNIT_ASSERT(a.id() == "ID"); - CPPUNIT_ASSERT(a.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(a.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(a.memo() == "Memo"); - CPPUNIT_ASSERT(a.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(a.postDate() == TQDate(1,2,3)); } void MyMoneyTransactionTest::testCopyConstructor() { @@ -62,9 +62,9 @@ void MyMoneyTransactionTest::testCopyConstructor() { MyMoneyTransaction n(a); CPPUNIT_ASSERT(n.id() == "ID"); - CPPUNIT_ASSERT(n.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(n.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.value("Key") == "Value"); } @@ -78,9 +78,9 @@ void MyMoneyTransactionTest::testAssignmentConstructor() { n = a; CPPUNIT_ASSERT(n.id() == "ID"); - CPPUNIT_ASSERT(n.entryDate() == QDate::currentDate()); + CPPUNIT_ASSERT(n.entryDate() == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(n.memo() == "Memo"); - CPPUNIT_ASSERT(n.postDate() == QDate(1,2,3)); + CPPUNIT_ASSERT(n.postDate() == TQDate(1,2,3)); CPPUNIT_ASSERT(n.value("Key") == "Value"); } @@ -98,7 +98,7 @@ void MyMoneyTransactionTest::testInequality() { MyMoneyTransaction n(*m); - n.setPostDate(QDate(1,1,1)); + n.setPostDate(TQDate(1,1,1)); CPPUNIT_ASSERT(!(n == *m)); CPPUNIT_ASSERT(n != *m); @@ -259,7 +259,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should fail, as the account is not referenced by // any split in the transaction try { - split = m->splitByAccount(QString("A000003")); + split = m->splitByAccount(TQString("A000003")); CPPUNIT_FAIL("Exception expected"); } catch(MyMoneyException *e) { delete e; @@ -267,7 +267,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should be found try { - split = m->splitByAccount(QString("A000002")); + split = m->splitByAccount(TQString("A000002")); CPPUNIT_ASSERT(split.id() == "S0002"); } catch(MyMoneyException *e) { @@ -277,7 +277,7 @@ void MyMoneyTransactionTest::testExtractSplit() { // this one should be found also try { - split = m->splitByAccount(QString("A000002"), false); + split = m->splitByAccount(TQString("A000002"), false); CPPUNIT_ASSERT(split.id() == "S0001"); } catch(MyMoneyException *e) { CPPUNIT_FAIL("Unexpected exception!"); @@ -373,7 +373,7 @@ void MyMoneyTransactionTest::testModifyDuplicateAccount() { testAddSplits(); MyMoneySplit split; - split = m->splitByAccount(QString("A000002")); + split = m->splitByAccount(TQString("A000002")); split.setAccountId("A000001"); try { m->modifySplit(split); @@ -387,8 +387,8 @@ void MyMoneyTransactionTest::testModifyDuplicateAccount() { } void MyMoneyTransactionTest::testWriteXML() { MyMoneyTransaction t; - t.setPostDate(QDate(2001,12,28)); - t.setEntryDate(QDate(2003,9,29)); + t.setPostDate(TQDate(2001,12,28)); + t.setEntryDate(TQDate(2003,9,29)); t.setId("T000000000000000001"); t.setMemo("Wohnung:Miete"); t.setCommodity("EUR"); @@ -404,12 +404,12 @@ void MyMoneyTransactionTest::testWriteXML() { s.setBankID("SPID"); t.addSplit(s); - QDomDocument doc("TEST"); - QDomElement el = doc.createElement("TRANSACTION-CONTAINER"); + TQDomDocument doc("TEST"); + TQDomElement el = doc.createElement("TRANSACTION-CONTAINER"); doc.appendChild(el); t.writeXML(doc, el); - QString ref = QString( + TQString ref = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANSACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -430,7 +430,7 @@ void MyMoneyTransactionTest::testWriteXML() { void MyMoneyTransactionTest::testReadXML() { MyMoneyTransaction t; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANSACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -444,7 +444,7 @@ void MyMoneyTransactionTest::testReadXML() { "</TRANSACTION-CONTAINER>\n" ); - QString ref_false = QString( + TQString ref_false = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" " <TRANS-ACTION postdate=\"2001-12-28\" memo=\"Wohnung:Miete\" id=\"T000000000000000001\" commodity=\"EUR\" entrydate=\"2003-09-29\" >\n" @@ -458,8 +458,8 @@ void MyMoneyTransactionTest::testReadXML() { "</TRANSACTION-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_false); node = doc.documentElement().firstChild().toElement(); @@ -476,8 +476,8 @@ void MyMoneyTransactionTest::testReadXML() { t.setValue("key", "VALUE"); try { t = MyMoneyTransaction(node); - CPPUNIT_ASSERT(t.m_postDate == QDate(2001,12,28)); - CPPUNIT_ASSERT(t.m_entryDate == QDate(2003,9,29)); + CPPUNIT_ASSERT(t.m_postDate == TQDate(2001,12,28)); + CPPUNIT_ASSERT(t.m_entryDate == TQDate(2003,9,29)); CPPUNIT_ASSERT(t.id() == "T000000000000000001"); CPPUNIT_ASSERT(t.m_memo == "Wohnung:Miete"); CPPUNIT_ASSERT(t.m_commodity == "EUR"); @@ -494,7 +494,7 @@ void MyMoneyTransactionTest::testReadXMLEx() { MyMoneyTransaction t; - QString ref_ok = QString( + TQString ref_ok = TQString( "<!DOCTYPE TEST>\n" "<TRANSACTION-CONTAINER>\n" "<TRANSACTION postdate=\"2010-03-05\" memo=\"\" id=\"T000000000000004189\" commodity=\"EUR\" entrydate=\"2010-03-08\" >\n" @@ -523,8 +523,8 @@ void MyMoneyTransactionTest::testReadXMLEx() "</TRANSACTION>\n" "</TRANSACTION-CONTAINER>\n" ); - QDomDocument doc; - QDomElement node; + TQDomDocument doc; + TQDomElement node; doc.setContent(ref_ok); node = doc.documentElement().firstChild().toElement(); @@ -550,8 +550,8 @@ void MyMoneyTransactionTest::testReadXMLEx() void MyMoneyTransactionTest::testHasReferenceTo() { MyMoneyTransaction t; - t.setPostDate(QDate(2001,12,28)); - t.setEntryDate(QDate(2003,9,29)); + t.setPostDate(TQDate(2001,12,28)); + t.setEntryDate(TQDate(2003,9,29)); t.setId("T000000000000000001"); t.setMemo("Wohnung:Miete"); t.setCommodity("EUR"); @@ -616,7 +616,7 @@ void MyMoneyTransactionTest::testModifyMissingAccountId() { testAddSplits(); MyMoneySplit s = m->splits()[0]; - s.setAccountId(QString()); + s.setAccountId(TQString()); try { m->modifySplit(s); diff --git a/kmymoney2/mymoney/mymoneyutils.cpp b/kmymoney2/mymoney/mymoneyutils.cpp index 3739f9a..b55c485 100644 --- a/kmymoney2/mymoney/mymoneyutils.cpp +++ b/kmymoney2/mymoney/mymoneyutils.cpp @@ -29,7 +29,7 @@ #include <cstdarg> #include <cstdlib> -#include <qregexp.h> +#include <tqregexp.h> #ifdef _CHECK_MEMORY @@ -189,7 +189,7 @@ void operator delete(void *p) throw() { if(enable==true) { CheckMemoryTable::Iterator it; - it = chkmem.table.find(p); + it = chkmem.table.tqfind(p); if(it != chkmem.table.end()) { chkmem.table.remove(it); } @@ -201,7 +201,7 @@ void operator delete [] (void *p) throw() { if(enable==true) { CheckMemoryTable::Iterator it; - it = chkmem.table.find(p); + it = chkmem.table.tqfind(p); if(it != chkmem.table.end()) { chkmem.table.remove(it); } @@ -211,13 +211,13 @@ void operator delete [] (void *p) throw() #endif // _CHECK_MEMORY -QString MyMoneyUtils::getFileExtension(QString strFileName) +TQString MyMoneyUtils::getFileExtension(TQString strFileName) { - QString strTemp; + TQString strTemp; if(!strFileName.isEmpty()) { //find last . delminator - int nLoc = strFileName.findRev('.'); + int nLoc = strFileName.tqfindRev('.'); if(nLoc != -1) { strTemp = strFileName.right(strFileName.length() - (nLoc + 1)); @@ -233,27 +233,27 @@ int MyMoneyTracer::m_onoff = 0; MyMoneyTracer::MyMoneyTracer(const char* name) { if(m_onoff) { - QRegExp exp("(.*)::(.*)"); + TQRegExp exp("(.*)::(.*)"); if(exp.search(name) != -1) { m_className = exp.cap(1); m_memberName = exp.cap(2); } else { - m_className = QString(name); - m_memberName = QString(); + m_className = TQString(name); + m_memberName = TQString(); } - QString indent; + TQString indent; indent.fill(' ', m_indentLevel); std::cerr << indent.latin1() << "ENTER: " << m_className.latin1() << "::" << m_memberName.latin1() << std::endl; } m_indentLevel += 2; } -MyMoneyTracer::MyMoneyTracer(const QString& className, const QString& memberName) : +MyMoneyTracer::MyMoneyTracer(const TQString& className, const TQString& memberName) : m_className(className), m_memberName(memberName) { if(m_onoff) { - QString indent; + TQString indent; indent.fill(' ', m_indentLevel); std::cerr << indent.latin1() << "ENTER: " << m_className.latin1() << "::" << m_memberName.latin1() << std::endl; } @@ -264,7 +264,7 @@ MyMoneyTracer::~MyMoneyTracer() { m_indentLevel -= 2; if(m_onoff) { - QString indent; + TQString indent; indent.fill(' ', m_indentLevel); std::cerr << indent.latin1() << "LEAVE: " << m_className.latin1() << "::" << m_memberName.latin1() << std::endl; } @@ -275,7 +275,7 @@ void MyMoneyTracer::printf(const char *format, ...) const if(m_onoff) { va_list args; va_start(args, format); - QString indent; + TQString indent; indent.fill(' ', m_indentLevel); std::cerr << indent.latin1(); @@ -300,38 +300,38 @@ void MyMoneyTracer::off(void) m_onoff = 0; } -QString dateToString(const QDate& date) +TQString dateToString(const TQDate& date) { if(!date.isNull() && date.isValid()) return date.toString(Qt::ISODate); - return QString(); + return TQString(); } -QDate stringToDate(const QString& str) +TQDate stringToDate(const TQString& str) { if(str.length()) { - QDate date = QDate::fromString(str, Qt::ISODate); + TQDate date = TQDate::fromString(str, Qt::ISODate); if(!date.isNull() && date.isValid()) return date; } - return QDate(); + return TQDate(); } -QString QStringEmpty(const QString& val) +TQString TQStringEmpty(const TQString& val) { if(!val.isEmpty()) - return QString(val); + return TQString(val); - return QString(); + return TQString(); } -unsigned long extractId(const QString& txt) +unsigned long extractId(const TQString& txt) { int pos; unsigned long rc = 0; - pos = txt.find(QRegExp("\\d+"), 0); + pos = txt.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { rc = atol(txt.mid(pos)); } diff --git a/kmymoney2/mymoney/mymoneyutils.h b/kmymoney2/mymoney/mymoneyutils.h index 12bb95e..ce0eb42 100644 --- a/kmymoney2/mymoney/mymoneyutils.h +++ b/kmymoney2/mymoney/mymoneyutils.h @@ -27,9 +27,9 @@ #include <config.h> #endif -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> #include <kmymoney/export.h> #if 0 @@ -51,7 +51,7 @@ typedef std::string String; //typedef for data type to store currency with. typedef long long DLONG; -typedef QString String; +typedef TQString String; #endif // 0 void timetrace(const char *); @@ -65,7 +65,7 @@ public: ~MyMoneyUtils() {} //static function to add the correct file extension at the end of the file name - static QString getFileExtension(QString strFileName); + static TQString getFileExtension(TQString strFileName); }; @@ -75,13 +75,13 @@ public: MyMoneyTracer(const char* prettyName); #define MYMONEYTRACER(a) MyMoneyTracer a(__PRETTY_FUNCTION__) - MyMoneyTracer(const QString& className, const QString& methodName); + MyMoneyTracer(const TQString& className, const TQString& methodName); ~MyMoneyTracer(); /** * This method allows to trace a printf like formatted text * - * @param format format mask + * @param format format tqmask */ void printf(const char *format, ...) const __attribute__ ((format (__printf__, 2, 3))); @@ -90,8 +90,8 @@ public: static void onOff(int onOff); private: - QString m_className; - QString m_memberName; + TQString m_className; + TQString m_memberName; static int m_indentLevel; static int m_onoff; @@ -100,7 +100,7 @@ private: #ifdef _CHECK_MEMORY #include <cstddef> -#include <qmap.h> +#include <tqmap.h> class _CheckMemoryEntry { public: @@ -117,10 +117,10 @@ private: void *m_p; int m_line; size_t m_size; - QString m_file; + TQString m_file; }; -typedef QMap<void *, _CheckMemoryEntry> CheckMemoryTable; +typedef TQMap<void *, _CheckMemoryEntry> CheckMemoryTable; typedef void _CheckMemoryOutFunc(const char *); @@ -170,23 +170,23 @@ KMYMONEY_EXPORT void _CheckMemory_End(); * If the @p date is invalid an empty string will be returned. * * @param date const reference to date to be converted - * @return QString containing the converted date + * @return TQString containing the converted date */ -KMYMONEY_EXPORT QString dateToString(const QDate& date); +KMYMONEY_EXPORT TQString dateToString(const TQDate& date); /** - * This function returns a date as QDate object as specified by + * This function returns a date as TQDate object as specified by * the parameter @p str. @p str must be in Qt::ISODate format. - * If @p str is empty or contains an invalid date, QDate() is + * If @p str is empty or contains an invalid date, TQDate() is * returned. * * @param str date in Qt::ISODate format - * @return QDate object + * @return TQDate object */ -KMYMONEY_EXPORT QDate stringToDate(const QString& str); +KMYMONEY_EXPORT TQDate stringToDate(const TQString& str); -KMYMONEY_EXPORT QString QStringEmpty(const QString&); +KMYMONEY_EXPORT TQString TQStringEmpty(const TQString&); -KMYMONEY_EXPORT unsigned long extractId(const QString& txt); +KMYMONEY_EXPORT unsigned long extractId(const TQString& txt); #endif diff --git a/kmymoney2/mymoney/storage/imymoneyserialize.h b/kmymoney2/mymoney/storage/imymoneyserialize.h index a0c12ca..c900687 100644 --- a/kmymoney2/mymoney/storage/imymoneyserialize.h +++ b/kmymoney2/mymoney/storage/imymoneyserialize.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -59,14 +59,14 @@ public: // general get functions virtual const MyMoneyPayee user(void) const = 0; - virtual const QDate creationDate(void) const = 0; - virtual const QDate lastModificationDate(void) const = 0; + virtual const TQDate creationDate(void) const = 0; + virtual const TQDate lastModificationDate(void) const = 0; virtual unsigned int currentFixVersion(void) const = 0; virtual unsigned int fileFixVersion(void) const = 0; // general set functions virtual void setUser(const MyMoneyPayee& val) = 0; - virtual void setCreationDate(const QDate& val) = 0; + virtual void setCreationDate(const TQDate& val) = 0; virtual void setFileFixVersion(const unsigned int v) = 0; /** * This method is used to get a SQL reader for subsequent database access @@ -86,26 +86,26 @@ public: * therefor be called as last operation when loading from a * file. * - * @param val QDate of last modification + * @param val TQDate of last modification */ - virtual void setLastModificationDate(const QDate& val) = 0; + virtual void setLastModificationDate(const TQDate& val) = 0; /** * This method returns a list of accounts inside the storage object. * - * @param list reference to QValueList receiving the account objects + * @param list reference to TQValueList receiving the account objects * * @note The standard accounts will not be returned */ - virtual void accountList(QValueList<MyMoneyAccount>& list) const = 0; + virtual void accountList(TQValueList<MyMoneyAccount>& list) const = 0; /** * This method returns a list of the institutions * inside a MyMoneyStorage object * - * @return QMap containing the institution information + * @return TQMap containing the institution information */ - virtual const QValueList<MyMoneyInstitution> institutionList(void) const = 0; + virtual const TQValueList<MyMoneyInstitution> institutionList(void) const = 0; /** * This method is used to pull a list of transactions from the file @@ -113,25 +113,25 @@ public: * that match the filter passed as argument. If the filter is empty, * the whole journal will be returned. * - * @param list reference to QValueList<MyMoneyTransaction> receiving + * @param list reference to TQValueList<MyMoneyTransaction> receiving * the set of transactions * @param filter MyMoneyTransactionFilter object with the match criteria */ - virtual void transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const = 0; + virtual void transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const = 0; /** * This method returns whether a given transaction is already in memory, to avoid * reloading it from the database */ - virtual bool isDuplicateTransaction(const QString&) const = 0; + virtual bool isDuplicateTransaction(const TQString&) const = 0; /** * This method returns a list of the payees * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyPayee> containing the payee information + * @return TQValueList<MyMoneyPayee> containing the payee information */ - virtual const QValueList<MyMoneyPayee> payeeList(void) const = 0; + virtual const TQValueList<MyMoneyPayee> payeeList(void) const = 0; /** * This method returns a list of the scheduled transactions @@ -139,19 +139,19 @@ public: * list of the transactions, all arguments should be used with their * default arguments. */ - virtual const QValueList<MyMoneySchedule> scheduleList(const QString& = QString(), + virtual const TQValueList<MyMoneySchedule> scheduleList(const TQString& = TQString(), const MyMoneySchedule::typeE = MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE = MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE = MyMoneySchedule::STYPE_ANY, - const QDate& = QDate(), - const QDate& = QDate(), + const TQDate& = TQDate(), + const TQDate& = TQDate(), const bool = false) const = 0; /** * This method returns a list of security objects that the engine has * knowledge of. */ - virtual const QValueList<MyMoneySecurity> securityList(void) const = 0; + virtual const TQValueList<MyMoneySecurity> securityList(void) const = 0; /** * This method is used to return the standard liability account @@ -194,12 +194,12 @@ public: /** * This method is used to add one account as sub-ordinate to another - * (parent) account. The objects that are passed will be modified + * (tqparent) account. The objects that are passed will be modified * accordingly. * * An exception will be thrown upon error conditions. * - * @param parent parent account the account should be added to + * @param tqparent tqparent account the account should be added to * @param account the account to be added * * @deprecated This method is only provided as long as we provide @@ -207,7 +207,7 @@ public: * this compatability mode this method will disappear from * this interface! */ - virtual void addAccount(MyMoneyAccount& parent, MyMoneyAccount& account) = 0; + virtual void addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account) = 0; /** * This method is used to create a new payee @@ -227,7 +227,7 @@ public: /** * Adds an institution to the storage. A * respective institution-ID will be generated within this record. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -244,7 +244,7 @@ public: /** * Adds a transaction to the file-global transaction pool. A respective * transaction-ID will be generated within this record. The ID is stored - * as QString with the object. + * as TQString with the object. * * An exception will be thrown upon error conditions. * @@ -262,15 +262,15 @@ public: */ virtual void addTransaction(MyMoneyTransaction& transaction, const bool skipAccountUpdate = false) = 0; - virtual void loadAccounts(const QMap<QString, MyMoneyAccount>& map) = 0; - virtual void loadTransactions(const QMap<QString, MyMoneyTransaction>& map) = 0; - virtual void loadInstitutions(const QMap<QString, MyMoneyInstitution>& map) = 0; - virtual void loadPayees(const QMap<QString, MyMoneyPayee>& map) = 0; - virtual void loadSchedules(const QMap<QString, MyMoneySchedule>& map) = 0; - virtual void loadSecurities(const QMap<QString, MyMoneySecurity>& map) = 0; - virtual void loadCurrencies(const QMap<QString, MyMoneySecurity>& map) = 0; - virtual void loadReports( const QMap<QString, MyMoneyReport>& reports ) = 0; - virtual void loadBudgets( const QMap<QString, MyMoneyBudget>& budgets ) = 0; + virtual void loadAccounts(const TQMap<TQString, MyMoneyAccount>& map) = 0; + virtual void loadTransactions(const TQMap<TQString, MyMoneyTransaction>& map) = 0; + virtual void loadInstitutions(const TQMap<TQString, MyMoneyInstitution>& map) = 0; + virtual void loadPayees(const TQMap<TQString, MyMoneyPayee>& map) = 0; + virtual void loadSchedules(const TQMap<TQString, MyMoneySchedule>& map) = 0; + virtual void loadSecurities(const TQMap<TQString, MyMoneySecurity>& map) = 0; + virtual void loadCurrencies(const TQMap<TQString, MyMoneySecurity>& map) = 0; + virtual void loadReports( const TQMap<TQString, MyMoneyReport>& reports ) = 0; + virtual void loadBudgets( const TQMap<TQString, MyMoneyBudget>& budgets ) = 0; virtual void loadPrices(const MyMoneyPriceList& list) = 0; virtual unsigned long accountId(void) const = 0; @@ -296,10 +296,10 @@ public: * from the container. It is meant to be used for permanent storage * functionality. See MyMoneyKeyValueContainer::pairs() for details. * - * @return QMap<QString, QString> containing all key/value pairs of + * @return TQMap<TQString, TQString> containing all key/value pairs of * this container. */ - virtual const QMap<QString, QString> pairs(void) const = 0; + virtual const TQMap<TQString, TQString> pairs(void) const = 0; /** * This method is used to initially store a set of key/value pairs @@ -307,18 +307,18 @@ public: * from permanent storage. See MyMoneyKeyValueContainer::setPairs() * for details * - * @param list const QMap<QString, QString> containing the set of + * @param list const TQMap<TQString, TQString> containing the set of * key/value pairs to be loaded into the container. * * @note All existing key/value pairs in the container will be deleted. */ - virtual void setPairs(const QMap<QString, QString>& list) = 0; + virtual void setPairs(const TQMap<TQString, TQString>& list) = 0; - virtual const QValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, + virtual const TQValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts=QStringList()) const = 0; + TQDate startDate, + const TQStringList& accounts=TQStringList()) const = 0; /** * This method is used to retrieve the list of all currencies @@ -326,9 +326,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneySecurity objects representing a currency. + * @return TQValueList of all MyMoneySecurity objects representing a currency. */ - virtual const QValueList<MyMoneySecurity> currencyList(void) const = 0; + virtual const TQValueList<MyMoneySecurity> currencyList(void) const = 0; /** * This method is used to retrieve the list of all reports @@ -336,9 +336,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyReport objects. + * @return TQValueList of all MyMoneyReport objects. */ - virtual const QValueList<MyMoneyReport> reportList( void ) const = 0; + virtual const TQValueList<MyMoneyReport> reportList( void ) const = 0; /** * This method is used to retrieve the list of all budgets @@ -346,9 +346,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyBudget objects. + * @return TQValueList of all MyMoneyBudget objects. */ - virtual const QValueList<MyMoneyBudget> budgetList( void ) const = 0; + virtual const TQValueList<MyMoneyBudget> budgetList( void ) const = 0; /** diff --git a/kmymoney2/mymoney/storage/imymoneystorage.cpp b/kmymoney2/mymoney/storage/imymoneystorage.cpp index dc67726..f70de9c 100644 --- a/kmymoney2/mymoney/storage/imymoneystorage.cpp +++ b/kmymoney2/mymoney/storage/imymoneystorage.cpp @@ -25,7 +25,7 @@ bool MyMoneyFileBitArray::testBit(uint index) const { if(index < size()) - return QBitArray::testBit(index); + return TQBitArray::testBit(index); return false; } diff --git a/kmymoney2/mymoney/storage/imymoneystorage.h b/kmymoney2/mymoney/storage/imymoneystorage.h index a4e55dd..a4ff2af 100644 --- a/kmymoney2/mymoney/storage/imymoneystorage.h +++ b/kmymoney2/mymoney/storage/imymoneystorage.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qbitarray.h> +#include <tqstring.h> +#include <tqbitarray.h> // ---------------------------------------------------------------------------- // Project Includes @@ -48,15 +48,15 @@ /** * @author Thomas Baumgart * - * A simple replacement for QBitArray that does not bark if testBit() + * A simple replacement for TQBitArray that does not bark if testBit() * is called with an index out of bounds. It silently returns false * in that case, otherwise calls the base classes implementation. */ -class MyMoneyFileBitArray : public QBitArray +class MyMoneyFileBitArray : public TQBitArray { public: - MyMoneyFileBitArray() : QBitArray() {} - MyMoneyFileBitArray(int size) : QBitArray(size) {} + MyMoneyFileBitArray() : TQBitArray() {} + MyMoneyFileBitArray(int size) : TQBitArray(size) {} bool testBit(uint index) const; bool operator[](int index) const { return testBit(index); } bool at(uint index) const { return testBit(index); } @@ -96,15 +96,15 @@ public: #define STD_ACC_ASSET "AStd::Asset" #define STD_ACC_EXPENSE "AStd::Expense" #define STD_ACC_INCOME "AStd::Income" -#define STD_ACC_EQUITY "AStd::Equity" +#define STD_ACC_ETQUITY "AStd::Equity" IMyMoneyStorage(); virtual ~IMyMoneyStorage(); // general get functions virtual const MyMoneyPayee user(void) const = 0; - virtual const QDate creationDate(void) const = 0; - virtual const QDate lastModificationDate(void) const = 0; + virtual const TQDate creationDate(void) const = 0; + virtual const TQDate lastModificationDate(void) const = 0; virtual unsigned int currentFixVersion(void) const = 0; virtual unsigned int fileFixVersion(void) const = 0; @@ -113,9 +113,9 @@ public: virtual void setFileFixVersion(const unsigned int v) = 0; // methods provided by MyMoneyKeyValueContainer - virtual void setValue(const QString& key, const QString& value) = 0; - virtual const QString value(const QString& key) const = 0; - virtual void deletePair(const QString& key) = 0; + virtual void setValue(const TQString& key, const TQString& value) = 0; + virtual const TQString value(const TQString& key) const = 0; + virtual void deletePair(const TQString& key) = 0; /** * This method is used to duplicate an IMyMoneyStorage object and return @@ -135,15 +135,15 @@ public: /** * This method is used to add one account as sub-ordinate to another - * (parent) account. The objects that are passed will be modified + * (tqparent) account. The objects that are passed will be modified * accordingly. * * An exception will be thrown upon error conditions. * - * @param parent parent account the account should be added to + * @param tqparent tqparent account the account should be added to * @param account the account to be added */ - virtual void addAccount(MyMoneyAccount& parent, MyMoneyAccount& account) = 0; + virtual void addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account) = 0; /** * This method is used to create a new payee @@ -158,22 +158,22 @@ public: * This method is used to retrieve information about a payee * An exception will be thrown upon error conditions. * - * @param id QString reference to id of payee + * @param id TQString reference to id of payee * * @return MyMoneyPayee object of payee */ - virtual const MyMoneyPayee payee(const QString& id) const = 0; + virtual const MyMoneyPayee payee(const TQString& id) const = 0; /** * This method is used to retrieve the id to a corresponding * name of a payee/receiver. * An exception will be thrown upon error conditions. * - * @param payee QString reference to name of payee + * @param payee TQString reference to name of payee * * @return MyMoneyPayee object of payee */ - virtual const MyMoneyPayee payeeByName(const QString& payee) const = 0; + virtual const MyMoneyPayee payeeByName(const TQString& payee) const = 0; /** * This method is used to modify an existing payee @@ -197,9 +197,9 @@ public: * This method returns a list of the payees * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyPayee> containing the payee information + * @return TQValueList<MyMoneyPayee> containing the payee information */ - virtual const QValueList<MyMoneyPayee> payeeList(void) const = 0; + virtual const TQValueList<MyMoneyPayee> payeeList(void) const = 0; /** * Returns the account addressed by it's id. @@ -210,7 +210,7 @@ public: * @return reference to MyMoneyAccount object. An exception is thrown * if the id is unknown */ - virtual const MyMoneyAccount account(const QString& id) const = 0; + virtual const MyMoneyAccount account(const TQString& id) const = 0; /** * This method is used to check whether a given @@ -221,23 +221,23 @@ public: * @param id account id * @return true if account-id is one of the standards, false otherwise */ - virtual bool isStandardAccount(const QString& id) const = 0; + virtual bool isStandardAccount(const TQString& id) const = 0; /** * This method is used to set the name for the specified standard account * within the storage area. An exception will be thrown, if an error * occurs * - * @param id QString reference to one of the standard accounts. - * @param name QString reference to the name to be set + * @param id TQString reference to one of the standard accounts. + * @param name TQString reference to the name to be set * */ - virtual void setAccountName(const QString& id, const QString& name) = 0; + virtual void setAccountName(const TQString& id, const TQString& name) = 0; /** * Adds an institution to the storage. A * respective institution-ID will be generated within this record. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -249,7 +249,7 @@ public: /** * Adds a transaction to the file-global transaction pool. A respective * transaction-ID will be generated within this record. The ID is stored - * QString with the object. + * TQString with the object. * * An exception will be thrown upon error conditions. * @@ -269,7 +269,7 @@ public: * @param id id of the account to be checked for * @return true if account is referenced, false otherwise */ - virtual bool hasActiveSplits(const QString& id) const = 0; + virtual bool hasActiveSplits(const TQString& id) const = 0; /** * This method is used to return the actual balance of an account @@ -282,7 +282,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - virtual const MyMoneyMoney balance(const QString& id, const QDate& date) const= 0; + virtual const MyMoneyMoney balance(const TQString& id, const TQDate& date) const= 0; /** * This method is used to return the actual balance of an account @@ -295,7 +295,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - virtual const MyMoneyMoney totalBalance(const QString& id, const QDate& date) const = 0; + virtual const MyMoneyMoney totalBalance(const TQString& id, const TQDate& date) const = 0; /** * Returns the institution of a given ID @@ -304,7 +304,7 @@ public: * @return MyMoneyInstitution object filled with data. If the institution * could not be found, an exception will be thrown */ - virtual const MyMoneyInstitution institution(const QString& id) const = 0; + virtual const MyMoneyInstitution institution(const TQString& id) const = 0; /** * This method returns an indicator if the storage object has been @@ -334,10 +334,10 @@ public: * This method returns a list of the institutions * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyInstitution> containing the + * @return TQValueList<MyMoneyInstitution> containing the * institution information */ - virtual const QValueList<MyMoneyInstitution> institutionList(void) const = 0; + virtual const TQValueList<MyMoneyInstitution> institutionList(void) const = 0; /** * Modifies an already existing account in the file global account pool. @@ -370,14 +370,14 @@ public: virtual void modifyTransaction(const MyMoneyTransaction& transaction) = 0; /** - * This method re-parents an existing account + * This method re-tqparents an existing account * * An exception will be thrown upon error conditions. * - * @param account MyMoneyAccount reference to account to be re-parented - * @param parent MyMoneyAccount reference to new parent account + * @param account MyMoneyAccount reference to account to be re-tqparented + * @param tqparent MyMoneyAccount reference to new tqparent account */ - virtual void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent) = 0; + virtual void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent) = 0; /** * This method is used to remove a transaction from the transaction @@ -393,25 +393,25 @@ public: * This method returns the number of transactions currently known to file * in the range 0..MAXUINT * - * @param account QString reference to account id. If account is empty + * @param account TQString reference to account id. If account is empty + all transactions (the journal) will be counted. If account * is not empty it returns the number of transactions * that have splits in this account. * * @return number of transactions in journal/account */ - virtual unsigned int transactionCount(const QString& account = QString()) const = 0; + virtual unsigned int transactionCount(const TQString& account = TQString()) const = 0; /** - * This method returns a QMap filled with the number of transactions + * This method returns a TQMap filled with the number of transactions * per account. The account id serves as index into the map. If one * needs to have all transactionCounts() for many accounts, this method - * is faster than calling transactionCount(const QString& account) many + * is faster than calling transactionCount(const TQString& account) many * times. * - * @return QMap with numbers of transactions per account + * @return TQMap with numbers of transactions per account */ - virtual const QMap<QString, unsigned long> transactionCountMap(void) const = 0; + virtual const TQMap<TQString, unsigned long> transactionCountMap(void) const = 0; /** * This method is used to pull a list of transactions from the file @@ -424,13 +424,13 @@ public: * * @param filter MyMoneyTransactionFilter object with the match criteria * - * @return set of transactions in form of a QValueList<MyMoneyTransaction> + * @return set of transactions in form of a TQValueList<MyMoneyTransaction> */ - virtual const QValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const = 0; + virtual const TQValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const = 0; - virtual void transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const = 0; + virtual void transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const = 0; - virtual void transactionList(QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const = 0; + virtual void transactionList(TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const = 0; /** * Deletes an existing account from the file global account pool @@ -459,20 +459,20 @@ public: * transaction pool through an id. In case of an invalid id, an * exception will be thrown. * - * @param id id of transaction as QString. + * @param id id of transaction as TQString. * @return reference to the requested transaction */ - virtual const MyMoneyTransaction transaction(const QString& id) const = 0; + virtual const MyMoneyTransaction transaction(const TQString& id) const = 0; /** * This method is used to extract a transaction from the file global * transaction pool through an index into an account. * - * @param account id of the account as QString + * @param account id of the account as TQString * @param idx number of transaction in this account * @return reference to MyMoneyTransaction object */ - virtual const MyMoneyTransaction transaction(const QString& account, const int idx) const = 0; + virtual const MyMoneyTransaction transaction(const TQString& account, const int idx) const = 0; /** * This method returns the number of institutions currently known to file @@ -485,11 +485,11 @@ public: /** * This method returns a list of accounts inside the storage object. * - * @param list reference to QValueList receiving the account objects + * @param list reference to TQValueList receiving the account objects * * @note The standard accounts will not be returned */ - virtual void accountList(QValueList<MyMoneyAccount>& list) const = 0; + virtual void accountList(TQValueList<MyMoneyAccount>& list) const = 0; /** * This method is used to return the standard liability account @@ -558,22 +558,22 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySecurity object + * @param id TQString containing the id of the MyMoneySecurity object * @return MyMoneySecurity object */ - virtual const MyMoneySecurity security(const QString& id) const = 0; + virtual const MyMoneySecurity security(const TQString& id) const = 0; /** * This method returns a list of the security objects * inside a MyMoneyStorage object * - * @return QValueList<MyMoneySecurity> containing objects + * @return TQValueList<MyMoneySecurity> containing objects */ - virtual const QValueList<MyMoneySecurity> securityList(void) const = 0; + virtual const TQValueList<MyMoneySecurity> securityList(void) const = 0; virtual void addPrice(const MyMoneyPrice& price) = 0; virtual void removePrice(const MyMoneyPrice& price) = 0; - virtual const MyMoneyPrice price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const = 0; + virtual const MyMoneyPrice price(const TQString& fromId, const TQString& toId, const TQDate& date, const bool exactDate) const = 0; /** * This method returns a list of all prices. @@ -620,10 +620,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - virtual const MyMoneySchedule schedule(const QString& id) const = 0; + virtual const MyMoneySchedule schedule(const TQString& id) const = 0; /** * This method is used to extract a list of scheduled transactions @@ -631,7 +631,7 @@ public: * * @param accountId only search for scheduled transactions that reference * accound @p accountId. If accountId is the empty string, - * this filter is off. Default is @p QString(). + * this filter is off. Default is @p TQString(). * @param type only schedules of type @p type are searched for. * See MyMoneySchedule::typeE for details. * Default is MyMoneySchedule::TYPE_ANY @@ -643,27 +643,27 @@ public: * See MyMoneySchedule::paymentTypeE for details. * Default is MyMoneySchedule::STYPE_ANY * @param startDate only schedules with payment dates after @p startDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param endDate only schedules with payment dates ending prior to @p endDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param overdue if true, only those schedules that are overdue are * searched for. Default is false (all schedules will be returned). * - * @return const QValueList<MyMoneySchedule> list of schedule objects. + * @return const TQValueList<MyMoneySchedule> list of schedule objects. */ - virtual const QValueList<MyMoneySchedule> scheduleList(const QString& accountId = QString(), + virtual const TQValueList<MyMoneySchedule> scheduleList(const TQString& accountId = TQString(), const MyMoneySchedule::typeE type = MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE paymentType = MyMoneySchedule::STYPE_ANY, - const QDate& startDate = QDate(), - const QDate& endDate = QDate(), + const TQDate& startDate = TQDate(), + const TQDate& endDate = TQDate(), const bool overdue = false) const = 0; - virtual const QValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, + virtual const TQValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts=QStringList()) const = 0; + TQDate startDate, + const TQStringList& accounts=TQStringList()) const = 0; /** * This method is used to add a new currency object to the engine. @@ -702,10 +702,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySecurity object + * @param id TQString containing the id of the MyMoneySecurity object * @return MyMoneyCurrency object */ - virtual const MyMoneySecurity currency(const QString& id) const = 0; + virtual const MyMoneySecurity currency(const TQString& id) const = 0; /** * This method is used to retrieve the list of all currencies @@ -713,9 +713,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneySecurity objects representing a currency. + * @return TQValueList of all MyMoneySecurity objects representing a currency. */ - virtual const QValueList<MyMoneySecurity> currencyList(void) const = 0; + virtual const TQValueList<MyMoneySecurity> currencyList(void) const = 0; /** * This method is used to retrieve the list of all reports @@ -723,9 +723,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyReport objects. + * @return TQValueList of all MyMoneyReport objects. */ - virtual const QValueList<MyMoneyReport> reportList( void ) const = 0; + virtual const TQValueList<MyMoneyReport> reportList( void ) const = 0; /** * This method is used to add a new report to the engine. @@ -763,10 +763,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyReport object + * @param id TQString containing the id of the MyMoneyReport object * @return MyMoneyReport object */ - virtual const MyMoneyReport report( const QString& id ) const = 0; + virtual const MyMoneyReport report( const TQString& id ) const = 0; /** * This method is used to remove an existing MyMoneyReport object @@ -784,9 +784,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyBudget objects. + * @return TQValueList of all MyMoneyBudget objects. */ - virtual const QValueList<MyMoneyBudget> budgetList( void ) const = 0; + virtual const TQValueList<MyMoneyBudget> budgetList( void ) const = 0; /** * This method is used to add a new budget to the engine. @@ -805,11 +805,11 @@ public: * name of a budget * An exception will be thrown upon error conditions. * - * @param budget QString reference to name of budget + * @param budget TQString reference to name of budget * * @return MyMoneyBudget object of budget */ - virtual const MyMoneyBudget budgetByName(const QString& budget) const = 0; + virtual const MyMoneyBudget budgetByName(const TQString& budget) const = 0; /** * This method is used to modify an existing MyMoneyBudget @@ -835,10 +835,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyBudget object + * @param id TQString containing the id of the MyMoneyBudget object * @return MyMoneyBudget object */ - virtual MyMoneyBudget budget( const QString& id ) const = 0; + virtual MyMoneyBudget budget( const TQString& id ) const = 0; /** * This method is used to remove an existing MyMoneyBudget object diff --git a/kmymoney2/mymoney/storage/imymoneystorageformat.h b/kmymoney2/mymoney/storage/imymoneystorageformat.h index b045898..6a7046f 100644 --- a/kmymoney2/mymoney/storage/imymoneystorageformat.h +++ b/kmymoney2/mymoney/storage/imymoneystorageformat.h @@ -31,9 +31,9 @@ // ---------------------------------------------------------------------------- // QT Includes -class QString; -class QIODevice; -class QProgressDialog; +class TQString; +class TQIODevice; +class TQProgressDialog; // ---------------------------------------------------------------------------- // Project Includes @@ -52,13 +52,13 @@ public: Writing = 1 /**< version to be used when writing a file */ }; - virtual void readFile(QIODevice* qf, IMyMoneySerialize* storage) = 0; - // virtual void readStream(QDataStream& s, IMyMoneySerialize* storage) = 0; + virtual void readFile(TQIODevice* qf, IMyMoneySerialize* storage) = 0; + // virtual void readStream(TQDataStream& s, IMyMoneySerialize* storage) = 0; - virtual void writeFile(QIODevice* qf, IMyMoneySerialize* storage) = 0; - //virtual void writeStream(QDataStream& s, IMyMoneySerialize* storage) = 0; + virtual void writeFile(TQIODevice* qf, IMyMoneySerialize* storage) = 0; + //virtual void writeStream(TQDataStream& s, IMyMoneySerialize* storage) = 0; - virtual void setProgressCallback(void(*callback)(int, int, const QString&)) = 0; + virtual void setProgressCallback(void(*callback)(int, int, const TQString&)) = 0; /** * This member is used to store the file version information * obtained while reading a file. diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp index e845094..e80feaf 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.cpp @@ -26,8 +26,8 @@ #define PASS } catch (MyMoneyException *e) { throw; } MyMoneyDatabaseMgr::MyMoneyDatabaseMgr() : -m_creationDate (QDate::currentDate ()), -m_lastModificationDate (QDate::currentDate ()), +m_creationDate (TQDate::tqcurrentDate ()), +m_lastModificationDate (TQDate::tqcurrentDate ()), m_sql (0) { } @@ -38,10 +38,10 @@ MyMoneyDatabaseMgr::~MyMoneyDatabaseMgr() const MyMoneyPayee MyMoneyDatabaseMgr::user(void) const { return m_user; } -const QDate MyMoneyDatabaseMgr::creationDate(void) const +const TQDate MyMoneyDatabaseMgr::creationDate(void) const { return m_creationDate; } -const QDate MyMoneyDatabaseMgr::lastModificationDate(void) const +const TQDate MyMoneyDatabaseMgr::lastModificationDate(void) const { return m_lastModificationDate; } unsigned int MyMoneyDatabaseMgr::currentFixVersion(void) const @@ -61,27 +61,27 @@ void MyMoneyDatabaseMgr::setFileFixVersion(const unsigned int v) { m_fileFixVersion = v; } // methods provided by MyMoneyKeyValueContainer -const QString MyMoneyDatabaseMgr::value(const QString& key) const +const TQString MyMoneyDatabaseMgr::value(const TQString& key) const { return MyMoneyKeyValueContainer::value(key); } -void MyMoneyDatabaseMgr::setValue(const QString& key, const QString& val) +void MyMoneyDatabaseMgr::setValue(const TQString& key, const TQString& val) { MyMoneyKeyValueContainer::setValue(key, val); } -void MyMoneyDatabaseMgr::deletePair(const QString& key) +void MyMoneyDatabaseMgr::deletePair(const TQString& key) { MyMoneyKeyValueContainer::deletePair(key); } -const QMap<QString, QString> MyMoneyDatabaseMgr::pairs(void) const +const TQMap<TQString, TQString> MyMoneyDatabaseMgr::pairs(void) const { return MyMoneyKeyValueContainer::pairs(); } -void MyMoneyDatabaseMgr::setPairs(const QMap<QString, QString>& list) +void MyMoneyDatabaseMgr::setPairs(const TQMap<TQString, TQString>& list) { MyMoneyKeyValueContainer::setPairs(list); } @@ -104,43 +104,43 @@ void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& account) } } -void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& parent, MyMoneyAccount& account) +void MyMoneyDatabaseMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account) { - QMap<QString, MyMoneyAccount> accountList; - QStringList accountIdList; - QMap<QString, MyMoneyAccount>::ConstIterator theParent; - QMap<QString, MyMoneyAccount>::ConstIterator theChild; + TQMap<TQString, MyMoneyAccount> accountList; + TQStringList accountIdList; + TQMap<TQString, MyMoneyAccount>::ConstIterator theParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator theChild; - accountIdList << parent.id() << account.id(); + accountIdList << tqparent.id() << account.id(); startTransaction(); accountList = m_sql->fetchAccounts(accountIdList, true); - theParent = accountList.find(parent.id()); + theParent = accountList.tqfind(tqparent.id()); if(theParent == accountList.end()) { - QString msg = "Unknown parent account '"; - msg += parent.id() + "'"; + TQString msg = "Unknown tqparent account '"; + msg += tqparent.id() + "'"; throw new MYMONEYEXCEPTION(msg); } - theChild = accountList.find(account.id()); + theChild = accountList.tqfind(account.id()); if(theChild == accountList.end()) { - QString msg = "Unknown child account '"; + TQString msg = "Unknown child account '"; msg += account.id() + "'"; throw new MYMONEYEXCEPTION(msg); } MyMoneyAccount acc = *theParent; acc.addAccountId(account.id()); - parent = acc; + tqparent = acc; acc = *theChild; - acc.setParentAccountId(parent.id()); + acc.setParentAccountId(tqparent.id()); account = acc; //FIXME: MyMoneyBalanceCacheItem balance; //FIXME: m_balanceCache[account.id()] = balance; - m_sql->modifyAccount(parent); + m_sql->modifyAccount(tqparent); m_sql->modifyAccount(account); commitTransaction(); } @@ -156,29 +156,29 @@ void MyMoneyDatabaseMgr::addPayee(MyMoneyPayee& payee) } } -const MyMoneyPayee MyMoneyDatabaseMgr::payee(const QString& id) const +const MyMoneyPayee MyMoneyDatabaseMgr::payee(const TQString& id) const { - QMap<QString, MyMoneyPayee>::ConstIterator it; - QMap<QString, MyMoneyPayee> payeeList = m_sql->fetchPayees(QString(id)); - it = payeeList.find(id); + TQMap<TQString, MyMoneyPayee>::ConstIterator it; + TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(id)); + it = payeeList.tqfind(id); if(it == payeeList.end()) throw new MYMONEYEXCEPTION("Unknown payee '" + id + "'"); return *it; } -const MyMoneyPayee MyMoneyDatabaseMgr::payeeByName(const QString& payee) const +const MyMoneyPayee MyMoneyDatabaseMgr::payeeByName(const TQString& payee) const { if(payee.isEmpty()) return MyMoneyPayee::null; - QMap<QString, MyMoneyPayee> payeeList; + TQMap<TQString, MyMoneyPayee> payeeList; TRY payeeList = m_sql->fetchPayees(); PASS - QMap<QString, MyMoneyPayee>::ConstIterator it_p; + TQMap<TQString, MyMoneyPayee>::ConstIterator it_p; for(it_p = payeeList.begin(); it_p != payeeList.end(); ++it_p) { if((*it_p).name() == payee) { @@ -191,12 +191,12 @@ const MyMoneyPayee MyMoneyDatabaseMgr::payeeByName(const QString& payee) const void MyMoneyDatabaseMgr::modifyPayee(const MyMoneyPayee& payee) { - QMap<QString, MyMoneyPayee> payeeList = m_sql->fetchPayees(QString(payee.id()), true); - QMap<QString, MyMoneyPayee>::ConstIterator it; + TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(payee.id()), true); + TQMap<TQString, MyMoneyPayee>::ConstIterator it; - it = payeeList.find(payee.id()); + it = payeeList.tqfind(payee.id()); if(it == payeeList.end()) { - QString msg = "Unknown payee '" + payee.id() + "'"; + TQString msg = "Unknown payee '" + payee.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -205,30 +205,30 @@ void MyMoneyDatabaseMgr::modifyPayee(const MyMoneyPayee& payee) void MyMoneyDatabaseMgr::removePayee(const MyMoneyPayee& payee) { - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QMap<QString, MyMoneySchedule>::ConstIterator it_s; - QMap<QString, MyMoneyPayee> payeeList = m_sql->fetchPayees(QString(payee.id())); - QMap<QString, MyMoneyPayee>::ConstIterator it_p; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneySchedule>::ConstIterator it_s; + TQMap<TQString, MyMoneyPayee> payeeList = m_sql->fetchPayees(TQString(payee.id())); + TQMap<TQString, MyMoneyPayee>::ConstIterator it_p; - it_p = payeeList.find(payee.id()); + it_p = payeeList.tqfind(payee.id()); if(it_p == payeeList.end()) { - QString msg = "Unknown payee '" + payee.id() + "'"; + TQString msg = "Unknown payee '" + payee.id() + "'"; throw new MYMONEYEXCEPTION(msg); } // scan all transactions to check if the payee is still referenced - QMap<QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(); // make sure they're all here + TQMap<TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(); // make sure they're all here for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) { if((*it_t).hasReferenceTo(payee.id())) { - throw new MYMONEYEXCEPTION(QString("Cannot remove payee that is still referenced to a %1").arg("transaction")); + throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("transaction")); } } // check referential integrity in schedules - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); // make sure they're all here + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); // make sure they're all here for(it_s = scheduleList.begin(); it_s != scheduleList.end(); ++it_s) { if((*it_s).hasReferenceTo(payee.id())) { - throw new MYMONEYEXCEPTION(QString("Cannot remove payee that is still referenced to a %1").arg("schedule")); + throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("schedule")); } } // remove any reference to report and/or budget @@ -237,20 +237,20 @@ void MyMoneyDatabaseMgr::removePayee(const MyMoneyPayee& payee) m_sql->removePayee(payee); } -const QValueList<MyMoneyPayee> MyMoneyDatabaseMgr::payeeList(void) const +const TQValueList<MyMoneyPayee> MyMoneyDatabaseMgr::payeeList(void) const { if (m_sql) return m_sql->fetchPayees().values(); else - return QValueList<MyMoneyPayee> (); + return TQValueList<MyMoneyPayee> (); } -const MyMoneyAccount MyMoneyDatabaseMgr::account(const QString& id) const +const MyMoneyAccount MyMoneyDatabaseMgr::account(const TQString& id) const { if (m_sql) { - QMap <QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(QString(id)); - QMap <QString, MyMoneyAccount>::ConstIterator pos = accountList.find(id); + TQMap <TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(TQString(id)); + TQMap <TQString, MyMoneyAccount>::ConstIterator pos = accountList.tqfind(id); // locate the account and if present, return it's data if(pos != accountList.end()) @@ -258,27 +258,27 @@ const MyMoneyAccount MyMoneyDatabaseMgr::account(const QString& id) const } // throw an exception, if it does not exist - QString msg = "Unknown account id '" + id + "'"; + TQString msg = "Unknown account id '" + id + "'"; throw new MYMONEYEXCEPTION(msg); } -bool MyMoneyDatabaseMgr::isStandardAccount(const QString& id) const +bool MyMoneyDatabaseMgr::isStandardAccount(const TQString& id) const { return id == STD_ACC_LIABILITY || id == STD_ACC_ASSET || id == STD_ACC_EXPENSE || id == STD_ACC_INCOME - || id == STD_ACC_EQUITY; + || id == STD_ACC_ETQUITY; } -void MyMoneyDatabaseMgr::setAccountName(const QString& id, const QString& name) +void MyMoneyDatabaseMgr::setAccountName(const TQString& id, const TQString& name) { if(!isStandardAccount(id)) throw new MYMONEYEXCEPTION("Only standard accounts can be modified using setAccountName()"); if (m_sql) { startTransaction(); - MyMoneyAccount acc = m_sql->fetchAccounts(QString(id), true) [id]; + MyMoneyAccount acc = m_sql->fetchAccounts(TQString(id), true) [id]; acc.setName(name); m_sql->modifyAccount(acc); commitTransaction(); @@ -298,9 +298,9 @@ void MyMoneyDatabaseMgr::addInstitution(MyMoneyInstitution& institution) } } -const QString MyMoneyDatabaseMgr::nextPayeeID(void) +const TQString MyMoneyDatabaseMgr::nextPayeeID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementPayeeId())); id = "P" + id.rightJustify(PAYEE_ID_SIZE, '0'); @@ -308,9 +308,9 @@ const QString MyMoneyDatabaseMgr::nextPayeeID(void) return id; } -const QString MyMoneyDatabaseMgr::nextInstitutionID(void) +const TQString MyMoneyDatabaseMgr::nextInstitutionID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementInstitutionId())); id = "I" + id.rightJustify(INSTITUTION_ID_SIZE, '0'); @@ -318,9 +318,9 @@ const QString MyMoneyDatabaseMgr::nextInstitutionID(void) return id; } -const QString MyMoneyDatabaseMgr::nextAccountID(void) +const TQString MyMoneyDatabaseMgr::nextAccountID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementAccountId())); id = "A" + id.rightJustify(ACCOUNT_ID_SIZE, '0'); @@ -328,9 +328,9 @@ const QString MyMoneyDatabaseMgr::nextAccountID(void) return id; } -const QString MyMoneyDatabaseMgr::nextBudgetID(void) +const TQString MyMoneyDatabaseMgr::nextBudgetID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementBudgetId())); id = "B" + id.rightJustify(BUDGET_ID_SIZE, '0'); @@ -338,9 +338,9 @@ const QString MyMoneyDatabaseMgr::nextBudgetID(void) return id; } -const QString MyMoneyDatabaseMgr::nextReportID(void) +const TQString MyMoneyDatabaseMgr::nextReportID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementReportId())); id = "R" + id.rightJustify(REPORT_ID_SIZE, '0'); @@ -348,9 +348,9 @@ const QString MyMoneyDatabaseMgr::nextReportID(void) return id; } -const QString MyMoneyDatabaseMgr::nextTransactionID(void) +const TQString MyMoneyDatabaseMgr::nextTransactionID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementTransactionId())); id = "T" + id.rightJustify(TRANSACTION_ID_SIZE, '0'); @@ -358,9 +358,9 @@ const QString MyMoneyDatabaseMgr::nextTransactionID(void) return id; } -const QString MyMoneyDatabaseMgr::nextScheduleID(void) +const TQString MyMoneyDatabaseMgr::nextScheduleID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementScheduleId())); id = "SCH" + id.rightJustify(SCHEDULE_ID_SIZE, '0'); @@ -368,9 +368,9 @@ const QString MyMoneyDatabaseMgr::nextScheduleID(void) return id; } -const QString MyMoneyDatabaseMgr::nextSecurityID(void) +const TQString MyMoneyDatabaseMgr::nextSecurityID(void) { - QString id; + TQString id; if (m_sql) { id.setNum(ulong(m_sql->incrementSecurityId())); id = "E" + id.rightJustify(SECURITY_ID_SIZE, '0'); @@ -393,7 +393,7 @@ void MyMoneyDatabaseMgr::addTransaction(MyMoneyTransaction& transaction, const b throw new MYMONEYEXCEPTION("invalid post date"); // now check the splits - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following lines will throw an exception if the // account or payee do not exist @@ -403,7 +403,7 @@ void MyMoneyDatabaseMgr::addTransaction(MyMoneyTransaction& transaction, const b } MyMoneyTransaction newTransaction(nextTransactionID(), transaction); - QString key = newTransaction.uniqueSortKey(); + TQString key = newTransaction.uniqueSortKey(); m_sql->addTransaction(newTransaction); @@ -415,18 +415,18 @@ void MyMoneyDatabaseMgr::addTransaction(MyMoneyTransaction& transaction, const b acc.adjustBalance((*it_s)); if(!skipAccountUpdate) { acc.touch(); -//FIXME: invalidateBalanceCache(acc.id()); +//FIXME: tqinvalidateBalanceCache(acc.id()); } m_sql->modifyAccount(acc); } } -bool MyMoneyDatabaseMgr::hasActiveSplits(const QString& id) const +bool MyMoneyDatabaseMgr::hasActiveSplits(const TQString& id) const { - QMap<QString, MyMoneyTransaction>::ConstIterator it; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it; MyMoneyTransactionFilter f(id); - QMap<QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(f); + TQMap<TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(f); for(it = transactionList.begin(); it != transactionList.end(); ++it) { if((*it).accountReferenced(id)) { @@ -447,12 +447,12 @@ bool MyMoneyDatabaseMgr::hasActiveSplits(const QString& id) const * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ -//const MyMoneyMoney MyMoneyDatabaseMgr::balance(const QString& id, const QDate& date); +//const MyMoneyMoney MyMoneyDatabaseMgr::balance(const TQString& id, const TQDate& date); -const MyMoneyMoney MyMoneyDatabaseMgr::totalBalance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneyDatabaseMgr::totalBalance(const TQString& id, const TQDate& date) const { - QStringList accounts; - QStringList::ConstIterator it_a; + TQStringList accounts; + TQStringList::ConstIterator it_a; MyMoneyMoney result; //(balance(id, date)); @@ -460,26 +460,26 @@ const MyMoneyMoney MyMoneyDatabaseMgr::totalBalance(const QString& id, const QDa for (it_a = accounts.begin(); it_a != accounts.end(); ++it_a) { accounts += MyMoneyFile::instance()->account(*it_a).accountList(); } - std::list <QString> tempList (accounts.begin(), accounts.end()); + std::list <TQString> tempList (accounts.begin(), accounts.end()); tempList.sort();; tempList.unique(); - accounts = QStringList(tempList); + accounts = TQStringList(tempList); - QMap<QString, MyMoneyMoney> balanceMap = m_sql->fetchBalance(accounts, date); - for (QMap<QString, MyMoneyMoney>::ConstIterator it_b = balanceMap.begin(); it_b != balanceMap.end(); ++it_b) { + TQMap<TQString, MyMoneyMoney> balanceMap = m_sql->fetchBalance(accounts, date); + for (TQMap<TQString, MyMoneyMoney>::ConstIterator it_b = balanceMap.begin(); it_b != balanceMap.end(); ++it_b) { result += it_b.data(); } return result; } -const MyMoneyInstitution MyMoneyDatabaseMgr::institution(const QString& id) const +const MyMoneyInstitution MyMoneyDatabaseMgr::institution(const TQString& id) const { - QMap<QString, MyMoneyInstitution>::ConstIterator pos; - QMap<QString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(QString(id)); + TQMap<TQString, MyMoneyInstitution>::ConstIterator pos; + TQMap<TQString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(TQString(id)); - pos = institutionList.find(id); + pos = institutionList.tqfind(id); if(pos != institutionList.end()) return *pos; throw new MYMONEYEXCEPTION("unknown institution"); @@ -496,35 +496,35 @@ unsigned int MyMoneyDatabaseMgr::accountCount(void) const return m_sql->getRecCount("kmmAccounts"); } -const QValueList<MyMoneyInstitution> MyMoneyDatabaseMgr::institutionList(void) const +const TQValueList<MyMoneyInstitution> MyMoneyDatabaseMgr::institutionList(void) const { if (m_sql) { return m_sql->fetchInstitutions().values(); } else { - return QValueList<MyMoneyInstitution> (); + return TQValueList<MyMoneyInstitution> (); } } void MyMoneyDatabaseMgr::modifyAccount(const MyMoneyAccount& account, const bool skipCheck) { - QMap<QString, MyMoneyAccount>::ConstIterator pos; + TQMap<TQString, MyMoneyAccount>::ConstIterator pos; // locate the account in the file global pool startTransaction(); - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts (QString(account.id()), true); - pos = accountList.find(account.id()); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts (TQString(account.id()), true); + pos = accountList.tqfind(account.id()); if(pos != accountList.end()) { // check if the new info is based on the old one. // this is the case, when the file and the id // as well as the type are equal. - if(((*pos).parentAccountId() == account.parentAccountId() + if(((*pos).tqparentAccountId() == account.tqparentAccountId() && (*pos).accountType() == account.accountType()) || skipCheck == true) { // make sure that all the referenced objects exist if(!account.institutionId().isEmpty()) institution(account.institutionId()); - QValueList<QString>::ConstIterator it_a; + TQValueList<TQString>::ConstIterator it_a; for(it_a = account.accountList().begin(); it_a != account.accountList().end(); ++it_a) { this->account(*it_a); } @@ -532,8 +532,8 @@ void MyMoneyDatabaseMgr::modifyAccount(const MyMoneyAccount& account, const bool // update information in account list //m_accountList.modify(account.id(), account); - // invalidate cached balance -//FIXME: invalidateBalanceCache(account.id()); + // tqinvalidate cached balance +//FIXME: tqinvalidateBalanceCache(account.id()); // mark file as changed m_sql->modifyAccount(account); @@ -551,11 +551,11 @@ void MyMoneyDatabaseMgr::modifyAccount(const MyMoneyAccount& account, const bool void MyMoneyDatabaseMgr::modifyInstitution(const MyMoneyInstitution& institution) { - QMap<QString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(QString(institution.id())); - QMap<QString, MyMoneyInstitution>::ConstIterator pos; + TQMap<TQString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(TQString(institution.id())); + TQMap<TQString, MyMoneyInstitution>::ConstIterator pos; // locate the institution in the file global pool - pos = institutionList.find(institution.id()); + pos = institutionList.tqfind(institution.id()); if(pos != institutionList.end()) { m_sql->modifyInstitution(institution); } else @@ -572,7 +572,7 @@ void MyMoneyDatabaseMgr::modifyInstitution(const MyMoneyInstitution& institution */ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction) { - QMap<QString, bool> modifiedAccounts; + TQMap<TQString, bool> modifiedAccounts; // perform some checks to see that the transaction stuff is OK. For // now we assume that @@ -588,7 +588,7 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction throw new MYMONEYEXCEPTION("invalid transaction to be modified"); // now check the splits - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following lines will throw an exception if the // account or payee do not exist @@ -599,29 +599,29 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction // new data seems to be ok. find old version of transaction // in our pool. Throw exception if unknown. -// if(!m_transactionKeys.contains(transaction.id())) +// if(!m_transactionKeys.tqcontains(transaction.id())) // throw new MYMONEYEXCEPTION("invalid transaction id"); -// QString oldKey = m_transactionKeys[transaction.id()]; - QMap <QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + QString(transaction.id()) + "')"); +// TQString oldKey = m_transactionKeys[transaction.id()]; + TQMap <TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + TQString(transaction.id()) + "')"); // if(transactionList.size() != 1) // throw new MYMONEYEXCEPTION("invalid transaction key"); - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; -// it_t = transactionList.find(oldKey); +// it_t = transactionList.tqfind(oldKey); it_t = transactionList.begin(); if(it_t == transactionList.end()) throw new MYMONEYEXCEPTION("invalid transaction key"); // mark all accounts referenced in old and new transaction data // as modified - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(); for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s) { MyMoneyAccount acc = accountList[(*it_s).accountId()]; acc.adjustBalance((*it_s), true); acc.touch(); -//FIXME: invalidateBalanceCache(acc.id()); +//FIXME: tqinvalidateBalanceCache(acc.id()); //m_accountList.modify(acc.id(), acc); m_sql->modifyAccount(acc); //modifiedAccounts[(*it_s).accountId()] = true; @@ -630,7 +630,7 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction MyMoneyAccount acc = accountList[(*it_s).accountId()]; acc.adjustBalance((*it_s)); acc.touch(); -//FIXME: invalidateBalanceCache(acc.id()); +//FIXME: tqinvalidateBalanceCache(acc.id()); //m_accountList.modify(acc.id(), acc); m_sql->modifyAccount(acc); //modifiedAccounts[(*it_s).accountId()] = true; @@ -640,7 +640,7 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction // m_sql->removeTransaction(oldKey); // add new transaction to lists - // QString newKey = transaction.uniqueSortKey(); + // TQString newKey = transaction.uniqueSortKey(); // m_sql->insertTransaction(newKey, transaction); //m_transactionKeys.modify(transaction.id(), newKey); @@ -648,88 +648,88 @@ void MyMoneyDatabaseMgr::modifyTransaction(const MyMoneyTransaction& transaction m_sql->modifyTransaction(transaction); } -void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent) +void MyMoneyDatabaseMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent) { - if(account.accountType() == MyMoneyAccount::Stock && parent.accountType() != MyMoneyAccount::Investment) + if(account.accountType() == MyMoneyAccount::Stock && tqparent.accountType() != MyMoneyAccount::Investment) throw new MYMONEYEXCEPTION("Cannot move a stock acocunt into a non-investment account"); - QStringList accountIdList; - QMap<QString, MyMoneyAccount>::ConstIterator oldParent; - QMap<QString, MyMoneyAccount>::ConstIterator newParent; - QMap<QString, MyMoneyAccount>::ConstIterator childAccount; + TQStringList accountIdList; + TQMap<TQString, MyMoneyAccount>::ConstIterator oldParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator newParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator childAccount; // verify that accounts exist. If one does not, // an exception is thrown - accountIdList << account.id() << parent.id(); + accountIdList << account.id() << tqparent.id(); MyMoneyDatabaseMgr::account(account.id()); - MyMoneyDatabaseMgr::account(parent.id()); + MyMoneyDatabaseMgr::account(tqparent.id()); - if(!account.parentAccountId().isEmpty()) { - accountIdList << account.parentAccountId(); + if(!account.tqparentAccountId().isEmpty()) { + accountIdList << account.tqparentAccountId(); } startTransaction(); - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(accountIdList, true); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(accountIdList, true); - if(!account.parentAccountId().isEmpty()) { - MyMoneyDatabaseMgr::account(account.parentAccountId()); - oldParent = accountList.find(account.parentAccountId()); + if(!account.tqparentAccountId().isEmpty()) { + MyMoneyDatabaseMgr::account(account.tqparentAccountId()); + oldParent = accountList.tqfind(account.tqparentAccountId()); } - newParent = accountList.find(parent.id()); - childAccount = accountList.find(account.id()); + newParent = accountList.tqfind(tqparent.id()); + childAccount = accountList.tqfind(account.id()); MyMoneyAccount acc; - if(!account.parentAccountId().isEmpty()) { + if(!account.tqparentAccountId().isEmpty()) { acc = (*oldParent); acc.removeAccountId(account.id()); m_sql->modifyAccount(acc); } - parent = (*newParent); - parent.addAccountId(account.id()); + tqparent = (*newParent); + tqparent.addAccountId(account.id()); account = (*childAccount); - account.setParentAccountId(parent.id()); + account.setParentAccountId(tqparent.id()); - m_sql->modifyAccount(parent); + m_sql->modifyAccount(tqparent); m_sql->modifyAccount(account); commitTransaction(); } void MyMoneyDatabaseMgr::removeTransaction(const MyMoneyTransaction& transaction) { - QMap<QString, bool> modifiedAccounts; + TQMap<TQString, bool> modifiedAccounts; // first perform all the checks if(transaction.id().isEmpty()) throw new MYMONEYEXCEPTION("invalid transaction to be deleted"); - QMap<QString, QString>::ConstIterator it_k; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, TQString>::ConstIterator it_k; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; -// it_k = m_transactionKeys.find(transaction.id()); +// it_k = m_transactionKeys.tqfind(transaction.id()); // if(it_k == m_transactionKeys.end()) // throw new MYMONEYEXCEPTION("invalid transaction to be deleted"); - QMap <QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + QString(transaction.id()) + "')"); -// it_t = transactionList.find(*it_k); + TQMap <TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + TQString(transaction.id()) + "')"); +// it_t = transactionList.tqfind(*it_k); it_t = transactionList.begin(); if(it_t == transactionList.end()) throw new MYMONEYEXCEPTION("invalid transaction key"); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; // scan the splits and collect all accounts that need // to be updated after the removal of this transaction - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(); for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s) { MyMoneyAccount acc = accountList[(*it_s).accountId()]; // modifiedAccounts[(*it_s).accountId()] = true; acc.adjustBalance((*it_s), true); acc.touch(); m_sql->modifyAccount(acc); -//FIXME: invalidateBalanceCache(acc.id()); +//FIXME: tqinvalidateBalanceCache(acc.id()); } // FIXME: check if any split is frozen and throw exception @@ -742,20 +742,20 @@ void MyMoneyDatabaseMgr::removeTransaction(const MyMoneyTransaction& transaction m_sql->removeTransaction(transaction); } -unsigned int MyMoneyDatabaseMgr::transactionCount(const QString& account) const +unsigned int MyMoneyDatabaseMgr::transactionCount(const TQString& account) const { return (m_sql->transactionCount(account)); } -const QMap<QString, unsigned long> MyMoneyDatabaseMgr::transactionCountMap(void) const +const TQMap<TQString, unsigned long> MyMoneyDatabaseMgr::transactionCountMap(void) const { return (m_sql->transactionCountMap()); } -const QValueList<MyMoneyTransaction> MyMoneyDatabaseMgr::transactionList(MyMoneyTransactionFilter& filter) const +const TQValueList<MyMoneyTransaction> MyMoneyDatabaseMgr::transactionList(MyMoneyTransactionFilter& filter) const { - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; transactionList(list, filter); return list; } -void MyMoneyDatabaseMgr::transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const +void MyMoneyDatabaseMgr::transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const { list.clear(); @@ -764,22 +764,22 @@ void MyMoneyDatabaseMgr::transactionList(QValueList<MyMoneyTransaction>& list, M PASS } -void MyMoneyDatabaseMgr::transactionList(QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const +void MyMoneyDatabaseMgr::transactionList(TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const { list.clear(); - MyMoneyMap<QString, MyMoneyTransaction> transactionList; + MyMoneyMap<TQString, MyMoneyTransaction> transactionList; TRY if (m_sql) transactionList = m_sql->fetchTransactions(filter); PASS - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QMap<QString, MyMoneyTransaction>::ConstIterator txEnd = transactionList.end(); + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator txEnd = transactionList.end(); for(it_t = transactionList.begin(); it_t != txEnd; ++it_t) { if(filter.match(*it_t)) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = filter.matchingSplits().begin(); it_s != filter.matchingSplits().end(); ++it_s) { - list.append(qMakePair(*it_t, *it_s)); + list.append(tqMakePair(*it_t, *it_s)); } } } @@ -787,12 +787,12 @@ void MyMoneyDatabaseMgr::transactionList(QValueList<QPair<MyMoneyTransaction, My void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account) { - MyMoneyAccount parent; + MyMoneyAccount tqparent; - // check that the account and it's parent exist + // check that the account and it's tqparent exist // this will throw an exception if the id is unknown MyMoneyDatabaseMgr::account(account.id()); - parent = MyMoneyDatabaseMgr::account(account.parentAccountId()); + tqparent = MyMoneyDatabaseMgr::account(account.tqparentAccountId()); // check that it's not one of the standard account groups if(isStandardAccount(account.id())) @@ -802,10 +802,10 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account) throw new MYMONEYEXCEPTION("Unable to remove account with active splits"); } - // re-parent all sub-ordinate accounts to the parent of the account + // re-tqparent all sub-ordinate accounts to the tqparent of the account // to be deleted. First round check that all accounts exist, second - // round do the re-parenting. - QStringList::ConstIterator it; + // round do the re-tqparenting. + TQStringList::ConstIterator it; for(it = account.accountList().begin(); it != account.accountList().end(); ++it) { MyMoneyDatabaseMgr::account(*it); } @@ -813,23 +813,23 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account) // if one of the accounts did not exist, an exception had been // thrown and we would not make it until here. - QStringList accountIdList; - accountIdList << parent.id() << account.id(); + TQStringList accountIdList; + accountIdList << tqparent.id() << account.id(); startTransaction(); - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(accountIdList, true); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(accountIdList, true); - QMap<QString, MyMoneyAccount>::ConstIterator it_a; - QMap<QString, MyMoneyAccount>::ConstIterator it_p; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_a; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_p; // locate the account in the file global pool - it_a = accountList.find(account.id()); + it_a = accountList.tqfind(account.id()); if(it_a == accountList.end()) throw new MYMONEYEXCEPTION("Internal error: account not found in list"); - it_p = accountList.find(parent.id()); + it_p = accountList.tqfind(tqparent.id()); if(it_p == accountList.end()) - throw new MYMONEYEXCEPTION("Internal error: parent account not found in list"); + throw new MYMONEYEXCEPTION("Internal error: tqparent account not found in list"); if(!account.institutionId().isEmpty()) throw new MYMONEYEXCEPTION("Cannot remove account still attached to an institution"); @@ -842,25 +842,25 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account) if((*it_a).id() == account.id() && (*it_a).accountType() == account.accountType()) { - // second round over sub-ordinate accounts: do re-parenting + // second round over sub-ordinate accounts: do re-tqparenting // but only if the list contains at least one entry // FIXME: move this logic to MyMoneyFile if((*it_a).accountList().count() > 0) { for(it = (*it_a).accountList().begin(); it != (*it_a).accountList().end(); ++it) { MyMoneyAccount acc(MyMoneyDatabaseMgr::account(*it)); - reparentAccount(acc, parent);//, false); + reparentAccount(acc, tqparent);//, false); } } - // remove account from parent's list - parent.removeAccountId(account.id()); - m_sql->modifyAccount(parent); + // remove account from tqparent's list + tqparent.removeAccountId(account.id()); + m_sql->modifyAccount(tqparent); // remove account from the global account pool //m_accountList.remove(account.id()); // remove from balance list //FIXME: m_balanceCache.remove(account.id()); -//FIXME: invalidateBalanceCache(parent.id()); +//FIXME: tqinvalidateBalanceCache(tqparent.id()); m_sql->removeAccount(account); } @@ -869,10 +869,10 @@ void MyMoneyDatabaseMgr::removeAccount(const MyMoneyAccount& account) void MyMoneyDatabaseMgr::removeInstitution(const MyMoneyInstitution& institution) { - QMap<QString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(QString(institution.id())); - QMap<QString, MyMoneyInstitution>::ConstIterator it_i; + TQMap<TQString, MyMoneyInstitution> institutionList = m_sql->fetchInstitutions(TQString(institution.id())); + TQMap<TQString, MyMoneyInstitution>::ConstIterator it_i; - it_i = institutionList.find(institution.id()); + it_i = institutionList.tqfind(institution.id()); if(it_i != institutionList.end()) { // mark file as changed m_sql->removeInstitution(institution); @@ -880,31 +880,31 @@ void MyMoneyDatabaseMgr::removeInstitution(const MyMoneyInstitution& institution throw new MYMONEYEXCEPTION("invalid institution"); } -const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const QString& id) const +const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const TQString& id) const { // get the full key of this transaction, throw exception // if it's invalid (unknown) - //if(!m_transactionKeys.contains(id)) + //if(!m_transactionKeys.tqcontains(id)) // throw new MYMONEYEXCEPTION("invalid transaction id"); // check if this key is in the list, throw exception if not - //QString key = m_transactionKeys[id]; - QMap <QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + QString(id) + "')"); + //TQString key = m_transactionKeys[id]; + TQMap <TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions("('" + TQString(id) + "')"); //there should only be one transaction in the map, if it was found, so check the size of the map //return the first element. - //if(!transactionList.contains(key)) + //if(!transactionList.tqcontains(key)) if(!transactionList.size()) throw new MYMONEYEXCEPTION("invalid transaction key"); return transactionList.begin().data(); } -const MyMoneyMoney MyMoneyDatabaseMgr::balance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneyDatabaseMgr::balance(const TQString& id, const TQDate& date) const { - QStringList idList; + TQStringList idList; idList.append(id); - QMap<QString,MyMoneyMoney> tempMap = m_sql->fetchBalance(idList, date); + TQMap<TQString,MyMoneyMoney> tempMap = m_sql->fetchBalance(idList, date); MyMoneyMoney returnValue = tempMap[id]; if (returnValue != MyMoneyMoney()) { @@ -912,42 +912,42 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const QString& id, const QDate& d } //DEBUG - QDate date_ (date); - //if (date_ == QDate()) date_ = QDate::currentDate(); + TQDate date_ (date); + //if (date_ == TQDate()) date_ = TQDate::tqcurrentDate(); // END DEBUG MyMoneyMoney result(0); MyMoneyAccount acc; - QMap<QString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*QString(id)*/); - //QMap<QString, MyMoneyAccount>::const_iterator accpos = accountList.find(id); - if (date_ != QDate()) qDebug ("request balance for %s at %s", id.data(), date_.toString(Qt::ISODate).latin1()); + TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*TQString(id)*/); + //TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.tqfind(id); + if (date_ != TQDate()) qDebug ("request balance for %s at %s", id.data(), TQString(date_.toString(Qt::ISODate)).latin1()); // if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) { -// if(accountList.find(id) != accountList.end()) +// if(accountList.tqfind(id) != accountList.end()) // return accountList[id].balance(); // return MyMoneyMoney(0); // } if(/*m_balanceCache[id].valid == false || date != m_balanceCacheDate) || */ m_sql != 0) { - QMap<QString, MyMoneyMoney> balances; - QMap<QString, MyMoneyMoney>::ConstIterator it_b; + TQMap<TQString, MyMoneyMoney> balances; + TQMap<TQString, MyMoneyMoney>::ConstIterator it_b; //FIXME: if (date != m_balanceCacheDate) { //FIXME: m_balanceCache.clear(); //FIXME: m_balanceCacheDate = date; //FIXME: } - QValueList<MyMoneyTransaction>::ConstIterator it_t; - QValueList<MyMoneyTransaction>::ConstIterator txEnd; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneyTransaction>::ConstIterator txEnd; + TQValueList<MyMoneySplit>::ConstIterator it_s; MyMoneyTransactionFilter filter; filter.addAccount(id); - filter.setDateFilter(QDate(), date_); + filter.setDateFilter(TQDate(), date_); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> list = transactionList(filter); + TQValueList<MyMoneyTransaction> list = transactionList(filter); txEnd = list.end(); for(it_t = list.begin(); it_t != txEnd; ++it_t) { for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s){ - const QString aid = (*it_s).accountId(); + const TQString aid = (*it_s).accountId(); if((*it_s).action() == MyMoneySplit::ActionSplitShares) { balances[aid] = balances[aid] * (*it_s).shares(); } else { @@ -964,7 +964,7 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const QString& id, const QDate& d // fill all accounts w/o transactions to zero // if (m_sql != 0) { -// QMap<QString, MyMoneyAccount>::ConstIterator it_a; +// TQMap<TQString, MyMoneyAccount>::ConstIterator it_a; // for(it_a = m_accountList.begin(); it_a != m_accountList.end(); ++it_a) { //FIXME: if(m_balanceCache[(*it_a).id()].valid == false) { //FIXME: MyMoneyBalanceCacheItem balance(MyMoneyMoney(0,1)); @@ -985,13 +985,13 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const QString& id, const QDate& d return result; } -const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const QString& account, const int idx) const +const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const TQString& account, const int idx) const { /* removed with MyMoneyAccount::Transaction - QMap<QString, MyMoneyAccount>::ConstIterator acc; + TQMap<TQString, MyMoneyAccount>::ConstIterator acc; // find account object in list, throw exception if unknown - acc = m_accountList.find(account); + acc = m_accountList.tqfind(account); if(acc == m_accountList.end()) throw new MYMONEYEXCEPTION("unknown account id"); @@ -1003,9 +1003,9 @@ const MyMoneyTransaction MyMoneyDatabaseMgr::transaction(const QString& account, */ // new implementation if the above code does not work anymore - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; //MyMoneyAccount acc = m_accountList[account]; - MyMoneyAccount acc = m_sql->fetchAccounts(QString(account)) [account]; + MyMoneyAccount acc = m_sql->fetchAccounts(TQString(account)) [account]; MyMoneyTransactionFilter filter; if(acc.accountGroup() == MyMoneyAccount::Income @@ -1026,12 +1026,12 @@ unsigned int MyMoneyDatabaseMgr::institutionCount(void) const return m_sql->getRecCount("kmmInstitutions"); } -void MyMoneyDatabaseMgr::accountList(QValueList<MyMoneyAccount>& list) const +void MyMoneyDatabaseMgr::accountList(TQValueList<MyMoneyAccount>& list) const { - QMap <QString, MyMoneyAccount> accountList; + TQMap <TQString, MyMoneyAccount> accountList; if (m_sql) accountList = m_sql->fetchAccounts(); - QMap<QString, MyMoneyAccount>::ConstIterator it; - QMap<QString, MyMoneyAccount>::ConstIterator accEnd = accountList.end(); + TQMap<TQString, MyMoneyAccount>::ConstIterator it; + TQMap<TQString, MyMoneyAccount>::ConstIterator accEnd = accountList.end(); for(it = accountList.begin(); it != accEnd; ++it) { if(!isStandardAccount((*it).id())) { list.append(*it); @@ -1052,7 +1052,7 @@ const MyMoneyAccount MyMoneyDatabaseMgr::income(void) const { return MyMoneyFile::instance()->account(STD_ACC_INCOME); } const MyMoneyAccount MyMoneyDatabaseMgr::equity(void) const -{ return MyMoneyFile::instance()->account(STD_ACC_EQUITY); } +{ return MyMoneyFile::instance()->account(STD_ACC_ETQUITY); } void MyMoneyDatabaseMgr::addSecurity(MyMoneySecurity& security) { @@ -1065,13 +1065,13 @@ void MyMoneyDatabaseMgr::addSecurity(MyMoneySecurity& security) void MyMoneyDatabaseMgr::modifySecurity(const MyMoneySecurity& security) { - QMap<QString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(QString(security.id()), true); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(TQString(security.id()), true); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = securitiesList.find(security.id()); + it = securitiesList.tqfind(security.id()); if(it == securitiesList.end()) { - QString msg = "Unknown security '"; + TQString msg = "Unknown security '"; msg += security.id() + "' during modifySecurity()"; throw new MYMONEYEXCEPTION(msg); } @@ -1081,15 +1081,15 @@ void MyMoneyDatabaseMgr::modifySecurity(const MyMoneySecurity& security) void MyMoneyDatabaseMgr::removeSecurity(const MyMoneySecurity& security) { - QMap<QString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(QString(security.id())); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(TQString(security.id())); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; // FIXME: check referential integrity - it = securitiesList.find(security.id()); + it = securitiesList.tqfind(security.id()); if(it == securitiesList.end()) { - QString msg = "Unknown security '"; + TQString msg = "Unknown security '"; msg += security.id() + "' during removeSecurity()"; throw new MYMONEYEXCEPTION(msg); } @@ -1097,10 +1097,10 @@ void MyMoneyDatabaseMgr::removeSecurity(const MyMoneySecurity& security) m_sql->removeSecurity(security); } -const MyMoneySecurity MyMoneyDatabaseMgr::security(const QString& id) const +const MyMoneySecurity MyMoneyDatabaseMgr::security(const TQString& id) const { - QMap<QString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(QString(id)); - QMap<QString, MyMoneySecurity>::ConstIterator it = securitiesList.find(id); + TQMap<TQString, MyMoneySecurity> securitiesList = m_sql->fetchSecurities(TQString(id)); + TQMap<TQString, MyMoneySecurity>::ConstIterator it = securitiesList.tqfind(id); if(it != securitiesList.end()) { return it.data(); @@ -1109,15 +1109,15 @@ const MyMoneySecurity MyMoneyDatabaseMgr::security(const QString& id) const return MyMoneySecurity(); } -const QValueList<MyMoneySecurity> MyMoneyDatabaseMgr::securityList(void) const +const TQValueList<MyMoneySecurity> MyMoneyDatabaseMgr::securityList(void) const { return m_sql->fetchSecurities().values(); } void MyMoneyDatabaseMgr::addPrice(const MyMoneyPrice& price) { MyMoneyPriceEntries::ConstIterator it; MyMoneyPriceList priceList = m_sql->fetchPrices(); - it = priceList[MyMoneySecurityPair(price.from(), price.to())].find(price.date()); - // do not replace, if the information did not change. + it = priceList[MyMoneySecurityPair(price.from(), price.to())].tqfind(price.date()); + // do not tqreplace, if the information did not change. if(it != priceList[MyMoneySecurityPair(price.from(), price.to())].end()) { if((*it).rate((*it).to()) == price.rate(price.to()) && (*it).source() == price.source()) @@ -1132,7 +1132,7 @@ void MyMoneyDatabaseMgr::removePrice(const MyMoneyPrice& price) m_sql->removePrice(price); } -const MyMoneyPrice MyMoneyDatabaseMgr::price(const QString& fromId, const QString& toId, const QDate& _date, const bool exactDate) const +const MyMoneyPrice MyMoneyDatabaseMgr::price(const TQString& fromId, const TQString& toId, const TQDate& _date, const bool exactDate) const { return m_sql->fetchSinglePrice(fromId, toId, _date, exactDate); } @@ -1160,12 +1160,12 @@ void MyMoneyDatabaseMgr::addSchedule(MyMoneySchedule& sched) void MyMoneyDatabaseMgr::modifySchedule(const MyMoneySchedule& sched) { - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(QString(sched.id())); - QMap<QString, MyMoneySchedule>::ConstIterator it; + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(TQString(sched.id())); + TQMap<TQString, MyMoneySchedule>::ConstIterator it; - it = scheduleList.find(sched.id()); + it = scheduleList.tqfind(sched.id()); if(it == scheduleList.end()) { - QString msg = "Unknown schedule '" + sched.id() + "'"; + TQString msg = "Unknown schedule '" + sched.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1174,12 +1174,12 @@ void MyMoneyDatabaseMgr::modifySchedule(const MyMoneySchedule& sched) void MyMoneyDatabaseMgr::removeSchedule(const MyMoneySchedule& sched) { - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(QString(sched.id())); - QMap<QString, MyMoneySchedule>::ConstIterator it; + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(TQString(sched.id())); + TQMap<TQString, MyMoneySchedule>::ConstIterator it; - it = scheduleList.find(sched.id()); + it = scheduleList.tqfind(sched.id()); if(it == scheduleList.end()) { - QString msg = "Unknown schedule '" + sched.id() + "'"; + TQString msg = "Unknown schedule '" + sched.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1188,33 +1188,33 @@ void MyMoneyDatabaseMgr::removeSchedule(const MyMoneySchedule& sched) m_sql->removeSchedule(sched); } -const MyMoneySchedule MyMoneyDatabaseMgr::schedule(const QString& id) const +const MyMoneySchedule MyMoneyDatabaseMgr::schedule(const TQString& id) const { - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(QString(id)); - QMap<QString, MyMoneySchedule>::ConstIterator pos; + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(TQString(id)); + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; // locate the schedule and if present, return it's data - pos = scheduleList.find(id); + pos = scheduleList.tqfind(id); if(pos != scheduleList.end()) return (*pos); // throw an exception, if it does not exist - QString msg = "Unknown schedule id '" + id + "'"; + TQString msg = "Unknown schedule id '" + id + "'"; throw new MYMONEYEXCEPTION(msg); } -const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const QString& accountId, +const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const TQString& accountId, const MyMoneySchedule::typeE type, const MyMoneySchedule::occurenceE occurence, const MyMoneySchedule::paymentTypeE paymentType, - const QDate& startDate, - const QDate& endDate, + const TQDate& startDate, + const TQDate& endDate, const bool overdue) const { - QMap<QString, MyMoneySchedule> scheduleList; + TQMap<TQString, MyMoneySchedule> scheduleList; if (m_sql) scheduleList = m_sql->fetchSchedules(); - QMap<QString, MyMoneySchedule>::ConstIterator pos; - QValueList<MyMoneySchedule> list; + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; + TQValueList<MyMoneySchedule> list; // qDebug("scheduleList()"); @@ -1241,8 +1241,8 @@ const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const QString if(!accountId.isEmpty()) { MyMoneyTransaction t = (*pos).transaction(); - QValueList<MyMoneySplit>::ConstIterator it; - QValueList<MyMoneySplit> splits; + TQValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> splits; splits = t.splits(); for(it = splits.begin(); it != splits.end(); ++it) { if((*it).accountId() == accountId) @@ -1275,10 +1275,10 @@ const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const QString if (!(*pos).isOverdue()) continue; /* - QDate nextPayment = (*pos).nextPayment((*pos).lastPayment()); + TQDate nextPayment = (*pos).nextPayment((*pos).lastPayment()); if(!nextPayment.isValid()) continue; - if(nextPayment >= QDate::currentDate()) + if(nextPayment >= TQDate::tqcurrentDate()) continue; */ } @@ -1289,16 +1289,16 @@ const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleList(const QString return list; } -const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int scheduleTypes, +const TQValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts) const + TQDate startDate, + const TQStringList& accounts) const { // qDebug("scheduleListEx"); - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); - QMap<QString, MyMoneySchedule>::ConstIterator pos; - QValueList<MyMoneySchedule> list; + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; + TQValueList<MyMoneySchedule> list; if (!startDate.isValid()) return list; @@ -1325,7 +1325,7 @@ const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int schedu if (accounts.count() > 0) { - if (accounts.contains((*pos).account().id())) + if (accounts.tqcontains((*pos).account().id())) continue; } @@ -1339,12 +1339,12 @@ const QValueList<MyMoneySchedule> MyMoneyDatabaseMgr::scheduleListEx( int schedu void MyMoneyDatabaseMgr::addCurrency(const MyMoneySecurity& currency) { if (m_sql) { - QMap<QString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(QString(currency.id())); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(currency.id())); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = currencyList.find(currency.id()); + it = currencyList.tqfind(currency.id()); if(it != currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot add currency with existing id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id())); } m_sql->addCurrency(currency); @@ -1353,12 +1353,12 @@ void MyMoneyDatabaseMgr::addCurrency(const MyMoneySecurity& currency) void MyMoneyDatabaseMgr::modifyCurrency(const MyMoneySecurity& currency) { - QMap<QString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(QString(currency.id())); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(currency.id())); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = currencyList.find(currency.id()); + it = currencyList.tqfind(currency.id()); if(it == currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot modify currency with unknown id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id())); } m_sql->modifyCurrency(currency); @@ -1366,50 +1366,50 @@ void MyMoneyDatabaseMgr::modifyCurrency(const MyMoneySecurity& currency) void MyMoneyDatabaseMgr::removeCurrency(const MyMoneySecurity& currency) { - QMap<QString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(QString(currency.id())); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(currency.id())); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; // FIXME: check referential integrity - it = currencyList.find(currency.id()); + it = currencyList.tqfind(currency.id()); if(it == currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot remove currency with unknown id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id())); } m_sql->removeCurrency(currency); } -const MyMoneySecurity MyMoneyDatabaseMgr::currency(const QString& id) const +const MyMoneySecurity MyMoneyDatabaseMgr::currency(const TQString& id) const { if(id.isEmpty()) { } - QMap<QString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(QString(id)); - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity> currencyList = m_sql->fetchCurrencies(TQString(id)); + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = currencyList.find(id); + it = currencyList.tqfind(id); if(it == currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot retrieve currency with unknown id '%1'").arg(id.data())); + throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id)); } return *it; } -const QValueList<MyMoneySecurity> MyMoneyDatabaseMgr::currencyList(void) const +const TQValueList<MyMoneySecurity> MyMoneyDatabaseMgr::currencyList(void) const { if (m_sql) { return m_sql->fetchCurrencies().values(); } else { - return QValueList<MyMoneySecurity> (); + return TQValueList<MyMoneySecurity> (); } } -const QValueList<MyMoneyReport> MyMoneyDatabaseMgr::reportList( void ) const +const TQValueList<MyMoneyReport> MyMoneyDatabaseMgr::reportList( void ) const { if (m_sql) { return m_sql->fetchReports().values(); } else { - return QValueList<MyMoneyReport> (); + return TQValueList<MyMoneyReport> (); } } @@ -1426,12 +1426,12 @@ void MyMoneyDatabaseMgr::addReport( MyMoneyReport& report ) void MyMoneyDatabaseMgr::modifyReport( const MyMoneyReport& report ) { - QMap<QString, MyMoneyReport> reportList = m_sql->fetchReports(QString(report.id())); - QMap<QString, MyMoneyReport>::ConstIterator it; + TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(TQString(report.id())); + TQMap<TQString, MyMoneyReport>::ConstIterator it; - it = reportList.find(report.id()); + it = reportList.tqfind(report.id()); if(it == reportList.end()) { - QString msg = "Unknown report '" + report.id() + "'"; + TQString msg = "Unknown report '" + report.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1443,26 +1443,26 @@ unsigned MyMoneyDatabaseMgr::countReports( void ) const return m_sql->getRecCount("kmmReports"); } -const MyMoneyReport MyMoneyDatabaseMgr::report( const QString& id ) const +const MyMoneyReport MyMoneyDatabaseMgr::report( const TQString& id ) const { - return m_sql->fetchReports(QString(id))[id]; + return m_sql->fetchReports(TQString(id))[id]; } void MyMoneyDatabaseMgr::removeReport(const MyMoneyReport& report) { - QMap<QString, MyMoneyReport> reportList = m_sql->fetchReports(QString(report.id())); - QMap<QString, MyMoneyReport>::ConstIterator it; + TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(TQString(report.id())); + TQMap<TQString, MyMoneyReport>::ConstIterator it; - it = reportList.find(report.id()); + it = reportList.tqfind(report.id()); if(it == reportList.end()) { - QString msg = "Unknown report '" + report.id() + "'"; + TQString msg = "Unknown report '" + report.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_sql->removeReport(report); } -const QValueList<MyMoneyBudget> MyMoneyDatabaseMgr::budgetList( void ) const +const TQValueList<MyMoneyBudget> MyMoneyDatabaseMgr::budgetList( void ) const { return m_sql->fetchBudgets().values(); } @@ -1473,10 +1473,10 @@ void MyMoneyDatabaseMgr::addBudget( MyMoneyBudget& budget ) m_sql->addBudget(newBudget); } -const MyMoneyBudget MyMoneyDatabaseMgr::budgetByName(const QString& budget) const +const MyMoneyBudget MyMoneyDatabaseMgr::budgetByName(const TQString& budget) const { - QMap<QString, MyMoneyBudget> budgets = m_sql->fetchBudgets(); - QMap<QString, MyMoneyBudget>::ConstIterator it_p; + TQMap<TQString, MyMoneyBudget> budgets = m_sql->fetchBudgets(); + TQMap<TQString, MyMoneyBudget>::ConstIterator it_p; for(it_p = budgets.begin(); it_p != budgets.end(); ++it_p) { if((*it_p).name() == budget) { @@ -1489,18 +1489,18 @@ const MyMoneyBudget MyMoneyDatabaseMgr::budgetByName(const QString& budget) cons void MyMoneyDatabaseMgr::modifyBudget( const MyMoneyBudget& budget ) { - //QMap<QString, MyMoneyBudget>::ConstIterator it; + //TQMap<TQString, MyMoneyBudget>::ConstIterator it; - //it = m_budgetList.find(budget.id()); + //it = m_budgetList.tqfind(budget.id()); //if(it == m_budgetList.end()) { - // QString msg = "Unknown budget '" + budget.id() + "'"; + // TQString msg = "Unknown budget '" + budget.id() + "'"; // throw new MYMONEYEXCEPTION(msg); //} //m_budgetList.modify(budget.id(), budget); startTransaction(); - if (m_sql->fetchBudgets(QString(budget.id()), true).empty()) { - QString msg = "Unknown budget '" + budget.id() + "'"; + if (m_sql->fetchBudgets(TQString(budget.id()), true).empty()) { + TQString msg = "Unknown budget '" + budget.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_sql->modifyBudget(budget); @@ -1512,18 +1512,18 @@ unsigned MyMoneyDatabaseMgr::countBudgets( void ) const return m_sql->getRecCount("kmmBudgetConfig"); } -MyMoneyBudget MyMoneyDatabaseMgr::budget( const QString& id ) const +MyMoneyBudget MyMoneyDatabaseMgr::budget( const TQString& id ) const { - return m_sql->fetchBudgets(QString(id)) [id]; + return m_sql->fetchBudgets(TQString(id)) [id]; } void MyMoneyDatabaseMgr::removeBudget(const MyMoneyBudget& budget) { -// QMap<QString, MyMoneyBudget>::ConstIterator it; +// TQMap<TQString, MyMoneyBudget>::ConstIterator it; // -// it = m_budgetList.find(budget.id()); +// it = m_budgetList.tqfind(budget.id()); // if(it == m_budgetList.end()) { -// QString msg = "Unknown budget '" + budget.id() + "'"; +// TQString msg = "Unknown budget '" + budget.id() + "'"; // throw new MYMONEYEXCEPTION(msg); // } // @@ -1537,7 +1537,7 @@ void MyMoneyDatabaseMgr::clearCache(void) class isReferencedHelper { public: - isReferencedHelper(const QString& id) + isReferencedHelper(const TQString& id) : m_id (id) {} @@ -1545,13 +1545,13 @@ class isReferencedHelper { { return obj.hasReferenceTo(m_id); } private: - QString m_id; + TQString m_id; }; bool MyMoneyDatabaseMgr::isReferenced(const MyMoneyObject& obj, const MyMoneyFileBitArray& skipCheck) const { bool rc = false; - const QString& id = obj.id(); + const TQString& id = obj.id(); MyMoneyPriceList::const_iterator it_pr; @@ -1578,7 +1578,7 @@ bool MyMoneyDatabaseMgr::isReferenced(const MyMoneyObject& obj, const MyMoneyFil skipTransactions = true; } if (! skipTransactions) { - //QMap <QString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(f); + //TQMap <TQString, MyMoneyTransaction> transactionList = m_sql->fetchTransactions(f); //rc = (transactionList.end() != std::find_if(transactionList.begin(), transactionList.end(), isReferencedHelper(id))); //if (rc != m_sql->isReferencedByTransaction(obj.id())) // qDebug ("Transaction match inconsistency."); @@ -1587,40 +1587,40 @@ bool MyMoneyDatabaseMgr::isReferenced(const MyMoneyObject& obj, const MyMoneyFil } if(!skipCheck[RefCheckAccount] && !rc) { - QValueList<MyMoneyAccount> accountList; + TQValueList<MyMoneyAccount> accountList; MyMoneyFile::instance()->accountList(accountList); rc = (accountList.end() != std::find_if(accountList.begin(), accountList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckInstitution] && !rc) { - QValueList<MyMoneyInstitution> institutionList; + TQValueList<MyMoneyInstitution> institutionList; MyMoneyFile::instance()->institutionList(institutionList); rc = (institutionList.end() != std::find_if(institutionList.begin(), institutionList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckPayee] && !rc) { - QValueList<MyMoneyPayee> payeeList = MyMoneyFile::instance()->payeeList(); + TQValueList<MyMoneyPayee> payeeList = MyMoneyFile::instance()->payeeList(); rc = (payeeList.end() != std::find_if(payeeList.begin(), payeeList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckReport] && !rc) { - QMap<QString, MyMoneyReport> reportList = m_sql->fetchReports(); + TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(); rc = (reportList.end() != std::find_if(reportList.begin(), reportList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckBudget] && !rc) { - QMap<QString, MyMoneyBudget> budgets = m_sql->fetchBudgets(); + TQMap<TQString, MyMoneyBudget> budgets = m_sql->fetchBudgets(); rc = (budgets.end() != std::find_if(budgets.begin(), budgets.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckSchedule] && !rc) { - QMap<QString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); + TQMap<TQString, MyMoneySchedule> scheduleList = m_sql->fetchSchedules(); rc = (scheduleList.end() != std::find_if(scheduleList.begin(), scheduleList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckSecurity] && !rc) { - QValueList<MyMoneySecurity> securitiesList = MyMoneyFile::instance()->securityList(); + TQValueList<MyMoneySecurity> securitiesList = MyMoneyFile::instance()->securityList(); rc = (securitiesList.end() != std::find_if(securitiesList.begin(), securitiesList.end(), isReferencedHelper(id))); } if(!skipCheck[RefCheckCurrency] && !rc) { - QValueList<MyMoneySecurity> currencyList = m_sql->fetchCurrencies().values(); + TQValueList<MyMoneySecurity> currencyList = m_sql->fetchCurrencies().values(); rc = (currencyList.end() != std::find_if(currencyList.begin(), currencyList.end(), isReferencedHelper(id))); } - // within the pricelist we don't have to scan each entry. Checking the QPair + // within the pricelist we don't have to scan each entry. Checking the TQPair // members of the MyMoneySecurityPair is enough as they are identical to the // two security ids if(!skipCheck[RefCheckPrice] && !rc) { @@ -1653,7 +1653,7 @@ bool MyMoneyDatabaseMgr::commitTransaction(void) void MyMoneyDatabaseMgr::rollbackTransaction(void) { if (m_sql) m_sql->cancelCommitUnit ("databasetransaction"); } -void MyMoneyDatabaseMgr::setCreationDate(const QDate& val) +void MyMoneyDatabaseMgr::setCreationDate(const TQDate& val) { m_creationDate = val; } KSharedPtr <MyMoneyStorageSql> MyMoneyDatabaseMgr::connectToDatabase(const KURL& url) { @@ -1664,17 +1664,17 @@ KSharedPtr <MyMoneyStorageSql> MyMoneyDatabaseMgr::connectToDatabase(const KURL& void MyMoneyDatabaseMgr::fillStorage() { m_sql->fillStorage(); } -void MyMoneyDatabaseMgr::setLastModificationDate(const QDate& val) +void MyMoneyDatabaseMgr::setLastModificationDate(const TQDate& val) { m_lastModificationDate = val; } -bool MyMoneyDatabaseMgr::isDuplicateTransaction(const QString& /*id*/) const +bool MyMoneyDatabaseMgr::isDuplicateTransaction(const TQString& /*id*/) const { //FIXME: figure out the real id from the key and check the DB. -//return m_transactionKeys.contains(id); +//return m_transactionKeys.tqcontains(id); return false; } -void MyMoneyDatabaseMgr::loadAccounts(const QMap<QString, MyMoneyAccount>& /*map*/) +void MyMoneyDatabaseMgr::loadAccounts(const TQMap<TQString, MyMoneyAccount>& /*map*/) { // m_accountList = map; //FIXME: update the database. @@ -1686,50 +1686,50 @@ void MyMoneyDatabaseMgr::loadAccounts(const QMap<QString, MyMoneyAccount>& /*map // on error, rollbackTransaction } -void MyMoneyDatabaseMgr::loadTransactions(const QMap<QString, MyMoneyTransaction>& /*map*/) +void MyMoneyDatabaseMgr::loadTransactions(const TQMap<TQString, MyMoneyTransaction>& /*map*/) { // m_transactionList = map; //FIXME: update the database. // // now fill the key map -// QMap<QString, QString> keys; -// QMap<QString, MyMoneyTransaction>::ConstIterator it_t; +// TQMap<TQString, TQString> keys; +// TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; // for(it_t = map.begin(); it_t != map.end(); ++it_t) { // keys[(*it_t).id()] = it_t.key(); // } // m_transactionKeys = keys; } -void MyMoneyDatabaseMgr::loadInstitutions(const QMap<QString, MyMoneyInstitution>& /*map*/) +void MyMoneyDatabaseMgr::loadInstitutions(const TQMap<TQString, MyMoneyInstitution>& /*map*/) { // m_institutionList = map; //FIXME: update the database. // // now fill the key map -// QMap<QString, QString> keys; -// QMap<QString, MyMoneyTransaction>::ConstIterator it_t; +// TQMap<TQString, TQString> keys; +// TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; // for(it_t = map.begin(); it_t != map.end(); ++it_t) { // keys[(*it_t).id()] = it_t.key(); // } // m_transactionKeys = keys; } -void MyMoneyDatabaseMgr::loadPayees(const QMap<QString, MyMoneyPayee>& /*map*/) +void MyMoneyDatabaseMgr::loadPayees(const TQMap<TQString, MyMoneyPayee>& /*map*/) { // m_payeeList = map; } -void MyMoneyDatabaseMgr::loadSchedules(const QMap<QString, MyMoneySchedule>& /*map*/) +void MyMoneyDatabaseMgr::loadSchedules(const TQMap<TQString, MyMoneySchedule>& /*map*/) { // m_scheduleList = map; } -void MyMoneyDatabaseMgr::loadSecurities(const QMap<QString, MyMoneySecurity>& /*map*/) +void MyMoneyDatabaseMgr::loadSecurities(const TQMap<TQString, MyMoneySecurity>& /*map*/) { // m_securitiesList = map; } -void MyMoneyDatabaseMgr::loadCurrencies(const QMap<QString, MyMoneySecurity>& /*map*/) +void MyMoneyDatabaseMgr::loadCurrencies(const TQMap<TQString, MyMoneySecurity>& /*map*/) { // m_currencyList = map; //FIXME: update the database. @@ -1741,7 +1741,7 @@ void MyMoneyDatabaseMgr::loadCurrencies(const QMap<QString, MyMoneySecurity>& /* // on error, rollbackTransaction } -void MyMoneyDatabaseMgr::loadReports( const QMap<QString, MyMoneyReport>& /*reports*/ ) +void MyMoneyDatabaseMgr::loadReports( const TQMap<TQString, MyMoneyReport>& /*reports*/ ) { // m_reportList = reports; //FIXME: update the database. @@ -1753,7 +1753,7 @@ void MyMoneyDatabaseMgr::loadReports( const QMap<QString, MyMoneyReport>& /*repo // on error, rollbackTransaction } -void MyMoneyDatabaseMgr::loadBudgets( const QMap<QString, MyMoneyBudget>& /*budgets*/ ) +void MyMoneyDatabaseMgr::loadBudgets( const TQMap<TQString, MyMoneyBudget>& /*budgets*/ ) { // m_budgetList = budgets; //FIXME: update the database. @@ -1837,29 +1837,29 @@ void MyMoneyDatabaseMgr::loadBudgetId(const unsigned long id) void MyMoneyDatabaseMgr::rebuildAccountBalances(void) { startTransaction(); - QMap<QString, MyMoneyAccount> accountMap = m_sql->fetchAccounts(QStringList(), true); + TQMap<TQString, MyMoneyAccount> accountMap = m_sql->fetchAccounts(TQStringList(), true); - QMap<QString, MyMoneyMoney> balanceMap = m_sql->fetchBalance(accountMap.keys(), QDate()); + TQMap<TQString, MyMoneyMoney> balanceMap = m_sql->fetchBalance(accountMap.keys(), TQDate()); - for (QMap<QString, MyMoneyMoney>::const_iterator it_b = balanceMap.begin(); + for (TQMap<TQString, MyMoneyMoney>::const_iterator it_b = balanceMap.begin(); it_b != balanceMap.end(); ++it_b) { accountMap[it_b.key()].setBalance(it_b.data()); } - for (QMap<QString, MyMoneyAccount>::const_iterator it_a = accountMap.begin(); + for (TQMap<TQString, MyMoneyAccount>::const_iterator it_a = accountMap.begin(); it_a != accountMap.end(); ++it_a) { m_sql->modifyAccount(it_a.data()); } commitTransaction(); } -void MyMoneyDatabaseMgr::removeReferences(const QString& id) +void MyMoneyDatabaseMgr::removeReferences(const TQString& id) { - QMap<QString, MyMoneyReport>::const_iterator it_r; - QMap<QString, MyMoneyBudget>::const_iterator it_b; + TQMap<TQString, MyMoneyReport>::const_iterator it_r; + TQMap<TQString, MyMoneyBudget>::const_iterator it_b; // remove from reports - QMap<QString, MyMoneyReport> reportList = m_sql->fetchReports(); + TQMap<TQString, MyMoneyReport> reportList = m_sql->fetchReports(); for(it_r = reportList.begin(); it_r != reportList.end(); ++it_r) { MyMoneyReport r = *it_r; r.removeReference(id); @@ -1867,7 +1867,7 @@ void MyMoneyDatabaseMgr::removeReferences(const QString& id) } // remove from budgets - QMap<QString, MyMoneyBudget> budgetList = m_sql->fetchBudgets(); + TQMap<TQString, MyMoneyBudget> budgetList = m_sql->fetchBudgets(); for(it_b = budgetList.begin(); it_b != budgetList.end(); ++it_b) { MyMoneyBudget b = *it_b; b.removeReference(id); diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgr.h b/kmymoney2/mymoney/storage/mymoneydatabasemgr.h index 21bf8d6..1511915 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgr.h +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgr.h @@ -50,8 +50,8 @@ public: // general get functions virtual const MyMoneyPayee user(void) const; - virtual const QDate creationDate(void) const; - virtual const QDate lastModificationDate(void) const; + virtual const TQDate creationDate(void) const; + virtual const TQDate lastModificationDate(void) const; virtual unsigned int currentFixVersion(void) const; virtual unsigned int fileFixVersion(void) const; @@ -60,9 +60,9 @@ public: virtual void setFileFixVersion(const unsigned int v); // methods provided by MyMoneyKeyValueContainer - virtual void setValue(const QString& key, const QString& value); - virtual const QString value(const QString& key) const; - virtual void deletePair(const QString& key); + virtual void setValue(const TQString& key, const TQString& value); + virtual const TQString value(const TQString& key) const; + virtual void deletePair(const TQString& key); /** * This method is used to duplicate an IMyMoneyStorage object and return @@ -82,15 +82,15 @@ public: /** * This method is used to add one account as sub-ordinate to another - * (parent) account. The objects that are passed will be modified + * (tqparent) account. The objects that are passed will be modified * accordingly. * * An exception will be thrown upon error conditions. * - * @param parent parent account the account should be added to + * @param tqparent tqparent account the account should be added to * @param account the account to be added */ - virtual void addAccount(MyMoneyAccount& parent, MyMoneyAccount& account); + virtual void addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account); /** * This method is used to create a new payee @@ -105,22 +105,22 @@ public: * This method is used to retrieve information about a payee * An exception will be thrown upon error conditions. * - * @param id QString reference to id of payee + * @param id TQString reference to id of payee * * @return MyMoneyPayee object of payee */ - virtual const MyMoneyPayee payee(const QString& id) const; + virtual const MyMoneyPayee payee(const TQString& id) const; /** * This method is used to retrieve the id to a corresponding * name of a payee/receiver. * An exception will be thrown upon error conditions. * - * @param payee QString reference to name of payee + * @param payee TQString reference to name of payee * * @return MyMoneyPayee object of payee */ - virtual const MyMoneyPayee payeeByName(const QString& payee) const; + virtual const MyMoneyPayee payeeByName(const TQString& payee) const; /** * This method is used to modify an existing payee @@ -144,9 +144,9 @@ public: * This method returns a list of the payees * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyPayee> containing the payee information + * @return TQValueList<MyMoneyPayee> containing the payee information */ - virtual const QValueList<MyMoneyPayee> payeeList(void) const; + virtual const TQValueList<MyMoneyPayee> payeeList(void) const; /** * Returns the account addressed by it's id. @@ -157,7 +157,7 @@ public: * @return reference to MyMoneyAccount object. An exception is thrown * if the id is unknown */ - virtual const MyMoneyAccount account(const QString& id) const; + virtual const MyMoneyAccount account(const TQString& id) const; /** * This method is used to check whether a given @@ -168,23 +168,23 @@ public: * @param id account id * @return true if account-id is one of the standards, false otherwise */ - virtual bool isStandardAccount(const QString& id) const; + virtual bool isStandardAccount(const TQString& id) const; /** * This method is used to set the name for the specified standard account * within the storage area. An exception will be thrown, if an error * occurs * - * @param id QString reference to one of the standard accounts. - * @param name QString reference to the name to be set + * @param id TQString reference to one of the standard accounts. + * @param name TQString reference to the name to be set * */ - virtual void setAccountName(const QString& id, const QString& name); + virtual void setAccountName(const TQString& id, const TQString& name); /** * Adds an institution to the storage. A * respective institution-ID will be generated within this record. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * * An exception will be thrown upon error conditions. * @@ -196,7 +196,7 @@ public: /** * Adds a transaction to the file-global transaction pool. A respective * transaction-ID will be generated within this record. The ID is stored - * QString with the object. + * TQString with the object. * * An exception will be thrown upon error conditions. * @@ -216,7 +216,7 @@ public: * @param id id of the account to be checked for * @return true if account is referenced, false otherwise */ - virtual bool hasActiveSplits(const QString& id) const; + virtual bool hasActiveSplits(const TQString& id) const; /** * This method is used to return the actual balance of an account @@ -229,7 +229,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - virtual const MyMoneyMoney balance(const QString& id, const QDate& date) const; + virtual const MyMoneyMoney balance(const TQString& id, const TQDate& date) const; /** * This method is used to return the actual balance of an account @@ -242,7 +242,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - virtual const MyMoneyMoney totalBalance(const QString& id, const QDate& date) const; + virtual const MyMoneyMoney totalBalance(const TQString& id, const TQDate& date) const; /** * Returns the institution of a given ID @@ -251,7 +251,7 @@ public: * @return MyMoneyInstitution object filled with data. If the institution * could not be found, an exception will be thrown */ - virtual const MyMoneyInstitution institution(const QString& id) const; + virtual const MyMoneyInstitution institution(const TQString& id) const; /** * This method returns an indicator if the storage object has been @@ -284,10 +284,10 @@ public: * This method returns a list of the institutions * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyInstitution> containing the + * @return TQValueList<MyMoneyInstitution> containing the * institution information */ - virtual const QValueList<MyMoneyInstitution> institutionList(void) const; + virtual const TQValueList<MyMoneyInstitution> institutionList(void) const; /** * Modifies an already existing account in the file global account pool. @@ -320,14 +320,14 @@ public: virtual void modifyTransaction(const MyMoneyTransaction& transaction); /** - * This method re-parents an existing account + * This method re-tqparents an existing account * * An exception will be thrown upon error conditions. * - * @param account MyMoneyAccount reference to account to be re-parented - * @param parent MyMoneyAccount reference to new parent account + * @param account MyMoneyAccount reference to account to be re-tqparented + * @param tqparent MyMoneyAccount reference to new tqparent account */ - virtual void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent); + virtual void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent); /** * This method is used to remove a transaction from the transaction @@ -343,25 +343,25 @@ public: * This method returns the number of transactions currently known to file * in the range 0..MAXUINT * - * @param account QString reference to account id. If account is empty + * @param account TQString reference to account id. If account is empty + all transactions (the journal) will be counted. If account * is not empty it returns the number of transactions * that have splits in this account. * * @return number of transactions in journal/account */ - virtual unsigned int transactionCount(const QString& account = QString()) const; + virtual unsigned int transactionCount(const TQString& account = TQString()) const; /** - * This method returns a QMap filled with the number of transactions + * This method returns a TQMap filled with the number of transactions * per account. The account id serves as index into the map. If one * needs to have all transactionCounts() for many accounts, this method - * is faster than calling transactionCount(const QString& account) many + * is faster than calling transactionCount(const TQString& account) many * times. * - * @return QMap with numbers of transactions per account + * @return TQMap with numbers of transactions per account */ - virtual const QMap<QString, unsigned long> transactionCountMap(void) const; + virtual const TQMap<TQString, unsigned long> transactionCountMap(void) const; /** * This method is used to pull a list of transactions from the file @@ -374,9 +374,9 @@ public: * * @param filter MyMoneyTransactionFilter object with the match criteria * - * @return set of transactions in form of a QValueList<MyMoneyTransaction> + * @return set of transactions in form of a TQValueList<MyMoneyTransaction> */ - virtual const QValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; + virtual const TQValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; /** * This method is the same as above, but instead of a return value, a @@ -386,7 +386,7 @@ public: * be cleared before filling with results. * @param filter MyMoneyTransactionFilter object with the match criteria */ - virtual void transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; + virtual void transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; /** * This method is the same as above, but the list contains pairs of @@ -396,7 +396,7 @@ public: * be cleared before filling with results. * @param filter MyMoneyTransactionFilter object with the match criteria */ - virtual void transactionList(QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; + virtual void transactionList(TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; /** * Deletes an existing account from the file global account pool @@ -425,20 +425,20 @@ public: * transaction pool through an id. In case of an invalid id, an * exception will be thrown. * - * @param id id of transaction as QString. + * @param id id of transaction as TQString. * @return the requested transaction */ - virtual const MyMoneyTransaction transaction(const QString& id) const; + virtual const MyMoneyTransaction transaction(const TQString& id) const; /** * This method is used to extract a transaction from the file global * transaction pool through an index into an account. * - * @param account id of the account as QString + * @param account id of the account as TQString * @param idx number of transaction in this account * @return MyMoneyTransaction object */ - virtual const MyMoneyTransaction transaction(const QString& account, const int idx) const; + virtual const MyMoneyTransaction transaction(const TQString& account, const int idx) const; /** * This method returns the number of institutions currently known to file @@ -451,11 +451,11 @@ public: /** * This method returns a list of accounts inside the storage object. * - * @param list reference to QValueList receiving the account objects + * @param list reference to TQValueList receiving the account objects * * @note The standard accounts will not be returned */ - virtual void accountList(QValueList<MyMoneyAccount>& list) const; + virtual void accountList(TQValueList<MyMoneyAccount>& list) const; /** * This method is used to return the standard liability account @@ -524,22 +524,22 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySecurity object + * @param id TQString containing the id of the MyMoneySecurity object * @return MyMoneySecurity object */ - virtual const MyMoneySecurity security(const QString& id) const; + virtual const MyMoneySecurity security(const TQString& id) const; /** * This method returns a list of the security objects * inside a MyMoneyStorage object * - * @return QValueList<MyMoneySecurity> containing objects + * @return TQValueList<MyMoneySecurity> containing objects */ - virtual const QValueList<MyMoneySecurity> securityList(void) const; + virtual const TQValueList<MyMoneySecurity> securityList(void) const; virtual void addPrice(const MyMoneyPrice& price); virtual void removePrice(const MyMoneyPrice& price); - virtual const MyMoneyPrice price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const; + virtual const MyMoneyPrice price(const TQString& fromId, const TQString& toId, const TQDate& date, const bool exactDate) const; /** * This method returns a list of all prices. @@ -586,10 +586,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - virtual const MyMoneySchedule schedule(const QString& id) const; + virtual const MyMoneySchedule schedule(const TQString& id) const; /** * This method is used to extract a list of scheduled transactions @@ -597,7 +597,7 @@ public: * * @param accountId only search for scheduled transactions that reference * accound @p accountId. If accountId is the empty string, - * this filter is off. Default is @p QString(). + * this filter is off. Default is @p TQString(). * @param type only schedules of type @p type are searched for. * See MyMoneySchedule::typeE for details. * Default is MyMoneySchedule::TYPE_ANY @@ -609,27 +609,27 @@ public: * See MyMoneySchedule::paymentTypeE for details. * Default is MyMoneySchedule::STYPE_ANY * @param startDate only schedules with payment dates after @p startDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param endDate only schedules with payment dates ending prior to @p endDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param overdue if true, only those schedules that are overdue are * searched for. Default is false (all schedules will be returned). * - * @return const QValueList<MyMoneySchedule> list of schedule objects. + * @return const TQValueList<MyMoneySchedule> list of schedule objects. */ - virtual const QValueList<MyMoneySchedule> scheduleList(const QString& accountId = QString(), + virtual const TQValueList<MyMoneySchedule> scheduleList(const TQString& accountId = TQString(), const MyMoneySchedule::typeE type = MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE paymentType = MyMoneySchedule::STYPE_ANY, - const QDate& startDate = QDate(), - const QDate& endDate = QDate(), + const TQDate& startDate = TQDate(), + const TQDate& endDate = TQDate(), const bool overdue = false) const; - virtual const QValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, + virtual const TQValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts=QStringList()) const; + TQDate startDate, + const TQStringList& accounts=TQStringList()) const; /** * This method is used to add a new currency object to the engine. @@ -668,10 +668,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySecurity object + * @param id TQString containing the id of the MyMoneySecurity object * @return MyMoneyCurrency object */ - virtual const MyMoneySecurity currency(const QString& id) const; + virtual const MyMoneySecurity currency(const TQString& id) const; /** * This method is used to retrieve the list of all currencies @@ -679,9 +679,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneySecurity objects representing a currency. + * @return TQValueList of all MyMoneySecurity objects representing a currency. */ - virtual const QValueList<MyMoneySecurity> currencyList(void) const; + virtual const TQValueList<MyMoneySecurity> currencyList(void) const; /** * This method is used to retrieve the list of all reports @@ -689,9 +689,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyReport objects. + * @return TQValueList of all MyMoneyReport objects. */ - virtual const QValueList<MyMoneyReport> reportList( void ) const; + virtual const TQValueList<MyMoneyReport> reportList( void ) const; /** * This method is used to add a new report to the engine. @@ -729,10 +729,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyReport object + * @param id TQString containing the id of the MyMoneyReport object * @return MyMoneyReport object */ - virtual const MyMoneyReport report( const QString& id ) const; + virtual const MyMoneyReport report( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyReport object @@ -750,9 +750,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyBudget objects. + * @return TQValueList of all MyMoneyBudget objects. */ - virtual const QValueList<MyMoneyBudget> budgetList( void ) const; + virtual const TQValueList<MyMoneyBudget> budgetList( void ) const; /** * This method is used to add a new budget to the engine. @@ -771,11 +771,11 @@ public: * name of a budget * An exception will be thrown upon error conditions. * - * @param budget QString reference to name of budget + * @param budget TQString reference to name of budget * * @return MyMoneyBudget object of budget */ - virtual const MyMoneyBudget budgetByName(const QString& budget) const; + virtual const MyMoneyBudget budgetByName(const TQString& budget) const; /** * This method is used to modify an existing MyMoneyBudget @@ -801,10 +801,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyBudget object + * @param id TQString containing the id of the MyMoneyBudget object * @return MyMoneyBudget object */ - virtual MyMoneyBudget budget( const QString& id ) const; + virtual MyMoneyBudget budget( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyBudget object @@ -849,7 +849,7 @@ public: virtual void rollbackTransaction(void); // general set functions - virtual void setCreationDate(const QDate& val); + virtual void setCreationDate(const TQDate& val); /** * This method is used to get a SQL reader for subsequent database access @@ -869,25 +869,25 @@ public: * therefor be called as last operation when loading from a * file. * - * @param val QDate of last modification + * @param val TQDate of last modification */ - virtual void setLastModificationDate(const QDate& val); + virtual void setLastModificationDate(const TQDate& val); /** * This method returns whether a given transaction is already in memory, to avoid * reloading it from the database */ - virtual bool isDuplicateTransaction(const QString&) const; - - virtual void loadAccounts(const QMap<QString, MyMoneyAccount>& map); - virtual void loadTransactions(const QMap<QString, MyMoneyTransaction>& map); - virtual void loadInstitutions(const QMap<QString, MyMoneyInstitution>& map); - virtual void loadPayees(const QMap<QString, MyMoneyPayee>& map); - virtual void loadSchedules(const QMap<QString, MyMoneySchedule>& map); - virtual void loadSecurities(const QMap<QString, MyMoneySecurity>& map); - virtual void loadCurrencies(const QMap<QString, MyMoneySecurity>& map); - virtual void loadReports( const QMap<QString, MyMoneyReport>& reports ); - virtual void loadBudgets( const QMap<QString, MyMoneyBudget>& budgets ); + virtual bool isDuplicateTransaction(const TQString&) const; + + virtual void loadAccounts(const TQMap<TQString, MyMoneyAccount>& map); + virtual void loadTransactions(const TQMap<TQString, MyMoneyTransaction>& map); + virtual void loadInstitutions(const TQMap<TQString, MyMoneyInstitution>& map); + virtual void loadPayees(const TQMap<TQString, MyMoneyPayee>& map); + virtual void loadSchedules(const TQMap<TQString, MyMoneySchedule>& map); + virtual void loadSecurities(const TQMap<TQString, MyMoneySecurity>& map); + virtual void loadCurrencies(const TQMap<TQString, MyMoneySecurity>& map); + virtual void loadReports( const TQMap<TQString, MyMoneyReport>& reports ); + virtual void loadBudgets( const TQMap<TQString, MyMoneyBudget>& budgets ); virtual void loadPrices(const MyMoneyPriceList& list); virtual unsigned long accountId(void) const; @@ -913,10 +913,10 @@ public: * from the container. It is meant to be used for permanent storage * functionality. See MyMoneyKeyValueContainer::pairs() for details. * - * @return QMap<QString, QString> containing all key/value pairs of + * @return TQMap<TQString, TQString> containing all key/value pairs of * this container. */ - virtual const QMap<QString, QString> pairs(void) const; + virtual const TQMap<TQString, TQString> pairs(void) const; /** * This method is used to initially store a set of key/value pairs @@ -924,12 +924,12 @@ public: * from permanent storage. See MyMoneyKeyValueContainer::setPairs() * for details * - * @param list const QMap<QString, QString> containing the set of + * @param list const TQMap<TQString, TQString> containing the set of * key/value pairs to be loaded into the container. * * @note All existing key/value pairs in the container will be deleted. */ - virtual void setPairs(const QMap<QString, QString>& list); + virtual void setPairs(const TQMap<TQString, TQString>& list); /** * This method recalculates the balances of all accounts @@ -943,7 +943,7 @@ private: * object. It is set during the constructor and can only be modified using * the stream read operator. */ - QDate m_creationDate; + TQDate m_creationDate; /** * This member variable contains the current fix level of application @@ -961,7 +961,7 @@ private: * This member variable keeps the date of the last modification of * the MyMoneySeqAccessMgr object. */ - QDate m_lastModificationDate; + TQDate m_lastModificationDate; /** * This contains the interface with SQL reader for database access @@ -978,47 +978,47 @@ private: * This method is used to get the next valid ID for a institution * @return id for a institution */ - const QString nextInstitutionID(void); + const TQString nextInstitutionID(void); /** * This method is used to get the next valid ID for an account * @return id for an account */ - const QString nextAccountID(void); + const TQString nextAccountID(void); /** * This method is used to get the next valid ID for a transaction * @return id for a transaction */ - const QString nextTransactionID(void); + const TQString nextTransactionID(void); /** * This method is used to get the next valid ID for a payee * @return id for a payee */ - const QString nextPayeeID(void); + const TQString nextPayeeID(void); /** * This method is used to get the next valid ID for a scheduled transaction * @return id for a scheduled transaction */ - const QString nextScheduleID(void); + const TQString nextScheduleID(void); /** * This method is used to get the next valid ID for an security object. * @return id for an security object */ - const QString nextSecurityID(void); + const TQString nextSecurityID(void); - const QString nextReportID(void); + const TQString nextReportID(void); /** * This method is used to get the next valid ID for a budget object. * @return id for an budget object */ - const QString nextBudgetID(void); + const TQString nextBudgetID(void); - void removeReferences(const QString& id); + void removeReferences(const TQString& id); static const int INSTITUTION_ID_SIZE = 6; static const int ACCOUNT_ID_SIZE = 6; diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp index f6a2bba..ae589cd 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.cpp @@ -60,7 +60,7 @@ void MyMoneyDatabaseMgrTest::testEmptyConstructor() CPPUNIT_ASSERT(m->nextReportID() == 0); CPPUNIT_ASSERT(m->institutionList().count() == 0); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; m->accountList(accList); CPPUNIT_ASSERT(accList.count() == 0); @@ -70,31 +70,31 @@ void MyMoneyDatabaseMgrTest::testEmptyConstructor() CPPUNIT_ASSERT(m->payeeList().count() == 0); CPPUNIT_ASSERT(m->scheduleList().count() == 0); - CPPUNIT_ASSERT(m->m_creationDate == QDate::currentDate()); + CPPUNIT_ASSERT(m->m_creationDate == TQDate::tqcurrentDate()); } void MyMoneyDatabaseMgrTest::testCreateDb() { m->commitTransaction(); // Fetch the list of available drivers - QStringList list = QSqlDatabase::drivers(); - QStringList::Iterator it = list.begin(); + TQStringList list = TQSqlDatabase::drivers(); + TQStringList::Iterator it = list.begin(); if (it == list.end()) { m_canOpen = false; } else { struct passwd * pwd = getpwuid(geteuid()); - QString userName; + TQString userName; if (pwd != 0) { - userName = QString(pwd->pw_name); + userName = TQString(pwd->pw_name); } - //"QMYSQL3" - //"QPSQL7" - //"QSQLITE3" + //"TQMYSQL3" + //"TQPSQL7" + //"TQSQLITE3" m_url = "sql://" + userName + "@localhost/kmm_test_driver?driver=" - //"QPSQL7&mode=single"; - //"QSQLITE3&mode=single"; - //"QMYSQL3&mode=single"; + //"TQPSQL7&mode=single"; + //"TQSQLITE3&mode=single"; + //"TQMYSQL3&mode=single"; + *it + "&mode=single"; KSharedPtr <MyMoneyStorageSql> sql = m->connectToDatabase(m_url); CPPUNIT_ASSERT(0 != sql); @@ -118,8 +118,8 @@ void MyMoneyDatabaseMgrTest::testAttachDb() { MyMoneyFile::instance()->detachStorage(); KSharedPtr <MyMoneyStorageSql> sql = m->connectToDatabase(m_url); CPPUNIT_ASSERT(sql); - int openStatus = sql->open(m_url, IO_ReadWrite); - CPPUNIT_ASSERT(0 == openStatus); + int opentqStatus = sql->open(m_url, IO_ReadWrite); + CPPUNIT_ASSERT(0 == opentqStatus); MyMoneyFile::instance()->attachStorage(m); m->startTransaction(); m_dbAttached = true; @@ -202,7 +202,7 @@ void MyMoneyDatabaseMgrTest::testIsStandardAccount() CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_ASSET) == true); CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_EXPENSE) == true); CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_INCOME) == true); - CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_EQUITY) == true); + CPPUNIT_ASSERT(m->isStandardAccount(STD_ACC_ETQUITY) == true); CPPUNIT_ASSERT(m->isStandardAccount("A0002") == false); } @@ -221,7 +221,7 @@ void MyMoneyDatabaseMgrTest::testNewAccount() { m->addAccount(a); CPPUNIT_ASSERT(m->accountId() == 1); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; m->accountList(accList); CPPUNIT_ASSERT(accList.count() == 1); CPPUNIT_ASSERT((*(accList.begin())).name() == "AccountName"); @@ -274,7 +274,7 @@ void MyMoneyDatabaseMgrTest::testAddNewAccount() { m->setDirty(); CPPUNIT_ASSERT(m->accountId() == 2); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; m->accountList(accList); CPPUNIT_ASSERT(accList.count() == 2); @@ -421,7 +421,7 @@ void MyMoneyDatabaseMgrTest::testModifyAccount() { try { m->modifyAccount(a); MyMoneyAccount b = m->account("A000001"); - CPPUNIT_ASSERT(b.parentAccountId() == a.parentAccountId()); + CPPUNIT_ASSERT(b.tqparentAccountId() == a.tqparentAccountId()); CPPUNIT_ASSERT(b.name() == "New account name"); } catch (MyMoneyException *e) { delete e; @@ -449,7 +449,7 @@ void MyMoneyDatabaseMgrTest::testModifyAccount() { delete e; } - // use different parent + // use different tqparent a.setParentAccountId("A000002"); try { m->modifyAccount(c); @@ -490,7 +490,7 @@ void MyMoneyDatabaseMgrTest::testModifyInstitution() { } } -void MyMoneyDatabaseMgrTest::testReparentAccount() { +void MyMoneyDatabaseMgrTest::testRetqparentAccount() { testAttachDb(); if (!m_canOpen) { @@ -535,23 +535,23 @@ void MyMoneyDatabaseMgrTest::testReparentAccount() { CPPUNIT_ASSERT(in.id() == "A000005"); CPPUNIT_ASSERT(ch.id() == "A000006"); - MyMoneyAccount parent = m->expense(); + MyMoneyAccount tqparent = m->expense(); - m->addAccount(parent, ex1); + m->addAccount(tqparent, ex1); m->addAccount(ex1, ex2); - m->addAccount(parent, ex3); - m->addAccount(parent, ex4); + m->addAccount(tqparent, ex3); + m->addAccount(tqparent, ex4); - parent = m->income(); - m->addAccount(parent, in); + tqparent = m->income(); + m->addAccount(tqparent, in); - parent = m->asset(); - m->addAccount(parent, ch); + tqparent = m->asset(); + m->addAccount(tqparent, ch); MyMoneyFile::instance()->preloadCache(); CPPUNIT_ASSERT(m->expense().accountCount() == 3); CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 1); - CPPUNIT_ASSERT(ex3.parentAccountId() == STD_ACC_EXPENSE); + CPPUNIT_ASSERT(ex3.tqparentAccountId() == STD_ACC_EXPENSE); //for (int i = 0; i < 100; ++i) { m->reparentAccount(ex3, ex1); @@ -559,7 +559,7 @@ void MyMoneyDatabaseMgrTest::testReparentAccount() { MyMoneyFile::instance()->preloadCache(); CPPUNIT_ASSERT(m->expense().accountCount() == 2); CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 2); - CPPUNIT_ASSERT(ex3.parentAccountId() == ex1.id()); + CPPUNIT_ASSERT(ex3.tqparentAccountId() == ex1.id()); } catch (MyMoneyException *e) { std::cout << std::endl << e->what() << std::endl; delete e; @@ -575,7 +575,7 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() { return; } - testReparentAccount(); + testRetqparentAccount(); MyMoneyAccount ch; MyMoneyTransaction t1, t2; @@ -589,14 +589,14 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() { CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000005"); // Salary s.setShares(-100000); s.setValue(-100000); CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - t1.setPostDate(QDate(2002,5,10)); + t1.setPostDate(TQDate(2002,5,10)); } catch (MyMoneyException *e) { unexpectedException(e); } @@ -613,35 +613,35 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() { try { // I spent some money, not so great - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000004"); // Grosseries s.setShares(10000); s.setValue(10000); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000002"); // 16% sales tax s.setShares(1200); s.setValue(1200); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000003"); // 7% sales tax s.setShares(400); s.setValue(400); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000006"); // Checkings account s.setShares(-11600); s.setValue(-11600); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - t2.setPostDate(QDate(2002,5,9)); + t2.setPostDate(TQDate(2002,5,9)); } catch (MyMoneyException *e) { unexpectedException(e); } @@ -652,10 +652,10 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() { CPPUNIT_ASSERT(t2.splitCount() == 4); CPPUNIT_ASSERT(m->transactionCount() == 2); - //QMap<QString, QString>::ConstIterator it_k; + //TQMap<TQString, TQString>::ConstIterator it_k; MyMoneyTransactionFilter f; - QValueList<MyMoneyTransaction> transactionList (m->transactionList(f)); - QValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin()); + TQValueList<MyMoneyTransaction> transactionList (m->transactionList(f)); + TQValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin()); //CPPUNIT_ASSERT((*it_k) == "2002-05-10-T000000000000000001"); CPPUNIT_ASSERT((*it_t).id() == "T000000000000000002"); @@ -671,12 +671,12 @@ void MyMoneyDatabaseMgrTest::testAddTransactions() { ch = m->account("A000006"); // check that the account's transaction list is updated - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.size() == 2); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; it = list.begin(); CPPUNIT_ASSERT((*it).id() == "T000000000000000002"); ++it; @@ -717,7 +717,7 @@ void MyMoneyDatabaseMgrTest::testAddBudget() { MyMoneyBudget budget; budget.setName("TestBudget"); - budget.setBudgetStart(QDate::currentDate(Qt::LocalTime)); + budget.setBudgetStart(TQDate::tqcurrentDate(TQt::LocalTime)); m->addBudget(budget); @@ -742,7 +742,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() { MyMoneyBudget newBudget = oldBudget; newBudget.clearId(); - newBudget.setName(QString("Copy of %1").arg(oldBudget.name())); + newBudget.setName(TQString("Copy of %1").tqarg(oldBudget.name())); m->addBudget(newBudget); CPPUNIT_ASSERT(m->budgetList().count() == 2); @@ -757,7 +757,7 @@ void MyMoneyDatabaseMgrTest::testCopyBudget() { CPPUNIT_ASSERT(testBudget.budgetStart() == newBudget.budgetStart()); CPPUNIT_ASSERT(testBudget.name() == newBudget.name()); - } catch (QString& s) { + } catch (TQString& s) { std::cout << "Error in testCopyBudget(): " << s << std::endl; CPPUNIT_ASSERT(false); } @@ -773,7 +773,7 @@ void MyMoneyDatabaseMgrTest::testModifyBudget() { MyMoneyBudget budget = m->budgetByName("TestBudget"); - budget.setBudgetStart(QDate::currentDate(Qt::LocalTime).addDays(-1)); + budget.setBudgetStart(TQDate::tqcurrentDate(TQt::LocalTime).addDays(-1)); m->modifyBudget(budget); @@ -815,9 +815,9 @@ void MyMoneyDatabaseMgrTest::testBalance() { testAddTransactions(); - CPPUNIT_ASSERT(m->balance("A000001", QDate()).isZero()); - CPPUNIT_ASSERT(m->balance("A000002", QDate()) == MyMoneyMoney(1200)); - CPPUNIT_ASSERT(m->balance("A000003", QDate()) == MyMoneyMoney(400)); + CPPUNIT_ASSERT(m->balance("A000001", TQDate()).isZero()); + CPPUNIT_ASSERT(m->balance("A000002", TQDate()) == MyMoneyMoney(1200)); + CPPUNIT_ASSERT(m->balance("A000003", TQDate()) == MyMoneyMoney(400)); //Add a transaction to zero account A000003 MyMoneyTransaction t1; MyMoneySplit s; @@ -828,31 +828,31 @@ void MyMoneyDatabaseMgrTest::testBalance() { CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000002"); s.setShares(400); s.setValue(400); CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - t1.setPostDate(QDate(2007,5,10)); + t1.setPostDate(TQDate(2007,5,10)); m->addTransaction(t1); - //qDebug ("Balance of A000003 is 0 = %s", m->balance("A000003", QDate()).toString().ascii()); - CPPUNIT_ASSERT(m->balance("A000003", QDate()).isZero()); + //qDebug ("Balance of A000003 is 0 = %s", m->balance("A000003", TQDate()).toString().ascii()); + CPPUNIT_ASSERT(m->balance("A000003", TQDate()).isZero()); - //qDebug ("Balance of A000001 is 1600 = %s", m->balance("A000001", QDate()).toString().ascii()); - CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600)); + //qDebug ("Balance of A000001 is 1600 = %s", m->balance("A000001", TQDate()).toString().ascii()); + CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600)); - //qDebug ("Balance of A000006 is -11600 = %s", m->balance("A000006", QDate(2002,5,9)).toString().ascii()); - CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,9)) == MyMoneyMoney(-11600)); + //qDebug ("Balance of A000006 is -11600 = %s", m->balance("A000006", TQDate(2002,5,9)).toString().ascii()); + CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,9)) == MyMoneyMoney(-11600)); - //qDebug ("Balance of A000005 is -100000 = %s", m->balance("A000005", QDate(2002,5,10)).toString().ascii()); - CPPUNIT_ASSERT(m->balance("A000005", QDate(2002,5,10)) == MyMoneyMoney(-100000)); + //qDebug ("Balance of A000005 is -100000 = %s", m->balance("A000005", TQDate(2002,5,10)).toString().ascii()); + CPPUNIT_ASSERT(m->balance("A000005", TQDate(2002,5,10)) == MyMoneyMoney(-100000)); - //qDebug ("Balance of A000006 is 88400 = %s", m->balance("A000006", QDate(2002,5,10)).toString().ascii()); - CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,10)) == MyMoneyMoney(88400)); + //qDebug ("Balance of A000006 is 88400 = %s", m->balance("A000006", TQDate(2002,5,10)).toString().ascii()); + CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,10)) == MyMoneyMoney(88400)); } void MyMoneyDatabaseMgrTest::testModifyTransaction() { @@ -884,30 +884,30 @@ void MyMoneyDatabaseMgrTest::testModifyTransaction() { t.modifySplit(s); try { - CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(10000)); - CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-11600)); - CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600)); + CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(10000)); + CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-11600)); + CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600)); m->modifyTransaction(t); - CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(11000)); - CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-12600)); - CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600)); + CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(11000)); + CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-12600)); + CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600)); } catch (MyMoneyException *e) { delete e; CPPUNIT_FAIL("Unexpected exception"); } // now modify the date - t.setPostDate(QDate(2002,5,11)); + t.setPostDate(TQDate(2002,5,11)); try { m->modifyTransaction(t); - CPPUNIT_ASSERT(m->balance("A000004", QDate()) == MyMoneyMoney(11000)); - CPPUNIT_ASSERT(m->balance("A000006", QDate()) == MyMoneyMoney(100000-12600)); - CPPUNIT_ASSERT(m->totalBalance("A000001", QDate()) == MyMoneyMoney(1600)); + CPPUNIT_ASSERT(m->balance("A000004", TQDate()) == MyMoneyMoney(11000)); + CPPUNIT_ASSERT(m->balance("A000006", TQDate()) == MyMoneyMoney(100000-12600)); + CPPUNIT_ASSERT(m->totalBalance("A000001", TQDate()) == MyMoneyMoney(1600)); - //QMap<QString, QString>::ConstIterator it_k; + //TQMap<TQString, TQString>::ConstIterator it_k; MyMoneyTransactionFilter f; - QValueList<MyMoneyTransaction> transactionList (m->transactionList(f)); - QValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin()); + TQValueList<MyMoneyTransaction> transactionList (m->transactionList(f)); + TQValueList<MyMoneyTransaction>::ConstIterator it_t (transactionList.begin()); //it_k = m->m_transactionKeys.begin(); //CPPUNIT_ASSERT((*it_k) == "2002-05-10-T000000000000000001"); CPPUNIT_ASSERT((*it_t).id() == "T000000000000000001"); @@ -923,12 +923,12 @@ void MyMoneyDatabaseMgrTest::testModifyTransaction() { ch = m->account("A000006"); // check that the account's transaction list is updated - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.size() == 2); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; it = list.begin(); CPPUNIT_ASSERT((*it).id() == "T000000000000000001"); ++it; @@ -1004,7 +1004,7 @@ void MyMoneyDatabaseMgrTest::testRemoveUnusedAccount() { CPPUNIT_ASSERT(i.accountCount() == 1); CPPUNIT_ASSERT(m->accountCount() == 7); - a.setInstitutionId(QString()); + a.setInstitutionId(TQString()); m->modifyAccount(a); m->removeAccount(a); CPPUNIT_ASSERT(m->accountCount() == 6); @@ -1045,7 +1045,7 @@ void MyMoneyDatabaseMgrTest::testRemoveInstitution() { } testModifyInstitution(); - testReparentAccount(); + testRetqparentAccount(); MyMoneyInstitution i; MyMoneyAccount a; @@ -1066,7 +1066,7 @@ void MyMoneyDatabaseMgrTest::testRemoveInstitution() { // now remove the institution and see if the account survived ;-) try { m->removeInstitution(i); - a.setInstitutionId(QString()); + a.setInstitutionId(TQString()); m->modifyAccount(a); a = m->account("A000006"); CPPUNIT_ASSERT(a.institutionId().isEmpty()); @@ -1109,7 +1109,7 @@ void MyMoneyDatabaseMgrTest::testTransactionList() { testAddTransactions(); - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.count() == 2); @@ -1117,7 +1117,7 @@ void MyMoneyDatabaseMgrTest::testTransactionList() { CPPUNIT_ASSERT((*(list.at(1))).id() == "T000000000000000001"); filter.clear(); - filter.addAccount(QString("A000003")); + filter.addAccount(TQString("A000003")); list = m->transactionList(filter); CPPUNIT_ASSERT(list.count() == 1); CPPUNIT_ASSERT((*(list.at(0))).id() == "T000000000000000002"); @@ -1355,7 +1355,7 @@ void MyMoneyDatabaseMgrTest::testPayeeName() { testAddPayee(); MyMoneyPayee p; - QString name("THB"); + TQString name("THB"); // OK case try { @@ -1474,7 +1474,7 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() { } // put some accounts in the db, so the tests don't break - testReparentAccount(); + testRetqparentAccount(); try { CPPUNIT_ASSERT(m->scheduleList().count() == 0); @@ -1488,11 +1488,11 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_MANUALDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), true, false); - t1.setPostDate(QDate(2003,7,10)); + t1.setPostDate(TQDate(2003,7,10)); schedule.setTransaction(t1); m->addSchedule(schedule); @@ -1511,8 +1511,8 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_MANUALDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), true, false); m->addSchedule(schedule); @@ -1534,11 +1534,11 @@ void MyMoneyDatabaseMgrTest::testAddSchedule() { // MyMoneySchedule::TYPE_DEPOSIT, // MyMoneySchedule::OCCUR_DAILY, 1, // MyMoneySchedule::STYPE_MANUALDEPOSIT, -// QDate(), -// QDate(), +// TQDate(), +// TQDate(), // true, // false); -// t1.setPostDate(QDate(2003,7,10)); +// t1.setPostDate(TQDate(2003,7,10)); // schedule.setTransaction(t1); // m->addSchedule(schedule); @@ -1648,11 +1648,11 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { } // put some accounts in the db, so the tests don't break - testReparentAccount(); + testRetqparentAccount(); - QDate testDate = QDate::currentDate(); - QDate notOverdue = testDate.addDays(2); - QDate overdue = testDate.addDays(-2); + TQDate testDate = TQDate::tqcurrentDate(); + TQDate notOverdue = testDate.addDays(2); + TQDate overdue = testDate.addDays(-2); MyMoneyTransaction t1; MyMoneySplit s1, s2; @@ -1664,8 +1664,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_ONCE, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t1.setPostDate(notOverdue); @@ -1682,8 +1682,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_DIRECTDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t2.setPostDate(notOverdue.addDays(1)); @@ -1700,8 +1700,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { MyMoneySchedule::TYPE_TRANSFER, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_OTHER, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t3.setPostDate(notOverdue.addDays(2)); @@ -1717,8 +1717,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { MyMoneySchedule schedule4("Schedule 4", MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, - MyMoneySchedule::STYPE_WRITECHEQUE, - QDate(), + MyMoneySchedule::STYPE_WRITECHETQUE, + TQDate(), notOverdue.addDays(31), false, false); @@ -1736,7 +1736,7 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { CPPUNIT_FAIL("Unexpected exception"); } - QValueList<MyMoneySchedule> list; + TQValueList<MyMoneySchedule> list; // no filter list = m->scheduleList(); @@ -1783,7 +1783,7 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { list = m->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), + TQDate(), notOverdue.addDays(1)); CPPUNIT_ASSERT(list.count() == 3); CPPUNIT_ASSERT(list[0].name() == "Schedule 1"); @@ -1804,8 +1804,8 @@ void MyMoneyDatabaseMgrTest::testScheduleList() { list = m->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), - QDate(), + TQDate(), + TQDate(), true); CPPUNIT_ASSERT(list.count() == 1); CPPUNIT_ASSERT(list[0].name() == "Schedule 4"); @@ -1978,7 +1978,7 @@ void MyMoneyDatabaseMgrTest::testAccountList() return; } - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; m->accountList(accounts); CPPUNIT_ASSERT(accounts.count() == 0); testAddNewAccount(); diff --git a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.h b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.h index 8ab4b64..d883032 100644 --- a/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.h +++ b/kmymoney2/mymoney/storage/mymoneydatabasemgrtest.h @@ -40,7 +40,7 @@ class MyMoneyDatabaseMgrTest : public CppUnit::TestFixture { CPPUNIT_TEST(testIsStandardAccount); CPPUNIT_TEST(testNewAccount); CPPUNIT_TEST(testAddNewAccount); - CPPUNIT_TEST(testReparentAccount); + CPPUNIT_TEST(testRetqparentAccount); CPPUNIT_TEST(testAddInstitution); CPPUNIT_TEST(testInstitution); CPPUNIT_TEST(testAccount2Institution); @@ -103,7 +103,7 @@ public: void testAccount2Institution(); void testModifyAccount(); void testModifyInstitution(); - void testReparentAccount(); + void testRetqparentAccount(); void testAddTransactions(); void testTransactionCount(); void testAddBudget(); diff --git a/kmymoney2/mymoney/storage/mymoneymap.h b/kmymoney2/mymoney/storage/mymoneymap.h index fa5cda8..7582112 100644 --- a/kmymoney2/mymoney/storage/mymoneymap.h +++ b/kmymoney2/mymoney/storage/mymoneymap.h @@ -1,6 +1,6 @@ #include <stdint.h> -#include <qmap.h> -#include <qptrstack.h> +#include <tqmap.h> +#include <tqptrstack.h> #include <kmymoney/mymoneyexception.h> #ifndef MYMONEYMAP_H @@ -11,7 +11,7 @@ /** * @author Thomas Baumgart * - * This template class adds transaction security to the QMap<> class. + * This template class adds transaction security to the TQMap<> class. * The interface is very simple. Before you perform any changes, * you have to call the startTransaction() method. Then you can use * the insert(), modify() and remove() methods to modify the map. @@ -25,12 +25,12 @@ * someone is interested. */ template <class Key, class T> -class MyMoneyMap : protected QMap<Key, T> +class MyMoneyMap : protected TQMap<Key, T> { public: - // typedef QMapConstIterator<Key, T> const_iterator; + // typedef TQMapConstIterator<Key, T> const_iterator; - MyMoneyMap() : QMap<Key, T>() {} + MyMoneyMap() : TQMap<Key, T>() {} virtual ~MyMoneyMap() {} void startTransaction(unsigned long* id = 0) @@ -78,7 +78,7 @@ public: throw new MYMONEYEXCEPTION("No transaction started to modify element in container"); #if 0 - // had to take this out, because we use QPair in one instance as key + // had to take this out, because we use TQPair in one instance as key if(key.isEmpty()) throw new MYMONEYEXCEPTION("No key to update object"); #endif @@ -92,7 +92,7 @@ public: throw new MYMONEYEXCEPTION("No transaction started to remove element from container"); #if 0 - // had to take this out, because we use QPair in one instance as key + // had to take this out, because we use TQPair in one instance as key if(key.isEmpty()) throw new MYMONEYEXCEPTION("No key to remove object"); #endif @@ -100,59 +100,59 @@ public: m_stack.push(new MyMoneyMapRemove(this, key)); } - MyMoneyMap<Key, T>& operator= (const QMap<Key, T>& m) + MyMoneyMap<Key, T>& operator= (const TQMap<Key, T>& m) { if(m_stack.count() != 0) { throw new MYMONEYEXCEPTION("Cannot assign whole container during transaction"); } - QMap<Key, T>::operator=(m); + TQMap<Key, T>::operator=(m); return *this; } - inline QValueList<T> values(void) const + inline TQValueList<T> values(void) const { - return QMap<Key,T>::values(); + return TQMap<Key,T>::values(); } - inline QValueList<Key> keys(void) const + inline TQValueList<Key> keys(void) const { - return QMap<Key,T>::keys(); + return TQMap<Key,T>::keys(); } const T& operator[] ( const Key& k ) const - { QT_CHECK_INVALID_MAP_ELEMENT; return QMap<Key,T>::operator[](k); } + { TQT_CHECK_INVALID_MAP_ELEMENT; return TQMap<Key,T>::operator[](k); } - inline Q_TYPENAME QMap<Key, T>::const_iterator find(const Key& k) const + inline TQ_TYPENAME TQMap<Key, T>::const_iterator tqfind(const Key& k) const { - return QMap<Key,T>::find(k); + return TQMap<Key,T>::tqfind(k); } - inline Q_TYPENAME QMap<Key, T>::const_iterator begin(void) const + inline TQ_TYPENAME TQMap<Key, T>::const_iterator begin(void) const { - return QMap<Key,T>::begin(); + return TQMap<Key,T>::begin(); } - inline Q_TYPENAME QMap<Key, T>::const_iterator end(void) const + inline TQ_TYPENAME TQMap<Key, T>::const_iterator end(void) const { - return QMap<Key,T>::end(); + return TQMap<Key,T>::end(); } - inline bool contains(const Key& k) const + inline bool tqcontains(const Key& k) const { - return find(k) != end(); + return tqfind(k) != end(); } - inline void map(QMap<Key, T>& that) const + inline void map(TQMap<Key, T>& that) const { - //QMap<Key, T>* ptr = dynamic_cast<QMap<Key, T>* >(this); + //TQMap<Key, T>* ptr = dynamic_cast<TQMap<Key, T>* >(this); //that = *ptr; - that = *(dynamic_cast<QMap<Key, T>* >(const_cast<MyMoneyMap<Key, T>* >(this))); + that = *(dynamic_cast<TQMap<Key, T>* >(const_cast<MyMoneyMap<Key, T>* >(this))); } inline size_t count(void) const { - return QMap<Key, T>::count(); + return TQMap<Key, T>::count(); } #if MY_OWN_DEBUG @@ -173,10 +173,10 @@ private: class MyMoneyMapAction { public: - MyMoneyMapAction(QMap<Key, T>* container) : + MyMoneyMapAction(TQMap<Key, T>* container) : m_container(container) {} - MyMoneyMapAction(QMap<Key, T>* container, const Key& key, const T& obj) : + MyMoneyMapAction(TQMap<Key, T>* container, const Key& key, const T& obj) : m_container(container), m_obj(obj), m_key(key) {} @@ -185,7 +185,7 @@ private: virtual void undo(void) = 0; protected: - QMap<Key, T>* m_container; + TQMap<Key, T>* m_container; T m_obj; Key m_key; }; @@ -193,7 +193,7 @@ private: class MyMoneyMapStart : public MyMoneyMapAction { public: - MyMoneyMapStart(QMap<Key, T>* container, unsigned long* id) : + MyMoneyMapStart(TQMap<Key, T>* container, unsigned long* id) : MyMoneyMapAction(container), m_idPtr(id) { @@ -215,7 +215,7 @@ private: class MyMoneyMapInsert : public MyMoneyMapAction { public: - MyMoneyMapInsert(QMap<Key, T>* container, const Key& key, const T& obj) : + MyMoneyMapInsert(TQMap<Key, T>* container, const Key& key, const T& obj) : MyMoneyMapAction(container, key, obj) { (*container)[key] = obj; @@ -233,7 +233,7 @@ private: class MyMoneyMapRemove : public MyMoneyMapAction { public: - MyMoneyMapRemove(QMap<Key, T>* container, const Key& key) : + MyMoneyMapRemove(TQMap<Key, T>* container, const Key& key) : MyMoneyMapAction(container, key, (*container)[key]) { container->remove(key); @@ -249,7 +249,7 @@ private: class MyMoneyMapModify : public MyMoneyMapAction { public: - MyMoneyMapModify(QMap<Key, T>* container, const Key& key, const T& obj) : + MyMoneyMapModify(TQMap<Key, T>* container, const Key& key, const T& obj) : MyMoneyMapAction(container, key, (*container)[key]) { (*container)[key] = obj; @@ -263,7 +263,7 @@ private: }; protected: - QPtrStack<MyMoneyMapAction> m_stack; + TQPtrStack<MyMoneyMapAction> m_stack; }; #if MY_OWN_DEBUG @@ -271,15 +271,15 @@ protected: #include <kmymoney/mymoneytransaction.h> main() { - MyMoneyMap<QString, MyMoneyAccount> container; - MyMoneyMap<QString, MyMoneyTransaction> ct; + MyMoneyMap<TQString, MyMoneyAccount> container; + MyMoneyMap<TQString, MyMoneyTransaction> ct; MyMoneyAccount acc; acc.setName("Test"); // this should not be possible // container["a"] = acc; - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; list = container.values(); MyMoneyAccount b; @@ -298,7 +298,7 @@ main() container.dump(); container.startTransaction(); - container.remove(QString("001")); + container.remove(TQString("001")); container.dump(); container.rollbackTransaction(); container.dump(); @@ -306,8 +306,8 @@ main() b = container["001"]; printf("b.name() = %s\n", b.name().data()); - QMap<QString, MyMoneyAccount>::ConstIterator it; - it = container.find("001"); + TQMap<TQString, MyMoneyAccount>::ConstIterator it; + it = container.tqfind("001"); it = container.begin(); } catch(MyMoneyException *e) { @@ -315,7 +315,7 @@ main() delete e; } - QMap<QString, MyMoneyAccount> map; + TQMap<TQString, MyMoneyAccount> map; map["005"] = b; container = map; diff --git a/kmymoney2/mymoney/storage/mymoneymaptest.cpp b/kmymoney2/mymoney/storage/mymoneymaptest.cpp index 5104fad..123fcc8 100644 --- a/kmymoney2/mymoney/storage/mymoneymaptest.cpp +++ b/kmymoney2/mymoney/storage/mymoneymaptest.cpp @@ -24,7 +24,7 @@ MyMoneyMapTest::MyMoneyMapTest() void MyMoneyMapTest::setUp() { - m = new MyMoneyMap<QString, QString>; + m = new MyMoneyMap<TQString, TQString>; } void MyMoneyMapTest::tearDown() diff --git a/kmymoney2/mymoney/storage/mymoneymaptest.h b/kmymoney2/mymoney/storage/mymoneymaptest.h index c089a3f..af2389c 100644 --- a/kmymoney2/mymoney/storage/mymoneymaptest.h +++ b/kmymoney2/mymoney/storage/mymoneymaptest.h @@ -34,7 +34,7 @@ class MyMoneyMapTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE_END(); protected: - MyMoneyMap<QString, QString> *m; + MyMoneyMap<TQString, TQString> *m; public: MyMoneyMapTest(); diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp index 7341ec1..5c9abed 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.cpp @@ -44,7 +44,7 @@ MyMoneySeqAccessMgr::MyMoneySeqAccessMgr() m_nextBudgetID = 0; m_user = MyMoneyPayee(); m_dirty = false; - m_creationDate = QDate::currentDate(); + m_creationDate = TQDate::tqcurrentDate(); // setup standard accounts MyMoneyAccount acc_l; @@ -70,14 +70,14 @@ MyMoneySeqAccessMgr::MyMoneySeqAccessMgr() MyMoneyAccount acc_q; acc_q.setAccountType(MyMoneyAccount::Equity); acc_q.setName("Equity"); - MyMoneyAccount equity(STD_ACC_EQUITY, acc_q); + MyMoneyAccount equity(STD_ACC_ETQUITY, acc_q); - QMap<QString, MyMoneyAccount> map; + TQMap<TQString, MyMoneyAccount> map; map[STD_ACC_ASSET] = asset; map[STD_ACC_LIABILITY] = liability; map[STD_ACC_INCOME] = income; map[STD_ACC_EXPENSE] = expense; - map[STD_ACC_EQUITY] = equity; + map[STD_ACC_ETQUITY] = equity; // load account list with inital accounts m_accountList = map; @@ -89,7 +89,7 @@ MyMoneySeqAccessMgr::MyMoneySeqAccessMgr() m_balanceCache[STD_ACC_ASSET] = balance; m_balanceCache[STD_ACC_EXPENSE] = balance; m_balanceCache[STD_ACC_INCOME] = balance; - m_balanceCache[STD_ACC_EQUITY] = balance; + m_balanceCache[STD_ACC_ETQUITY] = balance; // initialize for file fixes (see kmymoneyview.cpp) m_currentFixVersion = 2; @@ -115,16 +115,16 @@ KSharedPtr <MyMoneyStorageSql> MyMoneySeqAccessMgr::connectToDatabase return 0; } -bool MyMoneySeqAccessMgr::isStandardAccount(const QString& id) const +bool MyMoneySeqAccessMgr::isStandardAccount(const TQString& id) const { return id == STD_ACC_LIABILITY || id == STD_ACC_ASSET || id == STD_ACC_EXPENSE || id == STD_ACC_INCOME - || id == STD_ACC_EQUITY; + || id == STD_ACC_ETQUITY; } -void MyMoneySeqAccessMgr::setAccountName(const QString& id, const QString& name) +void MyMoneySeqAccessMgr::setAccountName(const TQString& id, const TQString& name) { if(!isStandardAccount(id)) throw new MYMONEYEXCEPTION("Only standard accounts can be modified using setAccountName()"); @@ -134,20 +134,20 @@ void MyMoneySeqAccessMgr::setAccountName(const QString& id, const QString& name) m_accountList.modify(acc.id(), acc); } -const MyMoneyAccount MyMoneySeqAccessMgr::account(const QString& id) const +const MyMoneyAccount MyMoneySeqAccessMgr::account(const TQString& id) const { // locate the account and if present, return it's data - if(m_accountList.find(id) != m_accountList.end()) + if(m_accountList.tqfind(id) != m_accountList.end()) return m_accountList[id]; // throw an exception, if it does not exist - QString msg = "Unknown account id '" + id + "'"; + TQString msg = "Unknown account id '" + id + "'"; throw new MYMONEYEXCEPTION(msg); } -void MyMoneySeqAccessMgr::accountList(QValueList<MyMoneyAccount>& list) const +void MyMoneySeqAccessMgr::accountList(TQValueList<MyMoneyAccount>& list) const { - QMap<QString, MyMoneyAccount>::ConstIterator it; + TQMap<TQString, MyMoneyAccount>::ConstIterator it; for(it = m_accountList.begin(); it != m_accountList.end(); ++it) { if(!isStandardAccount((*it).id())) { list.append(*it); @@ -172,22 +172,22 @@ void MyMoneySeqAccessMgr::addPayee(MyMoneyPayee& payee) payee = newPayee; } -const MyMoneyPayee MyMoneySeqAccessMgr::payee(const QString& id) const +const MyMoneyPayee MyMoneySeqAccessMgr::payee(const TQString& id) const { - QMap<QString, MyMoneyPayee>::ConstIterator it; - it = m_payeeList.find(id); + TQMap<TQString, MyMoneyPayee>::ConstIterator it; + it = m_payeeList.tqfind(id); if(it == m_payeeList.end()) throw new MYMONEYEXCEPTION("Unknown payee '" + id + "'"); return *it; } -const MyMoneyPayee MyMoneySeqAccessMgr::payeeByName(const QString& payee) const +const MyMoneyPayee MyMoneySeqAccessMgr::payeeByName(const TQString& payee) const { if(payee.isEmpty()) return MyMoneyPayee::null; - QMap<QString, MyMoneyPayee>::ConstIterator it_p; + TQMap<TQString, MyMoneyPayee>::ConstIterator it_p; for(it_p = m_payeeList.begin(); it_p != m_payeeList.end(); ++it_p) { if((*it_p).name() == payee) { @@ -200,11 +200,11 @@ const MyMoneyPayee MyMoneySeqAccessMgr::payeeByName(const QString& payee) const void MyMoneySeqAccessMgr::modifyPayee(const MyMoneyPayee& payee) { - QMap<QString, MyMoneyPayee>::ConstIterator it; + TQMap<TQString, MyMoneyPayee>::ConstIterator it; - it = m_payeeList.find(payee.id()); + it = m_payeeList.tqfind(payee.id()); if(it == m_payeeList.end()) { - QString msg = "Unknown payee '" + payee.id() + "'"; + TQString msg = "Unknown payee '" + payee.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_payeeList.modify((*it).id(), payee); @@ -212,27 +212,27 @@ void MyMoneySeqAccessMgr::modifyPayee(const MyMoneyPayee& payee) void MyMoneySeqAccessMgr::removePayee(const MyMoneyPayee& payee) { - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QMap<QString, MyMoneySchedule>::ConstIterator it_s; - QMap<QString, MyMoneyPayee>::ConstIterator it_p; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneySchedule>::ConstIterator it_s; + TQMap<TQString, MyMoneyPayee>::ConstIterator it_p; - it_p = m_payeeList.find(payee.id()); + it_p = m_payeeList.tqfind(payee.id()); if(it_p == m_payeeList.end()) { - QString msg = "Unknown payee '" + payee.id() + "'"; + TQString msg = "Unknown payee '" + payee.id() + "'"; throw new MYMONEYEXCEPTION(msg); } // scan all transactions to check if the payee is still referenced for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { if((*it_t).hasReferenceTo(payee.id())) { - throw new MYMONEYEXCEPTION(QString("Cannot remove payee that is still referenced to a %1").arg("transaction")); + throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("transaction")); } } // check referential integrity in schedules for(it_s = m_scheduleList.begin(); it_s != m_scheduleList.end(); ++it_s) { if((*it_s).hasReferenceTo(payee.id())) { - throw new MYMONEYEXCEPTION(QString("Cannot remove payee that is still referenced to a %1").arg("schedule")); + throw new MYMONEYEXCEPTION(TQString("Cannot remove payee that is still referenced to a %1").tqarg("schedule")); } } @@ -242,27 +242,27 @@ void MyMoneySeqAccessMgr::removePayee(const MyMoneyPayee& payee) m_payeeList.remove((*it_p).id()); } -const QValueList<MyMoneyPayee> MyMoneySeqAccessMgr::payeeList(void) const +const TQValueList<MyMoneyPayee> MyMoneySeqAccessMgr::payeeList(void) const { return m_payeeList.values(); } -void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& parent, MyMoneyAccount& account) +void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account) { - QMap<QString, MyMoneyAccount>::ConstIterator theParent; - QMap<QString, MyMoneyAccount>::ConstIterator theChild; + TQMap<TQString, MyMoneyAccount>::ConstIterator theParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator theChild; - theParent = m_accountList.find(parent.id()); + theParent = m_accountList.tqfind(tqparent.id()); if(theParent == m_accountList.end()) { - QString msg = "Unknown parent account '"; - msg += parent.id() + "'"; + TQString msg = "Unknown tqparent account '"; + msg += tqparent.id() + "'"; throw new MYMONEYEXCEPTION(msg); } - theChild = m_accountList.find(account.id()); + theChild = m_accountList.tqfind(account.id()); if(theChild == m_accountList.end()) { - QString msg = "Unknown child account '"; + TQString msg = "Unknown child account '"; msg += account.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -270,10 +270,10 @@ void MyMoneySeqAccessMgr::addAccount(MyMoneyAccount& parent, MyMoneyAccount& acc MyMoneyAccount acc = *theParent; acc.addAccountId(account.id()); m_accountList.modify(acc.id(), acc); - parent = acc; + tqparent = acc; acc = *theChild; - acc.setParentAccountId(parent.id()); + acc.setParentAccountId(tqparent.id()); m_accountList.modify(acc.id(), acc); account = acc; @@ -291,7 +291,7 @@ void MyMoneySeqAccessMgr::addInstitution(MyMoneyInstitution& institution) institution = newInstitution; } -unsigned int MyMoneySeqAccessMgr::transactionCount(const QString& account) const +unsigned int MyMoneySeqAccessMgr::transactionCount(const TQString& account) const { unsigned int cnt = 0; @@ -299,8 +299,8 @@ unsigned int MyMoneySeqAccessMgr::transactionCount(const QString& account) const cnt = m_transactionList.count(); } else { - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneySplit>::ConstIterator it_s; // scan all transactions for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { @@ -326,11 +326,11 @@ unsigned int MyMoneySeqAccessMgr::transactionCount(const QString& account) const return cnt; } -const QMap<QString, unsigned long> MyMoneySeqAccessMgr::transactionCountMap(void) const +const TQMap<TQString, unsigned long> MyMoneySeqAccessMgr::transactionCountMap(void) const { - QMap<QString, unsigned long> map; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQMap<TQString, unsigned long> map; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneySplit>::ConstIterator it_s; // scan all transactions for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { @@ -352,49 +352,49 @@ unsigned int MyMoneySeqAccessMgr::accountCount(void) const return m_accountList.count(); } -QString MyMoneySeqAccessMgr::nextPayeeID(void) +TQString MyMoneySeqAccessMgr::nextPayeeID(void) { - QString id; + TQString id; id.setNum(++m_nextPayeeID); id = "P" + id.rightJustify(PAYEE_ID_SIZE, '0'); return id; } -QString MyMoneySeqAccessMgr::nextInstitutionID(void) +TQString MyMoneySeqAccessMgr::nextInstitutionID(void) { - QString id; + TQString id; id.setNum(++m_nextInstitutionID); id = "I" + id.rightJustify(INSTITUTION_ID_SIZE, '0'); return id; } -QString MyMoneySeqAccessMgr::nextAccountID(void) +TQString MyMoneySeqAccessMgr::nextAccountID(void) { - QString id; + TQString id; id.setNum(++m_nextAccountID); id = "A" + id.rightJustify(ACCOUNT_ID_SIZE, '0'); return id; } -QString MyMoneySeqAccessMgr::nextTransactionID(void) +TQString MyMoneySeqAccessMgr::nextTransactionID(void) { - QString id; + TQString id; id.setNum(++m_nextTransactionID); id = "T" + id.rightJustify(TRANSACTION_ID_SIZE, '0'); return id; } -QString MyMoneySeqAccessMgr::nextScheduleID(void) +TQString MyMoneySeqAccessMgr::nextScheduleID(void) { - QString id; + TQString id; id.setNum(++m_nextScheduleID); id = "SCH" + id.rightJustify(SCHEDULE_ID_SIZE, '0'); return id; } -QString MyMoneySeqAccessMgr::nextSecurityID(void) +TQString MyMoneySeqAccessMgr::nextSecurityID(void) { - QString id; + TQString id; id.setNum(++m_nextSecurityID); id = "E" + id.rightJustify(SECURITY_ID_SIZE, '0'); return id; @@ -416,7 +416,7 @@ void MyMoneySeqAccessMgr::addTransaction(MyMoneyTransaction& transaction, const throw new MYMONEYEXCEPTION("invalid post date"); // now check the splits - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following lines will throw an exception if the // account or payee do not exist @@ -426,7 +426,7 @@ void MyMoneySeqAccessMgr::addTransaction(MyMoneyTransaction& transaction, const } MyMoneyTransaction newTransaction(nextTransactionID(), transaction); - QString key = newTransaction.uniqueSortKey(); + TQString key = newTransaction.uniqueSortKey(); m_transactionList.insert(key, newTransaction); m_transactionKeys.insert(newTransaction.id(), key); @@ -439,7 +439,7 @@ void MyMoneySeqAccessMgr::addTransaction(MyMoneyTransaction& transaction, const acc.adjustBalance(*it_s); if(!skipAccountUpdate) { acc.touch(); - invalidateBalanceCache(acc.id()); + tqinvalidateBalanceCache(acc.id()); } m_accountList.modify(acc.id(), acc); } @@ -448,12 +448,12 @@ void MyMoneySeqAccessMgr::addTransaction(MyMoneyTransaction& transaction, const void MyMoneySeqAccessMgr::touch(void) { m_dirty = true; - m_lastModificationDate = QDate::currentDate(); + m_lastModificationDate = TQDate::tqcurrentDate(); } -bool MyMoneySeqAccessMgr::hasActiveSplits(const QString& id) const +bool MyMoneySeqAccessMgr::hasActiveSplits(const TQString& id) const { - QMap<QString, MyMoneyTransaction>::ConstIterator it; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it; for(it = m_transactionList.begin(); it != m_transactionList.end(); ++it) { if((*it).accountReferenced(id)) { @@ -463,39 +463,39 @@ bool MyMoneySeqAccessMgr::hasActiveSplits(const QString& id) const return false; } -const MyMoneyInstitution MyMoneySeqAccessMgr::institution(const QString& id) const +const MyMoneyInstitution MyMoneySeqAccessMgr::institution(const TQString& id) const { - QMap<QString, MyMoneyInstitution>::ConstIterator pos; + TQMap<TQString, MyMoneyInstitution>::ConstIterator pos; - pos = m_institutionList.find(id); + pos = m_institutionList.tqfind(id); if(pos != m_institutionList.end()) return *pos; throw new MYMONEYEXCEPTION("unknown institution"); } -const QValueList<MyMoneyInstitution> MyMoneySeqAccessMgr::institutionList(void) const +const TQValueList<MyMoneyInstitution> MyMoneySeqAccessMgr::institutionList(void) const { return m_institutionList.values(); } void MyMoneySeqAccessMgr::modifyAccount(const MyMoneyAccount& account, const bool skipCheck) { - QMap<QString, MyMoneyAccount>::ConstIterator pos; + TQMap<TQString, MyMoneyAccount>::ConstIterator pos; // locate the account in the file global pool - pos = m_accountList.find(account.id()); + pos = m_accountList.tqfind(account.id()); if(pos != m_accountList.end()) { // check if the new info is based on the old one. // this is the case, when the file and the id // as well as the type are equal. - if((((*pos).parentAccountId() == account.parentAccountId()) + if((((*pos).tqparentAccountId() == account.tqparentAccountId()) && ((*pos).accountType() == account.accountType())) || (skipCheck == true)) { // make sure that all the referenced objects exist if(!account.institutionId().isEmpty()) institution(account.institutionId()); - QValueList<QString>::ConstIterator it_a; + TQValueList<TQString>::ConstIterator it_a; for(it_a = account.accountList().begin(); it_a != account.accountList().end(); ++it_a) { this->account(*it_a); } @@ -503,8 +503,8 @@ void MyMoneySeqAccessMgr::modifyAccount(const MyMoneyAccount& account, const boo // update information in account list m_accountList.modify(account.id(), account); - // invalidate cached balance - invalidateBalanceCache(account.id()); + // tqinvalidate cached balance + tqinvalidateBalanceCache(account.id()); } else throw new MYMONEYEXCEPTION("Invalid information for update"); @@ -515,10 +515,10 @@ void MyMoneySeqAccessMgr::modifyAccount(const MyMoneyAccount& account, const boo void MyMoneySeqAccessMgr::modifyInstitution(const MyMoneyInstitution& institution) { - QMap<QString, MyMoneyInstitution>::ConstIterator pos; + TQMap<TQString, MyMoneyInstitution>::ConstIterator pos; // locate the institution in the file global pool - pos = m_institutionList.find(institution.id()); + pos = m_institutionList.tqfind(institution.id()); if(pos != m_institutionList.end()) { m_institutionList.modify(institution.id(), institution); @@ -542,7 +542,7 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio throw new MYMONEYEXCEPTION("invalid transaction to be modified"); // now check the splits - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { // the following lines will throw an exception if the // account or payee do not exist @@ -553,16 +553,16 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio // new data seems to be ok. find old version of transaction // in our pool. Throw exception if unknown. - if(!m_transactionKeys.contains(transaction.id())) + if(!m_transactionKeys.tqcontains(transaction.id())) throw new MYMONEYEXCEPTION("invalid transaction id"); - QString oldKey = m_transactionKeys[transaction.id()]; - if(!m_transactionList.contains(oldKey)) + TQString oldKey = m_transactionKeys[transaction.id()]; + if(!m_transactionList.tqcontains(oldKey)) throw new MYMONEYEXCEPTION("invalid transaction key"); - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; - it_t = m_transactionList.find(oldKey); + it_t = m_transactionList.tqfind(oldKey); if(it_t == m_transactionList.end()) throw new MYMONEYEXCEPTION("invalid transaction key"); @@ -571,14 +571,14 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio MyMoneyAccount acc = m_accountList[(*it_s).accountId()]; acc.adjustBalance(*it_s, true); // reverse the adjust operation (reverse = true) acc.touch(); - invalidateBalanceCache(acc.id()); + tqinvalidateBalanceCache(acc.id()); m_accountList.modify(acc.id(), acc); } for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s) { MyMoneyAccount acc = m_accountList[(*it_s).accountId()]; acc.adjustBalance(*it_s); acc.touch(); - invalidateBalanceCache(acc.id()); + tqinvalidateBalanceCache(acc.id()); m_accountList.modify(acc.id(), acc); } @@ -586,54 +586,54 @@ void MyMoneySeqAccessMgr::modifyTransaction(const MyMoneyTransaction& transactio m_transactionList.remove(oldKey); // add new transaction to lists - QString newKey = transaction.uniqueSortKey(); + TQString newKey = transaction.uniqueSortKey(); m_transactionList.insert(newKey, transaction); m_transactionKeys.modify(transaction.id(), newKey); } -void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent) +void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent) { - reparentAccount(account, parent, true); + reparentAccount(account, tqparent, true); } -void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent, const bool /* sendNotification */) +void MyMoneySeqAccessMgr::reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent, const bool /* sendNotification */) { - QMap<QString, MyMoneyAccount>::ConstIterator oldParent; - QMap<QString, MyMoneyAccount>::ConstIterator newParent; - QMap<QString, MyMoneyAccount>::ConstIterator childAccount; + TQMap<TQString, MyMoneyAccount>::ConstIterator oldParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator newParent; + TQMap<TQString, MyMoneyAccount>::ConstIterator childAccount; // verify that accounts exist. If one does not, // an exception is thrown MyMoneySeqAccessMgr::account(account.id()); - MyMoneySeqAccessMgr::account(parent.id()); - if(!account.parentAccountId().isEmpty()) { - MyMoneySeqAccessMgr::account(account.parentAccountId()); - oldParent = m_accountList.find(account.parentAccountId()); + MyMoneySeqAccessMgr::account(tqparent.id()); + if(!account.tqparentAccountId().isEmpty()) { + MyMoneySeqAccessMgr::account(account.tqparentAccountId()); + oldParent = m_accountList.tqfind(account.tqparentAccountId()); } - if(account.accountType() == MyMoneyAccount::Stock && parent.accountType() != MyMoneyAccount::Investment) + if(account.accountType() == MyMoneyAccount::Stock && tqparent.accountType() != MyMoneyAccount::Investment) throw new MYMONEYEXCEPTION("Cannot move a stock acocunt into a non-investment account"); - newParent = m_accountList.find(parent.id()); - childAccount = m_accountList.find(account.id()); + newParent = m_accountList.tqfind(tqparent.id()); + childAccount = m_accountList.tqfind(account.id()); MyMoneyAccount acc; - if(!account.parentAccountId().isEmpty()) { + if(!account.tqparentAccountId().isEmpty()) { acc = (*oldParent); acc.removeAccountId(account.id()); m_accountList.modify(acc.id(), acc); } - parent = (*newParent); - parent.addAccountId(account.id()); - m_accountList.modify(parent.id(), parent); + tqparent = (*newParent); + tqparent.addAccountId(account.id()); + m_accountList.modify(tqparent.id(), tqparent); account = (*childAccount); - account.setParentAccountId(parent.id()); + account.setParentAccountId(tqparent.id()); m_accountList.modify(account.id(), account); #if 0 - // make sure the type is the same as the new parent. This does not work for stock and investment + // make sure the type is the same as the new tqparent. This does not work for stock and investment if(account.accountType() != MyMoneyAccount::Stock && account.accountType() != MyMoneyAccount::Investment) (*childAccount).setAccountType((*newParent).accountType()); #endif @@ -645,18 +645,18 @@ void MyMoneySeqAccessMgr::removeTransaction(const MyMoneyTransaction& transactio if(transaction.id().isEmpty()) throw new MYMONEYEXCEPTION("invalid transaction to be deleted"); - QMap<QString, QString>::ConstIterator it_k; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, TQString>::ConstIterator it_k; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; - it_k = m_transactionKeys.find(transaction.id()); + it_k = m_transactionKeys.tqfind(transaction.id()); if(it_k == m_transactionKeys.end()) throw new MYMONEYEXCEPTION("invalid transaction to be deleted"); - it_t = m_transactionList.find(*it_k); + it_t = m_transactionList.tqfind(*it_k); if(it_t == m_transactionList.end()) throw new MYMONEYEXCEPTION("invalid transaction key"); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; // scan the splits and collect all accounts that need // to be updated after the removal of this transaction @@ -665,7 +665,7 @@ void MyMoneySeqAccessMgr::removeTransaction(const MyMoneyTransaction& transactio acc.adjustBalance(*it_s, true); // reverse = true acc.touch(); m_accountList.modify(acc.id(), acc); - invalidateBalanceCache(acc.id()); + tqinvalidateBalanceCache(acc.id()); } // FIXME: check if any split is frozen and throw exception @@ -677,12 +677,12 @@ void MyMoneySeqAccessMgr::removeTransaction(const MyMoneyTransaction& transactio void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) { - MyMoneyAccount parent; + MyMoneyAccount tqparent; - // check that the account and it's parent exist + // check that the account and it's tqparent exist // this will throw an exception if the id is unknown MyMoneySeqAccessMgr::account(account.id()); - parent = MyMoneySeqAccessMgr::account(account.parentAccountId()); + tqparent = MyMoneySeqAccessMgr::account(account.tqparentAccountId()); // check that it's not one of the standard account groups if(isStandardAccount(account.id())) @@ -692,10 +692,10 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) throw new MYMONEYEXCEPTION("Unable to remove account with active splits"); } - // re-parent all sub-ordinate accounts to the parent of the account + // re-tqparent all sub-ordinate accounts to the tqparent of the account // to be deleted. First round check that all accounts exist, second - // round do the re-parenting. - QStringList::ConstIterator it; + // round do the re-tqparenting. + TQStringList::ConstIterator it; for(it = account.accountList().begin(); it != account.accountList().end(); ++it) { MyMoneySeqAccessMgr::account(*it); } @@ -703,18 +703,18 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) // if one of the accounts did not exist, an exception had been // thrown and we would not make it until here. - QMap<QString, MyMoneyAccount>::ConstIterator it_a; - QMap<QString, MyMoneyAccount>::ConstIterator it_p; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_a; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_p; // locate the account in the file global pool - it_a = m_accountList.find(account.id()); + it_a = m_accountList.tqfind(account.id()); if(it_a == m_accountList.end()) throw new MYMONEYEXCEPTION("Internal error: account not found in list"); - it_p = m_accountList.find(parent.id()); + it_p = m_accountList.tqfind(tqparent.id()); if(it_p == m_accountList.end()) - throw new MYMONEYEXCEPTION("Internal error: parent account not found in list"); + throw new MYMONEYEXCEPTION("Internal error: tqparent account not found in list"); if(!account.institutionId().isEmpty()) throw new MYMONEYEXCEPTION("Cannot remove account still attached to an institution"); @@ -729,34 +729,34 @@ void MyMoneySeqAccessMgr::removeAccount(const MyMoneyAccount& account) if((*it_a).id() == account.id() && (*it_a).accountType() == account.accountType()) { - // second round over sub-ordinate accounts: do re-parenting + // second round over sub-ordinate accounts: do re-tqparenting // but only if the list contains at least one entry // FIXME: move this logic to MyMoneyFile if((*it_a).accountList().count() > 0) { while((*it_a).accountList().count() > 0) { it = (*it_a).accountList().begin(); MyMoneyAccount acc(MyMoneySeqAccessMgr::account(*it)); - reparentAccount(acc, parent, false); + reparentAccount(acc, tqparent, false); } } - // remove account from parent's list - parent.removeAccountId(account.id()); - m_accountList.modify(parent.id(), parent); + // remove account from tqparent's list + tqparent.removeAccountId(account.id()); + m_accountList.modify(tqparent.id(), tqparent); // remove account from the global account pool m_accountList.remove(account.id()); // remove from balance list m_balanceCache.remove(account.id()); - invalidateBalanceCache(parent.id()); + tqinvalidateBalanceCache(tqparent.id()); } } void MyMoneySeqAccessMgr::removeInstitution(const MyMoneyInstitution& institution) { - QMap<QString, MyMoneyInstitution>::ConstIterator it_i; + TQMap<TQString, MyMoneyInstitution>::ConstIterator it_i; - it_i = m_institutionList.find(institution.id()); + it_i = m_institutionList.tqfind(institution.id()); if(it_i != m_institutionList.end()) { m_institutionList.remove(institution.id()); @@ -764,11 +764,11 @@ void MyMoneySeqAccessMgr::removeInstitution(const MyMoneyInstitution& institutio throw new MYMONEYEXCEPTION("invalid institution"); } -void MyMoneySeqAccessMgr::transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const +void MyMoneySeqAccessMgr::transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const { list.clear(); - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { // This code is used now. It adds the transaction to the list for @@ -789,55 +789,55 @@ void MyMoneySeqAccessMgr::transactionList(QValueList<MyMoneyTransaction>& list, } } -void MyMoneySeqAccessMgr::transactionList(QValueList< QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const +void MyMoneySeqAccessMgr::transactionList(TQValueList< TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const { list.clear(); - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { if(filter.match(*it_t)) { - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = filter.matchingSplits().begin(); it_s != filter.matchingSplits().end(); ++it_s) { - list.append(qMakePair(*it_t, *it_s)); + list.append(tqMakePair(*it_t, *it_s)); } } } } -const QValueList<MyMoneyTransaction> MyMoneySeqAccessMgr::transactionList(MyMoneyTransactionFilter& filter) const +const TQValueList<MyMoneyTransaction> MyMoneySeqAccessMgr::transactionList(MyMoneyTransactionFilter& filter) const { - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; transactionList(list, filter); return list; } -const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const QString& id) const +const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const TQString& id) const { // get the full key of this transaction, throw exception // if it's invalid (unknown) - if(!m_transactionKeys.contains(id)) { - QString msg = QString("Invalid transaction id '%1'").arg(id); + if(!m_transactionKeys.tqcontains(id)) { + TQString msg = TQString("Invalid transaction id '%1'").tqarg(id); throw new MYMONEYEXCEPTION(msg); } // check if this key is in the list, throw exception if not - QString key = m_transactionKeys[id]; - if(!m_transactionList.contains(key)) { - QString msg = QString("Invalid transaction key '%1'").arg(key); + TQString key = m_transactionKeys[id]; + if(!m_transactionList.tqcontains(key)) { + TQString msg = TQString("Invalid transaction key '%1'").tqarg(key); throw new MYMONEYEXCEPTION(msg); } return m_transactionList[key]; } -const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const QString& account, const int idx) const +const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const TQString& account, const int idx) const { /* removed with MyMoneyAccount::Transaction - QMap<QString, MyMoneyAccount>::ConstIterator acc; + TQMap<TQString, MyMoneyAccount>::ConstIterator acc; // find account object in list, throw exception if unknown - acc = m_accountList.find(account); + acc = m_accountList.tqfind(account); if(acc == m_accountList.end()) throw new MYMONEYEXCEPTION("unknown account id"); @@ -849,7 +849,7 @@ const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const QString& account */ // new implementation if the above code does not work anymore - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyAccount acc = m_accountList[account]; MyMoneyTransactionFilter filter; @@ -866,36 +866,36 @@ const MyMoneyTransaction MyMoneySeqAccessMgr::transaction(const QString& account return transaction(list[idx].id()); } -const MyMoneyMoney MyMoneySeqAccessMgr::balance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneySeqAccessMgr::balance(const TQString& id, const TQDate& date) const { MyMoneyMoney result(0); MyMoneyAccount acc; - // if (date != QDate()) qDebug ("request balance for %s at %s", id.data(), date.toString(Qt::ISODate).latin1()); + // if (date != TQDate()) qDebug ("request balance for %s at %s", id.data(), date.toString(Qt::ISODate).latin1()); if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) { - if(m_accountList.find(id) != m_accountList.end()) + if(m_accountList.tqfind(id) != m_accountList.end()) return m_accountList[id].balance(); return MyMoneyMoney(0); } if(m_balanceCache[id].valid == false || date != m_balanceCacheDate) { - QMap<QString, MyMoneyMoney> balances; - QMap<QString, MyMoneyMoney>::ConstIterator it_b; + TQMap<TQString, MyMoneyMoney> balances; + TQMap<TQString, MyMoneyMoney>::ConstIterator it_b; if (date != m_balanceCacheDate) { m_balanceCache.clear(); m_balanceCacheDate = date; } - QValueList<MyMoneyTransaction> list; - QValueList<MyMoneyTransaction>::ConstIterator it_t; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneySplit>::ConstIterator it_s; MyMoneyTransactionFilter filter; - filter.setDateFilter(QDate(), date); + filter.setDateFilter(TQDate(), date); filter.setReportAllSplits(false); transactionList(list, filter); for(it_t = list.begin(); it_t != list.end(); ++it_t) { for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s){ - const QString& aid = (*it_s).accountId(); + const TQString& aid = (*it_s).accountId(); if((*it_s).action() == MyMoneySplit::ActionSplitShares) { balances[aid] = balances[aid] * (*it_s).shares(); } else { @@ -911,7 +911,7 @@ const MyMoneyMoney MyMoneySeqAccessMgr::balance(const QString& id, const QDate& } // fill all accounts w/o transactions to zero - QMap<QString, MyMoneyAccount>::ConstIterator it_a; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_a; for(it_a = m_accountList.begin(); it_a != m_accountList.end(); ++it_a) { if(m_balanceCache[(*it_a).id()].valid == false) { MyMoneyBalanceCacheItem balance(MyMoneyMoney(0,1)); @@ -928,10 +928,10 @@ const MyMoneyMoney MyMoneySeqAccessMgr::balance(const QString& id, const QDate& return result; } -const MyMoneyMoney MyMoneySeqAccessMgr::totalBalance(const QString& id, const QDate& date) const +const MyMoneyMoney MyMoneySeqAccessMgr::totalBalance(const TQString& id, const TQDate& date) const { - QStringList accounts; - QStringList::ConstIterator it_a; + TQStringList accounts; + TQStringList::ConstIterator it_a; MyMoneyMoney result(balance(id, date)); @@ -952,10 +952,10 @@ const MyMoneyMoney MyMoneySeqAccessMgr::totalBalance(const QString& id, const QD * the functionality, we can turn it back on. BTW: the stuff is untested ;-) */ /* -const unsigned int MyMoneyFile::moveSplits(const QString& oldAccount, const QString& newAccount) +const unsigned int MyMoneyFile::moveSplits(const TQString& oldAccount, const TQString& newAccount) { - QMap<QString, MyMoneyTransaction>::Iterator it_t; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQMap<TQString, MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneySplit>::ConstIterator it_s; unsigned int cnt = 0; // scan all transactions @@ -974,13 +974,13 @@ const unsigned int MyMoneyFile::moveSplits(const QString& oldAccount, const QStr if(cnt != 0) { // now update all the accounts that were referenced - QMap<QString, MyMoneyAccount>::Iterator acc; - acc = m_accountList.find(oldAccount); + TQMap<TQString, MyMoneyAccount>::Iterator acc; + acc = m_accountList.tqfind(oldAccount); if(acc != m_accountList.end()) { (*acc).touch(); refreshAccountTransactionList(acc); } - acc = m_accountList.find(newAccount); + acc = m_accountList.tqfind(newAccount); if(acc != m_accountList.end()) { (*acc).touch(); refreshAccountTransactionList(acc); @@ -993,13 +993,13 @@ const unsigned int MyMoneyFile::moveSplits(const QString& oldAccount, const QStr } */ -void MyMoneySeqAccessMgr::invalidateBalanceCache(const QString& id) +void MyMoneySeqAccessMgr::tqinvalidateBalanceCache(const TQString& id) { if(!id.isEmpty()) { try { m_balanceCache[id].valid = false; if(!isStandardAccount(id)) { - invalidateBalanceCache(account(id).parentAccountId()); + tqinvalidateBalanceCache(account(id).tqparentAccountId()); } } catch (MyMoneyException *e) { delete e; @@ -1007,33 +1007,33 @@ void MyMoneySeqAccessMgr::invalidateBalanceCache(const QString& id) } } -void MyMoneySeqAccessMgr::loadAccounts(const QMap<QString, MyMoneyAccount>& map) +void MyMoneySeqAccessMgr::loadAccounts(const TQMap<TQString, MyMoneyAccount>& map) { m_accountList = map; // scan the map to identify the last used id - QMap<QString, MyMoneyAccount>::const_iterator it_a; - QString lastId(""); + TQMap<TQString, MyMoneyAccount>::const_iterator it_a; + TQString lastId(""); for(it_a = map.begin(); it_a != map.end(); ++it_a) { if(!isStandardAccount((*it_a).id()) && ((*it_a).id() > lastId)) lastId = (*it_a).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextAccountID = atol(lastId.mid(pos)); } } -void MyMoneySeqAccessMgr::loadTransactions(const QMap<QString, MyMoneyTransaction>& map) +void MyMoneySeqAccessMgr::loadTransactions(const TQMap<TQString, MyMoneyTransaction>& map) { m_transactionList = map; // now fill the key map and // identify the last used id - QString lastId(""); - QMap<QString, QString> keys; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQString lastId(""); + TQMap<TQString, TQString> keys; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; for(it_t = map.begin(); it_t != map.end(); ++it_t) { keys[(*it_t).id()] = it_t.key(); if((*it_t).id() > lastId) @@ -1042,37 +1042,37 @@ void MyMoneySeqAccessMgr::loadTransactions(const QMap<QString, MyMoneyTransactio m_transactionKeys = keys; - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextTransactionID = atol(lastId.mid(pos)); } } -void MyMoneySeqAccessMgr::loadInstitutions(const QMap<QString, MyMoneyInstitution>& map) +void MyMoneySeqAccessMgr::loadInstitutions(const TQMap<TQString, MyMoneyInstitution>& map) { m_institutionList = map; // scan the map to identify the last used id - QMap<QString, MyMoneyInstitution>::const_iterator it_i; - QString lastId(""); + TQMap<TQString, MyMoneyInstitution>::const_iterator it_i; + TQString lastId(""); for(it_i = map.begin(); it_i != map.end(); ++it_i) { if((*it_i).id() > lastId) lastId = (*it_i).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextInstitutionID = atol(lastId.mid(pos)); } } -void MyMoneySeqAccessMgr::loadPayees(const QMap<QString, MyMoneyPayee>& map) +void MyMoneySeqAccessMgr::loadPayees(const TQMap<TQString, MyMoneyPayee>& map) { m_payeeList = map; // scan the map to identify the last used id - QMap<QString, MyMoneyPayee>::const_iterator it_p; - QString lastId(""); + TQMap<TQString, MyMoneyPayee>::const_iterator it_p; + TQString lastId(""); for(it_p = map.begin(); it_p != map.end(); ++it_p) { if((*it_p).id().length() <= PAYEE_ID_SIZE+1) { if((*it_p).id() > lastId) @@ -1081,31 +1081,31 @@ void MyMoneySeqAccessMgr::loadPayees(const QMap<QString, MyMoneyPayee>& map) } } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextPayeeID = atol(lastId.mid(pos)); } } -void MyMoneySeqAccessMgr::loadSecurities(const QMap<QString, MyMoneySecurity>& map) +void MyMoneySeqAccessMgr::loadSecurities(const TQMap<TQString, MyMoneySecurity>& map) { m_securitiesList = map; // scan the map to identify the last used id - QMap<QString, MyMoneySecurity>::const_iterator it_s; - QString lastId(""); + TQMap<TQString, MyMoneySecurity>::const_iterator it_s; + TQString lastId(""); for(it_s = map.begin(); it_s != map.end(); ++it_s) { if((*it_s).id() > lastId) lastId = (*it_s).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextSecurityID = atol(lastId.mid(pos)); } } -void MyMoneySeqAccessMgr::loadCurrencies(const QMap<QString, MyMoneySecurity>& map) +void MyMoneySeqAccessMgr::loadCurrencies(const TQMap<TQString, MyMoneySecurity>& map) { m_currencyList = map; } @@ -1150,29 +1150,29 @@ void MyMoneySeqAccessMgr::loadBudgetId(const unsigned long id) m_nextBudgetID = id; } -const QString MyMoneySeqAccessMgr::value(const QString& key) const +const TQString MyMoneySeqAccessMgr::value(const TQString& key) const { return MyMoneyKeyValueContainer::value(key); } -void MyMoneySeqAccessMgr::setValue(const QString& key, const QString& val) +void MyMoneySeqAccessMgr::setValue(const TQString& key, const TQString& val) { MyMoneyKeyValueContainer::setValue(key, val); touch(); } -void MyMoneySeqAccessMgr::deletePair(const QString& key) +void MyMoneySeqAccessMgr::deletePair(const TQString& key) { MyMoneyKeyValueContainer::deletePair(key); touch(); } -const QMap<QString, QString> MyMoneySeqAccessMgr::pairs(void) const +const TQMap<TQString, TQString> MyMoneySeqAccessMgr::pairs(void) const { return MyMoneyKeyValueContainer::pairs(); } -void MyMoneySeqAccessMgr::setPairs(const QMap<QString, QString>& list) +void MyMoneySeqAccessMgr::setPairs(const TQMap<TQString, TQString>& list) { MyMoneyKeyValueContainer::setPairs(list); touch(); @@ -1194,11 +1194,11 @@ void MyMoneySeqAccessMgr::addSchedule(MyMoneySchedule& sched) void MyMoneySeqAccessMgr::modifySchedule(const MyMoneySchedule& sched) { - QMap<QString, MyMoneySchedule>::ConstIterator it; + TQMap<TQString, MyMoneySchedule>::ConstIterator it; - it = m_scheduleList.find(sched.id()); + it = m_scheduleList.tqfind(sched.id()); if(it == m_scheduleList.end()) { - QString msg = "Unknown schedule '" + sched.id() + "'"; + TQString msg = "Unknown schedule '" + sched.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1207,11 +1207,11 @@ void MyMoneySeqAccessMgr::modifySchedule(const MyMoneySchedule& sched) void MyMoneySeqAccessMgr::removeSchedule(const MyMoneySchedule& sched) { - QMap<QString, MyMoneySchedule>::ConstIterator it; + TQMap<TQString, MyMoneySchedule>::ConstIterator it; - it = m_scheduleList.find(sched.id()); + it = m_scheduleList.tqfind(sched.id()); if(it == m_scheduleList.end()) { - QString msg = "Unknown schedule '" + sched.id() + "'"; + TQString msg = "Unknown schedule '" + sched.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1219,31 +1219,31 @@ void MyMoneySeqAccessMgr::removeSchedule(const MyMoneySchedule& sched) m_scheduleList.remove(sched.id()); } -const MyMoneySchedule MyMoneySeqAccessMgr::schedule(const QString& id) const +const MyMoneySchedule MyMoneySeqAccessMgr::schedule(const TQString& id) const { - QMap<QString, MyMoneySchedule>::ConstIterator pos; + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; // locate the schedule and if present, return it's data - pos = m_scheduleList.find(id); + pos = m_scheduleList.tqfind(id); if(pos != m_scheduleList.end()) return (*pos); // throw an exception, if it does not exist - QString msg = "Unknown schedule id '" + id + "'"; + TQString msg = "Unknown schedule id '" + id + "'"; throw new MYMONEYEXCEPTION(msg); } -const QValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList( - const QString& accountId, +const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList( + const TQString& accountId, const MyMoneySchedule::typeE type, const MyMoneySchedule::occurenceE occurence, const MyMoneySchedule::paymentTypeE paymentType, - const QDate& startDate, - const QDate& endDate, + const TQDate& startDate, + const TQDate& endDate, const bool overdue) const { - QMap<QString, MyMoneySchedule>::ConstIterator pos; - QValueList<MyMoneySchedule> list; + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; + TQValueList<MyMoneySchedule> list; // qDebug("scheduleList()"); @@ -1270,8 +1270,8 @@ const QValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList( if(!accountId.isEmpty()) { MyMoneyTransaction t = (*pos).transaction(); - QValueList<MyMoneySplit>::ConstIterator it; - QValueList<MyMoneySplit> splits; + TQValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit> splits; splits = t.splits(); for(it = splits.begin(); it != splits.end(); ++it) { if((*it).accountId() == accountId) @@ -1311,19 +1311,19 @@ const QValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleList( return list; } -void MyMoneySeqAccessMgr::loadSchedules(const QMap<QString, MyMoneySchedule>& map) +void MyMoneySeqAccessMgr::loadSchedules(const TQMap<TQString, MyMoneySchedule>& map) { m_scheduleList = map; // scan the map to identify the last used id - QMap<QString, MyMoneySchedule>::const_iterator it_s; - QString lastId(""); + TQMap<TQString, MyMoneySchedule>::const_iterator it_s; + TQString lastId(""); for(it_s = map.begin(); it_s != map.end(); ++it_s) { if((*it_s).id() > lastId) lastId = (*it_s).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextScheduleID = atol(lastId.mid(pos)); } @@ -1334,16 +1334,16 @@ void MyMoneySeqAccessMgr::loadScheduleId(const unsigned long id) m_nextScheduleID = id; } -const QValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleListEx(int scheduleTypes, +const TQValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleListEx(int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate date, - const QStringList& accounts) const + TQDate date, + const TQStringList& accounts) const { // qDebug("scheduleListEx"); - QMap<QString, MyMoneySchedule>::ConstIterator pos; - QValueList<MyMoneySchedule> list; + TQMap<TQString, MyMoneySchedule>::ConstIterator pos; + TQValueList<MyMoneySchedule> list; if (!date.isValid()) return list; @@ -1370,7 +1370,7 @@ const QValueList<MyMoneySchedule> MyMoneySeqAccessMgr::scheduleListEx(int schedu if (accounts.count() > 0) { - if (accounts.contains((*pos).account().id())) + if (accounts.tqcontains((*pos).account().id())) continue; } @@ -1393,12 +1393,12 @@ void MyMoneySeqAccessMgr::addSecurity(MyMoneySecurity& security) void MyMoneySeqAccessMgr::modifySecurity(const MyMoneySecurity& security) { - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = m_securitiesList.find(security.id()); + it = m_securitiesList.tqfind(security.id()); if(it == m_securitiesList.end()) { - QString msg = "Unknown security '"; + TQString msg = "Unknown security '"; msg += security.id() + "' during modifySecurity()"; throw new MYMONEYEXCEPTION(msg); } @@ -1408,14 +1408,14 @@ void MyMoneySeqAccessMgr::modifySecurity(const MyMoneySecurity& security) void MyMoneySeqAccessMgr::removeSecurity(const MyMoneySecurity& security) { - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; // FIXME: check referential integrity - it = m_securitiesList.find(security.id()); + it = m_securitiesList.tqfind(security.id()); if(it == m_securitiesList.end()) { - QString msg = "Unknown security '"; + TQString msg = "Unknown security '"; msg += security.id() + "' during removeSecurity()"; throw new MYMONEYEXCEPTION(msg); } @@ -1423,9 +1423,9 @@ void MyMoneySeqAccessMgr::removeSecurity(const MyMoneySecurity& security) m_securitiesList.remove(security.id()); } -const MyMoneySecurity MyMoneySeqAccessMgr::security(const QString& id) const +const MyMoneySecurity MyMoneySeqAccessMgr::security(const TQString& id) const { - QMap<QString, MyMoneySecurity>::ConstIterator it = m_securitiesList.find(id); + TQMap<TQString, MyMoneySecurity>::ConstIterator it = m_securitiesList.tqfind(id); if(it != m_securitiesList.end()) { return it.data(); @@ -1434,7 +1434,7 @@ const MyMoneySecurity MyMoneySeqAccessMgr::security(const QString& id) const return MyMoneySecurity(); } -const QValueList<MyMoneySecurity> MyMoneySeqAccessMgr::securityList(void) const +const TQValueList<MyMoneySecurity> MyMoneySeqAccessMgr::securityList(void) const { //qDebug("securityList: Security list size is %d, this=%8p", m_equitiesList.size(), (void*)this); return m_securitiesList.values(); @@ -1442,11 +1442,11 @@ const QValueList<MyMoneySecurity> MyMoneySeqAccessMgr::securityList(void) const void MyMoneySeqAccessMgr::addCurrency(const MyMoneySecurity& currency) { - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = m_currencyList.find(currency.id()); + it = m_currencyList.tqfind(currency.id()); if(it != m_currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot add currency with existing id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot add currency with existing id %1").tqarg(currency.id())); } m_currencyList.insert(currency.id(), currency); @@ -1454,11 +1454,11 @@ void MyMoneySeqAccessMgr::addCurrency(const MyMoneySecurity& currency) void MyMoneySeqAccessMgr::modifyCurrency(const MyMoneySecurity& currency) { - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = m_currencyList.find(currency.id()); + it = m_currencyList.tqfind(currency.id()); if(it == m_currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot modify currency with unknown id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot modify currency with unknown id %1").tqarg(currency.id())); } m_currencyList.modify(currency.id(), currency); @@ -1466,39 +1466,39 @@ void MyMoneySeqAccessMgr::modifyCurrency(const MyMoneySecurity& currency) void MyMoneySeqAccessMgr::removeCurrency(const MyMoneySecurity& currency) { - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; // FIXME: check referential integrity - it = m_currencyList.find(currency.id()); + it = m_currencyList.tqfind(currency.id()); if(it == m_currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot remove currency with unknown id %1").arg(currency.id().data())); + throw new MYMONEYEXCEPTION(TQString("Cannot remove currency with unknown id %1").tqarg(currency.id())); } m_currencyList.remove(currency.id()); } -const MyMoneySecurity MyMoneySeqAccessMgr::currency(const QString& id) const +const MyMoneySecurity MyMoneySeqAccessMgr::currency(const TQString& id) const { if(id.isEmpty()) { } - QMap<QString, MyMoneySecurity>::ConstIterator it; + TQMap<TQString, MyMoneySecurity>::ConstIterator it; - it = m_currencyList.find(id); + it = m_currencyList.tqfind(id); if(it == m_currencyList.end()) { - throw new MYMONEYEXCEPTION(QString("Cannot retrieve currency with unknown id '%1'").arg(id.data())); + throw new MYMONEYEXCEPTION(TQString("Cannot retrieve currency with unknown id '%1'").tqarg(id)); } return *it; } -const QValueList<MyMoneySecurity> MyMoneySeqAccessMgr::currencyList(void) const +const TQValueList<MyMoneySecurity> MyMoneySeqAccessMgr::currencyList(void) const { return m_currencyList.values(); } -const QValueList<MyMoneyReport> MyMoneySeqAccessMgr::reportList(void) const +const TQValueList<MyMoneyReport> MyMoneySeqAccessMgr::reportList(void) const { return m_reportList.values(); } @@ -1513,19 +1513,19 @@ void MyMoneySeqAccessMgr::addReport( MyMoneyReport& report ) report = newReport; } -void MyMoneySeqAccessMgr::loadReports(const QMap<QString, MyMoneyReport>& map) +void MyMoneySeqAccessMgr::loadReports(const TQMap<TQString, MyMoneyReport>& map) { m_reportList = map; // scan the map to identify the last used id - QMap<QString, MyMoneyReport>::const_iterator it_r; - QString lastId(""); + TQMap<TQString, MyMoneyReport>::const_iterator it_r; + TQString lastId(""); for(it_r = map.begin(); it_r != map.end(); ++it_r) { if((*it_r).id() > lastId) lastId = (*it_r).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextReportID = atol(lastId.mid(pos)); } @@ -1533,19 +1533,19 @@ void MyMoneySeqAccessMgr::loadReports(const QMap<QString, MyMoneyReport>& map) void MyMoneySeqAccessMgr::modifyReport( const MyMoneyReport& report ) { - QMap<QString, MyMoneyReport>::ConstIterator it; + TQMap<TQString, MyMoneyReport>::ConstIterator it; - it = m_reportList.find(report.id()); + it = m_reportList.tqfind(report.id()); if(it == m_reportList.end()) { - QString msg = "Unknown report '" + report.id() + "'"; + TQString msg = "Unknown report '" + report.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_reportList.modify(report.id(), report); } -QString MyMoneySeqAccessMgr::nextReportID(void) +TQString MyMoneySeqAccessMgr::nextReportID(void) { - QString id; + TQString id; id.setNum(++m_nextReportID); id = "R" + id.rightJustify(REPORT_ID_SIZE, '0'); return id; @@ -1556,25 +1556,25 @@ unsigned MyMoneySeqAccessMgr::countReports(void) const return m_reportList.count(); } -const MyMoneyReport MyMoneySeqAccessMgr::report( const QString& _id ) const +const MyMoneyReport MyMoneySeqAccessMgr::report( const TQString& _id ) const { return m_reportList[_id]; } void MyMoneySeqAccessMgr::removeReport( const MyMoneyReport& report ) { - QMap<QString, MyMoneyReport>::ConstIterator it; + TQMap<TQString, MyMoneyReport>::ConstIterator it; - it = m_reportList.find(report.id()); + it = m_reportList.tqfind(report.id()); if(it == m_reportList.end()) { - QString msg = "Unknown report '" + report.id() + "'"; + TQString msg = "Unknown report '" + report.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_reportList.remove(report.id()); } -const QValueList<MyMoneyBudget> MyMoneySeqAccessMgr::budgetList(void) const +const TQValueList<MyMoneyBudget> MyMoneySeqAccessMgr::budgetList(void) const { return m_budgetList.values(); } @@ -1587,27 +1587,27 @@ void MyMoneySeqAccessMgr::addBudget( MyMoneyBudget& budget ) budget = newBudget; } -void MyMoneySeqAccessMgr::loadBudgets(const QMap<QString, MyMoneyBudget>& map) +void MyMoneySeqAccessMgr::loadBudgets(const TQMap<TQString, MyMoneyBudget>& map) { m_budgetList = map; // scan the map to identify the last used id - QMap<QString, MyMoneyBudget>::const_iterator it_b; - QString lastId(""); + TQMap<TQString, MyMoneyBudget>::const_iterator it_b; + TQString lastId(""); for(it_b = map.begin(); it_b != map.end(); ++it_b) { if((*it_b).id() > lastId) lastId = (*it_b).id(); } - int pos = lastId.find(QRegExp("\\d+"), 0); + int pos = lastId.tqfind(TQRegExp("\\d+"), 0); if(pos != -1) { m_nextBudgetID = atol(lastId.mid(pos)); } } -const MyMoneyBudget MyMoneySeqAccessMgr::budgetByName(const QString& budget) const +const MyMoneyBudget MyMoneySeqAccessMgr::budgetByName(const TQString& budget) const { - QMap<QString, MyMoneyBudget>::ConstIterator it_p; + TQMap<TQString, MyMoneyBudget>::ConstIterator it_p; for(it_p = m_budgetList.begin(); it_p != m_budgetList.end(); ++it_p) { if((*it_p).name() == budget) { @@ -1620,19 +1620,19 @@ const MyMoneyBudget MyMoneySeqAccessMgr::budgetByName(const QString& budget) con void MyMoneySeqAccessMgr::modifyBudget( const MyMoneyBudget& budget ) { - QMap<QString, MyMoneyBudget>::ConstIterator it; + TQMap<TQString, MyMoneyBudget>::ConstIterator it; - it = m_budgetList.find(budget.id()); + it = m_budgetList.tqfind(budget.id()); if(it == m_budgetList.end()) { - QString msg = "Unknown budget '" + budget.id() + "'"; + TQString msg = "Unknown budget '" + budget.id() + "'"; throw new MYMONEYEXCEPTION(msg); } m_budgetList.modify(budget.id(), budget); } -QString MyMoneySeqAccessMgr::nextBudgetID(void) +TQString MyMoneySeqAccessMgr::nextBudgetID(void) { - QString id; + TQString id; id.setNum(++m_nextBudgetID); id = "B" + id.rightJustify(BUDGET_ID_SIZE, '0'); return id; @@ -1643,18 +1643,18 @@ unsigned MyMoneySeqAccessMgr::countBudgets(void) const return m_budgetList.count(); } -MyMoneyBudget MyMoneySeqAccessMgr::budget( const QString& _id ) const +MyMoneyBudget MyMoneySeqAccessMgr::budget( const TQString& _id ) const { return m_budgetList[_id]; } void MyMoneySeqAccessMgr::removeBudget( const MyMoneyBudget& budget ) { - QMap<QString, MyMoneyBudget>::ConstIterator it; + TQMap<TQString, MyMoneyBudget>::ConstIterator it; - it = m_budgetList.find(budget.id()); + it = m_budgetList.tqfind(budget.id()); if(it == m_budgetList.end()) { - QString msg = "Unknown budget '" + budget.id() + "'"; + TQString msg = "Unknown budget '" + budget.id() + "'"; throw new MYMONEYEXCEPTION(msg); } @@ -1664,8 +1664,8 @@ void MyMoneySeqAccessMgr::removeBudget( const MyMoneyBudget& budget ) void MyMoneySeqAccessMgr::addPrice(const MyMoneyPrice& price) { MyMoneySecurityPair pricePair(price.from(), price.to()); - QMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m; - it_m = m_priceList.find(pricePair); + TQMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m; + it_m = m_priceList.tqfind(pricePair); MyMoneyPriceEntries entries; if(it_m != m_priceList.end()) { @@ -1677,9 +1677,9 @@ void MyMoneySeqAccessMgr::addPrice(const MyMoneyPrice& price) // an existing one. MyMoneyPriceEntries::ConstIterator it; - it = entries.find(price.date()); + it = entries.tqfind(price.date()); if(it != entries.end()) { - if((*it).rate(QString()) == price.rate(QString()) + if((*it).rate(TQString()) == price.rate(TQString()) && (*it).source() == price.source()) // in case the information did not change, we don't do anything return; @@ -1698,8 +1698,8 @@ void MyMoneySeqAccessMgr::addPrice(const MyMoneyPrice& price) void MyMoneySeqAccessMgr::removePrice(const MyMoneyPrice& price) { MyMoneySecurityPair pricePair(price.from(), price.to()); - QMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m; - it_m = m_priceList.find(pricePair); + TQMap<MyMoneySecurityPair, MyMoneyPriceEntries>::ConstIterator it_m; + it_m = m_priceList.tqfind(pricePair); MyMoneyPriceEntries entries; if(it_m != m_priceList.end()) { @@ -1723,20 +1723,20 @@ const MyMoneyPriceList MyMoneySeqAccessMgr::priceList(void) const return list; } -const MyMoneyPrice MyMoneySeqAccessMgr::price(const QString& fromId, const QString& toId, const QDate& _date, const bool exactDate) const +const MyMoneyPrice MyMoneySeqAccessMgr::price(const TQString& fromId, const TQString& toId, const TQDate& _date, const bool exactDate) const { MyMoneyPrice rc; MyMoneyPriceEntries::ConstIterator it; - QDate date(_date); + TQDate date(_date); // If no valid date is passed, we use today's date. if(!date.isValid()) - date = QDate::currentDate(); + date = TQDate::tqcurrentDate(); // If the caller selected an exact entry, we can search for // it using the date as the key if(exactDate) { - it = m_priceList[MyMoneySecurityPair(fromId, toId)].find(date); + it = m_priceList[MyMoneySecurityPair(fromId, toId)].tqfind(date); if(it != m_priceList[MyMoneySecurityPair(fromId, toId)].end()) rc = *it; @@ -1761,24 +1761,24 @@ void MyMoneySeqAccessMgr::clearCache(void) void MyMoneySeqAccessMgr::rebuildAccountBalances(void) { // reset the balance of all accounts to 0 - QMap<QString, MyMoneyAccount> map; + TQMap<TQString, MyMoneyAccount> map; m_accountList.map(map); - QMap<QString, MyMoneyAccount>::iterator it_a; + TQMap<TQString, MyMoneyAccount>::iterator it_a; for(it_a = map.begin(); it_a != map.end(); ++it_a) { (*it_a).setBalance(MyMoneyMoney(0)); } // now scan over all transactions and all splits and setup the balances - QMap<QString, MyMoneyTransaction>::const_iterator it_t; + TQMap<TQString, MyMoneyTransaction>::const_iterator it_t; for(it_t = m_transactionList.begin(); it_t != m_transactionList.end(); ++it_t) { - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s = splits.begin(); for(; it_s != splits.end(); ++it_s ) { if(!(*it_s).shares().isZero()) { - const QString& id = (*it_s).accountId(); + const TQString& id = (*it_s).accountId(); // locate the account and if present, update data - if(map.find(id) != map.end()) { + if(map.tqfind(id) != map.end()) { map[id].adjustBalance(*it_s); } } @@ -1796,14 +1796,14 @@ bool MyMoneySeqAccessMgr::isReferenced(const MyMoneyObject& obj, const MyMoneyFi // you miss the report checks in the following lines ;) bool rc = false; - const QString& id = obj.id(); - QMap<QString, MyMoneyTransaction>::const_iterator it_t; - QMap<QString, MyMoneyAccount>::const_iterator it_a; - QMap<QString, MyMoneyInstitution>::const_iterator it_i; - QMap<QString, MyMoneyPayee>::const_iterator it_p; - QMap<QString, MyMoneyBudget>::const_iterator it_b; - QMap<QString, MyMoneySchedule>::const_iterator it_sch; - QMap<QString, MyMoneySecurity>::const_iterator it_sec; + const TQString& id = obj.id(); + TQMap<TQString, MyMoneyTransaction>::const_iterator it_t; + TQMap<TQString, MyMoneyAccount>::const_iterator it_a; + TQMap<TQString, MyMoneyInstitution>::const_iterator it_i; + TQMap<TQString, MyMoneyPayee>::const_iterator it_p; + TQMap<TQString, MyMoneyBudget>::const_iterator it_b; + TQMap<TQString, MyMoneySchedule>::const_iterator it_sch; + TQMap<TQString, MyMoneySecurity>::const_iterator it_sec; MyMoneyPriceList::const_iterator it_pr; // FIXME optimize the list of objects we have to checks @@ -1853,7 +1853,7 @@ bool MyMoneySeqAccessMgr::isReferenced(const MyMoneyObject& obj, const MyMoneyFi rc = (*it_sec).hasReferenceTo(id); } } - // within the pricelist we don't have to scan each entry. Checking the QPair + // within the pricelist we don't have to scan each entry. Checking the TQPair // members of the MyMoneySecurityPair is enough as they are identical to the // two security ids if(!skipCheck[RefCheckPrice]) { @@ -1917,10 +1917,10 @@ void MyMoneySeqAccessMgr::rollbackTransaction(void) m_priceList.rollbackTransaction(); } -void MyMoneySeqAccessMgr::removeReferences(const QString& id) +void MyMoneySeqAccessMgr::removeReferences(const TQString& id) { - QMap<QString, MyMoneyReport>::const_iterator it_r; - QMap<QString, MyMoneyBudget>::const_iterator it_b; + TQMap<TQString, MyMoneyReport>::const_iterator it_r; + TQMap<TQString, MyMoneyBudget>::const_iterator it_b; // remove from reports for(it_r = m_reportList.begin(); it_r != m_reportList.end(); ++it_r) { diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h index f200bef..ddc2030 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgr.h @@ -20,8 +20,8 @@ * * ***************************************************************************/ -#ifndef MYMONEYSEQACCESSMGR_H -#define MYMONEYSEQACCESSMGR_H +#ifndef MYMONEYSETQACCESSMGR_H +#define MYMONEYSETQACCESSMGR_H // ---------------------------------------------------------------------------- // QT Includes @@ -50,7 +50,7 @@ * will be created containing the new balance value. * * @see MyMoneySeqAccessMgr::balance() and - * MyMoneySeqAccessMgr::invalidateBalanceCache() for a usage example + * MyMoneySeqAccessMgr::tqinvalidateBalanceCache() for a usage example */ class MyMoneyBalanceCacheItem { public: @@ -85,8 +85,8 @@ public: // general get functions const MyMoneyPayee user(void) const { return m_user; }; - const QDate creationDate(void) const { return m_creationDate; }; - const QDate lastModificationDate(void) const { return m_lastModificationDate; }; + const TQDate creationDate(void) const { return m_creationDate; }; + const TQDate lastModificationDate(void) const { return m_lastModificationDate; }; unsigned int currentFixVersion(void) const { return m_currentFixVersion; }; unsigned int fileFixVersion(void) const { return m_fileFixVersion; }; @@ -94,8 +94,8 @@ public: // general set functions void setUser(const MyMoneyPayee& user) { m_user = user; touch(); }; - void setCreationDate(const QDate& val) { m_creationDate = val; touch(); }; - void setLastModificationDate(const QDate& val) { m_lastModificationDate = val; m_dirty = false; }; + void setCreationDate(const TQDate& val) { m_creationDate = val; touch(); }; + void setLastModificationDate(const TQDate& val) { m_lastModificationDate = val; m_dirty = false; }; void setFileFixVersion(const unsigned int v) { m_fileFixVersion = v; }; /** * This method is used to get a SQL reader for subsequent database access @@ -122,7 +122,7 @@ public: * @return reference to MyMoneyAccount object. An exception is thrown * if the id is unknown */ - const MyMoneyAccount account(const QString& id) const; + const MyMoneyAccount account(const TQString& id) const; /** * This method is used to check whether a given @@ -131,26 +131,26 @@ public: * @param id account id * @return true if account-id is one of the standards, false otherwise */ - bool isStandardAccount(const QString& id) const; + bool isStandardAccount(const TQString& id) const; /** * This method is used to set the name for the specified standard account * within the storage area. An exception will be thrown, if an error * occurs * - * @param id QString reference to one of the standard accounts. Possible + * @param id TQString reference to one of the standard accounts. Possible * values are: * * @li STD_ACC_LIABILITY * @li STD_ACC_ASSET * @li STD_ACC_EXPENSE * @li STD_ACC_INCOME - * @li STD_ACC_EQUITY + * @li STD_ACC_ETQUITY * - * @param name QString reference to the name to be set + * @param name TQString reference to the name to be set * */ - void setAccountName(const QString& id, const QString& name); + void setAccountName(const TQString& id, const TQString& name); /** * This method is used to create a new account @@ -174,22 +174,22 @@ public: * This method is used to retrieve information about a payee * An exception will be thrown upon error conditions. * - * @param id QString reference to id of payee + * @param id TQString reference to id of payee * * @return MyMoneyPayee object of payee */ - const MyMoneyPayee payee(const QString& id) const; + const MyMoneyPayee payee(const TQString& id) const; /** * This method is used to retrieve the id to a corresponding * name of a payee/receiver. * An exception will be thrown upon error conditions. * - * @param payee QString reference to name of payee + * @param payee TQString reference to name of payee * * @return MyMoneyPayee reference to object of payee */ - const MyMoneyPayee payeeByName(const QString& payee) const; + const MyMoneyPayee payeeByName(const TQString& payee) const; /** * This method is used to modify an existing payee @@ -213,24 +213,24 @@ public: * This method returns a list of the payees * inside a MyMoneyStorage object * - * @return QValueList<MyMoneyPayee> containing the payee information + * @return TQValueList<MyMoneyPayee> containing the payee information */ - const QValueList<MyMoneyPayee> payeeList(void) const; + const TQValueList<MyMoneyPayee> payeeList(void) const; /** * This method is used to add one account as sub-ordinate to another - * (parent) account. The objects passed as arguments will be modified + * (tqparent) account. The objects passed as arguments will be modified * accordingly. * - * @param parent parent account the account should be added to + * @param tqparent tqparent account the account should be added to * @param account the account to be added */ - void addAccount(MyMoneyAccount& parent, MyMoneyAccount& account); + void addAccount(MyMoneyAccount& tqparent, MyMoneyAccount& account); /** * Adds an institution to the storage. A * respective institution-ID will be generated within this record. - * The ID is stored as QString in the object passed as argument. + * The ID is stored as TQString in the object passed as argument. * An exception will be thrown upon error conditions. * * @param institution The complete institution information in a @@ -241,7 +241,7 @@ public: /** * Adds a transaction to the file-global transaction pool. A respective * transaction-ID will be generated within this record. The ID is stored - * as QString in the transaction object. The accounts of the referenced splits + * as TQString in the transaction object. The accounts of the referenced splits * will be updated to have a reference to the transaction just added. * * @param transaction reference to the transaction @@ -286,14 +286,14 @@ public: void modifyTransaction(const MyMoneyTransaction& transaction); /** - * This method re-parents an existing account + * This method re-tqparents an existing account * * An exception will be thrown upon error conditions. * - * @param account MyMoneyAccount reference to account to be re-parented - * @param parent MyMoneyAccount reference to new parent account + * @param account MyMoneyAccount reference to account to be re-tqparented + * @param tqparent MyMoneyAccount reference to new tqparent account */ - void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent); + void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent); /** * This method is used to remove a transaction from the transaction @@ -328,20 +328,20 @@ public: * transaction pool through an id. In case of an invalid id, an * exception will be thrown. * - * @param id id of transaction as QString. + * @param id id of transaction as TQString. * @return reference to the requested transaction */ - const MyMoneyTransaction transaction(const QString& id) const; + const MyMoneyTransaction transaction(const TQString& id) const; /** * This method is used to extract a transaction from the file global * transaction pool through an index into an account. * - * @param account id of the account as QString + * @param account id of the account as TQString * @param idx number of transaction in this account * @return reference to MyMoneyTransaction object */ - const MyMoneyTransaction transaction(const QString& account, const int idx) const; + const MyMoneyTransaction transaction(const TQString& account, const int idx) const; /** * This method is used to determince, if the account with the @@ -350,7 +350,7 @@ public: * @param id id of the account to be checked for * @return true if account is referenced, false otherwise */ - bool hasActiveSplits(const QString& id) const; + bool hasActiveSplits(const TQString& id) const; /** * This method is used to return the actual balance of an account @@ -363,7 +363,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - const MyMoneyMoney balance(const QString& id, const QDate& date = QDate()) const; + const MyMoneyMoney balance(const TQString& id, const TQDate& date = TQDate()) const; /** * This method is used to return the actual balance of an account @@ -376,7 +376,7 @@ public: * @param date return balance for specific date * @return balance of the account as MyMoneyMoney object */ - const MyMoneyMoney totalBalance(const QString& id, const QDate& date = QDate()) const; + const MyMoneyMoney totalBalance(const TQString& id, const TQDate& date = TQDate()) const; /** * Returns the institution of a given ID @@ -385,7 +385,7 @@ public: * @return MyMoneyInstitution object filled with data. If the institution * could not be found, an exception will be thrown */ - const MyMoneyInstitution institution(const QString& id) const; + const MyMoneyInstitution institution(const TQString& id) const; /** * This method returns an indicator if the storage object has been @@ -407,18 +407,18 @@ public: * This method returns a list of the institutions * inside a MyMoneyFile object * - * @return QMap containing the institution information + * @return TQMap containing the institution information */ - const QValueList<MyMoneyInstitution> institutionList(void) const; + const TQValueList<MyMoneyInstitution> institutionList(void) const; /** * This method returns a list of accounts inside the storage object. * - * @param list reference to QValueList receiving the account objects + * @param list reference to TQValueList receiving the account objects * * @note The standard accounts will not be returned */ - void accountList(QValueList<MyMoneyAccount>& list) const; + void accountList(TQValueList<MyMoneyAccount>& list) const; /** * This method is used to pull a list of transactions from the file @@ -434,9 +434,9 @@ public: * @param list reference to list * @param filter MyMoneyTransactionFilter object with the match criteria * - * @return set of transactions in form of a QValueList<MyMoneyTransaction> + * @return set of transactions in form of a TQValueList<MyMoneyTransaction> */ - void transactionList(QValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; + void transactionList(TQValueList<MyMoneyTransaction>& list, MyMoneyTransactionFilter& filter) const; /** * This method is used to pull a list of transactions from the file @@ -452,35 +452,35 @@ public: * @param list reference to list * @param filter MyMoneyTransactionFilter object with the match criteria * - * @return set of transactions in form of a QValueList<QPair<MyMoneyTransaction,MyMoneySplit> > + * @return set of transactions in form of a TQValueList<TQPair<MyMoneyTransaction,MyMoneySplit> > */ - void transactionList(QValueList< QPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; + void transactionList(TQValueList< TQPair<MyMoneyTransaction, MyMoneySplit> >& list, MyMoneyTransactionFilter& filter) const; /** * Compatibility interface for the previous method. */ - const QValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; + const TQValueList<MyMoneyTransaction> transactionList(MyMoneyTransactionFilter& filter) const; /** * This method returns whether a given transaction is already in memory, to avoid * reloading it from the database */ - bool isDuplicateTransaction(const QString& id) const { return m_transactionKeys.contains(id); } + bool isDuplicateTransaction(const TQString& id) const { return m_transactionKeys.tqcontains(id); } /** * This method returns the number of transactions currently known to file * in the range 0..MAXUINT * - * @param account QString reference to account id. If account is empty + * @param account TQString reference to account id. If account is empty + all transactions (the journal) will be counted. If account * is not empty it returns the number of transactions * that have splits in this account. * * @return number of transactions in journal/account */ - unsigned int transactionCount(const QString& account = QString()) const; + unsigned int transactionCount(const TQString& account = TQString()) const; - const QMap<QString, unsigned long> transactionCountMap(void) const; + const TQMap<TQString, unsigned long> transactionCountMap(void) const; /** * This method returns the number of institutions currently known to file @@ -526,15 +526,15 @@ public: * This method is used to return the standard equity account * @return MyMoneyAccount equity account(group) */ - const MyMoneyAccount equity(void) const { return account(STD_ACC_EQUITY); }; + const MyMoneyAccount equity(void) const { return account(STD_ACC_ETQUITY); }; - virtual void loadAccounts(const QMap<QString, MyMoneyAccount>& acc); - virtual void loadTransactions(const QMap<QString, MyMoneyTransaction>& map); - virtual void loadInstitutions(const QMap<QString, MyMoneyInstitution>& map); - virtual void loadPayees(const QMap<QString, MyMoneyPayee>& map); - virtual void loadSchedules(const QMap<QString, MyMoneySchedule>& map); - virtual void loadSecurities(const QMap<QString, MyMoneySecurity>& map); - virtual void loadCurrencies(const QMap<QString, MyMoneySecurity>& map); + virtual void loadAccounts(const TQMap<TQString, MyMoneyAccount>& acc); + virtual void loadTransactions(const TQMap<TQString, MyMoneyTransaction>& map); + virtual void loadInstitutions(const TQMap<TQString, MyMoneyInstitution>& map); + virtual void loadPayees(const TQMap<TQString, MyMoneyPayee>& map); + virtual void loadSchedules(const TQMap<TQString, MyMoneySchedule>& map); + virtual void loadSecurities(const TQMap<TQString, MyMoneySecurity>& map); + virtual void loadCurrencies(const TQMap<TQString, MyMoneySecurity>& map); virtual void loadPrices(const MyMoneyPriceList& list); virtual void loadAccountId(const unsigned long id); @@ -560,34 +560,34 @@ public: * This method is used to extract a value from * KeyValueContainer. For details see MyMoneyKeyValueContainer::value(). * - * @param key const reference to QString containing the key - * @return QString containing the value + * @param key const reference to TQString containing the key + * @return TQString containing the value */ - const QString value(const QString& key) const; + const TQString value(const TQString& key) const; /** * This method is used to set a value in the * KeyValueContainer. For details see MyMoneyKeyValueContainer::setValue(). * - * @param key const reference to QString containing the key - * @param val const reference to QString containing the value + * @param key const reference to TQString containing the key + * @param val const reference to TQString containing the value */ - void setValue(const QString& key, const QString& val); + void setValue(const TQString& key, const TQString& val); /** * This method is used to delete a key-value-pair from the * KeyValueContainer identified by the parameter * @p key. For details see MyMoneyKeyValueContainer::deletePair(). * - * @param key const reference to QString containing the key + * @param key const reference to TQString containing the key */ - void deletePair(const QString& key); + void deletePair(const TQString& key); // documented in IMyMoneySerialize base class - const QMap<QString, QString> pairs(void) const; + const TQMap<TQString, TQString> pairs(void) const; // documented in IMyMoneySerialize base class - void setPairs(const QMap<QString, QString>& list); + void setPairs(const TQMap<TQString, TQString>& list); /** * This method is used to add a scheduled transaction to the engine. @@ -627,10 +627,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - const MyMoneySchedule schedule(const QString& id) const; + const MyMoneySchedule schedule(const TQString& id) const; /** * This method is used to create a new security object. The ID will be created @@ -669,17 +669,17 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - const MyMoneySecurity security(const QString& id) const; + const MyMoneySecurity security(const TQString& id) const; /** * This method returns a list of security objects that the engine has * knowledge of. */ - const QValueList<MyMoneySecurity> securityList(void) const; + const TQValueList<MyMoneySecurity> securityList(void) const; /** * This method is used to add a new currency object to the engine. @@ -718,10 +718,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneySchedule object + * @param id TQString containing the id of the MyMoneySchedule object * @return MyMoneySchedule object */ - const MyMoneySecurity currency(const QString& id) const; + const MyMoneySecurity currency(const TQString& id) const; /** * This method is used to retrieve the list of all currencies @@ -729,9 +729,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyCurrency objects. + * @return TQValueList of all MyMoneyCurrency objects. */ - const QValueList<MyMoneySecurity> currencyList(void) const; + const TQValueList<MyMoneySecurity> currencyList(void) const; /** * This method is used to extract a list of scheduled transactions @@ -739,7 +739,7 @@ public: * * @param accountId only search for scheduled transactions that reference * accound @p accountId. If accountId is the empty string, - * this filter is off. Default is @p QString(). + * this filter is off. Default is @p TQString(). * @param type only schedules of type @p type are searched for. * See MyMoneySchedule::typeE for details. * Default is MyMoneySchedule::TYPE_ANY @@ -751,27 +751,27 @@ public: * See MyMoneySchedule::paymentTypeE for details. * Default is MyMoneySchedule::STYPE_ANY * @param startDate only schedules with payment dates after @p startDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param endDate only schedules with payment dates ending prior to @p endDate - * are searched for. Default is all dates (QDate()). + * are searched for. Default is all dates (TQDate()). * @param overdue if true, only those schedules that are overdue are * searched for. Default is false (all schedules will be returned). * - * @return const QValueList<MyMoneySchedule> list of schedule objects. + * @return const TQValueList<MyMoneySchedule> list of schedule objects. */ - const QValueList<MyMoneySchedule> scheduleList(const QString& accountId = QString(), + const TQValueList<MyMoneySchedule> scheduleList(const TQString& accountId = TQString(), const MyMoneySchedule::typeE type = MyMoneySchedule::TYPE_ANY, const MyMoneySchedule::occurenceE occurence = MyMoneySchedule::OCCUR_ANY, const MyMoneySchedule::paymentTypeE paymentType = MyMoneySchedule::STYPE_ANY, - const QDate& startDate = QDate(), - const QDate& endDate = QDate(), + const TQDate& startDate = TQDate(), + const TQDate& endDate = TQDate(), const bool overdue = false) const; - const QValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, + const TQValueList<MyMoneySchedule> scheduleListEx( int scheduleTypes, int scheduleOcurrences, int schedulePaymentTypes, - QDate startDate, - const QStringList& accounts=QStringList()) const; + TQDate startDate, + const TQStringList& accounts=TQStringList()) const; /** * This method is used to retrieve the list of all reports @@ -779,9 +779,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyReport objects. + * @return TQValueList of all MyMoneyReport objects. */ - const QValueList<MyMoneyReport> reportList( void ) const; + const TQValueList<MyMoneyReport> reportList( void ) const; /** * This method is used to add a new report to the engine. @@ -803,7 +803,7 @@ public: * * @param reports reference to the map of MyMoneyReport objects */ - void loadReports( const QMap<QString, MyMoneyReport>& reports ); + void loadReports( const TQMap<TQString, MyMoneyReport>& reports ); /** * This method is used to modify an existing MyMoneyReport @@ -829,10 +829,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyReport object + * @param id TQString containing the id of the MyMoneyReport object * @return MyMoneyReport object */ - const MyMoneyReport report( const QString& id ) const; + const MyMoneyReport report( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyReport object @@ -850,9 +850,9 @@ public: * * An exception will be thrown upon erronous situations. * - * @return QValueList of all MyMoneyBudget objects. + * @return TQValueList of all MyMoneyBudget objects. */ - const QValueList<MyMoneyBudget> budgetList( void ) const; + const TQValueList<MyMoneyBudget> budgetList( void ) const; /** * This method is used to add a new budget to the engine. @@ -874,18 +874,18 @@ public: * * @param budgets reference to the map of MyMoneyBudget object */ - void loadBudgets(const QMap<QString, MyMoneyBudget>& budgets); + void loadBudgets(const TQMap<TQString, MyMoneyBudget>& budgets); /** * This method is used to retrieve the id to a corresponding * name of a budget * An exception will be thrown upon error conditions. * - * @param budget QString reference to name of budget + * @param budget TQString reference to name of budget * * @return MyMoneyBudget reference to object of budget */ - const MyMoneyBudget budgetByName(const QString& budget) const; + const MyMoneyBudget budgetByName(const TQString& budget) const; /** * This method is used to modify an existing MyMoneyBudget @@ -911,10 +911,10 @@ public: * * An exception will be thrown upon erronous situations. * - * @param id QString containing the id of the MyMoneyBudget object + * @param id TQString containing the id of the MyMoneyBudget object * @return MyMoneyBudget object */ - MyMoneyBudget budget( const QString& id ) const; + MyMoneyBudget budget( const TQString& id ) const; /** * This method is used to remove an existing MyMoneyBudget object @@ -939,9 +939,9 @@ public: /** * This method retrieves a price from the price list. - * If @p date is inValid, QDate::currentDate() is assumed. + * If @p date is inValid, TQDate::tqcurrentDate() is assumed. */ - const MyMoneyPrice price(const QString& fromId, const QString& toId, const QDate& date, const bool exactDate) const; + const MyMoneyPrice price(const TQString& fromId, const TQString& toId, const TQDate& date, const bool exactDate) const; /** * This method returns a list of all price entries. @@ -958,7 +958,7 @@ public: * by another engine object. * * @param obj const reference to object to be checked - * @param skipCheck QBitArray with ReferenceCheckBits set for which + * @param skipCheck TQBitArray with ReferenceCheckBits set for which * the check should be skipped * * @retval false @p object is not referenced @@ -977,7 +977,7 @@ public: virtual void rollbackTransaction(void); protected: - void removeReferences(const QString& id); + void removeReferences(const TQString& id); private: @@ -997,12 +997,12 @@ private: void touch(void); /** - * This method is used to invalidate the cached balance for - * the selected account and all it's parents. + * This method is used to tqinvalidate the cached balance for + * the selected account and all it's tqparents. * * @param id id of the account in question */ - void invalidateBalanceCache(const QString& id); + void tqinvalidateBalanceCache(const TQString& id); /** * This member variable keeps the User information. @@ -1065,50 +1065,50 @@ private: * The member variable m_institutionList is the container for the * institutions known within this file. */ - MyMoneyMap<QString, MyMoneyInstitution> m_institutionList; + MyMoneyMap<TQString, MyMoneyInstitution> m_institutionList; /** * The member variable m_accountList is the container for the accounts * known within this file. */ - MyMoneyMap<QString, MyMoneyAccount> m_accountList; + MyMoneyMap<TQString, MyMoneyAccount> m_accountList; /** * The member variable m_balanceCache is the container for the * accounts actual balance */ - mutable QMap<QString, MyMoneyBalanceCacheItem> m_balanceCache; + mutable TQMap<TQString, MyMoneyBalanceCacheItem> m_balanceCache; /** * This member keeps the date for which the m_balanceCache member * is valid. In case the whole cache is invalid it is set to - * QDate(). + * TQDate(). */ - mutable QDate m_balanceCacheDate; + mutable TQDate m_balanceCacheDate; /** * The member variable m_transactionList is the container for all * transactions within this file. * @see m_transactionKeys */ - MyMoneyMap<QString, MyMoneyTransaction> m_transactionList; + MyMoneyMap<TQString, MyMoneyTransaction> m_transactionList; /** * The member variable m_transactionKeys is used to convert * transaction id's into the corresponding key used in m_transactionList. * @see m_transactionList; */ - MyMoneyMap<QString, QString> m_transactionKeys; + MyMoneyMap<TQString, TQString> m_transactionKeys; /** * A list containing all the payees that have been used */ - MyMoneyMap<QString, MyMoneyPayee> m_payeeList; + MyMoneyMap<TQString, MyMoneyPayee> m_payeeList; /** * A list containing all the scheduled transactions */ - MyMoneyMap<QString, MyMoneySchedule> m_scheduleList; + MyMoneyMap<TQString, MyMoneySchedule> m_scheduleList; /** * A list containing all the security information objects. Each object @@ -1117,19 +1117,19 @@ private: * to determine the cost basis for sales, as well as the source of * information for reports in a security account. */ - MyMoneyMap<QString, MyMoneySecurity> m_securitiesList; + MyMoneyMap<TQString, MyMoneySecurity> m_securitiesList; /** * A list containing all the currency information objects. */ - MyMoneyMap<QString, MyMoneySecurity> m_currencyList; + MyMoneyMap<TQString, MyMoneySecurity> m_currencyList; - MyMoneyMap<QString, MyMoneyReport> m_reportList; + MyMoneyMap<TQString, MyMoneyReport> m_reportList; /** * A list containing all the budget information objects. */ - MyMoneyMap<QString, MyMoneyBudget> m_budgetList; + MyMoneyMap<TQString, MyMoneyBudget> m_budgetList; MyMoneyMap<MyMoneySecurityPair, MyMoneyPriceEntries> m_priceList; @@ -1143,13 +1143,13 @@ private: * object. It is set during the constructor and can only be modified using * the stream read operator. */ - QDate m_creationDate; + TQDate m_creationDate; /** * This member variable keeps the date of the last modification of * the MyMoneySeqAccessMgr object. */ - QDate m_lastModificationDate; + TQDate m_lastModificationDate; /** * This member variable contains the current fix level of application @@ -1165,58 +1165,58 @@ private: * This method is used to get the next valid ID for a institution * @return id for a institution */ - QString nextInstitutionID(void); + TQString nextInstitutionID(void); /** * This method is used to get the next valid ID for an account * @return id for an account */ - QString nextAccountID(void); + TQString nextAccountID(void); /** * This method is used to get the next valid ID for a transaction * @return id for a transaction */ - QString nextTransactionID(void); + TQString nextTransactionID(void); /** * This method is used to get the next valid ID for a payee * @return id for a payee */ - QString nextPayeeID(void); + TQString nextPayeeID(void); /** * This method is used to get the next valid ID for a scheduled transaction * @return id for a scheduled transaction */ - QString nextScheduleID(void); + TQString nextScheduleID(void); /** * This method is used to get the next valid ID for an security object. * @return id for an security object */ - QString nextSecurityID(void); + TQString nextSecurityID(void); - QString nextReportID(void); + TQString nextReportID(void); /** * This method is used to get the next valid ID for a budget object. * @return id for an budget object */ - QString nextBudgetID(void); + TQString nextBudgetID(void); /** - * This method re-parents an existing account + * This method re-tqparents an existing account * * An exception will be thrown upon error conditions. * - * @param account MyMoneyAccount reference to account to be re-parented - * @param parent MyMoneyAccount reference to new parent account + * @param account MyMoneyAccount reference to account to be re-tqparented + * @param tqparent MyMoneyAccount reference to new tqparent account * @param sendNotification if true, notifications with the ids * of all modified objects are send */ - void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& parent, const bool sendNotification); + void reparentAccount(MyMoneyAccount &account, MyMoneyAccount& tqparent, const bool sendNotification); /** * This method will close a database and log the use roff */ diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp index 09bf791..9decdce 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.cpp @@ -63,7 +63,7 @@ void MyMoneySeqAccessMgrTest::testEmptyConstructor() CPPUNIT_ASSERT(m->m_scheduleList.count() == 0); CPPUNIT_ASSERT(m->m_dirty == false); - CPPUNIT_ASSERT(m->m_creationDate == QDate::currentDate()); + CPPUNIT_ASSERT(m->m_creationDate == TQDate::tqcurrentDate()); CPPUNIT_ASSERT(m->liability().name() == "Liability"); CPPUNIT_ASSERT(m->asset().name() == "Asset"); @@ -354,7 +354,7 @@ void MyMoneySeqAccessMgrTest::testModifyAccount() { m->commitTransaction(); m->startTransaction(); MyMoneyAccount b = m->account("A000001"); - CPPUNIT_ASSERT(b.parentAccountId() == a.parentAccountId()); + CPPUNIT_ASSERT(b.tqparentAccountId() == a.tqparentAccountId()); CPPUNIT_ASSERT(b.name() == "New account name"); CPPUNIT_ASSERT(m->dirty() == true); } catch (MyMoneyException *e) { @@ -383,7 +383,7 @@ void MyMoneySeqAccessMgrTest::testModifyAccount() { delete e; } - // use different parent + // use different tqparent a.setParentAccountId("A000002"); try { m->modifyAccount(c); @@ -422,7 +422,7 @@ void MyMoneySeqAccessMgrTest::testModifyInstitution() { } } -void MyMoneySeqAccessMgrTest::testReparentAccount() { +void MyMoneySeqAccessMgrTest::testRetqparentAccount() { // this one adds some accounts to the database MyMoneyAccount ex1; ex1.setAccountType(MyMoneyAccount::Expense); @@ -460,27 +460,27 @@ void MyMoneySeqAccessMgrTest::testReparentAccount() { CPPUNIT_ASSERT(in.id() == "A000005"); CPPUNIT_ASSERT(ch.id() == "A000006"); - MyMoneyAccount parent = m->expense(); + MyMoneyAccount tqparent = m->expense(); - m->addAccount(parent, ex1); + m->addAccount(tqparent, ex1); m->addAccount(ex1, ex2); - m->addAccount(parent, ex3); - m->addAccount(parent, ex4); + m->addAccount(tqparent, ex3); + m->addAccount(tqparent, ex4); - parent = m->income(); - m->addAccount(parent, in); + tqparent = m->income(); + m->addAccount(tqparent, in); - parent = m->asset(); - m->addAccount(parent, ch); + tqparent = m->asset(); + m->addAccount(tqparent, ch); CPPUNIT_ASSERT(m->expense().accountCount() == 3); CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 1); - CPPUNIT_ASSERT(ex3.parentAccountId() == STD_ACC_EXPENSE); + CPPUNIT_ASSERT(ex3.tqparentAccountId() == STD_ACC_EXPENSE); m->reparentAccount(ex3, ex1); CPPUNIT_ASSERT(m->expense().accountCount() == 2); CPPUNIT_ASSERT(m->account(ex1.id()).accountCount() == 2); - CPPUNIT_ASSERT(ex3.parentAccountId() == ex1.id()); + CPPUNIT_ASSERT(ex3.tqparentAccountId() == ex1.id()); } catch (MyMoneyException *e) { std::cout << std::endl << e->what() << std::endl; delete e; @@ -489,7 +489,7 @@ void MyMoneySeqAccessMgrTest::testReparentAccount() { } void MyMoneySeqAccessMgrTest::testAddTransactions() { - testReparentAccount(); + testRetqparentAccount(); MyMoneyAccount ch; MyMoneyTransaction t1, t2; @@ -503,14 +503,14 @@ void MyMoneySeqAccessMgrTest::testAddTransactions() { CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000005"); // Salary s.setShares(-100000); s.setValue(-100000); CPPUNIT_ASSERT(s.id().isEmpty()); t1.addSplit(s); - t1.setPostDate(QDate(2002,5,10)); + t1.setPostDate(TQDate(2002,5,10)); } catch (MyMoneyException *e) { unexpectedException(e); } @@ -530,35 +530,35 @@ void MyMoneySeqAccessMgrTest::testAddTransactions() { try { // I spent some money, not so great - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000004"); // Grosseries s.setShares(10000); s.setValue(10000); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000002"); // 16% sales tax s.setShares(1200); s.setValue(1200); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000003"); // 7% sales tax s.setShares(400); s.setValue(400); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - s.setId(QString()); // enable re-usage of split variable + s.setId(TQString()); // enable re-usage of split variable s.setAccountId("A000006"); // Checkings account s.setShares(-11600); s.setValue(-11600); CPPUNIT_ASSERT(s.id().isEmpty()); t2.addSplit(s); - t2.setPostDate(QDate(2002,5,9)); + t2.setPostDate(TQDate(2002,5,9)); } catch (MyMoneyException *e) { unexpectedException(e); } @@ -572,8 +572,8 @@ void MyMoneySeqAccessMgrTest::testAddTransactions() { CPPUNIT_ASSERT(t2.splitCount() == 4); CPPUNIT_ASSERT(m->transactionCount() == 2); - QMap<QString, QString>::ConstIterator it_k; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, TQString>::ConstIterator it_k; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; it_k = m->m_transactionKeys.begin(); it_t = m->m_transactionList.begin(); @@ -591,12 +591,12 @@ void MyMoneySeqAccessMgrTest::testAddTransactions() { ch = m->account("A000006"); // check that the account's transaction list is updated - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.size() == 2); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; it = list.begin(); CPPUNIT_ASSERT((*it).id() == "T000000000000000002"); ++it; @@ -607,7 +607,7 @@ void MyMoneySeqAccessMgrTest::testAddTransactions() { /* removed with MyMoneyAccount::Transaction CPPUNIT_ASSERT(ch.transactionCount() == 2); - QValueList<MyMoneyAccount::Transaction>::ConstIterator it_l; + TQValueList<MyMoneyAccount::Transaction>::ConstIterator it_l; it_l = ch.transactionList().begin(); CPPUNIT_ASSERT((*it_l).transactionID() == "T000000000000000002"); CPPUNIT_ASSERT((*it_l).balance() == -11600); @@ -642,9 +642,9 @@ void MyMoneySeqAccessMgrTest::testBalance() { CPPUNIT_ASSERT(m->balance("A000002") == MyMoneyMoney(1200)); CPPUNIT_ASSERT(m->balance("A000003") == MyMoneyMoney(400)); CPPUNIT_ASSERT(m->totalBalance("A000001") == MyMoneyMoney(1600)); - CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,9)) == MyMoneyMoney(-11600)); - CPPUNIT_ASSERT(m->balance("A000005", QDate(2002,5,10)) == MyMoneyMoney(-100000)); - CPPUNIT_ASSERT(m->balance("A000006", QDate(2002,5,10)) == MyMoneyMoney(88400)); + CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,9)) == MyMoneyMoney(-11600)); + CPPUNIT_ASSERT(m->balance("A000005", TQDate(2002,5,10)) == MyMoneyMoney(-100000)); + CPPUNIT_ASSERT(m->balance("A000006", TQDate(2002,5,10)) == MyMoneyMoney(88400)); } void MyMoneySeqAccessMgrTest::testModifyTransaction() { @@ -682,15 +682,15 @@ void MyMoneySeqAccessMgrTest::testModifyTransaction() { } // now modify the date - t.setPostDate(QDate(2002,5,11)); + t.setPostDate(TQDate(2002,5,11)); try { m->modifyTransaction(t); CPPUNIT_ASSERT(m->balance("A000004") == MyMoneyMoney(11000)); CPPUNIT_ASSERT(m->balance("A000006") == MyMoneyMoney(100000-12600)); CPPUNIT_ASSERT(m->totalBalance("A000001") == MyMoneyMoney(1600)); - QMap<QString, QString>::ConstIterator it_k; - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, TQString>::ConstIterator it_k; + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; it_k = m->m_transactionKeys.begin(); it_t = m->m_transactionList.begin(); CPPUNIT_ASSERT((*it_k) == "2002-05-10-T000000000000000001"); @@ -707,12 +707,12 @@ void MyMoneySeqAccessMgrTest::testModifyTransaction() { ch = m->account("A000006"); // check that the account's transaction list is updated - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.size() == 2); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; it = list.begin(); CPPUNIT_ASSERT((*it).id() == "T000000000000000001"); ++it; @@ -723,7 +723,7 @@ void MyMoneySeqAccessMgrTest::testModifyTransaction() { /* removed with MyMoneyAccount::Transaction // CPPUNIT_ASSERT(ch.transactionCount() == 2); - QValueList<MyMoneyAccount::Transaction>::ConstIterator it_l; + TQValueList<MyMoneyAccount::Transaction>::ConstIterator it_l; it_l = ch.transactionList().begin(); CPPUNIT_ASSERT((*it_l).transactionID() == "T000000000000000001"); CPPUNIT_ASSERT((*it_l).balance() == 100000); @@ -792,7 +792,7 @@ void MyMoneySeqAccessMgrTest::testRemoveUnusedAccount() { CPPUNIT_ASSERT(i.accountCount() == 0); CPPUNIT_ASSERT(m->accountCount() == 7); - a.setInstitutionId(QString()); + a.setInstitutionId(TQString()); m->modifyAccount(a); m->removeAccount(a); m->commitTransaction(); @@ -822,7 +822,7 @@ void MyMoneySeqAccessMgrTest::testRemoveUsedAccount() { void MyMoneySeqAccessMgrTest::testRemoveInstitution() { testModifyInstitution(); - testReparentAccount(); + testRetqparentAccount(); MyMoneyInstitution i; MyMoneyAccount a; @@ -843,7 +843,7 @@ void MyMoneySeqAccessMgrTest::testRemoveInstitution() { // now remove the institution and see if the account survived ;-) try { m->removeInstitution(i); - a.setInstitutionId(QString()); + a.setInstitutionId(TQString()); m->modifyAccount(a); m->commitTransaction(); m->startTransaction(); @@ -881,7 +881,7 @@ void MyMoneySeqAccessMgrTest::testRemoveTransaction() { void MyMoneySeqAccessMgrTest::testTransactionList() { testAddTransactions(); - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; MyMoneyTransactionFilter filter("A000006"); list = m->transactionList(filter); CPPUNIT_ASSERT(list.count() == 2); @@ -889,7 +889,7 @@ void MyMoneySeqAccessMgrTest::testTransactionList() { CPPUNIT_ASSERT((*(list.at(1))).id() == "T000000000000000001"); filter.clear(); - filter.addAccount(QString("A000003")); + filter.addAccount(TQString("A000003")); list = m->transactionList(filter); CPPUNIT_ASSERT(list.count() == 1); CPPUNIT_ASSERT((*(list.at(0))).id() == "T000000000000000002"); @@ -1091,7 +1091,7 @@ void MyMoneySeqAccessMgrTest::testPayeeName() { testAddPayee(); MyMoneyPayee p; - QString name("THB"); + TQString name("THB"); // OK case try { @@ -1193,11 +1193,11 @@ void MyMoneySeqAccessMgrTest::testAddSchedule() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_MANUALDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), true, false); - t1.setPostDate(QDate(2003,7,10)); + t1.setPostDate(TQDate(2003,7,10)); schedule.setTransaction(t1); m->addSchedule(schedule); @@ -1215,8 +1215,8 @@ void MyMoneySeqAccessMgrTest::testAddSchedule() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_MANUALDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), true, false); m->addSchedule(schedule); @@ -1302,9 +1302,9 @@ void MyMoneySeqAccessMgrTest::testRemoveSchedule() { } void MyMoneySeqAccessMgrTest::testScheduleList() { - QDate testDate = QDate::currentDate(); - QDate notOverdue = testDate.addDays(2); - QDate overdue = testDate.addDays(-2); + TQDate testDate = TQDate::tqcurrentDate(); + TQDate notOverdue = testDate.addDays(2); + TQDate overdue = testDate.addDays(-2); MyMoneyTransaction t1; @@ -1317,8 +1317,8 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_ONCE, 1, MyMoneySchedule::STYPE_DIRECTDEBIT, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t1.setPostDate(notOverdue); @@ -1335,8 +1335,8 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { MyMoneySchedule::TYPE_DEPOSIT, MyMoneySchedule::OCCUR_DAILY, 1, MyMoneySchedule::STYPE_DIRECTDEPOSIT, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t2.setPostDate(notOverdue.addDays(1)); @@ -1353,8 +1353,8 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { MyMoneySchedule::TYPE_TRANSFER, MyMoneySchedule::OCCUR_WEEKLY, 1, MyMoneySchedule::STYPE_OTHER, - QDate(), - QDate(), + TQDate(), + TQDate(), false, false); t3.setPostDate(notOverdue.addDays(2)); @@ -1370,8 +1370,8 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { MyMoneySchedule schedule4("Schedule 4", MyMoneySchedule::TYPE_BILL, MyMoneySchedule::OCCUR_WEEKLY, 1, - MyMoneySchedule::STYPE_WRITECHEQUE, - QDate(), + MyMoneySchedule::STYPE_WRITECHETQUE, + TQDate(), notOverdue.addDays(31), false, false); @@ -1389,7 +1389,7 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { CPPUNIT_FAIL("Unexpected exception"); } - QValueList<MyMoneySchedule> list; + TQValueList<MyMoneySchedule> list; // no filter list = m->scheduleList(); @@ -1436,7 +1436,7 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { list = m->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), + TQDate(), notOverdue.addDays(1)); CPPUNIT_ASSERT(list.count() == 3); CPPUNIT_ASSERT(list[0].name() == "Schedule 1"); @@ -1457,8 +1457,8 @@ void MyMoneySeqAccessMgrTest::testScheduleList() { list = m->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), - QDate(), + TQDate(), + TQDate(), true); CPPUNIT_ASSERT(list.count() == 1); CPPUNIT_ASSERT(list[0].name() == "Schedule 4"); @@ -1606,7 +1606,7 @@ void MyMoneySeqAccessMgrTest::testCurrencyList() void MyMoneySeqAccessMgrTest::testAccountList() { - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; m->accountList(accounts); CPPUNIT_ASSERT(accounts.count() == 0); testAddNewAccount(); @@ -1628,7 +1628,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() m->rollbackTransaction(); // account loader - QMap<QString, MyMoneyAccount> amap; + TQMap<TQString, MyMoneyAccount> amap; MyMoneyAccount acc("A0000176", MyMoneyAccount()); amap[acc.id()] = acc; m->loadAccounts(amap); @@ -1637,7 +1637,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextAccountID == 176); // transaction loader - QMap<QString, MyMoneyTransaction> tmap; + TQMap<TQString, MyMoneyTransaction> tmap; MyMoneyTransaction t("T000000108", MyMoneyTransaction()); tmap[t.id()] = t; m->loadTransactions(tmap); @@ -1646,7 +1646,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextTransactionID == 108); // institution loader - QMap<QString, MyMoneyInstitution> imap; + TQMap<TQString, MyMoneyInstitution> imap; MyMoneyInstitution inst("I000028", MyMoneyInstitution()); imap[inst.id()] = inst; m->loadInstitutions(imap); @@ -1655,7 +1655,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextInstitutionID == 28); // payee loader - QMap<QString, MyMoneyPayee> pmap; + TQMap<TQString, MyMoneyPayee> pmap; MyMoneyPayee p("P1234", MyMoneyPayee()); pmap[p.id()] = p; m->loadPayees(pmap); @@ -1664,7 +1664,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextPayeeID == 1234); // security loader - QMap<QString, MyMoneySecurity> smap; + TQMap<TQString, MyMoneySecurity> smap; MyMoneySecurity s("S54321", MyMoneySecurity()); smap[s.id()] = s; m->loadSecurities(smap); @@ -1673,7 +1673,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextSecurityID == 54321); // schedule loader - QMap<QString, MyMoneySchedule> schmap; + TQMap<TQString, MyMoneySchedule> schmap; MyMoneySchedule sch("SCH6789", MyMoneySchedule()); schmap[sch.id()] = sch; m->loadSchedules(schmap); @@ -1682,7 +1682,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextScheduleID == 6789); // report loader - QMap<QString, MyMoneyReport> rmap; + TQMap<TQString, MyMoneyReport> rmap; MyMoneyReport r("R1298", MyMoneyReport()); rmap[r.id()] = r; m->loadReports(rmap); @@ -1691,7 +1691,7 @@ void MyMoneySeqAccessMgrTest::testLoaderFunctions() CPPUNIT_ASSERT(m->m_nextReportID == 1298); // budget loader - QMap<QString, MyMoneyBudget> bmap; + TQMap<TQString, MyMoneyBudget> bmap; MyMoneyBudget b("B89765", MyMoneyBudget()); bmap[b.id()] = b; m->loadBudgets(bmap); diff --git a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.h b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.h index b9fa763..57f1cd6 100644 --- a/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.h +++ b/kmymoney2/mymoney/storage/mymoneyseqaccessmgrtest.h @@ -14,8 +14,8 @@ * * ***************************************************************************/ -#ifndef __MYMONEYSEQACCESSMGRTEST_H__ -#define __MYMONEYSEQACCESSMGRTEST_H__ +#ifndef __MYMONEYSETQACCESSMGRTEST_H__ +#define __MYMONEYSETQACCESSMGRTEST_H__ #include <cppunit/TestCaller.h> #include <cppunit/TestCase.h> @@ -38,7 +38,7 @@ class MyMoneySeqAccessMgrTest : public CppUnit::TestFixture { CPPUNIT_TEST(testIsStandardAccount); CPPUNIT_TEST(testNewAccount); CPPUNIT_TEST(testAddNewAccount); - CPPUNIT_TEST(testReparentAccount); + CPPUNIT_TEST(testRetqparentAccount); CPPUNIT_TEST(testAddInstitution); CPPUNIT_TEST(testInstitution); CPPUNIT_TEST(testAccount2Institution); @@ -94,7 +94,7 @@ public: void testAccount2Institution(); void testModifyAccount(); void testModifyInstitution(); - void testReparentAccount(); + void testRetqparentAccount(); void testAddTransactions(); void testTransactionCount(); void testBalance(); diff --git a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp index 31f051e..bb0ab60 100644 --- a/kmymoney2/mymoney/storage/mymoneystorageanon.cpp +++ b/kmymoney2/mymoney/storage/mymoneystorageanon.cpp @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qdom.h> -#include <qmap.h> +#include <tqfile.h> +#include <tqdom.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,8 +42,8 @@ #include "../mymoneyreport.h" #include "../mymoneyinstitution.h" -QStringList MyMoneyStorageANON::zKvpNoModify = QStringList::split(",","kmm-baseCurrency,PreferredAccount,Tax,fixed-interest,interest-calculation,payee,schedule,term,kmm-online-source,kmm-brokerage-account,lastStatementDate,kmm-sort-reconcile,kmm-sort-std,kmm-iconpos,mm-closed,payee,schedule,term,lastImportedTransactionDate,VatAccount,VatRate,kmm-matched-tx,Imported"); -QStringList MyMoneyStorageANON::zKvpXNumber = QStringList::split(",","final-payment,loan-amount,periodic-payment,lastStatementBalance"); +TQStringList MyMoneyStorageANON::zKvpNoModify = TQStringList::split(",","kmm-baseCurrency,PreferredAccount,Tax,fixed-interest,interest-calculation,payee,schedule,term,kmm-online-source,kmm-brokerage-account,lastStatementDate,kmm-sort-reconcile,kmm-sort-std,kmm-iconpos,mm-closed,payee,schedule,term,lastImportedTransactionDate,VatAccount,VatRate,kmm-matched-tx,Imported"); +TQStringList MyMoneyStorageANON::zKvpXNumber = TQStringList::split(",","final-payment,loan-amount,periodic-payment,lastStatementBalance"); MyMoneyStorageANON::MyMoneyStorageANON() : @@ -54,7 +54,7 @@ MyMoneyStorageANON::MyMoneyStorageANON() : int msec; do { - msec = QTime::currentTime().msec(); + msec = TQTime::currentTime().msec(); } while(msec == 0); m_factor = MyMoneyMoney(msec, 10).reduce(); } @@ -63,29 +63,29 @@ MyMoneyStorageANON::~MyMoneyStorageANON() { } -void MyMoneyStorageANON::readFile(QIODevice* , IMyMoneySerialize* ) +void MyMoneyStorageANON::readFile(TQIODevice* , IMyMoneySerialize* ) { throw new MYMONEYEXCEPTION("Cannot read a file through MyMoneyStorageANON!!"); } -void MyMoneyStorageANON::writeUserInformation(QDomElement& userInfo) +void MyMoneyStorageANON::writeUserInformation(TQDomElement& userInfo) { MyMoneyPayee user = m_storage->user(); - userInfo.setAttribute(QString("name"), hideString(user.name())); - userInfo.setAttribute(QString("email"), hideString(user.email())); + userInfo.setAttribute(TQString("name"), hideString(user.name())); + userInfo.setAttribute(TQString("email"), hideString(user.email())); - QDomElement address = m_doc->createElement("ADDRESS"); - address.setAttribute(QString("street"), hideString(user.address())); - address.setAttribute(QString("city"), hideString(user.city())); - address.setAttribute(QString("county"), hideString(user.state())); - address.setAttribute(QString("zipcode"), hideString(user.postcode())); - address.setAttribute(QString("telephone"), hideString(user.telephone())); + TQDomElement address = m_doc->createElement("ADDRESS"); + address.setAttribute(TQString("street"), hideString(user.address())); + address.setAttribute(TQString("city"), hideString(user.city())); + address.setAttribute(TQString("county"), hideString(user.state())); + address.setAttribute(TQString("zipcode"), hideString(user.postcode())); + address.setAttribute(TQString("telephone"), hideString(user.telephone())); userInfo.appendChild(address); } -void MyMoneyStorageANON::writeInstitution(QDomElement& institution, const MyMoneyInstitution& _i) +void MyMoneyStorageANON::writeInstitution(TQDomElement& institution, const MyMoneyInstitution& _i) { MyMoneyInstitution i(_i); @@ -103,7 +103,7 @@ void MyMoneyStorageANON::writeInstitution(QDomElement& institution, const MyMone } -void MyMoneyStorageANON::writePayee(QDomElement& payee, const MyMoneyPayee& _p) +void MyMoneyStorageANON::writePayee(TQDomElement& payee, const MyMoneyPayee& _p) { MyMoneyPayee p(_p); @@ -117,15 +117,15 @@ void MyMoneyStorageANON::writePayee(QDomElement& payee, const MyMoneyPayee& _p) p.setTelephone(hideString(p.telephone())); p.setNotes(hideString(p.notes())); bool ignoreCase; - QStringList keys; + TQStringList keys; MyMoneyPayee::payeeMatchType matchType = p.matchData(ignoreCase, keys); - QRegExp exp("[A-Za-z]"); - p.setMatchData(matchType, ignoreCase, QStringList::split(";", keys.join(";").replace(exp, "x"))); + TQRegExp exp("[A-Za-z]"); + p.setMatchData(matchType, ignoreCase, TQStringList::split(";", keys.join(";").tqreplace(exp, "x"))); MyMoneyStorageXML::writePayee(payee, p); } -void MyMoneyStorageANON::writeAccount(QDomElement& account, const MyMoneyAccount& _p) +void MyMoneyStorageANON::writeAccount(TQDomElement& account, const MyMoneyAccount& _p) { MyMoneyAccount p(_p); @@ -149,10 +149,10 @@ void MyMoneyStorageANON::fakeTransaction(MyMoneyTransaction& tx) tn.setBankID(hideString(tx.bankID())); // hide split data - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = tx.splits().begin(); it_s != tx.splits().end(); ++it_s) { MyMoneySplit s = (*it_s); - s.setMemo(QString("%1/%2").arg(tn.id()).arg(s.id())); + s.setMemo(TQString("%1/%2").tqarg(tn.id()).tqarg(s.id())); if(s.value() != MyMoneyMoney::autoCalc) { s.setValue((s.value() * m_factor)); @@ -175,14 +175,14 @@ void MyMoneyStorageANON::fakeTransaction(MyMoneyTransaction& tx) void MyMoneyStorageANON::fakeKeyValuePair(MyMoneyKeyValueContainer& kvp) { - QMap<QString, QString> pairs; - QMap<QString, QString>::const_iterator it; + TQMap<TQString, TQString> pairs; + TQMap<TQString, TQString>::const_iterator it; for(it = kvp.pairs().begin(); it != kvp.pairs().end(); ++it) { - if ( zKvpXNumber.contains( it.key() ) || it.key().left(3)=="ir-" ) + if ( zKvpXNumber.tqcontains( it.key() ) || it.key().left(3)=="ir-" ) pairs[it.key()] = hideNumber(MyMoneyMoney(it.data())).toString(); - else if ( zKvpNoModify.contains( it.key() ) ) + else if ( zKvpNoModify.tqcontains( it.key() ) ) pairs[it.key()] = it.data(); else pairs[it.key()] = hideString(it.data()); @@ -190,7 +190,7 @@ void MyMoneyStorageANON::fakeKeyValuePair(MyMoneyKeyValueContainer& kvp) kvp.setPairs(pairs); } -void MyMoneyStorageANON::writeTransaction(QDomElement& transactions, const MyMoneyTransaction& tx) +void MyMoneyStorageANON::writeTransaction(TQDomElement& transactions, const MyMoneyTransaction& tx) { MyMoneyTransaction tn = tx; @@ -199,7 +199,7 @@ void MyMoneyStorageANON::writeTransaction(QDomElement& transactions, const MyMon MyMoneyStorageXML::writeTransaction(transactions, tn); } -void MyMoneyStorageANON::writeSchedule(QDomElement& scheduledTx, const MyMoneySchedule& sx) +void MyMoneyStorageANON::writeSchedule(TQDomElement& scheduledTx, const MyMoneySchedule& sx) { MyMoneySchedule sn = sx; MyMoneyTransaction tn = sn.transaction(); @@ -212,7 +212,7 @@ void MyMoneyStorageANON::writeSchedule(QDomElement& scheduledTx, const MyMoneySc MyMoneyStorageXML::writeSchedule(scheduledTx, sn); } -void MyMoneyStorageANON::writeSecurity(QDomElement& securityElement, const MyMoneySecurity& security) +void MyMoneyStorageANON::writeSecurity(TQDomElement& securityElement, const MyMoneySecurity& security) { MyMoneySecurity s = security; s.setName(security.id()); @@ -221,9 +221,9 @@ void MyMoneyStorageANON::writeSecurity(QDomElement& securityElement, const MyMon MyMoneyStorageXML::writeSecurity(securityElement, s); } -QString MyMoneyStorageANON::hideString(const QString& _in) const +TQString MyMoneyStorageANON::hideString(const TQString& _in) const { - return QString(_in).fill('x'); + return TQString(_in).fill('x'); } MyMoneyMoney MyMoneyStorageANON::hideNumber(const MyMoneyMoney& _in) const @@ -257,8 +257,8 @@ void MyMoneyStorageANON::fakeBudget(MyMoneyBudget& bx) bn.setBudgetStart(bx.budgetStart()); bn = MyMoneyBudget(bx.id(), bn); - QValueList<MyMoneyBudget::AccountGroup> list = bx.getaccounts(); - QValueList<MyMoneyBudget::AccountGroup>::iterator it; + TQValueList<MyMoneyBudget::AccountGroup> list = bx.getaccounts(); + TQValueList<MyMoneyBudget::AccountGroup>::iterator it; for(it = list.begin(); it != list.end(); ++it) { // only add the account if there is a budget entered if(!(*it).balance().isZero()) { @@ -266,8 +266,8 @@ void MyMoneyStorageANON::fakeBudget(MyMoneyBudget& bx) account.setId((*it).id()); account.setBudgetLevel((*it).budgetLevel()); account.setBudgetSubaccounts((*it).budgetSubaccounts()); - QMap<QDate, MyMoneyBudget::PeriodGroup> plist = (*it).getPeriods(); - QMap<QDate, MyMoneyBudget::PeriodGroup>::const_iterator it_p; + TQMap<TQDate, MyMoneyBudget::PeriodGroup> plist = (*it).getPeriods(); + TQMap<TQDate, MyMoneyBudget::PeriodGroup>::const_iterator it_p; for(it_p = plist.begin(); it_p != plist.end(); ++it_p) { MyMoneyBudget::PeriodGroup pGroup; pGroup.setAmount((*it_p).amount() * m_factor ); @@ -281,7 +281,7 @@ void MyMoneyStorageANON::fakeBudget(MyMoneyBudget& bx) bx = bn; } -void MyMoneyStorageANON::writeBudget(QDomElement& budgets, const MyMoneyBudget& b) +void MyMoneyStorageANON::writeBudget(TQDomElement& budgets, const MyMoneyBudget& b) { MyMoneyBudget bn = b; diff --git a/kmymoney2/mymoney/storage/mymoneystorageanon.h b/kmymoney2/mymoney/storage/mymoneystorageanon.h index 4b7ab95..5919220 100644 --- a/kmymoney2/mymoney/storage/mymoneystorageanon.h +++ b/kmymoney2/mymoney/storage/mymoneystorageanon.h @@ -27,9 +27,9 @@ // ---------------------------------------------------------------------------- // QT Includes -// #include <qdom.h> -// #include <qdatastream.h> -// class QIODevice; +// #include <tqdom.h> +// #include <tqdatastream.h> +// class TQIODevice; // ---------------------------------------------------------------------------- // Project Includes @@ -70,38 +70,38 @@ public: virtual ~MyMoneyStorageANON(); protected: - void writeUserInformation(QDomElement& userInfo); + void writeUserInformation(TQDomElement& userInfo); - void writeInstitution(QDomElement& institutions, const MyMoneyInstitution& i); + void writeInstitution(TQDomElement& institutions, const MyMoneyInstitution& i); - void writePayee(QDomElement& payees, const MyMoneyPayee& p); + void writePayee(TQDomElement& payees, const MyMoneyPayee& p); - void writeAccount(QDomElement& accounts, const MyMoneyAccount& p); + void writeAccount(TQDomElement& accounts, const MyMoneyAccount& p); - void writeTransaction(QDomElement& transactions, const MyMoneyTransaction& tx); + void writeTransaction(TQDomElement& transactions, const MyMoneyTransaction& tx); - void writeSchedule(QDomElement& scheduledTx, const MyMoneySchedule& tx); + void writeSchedule(TQDomElement& scheduledTx, const MyMoneySchedule& tx); - void writeBudget(QDomElement& budgets, const MyMoneyBudget& b); + void writeBudget(TQDomElement& budgets, const MyMoneyBudget& b); - void readFile(QIODevice* s, IMyMoneySerialize* storage); + void readFile(TQIODevice* s, IMyMoneySerialize* storage); - void writeSecurity(QDomElement& securityElement, const MyMoneySecurity& security); + void writeSecurity(TQDomElement& securityElement, const MyMoneySecurity& security); - QDomElement findChildElement(const QString& name, const QDomElement& root); + TQDomElement findChildElement(const TQString& name, const TQDomElement& root); private: /** * The list of key-value pairs to not modify */ - static QStringList zKvpNoModify; + static TQStringList zKvpNoModify; /** * The list of key-value pairs which are numbers to be hidden */ - static QStringList zKvpXNumber; + static TQStringList zKvpXNumber; - QString hideString(const QString&) const; + TQString hideString(const TQString&) const; MyMoneyMoney hideNumber(const MyMoneyMoney&) const; void fakeTransaction(MyMoneyTransaction& tn); void fakeBudget(MyMoneyBudget& bn); diff --git a/kmymoney2/mymoney/storage/mymoneystoragedump.cpp b/kmymoney2/mymoney/storage/mymoneystoragedump.cpp index e0d0083..77fa395 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragedump.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragedump.cpp @@ -23,10 +23,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // Project Includes @@ -45,14 +45,14 @@ MyMoneyStorageDump::~MyMoneyStorageDump() { } -void MyMoneyStorageDump::readStream(QDataStream& /* s */, IMyMoneySerialize* /* storage */) +void MyMoneyStorageDump::readStream(TQDataStream& /* s */, IMyMoneySerialize* /* storage */) { qDebug("Reading not supported by MyMoneyStorageDump!!"); } -void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storage) +void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _storage) { - QTextStream s(_s.device()); + TQTextStream s(_s.device()); IMyMoneyStorage* storage = dynamic_cast<IMyMoneyStorage *> (_storage); MyMoneyPayee user = storage->user(); @@ -72,18 +72,18 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Internal-Info\n"; s << "-------------\n"; - QValueList<MyMoneyAccount> list_a; + TQValueList<MyMoneyAccount> list_a; storage->accountList(list_a); s << "accounts = " << list_a.count() <<", next id = " << _storage->accountId() << "\n"; MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> list_t; + TQValueList<MyMoneyTransaction> list_t; storage->transactionList(list_t, filter); - QValueList<MyMoneyTransaction>::ConstIterator it_t; + TQValueList<MyMoneyTransaction>::ConstIterator it_t; s << "transactions = " << list_t.count() << ", next id = " << _storage->transactionId() << "\n"; - QMap<int,int> xferCount; + TQMap<int,int> xferCount; for(it_t = list_t.begin(); it_t != list_t.end(); ++it_t) { - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; int accountCount = 0; for(it_s = (*it_t).splits().begin(); it_s != (*it_t).splits().end(); ++it_s) { MyMoneyAccount acc = storage->account((*it_s).accountId()); @@ -94,7 +94,7 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag if(accountCount > 1) xferCount[accountCount] = xferCount[accountCount] + 1; } - QMap<int,int>::ConstIterator it_cnt; + TQMap<int,int>::ConstIterator it_cnt; for(it_cnt = xferCount.begin(); it_cnt != xferCount.end(); ++it_cnt) { s << " " << *it_cnt << " of them references " << it_cnt.key() << " accounts\n"; } @@ -107,8 +107,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Institutions\n"; s << "------------\n"; - QValueList<MyMoneyInstitution> list_i = storage->institutionList(); - QValueList<MyMoneyInstitution>::ConstIterator it_i; + TQValueList<MyMoneyInstitution> list_i = storage->institutionList(); + TQValueList<MyMoneyInstitution>::ConstIterator it_i; for(it_i = list_i.begin(); it_i != list_i.end(); ++it_i) { s << " ID = " << (*it_i).id() << "\n"; s << " Name = " << (*it_i).name() << "\n"; @@ -119,8 +119,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Payees" << "\n"; s << "------" << "\n"; - QValueList<MyMoneyPayee> list_p = storage->payeeList(); - QValueList<MyMoneyPayee>::ConstIterator it_p; + TQValueList<MyMoneyPayee> list_p = storage->payeeList(); + TQValueList<MyMoneyPayee>::ConstIterator it_p; for(it_p = list_p.begin(); it_p != list_p.end(); ++it_p) { s << " ID = " << (*it_p).id() << "\n"; s << " Name = " << (*it_p).name() << "\n"; @@ -144,7 +144,7 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag list_a.push_front(storage->income()); list_a.push_front(storage->liability()); list_a.push_front(storage->asset()); - QValueList<MyMoneyAccount>::ConstIterator it_a; + TQValueList<MyMoneyAccount>::ConstIterator it_a; for(it_a = list_a.begin(); it_a != list_a.end(); ++it_a) { s << " ID = " << (*it_a).id() << "\n"; s << " Name = " << (*it_a).name() << "\n"; @@ -160,10 +160,10 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << " Currency = " << storage->currency((*it_a).currencyId()).name() << "\n"; } } - s << " Parent = " << (*it_a).parentAccountId(); - if(!(*it_a).parentAccountId().isEmpty()) { - MyMoneyAccount parent = storage->account((*it_a).parentAccountId()); - s << " (" << parent.name() << ")"; + s << " Parent = " << (*it_a).tqparentAccountId(); + if(!(*it_a).tqparentAccountId().isEmpty()) { + MyMoneyAccount tqparent = storage->account((*it_a).tqparentAccountId()); + s << " (" << tqparent.name() << ")"; } else { s << "n/a"; } @@ -186,8 +186,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag dumpKVP(" KVP: ", s, *it_a); dumpKVP(" OnlineBankingSettings: ", s, (*it_a).onlineBankingSettings()); - QStringList list_s = (*it_a).accountList(); - QStringList::ConstIterator it_s; + TQStringList list_s = (*it_a).accountList(); + TQStringList::ConstIterator it_s; if(list_s.count() > 0) { s << " Children =" << "\n"; } @@ -203,8 +203,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Currencies" << "\n"; s << "----------" << "\n"; - QValueList<MyMoneyCurrency> list_c = storage->currencyList(); - QValueList<MyMoneyCurrency>::ConstIterator it_c; + TQValueList<MyMoneyCurrency> list_c = storage->currencyList(); + TQValueList<MyMoneyCurrency>::ConstIterator it_c; for(it_c = list_c.begin(); it_c != list_c.end(); ++it_c) { s << " Name = " << (*it_c).name() << "\n"; s << " ID = " << (*it_c).id() << "\n"; @@ -221,8 +221,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Securities" << "\n"; s << "----------" << "\n"; - QValueList<MyMoneySecurity> list_e = storage->securityList(); - QValueList<MyMoneySecurity>::ConstIterator it_e; + TQValueList<MyMoneySecurity> list_e = storage->securityList(); + TQValueList<MyMoneySecurity>::ConstIterator it_e; for(it_e = list_e.begin(); it_e != list_e.end(); ++it_e) { s << " Name = " << (*it_e).name() << "\n"; s << " ID = " << (*it_e).id() << "\n"; @@ -244,8 +244,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << " smallest account fraction = " << (*it_e).smallestAccountFraction() << "\n"; s << " KVP: " << "\n"; - QMap<QString, QString>kvp = (*it_e).pairs(); - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>kvp = (*it_e).pairs(); + TQMap<TQString, TQString>::Iterator it; for(it = kvp.begin(); it != kvp.end(); ++it) { s << " '" << it.key() << "' = '" << it.data() << "'\n"; } @@ -264,7 +264,7 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag MyMoneyPriceEntries::ConstIterator it_pre; for(it_pre = (*it_pr).begin(); it_pre != (*it_pr).end(); ++it_pre) { s << " Date = " << (*it_pre).date().toString() << "\n"; - s << " Price = " << (*it_pre).rate(QString()).formatMoney("", 8) << "\n"; + s << " Price = " << (*it_pre).rate(TQString()).formatMoney("", 8) << "\n"; s << " Source = " << (*it_pre).source() << "\n"; s << " From = " << (*it_pre).from() << "\n"; s << " To = " << (*it_pre).to() << "\n"; @@ -285,8 +285,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Schedules" << "\n"; s << "---------" << "\n"; - QValueList<MyMoneySchedule> list_s = storage->scheduleList(); - QValueList<MyMoneySchedule>::ConstIterator it_s; + TQValueList<MyMoneySchedule> list_s = storage->scheduleList(); + TQValueList<MyMoneySchedule>::ConstIterator it_s; for(it_s = list_s.begin(); it_s != list_s.end(); ++it_s) { s << " ID = " << (*it_s).id() << "\n"; s << " Name = " << (*it_s).name() << "\n"; @@ -314,8 +314,8 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << " = overdue!" << "\n"; } - QValueList<QDate> list_d; - QValueList<QDate>::ConstIterator it_d; + TQValueList<TQDate> list_d; + TQValueList<TQDate>::ConstIterator it_d; list_d = (*it_s).recordedPayments(); if(list_d.count() > 0) { @@ -332,26 +332,26 @@ void MyMoneyStorageDump::writeStream(QDataStream& _s, IMyMoneySerialize* _storag s << "Reports" << "\n"; s << "-------" << "\n"; - QValueList<MyMoneyReport> list_r = storage->reportList(); - QValueList<MyMoneyReport>::ConstIterator it_r; + TQValueList<MyMoneyReport> list_r = storage->reportList(); + TQValueList<MyMoneyReport>::ConstIterator it_r; for(it_r = list_r.begin(); it_r != list_r.end(); ++it_r) { s << " ID = " << (*it_r).id() << "\n"; s << " Name = " << (*it_r).name() << "\n"; } } -void MyMoneyStorageDump::dumpKVP(const QString& headline, QTextStream& s, const MyMoneyKeyValueContainer &kvp, int indent) +void MyMoneyStorageDump::dumpKVP(const TQString& headline, TQTextStream& s, const MyMoneyKeyValueContainer &kvp, int indent) { - QString ind; + TQString ind; ind.fill(' ', indent); s << ind << headline << "\n"; - QMap<QString, QString>::const_iterator it; + TQMap<TQString, TQString>::const_iterator it; for(it = kvp.pairs().begin(); it != kvp.pairs().end(); ++it) { s << ind << " '" << it.key() << "' = '" << it.data() << "'\n"; } } -void MyMoneyStorageDump::dumpTransaction(QTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t) +void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t) { s << " ID = " << it_t.id() << "\n"; s << " Postdate = " << it_t.postDate().toString(Qt::ISODate) << "\n"; @@ -363,7 +363,7 @@ void MyMoneyStorageDump::dumpTransaction(QTextStream& s, IMyMoneyStorage* storag s << " Splits\n"; s << " ------\n"; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = it_t.splits().begin(); it_s != it_t.splits().end(); ++it_s) { s << " ID = " << (*it_s).id() << "\n"; s << " Transaction = " << (*it_s).transactionId() << "\n"; @@ -403,11 +403,11 @@ void MyMoneyStorageDump::dumpTransaction(QTextStream& s, IMyMoneyStorage* storag s << "\n"; } -#define i18n QString +#define i18n TQString -const QString MyMoneyStorageDump::reconcileToString(MyMoneySplit::reconcileFlagE flag) const +const TQString MyMoneyStorageDump::reconcileToString(MyMoneySplit::reconcileFlagE flag) const { - QString rc; + TQString rc; switch(flag) { case MyMoneySplit::NotReconciled: @@ -430,7 +430,7 @@ const QString MyMoneyStorageDump::reconcileToString(MyMoneySplit::reconcileFlagE } #if 0 -void MyMoneyStorageDump::dumpPriceHistory(QTextStream& s, const equity_price_history history) +void MyMoneyStorageDump::dumpPriceHistory(TQTextStream& s, const equity_price_history history) { if(history.count() != 0) { s << " Price History:\n"; diff --git a/kmymoney2/mymoney/storage/mymoneystoragedump.h b/kmymoney2/mymoney/storage/mymoneystoragedump.h index e399cde..3f7f33a 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragedump.h +++ b/kmymoney2/mymoney/storage/mymoneystoragedump.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatastream.h> +#include <tqdatastream.h> // ---------------------------------------------------------------------------- // Project Includes @@ -44,13 +44,13 @@ public: MyMoneyStorageDump(); ~MyMoneyStorageDump(); - void readStream(QDataStream& s, IMyMoneySerialize* storage); - void writeStream(QDataStream& s, IMyMoneySerialize* storage); + void readStream(TQDataStream& s, IMyMoneySerialize* storage); + void writeStream(TQDataStream& s, IMyMoneySerialize* storage); private: - void dumpTransaction(QTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t); - void dumpKVP(const QString& headline, QTextStream& s, const MyMoneyKeyValueContainer &kvp, int indent = 0); - const QString reconcileToString(MyMoneySplit::reconcileFlagE flag) const; + void dumpTransaction(TQTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t); + void dumpKVP(const TQString& headline, TQTextStream& s, const MyMoneyKeyValueContainer &kvp, int indent = 0); + const TQString reconcileToString(MyMoneySplit::reconcileFlagE flag) const; }; #endif diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp index 97b4c55..34c9573 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragesql.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragesql.cpp @@ -22,12 +22,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qvaluelist.h> -#include <qstringlist.h> -#include <qiodevice.h> -#include <qsqldriver.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> +#include <tqiodevice.h> +#include <tqsqldriver.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -52,60 +52,52 @@ //***************** THE CURRENT VERSION OF THE DATABASE LAYOUT **************** unsigned int MyMoneyDbDef::m_currentVersion = 6; -// subclass QSqlQuery for performance tracing +// subclass TQSqlQuery for performance tracing MyMoneySqlQuery::MyMoneySqlQuery (MyMoneyStorageSql* db) - : QSqlQuery (static_cast<QSqlDatabase*>(db)) { + : TQSqlQuery (static_cast<TQSqlDatabase*>(db)) { m_db = db; } bool MyMoneySqlQuery::exec () { - TRACE(QString("start sql - %1").arg(lastQuery())); - bool rc = QSqlQuery::exec(); - QString msg("end sql\n%1\n***Query returned %2, row count %3"); - TRACE (msg.arg(QSqlQuery::executedQuery()).arg(rc).arg(numRowsAffected())); - //DBG (QString("%1\n***Query returned %2, row count %3").arg(QSqlQuery::executedQuery()).arg(rc).arg(size())); + TRACE(TQString("start sql - %1").tqarg(lastQuery())); + bool rc = TQSqlQuery::exec(); + TQString msg("end sql\n%1\n***Query returned %2, row count %3"); + TRACE (msg.tqarg(TQSqlQuery::executedQuery()).tqarg(rc).tqarg(numRowsAffected())); + //DBG (TQString("%1\n***Query returned %2, row count %3").tqarg(TQSqlQuery::executedQuery()).tqarg(rc).tqarg(size())); return (rc); } -bool MyMoneySqlQuery::prepare ( const QString & query ) { +bool MyMoneySqlQuery::prepare ( const TQString & query ) { if (m_db->isSqlite3()) { - QString newQuery = query; - return (QSqlQuery::prepare (newQuery.replace("FOR UPDATE", ""))); + TQString newQuery = query; + return (TQSqlQuery::prepare (newQuery.tqreplace("FOR UPDATE", ""))); } - return (QSqlQuery::prepare (query)); + return (TQSqlQuery::prepare (query)); } //***************************************************************************** MyMoneyDbDrivers::MyMoneyDbDrivers () { - m_driverMap["QDB2"] = QString("IBM DB2"); - m_driverMap["QIBASE"] = QString("Borland Interbase"); - m_driverMap["QMYSQL3"] = QString("MySQL"); - m_driverMap["QOCI8"] = QString("Oracle Call Interface, version 8 and 9"); - m_driverMap["QODBC3"] = QString("Open Database Connectivity"); - m_driverMap["QPSQL7"] = QString("PostgreSQL v6.x and v7.x"); - m_driverMap["QTDS7"] = QString("Sybase Adaptive Server and Microsoft SQL Server"); -#if QT_VERSION < 0x040000 - m_driverMap["QSQLITE3"] = QString("SQLite Version 3"); -#else - m_driverMap["QSQLITE"] = QString("SQLite Version 3"); -#endif -} - -databaseTypeE MyMoneyDbDrivers::driverToType (const QString& driver) const { - if (driver == "QDB2") return(Db2); - else if (driver == "QIBASE") return(Interbase); - else if (driver == "QMYSQL3") return(Mysql); - else if (driver == "QOCI8") return(Oracle8); - else if (driver == "QODBC3") return(ODBC3); - else if (driver == "QPSQL7") return(Postgresql); - else if (driver == "QTDS7") return(Sybase); -#if QT_VERSION < 0x040000 - else if (driver == "QSQLITE3") return(Sqlite3); -#else - else if (driver == "QSQLITE") return(Sqlite3); -#endif - else throw new MYMONEYEXCEPTION (QString("Unknown database driver type").arg(driver)); + m_driverMap["TQDB2"] = TQString("IBM DB2"); + m_driverMap["TQIBASE"] = TQString("Borland Interbase"); + m_driverMap["TQMYSQL3"] = TQString("MySQL"); + m_driverMap["TQOCI8"] = TQString("Oracle Call Interface, version 8 and 9"); + m_driverMap["TQODBC3"] = TQString("Open Database Connectivity"); + m_driverMap["TQPSQL7"] = TQString("PostgreSQL v6.x and v7.x"); + m_driverMap["TQTDS7"] = TQString("Sybase Adaptive Server and Microsoft SQL Server"); + m_driverMap["TQSQLITE3"] = TQString("SQLite Version 3"); +} + +databaseTypeE MyMoneyDbDrivers::driverToType (const TQString& driver) const { + if (driver == "TQDB2") return(Db2); + else if (driver == "TQIBASE") return(Interbase); + else if (driver == "TQMYSQL3") return(Mysql); + else if (driver == "TQOCI8") return(Oracle8); + else if (driver == "TQODBC3") return(ODBC3); + else if (driver == "TQPSQL7") return(Postgresql); + else if (driver == "TQTDS7") return(Sybase); + else if (driver == "TQSQLITE3") return(Sqlite3); + else throw new MYMONEYEXCEPTION (TQString("Unknown database driver type").tqarg(driver)); } bool MyMoneyDbDrivers::isTested (databaseTypeE dbType) const { @@ -122,11 +114,11 @@ bool MyMoneyDbDrivers::isTested (databaseTypeE dbType) const { //************************ Constructor/Destructor ***************************** MyMoneyStorageSql::MyMoneyStorageSql (IMyMoneySerialize *storage, const KURL& url) - : QSqlDatabase (url.queryItem("driver"), QString("kmmdatabase")) { + : TQSqlDatabase (url.queryItem("driver"), TQString("kmmdatabase")) { DBG("*** Entering MyMoneyStorageSql::MyMoneyStorageSql"); m_dbVersion = 0; m_progressCallback = 0; - m_displayStatus = false; + m_displaytqStatus = false; m_storage = storage; m_storagePtr = dynamic_cast<IMyMoneyStorage*>(storage); m_newDatabase = false; @@ -140,15 +132,15 @@ int MyMoneyStorageSql::open(const KURL& url, int openMode, bool clear) { DBG("*** Entering MyMoneyStorageSql::open"); try { int rc = 0; - QString driverName = url.queryItem("driver"); + TQString driverName = url.queryItem("driver"); m_dbType = m_drivers.driverToType(driverName); //get the input options - QStringList options = QStringList::split(',', url.queryItem("options")); - m_loadAll = options.contains("loadAll")/*|| m_mode == 0*/; - m_override = options.contains("override"); + TQStringList options = TQStringList::split(',', url.queryItem("options")); + m_loadAll = options.tqcontains("loadAll")/*|| m_mode == 0*/; + m_override = options.tqcontains("override"); // create the database connection - QString dbName = url.path().right(url.path().length() - 1); // remove separator slash + TQString dbName = url.path().right(url.path().length() - 1); // remove separator slash setDatabaseName(dbName); setHostName(url.host()); setUserName(url.user()); @@ -156,7 +148,7 @@ try { switch (openMode) { case IO_ReadOnly: // OpenDatabase menu entry (or open last file) case IO_ReadWrite: // Save menu entry with database open - if (!QSqlDatabase::open()) { + if (!TQSqlDatabase::open()) { buildError(MyMoneySqlQuery(), __func__, "opening database"); rc = 1; } else { @@ -167,11 +159,11 @@ try { // Try to open the database. // If that fails, try to create the database, then try to open it again. m_newDatabase = true; - if (!QSqlDatabase::open()) { + if (!TQSqlDatabase::open()) { if (createDatabase(url) != 0) { rc = 1; } else { - if (!QSqlDatabase::open()) { + if (!TQSqlDatabase::open()) { buildError(MyMoneySqlQuery(), __func__, "opening new database"); rc = 1; } else { @@ -190,7 +182,7 @@ try { } break; default: - qFatal("%s", QString("%1 - unknown open mode %2").arg(__func__).arg(openMode).data()); + qFatal("%s", TQString("%1 - unknown open mode %2").tqarg(__func__).tqarg(openMode).data()); } if (rc != 0) return (rc); // bypass logon check if we are creating a database @@ -198,21 +190,21 @@ try { // check if the database is locked, if not lock it readFileInfo(); if (!m_logonUser.isEmpty() && (!m_override)) { - m_error = QString - (i18n("Database apparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?")) - .arg(m_logonUser) - .arg(m_logonAt.date().toString(Qt::ISODate)) - .arg(m_logonAt.time().toString("hh.mm.ss")); + m_error = TQString + (i18n("Database aptqparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?")) + .tqarg(m_logonUser) + .tqarg(m_logonAt.date().toString(Qt::ISODate)) + .tqarg(m_logonAt.time().toString("hh.mm.ss")); qDebug("%s", m_error.data()); close(false); rc = -1; } else { m_logonUser = url.user() + "@" + url.host(); - m_logonAt = QDateTime::currentDateTime(); + m_logonAt = TQDateTime::tqcurrentDateTime(); writeFileInfo(); } return(rc); -} catch (QString& s) { +} catch (TQString& s) { qDebug("%s",s.data()); return (1); } @@ -220,15 +212,15 @@ try { void MyMoneyStorageSql::close(bool logoff) { DBG("*** Entering MyMoneyStorageSql::close"); - if (QSqlDatabase::open()) { + if (TQSqlDatabase::open()) { if (logoff) { startCommitUnit(__func__); - m_logonUser = QString(); + m_logonUser = TQString(); writeFileInfo(); endCommitUnit(__func__); } - QSqlDatabase::close(); - QSqlDatabase::removeDatabase(this); + TQSqlDatabase::close(); + TQSqlDatabase::removeDatabase(this); } } @@ -237,32 +229,32 @@ int MyMoneyStorageSql::createDatabase (const KURL& url) { if (m_dbType == Sqlite3) return(0); // not needed for sqlite if (!m_dbType == Mysql) { m_error = - QString(i18n("Cannot currently create database for driver %1; please create manually")).arg(driverName()); + TQString(i18n("Cannot currently create database for driver %1; please create manually")).tqarg(driverName()); return (1); } // create the database (only works for mysql at present) - QString dbName = url.path().right(url.path().length() - 1); // remove separator slash - QSqlDatabase *maindb = QSqlDatabase::addDatabase(driverName()); + TQString dbName = url.path().right(url.path().length() - 1); // remove separator slash + TQSqlDatabase *maindb = TQSqlDatabase::addDatabase(driverName()); maindb->setDatabaseName ("mysql"); maindb->setHostName (url.host()); maindb->setUserName (url.user()); maindb->setPassword (url.pass()); maindb->open(); - QSqlQuery qm(maindb); - QString qs = QString("CREATE DATABASE %1;").arg(dbName); + TQSqlQuery qm(maindb); + TQString qs = TQString("CREATE DATABASE %1;").tqarg(dbName); qm.prepare (qs); if (!qm.exec()) { - buildError (qm, __func__, QString(i18n("Error in create database %1; do you have create permissions?")).arg(dbName)); + buildError (qm, __func__, TQString(i18n("Error in create database %1; do you have create permissions?")).tqarg(dbName)); return (1); } - QSqlDatabase::removeDatabase (maindb); + TQSqlDatabase::removeDatabase (maindb); return (0); } int MyMoneyStorageSql::upgradeDb() { DBG("*** Entering MyMoneyStorageSql::upgradeDb"); - //signalProgress(0, 1, QObject::tr("Upgrading database...")); + //signalProgress(0, 1, TQObject::tr("Upgrading database...")); MyMoneySqlQuery q(this); q.prepare ("SELECT version FROM kmmFileInfo;"); if (!q.exec() || !q.next()) { @@ -272,7 +264,7 @@ int MyMoneyStorageSql::upgradeDb() { } else { m_dbVersion = m_db.currentVersion(); m_storage->setFileFixVersion(m_storage->currentFixVersion()); - QSqlQuery q(this); + TQSqlQuery q(this); q.prepare("UPDATE kmmFileInfo SET version = :version, \ fixLevel = :fixLevel;"); q.bindValue(":version", m_dbVersion); @@ -286,8 +278,8 @@ int MyMoneyStorageSql::upgradeDb() { } // prior to dbv6, 'version' format was 'dbversion.fixLevel+1' // as of dbv6, these are separate fields - QString version = q.value(0).toString(); - if (version.contains('.')) { + TQString version = q.value(0).toString(); + if (version.tqcontains('.')) { m_dbVersion = q.value(0).toString().section('.', 0, 0).toUInt(); m_storage->setFileFixVersion(q.value(0).toString().section('.', 1, 1).toUInt() - 1); } else { @@ -333,8 +325,8 @@ int MyMoneyStorageSql::upgradeDb() { } } // write updated version to DB - //setVersion(QString("%1.%2").arg(m_dbVersion).arg(m_minorVersion)); - q.prepare (QString("UPDATE kmmFileInfo SET version = :version;")); + //setVersion(TQString("%1.%2").tqarg(m_dbVersion).tqarg(m_minorVersion)); + q.prepare (TQString("UPDATE kmmFileInfo SET version = :version;")); q.bindValue(":version", m_dbVersion); if (!q.exec()) { buildError (q, __func__, "Error updating db version"); @@ -346,8 +338,8 @@ int MyMoneyStorageSql::upgradeDb() { // SF bug 2779291 // check whether a column appears in a table already; if not, add it bool MyMoneyStorageSql::addColumn - (const QString& table, const QString& col, - const QString& after) + (const TQString& table, const TQString& col, + const TQString& after) { MyMoneyDbTable t = m_db.m_tables[table]; MyMoneyDbTable::field_iterator ft; @@ -363,20 +355,20 @@ bool MyMoneyStorageSql::addColumn bool MyMoneyStorageSql::addColumn (const MyMoneyDbTable& t, const MyMoneyDbColumn& c, - const QString& after){ + const TQString& after){ if ((m_dbType == Sqlite3) && (!after.isEmpty())) qFatal("sqlite doesn't support 'AFTER'; use sqliteAlterTable"); - if (record(t.name()).contains(c.name())) + if (record(t.name()).tqcontains(c.name())) return (true); - QSqlQuery q(this); - QString afterString = ";"; + TQSqlQuery q(this); + TQString afterString = ";"; if (!after.isEmpty()) - afterString = QString("AFTER %1;").arg(after); + afterString = TQString("AFTER %1;").tqarg(after); q.prepare("ALTER TABLE " + t.name() + " ADD COLUMN " + c.generateDDL(m_dbType) + afterString); if (!q.exec()) { buildError (q, __func__, - QString("Error adding column %1 to table %2").arg(c.name()).arg(t.name())); + TQString("Error adding column %1 to table %2").tqarg(c.name()).tqarg(t.name())); return (false); } return (true); @@ -384,23 +376,23 @@ bool MyMoneyStorageSql::addColumn // analogous to above bool MyMoneyStorageSql::dropColumn - (const QString& table, const QString& col) + (const TQString& table, const TQString& col) { return (dropColumn(m_db.m_tables[table], col)); } bool MyMoneyStorageSql::dropColumn - (const MyMoneyDbTable& t, const QString& col){ + (const MyMoneyDbTable& t, const TQString& col){ if (m_dbType == Sqlite3) qFatal("sqlite doesn't support 'DROP COLUMN'; use sqliteAlterTable"); - if (!record(t.name()).contains(col)) + if (!record(t.name()).tqcontains(col)) return (true); - QSqlQuery q(this); + TQSqlQuery q(this); q.prepare("ALTER TABLE " + t.name() + " DROP COLUMN " + col + ";"); if (!q.exec()) { buildError (q, __func__, - QString("Error dropping column %1 from table %2").arg(col).arg(t.name())); + TQString("Error dropping column %1 from table %2").tqarg(col).tqarg(t.name())); return (false); } return (true); @@ -434,9 +426,9 @@ int MyMoneyStorageSql::upgradeToV1() { buildError (q, __func__, "Error priming kmmSplits.postDate"); return (1); } - QMap<QString, QDateTime> tids; + TQMap<TQString, TQDateTime> tids; while (q.next()) tids[q.value(0).toString()] = q.value(1).toDateTime(); - QMap<QString, QDateTime>::ConstIterator it; + TQMap<TQString, TQDateTime>::ConstIterator it; for (it = tids.begin(); it != tids.end(); ++it) { q.prepare ("UPDATE kmmSplits SET postDate=:postDate WHERE transactionId = :id;"); q.bindValue(":postDate", it.data().toString(Qt::ISODate)); @@ -447,7 +439,7 @@ int MyMoneyStorageSql::upgradeToV1() { } } // add index to kmmKeyValuePairs to (kvpType,kvpId) - QStringList list; + TQStringList list; list << "kvpType" << "kvpId"; q.prepare (MyMoneyDbIndex("kmmKeyValuePairs", "kmmKVPtype_id", list, false).generateDDL(m_dbType) + ";"); if (!q.exec()) { @@ -519,18 +511,18 @@ int MyMoneyStorageSql::upgradeToV1() { buildError (q, __func__, "Error retrieving splits for transaction counting"); return(1); } - QString lastAcc, lastTx; + TQString lastAcc, lastTx; while (q.next()) { - QString thisAcc = q.value(0).toCString(); - QString thisTx = q.value(1).toCString(); + TQString thisAcc = q.value(0).toCString(); + TQString thisTx = q.value(1).toCString(); if ((thisAcc != lastAcc) || (thisTx != lastTx)) ++m_transactionCountMap[thisAcc]; lastAcc = thisAcc; lastTx = thisTx; } - QMap<QString, unsigned long>::ConstIterator itm; + TQMap<TQString, unsigned long>::ConstIterator itm; q.prepare("UPDATE kmmAccounts SET transactionCount = :txCount WHERE id = :id;"); for (itm = m_transactionCountMap.begin(); itm != m_transactionCountMap.end(); ++itm) { - q.bindValue (":txCount", QString::number(itm.data())); + q.bindValue (":txCount", TQString::number(itm.data())); q.bindValue (":id", itm.key()); if (!q.exec()) { buildError(q, __func__, "Error updating transaction count"); @@ -606,7 +598,7 @@ int MyMoneyStorageSql::upgradeToV4() { DBG("*** Entering MyMoneyStorageSql::upgradeToV4"); startCommitUnit(__func__); MyMoneySqlQuery q(this); - QStringList list; + TQStringList list; list << "transactionId" << "splitId"; q.prepare (MyMoneyDbIndex("kmmSplits", "kmmTx_Split", list, false).generateDDL(m_dbType) + ";"); if (!q.exec()) { @@ -664,8 +656,8 @@ int MyMoneyStorageSql::upgradeToV6() { return (1); // upgrade Mysql to InnoDB transaction-safe engine if (m_dbType == Mysql) { - for (QMapConstIterator<QString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) { - q.prepare(QString("ALTER TABLE %1 ENGINE = InnoDB;").arg(tt.data().name())); + for (TQMapConstIterator<TQString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) { + q.prepare(TQString("ALTER TABLE %1 ENGINE = InnoDB;").tqarg(tt.data().name())); if (!q.exec()) { buildError (q, __func__, "Error updating to InnoDB"); return (1); @@ -678,7 +670,7 @@ int MyMoneyStorageSql::upgradeToV6() { return(1); // read and write reports to get ids inserted readFileInfo(); - QMap<QString, MyMoneyReport> reportList = + TQMap<TQString, MyMoneyReport> reportList = fetchReports(); // the V5 database allowed lots of duplicate reports with no // way to distinguish between them. The fetchReports call @@ -690,7 +682,7 @@ int MyMoneyStorageSql::upgradeToV6() { return (1); } unsigned long long hiReportId = 0; - QMap<QString, MyMoneyReport>::const_iterator it_r; + TQMap<TQString, MyMoneyReport>::const_iterator it_r; for(it_r = reportList.begin(); it_r != reportList.end(); ++it_r) { MyMoneyReport r = *it_r; hiReportId = calcHighId(hiReportId, r.id()); @@ -719,22 +711,22 @@ int MyMoneyStorageSql::upgradeToV6() { statement. It should enable us to drop a primary key, and drop columns */ bool MyMoneyStorageSql::sqliteAlterTable(const MyMoneyDbTable& t) { DBG("*** Entering MyMoneyStorageSql::sqliteAlterTable"); - QString tempTableName = t.name(); - tempTableName.replace("kmm", "tmp"); - QSqlQuery q(this); - q.prepare (QString("ALTER TABLE " + t.name() + " RENAME TO " + tempTableName + ";")); + TQString tempTableName = t.name(); + tempTableName.tqreplace("kmm", "tmp"); + TQSqlQuery q(this); + q.prepare (TQString("ALTER TABLE " + t.name() + " RENAME TO " + tempTableName + ";")); if (!q.exec()) { buildError (q, __func__, "Error renaming table"); return false; } createTable(t); - q.prepare (QString("INSERT INTO " + t.name() + " (" + t.columnList() + + q.prepare (TQString("INSERT INTO " + t.name() + " (" + t.columnList() + ") SELECT " + t.columnList() + " FROM " + tempTableName + ";")); if (!q.exec()) { buildError (q, __func__, "Error inserting into new table"); return false; } - q.prepare (QString("DROP TABLE " + tempTableName + ";")); + q.prepare (TQString("DROP TABLE " + tempTableName + ";")); if (!q.exec()) { buildError (q, __func__, "Error dropping old table"); return false; @@ -742,10 +734,10 @@ bool MyMoneyStorageSql::sqliteAlterTable(const MyMoneyDbTable& t) { return true; } -long unsigned MyMoneyStorageSql::getRecCount (const QString& table) const { +long unsigned MyMoneyStorageSql::getRecCount (const TQString& table) const { DBG("*** Entering MyMoneyStorageSql::getRecCount"); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - q.prepare(QString("SELECT COUNT(*) FROM %1;").arg(table)); + q.prepare(TQString("SELECT COUNT(*) FROM %1;").tqarg(table)); if ((!q.exec()) || (!q.next())) { buildError (q, __func__, "error retrieving record count"); qFatal("Error retrieving record count"); // definitely shouldn't happen @@ -758,20 +750,20 @@ int MyMoneyStorageSql::createTables () { // check tables, create if required // convert everything to lower case, since SQL standard is case insensitive // table and column names (when not delimited), but some DBMSs disagree. - QStringList lowerTables = tables(QSql::AllTables); - for (QStringList::iterator i = lowerTables.begin(); i != lowerTables.end(); ++i) { + TQStringList lowerTables = tables(TQSql::AllTables); + for (TQStringList::iterator i = lowerTables.begin(); i != lowerTables.end(); ++i) { (*i) = (*i).lower(); } - for (QMapConstIterator<QString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) { - if (!lowerTables.contains(tt.key().lower())) createTable (tt.data()); + for (TQMapConstIterator<TQString, MyMoneyDbTable> tt = m_db.tableBegin(); tt != m_db.tableEnd(); ++tt) { + if (!lowerTables.tqcontains(tt.key().lower())) createTable (tt.data()); } MyMoneySqlQuery q(this); - for (QMapConstIterator<QString, MyMoneyDbView> tt = m_db.viewBegin(); tt != m_db.viewEnd(); ++tt) { - if (!lowerTables.contains(tt.key().lower())) { + for (TQMapConstIterator<TQString, MyMoneyDbView> tt = m_db.viewBegin(); tt != m_db.viewEnd(); ++tt) { + if (!lowerTables.tqcontains(tt.key().lower())) { q.prepare (tt.data().createString()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString ("creating view %1").arg(tt.key()))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating view %1").tqarg(tt.key()))); } } @@ -784,22 +776,22 @@ int MyMoneyStorageSql::createTables () { void MyMoneyStorageSql::createTable (const MyMoneyDbTable& t) { DBG("*** Entering MyMoneyStorageSql::createTable"); // create the tables - QStringList ql = QStringList::split('\n', t.generateCreateSQL(m_dbType)); + TQStringList ql = TQStringList::split('\n', t.generateCreateSQL(m_dbType)); MyMoneySqlQuery q(this); for (unsigned int i = 0; i < ql.count(); ++i) { q.prepare (ql[i]); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString ("creating table/index %1").arg(t.name()))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("creating table/index %1").tqarg(t.name()))); } } int MyMoneyStorageSql::isEmpty () { DBG("*** Entering MyMoneyStorageSql::isEmpty"); // check all tables are empty - QMapConstIterator<QString, MyMoneyDbTable> tt = m_db.tableBegin(); + TQMapConstIterator<TQString, MyMoneyDbTable> tt = m_db.tableBegin(); int recordCount = 0; MyMoneySqlQuery q(this); while ((tt != m_db.tableEnd()) && (recordCount == 0)) { - q.prepare (QString("select count(*) from %1;").arg((*tt).name())); + q.prepare (TQString("select count(*) from %1;").tqarg((*tt).name())); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "getting record count")); if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "retrieving record count")); recordCount += q.value(0).toInt(); @@ -816,11 +808,11 @@ int MyMoneyStorageSql::isEmpty () { void MyMoneyStorageSql::clean() { DBG("*** Entering MyMoneyStorageSql::clean"); // delete all existing records - QMapConstIterator<QString, MyMoneyDbTable> it = m_db.tableBegin(); + TQMapConstIterator<TQString, MyMoneyDbTable> it = m_db.tableBegin(); MyMoneySqlQuery q(this); while (it != m_db.tableEnd()) { - q.prepare(QString("DELETE from %1;").arg(it.key())); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString ("cleaning database"))); + q.prepare(TQString("DELETE from %1;").tqarg(it.key())); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("cleaning database"))); ++it; } } @@ -829,15 +821,15 @@ void MyMoneyStorageSql::clean() { bool MyMoneyStorageSql::readFile(void) { DBG("*** Entering MyMoneyStorageSql::readFile"); - m_displayStatus = true; + m_displaytqStatus = true; try { readFileInfo(); readInstitutions(); if (m_loadAll) { readPayees(); } else { - QValueList<QString> user; - user.append(QString("USER")); + TQValueList<TQString> user; + user.append(TQString("USER")); readPayees(user); } //TRACE("done payees"); @@ -868,10 +860,10 @@ bool MyMoneyStorageSql::readFile(void) { // FIXME?? if (m_mode == 0) m_storage = NULL; // make sure the progress bar is not shown any longer signalProgress(-1, -1); - m_displayStatus = false; + m_displaytqStatus = false; //MyMoneySqlQuery::traceOn(); return true; - } catch (QString& s) { + } catch (TQString& s) { return false; } } @@ -884,7 +876,7 @@ bool MyMoneyStorageSql::writeFile(void) { = m_securities = m_prices = m_currencies = m_schedules = m_reports = m_kvps = m_budgets = 0; m_hiIdInstitutions = m_hiIdPayees = m_hiIdAccounts = m_hiIdTransactions = m_hiIdSchedules = m_hiIdSecurities = m_hiIdReports = m_hiIdBudgets = 0; - m_displayStatus = true; + m_displaytqStatus = true; try{ startCommitUnit(__func__); writeInstitutions (); @@ -905,14 +897,14 @@ bool MyMoneyStorageSql::writeFile(void) { endCommitUnit(__func__); // make sure the progress bar is not shown any longer signalProgress(-1, -1); - m_displayStatus = false; + m_displaytqStatus = false; return true; -} catch (QString& s) { +} catch (TQString& s) { return false; } } // --------------- SQL Transaction (commit unit) handling ----------------------------------- -void MyMoneyStorageSql::startCommitUnit (const QString& callingFunction) { +void MyMoneyStorageSql::startCommitUnit (const TQString& callingFunction) { DBG("*** Entering MyMoneyStorageSql::startCommitUnit"); if (m_commitUnitStack.isEmpty()) { if (!transaction()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "starting commit unit")); @@ -920,16 +912,16 @@ void MyMoneyStorageSql::startCommitUnit (const QString& callingFunction) { m_commitUnitStack.push(callingFunction); } -bool MyMoneyStorageSql::endCommitUnit (const QString& callingFunction) { +bool MyMoneyStorageSql::endCommitUnit (const TQString& callingFunction) { DBG("*** Entering MyMoneyStorageSql::endCommitUnit"); // for now, we don't know if there were any changes made to the data so // we expect the data to have changed. This assumption causes some unnecessary - // repaints of the UI here and there, but for now it's ok. If we can determine + // tqrepaints of the UI here and there, but for now it's ok. If we can determine // that the commit() really changes the data, we can return that information // as value of this method. bool rc = true; if (callingFunction != m_commitUnitStack.top()) - qDebug("%s", QString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data()); + qDebug("%s", TQString("%1 - %2 s/be %3").tqarg(__func__).tqarg(callingFunction).tqarg(m_commitUnitStack.top()).data()); m_commitUnitStack.pop(); if (m_commitUnitStack.isEmpty()) { if (!commit()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "ending commit unit")); @@ -937,10 +929,10 @@ bool MyMoneyStorageSql::endCommitUnit (const QString& callingFunction) { return rc; } -void MyMoneyStorageSql::cancelCommitUnit (const QString& callingFunction) { +void MyMoneyStorageSql::cancelCommitUnit (const TQString& callingFunction) { DBG("*** Entering MyMoneyStorageSql::cancelCommitUnit"); if (callingFunction != m_commitUnitStack.top()) - qDebug("%s", QString("%1 - %2 s/be %3").arg(__func__).arg(callingFunction).arg(m_commitUnitStack.top()).data()); + qDebug("%s", TQString("%1 - %2 s/be %3").tqarg(__func__).tqarg(callingFunction).tqarg(m_commitUnitStack.top()).data()); if (m_commitUnitStack.isEmpty()) return; m_commitUnitStack.clear(); if (!rollback()) throw new MYMONEYEXCEPTION(buildError (MyMoneySqlQuery(), __func__, "cancelling commit unit")); @@ -967,20 +959,20 @@ void MyMoneyStorageSql::writeInstitutions() { // one way would be to build the lists when reading the db // unfortunately this object does not persist between read and write // it would also be nice if we could tell which objects had been updated since we read them in - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT id FROM kmmInstitutions;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Institution list")); while (q.next()) dbList.append(q.value(0).toString()); - const QValueList<MyMoneyInstitution> list = m_storage->institutionList(); - QValueList<MyMoneyInstitution>::ConstIterator it; + const TQValueList<MyMoneyInstitution> list = m_storage->institutionList(); + TQValueList<MyMoneyInstitution>::ConstIterator it; MyMoneySqlQuery q2(this); q.prepare (m_db.m_tables["kmmInstitutions"].updateString()); q2.prepare (m_db.m_tables["kmmInstitutions"].insertString()); signalProgress(0, list.count(), "Writing Institutions..."); for(it = list.begin(); it != list.end(); ++it) { - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeInstitution(*it, q); } else { @@ -990,7 +982,7 @@ void MyMoneyStorageSql::writeInstitutions() { } if (!dbList.isEmpty()) { - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); q.prepare("DELETE FROM kmmInstitutions WHERE id = :id"); while (it != dbList.end()) { q.bindValue(":id", (*it)); @@ -1030,7 +1022,7 @@ void MyMoneyStorageSql::removeInstitution(const MyMoneyInstitution& inst) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmInstitutions"].deleteString()); q.bindValue(":id", inst.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Institution"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Institution"))); --m_institutions; writeFileInfo(); endCommitUnit(__func__); @@ -1046,7 +1038,7 @@ void MyMoneyStorageSql::writeInstitution(const MyMoneyInstitution& i, MyMoneySql q.bindValue(":addressCity", i.city()); q.bindValue(":addressZipcode", i.postcode()); q.bindValue(":telephone", i.telephone()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Institution"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Institution"))); writeKeyValuePairs("OFXSETTINGS", i.id(), i.pairs()); m_hiIdInstitutions = calcHighId(m_hiIdInstitutions, i.id()); } @@ -1055,22 +1047,22 @@ void MyMoneyStorageSql::writeInstitution(const MyMoneyInstitution& i, MyMoneySql void MyMoneyStorageSql::writePayees() { DBG("*** Entering MyMoneyStorageSql::writePayees"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT id FROM kmmPayees;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Payee list")); while (q.next()) dbList.append(q.value(0).toString()); - QValueList<MyMoneyPayee> list = m_storage->payeeList(); - MyMoneyPayee user(QString("USER"), m_storage->user()); + TQValueList<MyMoneyPayee> list = m_storage->payeeList(); + MyMoneyPayee user(TQString("USER"), m_storage->user()); list.prepend(user); signalProgress(0, list.count(), "Writing Payees..."); MyMoneySqlQuery q2(this); q.prepare (m_db.m_tables["kmmPayees"].updateString()); q2.prepare (m_db.m_tables["kmmPayees"].insertString()); - QValueList<MyMoneyPayee>::ConstIterator it; + TQValueList<MyMoneyPayee>::ConstIterator it; for(it = list.begin(); it != list.end(); ++it) { - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writePayee(*it, q); } else { @@ -1080,7 +1072,7 @@ void MyMoneyStorageSql::writePayees() { } if (!dbList.isEmpty()) { - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); q.prepare(m_db.m_tables["kmmPayees"].deleteString()); while (it != dbList.end()) { q.bindValue(":id", (*it)); @@ -1128,7 +1120,7 @@ void MyMoneyStorageSql::removePayee(const MyMoneyPayee& payee) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmPayees"].deleteString()); q.bindValue(":id", payee.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Payee"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Payee"))); --m_payees; writeFileInfo(); endCommitUnit(__func__); @@ -1152,13 +1144,13 @@ void MyMoneyStorageSql::writePayee(const MyMoneyPayee& p, MyMoneySqlQuery& q, bo q.bindValue(":notes", p.notes()); q.bindValue(":defaultAccountId", p.defaultAccountId()); bool ignoreCase; - QString matchKeys; + TQString matchKeys; MyMoneyPayee::payeeMatchType type = p.matchData(ignoreCase, matchKeys); q.bindValue(":matchData", static_cast<unsigned int>(type)); if (ignoreCase) q.bindValue(":matchIgnoreCase", "Y"); else q.bindValue(":matchIgnoreCase", "N"); q.bindValue(":matchKeys", matchKeys); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString ("writing Payee"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("writing Payee"))); if (!isUserInfo) m_hiIdPayees = calcHighId(m_hiIdPayees, p.id()); } @@ -1166,15 +1158,15 @@ void MyMoneyStorageSql::writePayee(const MyMoneyPayee& p, MyMoneySqlQuery& q, bo void MyMoneyStorageSql::writeAccounts() { DBG("*** Entering MyMoneyStorageSql::writeAccounts"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT id FROM kmmAccounts;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Account list")); while (q.next()) dbList.append(q.value(0).toString()); - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; m_storage->accountList(list); - QValueList<MyMoneyAccount>::ConstIterator it; + TQValueList<MyMoneyAccount>::ConstIterator it; signalProgress(0, list.count(), "Writing Accounts..."); if (dbList.isEmpty()) { // new table, insert standard accounts q.prepare (m_db.m_tables["kmmAccounts"].insertString()); @@ -1216,7 +1208,7 @@ void MyMoneyStorageSql::writeAccounts() { MyMoneyAccount acc_q; acc_q.setAccountType(MyMoneyAccount::Equity); acc_q.setName("Equity"); - MyMoneyAccount equity(STD_ACC_EQUITY, acc_q); + MyMoneyAccount equity(STD_ACC_ETQUITY, acc_q); writeAccount(asset, q); ++m_accounts; writeAccount(expense, q); ++m_accounts; @@ -1232,7 +1224,7 @@ void MyMoneyStorageSql::writeAccounts() { // Update the accounts that exist; insert the ones that do not. for(it = list.begin(); it != list.end(); ++it, ++i) { m_transactionCountMap[(*it).id()] = m_storagePtr->transactionCount((*it).id()); - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeAccount(*it, q); } else { @@ -1243,7 +1235,7 @@ void MyMoneyStorageSql::writeAccounts() { // Delete the accounts that are in the db but no longer in memory. if (!dbList.isEmpty()) { - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); q.prepare("DELETE FROM kmmAccounts WHERE id = :id"); while (it != dbList.end()) { if (!m_storagePtr->isStandardAccount(*it)) { @@ -1288,7 +1280,7 @@ void MyMoneyStorageSql::removeAccount(const MyMoneyAccount& acc) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmAccounts"].deleteString()); q.bindValue(":id", acc.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Account"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Account"))); --m_accounts; writeFileInfo(); endCommitUnit(__func__); @@ -1296,20 +1288,20 @@ void MyMoneyStorageSql::removeAccount(const MyMoneyAccount& acc) { void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery& q) { DBG("*** Entering MyMoneyStorageSql::writeAccount"); - //MyMoneyMoney balance = m_storagePtr->balance(acc.id(), QDate()); + //MyMoneyMoney balance = m_storagePtr->balance(acc.id(), TQDate()); q.bindValue(":id", acc.id()); q.bindValue(":institutionId", acc.institutionId()); - q.bindValue(":parentId", acc.parentAccountId()); - if (acc.lastReconciliationDate() == QDate()) + q.bindValue(":tqparentId", acc.tqparentAccountId()); + if (acc.lastReconciliationDate() == TQDate()) q.bindValue(":lastReconciled", acc.lastReconciliationDate()); else - q.bindValue(":lastReconciled", acc.lastReconciliationDate().toString(Qt::ISODate)); + q.bindValue(":lastReconciled", TQString(acc.lastReconciliationDate().toString(Qt::ISODate))); q.bindValue(":lastModified", acc.lastModified()); - if (acc.openingDate() == QDate()) + if (acc.openingDate() == TQDate()) q.bindValue(":openingDate", acc.openingDate()); else - q.bindValue(":openingDate", acc.openingDate().toString(Qt::ISODate)); + q.bindValue(":openingDate", TQString(acc.openingDate().toString(Qt::ISODate))); q.bindValue(":accountNumber", acc.number()); q.bindValue(":accountType", acc.accountType()); @@ -1330,7 +1322,7 @@ void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery& //FIXME: Using exceptions for branching always feels like a kludge. // Look for a better way. TRY - MyMoneyMoney bal = m_storagePtr->balance(acc.id(), QDate()); + MyMoneyMoney bal = m_storagePtr->balance(acc.id(), TQDate()); q.bindValue(":balance", bal.toString()); q.bindValue(":balanceFormatted", bal.formatMoney("", -1, false)); @@ -1341,8 +1333,8 @@ void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery& acc.balance().formatMoney("", -1, false)); ECATCH - q.bindValue(":transactionCount", Q_ULLONG(m_transactionCountMap[acc.id()])); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Account"))); + q.bindValue(":transactionCount", TQ_ULLONG(m_transactionCountMap[acc.id()])); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Account"))); //Add in Key-Value Pairs for accounts. //MMAccount inherits from KVPContainer AND has a KVPContainer member @@ -1356,7 +1348,7 @@ void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery& void MyMoneyStorageSql::writeTransactions() { DBG("*** Entering MyMoneyStorageSql::writeTransactions"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT id FROM kmmTransactions WHERE txType = 'N';"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Transaction list")); @@ -1364,16 +1356,16 @@ void MyMoneyStorageSql::writeTransactions() { MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; m_storage->transactionList(list, filter); signalProgress(0, list.count(), "Writing Transactions..."); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; int i = 0; MyMoneySqlQuery q2(this); q.prepare (m_db.m_tables["kmmTransactions"].updateString()); q2.prepare (m_db.m_tables["kmmTransactions"].insertString()); for(it = list.begin(); it != list.end(); ++it, ++i) { - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeTransaction((*it).id(), *it, q, "N"); } else { @@ -1383,7 +1375,7 @@ void MyMoneyStorageSql::writeTransactions() { } if (!dbList.isEmpty()) { - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { deleteTransaction(*it); ++it; @@ -1400,7 +1392,7 @@ void MyMoneyStorageSql::addTransaction (const MyMoneyTransaction& tx) { writeTransaction(tx.id(), tx, q, "N"); ++m_transactions; // for each split account, update lastMod date, balance, txCount - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = tx.splits().begin(); it_s != tx.splits().end(); ++it_s) { //MyMoneyAccount acc = m_storagePtr->account((*it_s).accountId()); MyMoneyAccount acc = MyMoneyFile::instance()->account((*it_s).accountId()); @@ -1421,14 +1413,14 @@ void MyMoneyStorageSql::modifyTransaction (const MyMoneyTransaction& tx) { q.bindValue(":txId", tx.id()); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "retrieving old splits")); while (q.next()) { - QString id = q.value(0).toCString(); + TQString id = q.value(0).toCString(); --m_transactionCountMap[id]; } // add the transaction and splits q.prepare (m_db.m_tables["kmmTransactions"].updateString()); writeTransaction(tx.id(), tx, q, "N"); // for each split account, update lastMod date, balance, txCount - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = tx.splits().begin(); it_s != tx.splits().end(); ++it_s) { //MyMoneyAccount acc = m_storagePtr->account((*it_s).accountId()); MyMoneyAccount acc = MyMoneyFile::instance()->account((*it_s).accountId()); @@ -1448,7 +1440,7 @@ void MyMoneyStorageSql::removeTransaction(const MyMoneyTransaction& tx) { --m_transactions; // for each split account, update lastMod date, balance, txCount - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = tx.splits().begin(); it_s != tx.splits().end(); ++it_s) { MyMoneyAccount acc = m_storagePtr->account((*it_s).accountId()); --m_transactionCountMap[acc.id()]; @@ -1459,7 +1451,7 @@ void MyMoneyStorageSql::removeTransaction(const MyMoneyTransaction& tx) { endCommitUnit(__func__); } -void MyMoneyStorageSql::deleteTransaction(const QString& id) { +void MyMoneyStorageSql::deleteTransaction(const TQString& id) { DBG("*** Entering MyMoneyStorageSql::deleteTransaction"); MyMoneySqlQuery q(this); q.prepare("DELETE FROM kmmSplits WHERE transactionId = :transactionId;"); @@ -1477,19 +1469,19 @@ void MyMoneyStorageSql::deleteTransaction(const QString& id) { if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "deleting Transaction")); } -void MyMoneyStorageSql::writeTransaction(const QString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const QString& type) { +void MyMoneyStorageSql::writeTransaction(const TQString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const TQString& type) { DBG("*** Entering MyMoneyStorageSql::writeTransaction"); q.bindValue(":id", txId); q.bindValue(":txType", type); - q.bindValue(":postDate", tx.postDate().toString(Qt::ISODate)); + q.bindValue(":postDate", TQString(tx.postDate().toString(Qt::ISODate))); q.bindValue(":memo", tx.memo()); - q.bindValue(":entryDate", tx.entryDate().toString(Qt::ISODate)); + q.bindValue(":entryDate", TQString(tx.entryDate().toString(Qt::ISODate))); q.bindValue(":currencyId", tx.commodity()); q.bindValue(":bankId", tx.bankID()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Transaction"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Transaction"))); m_txPostDate = tx.postDate(); // FIXME: TEMP till Tom puts date in split object - QValueList<MyMoneySplit> splitList = tx.splits(); + TQValueList<MyMoneySplit> splitList = tx.splits(); writeSplits(txId, type, splitList); //Add in Key-Value Pairs for transactions. @@ -1498,23 +1490,23 @@ void MyMoneyStorageSql::writeTransaction(const QString& txId, const MyMoneyTrans m_hiIdTransactions = calcHighId(m_hiIdTransactions, tx.id()); } -void MyMoneyStorageSql::writeSplits(const QString& txId, const QString& type, const QValueList<MyMoneySplit>& splitList) { +void MyMoneyStorageSql::writeSplits(const TQString& txId, const TQString& type, const TQValueList<MyMoneySplit>& splitList) { DBG("*** Entering MyMoneyStorageSql::writeSplits"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<unsigned int> dbList; + TQValueList<unsigned int> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT splitId FROM kmmSplits where transactionId = :id;"); q.bindValue(":id", txId); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Split list")); while (q.next()) dbList.append(q.value(0).toUInt()); - QValueList<MyMoneySplit>::const_iterator it; + TQValueList<MyMoneySplit>::const_iterator it; unsigned int i; MyMoneySqlQuery q2(this); q.prepare (m_db.m_tables["kmmSplits"].updateString()); q2.prepare (m_db.m_tables["kmmSplits"].insertString()); for(it = splitList.begin(), i = 0; it != splitList.end(); ++it, ++i) { - if (dbList.contains(i)) { + if (dbList.tqcontains(i)) { dbList.remove (i); writeSplit(txId, (*it), type, i, q); } else { @@ -1525,7 +1517,7 @@ void MyMoneyStorageSql::writeSplits(const QString& txId, const QString& type, co if (!dbList.isEmpty()) { q.prepare("DELETE FROM kmmSplits WHERE transactionId = :txId AND splitId = :splitId"); - QValueList<unsigned int>::const_iterator it = dbList.begin(); + TQValueList<unsigned int>::const_iterator it = dbList.begin(); while (it != dbList.end()) { q.bindValue(":txId", txId); q.bindValue(":splitId", *it); @@ -1535,62 +1527,62 @@ void MyMoneyStorageSql::writeSplits(const QString& txId, const QString& type, co } } -void MyMoneyStorageSql::writeSplit(const QString& txId, const MyMoneySplit& split, - const QString& type, const int splitId, MyMoneySqlQuery& q) { +void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& split, + const TQString& type, const int splitId, MyMoneySqlQuery& q) { DBG("*** Entering MyMoneyStorageSql::writeSplit"); q.bindValue(":transactionId", txId); q.bindValue(":txType", type); q.bindValue(":splitId", splitId); q.bindValue(":payeeId", split.payeeId()); - if (split.reconcileDate() == QDate()) + if (split.reconcileDate() == TQDate()) q.bindValue(":reconcileDate", split.reconcileDate()); else - q.bindValue(":reconcileDate", split.reconcileDate().toString(Qt::ISODate)); + q.bindValue(":reconcileDate", TQString(split.reconcileDate().toString(Qt::ISODate))); q.bindValue(":action", split.action()); q.bindValue(":reconcileFlag", split.reconcileFlag()); q.bindValue(":value", split.value().toString()); q.bindValue(":valueFormatted", split.value() .formatMoney("", -1, false) - .replace(QChar(','), QChar('.'))); + .tqreplace(TQChar(','), TQChar('.'))); q.bindValue(":shares", split.shares().toString()); MyMoneyAccount acc = m_storagePtr->account(split.accountId()); MyMoneySecurity sec = m_storagePtr->security(acc.currencyId()); q.bindValue(":sharesFormatted", split.shares(). formatMoney("", MyMoneyMoney::denomToPrec(sec.smallestAccountFraction()), false). - replace(QChar(','), QChar('.'))); + tqreplace(TQChar(','), TQChar('.'))); MyMoneyMoney price = split.actualPrice(); if (!price.isZero()) { q.bindValue(":price", price.toString()); q.bindValue(":priceFormatted", price.formatMoney ("", KMyMoneySettings::pricePrecision(), false) - .replace(QChar(','), QChar('.'))); + .tqreplace(TQChar(','), TQChar('.'))); } else { - q.bindValue(":price", QString()); - q.bindValue(":priceFormatted", QString()); + q.bindValue(":price", TQString()); + q.bindValue(":priceFormatted", TQString()); } q.bindValue(":memo", split.memo()); q.bindValue(":accountId", split.accountId()); q.bindValue(":checkNumber", split.number()); q.bindValue(":postDate", m_txPostDate.toString(Qt::ISODate)); // FIXME: when Tom puts date into split object q.bindValue(":bankId", split.bankID()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Split"))); - deleteKeyValuePairs("SPLIT", txId + QString::number(splitId)); - writeKeyValuePairs("SPLIT", txId + QString::number(splitId), split.pairs()); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Split"))); + deleteKeyValuePairs("SPLIT", txId + TQString::number(splitId)); + writeKeyValuePairs("SPLIT", txId + TQString::number(splitId), split.pairs()); } // **** Schedules **** void MyMoneyStorageSql::writeSchedules() { DBG("*** Entering MyMoneyStorageSql::writeSchedules"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); q.prepare("SELECT id FROM kmmSchedules;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Schedule list")); while (q.next()) dbList.append(q.value(0).toString()); - const QValueList<MyMoneySchedule> list = m_storage->scheduleList(); - QValueList<MyMoneySchedule>::ConstIterator it; + const TQValueList<MyMoneySchedule> list = m_storage->scheduleList(); + TQValueList<MyMoneySchedule>::ConstIterator it; MyMoneySqlQuery q2(this); //TODO: find a way to prepare the queries outside of the loop. writeSchedule() // modifies the query passed to it, so they have to be re-prepared every pass. @@ -1599,7 +1591,7 @@ void MyMoneyStorageSql::writeSchedules() { q.prepare (m_db.m_tables["kmmSchedules"].updateString()); q2.prepare (m_db.m_tables["kmmSchedules"].insertString()); bool insert = true; - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); insert = false; writeSchedule(*it, q, insert); @@ -1610,7 +1602,7 @@ void MyMoneyStorageSql::writeSchedules() { } if (!dbList.isEmpty()) { - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { deleteSchedule(*it); ++it; @@ -1648,7 +1640,7 @@ void MyMoneyStorageSql::removeSchedule(const MyMoneySchedule& sched) { endCommitUnit(__func__); } -void MyMoneyStorageSql::deleteSchedule (const QString& id) { +void MyMoneyStorageSql::deleteSchedule (const TQString& id) { DBG("*** Entering MyMoneyStorageSql::deleteSchedule"); deleteTransaction(id); MyMoneySqlQuery q(this); @@ -1673,8 +1665,8 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer q.bindValue(":occurenceString", sch.occurenceToString()); q.bindValue(":paymentType", sch.paymentType()); q.bindValue(":paymentTypeString", MyMoneySchedule::paymentMethodToString(sch.paymentType())); - q.bindValue(":startDate", sch.startDate().toString(Qt::ISODate)); - q.bindValue(":endDate", sch.endDate().toString(Qt::ISODate)); + q.bindValue(":startDate", TQString(sch.startDate().toString(Qt::ISODate))); + q.bindValue(":endDate", TQString(sch.endDate().toString(Qt::ISODate))); if (sch.isFixed()) { q.bindValue(":fixed", "Y"); } else { @@ -1686,24 +1678,24 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer q.bindValue(":autoEnter", "N"); } q.bindValue(":lastPayment", sch.lastPayment()); - q.bindValue(":nextPaymentDue", sch.nextDueDate().toString(Qt::ISODate)); + q.bindValue(":nextPaymentDue", TQString(sch.nextDueDate().toString(Qt::ISODate))); q.bindValue(":weekendOption", sch.weekendOption()); q.bindValue(":weekendOptionString", MyMoneySchedule::weekendOptionToString(sch.weekendOption())); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Schedules"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedules"))); //store the payment history for this scheduled task. //easiest way is to delete all and re-insert; it's not a high use table q.prepare("DELETE FROM kmmSchedulePaymentHistory WHERE schedId = :id;"); q.bindValue(":id", sch.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Schedule Payment History"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Schedule Payment History"))); q.prepare (m_db.m_tables["kmmSchedulePaymentHistory"].insertString()); - QValueList<QDate> payments = sch.recordedPayments(); - QValueList<QDate>::ConstIterator it; + TQValueList<TQDate> payments = sch.recordedPayments(); + TQValueList<TQDate>::ConstIterator it; for (it=payments.begin(); it!=payments.end(); ++it) { q.bindValue(":schedId", sch.id()); - q.bindValue(":payDate", (*it).toString(Qt::ISODate)); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Schedule Payment History"))); + q.bindValue(":payDate", TQString((*it).toString(Qt::ISODate))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedule Payment History"))); } //store the transaction data for this task. @@ -1726,19 +1718,19 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer void MyMoneyStorageSql::writeSecurities() { DBG("*** Entering MyMoneyStorageSql::writeSecurities"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); MyMoneySqlQuery q2(this); q.prepare("SELECT id FROM kmmSecurities;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building security list")); while (q.next()) dbList.append(q.value(0).toString()); - const QValueList<MyMoneySecurity> securityList = m_storage->securityList(); + const TQValueList<MyMoneySecurity> securityList = m_storage->securityList(); signalProgress(0, securityList.count(), "Writing Securities..."); q.prepare (m_db.m_tables["kmmSecurities"].updateString()); q2.prepare (m_db.m_tables["kmmSecurities"].insertString()); - for(QValueList<MyMoneySecurity>::ConstIterator it = securityList.begin(); it != securityList.end(); ++it) { - if (dbList.contains((*it).id())) { + for(TQValueList<MyMoneySecurity>::ConstIterator it = securityList.begin(); it != securityList.end(); ++it) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeSecurity((*it), q); } else { @@ -1750,7 +1742,7 @@ void MyMoneyStorageSql::writeSecurities() { if (!dbList.isEmpty()) { q.prepare("DELETE FROM kmmSecurities WHERE id = :id"); q2.prepare("DELETE FROM kmmPrices WHERE fromId = :id OR toId = :id"); - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { q.bindValue(":id", (*it)); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "deleting Security")); @@ -1792,7 +1784,7 @@ void MyMoneyStorageSql::removeSecurity(const MyMoneySecurity& sec) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmSecurities"].deleteString()); q.bindValue(":id", sec.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Security"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Security"))); --m_securities; writeFileInfo(); endCommitUnit(__func__); @@ -1808,7 +1800,7 @@ void MyMoneyStorageSql::writeSecurity(const MyMoneySecurity& security, MyMoneySq q.bindValue(":smallestAccountFraction", security.smallestAccountFraction()); q.bindValue(":tradingCurrency", security.tradingCurrency()); q.bindValue(":tradingMarket", security.tradingMarket()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString ("writing Securities"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString ("writing Securities"))); //Add in Key-Value Pairs for security writeKeyValuePairs("SECURITY", security.id(), security.pairs()); @@ -1822,7 +1814,7 @@ void MyMoneyStorageSql::writePrices() { // easiest way is to delete all and re-insert MyMoneySqlQuery q(this); q.prepare("DELETE FROM kmmPrices"); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Prices"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Prices"))); m_prices = 0; const MyMoneyPriceList list = m_storage->priceList(); @@ -1849,13 +1841,13 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) { startCommitUnit(__func__); bool newRecord = false; MyMoneySqlQuery q(this); - QString s = m_db.m_tables["kmmPrices"].selectAllString(false); + TQString s = m_db.m_tables["kmmPrices"].selectAllString(false); s += " WHERE fromId = :fromId AND toId = :toId AND priceDate = :priceDate;"; q.prepare (s); q.bindValue(":fromId", p.from()); q.bindValue(":toId", p.to()); - q.bindValue(":priceDate", p.date().toString(Qt::ISODate)); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("finding Price"))); + q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("finding Price"))); if (q.next()) { q.prepare(m_db.m_tables["kmmPrices"].updateString()); } else { @@ -1865,12 +1857,12 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) { } q.bindValue(":fromId", p.from()); q.bindValue(":toId", p.to()); - q.bindValue(":priceDate", p.date().toString(Qt::ISODate)); - q.bindValue(":price", p.rate(QString()).toString()); + q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); + q.bindValue(":price", p.rate(TQString()).toString()); q.bindValue(":priceFormatted", - p.rate(QString()).formatMoney("", KMyMoneySettings::pricePrecision())); + p.rate(TQString()).formatMoney("", KMyMoneySettings::pricePrecision())); q.bindValue(":priceSource", p.source()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Price"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Price"))); if (newRecord) writeFileInfo(); endCommitUnit(__func__); @@ -1883,8 +1875,8 @@ void MyMoneyStorageSql::removePrice(const MyMoneyPrice& p) { q.prepare (m_db.m_tables["kmmPrices"].deleteString()); q.bindValue(":fromId", p.from()); q.bindValue(":toId", p.to()); - q.bindValue(":priceDate", p.date().toString(Qt::ISODate)); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Price"))); + q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Price"))); --m_prices; writeFileInfo(); endCommitUnit(__func__); @@ -1896,30 +1888,30 @@ void MyMoneyStorageSql::writePrice(const MyMoneyPrice& p) { q.prepare (m_db.m_tables["kmmPrices"].insertString()); q.bindValue(":fromId", p.from()); q.bindValue(":toId", p.to()); - q.bindValue(":priceDate", p.date().toString(Qt::ISODate)); - q.bindValue(":price", p.rate(QString()).toString()); - q.bindValue(":priceFormatted", p.rate(QString()).formatMoney("", 2)); + q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); + q.bindValue(":price", p.rate(TQString()).toString()); + q.bindValue(":priceFormatted", p.rate(TQString()).formatMoney("", 2)); q.bindValue(":priceSource", p.source()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Prices"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Prices"))); } // **** Currencies **** void MyMoneyStorageSql::writeCurrencies() { DBG("*** Entering MyMoneyStorageSql::writeCurrencies"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); MyMoneySqlQuery q2(this); q.prepare("SELECT ISOCode FROM kmmCurrencies;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Currency list")); while (q.next()) dbList.append(q.value(0).toString()); - const QValueList<MyMoneySecurity> currencyList = m_storage->currencyList(); + const TQValueList<MyMoneySecurity> currencyList = m_storage->currencyList(); signalProgress(0, currencyList.count(), "Writing Currencies..."); q.prepare (m_db.m_tables["kmmCurrencies"].updateString()); q2.prepare (m_db.m_tables["kmmCurrencies"].insertString()); - for(QValueList<MyMoneySecurity>::ConstIterator it = currencyList.begin(); it != currencyList.end(); ++it) { - if (dbList.contains((*it).id())) { + for(TQValueList<MyMoneySecurity>::ConstIterator it = currencyList.begin(); it != currencyList.end(); ++it) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeCurrency((*it), q); } else { @@ -1930,7 +1922,7 @@ void MyMoneyStorageSql::writeCurrencies() { if (!dbList.isEmpty()) { q.prepare("DELETE FROM kmmCurrencies WHERE ISOCode = :ISOCode"); - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { q.bindValue(":ISOCode", (*it)); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "deleting Currency")); @@ -1966,7 +1958,7 @@ void MyMoneyStorageSql::removeCurrency(const MyMoneySecurity& sec) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmCurrencies"].deleteString()); q.bindValue(":ISOcode", sec.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Currency"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Currency"))); --m_currencies; writeFileInfo(); endCommitUnit(__func__); @@ -1980,35 +1972,35 @@ void MyMoneyStorageSql::writeCurrency(const MyMoneySecurity& currency, MyMoneySq q.bindValue(":typeString", MyMoneySecurity::securityTypeToString(currency.securityType())); // writing the symbol as three short ints is a PITA, but the // problem is that database drivers have incompatible ways of declaring UTF8 - QString symbol = currency.tradingSymbol() + " "; - q.bindValue(":symbol1", symbol.mid(0,1).unicode()->unicode()); - q.bindValue(":symbol2", symbol.mid(1,1).unicode()->unicode()); - q.bindValue(":symbol3", symbol.mid(2,1).unicode()->unicode()); + TQString symbol = currency.tradingSymbol() + " "; + q.bindValue(":symbol1", symbol.mid(0,1).tqunicode()->tqunicode()); + q.bindValue(":symbol2", symbol.mid(1,1).tqunicode()->tqunicode()); + q.bindValue(":symbol3", symbol.mid(2,1).tqunicode()->tqunicode()); q.bindValue(":symbolString", symbol); q.bindValue(":partsPerUnit", currency.partsPerUnit()); q.bindValue(":smallestCashFraction", currency.smallestCashFraction()); q.bindValue(":smallestAccountFraction", currency.smallestAccountFraction()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Currencies"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Currencies"))); } void MyMoneyStorageSql::writeReports() { DBG("*** Entering MyMoneyStorageSql::writeReports"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); MyMoneySqlQuery q2(this); q.prepare("SELECT id FROM kmmReportConfig;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Report list")); while (q.next()) dbList.append(q.value(0).toString()); - QValueList<MyMoneyReport> list = m_storage->reportList(); + TQValueList<MyMoneyReport> list = m_storage->reportList(); signalProgress(0, list.count(), "Writing Reports..."); - QValueList<MyMoneyReport>::ConstIterator it; + TQValueList<MyMoneyReport>::ConstIterator it; q.prepare (m_db.m_tables["kmmReportConfig"].updateString()); q2.prepare (m_db.m_tables["kmmReportConfig"].insertString()); for(it = list.begin(); it != list.end(); ++it){ - if (dbList.contains((*it).id())) { + if (dbList.tqcontains((*it).id())) { dbList.remove ((*it).id()); writeReport(*it, q); } else { @@ -2019,7 +2011,7 @@ void MyMoneyStorageSql::writeReports() { if (!dbList.isEmpty()) { q.prepare("DELETE FROM kmmReportConfig WHERE id = :id"); - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { q.bindValue(":id", (*it)); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "deleting Report")); @@ -2055,7 +2047,7 @@ void MyMoneyStorageSql::removeReport(const MyMoneyReport& rep) { MyMoneySqlQuery q(this); q.prepare("DELETE FROM kmmReportConfig WHERE id = :id"); q.bindValue(":id", rep.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Report"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Report"))); --m_reports; writeFileInfo(); endCommitUnit(__func__); @@ -2063,34 +2055,34 @@ void MyMoneyStorageSql::removeReport(const MyMoneyReport& rep) { void MyMoneyStorageSql::writeReport (const MyMoneyReport& rep, MyMoneySqlQuery& q) { DBG("*** Entering MyMoneyStorageSql::writeReport"); - QDomDocument d; // create a dummy XML document - QDomElement e = d.createElement("REPORTS"); + TQDomDocument d; // create a dummy XML document + TQDomElement e = d.createElement("REPORTS"); d.appendChild (e); rep.writeXML(d, e); // write the XML to document q.bindValue(":id", rep.id()); q.bindValue(":name", rep.name()); q.bindValue(":XML", d.toString()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Reports"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Reports"))); //m_hiIdReports = calcHighId(m_hiIdReports, rep.id()); } void MyMoneyStorageSql::writeBudgets() { DBG("*** Entering MyMoneyStorageSql::writeBudgets"); // first, get a list of what's on the database (see writeInstitutions) - QValueList<QString> dbList; + TQValueList<TQString> dbList; MyMoneySqlQuery q(this); MyMoneySqlQuery q2(this); q.prepare("SELECT name FROM kmmBudgetConfig;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "building Budget list")); while (q.next()) dbList.append(q.value(0).toString()); - QValueList<MyMoneyBudget> list = m_storage->budgetList(); + TQValueList<MyMoneyBudget> list = m_storage->budgetList(); signalProgress(0, list.count(), "Writing Budgets..."); - QValueList<MyMoneyBudget>::ConstIterator it; + TQValueList<MyMoneyBudget>::ConstIterator it; q.prepare (m_db.m_tables["kmmBudgetConfig"].updateString()); q2.prepare (m_db.m_tables["kmmBudgetConfig"].insertString()); for(it = list.begin(); it != list.end(); ++it){ - if (dbList.contains((*it).name())) { + if (dbList.tqcontains((*it).name())) { dbList.remove ((*it).name()); writeBudget(*it, q); } else { @@ -2101,7 +2093,7 @@ void MyMoneyStorageSql::writeBudgets() { if (!dbList.isEmpty()) { q.prepare("DELETE FROM kmmBudgetConfig WHERE id = :id"); - QValueList<QString>::const_iterator it = dbList.begin(); + TQValueList<TQString>::const_iterator it = dbList.begin(); while (it != dbList.end()) { q.bindValue(":name", (*it)); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "deleting Budget")); @@ -2137,7 +2129,7 @@ void MyMoneyStorageSql::removeBudget(const MyMoneyBudget& bud) { MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmBudgetConfig"].deleteString()); q.bindValue(":id", bud.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting Budget"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Budget"))); --m_budgets; writeFileInfo(); endCommitUnit(__func__); @@ -2145,15 +2137,15 @@ void MyMoneyStorageSql::removeBudget(const MyMoneyBudget& bud) { void MyMoneyStorageSql::writeBudget (const MyMoneyBudget& bud, MyMoneySqlQuery& q) { DBG("*** Entering MyMoneyStorageSql::writeBudget"); - QDomDocument d; // create a dummy XML document - QDomElement e = d.createElement("BUDGETS"); + TQDomDocument d; // create a dummy XML document + TQDomElement e = d.createElement("BUDGETS"); d.appendChild (e); bud.writeXML(d, e); // write the XML to document q.bindValue(":id", bud.id()); q.bindValue(":name", bud.name()); q.bindValue(":start", bud.budgetStart()); q.bindValue(":XML", d.toString()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing Budgets"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Budgets"))); } void MyMoneyStorageSql::writeFileInfo() { @@ -2165,7 +2157,7 @@ void MyMoneyStorageSql::writeFileInfo() { MyMoneySqlQuery q(this); q.prepare ("SELECT * FROM kmmFileInfo;"); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, "checking fileinfo")); - QString qs; + TQString qs; if (q.next()) qs = m_db.m_tables["kmmFileInfo"].updateString(); else @@ -2173,9 +2165,9 @@ void MyMoneyStorageSql::writeFileInfo() { q.prepare(qs); q.bindValue(":version", m_dbVersion); q.bindValue(":fixLevel", m_storage->fileFixVersion()); - q.bindValue(":created", m_storage->creationDate().toString(Qt::ISODate)); + q.bindValue(":created", TQString(m_storage->creationDate().toString(Qt::ISODate))); //q.bindValue(":lastModified", m_storage->lastModificationDate().toString(Qt::ISODate)); - q.bindValue(":lastModified", QDate::currentDate().toString(Qt::ISODate)); + q.bindValue(":lastModified", TQString(TQDate::tqcurrentDate().toString(Qt::ISODate))); q.bindValue(":baseCurrency", m_storage->pairs()["kmm-baseCurrency"]); q.bindValue(":institutions", (unsigned long long) m_institutions); q.bindValue(":accounts", (unsigned long long) m_accounts); @@ -2189,8 +2181,8 @@ void MyMoneyStorageSql::writeFileInfo() { q.bindValue(":reports", (unsigned long long) m_reports); q.bindValue(":kvps", (unsigned long long) m_kvps); q.bindValue(":budgets", (unsigned long long) m_budgets); - q.bindValue(":dateRangeStart", QDate()); - q.bindValue(":dateRangeEnd", QDate()); + q.bindValue(":dateRangeStart", TQDate()); + q.bindValue(":dateRangeEnd", TQDate()); //FIXME: This modifies all m_<variable> used in this function. // Sometimes the memory has been updated. @@ -2217,19 +2209,19 @@ void MyMoneyStorageSql::writeFileInfo() { q.bindValue(":updateInProgress", "N"); q.bindValue(":logonUser", m_logonUser); q.bindValue(":logonAt", m_logonAt.toString(Qt::ISODate)); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing FileInfo"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing FileInfo"))); } // **** Key/value pairs **** -void MyMoneyStorageSql::writeKeyValuePairs(const QString& kvpType, const QString& kvpId, const QMap<QString, QString>& pairs) { +void MyMoneyStorageSql::writeKeyValuePairs(const TQString& kvpType, const TQString& kvpId, const TQMap<TQString, TQString>& pairs) { DBG("*** Entering MyMoneyStorageSql::writeKeyValuePairs"); - QMap<QString, QString>::const_iterator it; + TQMap<TQString, TQString>::const_iterator it; for(it = pairs.begin(); it != pairs.end(); ++it) { writeKeyValuePair (kvpType, kvpId, it.key(), it.data()); } } -void MyMoneyStorageSql::writeKeyValuePair (const QString& kvpType, const QString& kvpId, const QString& kvpKey, const QString& kvpData) { +void MyMoneyStorageSql::writeKeyValuePair (const TQString& kvpType, const TQString& kvpId, const TQString& kvpKey, const TQString& kvpData) { DBG("*** Entering MyMoneyStorageSql::writeKeyValuePair"); MyMoneySqlQuery q(this); q.prepare (m_db.m_tables["kmmKeyValuePairs"].insertString()); @@ -2237,17 +2229,17 @@ void MyMoneyStorageSql::writeKeyValuePair (const QString& kvpType, const QString q.bindValue(":kvpId", kvpId); q.bindValue(":kvpKey", kvpKey); q.bindValue(":kvpData", kvpData); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("writing KVP"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing KVP"))); ++m_kvps; } -void MyMoneyStorageSql::deleteKeyValuePairs (const QString& kvpType, const QString& kvpId) { +void MyMoneyStorageSql::deleteKeyValuePairs (const TQString& kvpType, const TQString& kvpId) { DBG("*** Entering MyMoneyStorageSql::deleteKeyValuePairs"); MyMoneySqlQuery q(this); q.prepare ("DELETE FROM kmmKeyValuePairs WHERE kvpType = :kvpType AND kvpId = :kvpId;"); q.bindValue(":kvpType", kvpType); q.bindValue(":kvpId", kvpId); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("deleting kvp for %1 %2").arg(kvpType).arg(kvpId))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting kvp for %1 %2").tqarg(kvpType).tqarg(kvpId))); m_kvps -= q.numRowsAffected(); } @@ -2262,12 +2254,12 @@ void MyMoneyStorageSql::deleteKeyValuePairs (const QString& kvpType, const QStri void MyMoneyStorageSql::readFileInfo(void) { DBG("*** Entering MyMoneyStorageSql::readFileInfo"); - signalProgress(0, 18, QObject::tr("Loading file information...")); + signalProgress(0, 18, TQObject::tr("Loading file information...")); MyMoneyDbTable& t = m_db.m_tables["kmmFileInfo"]; MyMoneySqlQuery q(this); q.prepare (t.selectAllString()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading FileInfo"))); - if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("retrieving FileInfo"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading FileInfo"))); + if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("retrieving FileInfo"))); MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; while (ft != t.end()) { @@ -2302,10 +2294,10 @@ void MyMoneyStorageSql::readFileInfo(void) { ++ft; ++i; signalProgress(i,0); } - m_storage->setPairs(readKeyValuePairs("STORAGE", QString("")).pairs()); + m_storage->setPairs(readKeyValuePairs("STORAGE", TQString("")).pairs()); } -/*void MyMoneyStorageSql::setVersion (const QString& version) { +/*void MyMoneyStorageSql::setVersion (const TQString& version) { DBG("*** Entering MyMoneyStorageSql::setVersion"); m_dbVersion = version.section('.', 0, 0).toUInt(); m_minorVersion = version.section('.', 1, 1).toUInt(); @@ -2318,31 +2310,31 @@ void MyMoneyStorageSql::readFileInfo(void) { void MyMoneyStorageSql::readInstitutions(void) { TRY - QMap<QString, MyMoneyInstitution> iList = fetchInstitutions(); + TQMap<TQString, MyMoneyInstitution> iList = fetchInstitutions(); m_storage->loadInstitutions(iList); readFileInfo(); m_storage->loadInstitutionId(m_hiIdInstitutions); PASS } -const QMap<QString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions (const QStringList& idList, bool forUpdate) const { +const TQMap<TQString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions (const TQStringList& idList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::readInstitutions"); - signalProgress(0, m_institutions, QObject::tr("Loading institutions...")); + signalProgress(0, m_institutions, TQObject::tr("Loading institutions...")); int progress = 0; - QMap<QString, MyMoneyInstitution> iList; + TQMap<TQString, MyMoneyInstitution> iList; unsigned long lastId = 0; const MyMoneyDbTable& t = m_db.m_tables["kmmInstitutions"]; MyMoneySqlQuery sq(const_cast <MyMoneyStorageSql*> (this)); sq.prepare ("SELECT id from kmmAccounts where institutionId = :id"); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString (t.selectAllString(false)); + TQString queryString (t.selectAllString(false)); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. if (! idList.empty()) { queryString += " WHERE"; for (unsigned i = 0; i < idList.count(); ++i) - queryString += " id = :id" + QString::number(i) + " OR"; + queryString += " id = :id" + TQString::number(i) + " OR"; queryString = queryString.left(queryString.length() - 2); } if (forUpdate) @@ -2353,17 +2345,17 @@ const QMap<QString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions (co q.prepare (queryString); if (! idList.empty()) { - QStringList::const_iterator bindVal = idList.begin(); + TQStringList::const_iterator bindVal = idList.begin(); for (int i = 0; bindVal != idList.end(); ++i, ++bindVal) { - q.bindValue (":id" + QString::number(i), *bindVal); + q.bindValue (":id" + TQString::number(i), *bindVal); } } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Institution"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Institution"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString iid; + TQString iid; MyMoneyInstitution inst; while (ft != t.end()) { CASE(id) iid = GETSTRING; @@ -2378,10 +2370,10 @@ const QMap<QString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions (co } // get list of subaccounts sq.bindValue(":id", iid); - if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Institution AccountList"))); - QStringList aList; + if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Institution AccountList"))); + TQStringList aList; while (sq.next()) aList.append(sq.value(0).toString()); - for (QStringList::ConstIterator it = aList.begin(); it != aList.end(); ++it) + for (TQStringList::ConstIterator it = aList.begin(); it != aList.end(); ++it) inst.addAccountId(*it); iList[iid] = MyMoneyInstitution(iid, inst); @@ -2394,18 +2386,18 @@ const QMap<QString, MyMoneyInstitution> MyMoneyStorageSql::fetchInstitutions (co return iList; } -void MyMoneyStorageSql::readPayees (const QString& id) { +void MyMoneyStorageSql::readPayees (const TQString& id) { DBG("*** Entering MyMoneyStorageSql::readPayees"); - QValueList<QString> list; + TQValueList<TQString> list; list.append(id); readPayees(list); } -void MyMoneyStorageSql::readPayees(const QValueList<QString> pid) { +void MyMoneyStorageSql::readPayees(const TQValueList<TQString> pid) { DBG("*** Entering MyMoneyStorageSql::readPayees"); TRY - QStringList pidList; - qCopy(pid.begin(), pid.end(), qBackInserter(pidList)); + TQStringList pidList; + tqCopy(pid.begin(), pid.end(), qBackInserter(pidList)); m_storage->loadPayees(fetchPayees(pidList)); readFileInfo(); @@ -2416,15 +2408,15 @@ void MyMoneyStorageSql::readPayees(const QValueList<QString> pid) { // if (pid.isEmpty()) m_payeeListRead = true; } -const QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees (const QStringList& idList, bool /*forUpdate*/) const { +const TQMap<TQString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees (const TQStringList& idList, bool /*forUpdate*/) const { DBG("*** Entering MyMoneyStorageSql::readPayees"); - if (m_displayStatus) { - signalProgress(0, m_payees, QObject::tr("Loading payees...")); + if (m_displaytqStatus) { + signalProgress(0, m_payees, TQObject::tr("Loading payees...")); } else { // if (m_payeeListRead) return; } int progress = 0; - QMap<QString, MyMoneyPayee> pList; + TQMap<TQString, MyMoneyPayee> pList; //unsigned long lastId; const MyMoneyDbTable& t = m_db.m_tables["kmmPayees"]; MyMoneyDbTable::field_iterator payeeEnd = t.end(); @@ -2432,26 +2424,26 @@ const QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees (const QStringL if (idList.isEmpty()) { q.prepare (t.selectAllString()); } else { - QString whereClause = " where ("; - QString itemConnector = ""; - QStringList::ConstIterator it; + TQString whereClause = " where ("; + TQString itemConnector = ""; + TQStringList::ConstIterator it; for (it = idList.begin(); it != idList.end(); ++it) { - whereClause.append(QString("%1id = '%2'").arg(itemConnector).arg(*it)); + whereClause.append(TQString("%1id = '%2'").tqarg(itemConnector).tqarg(*it)); itemConnector = " or "; } whereClause += ")"; q.prepare (t.selectAllString(false) + whereClause); } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Payee"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Payee"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString pid; - QString boolChar; + TQString pid; + TQString boolChar; MyMoneyPayee payee; unsigned int type; bool ignoreCase; - QString matchKeys; + TQString matchKeys; while (ft != payeeEnd) { CASE(id) pid = GETCSTRING; else CASE(name) payee.setName(GETSTRING); @@ -2476,48 +2468,48 @@ const QMap<QString, MyMoneyPayee> MyMoneyStorageSql::fetchPayees (const QStringL PASS } else { pList[pid] = MyMoneyPayee(pid, payee); - //unsigned long id = extractId(QString(pid)); + //unsigned long id = extractId(TQString(pid)); //if(id > lastId) // lastId = id; } - if (m_displayStatus) signalProgress(++progress, 0); + if (m_displaytqStatus) signalProgress(++progress, 0); } return pList; } -const QMap<QString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const QStringList& idList, bool forUpdate) const { +const TQMap<TQString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const TQStringList& idList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::fetchAccounts"); - signalProgress(0, m_accounts, QObject::tr("Loading accounts...")); + signalProgress(0, m_accounts, TQObject::tr("Loading accounts...")); int progress = 0; - QMap<QString, MyMoneyAccount> accList; - QStringList kvpAccountList; + TQMap<TQString, MyMoneyAccount> accList; + TQStringList kvpAccountList; const MyMoneyDbTable& t = m_db.m_tables["kmmAccounts"]; MyMoneyDbTable::field_iterator accEnd = t.end(); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); MyMoneySqlQuery sq(const_cast <MyMoneyStorageSql*> (this)); - QString childQueryString = "SELECT id, parentId FROM kmmAccounts WHERE "; - QString queryString (t.selectAllString(false)); + TQString childQueryString = "SELECT id, tqparentId FROM kmmAccounts WHERE "; + TQString queryString (t.selectAllString(false)); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. if (! idList.empty()) { kvpAccountList = idList; queryString += " WHERE id IN ("; - childQueryString += " parentId IN ("; + childQueryString += " tqparentId IN ("; for (unsigned i = 0; i < idList.count(); ++i) { - queryString += " :id" + QString::number(i) + ", "; - childQueryString += ":id" + QString::number(i) + ", "; + queryString += " :id" + TQString::number(i) + ", "; + childQueryString += ":id" + TQString::number(i) + ", "; } queryString = queryString.left(queryString.length() - 2) + ")"; childQueryString = childQueryString.left(childQueryString.length() - 2) + ")"; } else { - childQueryString += " NOT parentId IS NULL"; + childQueryString += " NOT tqparentId IS NULL"; } queryString += " ORDER BY id"; - childQueryString += " ORDER BY parentid, id"; + childQueryString += " ORDER BY tqparentid, id"; if (forUpdate) { queryString += " FOR UPDATE"; @@ -2528,26 +2520,26 @@ const QMap<QString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const QStr sq.prepare (childQueryString); if (! idList.empty()) { - QStringList::const_iterator bindVal = idList.begin(); + TQStringList::const_iterator bindVal = idList.begin(); for (int i = 0; bindVal != idList.end(); ++i, ++bindVal) { - q.bindValue (":id" + QString::number(i), *bindVal); - sq.bindValue (":id" + QString::number(i), *bindVal); + q.bindValue (":id" + TQString::number(i), *bindVal); + sq.bindValue (":id" + TQString::number(i), *bindVal); } } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Account"))); - if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading subAccountList"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Account"))); + if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading subAccountList"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString aid; - QString balance; + TQString aid; + TQString balance; MyMoneyAccount acc; while (ft != accEnd) { CASE(id) aid = GETCSTRING; else CASE(institutionId) acc.setInstitutionId(GETCSTRING); - else CASE(parentId) acc.setParentAccountId(GETCSTRING); + else CASE(tqparentId) acc.setParentAccountId(GETCSTRING); else CASE(lastReconciled) acc.setLastReconciliationDate(GETDATE); else CASE(lastModified) acc.setLastModified(GETDATE); else CASE(openingDate) acc.setOpeningDate(GETDATE); @@ -2575,10 +2567,10 @@ const QMap<QString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const QStr signalProgress(++progress, 0); } - QMapIterator<QString, MyMoneyAccount> it_acc; - QMapIterator<QString, MyMoneyAccount> accListEnd = accList.end(); + TQMapIterator<TQString, MyMoneyAccount> it_acc; + TQMapIterator<TQString, MyMoneyAccount> accListEnd = accList.end(); while (sq.next()) { - it_acc = accList.find(sq.value(1).toString()); + it_acc = accList.tqfind(sq.value(1).toString()); if (it_acc != accListEnd && it_acc.data().id() == sq.value(1).toString()) { while (sq.isValid() && it_acc != accListEnd && it_acc.data().id() == sq.value(1).toString()) { @@ -2593,16 +2585,16 @@ const QMap<QString, MyMoneyAccount> MyMoneyStorageSql::fetchAccounts (const QStr // where it may be able to be done in O(n), if things are just right. // The operator[] call in the loop is the most expensive call in this function, according // to several profile runs. - QMap <QString, MyMoneyKeyValueContainer> kvpResult = readKeyValuePairs("ACCOUNT", kvpAccountList); - QMap <QString, MyMoneyKeyValueContainer>::const_iterator kvp_end = kvpResult.end(); - for (QMap <QString, MyMoneyKeyValueContainer>::const_iterator it_kvp = kvpResult.begin(); + TQMap <TQString, MyMoneyKeyValueContainer> kvpResult = readKeyValuePairs("ACCOUNT", kvpAccountList); + TQMap <TQString, MyMoneyKeyValueContainer>::const_iterator kvp_end = kvpResult.end(); + for (TQMap <TQString, MyMoneyKeyValueContainer>::const_iterator it_kvp = kvpResult.begin(); it_kvp != kvp_end; ++it_kvp) { accList[it_kvp.key()].setPairs(it_kvp.data().pairs()); } kvpResult = readKeyValuePairs("ONLINEBANKING", kvpAccountList); kvp_end = kvpResult.end(); - for (QMap <QString, MyMoneyKeyValueContainer>::const_iterator it_kvp = kvpResult.begin(); + for (TQMap <TQString, MyMoneyKeyValueContainer>::const_iterator it_kvp = kvpResult.begin(); it_kvp != kvp_end; ++it_kvp) { accList[it_kvp.key()].setOnlineBankingSettings(it_kvp.data()); } @@ -2615,15 +2607,15 @@ void MyMoneyStorageSql::readAccounts(void) { m_storage->loadAccountId(m_hiIdAccounts); } -const QMap<QString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const QStringList& idList, const QDate& date) const { +const TQMap<TQString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const TQStringList& idList, const TQDate& date) const { - QMap<QString, MyMoneyMoney> returnValue; + TQMap<TQString, MyMoneyMoney> returnValue; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString = "SELECT action, shares, accountId, postDate " + TQString queryString = "SELECT action, shares, accountId, postDate " "FROM kmmSplits WHERE txType = 'N' AND accountId in ("; for (unsigned i = 0; i < idList.count(); ++i) { - queryString += " :id" + QString::number(i) + ", "; + queryString += " :id" + TQString::number(i) + ", "; } queryString = queryString.left(queryString.length() - 2) + " )"; @@ -2631,20 +2623,20 @@ const QMap<QString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const QStringL // the <= operator misbehave when the date matches. To avoid this, add a day to the // requested date and use the < operator. if (date.isValid() && !date.isNull()) - queryString += QString(" AND postDate < '%1'").arg(date.addDays(1).toString(Qt::ISODate)); + queryString += TQString(" AND postDate < '%1'").tqarg(date.addDays(1).toString(Qt::ISODate)); DBG (queryString); q.prepare(queryString); - QStringList::const_iterator bindVal = idList.begin(); + TQStringList::const_iterator bindVal = idList.begin(); for (int i = 0; bindVal != idList.end(); ++i, ++bindVal) { - q.bindValue (":id" + QString::number(i), *bindVal); + q.bindValue (":id" + TQString::number(i), *bindVal); returnValue[*bindVal] = MyMoneyMoney(0); } if (!q.exec()) - throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("fetching balance"))); - QString id; - QString shares; - QString action; + throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("fetching balance"))); + TQString id; + TQString shares; + TQString action; while (q.next()) { id = q.value(2).toString(); shares = q.value(1).toString(); @@ -2657,7 +2649,7 @@ const QMap<QString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const QStringL return returnValue; } -void MyMoneyStorageSql::readTransactions(const QString& tidList, const QString& dateClause) { +void MyMoneyStorageSql::readTransactions(const TQString& tidList, const TQString& dateClause) { TRY m_storage->loadTransactions(fetchTransactions(tidList, dateClause)); m_storage->loadTransactionId(m_hiIdTransactions); @@ -2671,13 +2663,13 @@ void MyMoneyStorageSql::readTransactions(const MyMoneyTransactionFilter& filter) PASS } -const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (const QString& tidList, const QString& dateClause, bool /*forUpdate*/) const { +const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (const TQString& tidList, const TQString& dateClause, bool /*forUpdate*/) const { DBG("*** Entering MyMoneyStorageSql::readTransactions"); // if (m_transactionListRead) return; // all list already in memory - if (m_displayStatus) signalProgress(0, m_transactions, QObject::tr("Loading transactions...")); + if (m_displaytqStatus) signalProgress(0, m_transactions, TQObject::tr("Loading transactions...")); int progress = 0; // m_payeeList.clear(); - QString whereClause; + TQString whereClause; whereClause = " WHERE txType = 'N' "; if (! tidList.isEmpty()) { whereClause += " AND id IN " + tidList; @@ -2686,7 +2678,7 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co const MyMoneyDbTable& t = m_db.m_tables["kmmTransactions"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare (t.selectAllString(false) + whereClause + " ORDER BY id;"); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Transaction"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Transaction"))); const MyMoneyDbTable& ts = m_db.m_tables["kmmSplits"]; whereClause = " WHERE txType = 'N' "; if (! tidList.isEmpty()) { @@ -2694,11 +2686,11 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co } if (!dateClause.isEmpty()) whereClause += " and " + dateClause; MyMoneySqlQuery qs(const_cast <MyMoneyStorageSql*> (this)); - QString splitQuery = ts.selectAllString(false) + whereClause + TQString splitQuery = ts.selectAllString(false) + whereClause + " ORDER BY transactionId, splitId;"; qs.prepare (splitQuery); if (!qs.exec()) throw new MYMONEYEXCEPTION(buildError (qs, __func__, "reading Splits")); - QString splitTxId = "ZZZ"; + TQString splitTxId = "ZZZ"; MyMoneySplit s; if (qs.next()) { splitTxId = qs.value(0).toString(); @@ -2706,12 +2698,12 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co } else { splitTxId = "ZZZ"; } - QMap <QString, MyMoneyTransaction> txMap; - QStringList txList; + TQMap <TQString, MyMoneyTransaction> txMap; + TQStringList txList; MyMoneyDbTable::field_iterator txEnd = t.end(); while (q.next()) { MyMoneyTransaction tx; - QString txId; + TQString txId; MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; while (ft != txEnd) { @@ -2749,14 +2741,14 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co txMap.insert(tx.uniqueSortKey(), tx); } } - QMap <QString, MyMoneyKeyValueContainer> kvpMap = readKeyValuePairs("TRANSACTION", txList); - QMap<QString, MyMoneyTransaction> tList; - QMapIterator<QString, MyMoneyTransaction> txMapEnd = txMap.end(); - for (QMapIterator<QString, MyMoneyTransaction> i = txMap.begin(); + TQMap <TQString, MyMoneyKeyValueContainer> kvpMap = readKeyValuePairs("TRANSACTION", txList); + TQMap<TQString, MyMoneyTransaction> tList; + TQMapIterator<TQString, MyMoneyTransaction> txMapEnd = txMap.end(); + for (TQMapIterator<TQString, MyMoneyTransaction> i = txMap.begin(); i != txMapEnd; ++i) { i.data().setPairs(kvpMap[i.data().id()].pairs()); - if (m_displayStatus) signalProgress(++progress, 0); + if (m_displaytqStatus) signalProgress(++progress, 0); } if ((tidList.isEmpty()) && (dateClause.isEmpty())) { @@ -2789,20 +2781,20 @@ int MyMoneyStorageSql::splitState(const MyMoneyTransactionFilter::stateOptionE& return rc; } -const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (const MyMoneyTransactionFilter& filter) const { +const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (const MyMoneyTransactionFilter& filter) const { DBG("*** Entering MyMoneyStorageSql::readTransactions"); // analyze the filter // if (m_transactionListRead) return; // all list already in memory // if the filter is restricted to certain accounts/categories // check if we already have them all in memory - QStringList accounts; - QString inQuery; + TQStringList accounts; + TQString inQuery; filter.accounts(accounts); filter.categories(accounts); -// QStringList::iterator it; +// TQStringList::iterator it; // bool allAccountsLoaded = true; // for (it = accounts.begin(); it != accounts.end(); ++it) { -// if (m_accountsLoaded.find(*it) == m_accountsLoaded.end()) { +// if (m_accountsLoaded.tqfind(*it) == m_accountsLoaded.end()) { // allAccountsLoaded = false; // break; // } @@ -2817,7 +2809,7 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co alert ("Amount Filter Set"); canImplementFilter = false; } - QString n1, n2; + TQString n1, n2; if (filter.numberFilter(n1, n2)) { alert("Number filter set"); canImplementFilter = false; @@ -2832,7 +2824,7 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co // alert("State filter set"); // canImplementFilter = false; // } - QRegExp t2; + TQRegExp t2; if (filter.textFilter(t2)) { alert("text filter set"); canImplementFilter = false; @@ -2843,9 +2835,9 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co canImplementFilter = false; } if (!canImplementFilter) { - QMap<QString, MyMoneyTransaction> transactionList = fetchTransactions(); - QMap<QString, MyMoneyTransaction>::ConstIterator it_t; - QMap<QString, MyMoneyTransaction>::ConstIterator txListEnd = transactionList.end(); + TQMap<TQString, MyMoneyTransaction> transactionList = fetchTransactions(); + TQMap<TQString, MyMoneyTransaction>::ConstIterator it_t; + TQMap<TQString, MyMoneyTransaction>::ConstIterator txListEnd = transactionList.end(); std::remove_if(transactionList.begin(), transactionList.end(), FilterFail(filter, m_storagePtr)); return transactionList; @@ -2854,27 +2846,27 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co bool accountsOnlyFilter = true; bool splitFilterActive = false; // the split filter is active if we are selecting on fields in the split table // get start and end dates - QDate start = filter.fromDate(); - QDate end = filter.toDate(); + TQDate start = filter.fromDate(); + TQDate end = filter.toDate(); // not entirely sure if the following is correct, but at best, saves a lot of reads, at worst // it only causes us to read a few more transactions that strictly necessary (I think...) - if (start == KMyMoneySettings::startDate().date()) start = QDate(); - bool txFilterActive = ((start != QDate()) || (end != QDate())); // and this for fields in the transaction table + if (start == KMyMoneySettings::startDate().date()) start = TQDate(); + bool txFilterActive = ((start != TQDate()) || (end != TQDate())); // and this for fields in the transaction table if (txFilterActive) accountsOnlyFilter = false; - QString whereClause = ""; - QString subClauseconnector = " where txType = 'N' and "; + TQString whereClause = ""; + TQString subClauseconnector = " where txType = 'N' and "; // payees - QStringList payees; + TQStringList payees; //filter.payees(payees); if (filter.payees(payees)) { accountsOnlyFilter = false; - QString itemConnector = "payeeId in ("; - QString payeesClause = ""; - QStringList::const_iterator it; + TQString itemConnector = "payeeId in ("; + TQString payeesClause = ""; + TQStringList::const_iterator it; for (it = payees.begin(); it != payees.end(); ++it) { - payeesClause.append(QString("%1'%2'") - .arg(itemConnector).arg(*it)); + payeesClause.append(TQString("%1'%2'") + .tqarg(itemConnector).tqarg(*it)); itemConnector = ", "; } if (!payeesClause.isEmpty()) { @@ -2887,13 +2879,13 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co // accounts and categories if (!accounts.isEmpty()) { splitFilterActive = true; - QString itemConnector = "accountId in ("; - QString accountsClause = ""; - QStringList::const_iterator it; + TQString itemConnector = "accountId in ("; + TQString accountsClause = ""; + TQStringList::const_iterator it; for (it = accounts.begin(); it != accounts.end(); ++it) { -// if (m_accountsLoaded.find(*it) == m_accountsLoaded.end()) { - accountsClause.append(QString("%1 '%2'") - .arg(itemConnector).arg(*it)); +// if (m_accountsLoaded.tqfind(*it) == m_accountsLoaded.end()) { + accountsClause.append(TQString("%1 '%2'") + .tqarg(itemConnector).tqarg(*it)); itemConnector = ", "; //if (accountsOnlyFilter) m_accountsLoaded.append(*it); // a bit premature... // } @@ -2905,15 +2897,15 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co } // split states - QValueList <int> splitStates; + TQValueList <int> splitStates; if (filter.states(splitStates)) { splitFilterActive = true; - QString itemConnector = " reconcileFlag IN ("; - QString statesClause = ""; - for (QValueList<int>::ConstIterator it = splitStates.begin(); it != splitStates.end(); ++it) { - statesClause.append(QString(" %1 '%2'") - .arg(itemConnector) - .arg(splitState(MyMoneyTransactionFilter::stateOptionE(*it)))); + TQString itemConnector = " reconcileFlag IN ("; + TQString statesClause = ""; + for (TQValueList<int>::ConstIterator it = splitStates.begin(); it != splitStates.end(); ++it) { + statesClause.append(TQString(" %1 '%2'") + .tqarg(itemConnector) + .tqarg(splitState(MyMoneyTransactionFilter::stateOptionE(*it)))); itemConnector = ","; } if (!statesClause.isEmpty()) { @@ -2922,8 +2914,8 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co } } // I've given up trying to work out the logic. we keep getting the wrong number of close brackets - int obc = whereClause.contains('('); - int cbc = whereClause.contains(')'); + int obc = whereClause.tqcontains('('); + int cbc = whereClause.tqcontains(')'); if (cbc > obc) { qFatal("invalid where clause - %s", whereClause.latin1()); } @@ -2946,22 +2938,22 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co return fetchTransactions(); } // build a date clause for the transaction table - QString dateClause; - QString connector = ""; - if (end != QDate()) { - dateClause = QString("(postDate < '%1')").arg(end.addDays(1).toString(Qt::ISODate)); + TQString dateClause; + TQString connector = ""; + if (end != TQDate()) { + dateClause = TQString("(postDate < '%1')").tqarg(end.addDays(1).toString(Qt::ISODate)); connector = " and "; } - if (start != QDate()) { - dateClause += QString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(Qt::ISODate)); + if (start != TQDate()) { + dateClause += TQString("%1 (postDate >= '%2')").tqarg(connector).tqarg(start.toString(Qt::ISODate)); } // now get a list of transaction ids // if we have only a date filter, we need to build the list from the tx table // otherwise we need to build from the split table if (splitFilterActive) { - inQuery = QString("(select distinct transactionId from kmmSplits %1)").arg(whereClause); + inQuery = TQString("(select distinct transactionId from kmmSplits %1)").tqarg(whereClause); } else { - inQuery = QString("(select distinct id from kmmTransactions where %1)").arg(dateClause); + inQuery = TQString("(select distinct id from kmmTransactions where %1)").tqarg(dateClause); txFilterActive = false; // kill off the date filter now } @@ -2969,7 +2961,7 @@ const QMap<QString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (co //FIXME: if we have an accounts-only filter, recalc balances on loaded accounts } -unsigned long MyMoneyStorageSql::transactionCount (const QString& aid) const { +unsigned long MyMoneyStorageSql::transactionCount (const TQString& aid) const { DBG("*** Entering MyMoneyStorageSql::transactionCount"); if (aid.length() == 0) return m_transactions; @@ -2984,17 +2976,17 @@ void MyMoneyStorageSql::readSplit (MyMoneySplit& s, const MyMoneySqlQuery& q, co MyMoneyDbTable::field_iterator splitEnd = t.end(); int i = 0; - // Use the QString here instead of CASE, since this is called so often. - QString fieldName; + // Use the TQString here instead of CASE, since this is called so often. + TQString fieldName; while (ft != splitEnd) { fieldName = (*ft)->name(); if (fieldName == "payeeId") s.setPayeeId(GETCSTRING); else if (fieldName == "reconcileDate") s.setReconcileDate(GETDATE); else if (fieldName == "action") s.setAction(GETCSTRING); else if (fieldName == "reconcileFlag") s.setReconcileFlag(static_cast<MyMoneySplit::reconcileFlagE>(GETINT)); - else if (fieldName == "value") s.setValue(MyMoneyMoney(QStringEmpty(GETSTRING))); - else if (fieldName == "shares") s.setShares(MyMoneyMoney(QStringEmpty(GETSTRING))); - else if (fieldName == "price") s.setPrice(MyMoneyMoney(QStringEmpty(GETSTRING))); + else if (fieldName == "value") s.setValue(MyMoneyMoney(TQStringEmpty(GETSTRING))); + else if (fieldName == "shares") s.setShares(MyMoneyMoney(TQStringEmpty(GETSTRING))); + else if (fieldName == "price") s.setPrice(MyMoneyMoney(TQStringEmpty(GETSTRING))); else if (fieldName == "memo") s.setMemo(GETSTRING); else if (fieldName == "accountId") s.setAccountId(GETCSTRING); else if (fieldName == "checkNumber") s.setNumber(GETSTRING); @@ -3006,7 +2998,7 @@ void MyMoneyStorageSql::readSplit (MyMoneySplit& s, const MyMoneySqlQuery& q, co return; } -bool MyMoneyStorageSql::isReferencedByTransaction(const QString& id) const { +bool MyMoneyStorageSql::isReferencedByTransaction(const TQString& id) const { DBG("*** Entering MyMoneyStorageSql::isReferencedByTransaction"); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare("SELECT COUNT(*) FROM kmmTransactions " @@ -3030,13 +3022,13 @@ void MyMoneyStorageSql::readSchedules(void) { PASS } -const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QStringList& idList, bool forUpdate) const { +const TQMap<TQString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const TQStringList& idList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::readSchedules"); - signalProgress(0, m_schedules, QObject::tr("Loading schedules...")); + signalProgress(0, m_schedules, TQObject::tr("Loading schedules...")); int progress = 0; const MyMoneyDbTable& t = m_db.m_tables["kmmSchedules"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QMap<QString, MyMoneySchedule> sList; + TQMap<TQString, MyMoneySchedule> sList; //unsigned long lastId = 0; const MyMoneyDbTable& ts = m_db.m_tables["kmmSplits"]; MyMoneySqlQuery qs(const_cast <MyMoneyStorageSql*> (this)); @@ -3044,14 +3036,14 @@ const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QS MyMoneySqlQuery sq(const_cast <MyMoneyStorageSql*> (this)); sq.prepare ("SELECT payDate from kmmSchedulePaymentHistory where schedId = :id"); - QString queryString (t.selectAllString(false)); + TQString queryString (t.selectAllString(false)); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. if (! idList.empty()) { queryString += " WHERE"; for (unsigned i = 0; i < idList.count(); ++i) - queryString += " id = :id" + QString::number(i) + " OR"; + queryString += " id = :id" + TQString::number(i) + " OR"; queryString = queryString.left(queryString.length() - 2); } queryString += " ORDER BY id;"; @@ -3064,20 +3056,20 @@ const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QS q.prepare (queryString); if (! idList.empty()) { - QStringList::const_iterator bindVal = idList.begin(); + TQStringList::const_iterator bindVal = idList.begin(); for (int i = 0; bindVal != idList.end(); ++i, ++bindVal) { - q.bindValue (":id" + QString::number(i), *bindVal); + q.bindValue (":id" + TQString::number(i), *bindVal); } } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Schedules"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Schedules"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; MyMoneySchedule s; - QString sId; - QString boolChar; - QDate nextPaymentDue; + TQString sId; + TQString boolChar; + TQDate nextPaymentDue; while (ft != t.end()) { CASE(id) sId = GETCSTRING; else CASE(name) s.setName (GETSTRING); @@ -3110,8 +3102,8 @@ const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QS MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare (t.selectAllString(false) + " WHERE id = :id;"); q.bindValue(":id", s.id()); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Scheduled Transaction"))); - if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("retrieving scheduled transaction"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Scheduled Transaction"))); + if (!q.next()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("retrieving scheduled transaction"))); MyMoneyTransaction tx(s.id(), MyMoneyTransaction()); ft = t.begin(); i = 0; @@ -3138,7 +3130,7 @@ const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QS // If the transaction doesn't have a post date, setTransaction will reject it. // The old way of handling things was to store the next post date in the schedule object - // and set the transaction post date to QDate(). + // and set the transaction post date to TQDate(). // For compatibility, if this is the case, copy the next post date from the schedule object // to the transaction object post date. if (!tx.postDate().isValid()) { @@ -3149,7 +3141,7 @@ const QMap<QString, MyMoneySchedule> MyMoneyStorageSql::fetchSchedules (const QS // read in the recorded payments sq.bindValue(":id", s.id()); - if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading schedule payment history"))); + if (!sq.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading schedule payment history"))); while (sq.next()) s.recordPayment (sq.value(0).toDate()); sList[s.id()] = s; @@ -3174,21 +3166,21 @@ void MyMoneyStorageSql::readSecurities(void) { PASS } -const QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchSecurities (const QStringList& /*idList*/, bool /*forUpdate*/) const { +const TQMap<TQString, MyMoneySecurity> MyMoneyStorageSql::fetchSecurities (const TQStringList& /*idList*/, bool /*forUpdate*/) const { DBG("*** Entering MyMoneyStorageSql::readSecurities"); - signalProgress(0, m_securities, QObject::tr("Loading securities...")); + signalProgress(0, m_securities, TQObject::tr("Loading securities...")); int progress = 0; - QMap<QString, MyMoneySecurity> sList; + TQMap<TQString, MyMoneySecurity> sList; unsigned long lastId = 0; const MyMoneyDbTable& t = m_db.m_tables["kmmSecurities"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare (t.selectAllString(false) + " ORDER BY id;"); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Securities"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Securities"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; MyMoneySecurity e; - QString eid; + TQString eid; int saf = 0; while (ft != t.end()) { CASE(id) eid = GETSTRING; @@ -3232,12 +3224,12 @@ void MyMoneyStorageSql::readPrices(void) { } -const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const QString& fromIdList, const QString& toIdList, const QDate& date_, bool exactDate, bool /*forUpdate*/) const { +const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const TQString& fromIdList, const TQString& toIdList, const TQDate& date_, bool exactDate, bool /*forUpdate*/) const { DBG("*** Entering MyMoneyStorageSql::fetchSinglePrice"); const MyMoneyDbTable& t = m_db.m_tables["kmmPrices"]; MyMoneyDbTable::field_iterator tableEnd = t.end(); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString = t.selectAllString(false); + TQString queryString = t.selectAllString(false); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. @@ -3250,28 +3242,28 @@ const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const QString& fromIdLi q.prepare(queryString); - QDate date (date_); + TQDate date (date_); if(!date.isValid()) - date = QDate::currentDate(); + date = TQDate::tqcurrentDate(); q.bindValue(":fromId", fromIdList); q.bindValue(":toId", toIdList); - q.bindValue(":priceDate", date.addDays(1).toString(Qt::ISODate)); + q.bindValue(":priceDate", TQString(date.addDays(1).toString(Qt::ISODate))); if (exactDate) - q.bindValue(":exactDate", date.toString(Qt::ISODate)); + q.bindValue(":exactDate", TQString(date.toString(Qt::ISODate))); if (! q.exec()) {} if (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString from; - QString to; - QDate date; + TQString from; + TQString to; + TQDate date; MyMoneyMoney rate; - QString source; + TQString source; bool foundFromId = false; bool foundToId = false; bool foundPriceDate = false; @@ -3303,30 +3295,30 @@ const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const QString& fromIdLi return MyMoneyPrice(); } -const MyMoneyPriceList MyMoneyStorageSql::fetchPrices (const QStringList& fromIdList, const QStringList& toIdList, bool forUpdate) const { +const MyMoneyPriceList MyMoneyStorageSql::fetchPrices (const TQStringList& fromIdList, const TQStringList& toIdList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::readPrices"); - signalProgress(0, m_prices, QObject::tr("Loading prices...")); + signalProgress(0, m_prices, TQObject::tr("Loading prices...")); int progress = 0; const_cast <MyMoneyStorageSql*> (this)->m_readingPrices = true; MyMoneyPriceList pList; const MyMoneyDbTable& t = m_db.m_tables["kmmPrices"]; MyMoneyDbTable::field_iterator tableEnd = t.end(); MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString = t.selectAllString(false); + TQString queryString = t.selectAllString(false); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. if (! fromIdList.empty()) { queryString += " WHERE ("; for (unsigned i = 0; i < fromIdList.count(); ++i) { - queryString += " fromId = :fromId" + QString::number(i) + " OR"; + queryString += " fromId = :fromId" + TQString::number(i) + " OR"; } queryString = queryString.left(queryString.length() - 2) + ")"; } if (! toIdList.empty()) { queryString += " AND ("; for (unsigned i = 0; i < toIdList.count(); ++i) { - queryString += " toId = :toId" + QString::number(i) + " OR"; + queryString += " toId = :toId" + TQString::number(i) + " OR"; } queryString = queryString.left(queryString.length() - 2) + ")"; } @@ -3340,27 +3332,27 @@ const MyMoneyPriceList MyMoneyStorageSql::fetchPrices (const QStringList& fromI q.prepare (queryString); if (! fromIdList.empty()) { - QStringList::const_iterator bindVal = fromIdList.begin(); + TQStringList::const_iterator bindVal = fromIdList.begin(); for (int i = 0; bindVal != fromIdList.end(); ++i, ++bindVal) { - q.bindValue (":fromId" + QString::number(i), *bindVal); + q.bindValue (":fromId" + TQString::number(i), *bindVal); } } if (! toIdList.empty()) { - QStringList::const_iterator bindVal = toIdList.begin(); + TQStringList::const_iterator bindVal = toIdList.begin(); for (int i = 0; bindVal != toIdList.end(); ++i, ++bindVal) { - q.bindValue (":toId" + QString::number(i), *bindVal); + q.bindValue (":toId" + TQString::number(i), *bindVal); } } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Prices"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Prices"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString from; - QString to; - QDate date; + TQString from; + TQString to; + TQDate date; MyMoneyMoney rate; - QString source; + TQString source; while (ft != tableEnd) { CASE(fromId) from = GETCSTRING; @@ -3384,22 +3376,22 @@ void MyMoneyStorageSql::readCurrencies(void) { PASS } -const QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchCurrencies (const QStringList& idList, bool forUpdate) const { +const TQMap<TQString, MyMoneySecurity> MyMoneyStorageSql::fetchCurrencies (const TQStringList& idList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::readCurrencies"); - signalProgress(0, m_currencies, QObject::tr("Loading currencies...")); + signalProgress(0, m_currencies, TQObject::tr("Loading currencies...")); int progress = 0; - QMap<QString, MyMoneySecurity> cList; + TQMap<TQString, MyMoneySecurity> cList; const MyMoneyDbTable& t = m_db.m_tables["kmmCurrencies"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString (t.selectAllString(false)); + TQString queryString (t.selectAllString(false)); // Use bind variables, instead of just inserting the values in the queryString, // so that values containing a ':' will work. if (! idList.empty()) { queryString += " WHERE"; for (unsigned i = 0; i < idList.count(); ++i) - queryString += " isocode = :id" + QString::number(i) + " OR"; + queryString += " isocode = :id" + TQString::number(i) + " OR"; queryString = queryString.left(queryString.length() - 2); } @@ -3413,32 +3405,32 @@ const QMap<QString, MyMoneySecurity> MyMoneyStorageSql::fetchCurrencies (const Q q.prepare (queryString); if (! idList.empty()) { - QStringList::const_iterator bindVal = idList.begin(); + TQStringList::const_iterator bindVal = idList.begin(); for (int i = 0; bindVal != idList.end(); ++i, ++bindVal) { - q.bindValue (":id" + QString::number(i), *bindVal); + q.bindValue (":id" + TQString::number(i), *bindVal); } } - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Currencies"))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Currencies"))); while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QString id; + TQString id; MyMoneySecurity c; - QChar symbol[3]; + TQChar symbol[3]; while (ft != t.end()) { CASE(ISOcode) id = GETCSTRING; else CASE(name) c.setName(GETSTRING); else CASE(type) c.setSecurityType(static_cast<MyMoneySecurity::eSECURITYTYPE>(GETINT)); - else CASE(symbol1) symbol[0] = QChar(GETINT); - else CASE(symbol2) symbol[1] = QChar(GETINT); - else CASE(symbol3) symbol[2] = QChar(GETINT); + else CASE(symbol1) symbol[0] = TQChar(GETINT); + else CASE(symbol2) symbol[1] = TQChar(GETINT); + else CASE(symbol3) symbol[2] = TQChar(GETINT); else CASE(partsPerUnit) c.setPartsPerUnit(GETINT); else CASE(smallestCashFraction) c.setSmallestCashFraction(GETINT); else CASE(smallestAccountFraction) c.setSmallestAccountFraction(GETINT); ++ft; ++i; } - c.setTradingSymbol(QString(symbol, 3).stripWhiteSpace()); + c.setTradingSymbol(TQString(symbol, 3).stripWhiteSpace()); cList[id] = MyMoneySecurity(id, c); @@ -3455,24 +3447,24 @@ void MyMoneyStorageSql::readReports(void) { PASS } -const QMap<QString, MyMoneyReport> MyMoneyStorageSql::fetchReports (const QStringList& /*idList*/, bool /*forUpdate*/) const { +const TQMap<TQString, MyMoneyReport> MyMoneyStorageSql::fetchReports (const TQStringList& /*idList*/, bool /*forUpdate*/) const { DBG("*** Entering MyMoneyStorageSql::readReports"); - signalProgress(0, m_reports, QObject::tr("Loading reports...")); + signalProgress(0, m_reports, TQObject::tr("Loading reports...")); int progress = 0; const MyMoneyDbTable& t = m_db.m_tables["kmmReportConfig"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare (t.selectAllString(true)); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading reports"))); - QMap<QString, MyMoneyReport> rList; + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading reports"))); + TQMap<TQString, MyMoneyReport> rList; while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QDomDocument d; + TQDomDocument d; while (ft != t.end()) { CASE(XML) d.setContent(GETSTRING, false); ++ft; ++i; } - QDomNode child = d.firstChild(); + TQDomNode child = d.firstChild(); child = child.firstChild(); MyMoneyReport report; @@ -3484,13 +3476,13 @@ const QMap<QString, MyMoneyReport> MyMoneyStorageSql::fetchReports (const QStrin return rList; } -const QMap<QString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets (const QStringList& idList, bool forUpdate) const { +const TQMap<TQString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets (const TQStringList& idList, bool forUpdate) const { DBG("*** Entering MyMoneyStorageSql::readBudgets"); - signalProgress(0, m_budgets, QObject::tr("Loading budgets...")); + signalProgress(0, m_budgets, TQObject::tr("Loading budgets...")); int progress = 0; const MyMoneyDbTable& t = m_db.m_tables["kmmBudgetConfig"]; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString queryString (t.selectAllString(false)); + TQString queryString (t.selectAllString(false)); if (! idList.empty()) { queryString += " WHERE id = '" + idList.join("' OR id = '") + "'"; } @@ -3500,17 +3492,17 @@ const QMap<QString, MyMoneyBudget> MyMoneyStorageSql::fetchBudgets (const QStrin queryString += ";"; q.prepare (queryString); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading budgets"))); - QMap<QString, MyMoneyBudget> budgets; + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading budgets"))); + TQMap<TQString, MyMoneyBudget> budgets; while (q.next()) { MyMoneyDbTable::field_iterator ft = t.begin(); int i = 0; - QDomDocument d; + TQDomDocument d; while (ft != t.end()) { CASE(XML) d.setContent(GETSTRING, false); ++ft; ++i; } - QDomNode child = d.firstChild(); + TQDomNode child = d.firstChild(); child = child.firstChild(); MyMoneyBudget budget (child.toElement()); budgets.insert(budget.id(), budget); @@ -3523,25 +3515,25 @@ void MyMoneyStorageSql::readBudgets(void) { m_storage->loadBudgets(fetchBudgets()); } -const MyMoneyKeyValueContainer MyMoneyStorageSql::readKeyValuePairs (const QString& kvpType, const QString& kvpId) const { +const MyMoneyKeyValueContainer MyMoneyStorageSql::readKeyValuePairs (const TQString& kvpType, const TQString& kvpId) const { DBG("*** Entering MyMoneyStorageSql::readKeyValuePairs"); MyMoneyKeyValueContainer list; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); q.prepare ("SELECT kvpKey, kvpData from kmmKeyValuePairs where kvpType = :type and kvpId = :id;"); q.bindValue(":type", kvpType); q.bindValue(":id", kvpId); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Kvp for %1 %2").arg(kvpType) - .arg(kvpId))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp for %1 %2").tqarg(kvpType) + .tqarg(kvpId))); while (q.next()) list.setValue(q.value(0).toString(), q.value(1).toString()); return (list); } -const QMap<QString, MyMoneyKeyValueContainer> MyMoneyStorageSql::readKeyValuePairs (const QString& kvpType, const QStringList& kvpIdList) const { +const TQMap<TQString, MyMoneyKeyValueContainer> MyMoneyStorageSql::readKeyValuePairs (const TQString& kvpType, const TQStringList& kvpIdList) const { DBG("*** Entering MyMoneyStorageSql::readKeyValuePairs"); - QMap<QString, MyMoneyKeyValueContainer> retval; + TQMap<TQString, MyMoneyKeyValueContainer> retval; MyMoneySqlQuery q(const_cast <MyMoneyStorageSql*> (this)); - QString query ("SELECT kvpId, kvpKey, kvpData from kmmKeyValuePairs where kvpType = :type"); + TQString query ("SELECT kvpId, kvpKey, kvpData from kmmKeyValuePairs where kvpType = :type"); if (!kvpIdList.empty()) { query += " and kvpId IN ('" + kvpIdList.join("', '") + "')"; @@ -3550,7 +3542,7 @@ const QMap<QString, MyMoneyKeyValueContainer> MyMoneyStorageSql::readKeyValuePai query += " order by kvpId;"; q.prepare (query); q.bindValue(":type", kvpType); - if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, QString("reading Kvp List for %1").arg(kvpType))); + if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("reading Kvp List for %1").tqarg(kvpType))); while (q.next()) { retval [q.value(0).toString()].setValue(q.value(1).toString(), q.value(2).toString()); } @@ -3607,7 +3599,7 @@ long unsigned MyMoneyStorageSql::incrementBudgetId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiBudgetId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiBudgetId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdBudgets = returnValue; @@ -3623,7 +3615,7 @@ long unsigned MyMoneyStorageSql::incrementAccountId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiAccountId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiAccountId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdAccounts = returnValue; @@ -3639,7 +3631,7 @@ long unsigned MyMoneyStorageSql::incrementInstitutionId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiInstitutionId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiInstitutionId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdInstitutions = returnValue; @@ -3655,7 +3647,7 @@ long unsigned MyMoneyStorageSql::incrementPayeeId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiPayeeId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiPayeeId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdPayees = returnValue; @@ -3671,7 +3663,7 @@ long unsigned MyMoneyStorageSql::incrementReportId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiReportId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiReportId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdReports = returnValue; @@ -3687,7 +3679,7 @@ long unsigned MyMoneyStorageSql::incrementScheduleId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiScheduleId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiScheduleId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdSchedules = returnValue; @@ -3703,7 +3695,7 @@ long unsigned MyMoneyStorageSql::incrementSecurityId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiSecurityId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiSecurityId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdSecurities = returnValue; @@ -3719,7 +3711,7 @@ long unsigned MyMoneyStorageSql::incrementTransactionId() { q.next(); long unsigned returnValue = (unsigned long) q.value(0).toULongLong(); ++returnValue; - q.prepare("UPDATE kmmFileInfo SET hiTransactionId = " + QString::number(returnValue)); + q.prepare("UPDATE kmmFileInfo SET hiTransactionId = " + TQString::number(returnValue)); q.exec(); endCommitUnit (__func__); m_hiIdTransactions = returnValue; @@ -3776,33 +3768,33 @@ void MyMoneyStorageSql::loadBudgetId(const unsigned long& id) //**************************************************** long unsigned MyMoneyStorageSql::calcHighId - (const long unsigned& i, const QString& id) { + (const long unsigned& i, const TQString& id) { DBG("*** Entering MyMoneyStorageSql::calcHighId"); - QString nid = id; - long unsigned high = (unsigned long) nid.replace(QRegExp("[A-Z]*"), "").toULongLong(); + TQString nid = id; + long unsigned high = (unsigned long) nid.tqreplace(TQRegExp("[A-Z]*"), "").toULongLong(); return std::max(high, i); } -void MyMoneyStorageSql::setProgressCallback(void(*callback)(int, int, const QString&)) { +void MyMoneyStorageSql::setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; } -void MyMoneyStorageSql::signalProgress(int current, int total, const QString& msg) const { +void MyMoneyStorageSql::signalProgress(int current, int total, const TQString& msg) const { if (m_progressCallback != 0) (*m_progressCallback)(current, total, msg); } // **************************** Error display routine ******************************* -QString& MyMoneyStorageSql::buildError (const QSqlQuery& q, const QString& function, const QString& message) const { - QString s = QString("Error in function %1 : %2").arg(function).arg(message); - QSqlError e = lastError(); - s += QString ("\nDriver = %1, Host = %2, User = %3, Database = %4") - .arg(driverName()).arg(hostName()).arg(userName()).arg(databaseName()); - s += QString ("\nDriver Error: %1").arg(e.driverText()); - s += QString ("\nDatabase Error No %1: %2").arg(e.number()).arg(e.databaseText()); +TQString& MyMoneyStorageSql::buildError (const TQSqlQuery& q, const TQString& function, const TQString& message) const { + TQString s = TQString("Error in function %1 : %2").tqarg(function).tqarg(message); + TQSqlError e = lastError(); + s += TQString ("\nDriver = %1, Host = %2, User = %3, Database = %4") + .tqarg(driverName()).tqarg(hostName()).tqarg(userName()).tqarg(databaseName()); + s += TQString ("\nDriver Error: %1").tqarg(e.driverText()); + s += TQString ("\nDatabase Error No %1: %2").tqarg(e.number()).tqarg(e.databaseText()); e = q.lastError(); - s += QString ("\nExecuted: %1").arg(q.executedQuery()); - s += QString ("\nQuery error No %1: %2").arg(e.number()).arg(e.text()); + s += TQString ("\nExecuted: %1").tqarg(q.executedQuery()); + s += TQString ("\nQuery error No %1: %2").tqarg(e.number()).tqarg(e.text()); const_cast <MyMoneyStorageSql*> (this)->m_error = s; qDebug("%s", s.ascii()); @@ -3841,7 +3833,7 @@ MyMoneyDbDef::MyMoneyDbDef () { //#define ISKEY true void MyMoneyDbDef::FileInfo(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("version", "varchar(16)")); fields.append(new MyMoneyDbColumn("created", "date")); fields.append(new MyMoneyDbColumn("lastModified", "date")); @@ -3880,7 +3872,7 @@ void MyMoneyDbDef::FileInfo(void){ } void MyMoneyDbDef::Institutions(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbTextColumn("name", MyMoneyDbTextColumn::NORMAL, false, NOTNULL)); fields.append(new MyMoneyDbTextColumn("manager")); @@ -3895,7 +3887,7 @@ void MyMoneyDbDef::Institutions(void){ } void MyMoneyDbDef::Payees(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbTextColumn("name")); fields.append(new MyMoneyDbTextColumn("reference")); @@ -3916,10 +3908,10 @@ void MyMoneyDbDef::Payees(void){ } void MyMoneyDbDef::Accounts(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("institutionId", "varchar(32)")); - fields.append(new MyMoneyDbColumn("parentId", "varchar(32)")); + fields.append(new MyMoneyDbColumn("tqparentId", "varchar(32)")); fields.append(new MyMoneyDbDatetimeColumn("lastReconciled")); fields.append(new MyMoneyDbDatetimeColumn("lastModified")); fields.append(new MyMoneyDbColumn("openingDate", "date")); @@ -3939,7 +3931,7 @@ void MyMoneyDbDef::Accounts(void){ } void MyMoneyDbDef::Transactions(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("txType", "char(1)")); fields.append(new MyMoneyDbDatetimeColumn("postDate")); @@ -3953,7 +3945,7 @@ void MyMoneyDbDef::Transactions(void){ } void MyMoneyDbDef::Splits(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("transactionId", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("txType", "char(1)")); fields.append(new MyMoneyDbIntColumn("splitId", MyMoneyDbIntColumn::SMALL, UNSIGNED, PRIMARYKEY, NOTNULL)); @@ -3973,7 +3965,7 @@ void MyMoneyDbDef::Splits(void){ fields.append(new MyMoneyDbDatetimeColumn("postDate")); fields.append(new MyMoneyDbTextColumn("bankId")); MyMoneyDbTable t("kmmSplits", fields); - QStringList list; + TQStringList list; list << "accountId" << "txType"; t.addIndex("kmmSplitsaccount_type", list, false); t.buildSQLStrings(); @@ -3981,13 +3973,13 @@ void MyMoneyDbDef::Splits(void){ } void MyMoneyDbDef::KeyValuePairs(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("kvpType", "varchar(16)", false, NOTNULL)); fields.append(new MyMoneyDbColumn("kvpId", "varchar(32)")); fields.append(new MyMoneyDbColumn("kvpKey", "varchar(255)", false, NOTNULL)); fields.append(new MyMoneyDbTextColumn("kvpData")); MyMoneyDbTable t("kmmKeyValuePairs", fields); - QStringList list; + TQStringList list; list << "kvpType" << "kvpId"; t.addIndex("type_id", list, false); t.buildSQLStrings(); @@ -3995,7 +3987,7 @@ void MyMoneyDbDef::KeyValuePairs(void){ } void MyMoneyDbDef::Schedules(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbTextColumn("name", MyMoneyDbTextColumn::NORMAL, false, NOTNULL)); fields.append(new MyMoneyDbIntColumn("type", MyMoneyDbIntColumn::TINY, UNSIGNED, false, NOTNULL)); @@ -4022,7 +4014,7 @@ void MyMoneyDbDef::Schedules(void){ } void MyMoneyDbDef::SchedulePaymentHistory(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("schedId", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("payDate", "date", PRIMARYKEY, NOTNULL)); MyMoneyDbTable t("kmmSchedulePaymentHistory", fields); @@ -4031,7 +4023,7 @@ void MyMoneyDbDef::SchedulePaymentHistory(void){ } void MyMoneyDbDef::Securities(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("name", "text", false, NOTNULL)); fields.append(new MyMoneyDbTextColumn("symbol")); @@ -4046,7 +4038,7 @@ void MyMoneyDbDef::Securities(void){ } void MyMoneyDbDef::Prices(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("fromId", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("toId", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("priceDate", "date", PRIMARYKEY, NOTNULL)); @@ -4059,7 +4051,7 @@ void MyMoneyDbDef::Prices(void){ } void MyMoneyDbDef::Currencies(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("ISOcode", "char(3)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbTextColumn("name", MyMoneyDbTextColumn::NORMAL, false, NOTNULL)); fields.append(new MyMoneyDbIntColumn("type", MyMoneyDbIntColumn::SMALL, UNSIGNED)); @@ -4077,7 +4069,7 @@ void MyMoneyDbDef::Currencies(void){ } void MyMoneyDbDef::Reports(void) { - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("name", "varchar(255)", false, NOTNULL)); fields.append(new MyMoneyDbTextColumn("XML", MyMoneyDbTextColumn::LONG)); fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); @@ -4087,7 +4079,7 @@ void MyMoneyDbDef::Reports(void) { } void MyMoneyDbDef::Budgets(void){ - QValueList<KSharedPtr <MyMoneyDbColumn> > fields; + TQValueList<KSharedPtr <MyMoneyDbColumn> > fields; fields.append(new MyMoneyDbColumn("id", "varchar(32)", PRIMARYKEY, NOTNULL)); fields.append(new MyMoneyDbColumn("name", "text", false, NOTNULL)); fields.append(new MyMoneyDbColumn("start", "date", false, NOTNULL)); @@ -4111,8 +4103,8 @@ void MyMoneyDbDef::Balances(void){ } // function to write create SQL to a stream -const QString MyMoneyDbDef::generateSQL (const QString& driver) const { - QString retval; +const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const { + TQString retval; databaseTypeE dbType = m_drivers.driverToType(driver); table_iterator tt = tableBegin(); while (tt != tableEnd()) { @@ -4127,31 +4119,31 @@ const QString MyMoneyDbDef::generateSQL (const QString& driver) const { retval += '\n'; MyMoneyDbTable fi = m_tables["kmmFileInfo"]; - QString qs = fi.insertString(); + TQString qs = fi.insertString(); MyMoneyDbTable::field_iterator fit; for (fit = fi.begin(); fit != fi.end(); ++fit) { - QString toReplace = (*fit)->name(); + TQString toReplace = (*fit)->name(); toReplace.prepend(':'); - QString replace = "NULL"; + TQString tqreplace = "NULL"; if ((*fit)->name() == "version") - replace = QString::number(m_currentVersion); + tqreplace = TQString::number(m_currentVersion); if ((*fit)->name() == "fixLevel") - replace = QString::number + tqreplace = TQString::number (MyMoneyFile::instance()->storage()->currentFixVersion()); if ((*fit)->name() == "created") - replace = QDate::currentDate().toString(Qt::ISODate); + tqreplace = TQDate::tqcurrentDate().toString(Qt::ISODate); if ((*fit)->name() == "lastModified") - replace = QDate::currentDate().toString(Qt::ISODate); + tqreplace = TQDate::tqcurrentDate().toString(Qt::ISODate); if ((*fit)->name() == "updateInProgress") - replace = enclose("N"); - qs.replace(toReplace, replace); + tqreplace = enclose("N"); + qs.tqreplace(toReplace, tqreplace); } qs += "\n\n"; retval += qs; - qs = QString(); + qs = TQString(); unsigned int i; - QValueList<MyMoneyAccount> stdList; + TQValueList<MyMoneyAccount> stdList; stdList.append (MyMoneyFile::instance()->asset()); stdList.append (MyMoneyFile::instance()->equity()); stdList.append (MyMoneyFile::instance()->expense()); @@ -4164,23 +4156,23 @@ const QString MyMoneyDbDef::generateSQL (const QString& driver) const { MyMoneyDbTable::field_iterator act; // do the following in reverse so the 'formatted' fields are // correctly handled. - // Hmm, how does one use a QValueListIterator in reverse - // It'll be okay in Qt4 with QListIterator + // Hmm, how does one use a TQValueListIterator in reverse + // It'll be okay in TQt4 with TQListIterator for (act = ac.end(), --act; act != ac.begin(); --act) { - QString toReplace = (*act)->name(); + TQString toReplace = (*act)->name(); toReplace.prepend(':'); - QString replace = "NULL"; + TQString tqreplace = "NULL"; if ((*act)->name() == "accountType") - replace = QString::number(pac->accountType()); + tqreplace = TQString::number(pac->accountType()); if ((*act)->name() == "accountTypeString") - replace = enclose(pac->name()); + tqreplace = enclose(pac->name()); if ((*act)->name() == "isStockAccount") - replace = enclose("N"); + tqreplace = enclose("N"); if ((*act)->name() == "accountName") - replace = enclose(pac->name()); - qs.replace(toReplace, replace); + tqreplace = enclose(pac->name()); + qs.tqreplace(toReplace, tqreplace); } - qs.replace (":id", enclose(pac->id())); // a real kludge + qs.tqreplace (":id", enclose(pac->id())); // a real kludge qs += "\n\n"; retval += qs; } @@ -4189,19 +4181,19 @@ const QString MyMoneyDbDef::generateSQL (const QString& driver) const { //***************************************************************************** -void MyMoneyDbTable::addIndex(const QString& name, const QStringList& columns, bool unique) { +void MyMoneyDbTable::addIndex(const TQString& name, const TQStringList& columns, bool unique) { m_indices.push_back (MyMoneyDbIndex (m_name, name, columns, unique)); } void MyMoneyDbTable::buildSQLStrings (void) { // build fixed SQL strings for this table // build the insert string with placeholders for each field - QString qs = QString("INSERT INTO %1 (").arg(name()); - QString ws = ") VALUES ("; + TQString qs = TQString("INSERT INTO %1 (").tqarg(name()); + TQString ws = ") VALUES ("; field_iterator ft = m_fields.begin(); while (ft != m_fields.end()) { - qs += QString("%1, ").arg((*ft)->name()); - ws += QString(":%1, ").arg((*ft)->name()); + qs += TQString("%1, ").tqarg((*ft)->name()); + ws += TQString(":%1, ").tqarg((*ft)->name()); ++ft; } qs = qs.left(qs.length() - 2); @@ -4213,14 +4205,14 @@ void MyMoneyDbTable::buildSQLStrings (void) { // build an update string; key fields go in the where clause qs = "UPDATE " + name() + " SET "; - ws = QString(); + ws = TQString(); ft = m_fields.begin(); while (ft != m_fields.end()) { if ((*ft)->isPrimaryKey()) { if (!ws.isEmpty()) ws += " AND "; - ws += QString("%1 = :%2").arg((*ft)->name()).arg((*ft)->name()); + ws += TQString("%1 = :%2").tqarg((*ft)->name()).tqarg((*ft)->name()); } else { - qs += QString("%1 = :%2, ").arg((*ft)->name()).arg((*ft)->name()); + qs += TQString("%1 = :%2, ").tqarg((*ft)->name()).tqarg((*ft)->name()); } ++ft; } @@ -4233,20 +4225,20 @@ void MyMoneyDbTable::buildSQLStrings (void) { m_deleteString = qs + ";"; } -const QString MyMoneyDbTable::columnList() const { +const TQString MyMoneyDbTable::columnList() const { field_iterator ft = m_fields.begin(); - QString qs; + TQString qs; ft = m_fields.begin(); while (ft != m_fields.end()) { - qs += QString("%1, ").arg((*ft)->name()); + qs += TQString("%1, ").tqarg((*ft)->name()); ++ft; } return (qs.left(qs.length() - 2)); } -const QString MyMoneyDbTable::generateCreateSQL (databaseTypeE dbType) const { - QString qs = QString("CREATE TABLE %1 (").arg(name()); - QString pkey; +const TQString MyMoneyDbTable::generateCreateSQL (databaseTypeE dbType) const { + TQString qs = TQString("CREATE TABLE %1 (").tqarg(name()); + TQString pkey; for (field_iterator it = m_fields.begin(); it != m_fields.end(); ++it) { qs += (*it)->generateDDL (dbType) + ", "; if ((*it)->isPrimaryKey ()) @@ -4271,7 +4263,7 @@ const QString MyMoneyDbTable::generateCreateSQL (databaseTypeE dbType) const { return qs; } -const QString MyMoneyDbTable::dropPrimaryKeyString(databaseTypeE dbType) const +const TQString MyMoneyDbTable::dropPrimaryKeyString(databaseTypeE dbType) const { if (dbType == Mysql || dbType == Oracle8) return "ALTER TABLE " + m_name + " DROP PRIMARY KEY;"; @@ -4283,8 +4275,8 @@ const QString MyMoneyDbTable::dropPrimaryKeyString(databaseTypeE dbType) const return ""; } -const QString MyMoneyDbTable::modifyColumnString(databaseTypeE dbType, const QString& columnName, const MyMoneyDbColumn& newDef) const { - QString qs = "ALTER TABLE " + m_name + " "; +const TQString MyMoneyDbTable::modifyColumnString(databaseTypeE dbType, const TQString& columnName, const MyMoneyDbColumn& newDef) const { + TQString qs = "ALTER TABLE " + m_name + " "; if (dbType == Mysql) qs += "CHANGE " + columnName + " " + newDef.generateDDL(dbType); else if (dbType == Postgresql) @@ -4298,14 +4290,14 @@ const QString MyMoneyDbTable::modifyColumnString(databaseTypeE dbType, const QSt } //***************************************************************************** -const QString MyMoneyDbIndex::generateDDL (databaseTypeE dbType) const +const TQString MyMoneyDbIndex::generateDDL (databaseTypeE dbType) const { Q_UNUSED(dbType); - QString qs = "CREATE "; + TQString qs = "CREATE "; if (m_unique) - qs += "UNIQUE "; + qs += "UNITQUE "; qs += "INDEX " + m_table + "_" + m_name + "_idx ON " + m_table + " ("; @@ -4315,7 +4307,7 @@ const QString MyMoneyDbIndex::generateDDL (databaseTypeE dbType) const // the result of an SQL function, but not a partial column. There should be // a way to merge these, and support other DBMSs like SQLite at the same time. // For now, if we just use plain columns, this will work fine. - for (QStringList::const_iterator it = m_columns.begin(); it != m_columns.end(); ++it) { + for (TQStringList::const_iterator it = m_columns.begin(); it != m_columns.end(); ++it) { qs += *it + ","; } @@ -4341,18 +4333,18 @@ MyMoneyDbDatetimeColumn* MyMoneyDbDatetimeColumn::clone () const MyMoneyDbTextColumn* MyMoneyDbTextColumn::clone () const { return (new MyMoneyDbTextColumn (*this)); } -const QString MyMoneyDbColumn::generateDDL (databaseTypeE dbType) const +const TQString MyMoneyDbColumn::generateDDL (databaseTypeE dbType) const { Q_UNUSED(dbType); - QString qs = name() + " " + type(); + TQString qs = name() + " " + type(); if (isNotNull()) qs += " NOT NULL"; return qs; } -const QString MyMoneyDbIntColumn::generateDDL (databaseTypeE dbType) const +const TQString MyMoneyDbIntColumn::generateDDL (databaseTypeE dbType) const { - QString qs = name() + " "; + TQString qs = name() + " "; switch (m_type) { case MyMoneyDbIntColumn::TINY: @@ -4423,9 +4415,9 @@ const QString MyMoneyDbIntColumn::generateDDL (databaseTypeE dbType) const return qs; } -const QString MyMoneyDbTextColumn::generateDDL (databaseTypeE dbType) const +const TQString MyMoneyDbTextColumn::generateDDL (databaseTypeE dbType) const { - QString qs = name() + " "; + TQString qs = name() + " "; switch (m_type) { case MyMoneyDbTextColumn::TINY: @@ -4496,9 +4488,9 @@ const QString MyMoneyDbTextColumn::generateDDL (databaseTypeE dbType) const return qs; } -const QString MyMoneyDbDatetimeColumn::generateDDL (databaseTypeE dbType) const +const TQString MyMoneyDbDatetimeColumn::generateDDL (databaseTypeE dbType) const { - QString qs = name() + " "; + TQString qs = name() + " "; if (dbType == Mysql || dbType == ODBC3) { qs += "datetime "; } else if (dbType == Postgresql || dbType == Db2 || dbType == Oracle8 || dbType == Sqlite3 ) { diff --git a/kmymoney2/mymoney/storage/mymoneystoragesql.h b/kmymoney2/mymoney/storage/mymoneystoragesql.h index 1abe70b..4250256 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragesql.h +++ b/kmymoney2/mymoney/storage/mymoneystoragesql.h @@ -13,12 +13,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qsqldatabase.h> -#include <qsqlquery.h> -#include <qsqlerror.h> -#include <qvaluestack.h> +#include <tqsqldatabase.h> +#include <tqsqlquery.h> +#include <tqsqlerror.h> +#include <tqvaluestack.h> -class QIODevice; +class TQIODevice; // ---------------------------------------------------------------------------- // KDE Includes @@ -56,7 +56,7 @@ class FilterFail { m_storage (storage) {} - inline bool operator() (const QPair<QString, MyMoneyTransaction>& transactionPair) + inline bool operator() (const TQPair<TQString, MyMoneyTransaction>& transactionPair) { return (*this) (transactionPair.second); } inline bool operator() (const MyMoneyTransaction& transaction) @@ -87,16 +87,16 @@ typedef enum databaseTypeE { // database (driver) type class MyMoneyStorageSql; /** - * The MyMoneySqlQuery class is derived from QSqlQuery to provide + * The MyMoneySqlQuery class is derived from TQSqlQuery to provide * a way to adjust some queries based on databaseTypeE and make * debugging easier by providing a place to put debug statements. */ -class MyMoneySqlQuery : public QSqlQuery { +class MyMoneySqlQuery : public TQSqlQuery { public: MyMoneySqlQuery (MyMoneyStorageSql* db = 0); virtual ~MyMoneySqlQuery() {} bool exec (); - bool prepare ( const QString & query ); + bool prepare ( const TQString & query ); private: const MyMoneyStorageSql* m_db; }; @@ -108,13 +108,13 @@ class MyMoneyDbDrivers { public: MyMoneyDbDrivers (); /** - * @return a list ofsupported Qt database driver types, their qt names and useful names + * @return a list ofsupported TQt database driver types, their qt names and useful names **/ - const QMap<QString, QString> driverMap() const {return (m_driverMap);}; - databaseTypeE driverToType (const QString& driver) const; + const TQMap<TQString, TQString> driverMap() const {return (m_driverMap);}; + databaseTypeE driverToType (const TQString& driver) const; bool isTested (databaseTypeE dbType) const; private: - QMap<QString, QString> m_driverMap; + TQMap<TQString, TQString> m_driverMap; }; /** @@ -123,11 +123,11 @@ class MyMoneyDbDrivers { */ class MyMoneyDbColumn : public KShared { public: - MyMoneyDbColumn (const QString& iname, - const QString& itype = QString::null, + MyMoneyDbColumn (const TQString& iname, + const TQString& itype = TQString(), const bool iprimary = false, const bool inotnull = false, - const QString &initVersion = "0.1"): + const TQString &initVersion = "0.1"): m_name(iname), m_type(itype), m_isPrimary(iprimary), @@ -147,20 +147,20 @@ class MyMoneyDbColumn : public KShared { * * @param dbType Database driver type * - * @return QString of the DDL for the column, tailored for what the driver supports. + * @return TQString of the DDL for the column, tailored for what the driver supports. */ - virtual const QString generateDDL (databaseTypeE dbType) const; + virtual const TQString generateDDL (databaseTypeE dbType) const; - const QString& name(void) const {return (m_name);} - const QString& type(void) const {return (m_type);} + const TQString& name(void) const {return (m_name);} + const TQString& type(void) const {return (m_type);} bool isPrimaryKey(void) const {return (m_isPrimary);} bool isNotNull(void) const {return (m_isNotNull);} private: - QString m_name; - QString m_type; + TQString m_name; + TQString m_type; bool m_isPrimary; bool m_isNotNull; - QString m_initVersion; + TQString m_initVersion; }; /** @@ -168,17 +168,17 @@ class MyMoneyDbColumn : public KShared { */ class MyMoneyDbDatetimeColumn : public MyMoneyDbColumn { public: - MyMoneyDbDatetimeColumn (const QString& iname, + MyMoneyDbDatetimeColumn (const TQString& iname, const bool iprimary = false, const bool inotnull = false, - const QString &initVersion = "0.1"): + const TQString &initVersion = "0.1"): MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion) {} virtual ~MyMoneyDbDatetimeColumn() {} - virtual const QString generateDDL (databaseTypeE dbType) const; + virtual const TQString generateDDL (databaseTypeE dbType) const; virtual MyMoneyDbDatetimeColumn* clone () const; private: - static const QString calcType(void); + static const TQString calcType(void); }; /** @@ -187,17 +187,17 @@ class MyMoneyDbDatetimeColumn : public MyMoneyDbColumn { class MyMoneyDbIntColumn : public MyMoneyDbColumn { public: enum size {TINY, SMALL, MEDIUM, BIG}; - MyMoneyDbIntColumn (const QString& iname, + MyMoneyDbIntColumn (const TQString& iname, const size type = MEDIUM, const bool isigned = true, const bool iprimary = false, const bool inotnull = false, - const QString &initVersion = "0.1"): + const TQString &initVersion = "0.1"): MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion), m_type (type), m_isSigned (isigned) {} virtual ~MyMoneyDbIntColumn() {} - virtual const QString generateDDL (databaseTypeE dbType) const; + virtual const TQString generateDDL (databaseTypeE dbType) const; virtual MyMoneyDbIntColumn* clone () const; private: size m_type; @@ -212,15 +212,15 @@ class MyMoneyDbIntColumn : public MyMoneyDbColumn { class MyMoneyDbTextColumn : public MyMoneyDbColumn { public: enum size {TINY, NORMAL, MEDIUM, LONG}; - MyMoneyDbTextColumn (const QString& iname, + MyMoneyDbTextColumn (const TQString& iname, const size type = MEDIUM, const bool iprimary = false, const bool inotnull = false, - const QString &initVersion = "0.1"): + const TQString &initVersion = "0.1"): MyMoneyDbColumn (iname, "", iprimary, inotnull, initVersion), m_type (type) {} virtual ~MyMoneyDbTextColumn() {} - virtual const QString generateDDL (databaseTypeE dbType) const; + virtual const TQString generateDDL (databaseTypeE dbType) const; virtual MyMoneyDbTextColumn* clone () const; private: size m_type; @@ -237,9 +237,9 @@ class MyMoneyDbTextColumn : public MyMoneyDbColumn { */ class MyMoneyDbIndex { public: - MyMoneyDbIndex (const QString& table, - const QString& name, - const QStringList& columns, + MyMoneyDbIndex (const TQString& table, + const TQString& name, + const TQStringList& columns, bool unique = false): m_table(table), m_unique(unique), @@ -247,16 +247,16 @@ class MyMoneyDbIndex { m_columns(columns) {} MyMoneyDbIndex () {} - inline const QString table () const {return m_table;} + inline const TQString table () const {return m_table;} inline bool isUnique () const {return m_unique;} - inline const QString name () const {return m_name;} - inline const QStringList columns () const {return m_columns;} - const QString generateDDL (databaseTypeE dbType) const; + inline const TQString name () const {return m_name;} + inline const TQStringList columns () const {return m_columns;} + const TQString generateDDL (databaseTypeE dbType) const; private: - QString m_table; + TQString m_table; bool m_unique; - QString m_name; - QStringList m_columns; + TQString m_name; + TQStringList m_columns; }; /** @@ -270,20 +270,20 @@ class MyMoneyDbIndex { */ class MyMoneyDbTable { public: - MyMoneyDbTable (const QString& iname, - const QValueList<KSharedPtr <MyMoneyDbColumn> >& ifields, - const QString& initVersion = "1.0"): + MyMoneyDbTable (const TQString& iname, + const TQValueList<KSharedPtr <MyMoneyDbColumn> >& ifields, + const TQString& initVersion = "1.0"): m_name(iname), m_fields(ifields), m_initVersion(initVersion) {} MyMoneyDbTable (void) {} - inline const QString& name(void) const {return (m_name);} - inline const QString& insertString(void) const {return (m_insertString);}; - inline const QString selectAllString(bool terminate = true) const - {return (terminate ? QString(m_selectAllString + ";") : m_selectAllString);}; - inline const QString& updateString(void) const {return (m_updateString);}; - inline const QString& deleteString(void) const {return (m_deleteString);}; + inline const TQString& name(void) const {return (m_name);} + inline const TQString& insertString(void) const {return (m_insertString);}; + inline const TQString selectAllString(bool terminate = true) const + {return (terminate ? TQString(m_selectAllString + ";") : m_selectAllString);}; + inline const TQString& updateString(void) const {return (m_updateString);}; + inline const TQString& deleteString(void) const {return (m_deleteString);}; /** * This method determines the string required to drop the primary key for the table @@ -291,15 +291,15 @@ class MyMoneyDbTable { * * @param dbType The driver type of the database. * - * @return QString for the syntax to drop the primary key. + * @return TQString for the syntax to drop the primary key. */ - const QString dropPrimaryKeyString(databaseTypeE dbType) const; + const TQString dropPrimaryKeyString(databaseTypeE dbType) const; /** * This method returns a comma-separated list of all column names in the table * - * @return QString column list. + * @return TQString column list. */ - const QString columnList() const; + const TQString columnList() const; /** * This method returns the string for changing a column's definition. It covers statements * like ALTER TABLE..CHANGE COLUMN, MODIFY COLUMN, etc. @@ -308,9 +308,9 @@ class MyMoneyDbTable { * @param columnName The name of the column to be modified. * @param newDef The MyMoneyColumn object of the new column definition. * - * @return QString containing DDL to change the column. + * @return TQString containing DDL to change the column. */ - const QString modifyColumnString(databaseTypeE dbType, const QString& columnName, const MyMoneyDbColumn& newDef) const; + const TQString modifyColumnString(databaseTypeE dbType, const TQString& columnName, const MyMoneyDbColumn& newDef) const; /** * This method builds all of the SQL strings for common operations. @@ -322,9 +322,9 @@ class MyMoneyDbTable { * * @param dbType The driver type of the database. * - * @return QString of the DDL. + * @return TQString of the DDL. */ - const QString generateCreateSQL (databaseTypeE dbType) const; + const TQString generateCreateSQL (databaseTypeE dbType) const; /** * This method creates a MyMoneyDbIndex object and adds it to the list of indices for the table. @@ -333,22 +333,22 @@ class MyMoneyDbTable { * @param columns The list of the columns affected. * @param unique Whether or not this should be a unique index. */ - void addIndex(const QString& name, const QStringList& columns, bool unique = false); + void addIndex(const TQString& name, const TQStringList& columns, bool unique = false); - typedef QValueList<KSharedPtr <MyMoneyDbColumn> >::const_iterator field_iterator; + typedef TQValueList<KSharedPtr <MyMoneyDbColumn> >::const_iterator field_iterator; inline field_iterator begin(void) const {return m_fields.constBegin();} inline field_iterator end(void) const {return m_fields.constEnd(); } private: - QString m_name; - QValueList<KSharedPtr <MyMoneyDbColumn> > m_fields; - - typedef QValueList<MyMoneyDbIndex>::const_iterator index_iterator; - QValueList<MyMoneyDbIndex> m_indices; - QString m_initVersion; - QString m_insertString; // string to insert a record - QString m_selectAllString; // to select all fields - QString m_updateString; // normal string for record update - QString m_deleteString; // string to delete 1 record + TQString m_name; + TQValueList<KSharedPtr <MyMoneyDbColumn> > m_fields; + + typedef TQValueList<MyMoneyDbIndex>::const_iterator index_iterator; + TQValueList<MyMoneyDbIndex> m_indices; + TQString m_initVersion; + TQString m_insertString; // string to insert a record + TQString m_selectAllString; // to select all fields + TQString m_updateString; // normal string for record update + TQString m_deleteString; // string to delete 1 record }; /** @@ -360,21 +360,21 @@ class MyMoneyDbTable { */ class MyMoneyDbView { public: - MyMoneyDbView (const QString& name, - const QString& createString, - const QString& initVersion = "0.1") + MyMoneyDbView (const TQString& name, + const TQString& createString, + const TQString& initVersion = "0.1") : m_name (name), m_createString (createString), m_initVersion (initVersion) {} MyMoneyDbView (void) {} - inline const QString& name(void) const {return (m_name);} - inline const QString createString(void) const {return (m_createString);}; + inline const TQString& name(void) const {return (m_name);} + inline const TQString createString(void) const {return (m_createString);}; private: - QString m_name; - QString m_createString; - QString m_initVersion; + TQString m_name; + TQString m_createString; + TQString m_initVersion; }; /** @@ -387,22 +387,22 @@ public: MyMoneyDbDef(); ~MyMoneyDbDef() {} - const QString generateSQL (const QString& driver) const; + const TQString generateSQL (const TQString& driver) const; - typedef QMap<QString, MyMoneyDbTable>::const_iterator table_iterator; + typedef TQMap<TQString, MyMoneyDbTable>::const_iterator table_iterator; inline table_iterator tableBegin(void) const {return m_tables.constBegin();} inline table_iterator tableEnd(void) const {return m_tables.constEnd();} - typedef QMap<QString, MyMoneyDbView>::const_iterator view_iterator; + typedef TQMap<TQString, MyMoneyDbView>::const_iterator view_iterator; inline view_iterator viewBegin(void) const {return m_views.constBegin();} inline view_iterator viewEnd(void) const {return m_views.constEnd();} inline unsigned int currentVersion() const {return (m_currentVersion);}; private: - const QString enclose(const QString& text) const - {return (QString("'" + text + "'"));}; - static unsigned int m_currentVersion; // The current version of the database layout + const TQString enclose(const TQString& text) const + {return (TQString("'" + text + "'"));}; + static unsigned int m_currentVersion; // The current version of the database tqlayout MyMoneyDbDrivers m_drivers; #define TABLE(name) void name(); #define VIEW(name) void name(); @@ -422,8 +422,8 @@ private: TABLE(Budgets); VIEW(Balances); protected: - QMap<QString, MyMoneyDbTable> m_tables; - QMap<QString, MyMoneyDbView> m_views; + TQMap<TQString, MyMoneyDbTable> m_tables; + TQMap<TQString, MyMoneyDbView> m_views; }; class IMyMoneySerialize; @@ -432,7 +432,7 @@ class IMyMoneySerialize; * The MyMoneyDbColumn class is a base type for generic db columns. * Derived types exist for several common column types. */ -class MyMoneyStorageSql : public IMyMoneyStorageFormat, public QSqlDatabase, public KShared { +class MyMoneyStorageSql : public IMyMoneyStorageFormat, public TQSqlDatabase, public KShared { public: MyMoneyStorageSql (IMyMoneySerialize *storage, const KURL& = KURL()); @@ -444,7 +444,7 @@ public: * MyMoneyStorageSql - open database file * * @param url pseudo-URL of database to be opened - * @param openMode open mode, same as for QFile::open + * @param openMode open mode, same as for TQFile::open * @param clear whether existing data can be deleted * @return 0 - database successfully opened @@ -491,7 +491,7 @@ public: * @return : error message to be displayed * */ - const QString& lastError() const {return (m_error);}; + const TQString& lastError() const {return (m_error);}; /** * This method is used when a database file is open, and the data is to * be saved in a different file or format. It will ensure that all data @@ -533,40 +533,40 @@ public: void modifyBudget(const MyMoneyBudget& bud); void removeBudget(const MyMoneyBudget& bud); - unsigned long transactionCount (const QString& aid = QString()) const; - inline const QMap<QString, unsigned long> transactionCountMap () const + unsigned long transactionCount (const TQString& aid = TQString()) const; + inline const TQMap<TQString, unsigned long> transactionCountMap () const {return (m_transactionCountMap);}; /** * the storage manager also needs the following read entry points */ - const QMap<QString, MyMoneyAccount> fetchAccounts (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneyMoney> fetchBalance(const QStringList& id, const QDate& date) const; - const QMap<QString, MyMoneyBudget> fetchBudgets (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneySecurity> fetchCurrencies (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneyInstitution> fetchInstitutions (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneyPayee> fetchPayees (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const MyMoneyPriceList fetchPrices (const QStringList& fromIdList = QStringList (), const QStringList& toIdList = QStringList(), bool forUpdate = false) const; - const MyMoneyPrice fetchSinglePrice (const QString& fromIdList, const QString& toIdList, const QDate& date, bool exactDate, bool forUpdate = false) const; - const QMap<QString, MyMoneyReport> fetchReports (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneySchedule> fetchSchedules (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneySecurity> fetchSecurities (const QStringList& idList = QStringList (), bool forUpdate = false) const; - const QMap<QString, MyMoneyTransaction> fetchTransactions (const QString& tidList = QString (), const QString& dateClause = QString(), bool forUpdate = false) const; - const QMap<QString, MyMoneyTransaction> fetchTransactions (const MyMoneyTransactionFilter& filter) const; - bool isReferencedByTransaction(const QString& id) const; - - void readPayees(const QString&); - void readPayees(const QValueList<QString> payeeList = QValueList<QString>()); + const TQMap<TQString, MyMoneyAccount> fetchAccounts (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneyMoney> fetchBalance(const TQStringList& id, const TQDate& date) const; + const TQMap<TQString, MyMoneyBudget> fetchBudgets (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneySecurity> fetchCurrencies (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneyInstitution> fetchInstitutions (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneyPayee> fetchPayees (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const MyMoneyPriceList fetchPrices (const TQStringList& fromIdList = TQStringList (), const TQStringList& toIdList = TQStringList(), bool forUpdate = false) const; + const MyMoneyPrice fetchSinglePrice (const TQString& fromIdList, const TQString& toIdList, const TQDate& date, bool exactDate, bool forUpdate = false) const; + const TQMap<TQString, MyMoneyReport> fetchReports (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneySchedule> fetchSchedules (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneySecurity> fetchSecurities (const TQStringList& idList = TQStringList (), bool forUpdate = false) const; + const TQMap<TQString, MyMoneyTransaction> fetchTransactions (const TQString& tidList = TQString (), const TQString& dateClause = TQString(), bool forUpdate = false) const; + const TQMap<TQString, MyMoneyTransaction> fetchTransactions (const MyMoneyTransactionFilter& filter) const; + bool isReferencedByTransaction(const TQString& id) const; + + void readPayees(const TQString&); + void readPayees(const TQValueList<TQString> payeeList = TQValueList<TQString>()); void readTransactions(const MyMoneyTransactionFilter& filter); - void setProgressCallback(void(*callback)(int, int, const QString&)); + void setProgressCallback(void(*callback)(int, int, const TQString&)); - virtual void readFile(QIODevice* s, IMyMoneySerialize* storage) { Q_UNUSED(s); Q_UNUSED(storage) }; - virtual void writeFile(QIODevice* s, IMyMoneySerialize* storage){ Q_UNUSED(s); Q_UNUSED(storage) }; + virtual void readFile(TQIODevice* s, IMyMoneySerialize* storage) { Q_UNUSED(s); Q_UNUSED(storage) }; + virtual void writeFile(TQIODevice* s, IMyMoneySerialize* storage){ Q_UNUSED(s); Q_UNUSED(storage) }; - void startCommitUnit (const QString& callingFunction); - bool endCommitUnit (const QString& callingFunction); - void cancelCommitUnit (const QString& callingFunction); + void startCommitUnit (const TQString& callingFunction); + bool endCommitUnit (const TQString& callingFunction); + void cancelCommitUnit (const TQString& callingFunction); - long unsigned getRecCount(const QString& table) const; + long unsigned getRecCount(const TQString& table) const; long unsigned getNextBudgetId() const; long unsigned getNextAccountId() const; long unsigned getNextInstitutionId() const; @@ -596,7 +596,7 @@ public: private: // a function to build a comprehensive error message - QString& buildError (const QSqlQuery& q, const QString& function, const QString& message) const; + TQString& buildError (const TQSqlQuery& q, const TQString& function, const TQString& message) const; // write routines void writeUserInformation(void); void writeInstitutions(void); @@ -614,9 +614,9 @@ private: void writeInstitution(const MyMoneyInstitution& i, MyMoneySqlQuery& q); void writePayee(const MyMoneyPayee& p, MyMoneySqlQuery& q, bool isUserInfo = false); void writeAccount (const MyMoneyAccount& a, MyMoneySqlQuery& q); - void writeTransaction(const QString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const QString& type); - void writeSplits(const QString& txId, const QString& type, const QValueList<MyMoneySplit>& splitList); - void writeSplit(const QString& txId, const MyMoneySplit& split, const QString& type, const int splitId, MyMoneySqlQuery& q); + void writeTransaction(const TQString& txId, const MyMoneyTransaction& tx, MyMoneySqlQuery& q, const TQString& type); + void writeSplits(const TQString& txId, const TQString& type, const TQValueList<MyMoneySplit>& splitList); + void writeSplit(const TQString& txId, const MyMoneySplit& split, const TQString& type, const int splitId, MyMoneySqlQuery& q); void writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuery& q, bool insert); void writeSecurity(const MyMoneySecurity& security, MyMoneySqlQuery& q); void writePricePair ( const MyMoneyPriceEntries& p); @@ -624,21 +624,21 @@ private: void writeCurrency(const MyMoneySecurity& currency, MyMoneySqlQuery& q); void writeReport (const MyMoneyReport& rep, MyMoneySqlQuery& q); void writeBudget (const MyMoneyBudget& bud, MyMoneySqlQuery& q); - void writeKeyValuePairs(const QString& kvpType, const QString& kvpId, const QMap<QString, QString>& pairs); - void writeKeyValuePair(const QString& kvpType, const QString& kvpId, - const QString& kvpKey, const QString& kvpData); + void writeKeyValuePairs(const TQString& kvpType, const TQString& kvpId, const TQMap<TQString, TQString>& pairs); + void writeKeyValuePair(const TQString& kvpType, const TQString& kvpId, + const TQString& kvpKey, const TQString& kvpData); // read routines void readFileInfo(void); void readLogonData(void); void readUserInformation(void); void readInstitutions(void); void readAccounts(void); - void readTransaction(const QString id); - void readTransactions(const QString& tidList = QString(), const QString& dateClause = QString()); - void readTransaction(MyMoneyTransaction &tx, const QString& tid); + void readTransaction(const TQString id); + void readTransactions(const TQString& tidList = TQString(), const TQString& dateClause = TQString()); + void readTransaction(MyMoneyTransaction &tx, const TQString& tid); void readSplit (MyMoneySplit& s, const MyMoneySqlQuery& q, const MyMoneyDbTable& t) const; - const MyMoneyKeyValueContainer readKeyValuePairs (const QString& kvpType, const QString& kvpId) const; - const QMap<QString, MyMoneyKeyValueContainer> readKeyValuePairs (const QString& kvpType, const QStringList& kvpIdList) const; + const MyMoneyKeyValueContainer readKeyValuePairs (const TQString& kvpType, const TQString& kvpId) const; + const TQMap<TQString, MyMoneyKeyValueContainer> readKeyValuePairs (const TQString& kvpType, const TQStringList& kvpIdList) const; void readSchedules(void); void readSecurities(void); void readPrices(void); @@ -646,27 +646,27 @@ private: void readReports(void); void readBudgets(void); - void deleteTransaction(const QString& id); - void deleteSchedule(const QString& id); - void deleteKeyValuePairs(const QString& kvpType, const QString& kvpId); - long unsigned calcHighId (const long unsigned&, const QString&); + void deleteTransaction(const TQString& id); + void deleteSchedule(const TQString& id); + void deleteKeyValuePairs(const TQString& kvpType, const TQString& kvpId); + long unsigned calcHighId (const long unsigned&, const TQString&); - void setVersion (const QString& version); + void setVersion (const TQString& version); - void signalProgress(int current, int total, const QString& = "") const; - void (*m_progressCallback)(int, int, const QString&); + void signalProgress(int current, int total, const TQString& = "") const; + void (*m_progressCallback)(int, int, const TQString&); - //void startCommitUnit (const QString& callingFunction); - //void endCommitUnit (const QString& callingFunction); - //void cancelCommitUnit (const QString& callingFunction); + //void startCommitUnit (const TQString& callingFunction); + //void endCommitUnit (const TQString& callingFunction); + //void cancelCommitUnit (const TQString& callingFunction); int splitState(const MyMoneyTransactionFilter::stateOptionE& state) const; - inline const QDate getDate (const QString& date) const { - return (date.isNull() ? QDate() : QDate::fromString(date, Qt::ISODate)); + inline const TQDate getDate (const TQString& date) const { + return (date.isNull() ? TQDate() : TQDate::fromString(date, Qt::ISODate)); } - inline const QDateTime getDateTime (const QString& date) const { - return (date.isNull() ? QDateTime() : QDateTime::fromString(date, Qt::ISODate)); + inline const TQDateTime getDateTime (const TQString& date) const { + return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, Qt::ISODate)); } // open routines @@ -690,16 +690,16 @@ private: bool sqliteAlterTable(const MyMoneyDbTable& t); bool addColumn(const MyMoneyDbTable& t, const MyMoneyDbColumn& c, - const QString& after = QString()); - bool addColumn(const QString& table, - const QString& column, - const QString& after = QString()); + const TQString& after = TQString()); + bool addColumn(const TQString& table, + const TQString& column, + const TQString& after = TQString()); bool dropColumn(const MyMoneyDbTable& t, - const QString& c); - bool dropColumn(const QString& table, - const QString& column); + const TQString& c); + bool dropColumn(const TQString& table, + const TQString& column); -// long long unsigned getRecCount(const QString& table); +// long long unsigned getRecCount(const TQString& table); int createTables(); void createTable(const MyMoneyDbTable& t); void clean (); @@ -716,7 +716,7 @@ private: bool m_loadAll; // preload all data bool m_override; // override open if already in use // error message - QString m_error; + TQString m_error; // record counts long unsigned m_institutions; long unsigned m_accounts; @@ -740,14 +740,14 @@ private: long unsigned m_hiIdReports; long unsigned m_hiIdBudgets; // encrypt option - usage TBD - QString m_encryptData; + TQString m_encryptData; /** * This variable is used to suppress status messages except during * initial data load and final write */ - bool m_displayStatus; + bool m_displaytqStatus; /** * On occasions, e.g. after a complex transaction search, or for populating a * payee popup list, it becomes necessary to load all data into memory. The @@ -760,19 +760,19 @@ private: * This member variable holds a list of those accounts for which all * transactions are in memory, thus saving reading them again */ -// QValueList<QString> m_accountsLoaded; +// TQValueList<TQString> m_accountsLoaded; /** * This member variable is used when loading transactions to list all * referenced payees, which can then be read into memory (if not already there) */ -// QValueList<QString> m_payeeList; +// TQValueList<TQString> m_payeeList; - void alert(QString s) const {qDebug("%s", s.ascii());}; // FIXME: remove... + void alert(TQString s) const {qDebug("%s", s.ascii());}; // FIXME: remove... /** The following keeps track of commitment units (known as transactions in SQL * though it would be confusing to use that term within KMM). It is implemented * as a stack for debug purposes. Long term, probably a count would suffice */ - QValueStack<QString> m_commitUnitStack; + TQValueStack<TQString> m_commitUnitStack; /** * This member variable is used to preload transactions for preferred accounts */ @@ -790,13 +790,13 @@ private: * probably be moved into the MyMoneyAccount object; maybe we will do that once * the database code has been properly checked out */ - QMap<QString, unsigned long> m_transactionCountMap; + TQMap<TQString, unsigned long> m_transactionCountMap; /** * These member variables hold the user name and date/time of logon */ - QString m_logonUser; - QDateTime m_logonAt; - QDateTime m_txPostDate; // FIXME: remove when Tom puts date into split object + TQString m_logonUser; + TQDateTime m_logonAt; + TQDateTime m_txPostDate; // FIXME: remove when Tom puts date into split object //Disable copying MyMoneyStorageSql (const MyMoneyStorageSql& rhs); diff --git a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp index e8027d1..49e0739 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragexml.cpp +++ b/kmymoney2/mymoney/storage/mymoneystoragexml.cpp @@ -22,10 +22,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qdom.h> -#include <qmap.h> -#include <qxml.h> +#include <tqfile.h> +#include <tqdom.h> +#include <tqmap.h> +#include <tqxml.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -52,49 +52,49 @@ class MyMoneyStorageXML::Private public: Private() {} - QMap<QString, MyMoneyInstitution> iList; - QMap<QString, MyMoneyAccount> aList; - QMap<QString, MyMoneyTransaction> tList; - QMap<QString, MyMoneyPayee> pList; - QMap<QString, MyMoneySchedule> sList; - QMap<QString, MyMoneySecurity> secList; - QMap<QString, MyMoneyReport> rList; - QMap<QString, MyMoneyBudget> bList; - QMap<MyMoneySecurityPair, MyMoneyPriceEntries> prList; + TQMap<TQString, MyMoneyInstitution> iList; + TQMap<TQString, MyMoneyAccount> aList; + TQMap<TQString, MyMoneyTransaction> tList; + TQMap<TQString, MyMoneyPayee> pList; + TQMap<TQString, MyMoneySchedule> sList; + TQMap<TQString, MyMoneySecurity> secList; + TQMap<TQString, MyMoneyReport> rList; + TQMap<TQString, MyMoneyBudget> bList; + TQMap<MyMoneySecurityPair, MyMoneyPriceEntries> prList; - QString m_fromSecurity; - QString m_toSecurity; + TQString m_fromSecurity; + TQString m_toSecurity; }; -class MyMoneyXmlContentHandler : public QXmlContentHandler +class MyMoneyXmlContentHandler : public TQXmlContentHandler { public: MyMoneyXmlContentHandler(MyMoneyStorageXML* reader); virtual ~MyMoneyXmlContentHandler() {} - virtual void setDocumentLocator (QXmlLocator * locator) { m_loc = locator; } + virtual void setDocumentLocator (TQXmlLocator * locator) { m_loc = locator; } virtual bool startDocument (void); virtual bool endDocument (void); - virtual bool startPrefixMapping(const QString & prefix, const QString & uri); - virtual bool endPrefixMapping(const QString & prefix); - virtual bool startElement(const QString & namespaceURI, const QString & localName, const QString & qName, const QXmlAttributes & atts); - virtual bool endElement(const QString & namespaceURI, const QString & localName, const QString & qName); - virtual bool characters(const QString & ch); - virtual bool ignorableWhitespace(const QString & ch); - virtual bool processingInstruction(const QString & target, const QString & data); - virtual bool skippedEntity(const QString & name); - virtual QString errorString(void); + virtual bool startPrefixMapping(const TQString & prefix, const TQString & uri); + virtual bool endPrefixMapping(const TQString & prefix); + virtual bool startElement(const TQString & namespaceURI, const TQString & localName, const TQString & qName, const TQXmlAttributes & atts); + virtual bool endElement(const TQString & namespaceURI, const TQString & localName, const TQString & qName); + virtual bool characters(const TQString & ch); + virtual bool ignorableWhitespace(const TQString & ch); + virtual bool processingInstruction(const TQString & target, const TQString & data); + virtual bool skippedEntity(const TQString & name); + virtual TQString errorString(void); private: MyMoneyStorageXML* m_reader; - QXmlLocator* m_loc; + TQXmlLocator* m_loc; int m_level; int m_elementCount; - QDomDocument m_doc; - QDomElement m_baseNode; - QDomElement m_currNode; - QString m_errMsg; + TQDomDocument m_doc; + TQDomElement m_baseNode; + TQDomElement m_currNode; + TQString m_errMsg; }; MyMoneyXmlContentHandler::MyMoneyXmlContentHandler(MyMoneyStorageXML* reader) : @@ -117,28 +117,28 @@ bool MyMoneyXmlContentHandler::endDocument(void) return true; } -bool MyMoneyXmlContentHandler::skippedEntity (const QString & /* name */) +bool MyMoneyXmlContentHandler::skippedEntity (const TQString & /* name */) { - // qDebug(QString("Skipped entity '%1'").arg(name)); + // qDebug(TQString("Skipped entity '%1'").tqarg(name)); return true; } -bool MyMoneyXmlContentHandler::startPrefixMapping (const QString& /*prefix */, const QString & /* uri */) +bool MyMoneyXmlContentHandler::startPrefixMapping (const TQString& /*prefix */, const TQString & /* uri */) { - // qDebug(QString("start prefix '%1', '%2'").arg(prefix).arg(uri)); + // qDebug(TQString("start prefix '%1', '%2'").tqarg(prefix).tqarg(uri)); return true; } -bool MyMoneyXmlContentHandler::endPrefixMapping (const QString& /* prefix */) +bool MyMoneyXmlContentHandler::endPrefixMapping (const TQString& /* prefix */) { - // qDebug(QString("end prefix '%1'").arg(prefix)); + // qDebug(TQString("end prefix '%1'").tqarg(prefix)); return true; } -bool MyMoneyXmlContentHandler::startElement (const QString& /* namespaceURI */, const QString& /* localName */, const QString& qName, const QXmlAttributes & atts) +bool MyMoneyXmlContentHandler::startElement (const TQString& /* namespaceURI */, const TQString& /* localName */, const TQString& qName, const TQXmlAttributes & atts) { if(m_level == 0) { - QString s = qName.lower(); + TQString s = qName.lower(); if(s == "transaction" || s == "account" || s == "price" @@ -162,28 +162,28 @@ bool MyMoneyXmlContentHandler::startElement (const QString& /* namespaceURI */, } else if(s == "transactions") { qDebug("reading transactions"); if(atts.count()) { - int count = atts.value(QString("count")).toUInt(); + int count = atts.value(TQString("count")).toUInt(); m_reader->signalProgress(0, count, i18n("Loading transactions...")); m_elementCount = 0; } } else if(s == "accounts") { qDebug("reading accounts"); if(atts.count()) { - int count = atts.value(QString("count")).toUInt(); + int count = atts.value(TQString("count")).toUInt(); m_reader->signalProgress(0, count, i18n("Loading accounts...")); m_elementCount = 0; } } else if(s == "securities") { qDebug("reading securities"); if(atts.count()) { - int count = atts.value(QString("count")).toUInt(); + int count = atts.value(TQString("count")).toUInt(); m_reader->signalProgress(0, count, i18n("Loading securities...")); m_elementCount = 0; } } else if(s == "reports") { qDebug("reading reports"); if(atts.count()) { - int count = atts.value(QString("count")).toUInt(); + int count = atts.value(TQString("count")).toUInt(); m_reader->signalProgress(0, count, i18n("Loading reports...")); m_elementCount = 0; } @@ -192,14 +192,14 @@ bool MyMoneyXmlContentHandler::startElement (const QString& /* namespaceURI */, m_elementCount = 0; } else if(s == "pricepair") { if(atts.count()) { - m_reader->d->m_fromSecurity = atts.value(QString("from")); - m_reader->d->m_toSecurity = atts.value(QString("to")); + m_reader->d->m_fromSecurity = atts.value(TQString("from")); + m_reader->d->m_toSecurity = atts.value(TQString("to")); } } } else { m_level++; - QDomElement node = m_doc.createElement(qName); + TQDomElement node = m_doc.createElement(qName); for(int i=0; i < atts.count(); ++i) { node.setAttribute(atts.qName(i), atts.value(i)); } @@ -209,12 +209,12 @@ bool MyMoneyXmlContentHandler::startElement (const QString& /* namespaceURI */, return true; } -bool MyMoneyXmlContentHandler::endElement(const QString& /* namespaceURI */, const QString& /* localName */, const QString& qName) +bool MyMoneyXmlContentHandler::endElement(const TQString& /* namespaceURI */, const TQString& /* localName */, const TQString& qName) { bool rc = true; - QString s = qName.lower(); + TQString s = qName.lower(); if(m_level) { - m_currNode = m_currNode.parentNode().toElement(); + m_currNode = m_currNode.tqparentNode().toElement(); m_level--; if(!m_level) { try { @@ -265,18 +265,18 @@ bool MyMoneyXmlContentHandler::endElement(const QString& /* namespaceURI */, con MyMoneyPrice p(m_reader->d->m_fromSecurity, m_reader->d->m_toSecurity, m_baseNode); m_reader->d->prList[MyMoneySecurityPair(m_reader->d->m_fromSecurity, m_reader->d->m_toSecurity)][p.date()] = p; } else { - m_errMsg = i18n("Unknown XML tag %1 found in line %2").arg(qName).arg(m_loc->lineNumber()); + m_errMsg = i18n("Unknown XML tag %1 found in line %2").tqarg(qName).tqarg(m_loc->lineNumber()); kdWarning() << m_errMsg << endl; rc = false; } m_reader->signalProgress(++m_elementCount, 0); } catch(MyMoneyException* e) { - m_errMsg = i18n("Exception while creating a %1 element: %2").arg(s).arg(e->what()); + m_errMsg = i18n("Exception while creating a %1 element: %2").tqarg(s).tqarg(e->what()); kdWarning() << m_errMsg << endl; delete e; rc = false; } - m_doc = QDomDocument(); + m_doc = TQDomDocument(); } } else { if(s == "institutions") { @@ -334,22 +334,22 @@ bool MyMoneyXmlContentHandler::endElement(const QString& /* namespaceURI */, con return rc; } -bool MyMoneyXmlContentHandler::characters(const QString& /* ch */) +bool MyMoneyXmlContentHandler::characters(const TQString& /* ch */) { return true; } -bool MyMoneyXmlContentHandler::ignorableWhitespace(const QString& /* ch */) +bool MyMoneyXmlContentHandler::ignorableWhitespace(const TQString& /* ch */) { return true; } -bool MyMoneyXmlContentHandler::processingInstruction(const QString& /* target */, const QString& /* data */) +bool MyMoneyXmlContentHandler::processingInstruction(const TQString& /* target */, const TQString& /* data */) { return true; } -QString MyMoneyXmlContentHandler::errorString(void) +TQString MyMoneyXmlContentHandler::errorString(void) { return m_errMsg; } @@ -373,7 +373,7 @@ MyMoneyStorageXML::~MyMoneyStorageXML() } // Function to read in the file, send to XML parser. -void MyMoneyStorageXML::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) +void MyMoneyStorageXML::readFile(TQIODevice* pDevice, IMyMoneySerialize* storage) { Q_CHECK_PTR(storage); Q_CHECK_PTR(pDevice); @@ -382,20 +382,20 @@ void MyMoneyStorageXML::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) m_storage = storage; - m_doc = new QDomDocument; + m_doc = new TQDomDocument; Q_CHECK_PTR(m_doc); qDebug("reading file"); - // creating the QXmlInputSource object based on a QIODevice object + // creating the TQXmlInputSource object based on a TQIODevice object // reads all data of the underlying object into memory. I have not // found an object that reads on the fly. I tried to derive one myself, // but there could be a severe problem with decoding when reading // blocks of data and not a stream. So I left it the way it is. (ipwizard) - QXmlInputSource xml(pDevice); + TQXmlInputSource xml(pDevice); qDebug("start parsing file"); MyMoneyXmlContentHandler mmxml(this); - QXmlSimpleReader reader; + TQXmlSimpleReader reader; reader.setContentHandler(&mmxml); if(!reader.parse(&xml, false)) { @@ -421,7 +421,7 @@ void MyMoneyStorageXML::readFile(QIODevice* pDevice, IMyMoneySerialize* storage) signalProgress(-1, -1); } -void MyMoneyStorageXML::writeFile(QIODevice* qf, IMyMoneySerialize* storage) +void MyMoneyStorageXML::writeFile(TQIODevice* qf, IMyMoneySerialize* storage) { Q_CHECK_PTR(qf); Q_CHECK_PTR(storage); @@ -432,67 +432,67 @@ void MyMoneyStorageXML::writeFile(QIODevice* qf, IMyMoneySerialize* storage) m_storage = storage; // qDebug("XMLWRITER: Starting file write"); - m_doc = new QDomDocument("KMYMONEY-FILE"); + m_doc = new TQDomDocument("KMYMONEY-FILE"); Q_CHECK_PTR(m_doc); - QDomProcessingInstruction instruct = m_doc->createProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\""); + TQDomProcessingInstruction instruct = m_doc->createProcessingInstruction("xml", "version=\"1.0\" encoding=\"utf-8\""); m_doc->appendChild(instruct); - QDomElement mainElement = m_doc->createElement("KMYMONEY-FILE"); + TQDomElement mainElement = m_doc->createElement("KMYMONEY-FILE"); m_doc->appendChild(mainElement); - QDomElement fileInfo = m_doc->createElement("FILEINFO"); + TQDomElement fileInfo = m_doc->createElement("FILEINFO"); writeFileInformation(fileInfo); mainElement.appendChild(fileInfo); - QDomElement userInfo = m_doc->createElement("USER"); + TQDomElement userInfo = m_doc->createElement("USER"); writeUserInformation(userInfo); mainElement.appendChild(userInfo); - QDomElement institutions = m_doc->createElement("INSTITUTIONS"); + TQDomElement institutions = m_doc->createElement("INSTITUTIONS"); writeInstitutions(institutions); mainElement.appendChild(institutions); - QDomElement payees = m_doc->createElement("PAYEES"); + TQDomElement payees = m_doc->createElement("PAYEES"); writePayees(payees); mainElement.appendChild(payees); - QDomElement accounts = m_doc->createElement("ACCOUNTS"); + TQDomElement accounts = m_doc->createElement("ACCOUNTS"); writeAccounts(accounts); mainElement.appendChild(accounts); - QDomElement transactions = m_doc->createElement("TRANSACTIONS"); + TQDomElement transactions = m_doc->createElement("TRANSACTIONS"); writeTransactions(transactions); mainElement.appendChild(transactions); - QDomElement keyvalpairs = writeKeyValuePairs(m_storage->pairs()); + TQDomElement keyvalpairs = writeKeyValuePairs(m_storage->pairs()); mainElement.appendChild(keyvalpairs); - QDomElement schedules = m_doc->createElement("SCHEDULES"); + TQDomElement schedules = m_doc->createElement("SCHEDULES"); writeSchedules(schedules); mainElement.appendChild(schedules); - QDomElement equities = m_doc->createElement("SECURITIES"); + TQDomElement equities = m_doc->createElement("SECURITIES"); writeSecurities(equities); mainElement.appendChild(equities); - QDomElement currencies = m_doc->createElement("CURRENCIES"); + TQDomElement currencies = m_doc->createElement("CURRENCIES"); writeCurrencies(currencies); mainElement.appendChild(currencies); - QDomElement prices = m_doc->createElement("PRICES"); + TQDomElement prices = m_doc->createElement("PRICES"); writePrices(prices); mainElement.appendChild(prices); - QDomElement reports = m_doc->createElement("REPORTS"); + TQDomElement reports = m_doc->createElement("REPORTS"); writeReports(reports); mainElement.appendChild(reports); - QDomElement budgets = m_doc->createElement("BUDGETS"); + TQDomElement budgets = m_doc->createElement("BUDGETS"); writeBudgets(budgets); mainElement.appendChild(budgets); - QTextStream stream(qf); - stream.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream stream(qf); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << m_doc->toString(); delete m_doc; @@ -508,36 +508,36 @@ void MyMoneyStorageXML::writeFile(QIODevice* qf, IMyMoneySerialize* storage) m_storage = NULL; } -bool MyMoneyStorageXML::readFileInformation(const QDomElement& fileInfo) +bool MyMoneyStorageXML::readFileInformation(const TQDomElement& fileInfo) { signalProgress(0, 3, i18n("Loading file information...")); bool rc = true; - QDomElement temp = findChildElement("CREATION_DATE", fileInfo); - if (temp == QDomElement()) { + TQDomElement temp = findChildElement("CREATION_DATE", fileInfo); + if (temp == TQDomElement()) { rc = false; } - QString strDate = QStringEmpty(temp.attribute("date")); + TQString strDate = TQStringEmpty(temp.attribute("date")); m_storage->setCreationDate(stringToDate(strDate)); signalProgress(1, 0); temp = findChildElement("LAST_MODIFIED_DATE", fileInfo); - if (temp == QDomElement()) { + if (temp == TQDomElement()) { rc = false; } - strDate = QStringEmpty(temp.attribute("date")); + strDate = TQStringEmpty(temp.attribute("date")); m_storage->setLastModificationDate(stringToDate(strDate)); signalProgress(2, 0); temp = findChildElement("VERSION", fileInfo); - if (temp == QDomElement()) { + if (temp == TQDomElement()) { rc = false; } - QString strVersion = QStringEmpty(temp.attribute("id")); + TQString strVersion = TQStringEmpty(temp.attribute("id")); fileVersionRead = strVersion.toUInt(NULL, 16); temp = findChildElement("FIXVERSION", fileInfo); - if (temp != QDomElement()) { - QString strFixVersion = QStringEmpty(temp.attribute("id")); + if (temp != TQDomElement()) { + TQString strFixVersion = TQStringEmpty(temp.attribute("id")); m_storage->setFileFixVersion (strFixVersion.toUInt()); } // FIXME The old version stuff used this rather odd number @@ -549,33 +549,33 @@ bool MyMoneyStorageXML::readFileInformation(const QDomElement& fileInfo) return rc; } -void MyMoneyStorageXML::writeFileInformation(QDomElement& fileInfo) +void MyMoneyStorageXML::writeFileInformation(TQDomElement& fileInfo) { - QDomElement creationDate = m_doc->createElement("CREATION_DATE"); + TQDomElement creationDate = m_doc->createElement("CREATION_DATE"); creationDate.setAttribute("date", dateToString(m_storage->creationDate())); fileInfo.appendChild(creationDate); - QDomElement lastModifiedDate = m_doc->createElement("LAST_MODIFIED_DATE"); + TQDomElement lastModifiedDate = m_doc->createElement("LAST_MODIFIED_DATE"); lastModifiedDate.setAttribute("date", dateToString(m_storage->lastModificationDate())); fileInfo.appendChild(lastModifiedDate); - QDomElement version = m_doc->createElement("VERSION"); + TQDomElement version = m_doc->createElement("VERSION"); version.setAttribute("id", "1"); fileInfo.appendChild(version); - QDomElement fixVersion = m_doc->createElement("FIXVERSION"); + TQDomElement fixVersion = m_doc->createElement("FIXVERSION"); fixVersion.setAttribute("id", m_storage->fileFixVersion()); fileInfo.appendChild(fixVersion); } -void MyMoneyStorageXML::writeUserInformation(QDomElement& userInfo) +void MyMoneyStorageXML::writeUserInformation(TQDomElement& userInfo) { MyMoneyPayee user = m_storage->user(); userInfo.setAttribute("name", user.name()); userInfo.setAttribute("email", user.email()); - QDomElement address = m_doc->createElement("ADDRESS"); + TQDomElement address = m_doc->createElement("ADDRESS"); address.setAttribute("street", user.address()); address.setAttribute("city", user.city()); address.setAttribute("county", user.state()); @@ -585,22 +585,22 @@ void MyMoneyStorageXML::writeUserInformation(QDomElement& userInfo) userInfo.appendChild(address); } -bool MyMoneyStorageXML::readUserInformation(const QDomElement& userElement) +bool MyMoneyStorageXML::readUserInformation(const TQDomElement& userElement) { bool rc = true; signalProgress(0, 1, i18n("Loading user information...")); MyMoneyPayee user; - user.setName(QStringEmpty(userElement.attribute("name"))); - user.setEmail(QStringEmpty(userElement.attribute("email"))); + user.setName(TQStringEmpty(userElement.attribute("name"))); + user.setEmail(TQStringEmpty(userElement.attribute("email"))); - QDomElement addressNode = findChildElement("ADDRESS", userElement); + TQDomElement addressNode = findChildElement("ADDRESS", userElement); if(!addressNode.isNull()) { - user.setAddress(QStringEmpty(addressNode.attribute("street"))); - user.setCity(QStringEmpty(addressNode.attribute("city"))); - user.setState(QStringEmpty(addressNode.attribute("county"))); - user.setPostcode(QStringEmpty(addressNode.attribute("zipcode"))); - user.setTelephone(QStringEmpty(addressNode.attribute("telephone"))); + user.setAddress(TQStringEmpty(addressNode.attribute("street"))); + user.setCity(TQStringEmpty(addressNode.attribute("city"))); + user.setState(TQStringEmpty(addressNode.attribute("county"))); + user.setPostcode(TQStringEmpty(addressNode.attribute("zipcode"))); + user.setTelephone(TQStringEmpty(addressNode.attribute("telephone"))); } m_storage->setUser(user); @@ -609,41 +609,41 @@ bool MyMoneyStorageXML::readUserInformation(const QDomElement& userElement) return rc; } -void MyMoneyStorageXML::writeInstitutions(QDomElement& institutions) +void MyMoneyStorageXML::writeInstitutions(TQDomElement& institutions) { - const QValueList<MyMoneyInstitution> list = m_storage->institutionList(); - QValueList<MyMoneyInstitution>::ConstIterator it; + const TQValueList<MyMoneyInstitution> list = m_storage->institutionList(); + TQValueList<MyMoneyInstitution>::ConstIterator it; institutions.setAttribute("count", list.count()); for(it = list.begin(); it != list.end(); ++it) writeInstitution(institutions, *it); } -void MyMoneyStorageXML::writeInstitution(QDomElement& institution, const MyMoneyInstitution& i) +void MyMoneyStorageXML::writeInstitution(TQDomElement& institution, const MyMoneyInstitution& i) { i.writeXML(*m_doc, institution); } -void MyMoneyStorageXML::writePayees(QDomElement& payees) +void MyMoneyStorageXML::writePayees(TQDomElement& payees) { - const QValueList<MyMoneyPayee> list = m_storage->payeeList(); - QValueList<MyMoneyPayee>::ConstIterator it; + const TQValueList<MyMoneyPayee> list = m_storage->payeeList(); + TQValueList<MyMoneyPayee>::ConstIterator it; payees.setAttribute("count", list.count()); for(it = list.begin(); it != list.end(); ++it) writePayee(payees, *it); } -void MyMoneyStorageXML::writePayee(QDomElement& payee, const MyMoneyPayee& p) +void MyMoneyStorageXML::writePayee(TQDomElement& payee, const MyMoneyPayee& p) { p.writeXML(*m_doc, payee); } -void MyMoneyStorageXML::writeAccounts(QDomElement& accounts) +void MyMoneyStorageXML::writeAccounts(TQDomElement& accounts) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; m_storage->accountList(list); - QValueList<MyMoneyAccount>::ConstIterator it; + TQValueList<MyMoneyAccount>::ConstIterator it; accounts.setAttribute("count", list.count()+5); writeAccount(accounts, m_storage->asset()); @@ -660,20 +660,20 @@ void MyMoneyStorageXML::writeAccounts(QDomElement& accounts) } } -void MyMoneyStorageXML::writeAccount(QDomElement& account, const MyMoneyAccount& p) +void MyMoneyStorageXML::writeAccount(TQDomElement& account, const MyMoneyAccount& p) { p.writeXML(*m_doc, account); } -void MyMoneyStorageXML::writeTransactions(QDomElement& transactions) +void MyMoneyStorageXML::writeTransactions(TQDomElement& transactions) { MyMoneyTransactionFilter filter; filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> list; + TQValueList<MyMoneyTransaction> list; m_storage->transactionList(list, filter); transactions.setAttribute("count", list.count()); - QValueList<MyMoneyTransaction>::ConstIterator it; + TQValueList<MyMoneyTransaction>::ConstIterator it; signalProgress(0, list.count(), i18n("Saving transactions...")); @@ -685,15 +685,15 @@ void MyMoneyStorageXML::writeTransactions(QDomElement& transactions) } } -void MyMoneyStorageXML::writeTransaction(QDomElement& transaction, const MyMoneyTransaction& tx) +void MyMoneyStorageXML::writeTransaction(TQDomElement& transaction, const MyMoneyTransaction& tx) { tx.writeXML(*m_doc, transaction); } -void MyMoneyStorageXML::writeSchedules(QDomElement& scheduled) +void MyMoneyStorageXML::writeSchedules(TQDomElement& scheduled) { - const QValueList<MyMoneySchedule> list = m_storage->scheduleList(); - QValueList<MyMoneySchedule>::ConstIterator it; + const TQValueList<MyMoneySchedule> list = m_storage->scheduleList(); + TQValueList<MyMoneySchedule>::ConstIterator it; scheduled.setAttribute("count", list.count()); for(it = list.begin(); it != list.end(); ++it) @@ -702,86 +702,86 @@ void MyMoneyStorageXML::writeSchedules(QDomElement& scheduled) } } -void MyMoneyStorageXML::writeSchedule(QDomElement& scheduledTx, const MyMoneySchedule& tx) +void MyMoneyStorageXML::writeSchedule(TQDomElement& scheduledTx, const MyMoneySchedule& tx) { tx.writeXML(*m_doc, scheduledTx); } -void MyMoneyStorageXML::writeSecurities(QDomElement& equities) +void MyMoneyStorageXML::writeSecurities(TQDomElement& equities) { - const QValueList<MyMoneySecurity> securityList = m_storage->securityList(); + const TQValueList<MyMoneySecurity> securityList = m_storage->securityList(); equities.setAttribute("count", securityList.count()); if(securityList.size()) { - for(QValueList<MyMoneySecurity>::ConstIterator it = securityList.begin(); it != securityList.end(); ++it) + for(TQValueList<MyMoneySecurity>::ConstIterator it = securityList.begin(); it != securityList.end(); ++it) { writeSecurity(equities, (*it)); } } } -void MyMoneyStorageXML::writeSecurity(QDomElement& securityElement, const MyMoneySecurity& security) +void MyMoneyStorageXML::writeSecurity(TQDomElement& securityElement, const MyMoneySecurity& security) { security.writeXML(*m_doc, securityElement); } -void MyMoneyStorageXML::writeCurrencies(QDomElement& currencies) +void MyMoneyStorageXML::writeCurrencies(TQDomElement& currencies) { - const QValueList<MyMoneySecurity> currencyList = m_storage->currencyList(); + const TQValueList<MyMoneySecurity> currencyList = m_storage->currencyList(); currencies.setAttribute("count", currencyList.count()); if(currencyList.size()) { - for(QValueList<MyMoneySecurity>::ConstIterator it = currencyList.begin(); it != currencyList.end(); ++it) + for(TQValueList<MyMoneySecurity>::ConstIterator it = currencyList.begin(); it != currencyList.end(); ++it) { writeSecurity(currencies, (*it)); } } } -void MyMoneyStorageXML::writeReports(QDomElement& parent) +void MyMoneyStorageXML::writeReports(TQDomElement& tqparent) { - const QValueList<MyMoneyReport> list = m_storage->reportList(); - QValueList<MyMoneyReport>::ConstIterator it; - parent.setAttribute("count", list.count()); + const TQValueList<MyMoneyReport> list = m_storage->reportList(); + TQValueList<MyMoneyReport>::ConstIterator it; + tqparent.setAttribute("count", list.count()); signalProgress(0, list.count(), i18n("Saving reports...")); unsigned i = 0; for(it = list.begin(); it != list.end(); ++it) { - (*it).writeXML(*m_doc, parent); + (*it).writeXML(*m_doc, tqparent); signalProgress(++i, 0); } } -void MyMoneyStorageXML::writeBudgets(QDomElement& parent) +void MyMoneyStorageXML::writeBudgets(TQDomElement& tqparent) { - const QValueList<MyMoneyBudget> list = m_storage->budgetList(); - QValueList<MyMoneyBudget>::ConstIterator it; - parent.setAttribute("count", list.count()); + const TQValueList<MyMoneyBudget> list = m_storage->budgetList(); + TQValueList<MyMoneyBudget>::ConstIterator it; + tqparent.setAttribute("count", list.count()); signalProgress(0, list.count(), i18n("Saving budgets...")); unsigned i = 0; for(it = list.begin(); it != list.end(); ++it) { - writeBudget(parent, (*it)); + writeBudget(tqparent, (*it)); signalProgress(++i, 0); } } -void MyMoneyStorageXML::writeBudget(QDomElement& budget, const MyMoneyBudget& b) +void MyMoneyStorageXML::writeBudget(TQDomElement& budget, const MyMoneyBudget& b) { b.writeXML(*m_doc, budget); } -QDomElement MyMoneyStorageXML::findChildElement(const QString& name, const QDomElement& root) +TQDomElement MyMoneyStorageXML::findChildElement(const TQString& name, const TQDomElement& root) { - QDomNode child = root.firstChild(); + TQDomNode child = root.firstChild(); while(!child.isNull()) { if(child.isElement()) { - QDomElement childElement = child.toElement(); + TQDomElement childElement = child.toElement(); if(name == childElement.tagName()) { return childElement; @@ -790,29 +790,29 @@ QDomElement MyMoneyStorageXML::findChildElement(const QString& name, const QDomE child = child.nextSibling(); } - return QDomElement(); + return TQDomElement(); } -QDomElement MyMoneyStorageXML::writeKeyValuePairs(const QMap<QString, QString> pairs) +TQDomElement MyMoneyStorageXML::writeKeyValuePairs(const TQMap<TQString, TQString> pairs) { if(m_doc) { - QDomElement keyValPairs = m_doc->createElement("KEYVALUEPAIRS"); + TQDomElement keyValPairs = m_doc->createElement("KEYVALUEPAIRS"); - QMap<QString, QString>::const_iterator it; + TQMap<TQString, TQString>::const_iterator it; for(it = pairs.begin(); it != pairs.end(); ++it) { - QDomElement pair = m_doc->createElement("PAIR"); + TQDomElement pair = m_doc->createElement("PAIR"); pair.setAttribute("key", it.key()); pair.setAttribute("value", it.data()); keyValPairs.appendChild(pair); } return keyValPairs; } - return QDomElement(); + return TQDomElement(); } -void MyMoneyStorageXML::writePrices(QDomElement& prices) +void MyMoneyStorageXML::writePrices(TQDomElement& prices) { const MyMoneyPriceList list = m_storage->priceList(); MyMoneyPriceList::ConstIterator it; @@ -820,7 +820,7 @@ void MyMoneyStorageXML::writePrices(QDomElement& prices) for(it = list.begin(); it != list.end(); ++it) { - QDomElement price = m_doc->createElement("PRICEPAIR"); + TQDomElement price = m_doc->createElement("PRICEPAIR"); price.setAttribute("from", it.key().first); price.setAttribute("to", it.key().second); writePricePair(price, *it); @@ -828,29 +828,29 @@ void MyMoneyStorageXML::writePrices(QDomElement& prices) } } -void MyMoneyStorageXML::writePricePair(QDomElement& price, const MyMoneyPriceEntries& p) +void MyMoneyStorageXML::writePricePair(TQDomElement& price, const MyMoneyPriceEntries& p) { MyMoneyPriceEntries::ConstIterator it; for(it = p.begin(); it != p.end(); ++it) { - QDomElement entry = m_doc->createElement("PRICE"); + TQDomElement entry = m_doc->createElement("PRICE"); writePrice(entry, *it); price.appendChild(entry); } } -void MyMoneyStorageXML::writePrice(QDomElement& price, const MyMoneyPrice& p) +void MyMoneyStorageXML::writePrice(TQDomElement& price, const MyMoneyPrice& p) { price.setAttribute("date", p.date().toString(Qt::ISODate)); - price.setAttribute("price", p.rate(QString()).toString()); + price.setAttribute("price", p.rate(TQString()).toString()); price.setAttribute("source", p.source()); } -void MyMoneyStorageXML::setProgressCallback(void(*callback)(int, int, const QString&)) +void MyMoneyStorageXML::setProgressCallback(void(*callback)(int, int, const TQString&)) { m_progressCallback = callback; } -void MyMoneyStorageXML::signalProgress(int current, int total, const QString& msg) +void MyMoneyStorageXML::signalProgress(int current, int total, const TQString& msg) { if(m_progressCallback != 0) (*m_progressCallback)(current, total, msg); @@ -860,23 +860,23 @@ void MyMoneyStorageXML::signalProgress(int current, int total, const QString& ms This convenience function returns all of the remaining data in the device. - @note It's copied from the original Qt sources and modified to + @note It's copied from the original TQt sources and modified to fix a problem with KFilterDev that does not correctly return atEnd() status in certain circumstances which caused our application to lock at startup. */ -QByteArray QIODevice::readAll() +TQByteArray TQIODevice::readAll() { if ( isDirectAccess() ) { // we know the size int n = size()-at(); // ### fix for 64-bit or large files? int totalRead = 0; - QByteArray ba( n ); + TQByteArray ba( n ); char* c = ba.data(); while ( n ) { int r = readBlock( c, n ); if ( r < 0 ) - return QByteArray(); + return TQByteArray(); n -= r; c += r; totalRead += r; @@ -892,13 +892,13 @@ QByteArray QIODevice::readAll() // read until we reach the end const int blocksize = 512; int nread = 0; - QByteArray ba; + TQByteArray ba; int r = 1; while ( !atEnd() && r != 0) { ba.resize( nread + blocksize ); r = readBlock( ba.data()+nread, blocksize ); if ( r < 0 ) - return QByteArray(); + return TQByteArray(); nread += r; } ba.resize( nread ); diff --git a/kmymoney2/mymoney/storage/mymoneystoragexml.h b/kmymoney2/mymoney/storage/mymoneystoragexml.h index 8485978..b74626d 100644 --- a/kmymoney2/mymoney/storage/mymoneystoragexml.h +++ b/kmymoney2/mymoney/storage/mymoneystoragexml.h @@ -23,9 +23,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdom.h> -#include <qdatastream.h> -class QIODevice; +#include <tqdom.h> +#include <tqdatastream.h> +class TQIODevice; // ---------------------------------------------------------------------------- // Project Includes @@ -54,78 +54,78 @@ public: }; protected: - void setProgressCallback(void(*callback)(int, int, const QString&)); - void signalProgress(int current, int total, const QString& = ""); + void setProgressCallback(void(*callback)(int, int, const TQString&)); + void signalProgress(int current, int total, const TQString& = ""); /** * This method returns the version of the underlying file. It * is used by the MyMoney objects contained in a MyMoneyStorageBin object (e.g. * MyMoneyAccount, MyMoneyInstitution, MyMoneyTransaction, etc.) to - * determine the layout used when reading/writing a persistant file. + * determine the tqlayout used when reading/writing a persistant file. * A parameter is used to determine the direction. * * @param dir information about the direction (reading/writing). The * default is reading. * - * @return version QString of file's version + * @return version TQString of file's version * * @see m_fileVersionRead, m_fileVersionWrite */ static unsigned int fileVersion(fileVersionDirectionType dir = Reading); - QValueList<QDomElement> readElements(QString groupTag, QString itemTag = QString()); + TQValueList<TQDomElement> readElements(TQString groupTag, TQString itemTag = TQString()); - bool readFileInformation(const QDomElement& fileInfo); - virtual void writeFileInformation(QDomElement& fileInfo); + bool readFileInformation(const TQDomElement& fileInfo); + virtual void writeFileInformation(TQDomElement& fileInfo); - virtual void writeUserInformation(QDomElement& userInfo); + virtual void writeUserInformation(TQDomElement& userInfo); - virtual void writeInstitution(QDomElement& institutions, const MyMoneyInstitution& i); - virtual void writeInstitutions(QDomElement& institutions); + virtual void writeInstitution(TQDomElement& institutions, const MyMoneyInstitution& i); + virtual void writeInstitutions(TQDomElement& institutions); - virtual void writePrices(QDomElement& prices); - virtual void writePricePair(QDomElement& price, const MyMoneyPriceEntries& p); - virtual void writePrice(QDomElement& prices, const MyMoneyPrice& p); + virtual void writePrices(TQDomElement& prices); + virtual void writePricePair(TQDomElement& price, const MyMoneyPriceEntries& p); + virtual void writePrice(TQDomElement& prices, const MyMoneyPrice& p); - virtual void writePayees(QDomElement& payees); - virtual void writePayee(QDomElement& payees, const MyMoneyPayee& p); + virtual void writePayees(TQDomElement& payees); + virtual void writePayee(TQDomElement& payees, const MyMoneyPayee& p); - virtual void writeAccounts(QDomElement& accounts); - virtual void writeAccount(QDomElement& accounts, const MyMoneyAccount& p); + virtual void writeAccounts(TQDomElement& accounts); + virtual void writeAccount(TQDomElement& accounts, const MyMoneyAccount& p); - virtual void writeTransactions(QDomElement& transactions); - virtual void writeTransaction(QDomElement& transactions, const MyMoneyTransaction& tx); + virtual void writeTransactions(TQDomElement& transactions); + virtual void writeTransaction(TQDomElement& transactions, const MyMoneyTransaction& tx); - virtual void writeSchedules(QDomElement& scheduled); - virtual void writeSchedule(QDomElement& scheduledTx, const MyMoneySchedule& tx); + virtual void writeSchedules(TQDomElement& scheduled); + virtual void writeSchedule(TQDomElement& scheduledTx, const MyMoneySchedule& tx); - virtual void writeReports(QDomElement& e); - virtual void writeBudgets(QDomElement& e); - virtual void writeBudget(QDomElement& budget, const MyMoneyBudget& b); + virtual void writeReports(TQDomElement& e); + virtual void writeBudgets(TQDomElement& e); + virtual void writeBudget(TQDomElement& budget, const MyMoneyBudget& b); - virtual void writeSecurities(QDomElement& securities); - virtual void writeSecurity(QDomElement& securityElement, const MyMoneySecurity& security); + virtual void writeSecurities(TQDomElement& securities); + virtual void writeSecurity(TQDomElement& securityElement, const MyMoneySecurity& security); - virtual void writeCurrencies(QDomElement& currencies); + virtual void writeCurrencies(TQDomElement& currencies); - virtual QDomElement writeKeyValuePairs(const QMap<QString, QString> pairs); + virtual TQDomElement writeKeyValuePairs(const TQMap<TQString, TQString> pairs); - virtual void readFile(QIODevice* s, IMyMoneySerialize* storage); - virtual void writeFile(QIODevice* s, IMyMoneySerialize* storage); + virtual void readFile(TQIODevice* s, IMyMoneySerialize* storage); + virtual void writeFile(TQIODevice* s, IMyMoneySerialize* storage); - bool readUserInformation(const QDomElement& userElement); + bool readUserInformation(const TQDomElement& userElement); - void readPricePair(const QDomElement& pricePair); - const MyMoneyPrice readPrice(const QString& from, const QString& to, const QDomElement& price); + void readPricePair(const TQDomElement& pricePair); + const MyMoneyPrice readPrice(const TQString& from, const TQString& to, const TQDomElement& price); - QDomElement findChildElement(const QString& name, const QDomElement& root); + TQDomElement findChildElement(const TQString& name, const TQDomElement& root); private: - void (*m_progressCallback)(int, int, const QString&); + void (*m_progressCallback)(int, int, const TQString&); protected: IMyMoneySerialize *m_storage; - QDomDocument *m_doc; + TQDomDocument *m_doc; private: /// \internal d-pointer class. @@ -149,7 +149,7 @@ private: * temporarily to convert the price history from the old to the * new format. This should go at some time beyond 0.8 (ipwizard) */ - QString m_baseCurrencyId; + TQString m_baseCurrencyId; }; diff --git a/kmymoney2/plugins/importinterface.cpp b/kmymoney2/plugins/importinterface.cpp index ce867c8..9c90df8 100644 --- a/kmymoney2/plugins/importinterface.cpp +++ b/kmymoney2/plugins/importinterface.cpp @@ -26,8 +26,8 @@ #include "importinterface.h" -KMyMoneyPlugin::ImportInterface::ImportInterface(QObject* parent, const char* name) : - QObject(parent, name) +KMyMoneyPlugin::ImportInterface::ImportInterface(TQObject* tqparent, const char* name) : + TQObject(tqparent, name) { } diff --git a/kmymoney2/plugins/importinterface.h b/kmymoney2/plugins/importinterface.h index 4b8a347..26083c1 100644 --- a/kmymoney2/plugins/importinterface.h +++ b/kmymoney2/plugins/importinterface.h @@ -25,8 +25,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,15 +46,16 @@ namespace KMyMoneyPlugin { * This abstract class represents the ImportInterface to * add new importers to KMyMoney. */ -class KMYMONEY_EXPORT ImportInterface : public QObject +class KMYMONEY_EXPORT ImportInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: - ImportInterface(QObject* parent, const char* name = 0); + ImportInterface(TQObject* tqparent, const char* name = 0); ~ImportInterface() {} - virtual KURL selectFile(const QString& title, const QString& path, const QString& mask, KFile::Mode mode) const = 0; + virtual KURL selectFile(const TQString& title, const TQString& path, const TQString& tqmask, KFile::Mode mode) const = 0; signals: }; diff --git a/kmymoney2/plugins/interfaces/kmmimportinterface.cpp b/kmymoney2/plugins/interfaces/kmmimportinterface.cpp index b3c54d8..d21959b 100644 --- a/kmymoney2/plugins/interfaces/kmmimportinterface.cpp +++ b/kmymoney2/plugins/interfaces/kmmimportinterface.cpp @@ -27,15 +27,15 @@ #include "../../kmymoney2.h" #include "kmmimportinterface.h" -KMyMoneyPlugin::KMMImportInterface::KMMImportInterface(KMyMoney2App* app, QObject* parent, const char* name) : - ImportInterface(parent, name), +KMyMoneyPlugin::KMMImportInterface::KMMImportInterface(KMyMoney2App* app, TQObject* tqparent, const char* name) : + ImportInterface(tqparent, name), m_app(app) { } -KURL KMyMoneyPlugin::KMMImportInterface::selectFile(const QString& title, const QString& path, const QString& mask, KFile::Mode mode) const +KURL KMyMoneyPlugin::KMMImportInterface::selectFile(const TQString& title, const TQString& path, const TQString& tqmask, KFile::Mode mode) const { - return m_app->selectFile(title, path, mask, mode); + return m_app->selectFile(title, path, tqmask, mode); } #include "kmmimportinterface.moc" diff --git a/kmymoney2/plugins/interfaces/kmmimportinterface.h b/kmymoney2/plugins/interfaces/kmmimportinterface.h index 484a228..97ffa5e 100644 --- a/kmymoney2/plugins/interfaces/kmmimportinterface.h +++ b/kmymoney2/plugins/interfaces/kmmimportinterface.h @@ -45,12 +45,13 @@ namespace KMyMoneyPlugin { */ class KMMImportInterface : public ImportInterface { Q_OBJECT + TQ_OBJECT public: - KMMImportInterface(KMyMoney2App* app, QObject* parent, const char* name = 0); + KMMImportInterface(KMyMoney2App* app, TQObject* tqparent, const char* name = 0); ~KMMImportInterface() {} - KURL selectFile(const QString& title, const QString& path, const QString& mask, KFile::Mode mode) const; + KURL selectFile(const TQString& title, const TQString& path, const TQString& tqmask, KFile::Mode mode) const; private: KMyMoney2App* m_app; diff --git a/kmymoney2/plugins/interfaces/kmmstatementinterface.cpp b/kmymoney2/plugins/interfaces/kmmstatementinterface.cpp index 9e09db2..c14caea 100644 --- a/kmymoney2/plugins/interfaces/kmmstatementinterface.cpp +++ b/kmymoney2/plugins/interfaces/kmmstatementinterface.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -31,8 +31,8 @@ #include <kmymoney/mymoneyaccount.h> #include <kmymoney/mymoneykeyvaluecontainer.h> -KMyMoneyPlugin::KMMStatementInterface::KMMStatementInterface(KMyMoney2App* app, QObject* parent, const char* name) : - StatementInterface(parent, name), +KMyMoneyPlugin::KMMStatementInterface::KMMStatementInterface(KMyMoney2App* app, TQObject* tqparent, const char* name) : + StatementInterface(tqparent, name), m_app(app) { } @@ -43,7 +43,7 @@ bool KMyMoneyPlugin::KMMStatementInterface::import(const MyMoneyStatement& s) return m_app->slotStatementImport(s); } -const MyMoneyAccount& KMyMoneyPlugin::KMMStatementInterface::account(const QString& key, const QString& value) const +const MyMoneyAccount& KMyMoneyPlugin::KMMStatementInterface::account(const TQString& key, const TQString& value) const { return m_app->account(key, value); } diff --git a/kmymoney2/plugins/interfaces/kmmstatementinterface.h b/kmymoney2/plugins/interfaces/kmmstatementinterface.h index 7890002..6eee779 100644 --- a/kmymoney2/plugins/interfaces/kmmstatementinterface.h +++ b/kmymoney2/plugins/interfaces/kmmstatementinterface.h @@ -46,9 +46,10 @@ namespace KMyMoneyPlugin { class KMMStatementInterface : public StatementInterface { Q_OBJECT + TQ_OBJECT public: - KMMStatementInterface(KMyMoney2App* app, QObject* parent, const char* name = 0); + KMMStatementInterface(KMyMoney2App* app, TQObject* tqparent, const char* name = 0); ~KMMStatementInterface() {} /** @@ -61,7 +62,7 @@ public: * If the account is not found in the list of accounts, MyMoneyAccount() * is returned. */ - const MyMoneyAccount& account(const QString& key, const QString& value) const; + const MyMoneyAccount& account(const TQString& key, const TQString& value) const; /** * This method stores the online parameters in @a kvps used by the plugin diff --git a/kmymoney2/plugins/interfaces/kmmviewinterface.cpp b/kmymoney2/plugins/interfaces/kmmviewinterface.cpp index 9779876..cc6ec5b 100644 --- a/kmymoney2/plugins/interfaces/kmmviewinterface.cpp +++ b/kmymoney2/plugins/interfaces/kmmviewinterface.cpp @@ -29,28 +29,28 @@ #include "../../widgets/selectedtransaction.h" #include "kmmviewinterface.h" -KMyMoneyPlugin::KMMViewInterface::KMMViewInterface(KMyMoney2App* app, KMyMoneyView* view, QObject* parent, const char* name) : - ViewInterface(parent, name), +KMyMoneyPlugin::KMMViewInterface::KMMViewInterface(KMyMoney2App* app, KMyMoneyView* view, TQObject* tqparent, const char* name) : + ViewInterface(tqparent, name), m_app(app), m_view(view) { - connect(app, SIGNAL(accountSelected(const MyMoneyAccount&)), this, SIGNAL(accountSelected(const MyMoneyAccount&))); - connect(app, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), this, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&))); - connect(app, SIGNAL(accountReconciled(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&, const MyMoneyMoney&, const QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >&)), - this, SIGNAL(accountReconciled(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&, const MyMoneyMoney&, const QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >&))); + connect(app, TQT_SIGNAL(accountSelected(const MyMoneyAccount&)), this, TQT_SIGNAL(accountSelected(const MyMoneyAccount&))); + connect(app, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&))); + connect(app, TQT_SIGNAL(accountReconciled(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&, const MyMoneyMoney&, const TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >&)), + this, TQT_SIGNAL(accountReconciled(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&, const MyMoneyMoney&, const TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >&))); - connect(app, SIGNAL(institutionSelected(const MyMoneyInstitution&)), this, SIGNAL(institutionSelected(const MyMoneyInstitution&))); + connect(app, TQT_SIGNAL(institutionSelected(const MyMoneyInstitution&)), this, TQT_SIGNAL(institutionSelected(const MyMoneyInstitution&))); - connect(m_view, SIGNAL(viewStateChanged(bool)), this, SIGNAL(viewStateChanged(bool))); - connect(m_view, SIGNAL(kmmFilePlugin(unsigned int)), this, SIGNAL(kmmFilePlugin(unsigned int))); + connect(m_view, TQT_SIGNAL(viewStateChanged(bool)), this, TQT_SIGNAL(viewStateChanged(bool))); + connect(m_view, TQT_SIGNAL(kmmFilePlugin(unsigned int)), this, TQT_SIGNAL(kmmFilePlugin(unsigned int))); } -KMyMoneyViewBase* KMyMoneyPlugin::KMMViewInterface::addPage(const QString& item, const QString& icon) +KMyMoneyViewBase* KMyMoneyPlugin::KMMViewInterface::addPage(const TQString& item, const TQString& icon) { return m_view->addPage(item, icon); } -void KMyMoneyPlugin::KMMViewInterface::addWidget(KMyMoneyViewBase* view, QWidget* w) +void KMyMoneyPlugin::KMMViewInterface::addWidget(KMyMoneyViewBase* view, TQWidget* w) { if(view && w) view->addWidget(w); diff --git a/kmymoney2/plugins/interfaces/kmmviewinterface.h b/kmymoney2/plugins/interfaces/kmmviewinterface.h index d06b4f8..9797a8c 100644 --- a/kmymoney2/plugins/interfaces/kmmviewinterface.h +++ b/kmymoney2/plugins/interfaces/kmmviewinterface.h @@ -45,9 +45,10 @@ namespace KMyMoneyPlugin { */ class KMMViewInterface : public ViewInterface { Q_OBJECT + TQ_OBJECT public: - KMMViewInterface(KMyMoney2App* app, KMyMoneyView* view, QObject* parent, const char* name = 0); + KMMViewInterface(KMyMoney2App* app, KMyMoneyView* view, TQObject* tqparent, const char* name = 0); ~KMMViewInterface() {} /** @@ -59,7 +60,7 @@ public: * * @return pointer to KMyMoneyViewBase object */ - KMyMoneyViewBase* addPage(const QString& item, const QString& icon); + KMyMoneyViewBase* addPage(const TQString& item, const TQString& icon); /** * This method allows to add a widget to the view @@ -68,7 +69,7 @@ public: * @param view pointer to view object * @param w pointer to widget */ - void addWidget(KMyMoneyViewBase* view, QWidget* w); + void addWidget(KMyMoneyViewBase* view, TQWidget* w); private: KMyMoney2App* m_app; diff --git a/kmymoney2/plugins/kmymoneyplugin.cpp b/kmymoney2/plugins/kmymoneyplugin.cpp index ddca52a..d604d19 100644 --- a/kmymoney2/plugins/kmymoneyplugin.cpp +++ b/kmymoney2/plugins/kmymoneyplugin.cpp @@ -31,8 +31,8 @@ #include "kmymoneyplugin.h" -KMyMoneyPlugin::Plugin::Plugin(QObject* o, const char* name) : - QObject(o, name) +KMyMoneyPlugin::Plugin::Plugin(TQObject* o, const char* name) : + TQObject(o, name) { } @@ -40,10 +40,10 @@ KMyMoneyPlugin::Plugin::~Plugin() { } -KAction* KMyMoneyPlugin::Plugin::action(const QString& actionName) const +KAction* KMyMoneyPlugin::Plugin::action(const TQString& actionName) const { static KShortcut shortcut(""); - static KAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KAction dummyAction(TQString("Dummy"), TQString(), shortcut, static_cast<const TQObject*>(this), 0, static_cast<KActionCollection*>(0), ""); KAction* p = actionCollection()->action(actionName.latin1()); if(p) @@ -53,10 +53,10 @@ KAction* KMyMoneyPlugin::Plugin::action(const QString& actionName) const return &dummyAction; } -KToggleAction* KMyMoneyPlugin::Plugin::toggleAction(const QString& actionName) const +KToggleAction* KMyMoneyPlugin::Plugin::toggleAction(const TQString& actionName) const { static KShortcut shortcut(""); - static KToggleAction dummyAction(QString("Dummy"), QString(), shortcut, static_cast<const QObject*>(this), 0, static_cast<KActionCollection*>(0), ""); + static KToggleAction dummyAction(TQString("Dummy"), TQString(), shortcut, static_cast<const TQObject*>(this), 0, static_cast<KActionCollection*>(0), ""); KAction* q = actionCollection()->action(actionName.latin1()); @@ -75,17 +75,17 @@ KToggleAction* KMyMoneyPlugin::Plugin::toggleAction(const QString& actionName) c KMyMoneyPlugin::ViewInterface* KMyMoneyPlugin::Plugin::viewInterface() const { - return static_cast<ViewInterface*>( parent()->child( 0, "KMyMoneyPlugin::ViewInterface" ) ); + return static_cast<ViewInterface*>( tqparent()->child( 0, "KMyMoneyPlugin::ViewInterface" ) ); } KMyMoneyPlugin::StatementInterface* KMyMoneyPlugin::Plugin::statementInterface() const { - return static_cast<StatementInterface*>( parent()->child( 0, "KMyMoneyPlugin::StatementInterface" ) ); + return static_cast<StatementInterface*>( tqparent()->child( 0, "KMyMoneyPlugin::StatementInterface" ) ); } KMyMoneyPlugin::ImportInterface* KMyMoneyPlugin::Plugin::importInterface() const { - return static_cast<ImportInterface*>( parent()->child( 0, "KMyMoneyPlugin::ImportInterface" ) ); + return static_cast<ImportInterface*>( tqparent()->child( 0, "KMyMoneyPlugin::ImportInterface" ) ); } #include "kmymoneyplugin.moc" diff --git a/kmymoney2/plugins/kmymoneyplugin.h b/kmymoney2/plugins/kmymoneyplugin.h index 2978fde..f5cdac6 100644 --- a/kmymoney2/plugins/kmymoneyplugin.h +++ b/kmymoney2/plugins/kmymoneyplugin.h @@ -25,7 +25,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> +#include <tqobject.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,19 +56,20 @@ namespace KMyMoneyPlugin { * http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html * */ - class KMYMONEY_EXPORT Plugin : public QObject, public KXMLGUIClient + class KMYMONEY_EXPORT Plugin : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - Plugin(QObject* parent, const char* name); + Plugin(TQObject* tqparent, const char* name); virtual ~Plugin(); protected: /** See KMyMoney2App::action() for a description */ - KAction* action(const QString& name) const; + KAction* action(const TQString& name) const; /** See KMyMoney2App::toggleAction() for a description */ - KToggleAction* toggleAction(const QString& name) const; + KToggleAction* toggleAction(const TQString& name) const; // define interface classes here. The interface classes provide a mechanism // for the plugin to interact with KMyMoney @@ -97,7 +98,7 @@ namespace KMyMoneyPlugin { OnlinePlugin() {} virtual ~OnlinePlugin() {} - virtual void protocols(QStringList& protocolList) const = 0; + virtual void protocols(TQStringList& protocolList) const = 0; /** * This method returns a pointer to a widget representing an additional @@ -112,7 +113,7 @@ namespace KMyMoneyPlugin { * can access the widgets created after the call to storeConfigParameters() * happened. */ - virtual QWidget* accountConfigTab(const MyMoneyAccount& account, QString& tabName) = 0; + virtual TQWidget* accountConfigTab(const MyMoneyAccount& account, TQString& tabName) = 0; /** * This method is called by the framework whenever it is time to store @@ -167,18 +168,18 @@ namespace KMyMoneyPlugin { * This method returns the english-language name of the format * this plugin imports, e.g. "OFX" * - * @return QString Name of the format + * @return TQString Name of the format */ - virtual QString formatName(void) const = 0; + virtual TQString formatName(void) const = 0; /** * This method returns the filename filter suitable for passing to * KFileDialog::setFilter(), e.g. "*.ofx *.qfx" which describes how * files of this format are likely to be named in the file system * - * @return QString Filename filter string + * @return TQString Filename filter string */ - virtual QString formatFilenameFilter(void) const = 0; + virtual TQString formatFilenameFilter(void) const = 0; /** * This method returns whether this plugin is able to import @@ -188,7 +189,7 @@ namespace KMyMoneyPlugin { * * @return bool Whether the indicated file is importable by this plugin */ - virtual bool isMyFormat( const QString& filename ) const = 0; + virtual bool isMyFormat( const TQString& filename ) const = 0; /** * Import a file @@ -197,16 +198,16 @@ namespace KMyMoneyPlugin { * * @return bool Whether the import was successful. */ - virtual bool import( const QString& filename) = 0; + virtual bool import( const TQString& filename) = 0; /** * Returns the error result of the last import * - * @return QString English-language name of the error encountered in the - * last import, or QString() if it was successful. + * @return TQString English-language name of the error encountered in the + * last import, or TQString() if it was successful. * */ - virtual QString lastError(void) const = 0; + virtual TQString lastError(void) const = 0; }; diff --git a/kmymoney2/plugins/ofximport/Makefile.am b/kmymoney2/plugins/ofximport/Makefile.am index d4729f4..43b9f94 100644 --- a/kmymoney2/plugins/ofximport/Makefile.am +++ b/kmymoney2/plugins/ofximport/Makefile.am @@ -16,7 +16,7 @@ kmm_ofximport_la_LIBADD = @OFX_LIBS@ dialogs/libdialogs.la ../libkmm_plugin.la . # LD flags for the plugin # -module says: this is a module, i.e. something you're going to dlopen # so e.g. it has no version number like a normal shared lib would have. -kmm_ofximport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_KHTML) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_QT) -L../.libs +kmm_ofximport_la_LDFLAGS = -module $(KDE_PLUGIN) $(all_libraries) $(LIB_KHTML) $(LIB_KDECORE) $(LIB_KDEUI) $(LIB_KIO) $(LIB_QT) -L../.libs # rc file containing the GUI for the plugin pluginsdir = $(kde_datadir)/kmm_ofximport diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp index 3db8fbc..9248854 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.cpp @@ -22,10 +22,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qdir.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqlabel.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,11 +51,11 @@ class KOfxDirectConnectDlg::Private { public: - QFile m_fpTrace; + TQFile m_fpTrace; }; -KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, QWidget *parent, const char *name) : - KOfxDirectConnectDlgDecl(parent, name), +KOfxDirectConnectDlg::KOfxDirectConnectDlg(const MyMoneyAccount& account, TQWidget *tqparent, const char *name) : + KOfxDirectConnectDlgDecl(tqparent, name), d(new Private), m_tmpfile(NULL), m_connector(account), @@ -76,19 +76,19 @@ void KOfxDirectConnectDlg::init(void) { show(); - QByteArray request = m_connector.statementRequest(); + TQByteArray request = m_connector.statementRequest(); // For debugging, dump out the request #if 0 - QFile g( "request.ofx" ); + TQFile g( "request.ofx" ); g.open( IO_WriteOnly ); - QTextStream(&g) << m_connector.url() << "\n" << QString(request); + TQTextStream(&g) << m_connector.url() << "\n" << TQString(request); g.close(); #endif - QDir homeDir(QDir::home()); + TQDir homeDir(TQDir::home()); if(homeDir.exists("ofxlog.txt")) { - d->m_fpTrace.setName(QString("%1/ofxlog.txt").arg(QDir::homeDirPath())); + d->m_fpTrace.setName(TQString("%1/ofxlog.txt").tqarg(TQDir::homeDirPath())); d->m_fpTrace.open(IO_WriteOnly | IO_Append); } @@ -98,7 +98,7 @@ void KOfxDirectConnectDlg::init(void) true ); if(d->m_fpTrace.isOpen()) { - QByteArray data = m_connector.url().utf8(); + TQByteArray data = m_connector.url().utf8(); d->m_fpTrace.writeBlock("url: ", 5); d->m_fpTrace.writeBlock(data, strlen(data)); d->m_fpTrace.writeBlock("\n", 1); @@ -109,22 +109,22 @@ void KOfxDirectConnectDlg::init(void) } m_job->addMetaData("content-type", "Content-type: application/x-ofx" ); - connect(m_job,SIGNAL(result(KIO::Job*)),this,SLOT(slotOfxFinished(KIO::Job*))); - connect(m_job,SIGNAL(data(KIO::Job*, const QByteArray&)),this,SLOT(slotOfxData(KIO::Job*,const QByteArray&))); - connect(m_job,SIGNAL(connected(KIO::Job*)),this,SLOT(slotOfxConnected(KIO::Job*))); + connect(m_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotOfxFinished(KIO::Job*))); + connect(m_job,TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),this,TQT_SLOT(slotOfxData(KIO::Job*,const TQByteArray&))); + connect(m_job,TQT_SIGNAL(connected(KIO::Job*)),this,TQT_SLOT(slotOfxConnected(KIO::Job*))); - setStatus(QString("Contacting %1...").arg(m_connector.url())); + settqStatus(TQString("Contacting %1...").tqarg(m_connector.url())); kProgress1->setTotalSteps(3); kProgress1->setProgress(1); } -void KOfxDirectConnectDlg::setStatus(const QString& _status) +void KOfxDirectConnectDlg::settqStatus(const TQString& _status) { textLabel1->setText(_status); kdDebug(2) << "STATUS: " << _status << endl; } -void KOfxDirectConnectDlg::setDetails(const QString& _details) +void KOfxDirectConnectDlg::setDetails(const TQString& _details) { kdDebug(2) << "DETAILS: " << _details << endl; } @@ -133,34 +133,34 @@ void KOfxDirectConnectDlg::slotOfxConnected(KIO::Job*) { if ( m_tmpfile ) { -// throw new MYMONEYEXCEPTION(QString("Already connected, using %1.").arg(m_tmpfile->name())); +// throw new MYMONEYEXCEPTION(TQString("Already connected, using %1.").tqarg(m_tmpfile->name())); kdDebug(2) << "Already connected, using " << m_tmpfile->name() << endl; delete m_tmpfile; //delete otherwise we mem leak } m_tmpfile = new KTempFile(); - setStatus("Connection established, retrieving data..."); - setDetails(QString("Downloading data to %1...").arg(m_tmpfile->name())); + settqStatus("Connection established, retrieving data..."); + setDetails(TQString("Downloading data to %1...").tqarg(m_tmpfile->name())); kProgress1->advance(1); } -void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const QByteArray& _ba) +void KOfxDirectConnectDlg::slotOfxData(KIO::Job*,const TQByteArray& _ba) { if ( !m_tmpfile ) // throw new MYMONEYEXCEPTION("Not currently connected!!"); kdDebug(2) << "void ofxdcon::slotOfxData():: Not currently connected!" << endl; - *(m_tmpfile->textStream()) << QString(_ba); + *(m_tmpfile->textStream()) << TQString(_ba); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock(_ba, _ba.size()); } - setDetails(QString("Got %1 bytes").arg(_ba.size())); + setDetails(TQString("Got %1 bytes").tqarg(_ba.size())); } void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) { kProgress1->advance(1); - setStatus("Completed."); + settqStatus("Completed."); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock("\nCompleted\n\n\n\n", 14); @@ -179,12 +179,12 @@ void KOfxDirectConnectDlg::slotOfxFinished(KIO::Job* /* e */) } else if ( m_job->isErrorPage() ) { - QString details; - QFile f( m_tmpfile->name() ); + TQString details; + TQFile f( m_tmpfile->name() ); if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); - QString line; + TQTextStream stream( &f ); + TQString line; while ( !stream.atEnd() ) { details += stream.readLine(); // line of text excluding '\n' } @@ -217,7 +217,7 @@ void KOfxDirectConnectDlg::reject(void) delete m_tmpfile; m_tmpfile = NULL; } - QDialog::reject(); + TQDialog::reject(); } #include "kofxdirectconnectdlg.moc" diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h index e5d92cd..4d165ec 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlg.h @@ -49,8 +49,9 @@ class TransferJob; class KOfxDirectConnectDlg : public KOfxDirectConnectDlgDecl { Q_OBJECT + TQ_OBJECT public: - KOfxDirectConnectDlg(const MyMoneyAccount&, QWidget *parent = 0, const char *name = 0); + KOfxDirectConnectDlg(const MyMoneyAccount&, TQWidget *tqparent = 0, const char *name = 0); ~KOfxDirectConnectDlg(); void init(void); @@ -60,17 +61,17 @@ signals: * This signal is emitted when the statement is downloaded * and stored in file @a fname. */ - void statementReady(const QString& fname); + void statementReady(const TQString& fname); protected slots: void slotOfxFinished(KIO::Job*); - void slotOfxData(KIO::Job*,const QByteArray&); + void slotOfxData(KIO::Job*,const TQByteArray&); void slotOfxConnected(KIO::Job*); virtual void reject(void); protected: - void setStatus(const QString& _status); - void setDetails(const QString& _details); + void settqStatus(const TQString& _status); + void setDetails(const TQString& _details); KTempFile* m_tmpfile; MyMoneyOfxConnector m_connector; diff --git a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui index 3937012..7315638 100644 --- a/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/kofxdirectconnectdlgdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>KOfxDirectConnectDlgDecl</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>KOfxDirectConnectDlgDecl</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -35,9 +35,9 @@ <cstring>kProgress1</cstring> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -53,14 +53,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> </size> </property> </spacer> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -84,7 +84,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -105,5 +105,5 @@ <slot>reject()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui index 3ee9b6a..85cef17 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KOnlineBankingSetupDecl</class> -<widget class="QWizard"> +<widget class="TQWizard"> <property name="name"> <cstring>KOnlineBankingSetupDecl</cstring> </property> @@ -15,7 +15,7 @@ <property name="caption"> <string>Online Banking Account Setup</string> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>FIPage</cstring> </property> @@ -26,7 +26,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -43,7 +43,7 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>m_listLayout</cstring> </property> @@ -51,22 +51,22 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> <property name="text"> <string>Please select your financial institution from the list below...</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_selectionTab</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -98,7 +98,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -109,9 +109,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <grid> <property name="name"> @@ -122,7 +122,7 @@ <cstring>m_url</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -130,7 +130,7 @@ <string>Org</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_5</cstring> </property> @@ -148,7 +148,7 @@ <cstring>m_fid</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_4</cstring> </property> @@ -168,7 +168,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>90</height> @@ -182,7 +182,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>LoginPage</cstring> </property> @@ -193,7 +193,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -210,9 +210,9 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <grid> <property name="name"> @@ -228,7 +228,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>120</width> <height>21</height> @@ -251,7 +251,7 @@ <cstring>m_headerVersionCombo</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0" rowspan="1" colspan="3"> + <widget class="TQLabel" row="5" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -264,7 +264,7 @@ <cstring>m_applicationCombo</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -272,7 +272,7 @@ <string>Username</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_6</cstring> </property> @@ -280,7 +280,7 @@ <string>Header Version</string> </property> </widget> - <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_editPassword</cstring> </property> @@ -288,12 +288,12 @@ <enum>Password</enum> </property> </widget> - <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="2"> + <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="2"> <property name="name"> <cstring>m_editUsername</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2_3</cstring> </property> @@ -301,7 +301,7 @@ <string>Identify as</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2_3</cstring> </property> @@ -309,7 +309,7 @@ <string>Password</string> </property> </widget> - <widget class="QTextBrowser" row="6" column="0" rowspan="1" colspan="3"> + <widget class="TQTextBrowser" row="6" column="0" rowspan="1" colspan="3"> <property name="name"> <cstring>m_textDetails</cstring> </property> @@ -318,7 +318,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>AccountPage</cstring> </property> @@ -329,7 +329,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -346,26 +346,26 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout29</cstring> + <cstring>tqlayout29</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> <property name="text"> <string>Please select the account from your financial institution from the list below which matches this account.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> - <widget class="QListView"> + <widget class="TQListView"> <column> <property name="text"> <string>Number</string> @@ -418,7 +418,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>WizardPage</cstring> </property> @@ -429,7 +429,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1_2_2</cstring> </property> @@ -446,22 +446,22 @@ <pixmap>image0</pixmap> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_labelFinal</cstring> </property> <property name="text"> <string>Congratulations! You have successfully set up your bank for online banking via OFX.</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter</set> </property> </widget> @@ -484,5 +484,5 @@ <tabstop>m_listFi</tabstop> <tabstop>m_listAccount</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp index d24f9a4..eac5079 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.cpp @@ -22,13 +22,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtextbrowser.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qregexp.h> -#include <qcheckbox.h> -#include <qtabwidget.h> +#include <tqtextbrowser.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqcheckbox.h> +#include <tqtabwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,12 +54,12 @@ class KOnlineBankingSetupWizard::Private { public: - QFile m_fpTrace; - QTextStream m_trace; + TQFile m_fpTrace; + TQTextStream m_trace; }; -KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char *name): - KOnlineBankingSetupDecl(parent,name), +KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(TQWidget *tqparent, const char *name): + KOnlineBankingSetupDecl(tqparent,name), d(new Private), m_fDone(false), m_fInit(false), @@ -79,8 +79,8 @@ KOnlineBankingSetupWizard::KOnlineBankingSetupWizard(QWidget *parent, const char tabLayout->insertWidget(0, new KListViewSearchLineWidget(m_listFi, tab, 0)); OfxPartner::setDirectory(locateLocal("appdata", "")); - QStringList banks = OfxPartner::BankNames(); - QStringList::const_iterator it_bank = banks.begin(); + TQStringList banks = OfxPartner::BankNames(); + TQStringList::const_iterator it_bank = banks.begin(); while (it_bank != banks.end()) { new KListViewItem( m_listFi, (*it_bank)); @@ -129,28 +129,28 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) if(m_selectionTab->currentPageIndex() == 0) { // Get the fipids for the selected bank - QListViewItem* item = m_listFi->currentItem(); + TQListViewItem* item = m_listFi->currentItem(); if ( item ) { - QString bank = item->text(0); + TQString bank = item->text(0); m_textDetails->clear(); - m_textDetails->append(QString("<p>Details for %1:</p>").arg(bank)); - QStringList fipids = OfxPartner::FipidForBank(bank); - QStringList::const_iterator it_fipid = fipids.begin(); + m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(bank)); + TQStringList fipids = OfxPartner::FipidForBank(bank); + TQStringList::const_iterator it_fipid = fipids.begin(); while ( it_fipid != fipids.end() ) { // For each fipid, get the connection details info = OfxPartner::ServiceInfo(*it_fipid); // Print them to the text browser - QString message = QString("<p>Fipid: %1<br>").arg(*it_fipid); + TQString message = TQString("<p>Fipid: %1<br>").tqarg(*it_fipid); // If the bank supports retrieving statements if ( info.accountlist ) { m_bankInfo.push_back(info); - message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid); + message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid); if ( info.statements ) message += i18n("Supports online statements<br>"); if ( info.investments ) @@ -180,12 +180,12 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) } m_textDetails->clear(); - m_textDetails->append(QString("<p>Details for %1:</p>").arg(m_bankName->text())); + m_textDetails->append(TQString("<p>Details for %1:</p>").tqarg(m_bankName->text())); memset(&info, 0, sizeof(OfxFiServiceInfo)); - strncpy(info.fid, m_fid->text().data(), OFX_FID_LENGTH-1); + strncpy(info.fid, m_fid->text().ascii(), OFX_FID_LENGTH-1); strncpy(info.org, m_bankName->text().latin1(), OFX_ORG_LENGTH-1); - strncpy(info.url, m_url->url().data(), OFX_URL_LENGTH-1); + strncpy(info.url, m_url->url().ascii(), OFX_URL_LENGTH-1); info.accountlist = 1; info.statements = 1; info.billpay = 1; @@ -193,8 +193,8 @@ bool KOnlineBankingSetupWizard::finishFiPage(void) m_bankInfo.push_back(info); - QString message; - message += QString("URL: %1<br>Org: %2<br>Fid: %3<br>").arg(info.url,info.org,info.fid); + TQString message; + message += TQString("URL: %1<br>Org: %2<br>Fid: %3<br>").tqarg(info.url,info.org,info.fid); if ( info.statements ) message += i18n("Supports online statements<br>"); if ( info.investments ) @@ -211,8 +211,8 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void) { bool result = true; - QString username = m_editUsername->text(); - QString password = m_editPassword->text(); + TQString username = m_editUsername->text(); + TQString password = m_editPassword->text(); m_listAccount->clear(); @@ -231,27 +231,27 @@ bool KOnlineBankingSetupWizard::finishLoginPage(void) // pretend we're Quicken 2008 // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ - QString appId = m_appId->appId(); - QRegExp exp("(.*):(.*)"); + TQString appId = m_appId->appId(); + TQRegExp exp("(.*):(.*)"); if(exp.search(appId) != -1) { strncpy(fi.appid, exp.cap(1).latin1(), OFX_APPID_LENGTH-1); strncpy(fi.appver, exp.cap(2).latin1(), OFX_APPVER_LENGTH-1); } else { - strncpy(fi.appid, "QWIN", OFX_APPID_LENGTH-1); + strncpy(fi.appid, "TQWIN", OFX_APPID_LENGTH-1); strncpy(fi.appver, "1700", OFX_APPVER_LENGTH-1); } - QString hver = m_headerVersion->headerVersion(); + TQString hver = m_headerVersion->headerVersion(); strncpy(fi.header_version, hver.latin1(), OFX_HEADERVERSION_LENGTH-1); #endif // who owns this memory?!?! char* request = libofx_request_accountinfo( &fi ); - KURL filename(QString("%1response.ofx").arg(locateLocal("appdata", ""))); - QByteArray req; + KURL filename(TQString("%1response.ofx").tqarg(locateLocal("appdata", ""))); + TQByteArray req; req.setRawData(request, strlen(request)); - OfxHttpsRequest("POST", (*m_it_info).url, req, QMap<QString, QString>(), filename, true); + OfxHttpsRequest("POST", (*m_it_info).url, req, TQMap<TQString, TQString>(), filename, true); req.resetRawData(request, strlen(request)); LibofxContextPtr ctx = libofx_get_new_context(); @@ -296,7 +296,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo if ( data.account_type_valid ) { - QString type; + TQString type; switch ( data.account_type ) { case OfxAccountData::OFX_CHECKING: /**< A standard checking account */ @@ -348,7 +348,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo kvps.setValue("fid",(*(pthis->m_it_info)).fid); kvps.setValue("org",(*(pthis->m_it_info)).org); kvps.setValue("fipid",""); - QListViewItem* item = pthis->m_listFi->currentItem(); + TQListViewItem* item = pthis->m_listFi->currentItem(); if ( item ) kvps.setValue("bankname",item->text(0)); @@ -360,7 +360,7 @@ int KOnlineBankingSetupWizard::ofxAccountCallback(struct OfxAccountData data, vo if(/* !kvps.value("bankid").isEmpty() && */ !kvps.value("uniqueId").isEmpty()) { - kvps.setValue("kmmofx-acc-ref", QString("%1-%2").arg(kvps.value("bankid"), kvps.value("uniqueId"))); + kvps.setValue("kmmofx-acc-ref", TQString("%1-%2").tqarg(kvps.value("bankid"), kvps.value("uniqueId"))); } else { qDebug("Cannot setup kmmofx-acc-ref for '%s'", kvps.value("bankname").data()); } @@ -375,15 +375,15 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void { KOnlineBankingSetupWizard* pthis = reinterpret_cast<KOnlineBankingSetupWizard*>(pv); - QString message; + TQString message; if(data.code_valid==true) { - message += QString("#%1 %2: \"%3\"\n").arg(data.code).arg(data.name,data.description); + message += TQString("#%1 %2: \"%3\"\n").tqarg(data.code).tqarg(data.name,data.description); } if(data.server_message_valid==true){ - message += i18n("Server message: %1\n").arg(data.server_message); + message += i18n("Server message: %1\n").tqarg(data.server_message); } if(data.severity_valid==true){ @@ -391,10 +391,10 @@ int KOnlineBankingSetupWizard::ofxStatusCallback(struct OfxStatusData data, void case OfxStatusData::INFO : break; case OfxStatusData::WARN : - KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").arg(message) ); + KMessageBox::detailedError( pthis, i18n("Your bank returned warnings when signing on"), i18n("WARNING %1").tqarg(message) ); break; case OfxStatusData::ERROR : - KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").arg(message) ); + KMessageBox::detailedError( pthis, i18n("Error signing onto your bank"), i18n("ERROR %1").tqarg(message) ); break; default: break; @@ -409,17 +409,17 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin if ( m_fDone ) { - QListViewItem* qitem = m_listAccount->currentItem(); + TQListViewItem* qitem = m_listAccount->currentItem(); ListViewItem* item = dynamic_cast<ListViewItem*>(qitem); if ( item ) { settings = *item; settings.deletePair("appId"); settings.deletePair("kmmofx-headerVersion"); - QString appId = m_appId->appId(); + TQString appId = m_appId->appId(); if(!appId.isEmpty()) settings.setValue("appId", appId); - QString hVer = m_headerVersion->headerVersion(); + TQString hVer = m_headerVersion->headerVersion(); if(!hVer.isEmpty()) settings.setValue("kmmofx-headerVersion", hVer); result = true; @@ -429,8 +429,8 @@ bool KOnlineBankingSetupWizard::chosenSettings( MyMoneyKeyValueContainer& settin return result; } -KOnlineBankingSetupWizard::ListViewItem::ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps ): - MyMoneyKeyValueContainer( kvps ), QListViewItem( parent ) +KOnlineBankingSetupWizard::ListViewItem::ListViewItem( TQListView* tqparent, const MyMoneyKeyValueContainer& kvps ): + MyMoneyKeyValueContainer( kvps ), TQListViewItem( tqparent ) { setText( 0, value("accountid") ); setText( 1, value("type") ); diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h index 65a89de..4faccbc 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingsetupwizard.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qvaluelist.h> -#include <qlistview.h> +#include <tqwidget.h> +#include <tqvaluelist.h> +#include <tqlistview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,15 +61,16 @@ class OfxHeaderVersion; class KOnlineBankingSetupWizard : public KOnlineBankingSetupDecl { Q_OBJECT + TQ_OBJECT public: - class ListViewItem: public MyMoneyKeyValueContainer, public QListViewItem + class ListViewItem: public MyMoneyKeyValueContainer, public TQListViewItem { public: - ListViewItem( QListView* parent, const MyMoneyKeyValueContainer& kvps ); + ListViewItem( TQListView* tqparent, const MyMoneyKeyValueContainer& kvps ); virtual void x(void); }; - KOnlineBankingSetupWizard(QWidget *parent=0, const char *name=0); + KOnlineBankingSetupWizard(TQWidget *tqparent=0, const char *name=0); ~KOnlineBankingSetupWizard(); bool chosenSettings( MyMoneyKeyValueContainer& settings ); @@ -94,8 +95,8 @@ private: /// \internal d-pointer instance. Private* const d; - QValueList<OfxFiServiceInfo> m_bankInfo; - QValueList<OfxFiServiceInfo>::const_iterator m_it_info; + TQValueList<OfxFiServiceInfo> m_bankInfo; + TQValueList<OfxFiServiceInfo>::const_iterator m_it_info; bool m_fDone; bool m_fInit; OfxAppVersion* m_appId; diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp index 6e5cef9..8ca0aac 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.cpp @@ -26,11 +26,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qdatetimeedit.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqdatetimeedit.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,22 +48,22 @@ #include <libofx/libofx.h> #include "mymoneyofxconnector.h" -KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent, const char *name) : - KOnlineBankingStatusDecl(parent,name), +KOnlineBankingtqStatus::KOnlineBankingtqStatus(const MyMoneyAccount& acc, TQWidget *tqparent, const char *name) : + KOnlineBankingStatusDecl(tqparent,name), m_appId(0) { - m_ledOnlineStatus->off(); + m_ledOnlinetqStatus->off(); // Set up online banking settings if applicable MyMoneyKeyValueContainer settings = acc.onlineBankingSettings(); - m_textOnlineStatus->setText(i18n("Enabled & configured")); - m_ledOnlineStatus->on(); + m_textOnlinetqStatus->setText(i18n("Enabled & configured")); + m_ledOnlinetqStatus->on(); - QString account = settings.value("accountid"); - QString bank = settings.value("bankname"); - QString bankid = QString("%1 %2").arg(settings.value("bankid")).arg(settings.value("branchid")); + TQString account = settings.value("accountid"); + TQString bank = settings.value("bankname"); + TQString bankid = TQString("%1 %2").tqarg(settings.value("bankid")).tqarg(settings.value("branchid")); if ( bankid.length() > 1 ) - bank += QString(" (%1)").arg(bankid); + bank += TQString(" (%1)").tqarg(bankid); m_textBank->setText(bank); m_textOnlineAccount->setText(account); @@ -71,7 +71,7 @@ KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *p m_headerVersion = new OfxHeaderVersion(m_headerVersionCombo, settings.value("kmmofx-headerVersion")); int numDays = 60; - QString snumDays = settings.value("kmmofx-numRequestDays"); + TQString snumDays = settings.value("kmmofx-numRequestDays"); if (!snumDays.isEmpty()) numDays = snumDays.toInt(); m_numdaysSpin->setValue(numDays); @@ -79,33 +79,33 @@ KOnlineBankingStatus::KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *p m_lastUpdateRB->setChecked(!settings.value("kmmofx-lastUpdate").isEmpty() && settings.value("kmmofx-lastUpdate").toInt() != 0); m_lastUpdateTXT->setText(acc.value("lastImportedTransactionDate")); m_pickDateRB->setChecked(!settings.value("kmmofx-pickDate").isEmpty() && settings.value("kmmofx-pickDate").toInt() != 0); - QString specificDate = settings.value("kmmofx-specificDate"); + TQString specificDate = settings.value("kmmofx-specificDate"); if (!specificDate.isEmpty()) - m_specificDate->setDate(QDate::fromString(specificDate)); + m_specificDate->setDate(TQDate::fromString(specificDate)); else - m_specificDate->setDate(QDate::currentDate()); - m_specificDate->setMaxValue(QDate::currentDate()); + m_specificDate->setDate(TQDate::tqcurrentDate()); + m_specificDate->setMaxValue(TQDate::tqcurrentDate()); m_payeeidRB->setChecked(settings.value("kmmofx-preferPayeeid").isEmpty() || settings.value("kmmofx-preferPayeeid").toInt() != 0); m_nameRB->setChecked(!settings.value("kmmofx-preferName").isEmpty() && settings.value("kmmofx-preferName").toInt() != 0); } -KOnlineBankingStatus::~KOnlineBankingStatus() +KOnlineBankingtqStatus::~KOnlineBankingtqStatus() { delete m_appId; } -const QString& KOnlineBankingStatus::appId(void) const +const TQString& KOnlineBankingtqStatus::appId(void) const { if(m_appId) return m_appId->appId(); - return QString::null; + return TQString(); } -QString KOnlineBankingStatus::headerVersion(void) const +TQString KOnlineBankingtqStatus::headerVersion(void) const { if(m_headerVersion) return m_headerVersion->headerVersion(); - return QString::null; + return TQString(); } #include "konlinebankingstatus.moc" diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h index bbd62ea..75e3369 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatus.h @@ -24,7 +24,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,14 +41,15 @@ class OfxHeaderVersion; * @author Thomas Baumgart */ -class KOnlineBankingStatus : public KOnlineBankingStatusDecl +class KOnlineBankingtqStatus : public KOnlineBankingStatusDecl { Q_OBJECT + TQ_OBJECT public: - KOnlineBankingStatus(const MyMoneyAccount& acc, QWidget *parent=0, const char *name=0); - ~KOnlineBankingStatus(); - const QString& appId(void) const; - QString headerVersion(void) const; + KOnlineBankingtqStatus(const MyMoneyAccount& acc, TQWidget *tqparent=0, const char *name=0); + ~KOnlineBankingtqStatus(); + const TQString& appId(void) const; + TQString headerVersion(void) const; private: OfxAppVersion* m_appId; OfxHeaderVersion* m_headerVersion; diff --git a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui index f76f9e4..106618a 100644 --- a/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui +++ b/kmymoney2/plugins/ofximport/dialogs/konlinebankingstatusdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KOnlineBankingStatusDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KOnlineBankingStatusDecl</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>m_textBank</cstring> </property> @@ -48,7 +48,7 @@ <string>&lt;Not configured&gt;</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -56,7 +56,7 @@ <string>BANK/BROKER:</string> </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>m_textOnlineAccount</cstring> </property> @@ -77,9 +77,9 @@ <string>&lt;Not configured&gt;</string> </property> </widget> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -87,15 +87,15 @@ </property> <widget class="KLed"> <property name="name"> - <cstring>m_ledOnlineStatus</cstring> + <cstring>m_ledOnlinetqStatus</cstring> </property> <property name="state"> <enum>Off</enum> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> - <cstring>m_textOnlineStatus</cstring> + <cstring>m_textOnlinetqStatus</cstring> </property> <property name="sizePolicy"> <sizepolicy> @@ -119,7 +119,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>21</height> @@ -128,7 +128,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -136,7 +136,7 @@ <string>ACCOUNT:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -146,7 +146,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -157,15 +157,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -188,7 +188,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>150</width> <height>21</height> @@ -200,7 +200,7 @@ <cstring>m_headerVersionCombo</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -210,7 +210,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup2</cstring> </property> @@ -227,23 +227,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_todayRB</cstring> </property> @@ -254,7 +254,7 @@ <bool>true</bool> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_numdaysSpin</cstring> </property> @@ -262,7 +262,7 @@ <number>180</number> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -272,15 +272,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_lastUpdateRB</cstring> </property> @@ -288,7 +288,7 @@ <string>Last &update</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_lastUpdateTXT</cstring> </property> @@ -298,15 +298,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_pickDateRB</cstring> </property> @@ -314,7 +314,7 @@ <string>Pi&ck date</string> </property> </widget> - <widget class="QDateEdit"> + <widget class="TQDateEdit"> <property name="name"> <cstring>m_specificDate</cstring> </property> @@ -346,7 +346,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -355,7 +355,7 @@ </spacer> </hbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -366,15 +366,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -394,7 +394,7 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_payeeidRB</cstring> </property> @@ -405,7 +405,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_nameRB</cstring> </property> @@ -415,7 +415,7 @@ </widget> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -435,7 +435,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>20</height> @@ -456,7 +456,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>50</height> @@ -479,5 +479,5 @@ <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp index 6e841bb..71897d2 100644 --- a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp +++ b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.cpp @@ -27,8 +27,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> -#include <qregexp.h> +#include <tqdatetime.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,7 +46,7 @@ #include <kmymoney/mymoneykeyvaluecontainer.h> #include "mymoneyofxconnector.h" -OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const QString& headerVersion) : +OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const TQString& headerVersion) : m_combo(combo) { combo->clear(); @@ -66,24 +66,24 @@ OfxHeaderVersion::OfxHeaderVersion(KComboBox* combo, const QString& headerVersio #endif } -QString OfxHeaderVersion::headerVersion(void) const +TQString OfxHeaderVersion::headerVersion(void) const { return m_combo->currentText(); } -OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : +OfxAppVersion::OfxAppVersion(KComboBox* combo, const TQString& appId) : m_combo(combo) { // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ // Quicken - m_appMap[i18n("Quicken Windows 2003")] = "QWIN:1200"; - m_appMap[i18n("Quicken Windows 2004")] = "QWIN:1300"; - m_appMap[i18n("Quicken Windows 2005")] = "QWIN:1400"; - m_appMap[i18n("Quicken Windows 2006")] = "QWIN:1500"; - m_appMap[i18n("Quicken Windows 2007")] = "QWIN:1600"; - m_appMap[i18n("Quicken Windows 2008")] = "QWIN:1700"; + m_appMap[i18n("Quicken Windows 2003")] = "TQWIN:1200"; + m_appMap[i18n("Quicken Windows 2004")] = "TQWIN:1300"; + m_appMap[i18n("Quicken Windows 2005")] = "TQWIN:1400"; + m_appMap[i18n("Quicken Windows 2006")] = "TQWIN:1500"; + m_appMap[i18n("Quicken Windows 2007")] = "TQWIN:1600"; + m_appMap[i18n("Quicken Windows 2008")] = "TQWIN:1700"; // MS-Money m_appMap[i18n("MS-Money 2003")] = "Money:1100"; @@ -99,7 +99,7 @@ OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : combo->clear(); combo->insertStringList(m_appMap.keys()); - QMap<QString, QString>::const_iterator it_a; + TQMap<TQString, TQString>::const_iterator it_a; for(it_a = m_appMap.begin(); it_a != m_appMap.end(); ++it_a) { if(*it_a == appId) break; @@ -118,14 +118,14 @@ OfxAppVersion::OfxAppVersion(KComboBox* combo, const QString& appId) : #endif } -const QString& OfxAppVersion::appId(void) const +const TQString& OfxAppVersion::appId(void) const { - static QString defaultAppId("QWIN:1700"); + static TQString defaultAppId("TQWIN:1700"); - QString app = m_combo->currentText(); + TQString app = m_combo->currentText(); if(m_appMap[app] != defaultAppId) return m_appMap[app]; - return QString::null; + return TQString(); } MyMoneyOfxConnector::MyMoneyOfxConnector(const MyMoneyAccount& _account): @@ -134,28 +134,28 @@ MyMoneyOfxConnector::MyMoneyOfxConnector(const MyMoneyAccount& _account): m_fiSettings = m_account.onlineBankingSettings(); } -QString MyMoneyOfxConnector::iban(void) const { return m_fiSettings.value("bankid"); } -QString MyMoneyOfxConnector::fiorg(void) const { return m_fiSettings.value("org"); } -QString MyMoneyOfxConnector::fiid(void) const { return m_fiSettings.value("fid"); } -QString MyMoneyOfxConnector::username(void) const { return m_fiSettings.value("username"); } -QString MyMoneyOfxConnector::password(void) const { return m_fiSettings.value("password"); } -QString MyMoneyOfxConnector::accountnum(void) const { return m_fiSettings.value("accountid"); } -QString MyMoneyOfxConnector::url(void) const { return m_fiSettings.value("url"); } +TQString MyMoneyOfxConnector::iban(void) const { return m_fiSettings.value("bankid"); } +TQString MyMoneyOfxConnector::fiorg(void) const { return m_fiSettings.value("org"); } +TQString MyMoneyOfxConnector::fiid(void) const { return m_fiSettings.value("fid"); } +TQString MyMoneyOfxConnector::username(void) const { return m_fiSettings.value("username"); } +TQString MyMoneyOfxConnector::password(void) const { return m_fiSettings.value("password"); } +TQString MyMoneyOfxConnector::accountnum(void) const { return m_fiSettings.value("accountid"); } +TQString MyMoneyOfxConnector::url(void) const { return m_fiSettings.value("url"); } -QDate MyMoneyOfxConnector::statementStartDate(void) const { +TQDate MyMoneyOfxConnector::statementStartDate(void) const { if ((m_fiSettings.value("kmmofx-todayMinus").toInt() != 0) && !m_fiSettings.value("kmmofx-numRequestDays").isEmpty()) { - return QDate::currentDate().addDays(-m_fiSettings.value("kmmofx-numRequestDays").toInt()); + return TQDate::tqcurrentDate().addDays(-m_fiSettings.value("kmmofx-numRequestDays").toInt()); } else if ((m_fiSettings.value("kmmofx-lastUpdate").toInt() != 0) && !m_account.value("lastImportedTransactionDate").isEmpty()) { - return QDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate); + return TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate); } else if ((m_fiSettings.value("kmmofx-pickDate").toInt() != 0) && !m_fiSettings.value("kmmofx-specificDate").isEmpty()) { - return QDate::fromString(m_fiSettings.value("kmmofx-specificDate")); + return TQDate::fromString(m_fiSettings.value("kmmofx-specificDate")); } - return QDate::currentDate().addMonths(-2); + return TQDate::tqcurrentDate().addMonths(-2); } #if LIBOFX_IS_VERSION(0,9,0) @@ -163,7 +163,7 @@ OfxAccountData::AccountType MyMoneyOfxConnector::accounttype(void) const { OfxAccountData::AccountType result = OfxAccountData::OFX_CHECKING; - QString type = m_account.onlineBankingSettings()["type"]; + TQString type = m_account.onlineBankingSettings()["type"]; if(type == "CHECKING") result = OfxAccountData::OFX_CHECKING; else if(type == "SAVINGS") @@ -197,10 +197,10 @@ OfxAccountData::AccountType MyMoneyOfxConnector::accounttype(void) const // This is a bit of a personalized hack. Sometimes we may want to override the // ofx type for an account. For now, I will stash it in the notes! - QRegExp rexp("OFXTYPE:([A-Z]*)"); + TQRegExp rexp("OFXTYPE:([A-Z]*)"); if ( rexp.search(m_account.description()) != -1 ) { - QString override = rexp.cap(1); + TQString override = rexp.cap(1); kdDebug(2) << "MyMoneyOfxConnector::accounttype() overriding to " << result << endl; if ( override == "BANK" ) @@ -235,10 +235,10 @@ AccountType MyMoneyOfxConnector::accounttype(void) const // This is a bit of a personalized hack. Sometimes we may want to override the // ofx type for an account. For now, I will stash it in the notes! - QRegExp rexp("OFXTYPE:([A-Z]*)"); + TQRegExp rexp("OFXTYPE:([A-Z]*)"); if ( rexp.search(m_account.description()) != -1 ) { - QString override = rexp.cap(1); + TQString override = rexp.cap(1); kdDebug(2) << "MyMoneyOfxConnector::accounttype() overriding to " << result << endl; if ( override == "BANK" ) @@ -269,24 +269,24 @@ void MyMoneyOfxConnector::initRequest(OfxFiLogin* fi) const // If we don't know better, we pretend to be Quicken 2008 // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-intuit-products/ // http://ofxblog.wordpress.com/2007/06/06/ofx-appid-and-appver-for-microsoft-money/ - QString appId = m_account.onlineBankingSettings().value("appId"); - QRegExp exp("(.*):(.*)"); + TQString appId = m_account.onlineBankingSettings().value("appId"); + TQRegExp exp("(.*):(.*)"); if(exp.search(appId) != -1) { strncpy(fi->appid, exp.cap(1).latin1(), OFX_APPID_LENGTH-1); strncpy(fi->appver, exp.cap(2).latin1(), OFX_APPVER_LENGTH-1); } else { - strncpy(fi->appid, "QWIN", OFX_APPID_LENGTH-1); + strncpy(fi->appid, "TQWIN", OFX_APPID_LENGTH-1); strncpy(fi->appver, "1700", OFX_APPVER_LENGTH-1); } - QString headerVersion = m_account.onlineBankingSettings().value("kmmofx-headerVersion"); + TQString headerVersion = m_account.onlineBankingSettings().value("kmmofx-headerVersion"); if(!headerVersion.isEmpty()) { strncpy(fi->header_version, headerVersion.latin1(), OFX_HEADERVERSION_LENGTH-1); } #endif } -const QByteArray MyMoneyOfxConnector::statementRequest(void) const +const TQByteArray MyMoneyOfxConnector::statementRequest(void) const { OfxFiLogin fi; initRequest(&fi); @@ -313,29 +313,29 @@ const QByteArray MyMoneyOfxConnector::statementRequest(void) const account.type = accounttype(); #endif - char* szrequest = libofx_request_statement( &fi, &account, QDateTime(statementStartDate()).toTime_t() ); - QString request = szrequest; + char* szrequest = libofx_request_statement( &fi, &account, TQDateTime(statementStartDate()).toTime_t() ); + TQString request = szrequest; // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); free(szrequest); - QString msg(result); + TQString msg(result); return result; } #if 0 // this code is not used anymore. The logic is now // contained in KOnlineBankingSetupWizard::finishLoginPage(void) -const QByteArray MyMoneyOfxConnector::accountInfoRequest(void) const +const TQByteArray MyMoneyOfxConnector::accountInfoRequest(void) const { OfxFiLogin fi; initRequest(&fi); char* szrequest = libofx_request_accountinfo( &fi ); - QString request = szrequest; + TQString request = szrequest; // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); free(szrequest); @@ -345,7 +345,7 @@ const QByteArray MyMoneyOfxConnector::accountInfoRequest(void) const #if 0 -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const QString& _msgType, const QString& _trnType, const Tag& _request) +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const TQString& _msgType, const TQString& _trnType, const Tag& _request) { return Tag(_msgType+"MSGSRQV1") .subtag(Tag(_trnType+"TRNRQ") @@ -356,8 +356,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const QString& _msgType, c MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("INVSTMT","INVSTMT",Tag("INVSTMTRQ") .subtag(Tag("INVACCTFROM").element("BROKERID", fiorg()).element("ACCTID", accountnum())) @@ -367,18 +367,18 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const .element("INCBAL","Y")); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const TQDate& _dtstart) const { - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("BANK","STMT",Tag("STMTRQ") .subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING")) .subtag(Tag("INCTRAN").element("DTSTART",dtstart_string).element("INCLUDE","Y"))); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const TQDate& _dtstart) const { - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ") .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum())) @@ -387,7 +387,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const QDate& _dt MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); Tag fi("FI"); fi.element("ORG",fiorg()); @@ -401,13 +401,13 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const .element("USERPASS",password()) .element("LANGUAGE","ENG") .subtag(fi) - .element("APPID","QWIN") + .element("APPID","TQWIN") .element("APPVER","1100")); } -QString MyMoneyOfxConnector::header(void) +TQString MyMoneyOfxConnector::header(void) { - return QString("OFXHEADER:100\r\n" + return TQString("OFXHEADER:100\r\n" "DATA:OFXSGML\r\n" "VERSION:102\r\n" "SECURITY:NONE\r\n" @@ -416,13 +416,13 @@ QString MyMoneyOfxConnector::header(void) "COMPRESSION:NONE\r\n" "OLDFILEUID:NONE\r\n" "NEWFILEUID:%1\r\n" - "\r\n").arg(uuid()); + "\r\n").tqarg(uuid()); } -QString MyMoneyOfxConnector::uuid(void) +TQString MyMoneyOfxConnector::uuid(void) { static int id = 1; - return QDateTime::currentDateTime().toString("yyyyMMdd-hhmmsszzz-") + QString::number(id++); + return TQDateTime::tqcurrentDateTime().toString("yyyyMMdd-hhmmsszzz-") + TQString::number(id++); } // @@ -436,9 +436,9 @@ QString MyMoneyOfxConnector::uuid(void) // the open source software community. // -const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) const +const TQByteArray MyMoneyOfxConnector::statementResponse(const TQDate& _dtstart) const { - QString request; + TQString request; if ( accounttype()=="CC" ) request = header() + Tag("OFX").subtag(signOnResponse()).subtag(creditCardStatementResponse(_dtstart)); @@ -448,7 +448,7 @@ const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) c request = header() + Tag("OFX").subtag(signOnResponse()).subtag(bankStatementResponse(_dtstart)); // remove the trailing zero - QByteArray result = request.utf8(); + TQByteArray result = request.utf8(); result.truncate(result.size()-1); return result; @@ -456,7 +456,7 @@ const QByteArray MyMoneyOfxConnector::statementResponse(const QDate& _dtstart) c MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const { - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); Tag sonrs("SONRS"); sonrs @@ -480,7 +480,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const return Tag("SIGNONMSGSRSV1").subtag(sonrs); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const QString& _msgType, const QString& _trnType, const Tag& _response) +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const TQString& _msgType, const TQString& _trnType, const Tag& _response) { return Tag(_msgType+"MSGSRSV1") .subtag(Tag(_trnType+"TRNRS") @@ -490,20 +490,20 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::messageResponse(const QString& _ms .subtag(_response)); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += transaction( *it_transaction ); @@ -514,23 +514,23 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const QDate& .element("CURDEF","USD") .subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING")) .subtag(Tag("BANKTRANLIST").element("DTSTART",dtstart_string).element("DTEND",dtnow_string).data(transactionlist)) - .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(QString(),2)).element("DTASOF",dtnow_string ))); + .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(TQString(),2)).element("DTASOF",dtnow_string ))); } -MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const QDate& _dtstart) const +MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += transaction( *it_transaction ); @@ -541,24 +541,24 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const .element("CURDEF","USD") .subtag(Tag("CCACCTFROM").element("ACCTID", accountnum())) .subtag(Tag("BANKTRANLIST").element("DTSTART",dtstart_string).element("DTEND",dtnow_string).data(transactionlist)) - .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(QString(),2)).element("DTASOF",dtnow_string ))); + .subtag(Tag("LEDGERBAL").element("BALAMT",file->balance(m_account.id()).formatMoney(TQString(),2)).element("DTASOF",dtnow_string ))); } -QString MyMoneyOfxConnector::investmentStatementResponse(const QDate& _dtstart) const +TQString MyMoneyOfxConnector::investmentStatementResponse(const TQDate& _dtstart) const { MyMoneyFile* file = MyMoneyFile::instance(); - QString dtstart_string = _dtstart.toString(Qt::ISODate).remove(QRegExp("[^0-9]")); - QString dtnow_string = QDateTime::currentDateTime().toString(Qt::ISODate).remove(QRegExp("[^0-9]")); + TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); + TQString dtnow_string = TQDateTime::tqcurrentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); - QString transactionlist; + TQString transactionlist; MyMoneyTransactionFilter filter; - filter.setDateFilter(_dtstart,QDate::currentDate()); + filter.setDateFilter(_dtstart,TQDate::tqcurrentDate()); filter.addAccount(m_account.id()); filter.addAccount(m_account.accountList()); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { transactionlist += investmentTransaction( *it_transaction ); @@ -575,8 +575,8 @@ QString MyMoneyOfxConnector::investmentStatementResponse(const QDate& _dtstart) securitylist.subtag(Tag("STOCKINFO") .subtag(Tag("SECINFO") .subtag(Tag("SECID") - .element("UNIQUEID",equity.id()) - .element("UNIQUEIDTYPE","KMYMONEY")) + .element("UNITQUEID",equity.id()) + .element("UNITQUEIDTYPE","KMYMONEY")) .element("SECNAME",equity.name()) .element("TICKER",equity.tradingSymbol()) .element("FIID",equity.id()))); @@ -612,8 +612,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::transaction(const MyMoneyTransacti // This is a temporary hack. I don't use the trntype field in importing at all, // but libofx requires it to be there in order to import the file. .element("TRNTYPE","DEBIT") - .element("DTPOSTED",_t.postDate().toString(Qt::ISODate).remove(QRegExp("[^0-9]"))) - .element("TRNAMT",s.value().formatMoney(QString(),2)); + .element("DTPOSTED",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))) + .element("TRNAMT",s.value().formatMoney(TQString(),2)); if ( ! _t.bankID().isEmpty() ) result.element("FITID",_t.bankID()); @@ -639,10 +639,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone //Use this version for inv transactions MyMoneySplit s = _t.splitByAccount( m_account.accountList(), true ); - QCString stockid = file->account(s.accountId()).currencyId(); + TQCString stockid = file->account(s.accountId()).currencyId(); Tag invtran("INVTRAN"); - invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(Qt::ISODate).remove(QRegExp("[^0-9]"))); + invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))); if ( !_t.memo().isEmpty() ) invtran.element("MEMO",_t.memo()); @@ -653,10 +653,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("SELLSTOCK") .subtag(Tag("INVSELL") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) - .element("UNITS",QString(((s.shares())).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))) - .element("TOTAL",QString((-s.value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) + .element("UNITS",TQString(((s.shares())).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))) + .element("TOTAL",TQString((-s.value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH")) .element("SELLTYPE","SELL"); @@ -666,10 +666,10 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("BUYSTOCK") .subtag(Tag("INVBUY") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) - .element("UNITS",QString((s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))) - .element("TOTAL",QString((-(s.value())).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) + .element("UNITS",TQString((s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))) + .element("TOTAL",TQString((-(s.value())).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH")) .element("BUYTYPE","BUY"); @@ -682,22 +682,22 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone return Tag("REINVEST") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) .element("INCOMETYPE","DIV") - .element("TOTAL",QString((-s.value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) + .element("TOTAL",TQString((-s.value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) .element("SUBACCTSEC","CASH") - .element("UNITS",QString((s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.\\-]"))) - .element("UNITPRICE",QString((s.value()/s.shares()).formatMoney(QString(),2)).remove(QRegExp("[^0-9.]"))); + .element("UNITS",TQString((s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.\\-]"))) + .element("UNITPRICE",TQString((s.value()/s.shares()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9.]"))); } else if ( s.action() == MyMoneySplit::ActionDividend ) { // find the split with the category, which has the actual amount of the dividend - QValueList<MyMoneySplit> splits = _t.splits(); - QValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); + TQValueList<MyMoneySplit> splits = _t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); bool found = false; while( it_split != splits.end() ) { - QCString accid = (*it_split).accountId(); + TQCString accid = (*it_split).accountId(); MyMoneyAccount acc = file->account(accid); if ( acc.accountType() == MyMoneyAccount::Income || acc.accountType() == MyMoneyAccount::Expense ) { @@ -710,9 +710,9 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone if ( found ) return Tag("INCOME") .subtag(invtran) - .subtag(Tag("SECID").element("UNIQUEID",stockid).element("UNIQUEIDTYPE","KMYMONEY")) + .subtag(Tag("SECID").element("UNITQUEID",stockid).element("UNITQUEIDTYPE","KMYMONEY")) .element("INCOMETYPE","DIV") - .element("TOTAL",QString((-(*it_split).value()).formatMoney(QString(),2)).remove(QRegExp("[^0-9\\.\\-]"))) + .element("TOTAL",TQString((-(*it_split).value()).formatMoney(TQString(),2)).remove(TQRegExp("[^0-9\\.\\-]"))) .element("SUBACCTSEC","CASH") .element("SUBACCTFUND","CASH"); else diff --git a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h index 1091b15..56497f2 100644 --- a/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h +++ b/kmymoney2/plugins/ofximport/dialogs/mymoneyofxconnector.h @@ -40,7 +40,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QDate; +class TQDate; // ---------------------------------------------------------------------------- // KDE Includes @@ -61,17 +61,17 @@ class MyMoneyTransaction; class OfxAppVersion { public: - OfxAppVersion(KComboBox* combo, const QString& appId); + OfxAppVersion(KComboBox* combo, const TQString& appId); /** * This method returns the currently selected application id * as a colon separated value consisting of the application - * and version (eg. "QWIN:1700"). If current value is the + * and version (eg. "TQWIN:1700"). If current value is the * default, an empty string is returned. */ - const QString& appId(void) const; + const TQString& appId(void) const; private: - QMap<QString, QString> m_appMap; + TQMap<TQString, TQString> m_appMap; KComboBox* m_combo; }; @@ -81,8 +81,8 @@ private: class OfxHeaderVersion { public: - OfxHeaderVersion(KComboBox* combo, const QString& headerVersion); - QString headerVersion(void) const; + OfxHeaderVersion(KComboBox* combo, const TQString& headerVersion); + TQString headerVersion(void) const; private: KComboBox* m_combo; @@ -95,25 +95,25 @@ class MyMoneyOfxConnector { public: MyMoneyOfxConnector(const MyMoneyAccount& _account); - QString url(void) const; + TQString url(void) const; /** * Constructs the request for a statement. The first date * for which transactions will be requested is determined * by statementStartDate() */ - const QByteArray statementRequest(void) const; - const QByteArray statementResponse(const QDate& _dtstart) const; + const TQByteArray statementRequest(void) const; + const TQByteArray statementResponse(const TQDate& _dtstart) const; private: void initRequest(OfxFiLogin* fi) const; - QDate statementStartDate(void) const; - QString iban(void) const; - QString fiorg(void) const; - QString fiid(void) const; - QString username(void) const; - QString password(void) const; - QString accountnum(void) const; + TQDate statementStartDate(void) const; + TQString iban(void) const; + TQString fiorg(void) const; + TQString fiid(void) const; + TQString username(void) const; + TQString password(void) const; + TQString accountnum(void) const; #if LIBOFX_IS_VERSION(0,9,0) OfxAccountData::AccountType accounttype(void) const; #else diff --git a/kmymoney2/plugins/ofximport/ofximporterplugin.cpp b/kmymoney2/plugins/ofximport/ofximporterplugin.cpp index 21a6466..77b790e 100644 --- a/kmymoney2/plugins/ofximport/ofximporterplugin.cpp +++ b/kmymoney2/plugins/ofximport/ofximporterplugin.cpp @@ -18,11 +18,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qfile.h> -#include <qtextstream.h> -#include <qradiobutton.h> -#include <qspinbox.h> -#include <qdatetimeedit.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqradiobutton.h> +#include <tqspinbox.h> +#include <tqdatetimeedit.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,8 +45,8 @@ K_EXPORT_COMPONENT_FACTORY( kmm_ofximport, KGenericFactory<OfxImporterPlugin>( "kmm_ofximport" ) ) -OfxImporterPlugin::OfxImporterPlugin(QObject *parent, const char *name, const QStringList&) : - KMyMoneyPlugin::Plugin( parent, name ), +OfxImporterPlugin::OfxImporterPlugin(TQObject *tqparent, const char *name, const TQStringList&) : + KMyMoneyPlugin::Plugin( tqparent, name ), KMyMoneyPlugin::ImporterPlugin(), m_valid( false ) { @@ -61,7 +61,7 @@ OfxImporterPlugin::~OfxImporterPlugin() void OfxImporterPlugin::createActions(void) { - new KAction(i18n("OFX..."), "", 0, this, SLOT(slotImportFile()), actionCollection(), "file_import_ofx"); + new KAction(i18n("OFX..."), "", 0, this, TQT_SLOT(slotImportFile()), actionCollection(), "file_import_ofx"); } void OfxImporterPlugin::slotImportFile(void) @@ -74,42 +74,42 @@ void OfxImporterPlugin::slotImportFile(void) if ( isMyFormat(url.path()) ) { slotImportFile(url.path()); } else { - KMessageBox::error( 0, i18n("Unable to import %1 using the OFX importer plugin. This file is not the correct format.").arg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Incorrect format")); + KMessageBox::error( 0, i18n("Unable to import %1 using the OFX importer plugin. This file is not the correct format.").tqarg(url.prettyURL(0, KURL::StripFileProtocol)), i18n("Incorrect format")); } } } -QString OfxImporterPlugin::formatName(void) const +TQString OfxImporterPlugin::formatName(void) const { return "OFX"; } -QString OfxImporterPlugin::formatFilenameFilter(void) const +TQString OfxImporterPlugin::formatFilenameFilter(void) const { return "*.ofx *.qfx *.ofc"; } -bool OfxImporterPlugin::isMyFormat( const QString& filename ) const +bool OfxImporterPlugin::isMyFormat( const TQString& filename ) const { - // filename is considered an Ofx file if it contains + // filename is considered an Ofx file if it tqcontains // the tag "<OFX>" or "<OFC>" in the first 20 lines // which contain some data. bool result = false; - QFile f( filename ); + TQFile f( filename ); if ( f.open( IO_ReadOnly ) ) { - QTextStream ts( &f ); + TQTextStream ts( &f ); int lineCount = 20; while ( !ts.atEnd() && !result && lineCount != 0) { // get a line of data and remove all unnecessary whitepace chars - QString line = ts.readLine().simplifyWhiteSpace(); - if ( line.contains("<OFX>",false) - || line.contains("<OFC>",false) ) + TQString line = ts.readLine().simplifyWhiteSpace(); + if ( line.tqcontains("<OFX>",false) + || line.tqcontains("<OFC>",false) ) result = true; // count only lines that contains some non white space chars if(!line.isEmpty()) @@ -121,7 +121,7 @@ bool OfxImporterPlugin::isMyFormat( const QString& filename ) const return result; } -bool OfxImporterPlugin::import( const QString& filename ) +bool OfxImporterPlugin::import( const TQString& filename ) { m_fatalerror = i18n("Unable to parse file"); m_valid = false; @@ -132,7 +132,7 @@ bool OfxImporterPlugin::import( const QString& filename ) m_statementlist.clear(); m_securitylist.clear(); - QCString filename_deep( filename.utf8() ); + TQCString filename_deep( filename.utf8() ); LibofxContextPtr ctx = libofx_get_new_context(); Q_CHECK_PTR(ctx); @@ -147,13 +147,13 @@ bool OfxImporterPlugin::import( const QString& filename ) if ( m_valid ) { - m_fatalerror = QString(); + m_fatalerror = TQString(); m_valid = storeStatements(m_statementlist); } return m_valid; } -QString OfxImporterPlugin::lastError(void) const +TQString OfxImporterPlugin::lastError(void) const { if(m_errors.count() == 0) return m_fatalerror; @@ -179,13 +179,13 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo if(data.date_posted_valid==true) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(data.date_posted, Qt::UTC); t.m_datePosted = dt.date(); } else if(data.date_initiated_valid==true) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(data.date_initiated, Qt::UTC); t.m_datePosted = dt.date(); } @@ -206,11 +206,11 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo if(data.fi_id_valid==true) { - t.m_strBankID = QString("ID ") + data.fi_id; + t.m_strBankID = TQString("ID ") + data.fi_id; } else if(data.reference_number_valid==true) { - t.m_strBankID = QString("REF ") + data.reference_number; + t.m_strBankID = TQString("REF ") + data.reference_number; } // Decide whether to import NAME or PAYEEID if both are present in the download if (pofx->m_preferName) { @@ -288,7 +288,7 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo } bool unhandledtype = false; - QString type; + TQString type; if(data.invtransactiontype_valid==true) { @@ -351,7 +351,7 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo break; default: unhandledtype = true; - type = QString("UNKNOWN %1").arg(data.invtransactiontype); + type = TQString("UNKNOWN %1").tqarg(data.invtransactiontype); break; } } @@ -373,14 +373,14 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo double proper_total = t.m_dShares * data.unitprice + t.m_moneyFees; if ( proper_total != t.m_moneyAmount ) { - pofx->addWarning(QString("Transaction %1 has an incorrect total of %2. Using calculated total of %3 instead.").arg(t.m_strBankID).arg(t.m_moneyAmount).arg(proper_total)); + pofx->addWarning(TQString("Transaction %1 has an incorrect total of %2. Using calculated total of %3 instead.").tqarg(t.m_strBankID).tqarg(t.m_moneyAmount).tqarg(proper_total)); t.m_moneyAmount = proper_total; } } #endif if ( unhandledtype ) - pofx->addWarning(QString("Transaction %1 has an unsupported type (%2).").arg(t.m_strBankID,type)); + pofx->addWarning(TQString("Transaction %1 has an unsupported type (%2).").tqarg(t.m_strBankID,type)); else s.m_listTransactions += t; @@ -409,14 +409,14 @@ int OfxImporterPlugin::ofxStatementCallback(struct OfxStatementData data, void* if(data.date_start_valid==true) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(data.date_start, Qt::UTC); s.m_dateBegin = dt.date(); } if(data.date_end_valid==true) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(data.date_end, Qt::UTC); s.m_dateEnd = dt.date(); } @@ -482,7 +482,7 @@ int OfxImporterPlugin::ofxAccountCallback(struct OfxAccountData data, void * pv) } // ask KMyMoney for an account id - s.m_accountId = pofx->account("kmmofx-acc-ref", QString("%1-%2").arg(s.m_strRoutingNumber, s.m_strAccountNumber)).id(); + s.m_accountId = pofx->account("kmmofx-acc-ref", TQString("%1-%2").tqarg(s.m_strRoutingNumber, s.m_strAccountNumber)).id(); // copy over the securities s.m_listSecurities = pofx->m_securitylist; @@ -519,7 +519,7 @@ int OfxImporterPlugin::ofxStatusCallback(struct OfxStatusData data, void * pv) // kdDebug(2) << __func__ << endl; OfxImporterPlugin* pofx = reinterpret_cast<OfxImporterPlugin*>(pv); - QString message; + TQString message; // if we got this far, we know we were able to parse the file. // so if it fails after here it can only because there were no actual @@ -527,13 +527,13 @@ int OfxImporterPlugin::ofxStatusCallback(struct OfxStatusData data, void * pv) pofx->m_fatalerror = "No accounts found."; if(data.ofx_element_name_valid==true) - message.prepend(QString("%1: ").arg(data.ofx_element_name)); + message.prepend(TQString("%1: ").tqarg(data.ofx_element_name)); if(data.code_valid==true) - message += QString("%1 (Code %2): %3").arg(data.name).arg(data.code).arg(data.description); + message += TQString("%1 (Code %2): %3").tqarg(data.name).tqarg(data.code).tqarg(data.description); if(data.server_message_valid==true) - message += QString(" (%1)").arg(data.server_message); + message += TQString(" (%1)").tqarg(data.server_message); if(data.severity_valid==true){ switch(data.severity){ @@ -564,21 +564,21 @@ bool OfxImporterPlugin::importStatement(const MyMoneyStatement& s) return statementInterface()->import(s); } -const MyMoneyAccount& OfxImporterPlugin::account(const QString& key, const QString& value) const +const MyMoneyAccount& OfxImporterPlugin::account(const TQString& key, const TQString& value) const { return statementInterface()->account(key, value); } -void OfxImporterPlugin::protocols(QStringList& protocolList) const +void OfxImporterPlugin::protocols(TQStringList& protocolList) const { protocolList.clear(); protocolList << "OFX"; } -QWidget* OfxImporterPlugin::accountConfigTab(const MyMoneyAccount& acc, QString& name) +TQWidget* OfxImporterPlugin::accountConfigTab(const MyMoneyAccount& acc, TQString& name) { name = i18n("Online settings"); - m_statusDlg = new KOnlineBankingStatus(acc, 0, 0); + m_statusDlg = new KOnlineBankingtqStatus(acc, 0, 0); return m_statusDlg; } @@ -593,13 +593,13 @@ MyMoneyKeyValueContainer OfxImporterPlugin::onlineBankingSettings(const MyMoneyK if(!m_statusDlg->appId().isEmpty()) kvp.setValue("appId", m_statusDlg->appId()); kvp.setValue("kmmofx-headerVersion", m_statusDlg->headerVersion()); - kvp.setValue("kmmofx-numRequestDays", QString::number(m_statusDlg->m_numdaysSpin->value())); - kvp.setValue("kmmofx-todayMinus", QString::number(m_statusDlg->m_todayRB->isChecked())); - kvp.setValue("kmmofx-lastUpdate", QString::number(m_statusDlg->m_lastUpdateRB->isChecked())); - kvp.setValue("kmmofx-pickDate", QString::number(m_statusDlg->m_pickDateRB->isChecked())); + kvp.setValue("kmmofx-numRequestDays", TQString::number(m_statusDlg->m_numdaysSpin->value())); + kvp.setValue("kmmofx-todayMinus", TQString::number(m_statusDlg->m_todayRB->isChecked())); + kvp.setValue("kmmofx-lastUpdate", TQString::number(m_statusDlg->m_lastUpdateRB->isChecked())); + kvp.setValue("kmmofx-pickDate", TQString::number(m_statusDlg->m_pickDateRB->isChecked())); kvp.setValue("kmmofx-specificDate", m_statusDlg->m_specificDate->date().toString()); - kvp.setValue("kmmofx-preferPayeeid", QString::number(m_statusDlg->m_payeeidRB->isChecked())); - kvp.setValue("kmmofx-preferName", QString::number(m_statusDlg->m_nameRB->isChecked())); + kvp.setValue("kmmofx-preferPayeeid", TQString::number(m_statusDlg->m_payeeidRB->isChecked())); + kvp.setValue("kmmofx-preferName", TQString::number(m_statusDlg->m_nameRB->isChecked())); } return kvp; } @@ -611,7 +611,7 @@ bool OfxImporterPlugin::mapAccount(const MyMoneyAccount& acc, MyMoneyKeyValueCon bool rc = false; KOnlineBankingSetupWizard wiz(0, "onlinebankingsetup"); if(wiz.isInit()) { - if(wiz.exec() == QDialog::Accepted) { + if(wiz.exec() == TQDialog::Accepted) { rc = wiz.chosenSettings( settings ); } } @@ -629,29 +629,29 @@ bool OfxImporterPlugin::updateAccount(const MyMoneyAccount& acc, bool moreAccoun m_preferName = acc.onlineBankingSettings().value("kmmofx-preferName").toInt() != 0; KOfxDirectConnectDlg dlg(acc); - connect(&dlg, SIGNAL(statementReady(const QString&)), - this, SLOT(slotImportFile(const QString&))); + connect(&dlg, TQT_SIGNAL(statementReady(const TQString&)), + this, TQT_SLOT(slotImportFile(const TQString&))); dlg.init(); dlg.exec(); } } catch (MyMoneyException *e) { - KMessageBox::information(0 ,i18n("Error connecting to bank: %1").arg(e->what())); + KMessageBox::information(0 ,i18n("Error connecting to bank: %1").tqarg(e->what())); delete e; } return false; } -void OfxImporterPlugin::slotImportFile(const QString& url) +void OfxImporterPlugin::slotImportFile(const TQString& url) { if(!import(url)) { - KMessageBox::error( 0, QString("<qt>%1</qt>").arg(i18n("Unable to import %1 using the OFX importer plugin. The plugin returned the following error:<p>%2").arg(url, lastError())), i18n("Importing error")); + KMessageBox::error( 0, TQString("<qt>%1</qt>").tqarg(i18n("Unable to import %1 using the OFX importer plugin. The plugin returned the following error:<p>%2").tqarg(url, lastError())), i18n("Importing error")); } } -bool OfxImporterPlugin::storeStatements(QValueList<MyMoneyStatement>& statements) +bool OfxImporterPlugin::storeStatements(TQValueList<MyMoneyStatement>& statements) { bool hasstatements = (statements.count() > 0); bool ok = true; @@ -671,7 +671,7 @@ bool OfxImporterPlugin::storeStatements(QValueList<MyMoneyStatement>& statements }*/ qDebug("OfxImporterPlugin::storeStatements() with %d statements called", static_cast<int>(statements.count())); - QValueList<MyMoneyStatement>::const_iterator it_s = statements.begin(); + TQValueList<MyMoneyStatement>::const_iterator it_s = statements.begin(); while ( it_s != statements.end() && !abort ) { ok = ok && importStatement((*it_s)); ++it_s; diff --git a/kmymoney2/plugins/ofximport/ofximporterplugin.h b/kmymoney2/plugins/ofximport/ofximporterplugin.h index b665439..36473d8 100644 --- a/kmymoney2/plugins/ofximport/ofximporterplugin.h +++ b/kmymoney2/plugins/ofximport/ofximporterplugin.h @@ -24,7 +24,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // Library Includes @@ -35,7 +35,7 @@ // Project Includes #include "../kmymoneyplugin.h" -class KOnlineBankingStatus; +class KOnlineBankingtqStatus; /** @author Ace Jones @@ -43,8 +43,9 @@ class KOnlineBankingStatus; class OfxImporterPlugin : public KMyMoneyPlugin::Plugin, public KMyMoneyPlugin::ImporterPlugin, public KMyMoneyPlugin::OnlinePlugin { Q_OBJECT + TQ_OBJECT public: - OfxImporterPlugin(QObject *parent = 0, const char *name = 0, const QStringList& = QStringList()); + OfxImporterPlugin(TQObject *tqparent = 0, const char *name = 0, const TQStringList& = TQStringList()); ~OfxImporterPlugin(); @@ -52,18 +53,18 @@ public: * This method returns the english-language name of the format * this plugin imports, e.g. "OFX" * - * @return QString Name of the format + * @return TQString Name of the format */ - virtual QString formatName(void) const; + virtual TQString formatName(void) const; /** * This method returns the filename filter suitable for passing to * KFileDialog::setFilter(), e.g. "*.ofx *.qfx" which describes how * files of this format are likely to be named in the file system * - * @return QString Filename filter string + * @return TQString Filename filter string */ - virtual QString formatFilenameFilter(void) const; + virtual TQString formatFilenameFilter(void) const; /** * This method returns whether this plugin is able to import @@ -73,7 +74,7 @@ public: * * @return bool Whether the indicated file is importable by this plugin */ - virtual bool isMyFormat( const QString& filename ) const; + virtual bool isMyFormat( const TQString& filename ) const; /** * Import a file @@ -82,31 +83,31 @@ public: * * @return bool Whether the import was successful. */ - virtual bool import( const QString& filename ); + virtual bool import( const TQString& filename ); /** * Returns the error result of the last import * - * @return QString English-language name of the error encountered in the - * last import, or QString() if it was successful. + * @return TQString English-language name of the error encountered in the + * last import, or TQString() if it was successful. * */ - virtual QString lastError(void) const; + virtual TQString lastError(void) const; - QWidget* accountConfigTab(const MyMoneyAccount& acc, QString& name); + TQWidget* accountConfigTab(const MyMoneyAccount& acc, TQString& name); MyMoneyKeyValueContainer onlineBankingSettings(const MyMoneyKeyValueContainer& current); - const MyMoneyAccount& account(const QString& key, const QString& value) const; + const MyMoneyAccount& account(const TQString& key, const TQString& value) const; - void protocols(QStringList& protocolList) const; + void protocols(TQStringList& protocolList) const; bool mapAccount(const MyMoneyAccount& acc, MyMoneyKeyValueContainer& settings); bool updateAccount(const MyMoneyAccount& acc, bool moreAccounts); protected slots: void slotImportFile(void); - void slotImportFile(const QString& url); + void slotImportFile(const TQString& url); protected: void createActions(void); @@ -114,13 +115,13 @@ protected: MyMoneyStatement& back(void) { return m_statementlist.back(); } bool isValid(void) const { return m_valid; } void setValid(void) { m_valid = true; } - void addInfo(const QString& _msg ) { m_infos+=_msg; } - void addWarning(const QString& _msg ) { m_warnings+=_msg; } - void addError(const QString& _msg ) { m_errors+=_msg; } - const QStringList& infos(void) const { return m_infos; } - const QStringList& warnings(void) const { return m_warnings; } - const QStringList& errors(void) const { return m_errors; } - bool storeStatements(QValueList<MyMoneyStatement>& statements); + void addInfo(const TQString& _msg ) { m_infos+=_msg; } + void addWarning(const TQString& _msg ) { m_warnings+=_msg; } + void addError(const TQString& _msg ) { m_errors+=_msg; } + const TQStringList& infos(void) const { return m_infos; } + const TQStringList& warnings(void) const { return m_warnings; } + const TQStringList& errors(void) const { return m_errors; } + bool storeStatements(TQValueList<MyMoneyStatement>& statements); bool importStatement(const MyMoneyStatement& s); @@ -133,13 +134,13 @@ protected: private: bool m_valid; bool m_preferName; - QValueList<MyMoneyStatement> m_statementlist; - QValueList<MyMoneyStatement::Security> m_securitylist; - QString m_fatalerror; - QStringList m_infos; - QStringList m_warnings; - QStringList m_errors; - KOnlineBankingStatus* m_statusDlg; + TQValueList<MyMoneyStatement> m_statementlist; + TQValueList<MyMoneyStatement::Security> m_securitylist; + TQString m_fatalerror; + TQStringList m_infos; + TQStringList m_warnings; + TQStringList m_errors; + KOnlineBankingtqStatus* m_statusDlg; }; #endif diff --git a/kmymoney2/plugins/ofximport/ofxpartner.cpp b/kmymoney2/plugins/ofximport/ofxpartner.cpp index d36fbb2..9605e5a 100644 --- a/kmymoney2/plugins/ofximport/ofxpartner.cpp +++ b/kmymoney2/plugins/ofximport/ofxpartner.cpp @@ -23,15 +23,15 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> -#include <qeventloop.h> -#include <qfileinfo.h> -#include <qvaluelist.h> -#include <qapplication.h> -#include <qdom.h> -#include <qregexp.h> -#include <qdir.h> -#include <qtextstream.h> +#include <tqdatetime.h> +#include <tqeventloop.h> +#include <tqfileinfo.h> +#include <tqvaluelist.h> +#include <tqapplication.h> +#include <tqdom.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,26 +48,26 @@ namespace OfxPartner { -bool post(const QString& request, const QMap<QString, QString>& attr, const KURL& url, const KURL& filename); -bool get(const QString& request, const QMap<QString, QString>& attr, const KURL& url, const KURL& filename); +bool post(const TQString& request, const TQMap<TQString, TQString>& attr, const KURL& url, const KURL& filename); +bool get(const TQString& request, const TQMap<TQString, TQString>& attr, const KURL& url, const KURL& filename); -const QString kBankFilename = "ofx-bank-index.xml"; -const QString kCcFilename = "ofx-cc-index.xml"; -const QString kInvFilename = "ofx-inv-index.xml"; +const TQString kBankFilename = "ofx-bank-index.xml"; +const TQString kCcFilename = "ofx-cc-index.xml"; +const TQString kInvFilename = "ofx-inv-index.xml"; #define VER "9" -static QString directory; +static TQString directory; -void setDirectory(const QString& dir) +void setDirectory(const TQString& dir) { directory = dir; } -bool needReload(const QFileInfo& i) +bool needReload(const TQFileInfo& i) { return ((!i.isReadable()) - || (i.lastModified().addDays(7) < QDateTime::currentDateTime()) + || (i.lastModified().addDays(7) < TQDateTime::tqcurrentDateTime()) || (i.size() < 1024)); } @@ -78,55 +78,55 @@ void ValidateIndexCache(void) struct stat filestats; KURL fname; - QMap<QString, QString> attr; + TQMap<TQString, TQString> attr; attr["content-type"] = "application/x-www-form-urlencoded"; attr["accept"] = "*/*"; fname = directory + kBankFilename; - QFileInfo i(fname.path()); + TQFileInfo i(fname.path()); if(needReload(i)) post("T=1&S=*&R=1&O=0&TEST=0", attr, KURL("http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=" VER), fname); fname = directory + kCcFilename; - i = QFileInfo(fname.path()); + i = TQFileInfo(fname.path()); if(needReload(i)) post("T=2&S=*&R=1&O=0&TEST=0", attr, KURL("http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=" VER) ,fname); fname = directory + kInvFilename; - i = QFileInfo(fname.path()); + i = TQFileInfo(fname.path()); if(needReload(i)) post("T=3&S=*&R=1&O=0&TEST=0", attr, KURL("http://moneycentral.msn.com/money/2005/mnynet/service/ols/filist.aspx?SKU=3&VER=" VER), fname); } -static void ParseFile(QMap<QString, QString>& result, const QString& fileName, const QString& bankName) +static void ParseFile(TQMap<TQString, TQString>& result, const TQString& fileName, const TQString& bankName) { - QFile f(fileName); + TQFile f(fileName); if(f.open(IO_ReadOnly)) { - QTextStream stream(&f); - stream.setEncoding(QTextStream::Unicode); - QString msg; + TQTextStream stream(&f); + stream.setEncoding(TQTextStream::Unicode); + TQString msg; int errl, errc; - QDomDocument doc; + TQDomDocument doc; if(doc.setContent(stream.read(), &msg, &errl, &errc)) { - QDomNodeList olist = doc.elementsByTagName("prov"); + TQDomNodeList olist = doc.elementsByTagName("prov"); for(int i = 0; i < olist.count(); ++i) { - QDomNode onode = olist.item(i); + TQDomNode onode = olist.item(i); if(onode.isElement()) { bool collectGuid = false; - QDomElement elo = onode.toElement(); - QDomNodeList ilist = onode.childNodes(); + TQDomElement elo = onode.toElement(); + TQDomNodeList ilist = onode.childNodes(); for(int j = 0; j < ilist.count(); ++j) { - QDomNode inode = ilist.item(j); - QDomElement el = inode.toElement(); + TQDomNode inode = ilist.item(j); + TQDomElement el = inode.toElement(); if(el.tagName() == "name") { if(bankName.isEmpty()) - result[el.text()] = QString(); + result[el.text()] = TQString(); else if(el.text() == bankName) { collectGuid = true; } } if(el.tagName() == "guid" && collectGuid) { - result[el.text()] = QString(); + result[el.text()] = TQString(); } } } @@ -136,26 +136,26 @@ static void ParseFile(QMap<QString, QString>& result, const QString& fileName, c } } -QValueList<QString> BankNames(void) +TQValueList<TQString> BankNames(void) { - QMap<QString, QString> result; + TQMap<TQString, TQString> result; // Make sure the index files are up to date ValidateIndexCache(); - ParseFile(result, directory + kBankFilename, QString()); - ParseFile(result, directory + kCcFilename, QString()); - ParseFile(result, directory + kInvFilename, QString()); + ParseFile(result, directory + kBankFilename, TQString()); + ParseFile(result, directory + kCcFilename, TQString()); + ParseFile(result, directory + kInvFilename, TQString()); // Add Innovision - result["Innovision"] = QString(); + result["Innovision"] = TQString(); return result.keys(); } -QValueList<QString> FipidForBank(const QString& bank) +TQValueList<TQString> FipidForBank(const TQString& bank) { - QMap<QString, QString> result; + TQMap<TQString, TQString> result; ParseFile(result, directory + kBankFilename, bank); ParseFile(result, directory + kCcFilename, bank); @@ -163,21 +163,21 @@ QValueList<QString> FipidForBank(const QString& bank) // the fipid for Innovision is 1. if ( bank == "Innovision" ) - result["1"] = QString(); + result["1"] = TQString(); return result.keys(); } -QString extractNodeText(QDomElement& node, const QString& name) +TQString extractNodeText(TQDomElement& node, const TQString& name) { - QString res; - QRegExp exp("([^/]+)/?([^/].*)?"); + TQString res; + TQRegExp exp("([^/]+)/?([^/].*)?"); if(exp.search(name) != -1) { - QDomNodeList olist = node.elementsByTagName(exp.cap(1)); + TQDomNodeList olist = node.elementsByTagName(exp.cap(1)); if(olist.count()) { - QDomNode onode = olist.item(0); + TQDomNode onode = olist.item(0); if(onode.isElement()) { - QDomElement elo = onode.toElement(); + TQDomElement elo = onode.toElement(); if(exp.cap(2).isEmpty()) { res = elo.text(); } else { @@ -189,16 +189,16 @@ QString extractNodeText(QDomElement& node, const QString& name) return res; } -QString extractNodeText(QDomDocument& doc, const QString& name) +TQString extractNodeText(TQDomDocument& doc, const TQString& name) { - QString res; - QRegExp exp("([^/]+)/?([^/].*)?"); + TQString res; + TQRegExp exp("([^/]+)/?([^/].*)?"); if(exp.search(name) != -1) { - QDomNodeList olist = doc.elementsByTagName(exp.cap(1)); + TQDomNodeList olist = doc.elementsByTagName(exp.cap(1)); if(olist.count()) { - QDomNode onode = olist.item(0); + TQDomNode onode = olist.item(0); if(onode.isElement()) { - QDomElement elo = onode.toElement(); + TQDomElement elo = onode.toElement(); if(exp.cap(2).isEmpty()) { res = elo.text(); } else { @@ -210,7 +210,7 @@ QString extractNodeText(QDomDocument& doc, const QString& name) return res; } -OfxFiServiceInfo ServiceInfo(const QString& fipid) +OfxFiServiceInfo ServiceInfo(const TQString& fipid) { OfxFiServiceInfo result; memset(&result, 0, sizeof(OfxFiServiceInfo)); @@ -229,31 +229,31 @@ OfxFiServiceInfo ServiceInfo(const QString& fipid) return result; } - QMap<QString, QString> attr; + TQMap<TQString, TQString> attr; attr["content-type"] = "application/x-www-form-urlencoded"; attr["accept"] = "*/*"; - KURL guidFile(QString("%1fipid-%2.xml").arg(directory).arg(fipid)); + KURL guidFile(TQString("%1fipid-%2.xml").tqarg(directory).tqarg(fipid)); - // Apparently at some point in time, for VER=6 msn returned an online URL + // Aptqparently at some point in time, for VER=6 msn returned an online URL // to a static error page (http://moneycentral.msn.com/cust404.htm). // Increasing to VER=9 solved the problem. This may happen again in the // future. - QFileInfo i(guidFile.path()); - if(!i.isReadable() || i.lastModified().addDays(7) < QDateTime::currentDateTime()) - get("", attr, KURL(QString("http://moneycentral.msn.com/money/2005/mnynet/service/olsvcupd/OnlSvcBrandInfo.aspx?MSNGUID=&GUID=%1&SKU=3&VER=" VER).arg(fipid)), guidFile); + TQFileInfo i(guidFile.path()); + if(!i.isReadable() || i.lastModified().addDays(7) < TQDateTime::tqcurrentDateTime()) + get("", attr, KURL(TQString("http://moneycentral.msn.com/money/2005/mnynet/service/olsvcupd/OnlSvcBrandInfo.aspx?MSNGUID=&GUID=%1&SKU=3&VER=" VER).tqarg(fipid)), guidFile); - QFile f(guidFile.path()); + TQFile f(guidFile.path()); if(f.open(IO_ReadOnly)) { - QTextStream stream(&f); - stream.setEncoding(QTextStream::Unicode); - QString msg; + TQTextStream stream(&f); + stream.setEncoding(TQTextStream::Unicode); + TQString msg; int errl, errc; - QDomDocument doc; + TQDomDocument doc; if(doc.setContent(stream.read(), &msg, &errl, &errc)) { - QString fid = extractNodeText(doc, "ProviderSettings/FID"); - QString org = extractNodeText(doc, "ProviderSettings/Org"); - QString url = extractNodeText(doc, "ProviderSettings/ProviderURL"); + TQString fid = extractNodeText(doc, "ProviderSettings/FID"); + TQString org = extractNodeText(doc, "ProviderSettings/Org"); + TQString url = extractNodeText(doc, "ProviderSettings/ProviderURL"); strncpy(result.fid, fid.latin1(), OFX_FID_LENGTH-1); strncpy(result.org, org.latin1(), OFX_ORG_LENGTH-1); strncpy(result.url, url.latin1(), OFX_URL_LENGTH-1); @@ -267,22 +267,22 @@ OfxFiServiceInfo ServiceInfo(const QString& fipid) return result; } -bool get(const QString& request, const QMap<QString, QString>& attr, const KURL& url, const KURL& filename) +bool get(const TQString& request, const TQMap<TQString, TQString>& attr, const KURL& url, const KURL& filename) { - QByteArray req(0); + TQByteArray req(0); OfxHttpRequest job("GET", url, req, attr, filename, true); - return job.error() == QHttp::NoError; + return job.error() == TQHttp::NoError; } -bool post(const QString& request, const QMap<QString, QString>& attr, const KURL& url, const KURL& filename) +bool post(const TQString& request, const TQMap<TQString, TQString>& attr, const KURL& url, const KURL& filename) { - QByteArray req; + TQByteArray req; req.fill(0, request.length()+1); req.duplicate(request.ascii(), request.length()); OfxHttpRequest job("POST", url, req, attr, filename, true); - return job.error() == QHttp::NoError; + return job.error() == TQHttp::NoError; } } // namespace OfxPartner @@ -290,16 +290,16 @@ bool post(const QString& request, const QMap<QString, QString>& attr, const KURL class OfxHttpsRequest::Private { public: - QFile m_fpTrace; + TQFile m_fpTrace; }; -OfxHttpsRequest::OfxHttpsRequest(const QString& type, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo) : +OfxHttpsRequest::OfxHttpsRequest(const TQString& type, const KURL &url, const TQByteArray &postData, const TQMap<TQString, TQString>& metaData, const KURL& dst, bool showProgressInfo) : d(new Private), m_dst(dst) { - QDir homeDir(QDir::home()); + TQDir homeDir(TQDir::home()); if(homeDir.exists("ofxlog.txt")) { - d->m_fpTrace.setName(QString("%1/ofxlog.txt").arg(QDir::homeDirPath())); + d->m_fpTrace.setName(TQString("%1/ofxlog.txt").tqarg(TQDir::homeDirPath())); d->m_fpTrace.open(IO_WriteOnly | IO_Append); } @@ -307,16 +307,16 @@ OfxHttpsRequest::OfxHttpsRequest(const QString& type, const KURL &url, const QBy m_job->addMetaData("content-type", "Content-type: application/x-ofx" ); if(d->m_fpTrace.isOpen()) { - QTextStream ts(&d->m_fpTrace); + TQTextStream ts(&d->m_fpTrace); ts << "url: " << url.prettyURL() << "\n"; - ts << "request:\n" << QString(postData) << "\n" << "response:\n"; + ts << "request:\n" << TQString(postData) << "\n" << "response:\n"; } - connect(m_job,SIGNAL(result(KIO::Job*)),this,SLOT(slotOfxFinished(KIO::Job*))); - connect(m_job,SIGNAL(data(KIO::Job*, const QByteArray&)),this,SLOT(slotOfxData(KIO::Job*,const QByteArray&))); - connect(m_job,SIGNAL(connected(KIO::Job*)),this,SLOT(slotOfxConnected(KIO::Job*))); + connect(m_job,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(slotOfxFinished(KIO::Job*))); + connect(m_job,TQT_SIGNAL(data(KIO::Job*, const TQByteArray&)),this,TQT_SLOT(slotOfxData(KIO::Job*,const TQByteArray&))); + connect(m_job,TQT_SIGNAL(connected(KIO::Job*)),this,TQT_SLOT(slotOfxConnected(KIO::Job*))); - qApp->enter_loop(); + tqApp->enter_loop(); } OfxHttpsRequest::~OfxHttpsRequest() @@ -332,11 +332,11 @@ void OfxHttpsRequest::slotOfxConnected(KIO::Job*) m_file.open(IO_WriteOnly); } -void OfxHttpsRequest::slotOfxData(KIO::Job*,const QByteArray& _ba) +void OfxHttpsRequest::slotOfxData(KIO::Job*,const TQByteArray& _ba) { if(m_file.isOpen()) { - QTextStream ts(&m_file); - ts << QString(_ba); + TQTextStream ts(&m_file); + ts << TQString(_ba); if(d->m_fpTrace.isOpen()) { d->m_fpTrace.writeBlock(_ba, _ba.size()); @@ -361,11 +361,11 @@ void OfxHttpsRequest::slotOfxFinished(KIO::Job* /* e */) unlink(m_dst.path()); } else if ( m_job->isErrorPage() ) { - QString details; - QFile f( m_dst.path() ); + TQString details; + TQFile f( m_dst.path() ); if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); - QString line; + TQTextStream stream( &f ); + TQString line; while ( !stream.atEnd() ) { details += stream.readLine(); // line of text excluding '\n' } @@ -375,42 +375,42 @@ void OfxHttpsRequest::slotOfxFinished(KIO::Job* /* e */) unlink(m_dst.path()); } - qApp->exit_loop(); + tqApp->exit_loop(); } -OfxHttpRequest::OfxHttpRequest(const QString& type, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo) +OfxHttpRequest::OfxHttpRequest(const TQString& type, const KURL &url, const TQByteArray &postData, const TQMap<TQString, TQString>& metaData, const KURL& dst, bool showProgressInfo) { - QFile f(dst.path()); - m_error = QHttp::NoError; - QString errorMsg; + TQFile f(dst.path()); + m_error = TQHttp::NoError; + TQString errorMsg; if(f.open(IO_WriteOnly)) { - m_job = new QHttp(url.host()); - QHttpRequestHeader header(type, url.encodedPathAndQuery()); + m_job = new TQHttp(url.host()); + TQHttpRequestHeader header(type, url.encodedPathAndQuery()); header.setValue("Host", url.host()); - QMap<QString, QString>::const_iterator it; + TQMap<TQString, TQString>::const_iterator it; for(it = metaData.begin(); it != metaData.end(); ++it) { header.setValue(it.key(), *it); } - m_job->request(header, postData, &f); + m_job->request(header, postData, TQT_TQIODEVICE(&f)); - connect(m_job, SIGNAL(requestFinished(int, bool)), - this, SLOT(slotOfxFinished(int, bool))); + connect(m_job, TQT_SIGNAL(requestFinished(int, bool)), + this, TQT_SLOT(slotOfxFinished(int, bool))); - qApp->enter_loop(); + tqApp->enter_loop(); - if(m_error != QHttp::NoError) + if(m_error != TQHttp::NoError) errorMsg = m_job->errorString(); delete m_job; } else { - m_error = QHttp::Aborted; - errorMsg = i18n("Cannot open file %1 for writing").arg(dst.path()); + m_error = TQHttp::Aborted; + errorMsg = i18n("Cannot open file %1 for writing").tqarg(dst.path()); } - if(m_error != QHttp::NoError) { + if(m_error != TQHttp::NoError) { KMessageBox::error(0, errorMsg, i18n("OFX setup error")); unlink(dst.path()); } @@ -421,7 +421,7 @@ void OfxHttpRequest::slotOfxFinished(int, bool rc) if(rc) { m_error = m_job->error(); } - qApp->exit_loop(); + tqApp->exit_loop(); } #include "ofxpartner.moc" diff --git a/kmymoney2/plugins/ofximport/ofxpartner.h b/kmymoney2/plugins/ofximport/ofxpartner.h index e624282..84f4d2a 100644 --- a/kmymoney2/plugins/ofximport/ofxpartner.h +++ b/kmymoney2/plugins/ofximport/ofxpartner.h @@ -22,8 +22,8 @@ // QT Includes -#include <qobject.h> -#include <qhttp.h> +#include <tqobject.h> +#include <tqhttp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -49,54 +49,56 @@ namespace OfxPartner * default will be to store the files in the current * directory. */ - void setDirectory(const QString& dir); + void setDirectory(const TQString& dir); void ValidateIndexCache(void); - OfxFiServiceInfo ServiceInfo(const QString& fipid); - QValueList<QString> BankNames(void); - QValueList<QString> FipidForBank(const QString& bank); + OfxFiServiceInfo ServiceInfo(const TQString& fipid); + TQValueList<TQString> BankNames(void); + TQValueList<TQString> FipidForBank(const TQString& bank); } -class OfxHttpRequest : public QObject +class OfxHttpRequest : public TQObject { Q_OBJECT + TQ_OBJECT public: - OfxHttpRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true); + OfxHttpRequest(const TQString& method, const KURL &url, const TQByteArray &postData, const TQMap<TQString, TQString>& metaData, const KURL& dst, bool showProgressInfo=true); virtual ~OfxHttpRequest() {} - QHttp::Error error(void) const { return m_error; } + TQHttp::Error error(void) const { return m_error; } protected slots: void slotOfxFinished(int, bool); private: - QHttp* m_job; + TQHttp* m_job; KURL m_dst; - QHttp::Error m_error; + TQHttp::Error m_error; }; -class OfxHttpsRequest : public QObject +class OfxHttpsRequest : public TQObject { Q_OBJECT + TQ_OBJECT public: - OfxHttpsRequest(const QString& method, const KURL &url, const QByteArray &postData, const QMap<QString, QString>& metaData, const KURL& dst, bool showProgressInfo=true); + OfxHttpsRequest(const TQString& method, const KURL &url, const TQByteArray &postData, const TQMap<TQString, TQString>& metaData, const KURL& dst, bool showProgressInfo=true); virtual ~OfxHttpsRequest(); - QHttp::Error error(void) const { return m_error; } + TQHttp::Error error(void) const { return m_error; } protected slots: void slotOfxFinished(KIO::Job*); - void slotOfxData(KIO::Job*,const QByteArray&); + void slotOfxData(KIO::Job*,const TQByteArray&); void slotOfxConnected(KIO::Job*); private: class Private; Private* d; KURL m_dst; - QFile m_file; - QHttp::Error m_error; + TQFile m_file; + TQHttp::Error m_error; KIO::TransferJob* m_job; }; #endif // OFXPARTNER_H diff --git a/kmymoney2/plugins/pluginloader.cpp b/kmymoney2/plugins/pluginloader.cpp index 0201337..49f9dcc 100644 --- a/kmymoney2/plugins/pluginloader.cpp +++ b/kmymoney2/plugins/pluginloader.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqstringlist.h> +#include <tqcheckbox.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -48,24 +48,24 @@ namespace KMyMoneyPlugin { //--------------------------------------------------------------------- static PluginLoader* s_instance = 0; -typedef QMap<QString, Plugin*> PluginsMap; +typedef TQMap<TQString, Plugin*> PluginsMap; struct PluginLoader::Private { - QObject* m_parent; + TQObject* m_parent; KPluginInfo::List m_pluginList; KPluginSelector* m_pluginSelector; PluginsMap m_loadedPlugins; }; -PluginLoader::PluginLoader(QObject* parent) +PluginLoader::PluginLoader(TQObject* tqparent) { Q_ASSERT( s_instance == 0 ); s_instance = this; d = new Private; - d->m_parent = parent; + d->m_parent = tqparent; KTrader::OfferList offers = KTrader::self()->query("KMyMoneyPlugin"); d->m_pluginList = KPluginInfo::fromServices(offers); @@ -75,8 +75,8 @@ PluginLoader::PluginLoader(QObject* parent) d->m_pluginSelector->addPlugins(d->m_pluginList); d->m_pluginSelector->load(); - connect(d->m_pluginSelector, SIGNAL(changed(bool)), this, SLOT(changed())); - connect(d->m_pluginSelector, SIGNAL(configCommitted(const QCString &)), this, SLOT(changedConfigOfPlugin(const QCString &))); + connect(d->m_pluginSelector, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(changed())); + connect(d->m_pluginSelector, TQT_SIGNAL(configCommitted(const TQCString &)), this, TQT_SLOT(changedConfigOfPlugin(const TQCString &))); } PluginLoader::~PluginLoader() @@ -100,7 +100,7 @@ void PluginLoader::loadPlugin(KPluginInfo* info) KService::Ptr service = info->service(); int error = 0; Plugin* plugin = KParts::ComponentFactory - ::createInstanceFromService<Plugin>(service, d->m_parent, info->name().utf8(), QStringList(), &error); + ::createInstanceFromService<Plugin>(service, d->m_parent, info->name().utf8(), TQStringList(), &error); if (plugin) { kdDebug() << "KMyMoneyPlugin::PluginLoader: Loaded plugin " << plugin->name() << endl; d->m_loadedPlugins.insert(info->name(), plugin); @@ -131,16 +131,16 @@ void PluginLoader::changed() loadPlugins(); } -void PluginLoader::changedConfigOfPlugin(const QCString & name) +void PluginLoader::changedConfigOfPlugin(const TQCString & name) { - PluginsMap::iterator itPlugin = d->m_loadedPlugins.find(QString(name)); + PluginsMap::iterator itPlugin = d->m_loadedPlugins.tqfind(TQString(name)); if (itPlugin != d->m_loadedPlugins.end()) configChanged(*itPlugin); } Plugin* PluginLoader::getPluginFromInfo(KPluginInfo* info) { - PluginsMap::iterator itPlugin = d->m_loadedPlugins.find(info->name()); + PluginsMap::iterator itPlugin = d->m_loadedPlugins.tqfind(info->name()); if (itPlugin != d->m_loadedPlugins.end()) return *itPlugin; else diff --git a/kmymoney2/plugins/pluginloader.h b/kmymoney2/plugins/pluginloader.h index 4d0c500..5111948 100644 --- a/kmymoney2/plugins/pluginloader.h +++ b/kmymoney2/plugins/pluginloader.h @@ -25,8 +25,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qscrollview.h> +#include <tqwidget.h> +#include <tqscrollview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,11 +43,12 @@ namespace KMyMoneyPlugin { class Plugin; - class KMYMONEY_EXPORT PluginLoader : public QObject + class KMYMONEY_EXPORT PluginLoader : public TQObject { Q_OBJECT + TQ_OBJECT public: - PluginLoader(QObject* parent); + PluginLoader(TQObject* tqparent); virtual ~PluginLoader(); static PluginLoader* instance(); @@ -65,7 +66,7 @@ namespace KMyMoneyPlugin private slots: void changed(); - void changedConfigOfPlugin( const QCString & ); + void changedConfigOfPlugin( const TQCString & ); private: struct Private; diff --git a/kmymoney2/plugins/statementinterface.cpp b/kmymoney2/plugins/statementinterface.cpp index 753db2e..3dfac42 100644 --- a/kmymoney2/plugins/statementinterface.cpp +++ b/kmymoney2/plugins/statementinterface.cpp @@ -26,8 +26,8 @@ #include "statementinterface.h" -KMyMoneyPlugin::StatementInterface::StatementInterface(QObject* parent, const char* name) : - QObject(parent, name) +KMyMoneyPlugin::StatementInterface::StatementInterface(TQObject* tqparent, const char* name) : + TQObject(tqparent, name) { } diff --git a/kmymoney2/plugins/statementinterface.h b/kmymoney2/plugins/statementinterface.h index a3a31d1..66d533a 100644 --- a/kmymoney2/plugins/statementinterface.h +++ b/kmymoney2/plugins/statementinterface.h @@ -25,7 +25,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> +#include <tqobject.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,11 +43,12 @@ namespace KMyMoneyPlugin { * This abstract class represents the interface to import statements * into the KMyMoney application */ -class KMYMONEY_EXPORT StatementInterface : public QObject { +class KMYMONEY_EXPORT StatementInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: - StatementInterface(QObject* parent, const char* name = 0); + StatementInterface(TQObject* tqparent, const char* name = 0); ~StatementInterface() {} /** @@ -60,7 +61,7 @@ public: * If the account is not found in the list of accounts, MyMoneyAccount() * is returned. */ - virtual const MyMoneyAccount& account(const QString& key, const QString& value) const = 0; + virtual const MyMoneyAccount& account(const TQString& key, const TQString& value) const = 0; /** */ diff --git a/kmymoney2/plugins/viewinterface.cpp b/kmymoney2/plugins/viewinterface.cpp index 4db12f1..03f0d0b 100644 --- a/kmymoney2/plugins/viewinterface.cpp +++ b/kmymoney2/plugins/viewinterface.cpp @@ -26,8 +26,8 @@ #include "viewinterface.h" -KMyMoneyPlugin::ViewInterface::ViewInterface(QObject* parent, const char* name) : - QObject(parent, name) +KMyMoneyPlugin::ViewInterface::ViewInterface(TQObject* tqparent, const char* name) : + TQObject(tqparent, name) { } diff --git a/kmymoney2/plugins/viewinterface.h b/kmymoney2/plugins/viewinterface.h index d7c7424..edec926 100644 --- a/kmymoney2/plugins/viewinterface.h +++ b/kmymoney2/plugins/viewinterface.h @@ -25,10 +25,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qstring.h> -#include <qpixmap.h> -class QFrame; +#include <tqobject.h> +#include <tqstring.h> +#include <tqpixmap.h> +class TQFrame; // ---------------------------------------------------------------------------- // KDE Includes @@ -53,27 +53,28 @@ namespace KMyMoneyPlugin { * add new view pages to the JanusWidget of KMyMoney. It * also gives access to the account context menu. */ -class KMYMONEY_EXPORT ViewInterface : public QObject { +class KMYMONEY_EXPORT ViewInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: - ViewInterface(QObject* parent, const char* name = 0); + ViewInterface(TQObject* tqparent, const char* name = 0); ~ViewInterface() {} /** * This method creates a new page in the application. * See KJanusWidget::addPage() for details. */ - virtual KMyMoneyViewBase* addPage(const QString& item, const QString& icon) = 0; + virtual KMyMoneyViewBase* addPage(const TQString& item, const TQString& icon) = 0; /** - * This method adds a widget to the layout of the view + * This method adds a widget to the tqlayout of the view * created with addPage() * * @param view pointer to view widget * @param w widget to be added to @p page */ - virtual void addWidget(KMyMoneyViewBase* view, QWidget* w) = 0; + virtual void addWidget(KMyMoneyViewBase* view, TQWidget* w) = 0; signals: /** @@ -87,7 +88,7 @@ signals: /** * This signal is emitted when a transaction/list of transactions has been selected by * the GUI. If no transaction is selected or the selection is removed, - * @p transactions is identical to an empty QValueList. This signal is used + * @p transactions is identical to an empty TQValueList. This signal is used * by plugins to get information about changes. */ void transactionsSelected(const KMyMoneyRegister::SelectedTransactions& transactions); @@ -109,10 +110,10 @@ signals: * @param date the reconciliation date as provided through the dialog * @param startingBalance the starting balance as provided through the dialog * @param endingBalance the ending balance as provided through the dialog - * @param transactionList reference to QValueList of QPair containing all + * @param transactionList reference to TQValueList of TQPair containing all * transaction/split pairs processed by the reconciliation. */ - void accountReconciled(const MyMoneyAccount& account, const QDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); + void accountReconciled(const MyMoneyAccount& account, const TQDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); void viewStateChanged(bool); diff --git a/kmymoney2/reports/kreportchartview.cpp b/kmymoney2/reports/kreportchartview.cpp index 21b08fa..e9c9060 100644 --- a/kmymoney2/reports/kreportchartview.cpp +++ b/kmymoney2/reports/kreportchartview.cpp @@ -34,12 +34,12 @@ using namespace reports; -KReportChartView::KReportChartView( QWidget* parent, const char* name ): KDChartWidget(parent,name) +KReportChartView::KReportChartView( TQWidget* tqparent, const char* name ): KDChartWidget(tqparent,name) { // ******************************************************************** // Set KMyMoney's Chart Parameter Defaults // ******************************************************************** - this->setPaletteBackgroundColor( Qt::white ); + this->setPaletteBackgroundColor( TQt::white ); KDChartParams* _params = new KDChartParams(); _params->setChartType( KDChartParams::Line ); @@ -49,7 +49,7 @@ KReportChartView::KReportChartView( QWidget* parent, const char* name ): KDChart /** // use line marker, but only circles. _params->setLineMarker( true ); - _params->setLineMarkerSize( QSize(8,8) ); + _params->setLineMarkerSize( TQSize(8,8) ); _params->setLineMarkerStyle( 0, KDChartParams::LineMarkerCircle ); _params->setLineMarkerStyle( 1, KDChartParams::LineMarkerCircle ); _params->setLineMarkerStyle( 2, KDChartParams::LineMarkerCircle ); @@ -90,21 +90,21 @@ KReportChartView::KReportChartView( QWidget* parent, const char* name ): KDChart // ******************************************************************** // Tooltip Setup // ******************************************************************** - label = new QLabel( this ); + label = new TQLabel( this ); label->hide(); - // mouse tracking on will force the mouseMoveEvent() method to be called from Qt + // mouse tracking on will force the mouseMoveEvent() method to be called from TQt label->setMouseTracking( true ); - label->setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); - label->setAlignment( AlignRight ); + label->setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); + label->tqsetAlignment( AlignRight ); label->setAutoResize( true ); } /** * This function implements mouseMoveEvents */ -void KReportChartView::mouseMoveEvent( QMouseEvent* event ) +void KReportChartView::mouseMoveEvent( TQMouseEvent* event ) { - QPoint translate, pos; // some movement helpers + TQPoint translate, pos; // some movement helpers uint dataset; // the current dataset (eg. category) uint datasets; // the total number of datasets double value; // the value of the region @@ -121,10 +121,10 @@ void KReportChartView::mouseMoveEvent( QMouseEvent* event ) // ..by going through every data region and checking whether it // contains the mouse pointer KDChartDataRegion* current = 0; - QPtrListIterator < KDChartDataRegion > it( *(this->dataRegions()) ); + TQPtrListIterator < KDChartDataRegion > it( *(this->dataRegions()) ); while ( ( current = it.current() ) ) { ++it; - if ( current->contains( event->pos() ) ) + if ( current->tqcontains( event->pos() ) ) { // we found the data region that contains the mouse value = this->data()->cellVal(current->row, current->col).toDouble(); @@ -150,18 +150,18 @@ void KReportChartView::mouseMoveEvent( QMouseEvent* event ) if(datasets > 1) { // set the tooltip text - label->setText(QString("<h2>%1</h2><strong>%2</strong><br>(%3\%)") - .arg(this->params()->legendText( dataset )) - .arg(value, 0, 'f', 2) - .arg(pivot_sum, 0, 'f', 2) + label->setText(TQString("<h2>%1</h2><strong>%2</strong><br>(%3\%)") + .tqarg(this->params()->legendText( dataset )) + .tqarg(value, 0, 'f', 2) + .tqarg(pivot_sum, 0, 'f', 2) ); } else // if there is only one dataset, don't show percentage { // set the tooltip text - label->setText(QString("<h2>%1</h2><strong>%2</strong>") - .arg(this->params()->legendText( dataset )) - .arg(value, 0, 'f', 2) + label->setText(TQString("<h2>%1</h2><strong>%2</strong>") + .tqarg(this->params()->legendText( dataset )) + .tqarg(value, 0, 'f', 2) ); } diff --git a/kmymoney2/reports/kreportchartview.h b/kmymoney2/reports/kreportchartview.h index a1bf786..d04e291 100644 --- a/kmymoney2/reports/kreportchartview.h +++ b/kmymoney2/reports/kreportchartview.h @@ -34,7 +34,7 @@ #undef new #endif -#include <qlabel.h> +#include <tqlabel.h> #include <KDChartWidget.h> #include <KDChartTable.h> #include <KDChartParams.h> @@ -51,11 +51,11 @@ namespace reports { class KReportChartView: public KDChartWidget { public: - KReportChartView( QWidget* parent, const char* name ); + KReportChartView( TQWidget* tqparent, const char* name ); ~KReportChartView() {} static bool implemented(void) { return true; } void setNewData( const KDChartTableData& newdata ) { this->setData(new KDChartTableData(newdata)); } - QStringList& abscissaNames(void) { return m_abscissaNames; } + TQStringList& abscissaNames(void) { return m_abscissaNames; } void refreshLabels(void) { this->params()->setAxisLabelStringParams( KDChartAxisParams::AxisPosBottom,&m_abscissaNames,0); } void setProperty(int row, int col, int id); // void setCircularLabels(void) { this->params()->setAxisLabelStringParams( KDChartAxisParams::AxisPosCircular,&m_abscissaNames,0); } @@ -64,14 +64,14 @@ public: bool getAccountSeries(void) {return _accountSeries; } protected: - virtual void mouseMoveEvent( QMouseEvent* event ); + virtual void mouseMoveEvent( TQMouseEvent* event ); private: - QStringList m_abscissaNames; + TQStringList m_abscissaNames; bool _accountSeries; // label to display when hovering on a data region - QLabel *label; + TQLabel *label; }; } // end namespace reports @@ -80,10 +80,10 @@ private: namespace reports { -class KReportChartView : public QWidget +class KReportChartView : public TQWidget { public: - KReportChartView( QWidget* parent, const char* name ): QWidget(parent,name) {} + KReportChartView( TQWidget* tqparent, const char* name ): TQWidget(tqparent,name) {} ~KReportChartView() {} static bool implemented(void) { return false; } }; diff --git a/kmymoney2/reports/listtable.cpp b/kmymoney2/reports/listtable.cpp index 797b392..16db407 100644 --- a/kmymoney2/reports/listtable.cpp +++ b/kmymoney2/reports/listtable.cpp @@ -19,9 +19,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluelist.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqvaluelist.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,7 +43,7 @@ namespace reports { - QStringList ListTable::TableRow::m_sortCriteria; + TQStringList ListTable::TableRow::m_sortCriteria; // **************************************************************************** // @@ -54,7 +54,7 @@ namespace reports { class GroupIterator { public: - GroupIterator ( const QString& _group, const QString& _subtotal, unsigned _depth ) : m_depth ( _depth ), m_groupField ( _group ), m_subtotalField ( _subtotal ) {} + GroupIterator ( const TQString& _group, const TQString& _subtotal, unsigned _depth ) : m_depth ( _depth ), m_groupField ( _group ), m_subtotalField ( _subtotal ) {} GroupIterator ( void ) {} void update ( const ListTable::TableRow& _row ) { @@ -73,20 +73,20 @@ namespace reports { const MyMoneyMoney& subtotal ( void ) const { return m_previousSubtotal; } const MyMoneyMoney& currenttotal ( void ) const { return m_currentSubtotal; } unsigned depth ( void ) const { return m_depth; } - const QString& name ( void ) const { return m_currentGroup; } - const QString& oldName ( void ) const { return m_previousGroup; } - const QString& groupField ( void ) const { return m_groupField; } - const QString& subtotalField ( void ) const { return m_subtotalField; } + const TQString& name ( void ) const { return m_currentGroup; } + const TQString& oldName ( void ) const { return m_previousGroup; } + const TQString& groupField ( void ) const { return m_groupField; } + const TQString& subtotalField ( void ) const { return m_subtotalField; } // ***DV*** HACK make the currentGroup test different but look the same void force ( void ) { m_currentGroup += " "; } private: MyMoneyMoney m_currentSubtotal; MyMoneyMoney m_previousSubtotal; unsigned m_depth; - QString m_currentGroup; - QString m_previousGroup; - QString m_groupField; - QString m_subtotalField; + TQString m_currentGroup; + TQString m_previousGroup; + TQString m_groupField; + TQString m_subtotalField; }; // **************************************************************************** @@ -99,7 +99,7 @@ namespace reports { { bool result = false; - QStringList::const_iterator it_criterion = m_sortCriteria.begin(); + TQStringList::const_iterator it_criterion = m_sortCriteria.begin(); while ( it_criterion != m_sortCriteria.end() ) { if ( this->operator[] ( *it_criterion ) < _compare[ *it_criterion ] ) @@ -145,28 +145,28 @@ namespace reports { { } - void ListTable::render ( QString& result, QString& csv ) const + void ListTable::render ( TQString& result, TQString& csv ) const { MyMoneyMoney grandtotal; MyMoneyFile* file = MyMoneyFile::instance(); result = ""; csv = ""; - result += QString ( "<h2 class=\"report\">%1</h2>\n" ).arg ( m_config.name() ); + result += TQString ( "<h2 class=\"report\">%1</h2>\n" ).arg ( m_config.name() ); csv += "\"Report: " + m_config.name() + "\"\n"; //actual dates of the report - result += QString("<div class=\"subtitle\">"); + result += TQString("<div class=\"subtitle\">"); if(!m_config.fromDate().isNull()) { - result += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config.toDate(), true)); - result += QString("</div>\n"); - result += QString("<div class=\"gap\"> </div>\n"); + result += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config.toDate(), true)); + result += TQString("</div>\n"); + result += TQString("<div class=\"gap\"> </div>\n"); - csv += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config.toDate(), true)); - csv += QString("\n"); + csv += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config.toDate(), true)); + csv += TQString("\n"); } - result += QString ( "<div class=\"subtitle\">" ); + result += TQString ( "<div class=\"subtitle\">" ); if ( m_config.isConvertCurrency() ) { result += i18n ( "All currencies converted to %1" ).arg ( file->baseCurrency().name() ); @@ -177,23 +177,23 @@ namespace reports { result += i18n ( "All values shown in %1 unless otherwise noted" ).arg ( file->baseCurrency().name() ); csv += i18n ( "All values shown in %1 unless otherwise noted\n" ).arg ( file->baseCurrency().name() ); } - result += QString ( "</div>\n" ); - result += QString ( "<div class=\"gap\"> </div>\n" ); + result += TQString ( "</div>\n" ); + result += TQString ( "<div class=\"gap\"> </div>\n" ); // retrieve the configuration parameters from the report definition. // the things that we care about for query reports are: // how to group the rows, what columns to display, and what field // to subtotal on - QStringList groups = QStringList::split ( ",", m_group ); - QStringList columns = QStringList::split ( ",", m_columns ); + TQStringList groups = TQStringList::split ( ",", m_group ); + TQStringList columns = TQStringList::split ( ",", m_columns ); columns += m_subtotal; - QStringList postcolumns = QStringList::split ( ",", m_postcolumns ); + TQStringList postcolumns = TQStringList::split ( ",", m_postcolumns ); columns += postcolumns; // // Table header // - QMap<QString, QString> i18nHeaders; + TQMap<TQString, TQString> i18nHeaders; i18nHeaders["postdate"] = i18n ( "Date" ); i18nHeaders["value"] = i18n ( "Amount" ); i18nHeaders["number"] = i18n ( "Num" ); @@ -246,24 +246,24 @@ namespace reports { i18nHeaders["currentbalance"] = i18n ( "Current Balance" ); // the list of columns which represent money, so we can display them correctly - QStringList moneyColumns = QStringList::split ( ",", "value,shares,price,latestprice,netinvvalue,buys,sells,cashincome,reinvestincome,startingbal,fees,interest,payment,balance,balancewarning,maxbalancelimit,creditwarning,maxcreditlimit,loanamount,periodicpayment,finalpayment,currentbalance" ); + TQStringList moneyColumns = TQStringList::split ( ",", "value,shares,price,latestprice,netinvvalue,buys,sells,cashincome,reinvestincome,startingbal,fees,interest,payment,balance,balancewarning,maxbalancelimit,creditwarning,maxcreditlimit,loanamount,periodicpayment,finalpayment,currentbalance" ); // the list of columns which represent shares, which is like money except the // transaction currency will not be displayed - QStringList sharesColumns = QStringList::split ( ",", "shares" ); + TQStringList sharesColumns = TQStringList::split ( ",", "shares" ); // the list of columns which represent a percentage, so we can display them correctly - QStringList percentColumns = QStringList::split ( ",", "return,returninvestment,interestrate" ); + TQStringList percentColumns = TQStringList::split ( ",", "return,returninvestment,interestrate" ); // the list of columns which represent dates, so we can display them correctly - QStringList dateColumns = QStringList::split ( ",", "postdate,entrydate,nextduedate,openingdate,nextinterestchange" ); + TQStringList dateColumns = TQStringList::split ( ",", "postdate,entrydate,nextduedate,openingdate,nextinterestchange" ); result += "<table class=\"report\">\n<thead><tr class=\"itemheader\">"; - QStringList::const_iterator it_column = columns.begin(); + TQStringList::const_iterator it_column = columns.begin(); while ( it_column != columns.end() ) { - QString i18nName = i18nHeaders[*it_column]; + TQString i18nName = i18nHeaders[*it_column]; if ( i18nName.isEmpty() ) i18nName = *it_column; result += "<th>" + i18nName + "</th>"; @@ -286,8 +286,8 @@ namespace reports { // header. The group iterator keeps track of a subtotal also. int depth = 1; - QValueList<GroupIterator> groupIteratorList; - QStringList::const_iterator it_grouplevel = groups.begin(); + TQValueList<GroupIterator> groupIteratorList; + TQStringList::const_iterator it_grouplevel = groups.begin(); while ( it_grouplevel != groups.end() ) { groupIteratorList += GroupIterator ( ( *it_grouplevel ), m_subtotal, depth++ ); @@ -302,7 +302,7 @@ namespace reports { // ***DV*** MyMoneyMoney startingBalance; - for ( QValueList<TableRow>::const_iterator it_row = m_rows.begin(); + for ( TQValueList<TableRow>::const_iterator it_row = m_rows.begin(); it_row != m_rows.end(); ++it_row ) { @@ -310,7 +310,7 @@ namespace reports { // this could be overridden using the "fraction" element of a row for each row. // Currently (2008-02-21) this override is not used at all (ipwizard) int fraction = file->baseCurrency().smallestAccountFraction(); - if ( ( *it_row ).find ( "fraction" ) != ( *it_row ).end() ) + if ( ( *it_row ).tqfind ( "fraction" ) != ( *it_row ).end() ) fraction = ( *it_row ) ["fraction"].toInt(); // @@ -328,7 +328,7 @@ namespace reports { // then we need to force all the downstream groups to get one too. // Update the group iterators with the current row value - QValueList<GroupIterator>::iterator it_group = groupIteratorList.begin(); + TQValueList<GroupIterator>::iterator it_group = groupIteratorList.begin(); while ( it_group != groupIteratorList.end() ) { ( *it_group ).update ( *it_row ); @@ -347,17 +347,17 @@ namespace reports { grandtotal += ( *it_group ).subtotal(); grandtotal = grandtotal.convert(fraction); - QString subtotal_html = ( *it_group ).subtotal().formatMoney ( fraction ); - QString subtotal_csv = ( *it_group ).subtotal().formatMoney ( fraction, false ); + TQString subtotal_html = ( *it_group ).subtotal().formatMoney ( fraction ); + TQString subtotal_csv = ( *it_group ).subtotal().formatMoney ( fraction, false ); // ***DV*** HACK fix the side-effiect from .force() method above - QString oldName = QString ( ( *it_group ).oldName() ).stripWhiteSpace(); + TQString oldName = TQString ( ( *it_group ).oldName() ).stripWhiteSpace(); result += "<tr class=\"sectionfooter\">" - "<td class=\"left" + QString::number ( ( ( *it_group ).depth() - 1 ) ) + "\" " + "<td class=\"left" + TQString::number ( ( ( *it_group ).depth() - 1 ) ) + "\" " "colspan=\"" + - QString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + + TQString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + i18n ( "Total" ) + " " + oldName + "</td>" "<td>" + subtotal_html + "</td></tr>\n"; @@ -376,8 +376,8 @@ namespace reports { { row_odd = true; result += "<tr class=\"sectionheader\">" - "<td class=\"left" + QString::number ( ( ( *it_group ).depth() - 1 ) ) + "\" " - "colspan=\"" + QString::number ( columns.count() ) + "\">" + + "<td class=\"left" + TQString::number ( ( ( *it_group ).depth() - 1 ) ) + "\" " + "colspan=\"" + TQString::number ( columns.count() ) + "\">" + ( *it_group ).name() + "</td></tr>\n"; csv += "\"" + ( *it_group ).name() + "\"\n"; } @@ -390,7 +390,7 @@ namespace reports { // skip the opening and closing balance row, // if the balance column is not shown - if ( ( columns.contains ( "balance" ) == 0 ) && ( ( *it_row ) ["rank"] == "-2" ) ) + if ( ( columns.tqcontains ( "balance" ) == 0 ) && ( ( *it_row ) ["rank"] == "-2" ) ) continue; bool need_label = true; @@ -399,17 +399,17 @@ namespace reports { if ( ( * it_row ) ["rank"] == "0" ) row_odd = ! row_odd; if ( ( * it_row ) ["rank"] == "-2" ) - result += QString ( "<tr class=\"item%1\">" ).arg ( ( * it_row ) ["id"] ); + result += TQString ( "<tr class=\"item%1\">" ).arg ( ( * it_row ) ["id"] ); else if ( ( * it_row ) ["rank"] == "1" ) - result += QString ( "<tr class=\"%1\">" ).arg ( row_odd ? "item1" : "item0" ); + result += TQString ( "<tr class=\"%1\">" ).arg ( row_odd ? "item1" : "item0" ); else - result += QString ( "<tr class=\"%1\">" ).arg ( row_odd ? "row-odd " : "row-even" ); + result += TQString ( "<tr class=\"%1\">" ).arg ( row_odd ? "row-odd " : "row-even" ); - QStringList::const_iterator it_column = columns.begin(); + TQStringList::const_iterator it_column = columns.begin(); while ( it_column != columns.end() ) { - QString data = ( *it_row ) [*it_column]; + TQString data = ( *it_row ) [*it_column]; // ***DV*** if ( ( * it_row ) ["rank"] == "1" ) { @@ -468,61 +468,61 @@ namespace reports { // TODO: This and the i18n headings are handled // as a set of parallel vectors. Would be much better to make a single // vector of a properties class. - if ( sharesColumns.contains ( *it_column ) ) + if ( sharesColumns.tqcontains ( *it_column ) ) { if ( data.isEmpty() ) { - result += QString ( "<td></td>" ); + result += TQString ( "<td></td>" ); csv += "\"\","; } else { - result += QString ( "<td>%1</td>" ).arg ( MyMoneyMoney ( data ).formatMoney ( "", 3 ) ); + result += TQString ( "<td>%1</td>" ).arg ( MyMoneyMoney ( data ).formatMoney ( "", 3 ) ); csv += "\"" + MyMoneyMoney ( data ).formatMoney ( "", 3, false ) + "\","; } } - else if ( moneyColumns.contains ( *it_column ) ) + else if ( moneyColumns.tqcontains ( *it_column ) ) { if ( data.isEmpty() ) { - result += QString ( "<td%1></td>" ) + result += TQString ( "<td%1></td>" ) .arg ( ( *it_column == "value" ) ? " class=\"value\"" : "" ); csv += "\"\","; } else if ( MyMoneyMoney( data ) == MyMoneyMoney::autoCalc ) { - result += QString ( "<td%1>%2</td>" ) + result += TQString ( "<td%1>%2</td>" ) .arg ( ( *it_column == "value" ) ? " class=\"value\"" : "" ) .arg (i18n("Calculated")); csv += "\""+ i18n("Calculated") +"\","; } else if ( *it_column == "price" ) { - result += QString ( "<td>%2</td>" ) + result += TQString ( "<td>%2</td>" ) .arg ( MyMoneyMoney ( data ).formatMoney ( MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision()) ) ); csv += "\"" + ( *it_row ) ["currency"] + " " + MyMoneyMoney ( data ).formatMoney ( MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision()), false ) + "\","; } else { - result += QString ( "<td%1>%2 %3</td>" ) + result += TQString ( "<td%1>%2 %3</td>" ) .arg ( ( *it_column == "value" ) ? " class=\"value\"" : "" ) .arg ( ( *it_row ) ["currency"] ) .arg ( MyMoneyMoney ( data ).formatMoney ( fraction ) ); csv += "\"" + ( *it_row ) ["currency"] + " " + MyMoneyMoney ( data ).formatMoney ( fraction, false ) + "\","; } } - else if ( percentColumns.contains ( *it_column ) ) + else if ( percentColumns.tqcontains ( *it_column ) ) { data = ( MyMoneyMoney ( data ) * MyMoneyMoney ( 100, 1 ) ).formatMoney ( fraction ); - result += QString ( "<td>%1%</td>" ).arg ( data ); + result += TQString ( "<td>%1%</td>" ).arg ( data ); csv += data + "%,"; } - else if ( dateColumns.contains ( *it_column ) ) + else if ( dateColumns.tqcontains ( *it_column ) ) { // do this before we possibly change data csv += "\"" + data + "\","; // if we have a locale() then use its date formatter if ( KGlobal::locale() && ! data.isEmpty() ) { - QDate qd = QDate::fromString ( data, Qt::ISODate ); + TQDate qd = TQDate::fromString ( data, Qt::ISODate ); data = KGlobal::locale()->formatDate ( qd, true ); } - result += QString ( "<td class=\"left\">%1</td>" ).arg ( data ); + result += TQString ( "<td class=\"left\">%1</td>" ).arg ( data ); } else { - result += QString ( "<td class=\"left\">%1</td>" ).arg ( data ); + result += TQString ( "<td class=\"left\">%1</td>" ).arg ( data ); csv += "\"" + data + "\","; } ++it_column; @@ -541,7 +541,7 @@ namespace reports { if ( m_config.isConvertCurrency() ) { int fraction = file->baseCurrency().smallestAccountFraction(); - QValueList<GroupIterator>::iterator it_group = groupIteratorList.fromLast(); + TQValueList<GroupIterator>::iterator it_group = groupIteratorList.fromLast(); while ( it_group != groupIteratorList.end() ) { ( *it_group ).update ( TableRow() ); @@ -552,12 +552,12 @@ namespace reports { } - QString subtotal_html = ( *it_group ).subtotal().formatMoney ( fraction ); - QString subtotal_csv = ( *it_group ).subtotal().formatMoney ( fraction, false ); + TQString subtotal_html = ( *it_group ).subtotal().formatMoney ( fraction ); + TQString subtotal_csv = ( *it_group ).subtotal().formatMoney ( fraction, false ); result += "<tr class=\"sectionfooter\">" - "<td class=\"left" + QString::number ( ( *it_group ).depth() - 1 ) + "\" " - "colspan=\"" + QString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + + "<td class=\"left" + TQString::number ( ( *it_group ).depth() - 1 ) + "\" " + "colspan=\"" + TQString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + i18n ( "Total" ) + " " + ( *it_group ).oldName() + "</td>" "<td>" + subtotal_html + "</td></tr>\n"; csv += "\"" + i18n ( "Total" ) + " " + ( *it_group ).oldName() + "\",\"" + subtotal_csv + "\"\n"; @@ -568,12 +568,12 @@ namespace reports { // Grand total // - QString grandtotal_html = grandtotal.formatMoney ( fraction ); - QString grandtotal_csv = grandtotal.formatMoney ( fraction, false ); + TQString grandtotal_html = grandtotal.formatMoney ( fraction ); + TQString grandtotal_csv = grandtotal.formatMoney ( fraction, false ); result += "<tr class=\"sectionfooter\">" "<td class=\"left0\" " - "colspan=\"" + QString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + + "colspan=\"" + TQString::number ( columns.count() - 1 - postcolumns.count() ) + "\">" + i18n ( "Grand Total" ) + "</td>" "<td>" + grandtotal_html + "</td></tr>\n"; csv += "\"" + i18n ( "Grand Total" ) + "\",\"" + grandtotal_csv + "\"\n"; @@ -581,29 +581,29 @@ namespace reports { result += "</table>\n"; } - QString ListTable::renderHTML ( void ) const + TQString ListTable::renderHTML ( void ) const { - QString html, csv; + TQString html, csv; render ( html, csv ); return html; } - QString ListTable::renderCSV ( void ) const + TQString ListTable::renderCSV ( void ) const { - QString html, csv; + TQString html, csv; render ( html, csv ); return csv; } - void ListTable::dump ( const QString& file, const QString& context ) const + void ListTable::dump ( const TQString& file, const TQString& context ) const { - QFile g ( file ); + TQFile g ( file ); g.open ( IO_WriteOnly ); if ( ! context.isEmpty() ) - QTextStream ( &g ) << context.arg ( renderHTML() ); + TQTextStream ( &g ) << context.arg ( renderHTML() ); else - QTextStream ( &g ) << renderHTML(); + TQTextStream ( &g ) << renderHTML(); g.close(); } @@ -612,15 +612,15 @@ namespace reports { // if we're not in expert mode, we need to make sure // that all stock accounts for the selected investment // account are also selected - QStringList accountList; + TQStringList accountList; if(m_config.accounts(accountList)) { if(!KMyMoneyGlobalSettings::expertMode()) { - QStringList::const_iterator it_a, it_b; + TQStringList::const_iterator it_a, it_b; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!accountList.contains(*it_b)) { + if(!accountList.tqcontains(*it_b)) { m_config.addAccount(*it_b); } } diff --git a/kmymoney2/reports/listtable.h b/kmymoney2/reports/listtable.h index 5ffa64d..1397a93 100644 --- a/kmymoney2/reports/listtable.h +++ b/kmymoney2/reports/listtable.h @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,10 +54,10 @@ namespace reports { { public: ListTable ( const MyMoneyReport& ); - QString renderHTML ( void ) const; - QString renderCSV ( void ) const; + TQString renderHTML ( void ) const; + TQString renderCSV ( void ) const; void drawChart ( KReportChartView& ) const {} - void dump ( const QString& file, const QString& context = QString() ) const; + void dump ( const TQString& file, const TQString& context = TQString() ) const; void init ( void ); public: @@ -65,10 +65,10 @@ namespace reports { * Contains a single row in the table. * * Each column is a key/value pair, both strings. This class is just - * a QMap with the added ability to specify which columns you'd like to + * a TQMap with the added ability to specify which columns you'd like to * use as a sort key when you qHeapSort a list of these TableRows */ - class TableRow: public QMap<QString, QString> + class TableRow: public TQMap<TQString, TQString> { public: bool operator< ( const TableRow& ) const; @@ -76,15 +76,15 @@ namespace reports { bool operator> ( const TableRow& ) const; bool operator== ( const TableRow& ) const; - static void setSortCriteria ( const QString& _criteria ) { m_sortCriteria = QStringList::split ( ",", _criteria ); } + static void setSortCriteria ( const TQString& _criteria ) { m_sortCriteria = TQStringList::split ( ",", _criteria ); } private: - static QStringList m_sortCriteria; + static TQStringList m_sortCriteria; }; - QValueList<TableRow> rows() {return m_rows;}; + TQValueList<TableRow> rows() {return m_rows;}; protected: - void render ( QString&, QString& ) const; + void render ( TQString&, TQString& ) const; /** * If not in expert mode, include all subaccounts for each selected @@ -92,23 +92,23 @@ namespace reports { */ void includeInvestmentSubAccounts(void); - QValueList<TableRow> m_rows; + TQValueList<TableRow> m_rows; - QString m_group; + TQString m_group; /** * Comma-separated list of columns to place BEFORE the subtotal column */ - QString m_columns; + TQString m_columns; /** * Name of the subtotal column */ - QString m_subtotal; + TQString m_subtotal; /** * Comma-separated list of columns to place AFTER the subtotal column */ - QString m_postcolumns; - QString m_summarize; - QString m_propagate; + TQString m_postcolumns; + TQString m_summarize; + TQString m_propagate; MyMoneyReport m_config; diff --git a/kmymoney2/reports/objectinfotable.cpp b/kmymoney2/reports/objectinfotable.cpp index 649f6c2..37dfecc 100644 --- a/kmymoney2/reports/objectinfotable.cpp +++ b/kmymoney2/reports/objectinfotable.cpp @@ -19,9 +19,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluelist.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqvaluelist.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -105,7 +105,7 @@ void ObjectInfoTable::init ( void ) throw new MYMONEYEXCEPTION ( "ObjectInfoTable::ObjectInfoTable(): unhandled row type" ); } - QString sort = m_group + "," + m_columns + ",id,rank"; + TQString sort = m_group + "," + m_columns + ",id,rank"; switch ( m_config.rowType() ) { case MyMoneyReport::eSchedule: @@ -133,11 +133,11 @@ void ObjectInfoTable::constructScheduleTable ( void ) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySchedule> schedules; + TQValueList<MyMoneySchedule> schedules; schedules = file->scheduleList ( "", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, m_config.fromDate(), m_config.toDate() ); - QValueList<MyMoneySchedule>::const_iterator it_schedule = schedules.begin(); + TQValueList<MyMoneySchedule>::const_iterator it_schedule = schedules.begin(); while ( it_schedule != schedules.end() ) { MyMoneySchedule schedule = *it_schedule; @@ -157,7 +157,7 @@ void ObjectInfoTable::constructScheduleTable ( void ) //convert to base currency if needed MyMoneyMoney xr = MyMoneyMoney(1,1); if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); } // help for sort and render functions @@ -187,8 +187,8 @@ void ObjectInfoTable::constructScheduleTable ( void ) if ( m_config.detailLevel() == MyMoneyReport::eDetailAll ) { //get the information for all splits - QValueList<MyMoneySplit> splits = transaction.splits(); - QValueList<MyMoneySplit>::const_iterator split_it = splits.begin(); + TQValueList<MyMoneySplit> splits = transaction.splits(); + TQValueList<MyMoneySplit>::const_iterator split_it = splits.begin(); for ( ;split_it != splits.end(); split_it++ ) { TableRow splitRow; @@ -235,9 +235,9 @@ void ObjectInfoTable::constructAccountTable ( void ) //make sure we have all subaccounts of investment accounts includeInvestmentSubAccounts(); - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { TableRow accountRow; @@ -274,7 +274,7 @@ void ObjectInfoTable::constructAccountTable ( void ) //convert to base currency if needed if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - MyMoneyMoney xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + MyMoneyMoney xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); value = value * xr; } accountRow["currentbalance"] = value.toString(); @@ -289,9 +289,9 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { TableRow accountRow; @@ -306,7 +306,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) //convert to base currency if needed MyMoneyMoney xr = MyMoneyMoney(1,1); if (m_config.isConvertCurrency() && account.isForeignCurrency()) { - xr = account.baseCurrencyPrice(QDate::currentDate()).reduce(); + xr = account.baseCurrencyPrice(TQDate::tqcurrentDate()).reduce(); } accountRow["rank"] = "0"; @@ -321,7 +321,7 @@ void ObjectInfoTable::constructAccountLoanTable ( void ) accountRow["currencyname"] = (file->currency(account.currencyId())).name(); accountRow["payee"] = file->payee(loan.payee()).name(); accountRow["loanamount"] = (loan.loanAmount() * xr).toString(); - accountRow["interestrate"] = (loan.interestRate(QDate::currentDate())/MyMoneyMoney(100,1)*xr).toString(); + accountRow["interestrate"] = (loan.interestRate(TQDate::tqcurrentDate())/MyMoneyMoney(100,1)*xr).toString(); accountRow["nextinterestchange"] = loan.nextInterestChange().toString( Qt::ISODate ); accountRow["periodicpayment"] = (loan.periodicPayment() * xr).toString(); accountRow["finalpayment"] = (loan.finalPayment() * xr).toString(); @@ -342,7 +342,7 @@ MyMoneyMoney ObjectInfoTable::investmentBalance(const MyMoneyAccount& acc) MyMoneyMoney value; value = file->balance(acc.id()); - QValueList<QString>::const_iterator it_a; + TQValueList<TQString>::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount stock = file->account(*it_a); try { @@ -357,7 +357,7 @@ MyMoneyMoney ObjectInfoTable::investmentBalance(const MyMoneyAccount& acc) val = val.convert(acc.fraction()); value += val; } catch(MyMoneyException* e) { - qWarning("%s", (QString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data()); + qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data()); delete e; } } diff --git a/kmymoney2/reports/objectinfotable.h b/kmymoney2/reports/objectinfotable.h index 0b4ab71..69489df 100644 --- a/kmymoney2/reports/objectinfotable.h +++ b/kmymoney2/reports/objectinfotable.h @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -72,4 +72,4 @@ private: } -#endif // QUERYREPORT_H +#endif // TQUERYREPORT_H diff --git a/kmymoney2/reports/pivotgrid.cpp b/kmymoney2/reports/pivotgrid.cpp index 9cdf9b3..6a3f773 100644 --- a/kmymoney2/reports/pivotgrid.cpp +++ b/kmymoney2/reports/pivotgrid.cpp @@ -18,16 +18,16 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qdatetime.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qclipboard.h> -#include <qapplication.h> -#include <qprinter.h> -#include <qpainter.h> -#include <qfile.h> -#include <qdom.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqclipboard.h> +#include <tqapplication.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqfile.h> +#include <tqdom.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -93,12 +93,12 @@ PivotCell PivotCell::stockSplit(const MyMoneyMoney& factor) return s; } -const QString PivotCell::formatMoney(int fraction, bool showThousandSeparator) const +const TQString PivotCell::formatMoney(int fraction, bool showThousandSeparator) const { return formatMoney("", MyMoneyMoney::denomToPrec(fraction), showThousandSeparator); } -const QString PivotCell::formatMoney(const QString& currency, const int prec, bool showThousandSeparator) const +const TQString PivotCell::formatMoney(const TQString& currency, const int prec, bool showThousandSeparator) const { // construct the result MyMoneyMoney res = (*this * m_stockSplit) + m_postSplit; @@ -132,7 +132,7 @@ PivotGridRowSet::PivotGridRowSet( unsigned _numcolumns ) insert(ePrice, PivotGridRow(_numcolumns)); } -PivotGridRowSet PivotGrid::rowSet(QString id) +PivotGridRowSet PivotGrid::rowSet(TQString id) { //go through the data and get the row that matches the id diff --git a/kmymoney2/reports/pivotgrid.h b/kmymoney2/reports/pivotgrid.h index ca7f5ab..c067c27 100644 --- a/kmymoney2/reports/pivotgrid.h +++ b/kmymoney2/reports/pivotgrid.h @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,7 +45,7 @@ namespace reports { * * A 'Row Pair' is two rows of money values. Each column is the SAME month. One row is the * 'actual' values for the period, the other row is the 'budgetted' values for the same - * period. For ease of implementation, a Row Pair is implemented as a Row which contains + * period. For ease of implementation, a Row Pair is implemented as a Row which tqcontains * another Row. The inherited Row is the 'actual', the contained row is the 'Budget'. * * An 'Inner Group' contains a rows for each subordinate account within a single top-level @@ -69,8 +69,8 @@ namespace reports { static PivotCell stockSplit(const MyMoneyMoney& factor); PivotCell operator += (const PivotCell& right); PivotCell operator += (const MyMoneyMoney& value); - const QString formatMoney(int fraction, bool showThousandSeparator = true) const; - const QString formatMoney(const QString& currency, const int prec, bool showThousandSeparator = true) const; + const TQString formatMoney(int fraction, bool showThousandSeparator = true) const; + const TQString formatMoney(const TQString& currency, const int prec, bool showThousandSeparator = true) const; MyMoneyMoney calculateRunningSum(const MyMoneyMoney& runningSum); MyMoneyMoney cellBalance(const MyMoneyMoney& _balance); bool isUsed(void) const { return m_cellUsed; } @@ -79,7 +79,7 @@ namespace reports { MyMoneyMoney m_postSplit; bool m_cellUsed; }; - class PivotGridRow: public QValueList<PivotCell> + class PivotGridRow: public TQValueList<PivotCell> { public: @@ -91,13 +91,13 @@ namespace reports { MyMoneyMoney m_total; }; - class PivotGridRowSet: public QMap<ERowType, PivotGridRow> + class PivotGridRowSet: public TQMap<ERowType, PivotGridRow> { public: PivotGridRowSet( unsigned _numcolumns = 0 ); }; - class PivotInnerGroup: public QMap<ReportAccount,PivotGridRowSet> + class PivotInnerGroup: public TQMap<ReportAccount,PivotGridRowSet> { public: PivotInnerGroup( unsigned _numcolumns = 0 ): m_total(_numcolumns) {} @@ -105,7 +105,7 @@ namespace reports { PivotGridRowSet m_total; }; - class PivotOuterGroup: public QMap<QString,PivotInnerGroup> + class PivotOuterGroup: public TQMap<TQString,PivotInnerGroup> { public: PivotOuterGroup( unsigned _numcolumns = 0, unsigned _sort=m_kDefaultSortOrder, bool _inverted=false): m_total(_numcolumns), m_inverted(_inverted), m_sortOrder(_sort) {} @@ -127,7 +127,7 @@ namespace reports { // The localized name of the group for display in the report. Outergoups need this // independently, because they will lose their association with the TGrid when the // report is rendered. - QString m_displayName; + TQString m_displayName; // lower numbers sort toward the top of the report. defaults to 100, which is a nice // middle-of-the-road value @@ -136,10 +136,10 @@ namespace reports { // default sort order static const unsigned m_kDefaultSortOrder; }; - class PivotGrid: public QMap<QString,PivotOuterGroup> + class PivotGrid: public TQMap<TQString,PivotOuterGroup> { public: - PivotGridRowSet rowSet (QString id); + PivotGridRowSet rowSet (TQString id); PivotGridRowSet m_total; }; diff --git a/kmymoney2/reports/pivotgridtest.cpp b/kmymoney2/reports/pivotgridtest.cpp index 397491d..431ef0f 100644 --- a/kmymoney2/reports/pivotgridtest.cpp +++ b/kmymoney2/reports/pivotgridtest.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ /* -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qdom.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kdeversion.h> @@ -62,7 +62,7 @@ void PivotGridTest::setUp () MyMoneyFileTransaction ft; file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$")); file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$")); - file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1)); + file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1)); file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#")); file->setBaseCurrency(file->currency("USD")); @@ -75,16 +75,16 @@ void PivotGridTest::setUp () acLiability = (MyMoneyFile::instance()->liability().id()); acExpense = (MyMoneyFile::instance()->expense().id()); acIncome = (MyMoneyFile::instance()->income().id()); - acChecking = makeAccount(QString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,QDate(2004,5,15),acAsset); - acCredit = makeAccount(QString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,QDate(2004,7,15),acLiability); - acSolo = makeAccount(QString("Solo"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acParent = makeAccount(QString("Parent"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acChild = makeAccount(QString("Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acForeign = makeAccount(QString("Foreign"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - - acSecondChild = makeAccount(QString("Second Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acGrandChild1 = makeAccount(QString("Grand Child 1"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild); - acGrandChild2 = makeAccount(QString("Grand Child 2"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild); + acChecking = makeAccount(TQString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,TQDate(2004,5,15),acAsset); + acCredit = makeAccount(TQString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,TQDate(2004,7,15),acLiability); + acSolo = makeAccount(TQString("Solo"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acParent = makeAccount(TQString("Parent"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acChild = makeAccount(TQString("Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acForeign = makeAccount(TQString("Foreign"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + + acSecondChild = makeAccount(TQString("Second Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acGrandChild1 = makeAccount(TQString("Grand Child 1"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild); + acGrandChild2 = makeAccount(TQString("Grand Child 2"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild); MyMoneyInstitution i("Bank of the World","","","","","",""); file->addInstitution(i); diff --git a/kmymoney2/reports/pivottable.cpp b/kmymoney2/reports/pivottable.cpp index c12ca57..2f51a9c 100644 --- a/kmymoney2/reports/pivottable.cpp +++ b/kmymoney2/reports/pivottable.cpp @@ -19,16 +19,16 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qdatetime.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qclipboard.h> -#include <qapplication.h> -#include <qprinter.h> -#include <qpainter.h> -#include <qfile.h> -#include <qdom.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqclipboard.h> +#include <tqapplication.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqfile.h> +#include <tqdom.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,11 +61,11 @@ namespace reports { -QString Debug::m_sTabs; +TQString Debug::m_sTabs; bool Debug::m_sEnabled = DEBUG_ENABLED_BY_DEFAULT; -QString Debug::m_sEnableKey; +TQString Debug::m_sEnableKey; -Debug::Debug( const QString& _name ): m_methodName( _name ), m_enabled( m_sEnabled ) +Debug::Debug( const TQString& _name ): m_methodName( _name ), m_enabled( m_sEnabled ) { if (!m_enabled && _name == m_sEnableKey) m_enabled = true; @@ -89,7 +89,7 @@ Debug::~Debug() } } -void Debug::output( const QString& _text ) +void Debug::output( const TQString& _text ) { if ( m_enabled ) qDebug( "%s%s(): %s", m_sTabs.latin1(), m_methodName.latin1(), _text.latin1() ); @@ -131,8 +131,8 @@ void PivotTable::init(void) { // strip out the 'days' component of the begin and end dates. // we're only using these variables to contain year and month. - m_beginDate = QDate( m_beginDate.year(), m_beginDate.month(), 1 ); - m_endDate = QDate( m_endDate.year(), m_endDate.month(), 1 ); + m_beginDate = TQDate( m_beginDate.year(), m_beginDate.month(), 1 ); + m_endDate = TQDate( m_endDate.year(), m_endDate.month(), 1 ); } m_numColumns = columnValue(m_endDate) - columnValue(m_beginDate) + 2; @@ -184,7 +184,7 @@ void PivotTable::init(void) // Populate all transactions into the row/column pivot grid // - QValueList<MyMoneyTransaction> transactions; + TQValueList<MyMoneyTransaction> transactions; m_config_f.setReportAllSplits(false); m_config_f.setConsiderCategory(true); try { @@ -193,7 +193,7 @@ void PivotTable::init(void) qDebug("ERR: %s thrown in %s(%ld)", e->what().data(), e->file().data(), e->line()); throw e; } - DEBUG_OUTPUT(QString("Found %1 matching transactions").arg(transactions.count())); + DEBUG_OUTPUT(TQString("Found %1 matching transactions").tqarg(transactions.count())); // Include scheduled transactions if required @@ -202,14 +202,14 @@ void PivotTable::init(void) // Create a custom version of the report filter, excluding date // We'll use this to compare the transaction against MyMoneyTransactionFilter schedulefilter(m_config_f); - schedulefilter.setDateFilter(QDate(),QDate()); + schedulefilter.setDateFilter(TQDate(),TQDate()); // Get the real dates from the config filter - QDate configbegin, configend; + TQDate configbegin, configend; m_config_f.validDateRange(configbegin, configend); - QValueList<MyMoneySchedule> schedules = file->scheduleList(); - QValueList<MyMoneySchedule>::const_iterator it_schedule = schedules.begin(); + TQValueList<MyMoneySchedule> schedules = file->scheduleList(); + TQValueList<MyMoneySchedule>::const_iterator it_schedule = schedules.begin(); while ( it_schedule != schedules.end() ) { // If the transaction meets the filter @@ -221,17 +221,17 @@ void PivotTable::init(void) tx.setValue("kmm-schedule-id", (*it_schedule).id()); // Get the dates when a payment will be made within the report window - QDate nextpayment = (*it_schedule).adjustedNextPayment(configbegin); + TQDate nextpayment = (*it_schedule).adjustedNextPayment(configbegin); if ( nextpayment.isValid() ) { // Add one transaction for each date - QValueList<QDate> paymentDates = (*it_schedule).paymentDates(nextpayment,configend); - QValueList<QDate>::const_iterator it_date = paymentDates.begin(); + TQValueList<TQDate> paymentDates = (*it_schedule).paymentDates(nextpayment,configend); + TQValueList<TQDate>::const_iterator it_date = paymentDates.begin(); while ( it_date != paymentDates.end() ) { //if the payment occurs in the past, enter it tomorrow - if(QDate::currentDate() >= *it_date) { - tx.setPostDate(QDate::currentDate().addDays(1)); + if(TQDate::tqcurrentDate() >= *it_date) { + tx.setPostDate(TQDate::tqcurrentDate().addDays(1)); } else { tx.setPostDate(*it_date); } @@ -240,7 +240,7 @@ void PivotTable::init(void) transactions += tx; } - DEBUG_OUTPUT(QString("Added transaction for schedule %1 on %2").arg((*it_schedule).id()).arg((*it_date).toString())); + DEBUG_OUTPUT(TQString("Added transaction for schedule %1 on %2").tqarg((*it_schedule).id()).tqarg((*it_date).toString())); ++it_date; } @@ -256,13 +256,13 @@ void PivotTable::init(void) bool al_transfers = ( m_config_f.rowType() == MyMoneyReport::eExpenseIncome ) && ( m_config_f.isIncludingTransfers() ); //this is to store balance for loan accounts when not included in the report - QMap<QString, MyMoneyMoney> loanBalances; + TQMap<TQString, MyMoneyMoney> loanBalances; - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); unsigned colofs = columnValue(m_beginDate) - 1; while ( it_transaction != transactions.end() ) { - QDate postdate = (*it_transaction).postDate(); + TQDate postdate = (*it_transaction).postDate(); unsigned column = columnValue(postdate) - colofs; MyMoneyTransaction tx = (*it_transaction); @@ -275,19 +275,19 @@ void PivotTable::init(void) if(!split.id().isEmpty()) { ReportAccount splitAccount = file->account(split.accountId()); MyMoneyAccount::accountTypeE type = splitAccount.accountGroup(); - QString outergroup = KMyMoneyUtils::accountTypeToString(type); + TQString outergroup = KMyMoneyUtils::accountTypeToString(type); //if the account is included in the report, calculate the balance from the cells if(m_config_f.includes( splitAccount )) { loanBalances[splitAccount.id()] = cellBalance(outergroup, splitAccount, column, false); } else { //if it is not in the report and also not in loanBalances, get the balance from the file - if(!loanBalances.contains(splitAccount.id())) { - QDate dueDate = sched.nextDueDate(); + if(!loanBalances.tqcontains(splitAccount.id())) { + TQDate dueDate = sched.nextDueDate(); //if the payment is overdue, use current date - if(dueDate < QDate::currentDate()) - dueDate = QDate::currentDate(); + if(dueDate < TQDate::tqcurrentDate()) + dueDate = TQDate::tqcurrentDate(); //get the balance from the file for the date loanBalances[splitAccount.id()] = file->balance(splitAccount.id(), dueDate.addDays(-1)); @@ -298,7 +298,7 @@ void PivotTable::init(void) //if the loan split is not included in the report, update the balance for the next occurrence if(!m_config_f.includes( splitAccount )) { - QValueList<MyMoneySplit>::ConstIterator it_loanSplits; + TQValueList<MyMoneySplit>::ConstIterator it_loanSplits; for(it_loanSplits = tx.splits().begin(); it_loanSplits != tx.splits().end(); ++it_loanSplits) { if((*it_loanSplits).isAmortizationSplit() && (*it_loanSplits).accountId() == splitAccount.id() ) loanBalances[splitAccount.id()] = loanBalances[splitAccount.id()] + (*it_loanSplits).shares(); @@ -307,8 +307,8 @@ void PivotTable::init(void) } } - QValueList<MyMoneySplit> splits = tx.splits(); - QValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); + TQValueList<MyMoneySplit> splits = tx.splits(); + TQValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); while ( it_split != splits.end() ) { ReportAccount splitAccount = (*it_split).accountId(); @@ -323,7 +323,7 @@ void PivotTable::init(void) MyMoneyMoney value; // the outer group is the account class (major account type) MyMoneyAccount::accountTypeE type = splitAccount.accountGroup(); - QString outergroup = KMyMoneyUtils::accountTypeToString(type); + TQString outergroup = KMyMoneyUtils::accountTypeToString(type); value = (*it_split).shares(); bool stockSplit = tx.isStockSplit(); @@ -468,7 +468,7 @@ void PivotTable::collapseColumns(void) void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn) { DEBUG_ENTER(__PRETTY_FUNCTION__); - DEBUG_OUTPUT(QString("From Column %1 to %2").arg(sourcecolumn).arg(destcolumn)); + DEBUG_OUTPUT(TQString("From Column %1 to %2").tqarg(sourcecolumn).tqarg(destcolumn)); // iterate over outer groups PivotGrid::iterator it_outergroup = m_grid.begin(); @@ -483,9 +483,9 @@ void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn) while ( it_row != (*it_innergroup).end() ) { if ( (*it_row)[eActual].count() <= sourcecolumn ) - throw new MYMONEYEXCEPTION(QString("Sourcecolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(sourcecolumn).arg((*it_row)[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Sourcecolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(sourcecolumn).tqarg((*it_row)[eActual].count())); if ( (*it_row)[eActual].count() <= destcolumn ) - throw new MYMONEYEXCEPTION(QString("Destcolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(sourcecolumn).arg((*it_row)[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Destcolumn %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(sourcecolumn).tqarg((*it_row)[eActual].count())); (*it_row)[eActual][destcolumn] += (*it_row)[eActual][sourcecolumn]; ++it_row; @@ -500,7 +500,7 @@ void PivotTable::accumulateColumn(unsigned destcolumn, unsigned sourcecolumn) void PivotTable::clearColumn(unsigned column) { DEBUG_ENTER(__PRETTY_FUNCTION__); - DEBUG_OUTPUT(QString("Column %1").arg(column)); + DEBUG_OUTPUT(TQString("Column %1").tqarg(column)); // iterate over outer groups PivotGrid::iterator it_outergroup = m_grid.begin(); @@ -515,7 +515,7 @@ void PivotTable::clearColumn(unsigned column) while ( it_row != (*it_innergroup).end() ) { if ( (*it_row)[eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::accumulateColumn").arg(column).arg((*it_row)[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::accumulateColumn").tqarg(column).tqarg((*it_row)[eActual].count())); (*it_row++)[eActual][column] = PivotCell(); } @@ -540,19 +540,19 @@ void PivotTable::calculateColumnHeadings(void) { if ( columnpitch == 1 ) { - QDate columnDate = m_beginDate; + TQDate columnDate = m_beginDate; unsigned column = 1; while ( column++ < m_numColumns ) { - QString heading = KGlobal::locale()->calendar()->monthName(columnDate.month(), columnDate.year(), true) + " " + QString::number(columnDate.day()); + TQString heading = KGlobal::locale()->calendar()->monthName(columnDate.month(), columnDate.year(), true) + " " + TQString::number(columnDate.day()); columnDate = columnDate.addDays(1); m_columnHeadings.append( heading); } } else { - QDate day = m_beginDate; - QDate prv = m_beginDate; + TQDate day = m_beginDate; + TQDate prv = m_beginDate; // use the user's locale to determine the week's start unsigned dow = (day.dayOfWeek() +8 -KGlobal::locale()->weekStartDay())%7; @@ -561,11 +561,11 @@ void PivotTable::calculateColumnHeadings(void) { if (((dow % columnpitch) == 0) || (day == m_endDate)) { - m_columnHeadings.append(QString("%1 %2 - %3 %4") - .arg(KGlobal::locale()->calendar()->monthName(prv.month(), prv.year(), true)) - .arg(prv.day()) - .arg(KGlobal::locale()->calendar()->monthName(day.month(), day.year(), true)) - .arg(day.day())); + m_columnHeadings.append(TQString("%1 %2 - %3 %4") + .tqarg(KGlobal::locale()->calendar()->monthName(prv.month(), prv.year(), true)) + .tqarg(prv.day()) + .tqarg(KGlobal::locale()->calendar()->monthName(day.month(), day.year(), true)) + .tqarg(day.day())); prv = day.addDays(1); } day = day.addDays(1); @@ -582,7 +582,7 @@ void PivotTable::calculateColumnHeadings(void) unsigned year = m_beginDate.year(); unsigned column = 1; while ( column++ < m_numColumns ) - m_columnHeadings.append(QString::number(year++)); + m_columnHeadings.append(TQString::number(year++)); } else { @@ -592,11 +592,11 @@ void PivotTable::calculateColumnHeadings(void) unsigned column = 1; while ( column++ < m_numColumns ) { - QString heading = KGlobal::locale()->calendar()->monthName(1+segment*columnpitch, 2000, true); + TQString heading = KGlobal::locale()->calendar()->monthName(1+segment*columnpitch, 2000, true); if ( columnpitch != 1 ) heading += "-" + KGlobal::locale()->calendar()->monthName((1+segment)*columnpitch, 2000, true); if ( includeyear ) - heading += " " + QString::number(year); + heading += " " + TQString::number(year); m_columnHeadings.append( heading); if ( ++segment >= 12/columnpitch ) { @@ -613,10 +613,10 @@ void PivotTable::createAccountRows(void) DEBUG_ENTER(__PRETTY_FUNCTION__); MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { @@ -626,10 +626,10 @@ void PivotTable::createAccountRows(void) // and if the report includes this account if ( m_config_f.includes( *it_account ) ) { - DEBUG_OUTPUT(QString("Includes account %1").arg(account.name())); + DEBUG_OUTPUT(TQString("Includes account %1").tqarg(account.name())); // the row group is the account class (major account type) - QString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup()); + TQString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup()); // place into the 'opening' column... assignCell( outergroup, account, 0, MyMoneyMoney() ); } @@ -644,8 +644,8 @@ void PivotTable::calculateOpeningBalances( void ) // First, determine the inclusive dates of the report. Normally, that's just // the begin & end dates of m_config_f. However, if either of those dates are // blank, we need to use m_beginDate and/or m_endDate instead. - QDate from = m_config_f.fromDate(); - QDate to = m_config_f.toDate(); + TQDate from = m_config_f.fromDate(); + TQDate to = m_config_f.toDate(); if ( ! from.isValid() ) from = m_beginDate; if ( ! to.isValid() ) @@ -653,10 +653,10 @@ void PivotTable::calculateOpeningBalances( void ) MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { @@ -674,18 +674,18 @@ void PivotTable::calculateOpeningBalances( void ) filter.addAccount(account.id()); filter.setDateFilter(m_beginDate, m_endDate); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); //if a closed account has no transactions in that timeframe, do not include it if(transactions.size() == 0 ) { - DEBUG_OUTPUT(QString("DOES NOT INCLUDE account %1").arg(account.name())); + DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").tqarg(account.name())); ++it_account; continue; } } - DEBUG_OUTPUT(QString("Includes account %1").arg(account.name())); + DEBUG_OUTPUT(TQString("Includes account %1").tqarg(account.name())); // the row group is the account class (major account type) - QString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup()); + TQString outergroup = KMyMoneyUtils::accountTypeToString(account.accountGroup()); // extract the balance of the account for the given begin date, which is // the opening balance plus the sum of all transactions prior to the begin @@ -699,7 +699,7 @@ void PivotTable::calculateOpeningBalances( void ) } else { - DEBUG_OUTPUT(QString("DOES NOT INCLUDE account %1").arg(account.name())); + DEBUG_OUTPUT(TQString("DOES NOT INCLUDE account %1").tqarg(account.name())); } ++it_account; @@ -713,7 +713,7 @@ void PivotTable::calculateRunningSums( PivotInnerGroup::iterator& it_row) while ( column < m_numColumns ) { if ( it_row.data()[eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").arg(column).arg(it_row.data()[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").tqarg(column).tqarg(it_row.data()[eActual].count())); runningsum = it_row.data()[eActual][column].calculateRunningSum(runningsum); @@ -742,7 +742,7 @@ void PivotTable::calculateRunningSums( void ) while ( column < m_numColumns ) { if ( it_row.data()[eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").arg(column).arg(it_row.data()[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateRunningSums").tqarg(column).tqarg(it_row.data()[eActual].count())); runningsum = ( it_row.data()[eActual][column] += runningsum ); @@ -758,11 +758,11 @@ void PivotTable::calculateRunningSums( void ) } } -MyMoneyMoney PivotTable::cellBalance(const QString& outergroup, const ReportAccount& _row, unsigned _column, bool budget) +MyMoneyMoney PivotTable::cellBalance(const TQString& outergroup, const ReportAccount& _row, unsigned _column, bool budget) { if(m_runningSumsCalculated) { qDebug("You must not call PivotTable::cellBalance() after calling PivotTable::calculateRunningSums()"); - throw new MYMONEYEXCEPTION(QString("You must not call PivotTable::cellBalance() after calling PivotTable::calculateRunningSums()")); + throw new MYMONEYEXCEPTION(TQString("You must not call PivotTable::cellBalance() after calling PivotTable::calculateRunningSums()")); } // for budget reports, if this is the actual value, map it to the account which @@ -770,7 +770,7 @@ MyMoneyMoney PivotTable::cellBalance(const QString& outergroup, const ReportAcco ReportAccount row = _row; if ( !budget && m_config_f.hasBudget() ) { - QString newrow = m_budgetMap[row.id()]; + TQString newrow = m_budgetMap[row.id()]; // if there was no mapping found, then the budget report is not interested // in this account. @@ -780,16 +780,16 @@ MyMoneyMoney PivotTable::cellBalance(const QString& outergroup, const ReportAcco row = newrow; } - // ensure the row already exists (and its parental hierarchy) + // ensure the row already exists (and its tqparental hierarchy) createRow( outergroup, row, true ); - // Determine the inner group from the top-most parent account - QString innergroup( row.topParentName() ); + // Determine the inner group from the top-most tqparent account + TQString innergroup( row.topParentName() ); if ( m_numColumns <= _column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of m_numColumns range (%2) in PivotTable::cellBalance").arg(_column).arg(m_numColumns)); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::cellBalance").tqarg(_column).tqarg(m_numColumns)); if ( m_grid[outergroup][innergroup][row][eActual].count() <= _column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::cellBalance").arg(_column).arg(m_grid[outergroup][innergroup][row][eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").tqarg(_column).tqarg(m_grid[outergroup][innergroup][row][eActual].count())); MyMoneyMoney balance; if ( budget ) @@ -801,7 +801,7 @@ MyMoneyMoney PivotTable::cellBalance(const QString& outergroup, const ReportAcco while ( column < _column) { if ( m_grid[outergroup][innergroup][row][eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::cellBalance").arg(column).arg(m_grid[outergroup][innergroup][row][eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::cellBalance").tqarg(column).tqarg(m_grid[outergroup][innergroup][row][eActual].count())); balance = m_grid[outergroup][innergroup][row][eActual][column].cellBalance(balance); @@ -827,11 +827,11 @@ void PivotTable::calculateBudgetMapping( void ) MyMoneyBudget budget = MyMoneyBudget(); //if no budget has been selected if (m_config_f.budget() == "Any" ) { - QValueList<MyMoneyBudget> budgets = file->budgetList(); - QValueList<MyMoneyBudget>::const_iterator budgets_it = budgets.begin(); + TQValueList<MyMoneyBudget> budgets = file->budgetList(); + TQValueList<MyMoneyBudget>::const_iterator budgets_it = budgets.begin(); while( budgets_it != budgets.end() ) { //pick the first budget that matches the report start year - if( (*budgets_it).budgetStart().year() == QDate::currentDate().year() ) { + if( (*budgets_it).budgetStart().year() == TQDate::tqcurrentDate().year() ) { budget = file->budget( (*budgets_it).id()); break; } @@ -852,24 +852,24 @@ void PivotTable::calculateBudgetMapping( void ) //kdDebug(2) << "Budget " << budget.name() << ": " << endl; // Go through all accounts in the system to build the mapping - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { //include only the accounts selected for the report if ( m_config_f.includes ( *it_account ) ) { - QString id = ( *it_account ).id(); - QString acid = id; + TQString id = ( *it_account ).id(); + TQString acid = id; // If the budget contains this account outright - if ( budget.contains ( id ) ) + if ( budget.tqcontains ( id ) ) { // Add it to the mapping m_budgetMap[acid] = id; // kdDebug(2) << ReportAccount(acid).debugName() << " self-maps / type =" << budget.account(id).budgetLevel() << endl; } - // Otherwise, search for a parent account which includes sub-accounts + // Otherwise, search for a tqparent account which includes sub-accounts else { //if includeBudgetActuals, include all accounts regardless of whether in budget or not @@ -879,8 +879,8 @@ void PivotTable::calculateBudgetMapping( void ) } do { - id = file->account ( id ).parentAccountId(); - if ( budget.contains ( id ) ) + id = file->account ( id ).tqparentAccountId(); + if ( budget.tqcontains ( id ) ) { if ( budget.account ( id ).budgetSubaccounts() ) { @@ -897,8 +897,8 @@ void PivotTable::calculateBudgetMapping( void ) } // end while looping through the accounts in the file // Place the budget values into the budget grid - QValueList<MyMoneyBudget::AccountGroup> baccounts = budget.getaccounts(); - QValueList<MyMoneyBudget::AccountGroup>::const_iterator it_bacc = baccounts.begin(); + TQValueList<MyMoneyBudget::AccountGroup> baccounts = budget.getaccounts(); + TQValueList<MyMoneyBudget::AccountGroup>::const_iterator it_bacc = baccounts.begin(); while ( it_bacc != baccounts.end() ) { ReportAccount splitAccount = (*it_bacc).id(); @@ -906,12 +906,12 @@ void PivotTable::calculateBudgetMapping( void ) //include the budget account only if it is included in the report if ( m_config_f.includes ( splitAccount ) ) { MyMoneyAccount::accountTypeE type = splitAccount.accountGroup(); - QString outergroup = KMyMoneyUtils::accountTypeToString(type); + TQString outergroup = KMyMoneyUtils::accountTypeToString(type); // reverse sign to match common notation for cash flow direction, only for expense/income splits MyMoneyMoney reverse((splitAccount.accountType() == MyMoneyAccount::Expense) ? -1 : 1, 1); - const QMap<QDate, MyMoneyBudget::PeriodGroup>& periods = (*it_bacc).getPeriods(); + const TQMap<TQDate, MyMoneyBudget::PeriodGroup>& periods = (*it_bacc).getPeriods(); MyMoneyMoney value = (*periods.begin()).amount() * reverse; MyMoneyMoney price = MyMoneyMoney(1,1); unsigned column = 1; @@ -933,7 +933,7 @@ void PivotTable::calculateBudgetMapping( void ) || m_config_f.columnType() == MyMoneyReport::eQuarters) { //value = value * MyMoneyMoney(m_config_f.columnType(), 1); - QDate budgetDate = budget.budgetStart(); + TQDate budgetDate = budget.budgetStart(); while ( column < m_numColumns && budget.budgetStart().addYears(1) > budgetDate ) { //only show budget values if the budget year and the column date match //no currency conversion is done here because that is done for all columns later @@ -954,7 +954,7 @@ void PivotTable::calculateBudgetMapping( void ) // place each value in the appropriate column // budget periods are supposed to come in order just like columns { - QMap<QDate, MyMoneyBudget::PeriodGroup>::const_iterator it_period = periods.begin(); + TQMap<TQDate, MyMoneyBudget::PeriodGroup>::const_iterator it_period = periods.begin(); while ( it_period != periods.end() && column < m_numColumns) { if((*it_period).startDate() > columnDate(column) ) { @@ -1009,9 +1009,9 @@ void PivotTable::convertToBaseCurrency( void ) while ( column < m_numColumns ) { if ( it_row.data()[eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::convertToBaseCurrency").arg(column).arg(it_row.data()[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToBaseCurrency").tqarg(column).tqarg(it_row.data()[eActual].count())); - QDate valuedate = columnDate(column); + TQDate valuedate = columnDate(column); //get base price for that date MyMoneyMoney conversionfactor = it_row.key().baseCurrencyPrice(valuedate); @@ -1025,7 +1025,7 @@ void PivotTable::convertToBaseCurrency( void ) //convert to lowest fraction it_row.data()[ m_rowTypeList[i] ][column] = PivotCell(value.convert(fraction)); - DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,QString("Factor of %1, value was %2, now %3").arg(conversionfactor).arg(DEBUG_SENSITIVE(oldval)).arg(DEBUG_SENSITIVE(it_row.data()[m_rowTypeList[i]][column].toDouble()))); + DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").tqarg(conversionfactor).tqarg(DEBUG_SENSITIVE(oldval)).tqarg(DEBUG_SENSITIVE(it_row.data()[m_rowTypeList[i]][column].toDouble()))); } } @@ -1058,9 +1058,9 @@ void PivotTable::convertToDeepCurrency( void ) while ( column < m_numColumns ) { if ( it_row.data()[eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::convertToDeepCurrency").arg(column).arg(it_row.data()[eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::convertToDeepCurrency").tqarg(column).tqarg(it_row.data()[eActual].count())); - QDate valuedate = columnDate(column); + TQDate valuedate = columnDate(column); //get conversion factor for the account and date MyMoneyMoney conversionfactor = it_row.key().deepCurrencyPrice(valuedate); @@ -1085,7 +1085,7 @@ void PivotTable::convertToDeepCurrency( void ) it_row.data()[ePrice][column] = PivotCell(priceValue.convert(10000)); } - DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,QString("Factor of %1, value was %2, now %3").arg(conversionfactor).arg(DEBUG_SENSITIVE(oldval)).arg(DEBUG_SENSITIVE(it_row.data()[eActual][column].toDouble()))); + DEBUG_OUTPUT_IF(conversionfactor != MyMoneyMoney(1,1) ,TQString("Factor of %1, value was %2, now %3").tqarg(conversionfactor).tqarg(DEBUG_SENSITIVE(oldval)).tqarg(DEBUG_SENSITIVE(it_row.data()[eActual][column].toDouble()))); ++column; } @@ -1139,9 +1139,9 @@ void PivotTable::calculateTotals( void ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { if ( it_row.data()[ m_rowTypeList[i] ].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, row columns").arg(column).arg(it_row.data()[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, row columns").tqarg(column).tqarg(it_row.data()[ m_rowTypeList[i] ].count())); if ( (*it_innergroup).m_total[ m_rowTypeList[i] ].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); //calculate total MyMoneyMoney value = it_row.data()[ m_rowTypeList[i] ][column]; @@ -1162,9 +1162,9 @@ void PivotTable::calculateTotals( void ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { if ( (*it_innergroup).m_total[ m_rowTypeList[i] ].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, inner group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); if ( (*it_outergroup).m_total[ m_rowTypeList[i] ].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, outer group totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, outer group totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); //calculate totals MyMoneyMoney value = (*it_innergroup).m_total[ m_rowTypeList[i] ][column]; @@ -1187,7 +1187,7 @@ void PivotTable::calculateTotals( void ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { if ( m_grid.m_total[ m_rowTypeList[i] ].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").arg(column).arg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").tqarg(column).tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].count())); //calculate actual totals MyMoneyMoney value = (*it_outergroup).m_total[ m_rowTypeList[i] ][column]; @@ -1215,7 +1215,7 @@ void PivotTable::calculateTotals( void ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { if ( m_grid.m_total[ m_rowTypeList[i] ].count() <= totalcolumn ) - throw new MYMONEYEXCEPTION(QString("Total column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").arg(totalcolumn).arg(m_grid.m_total[ m_rowTypeList[i] ].count())); + throw new MYMONEYEXCEPTION(TQString("Total column %1 out of grid range (%2) in PivotTable::calculateTotals, grid totals").tqarg(totalcolumn).tqarg(m_grid.m_total[ m_rowTypeList[i] ].count())); //calculate actual totals MyMoneyMoney value = m_grid.m_total[ m_rowTypeList[i] ][totalcolumn]; @@ -1225,17 +1225,17 @@ void PivotTable::calculateTotals( void ) } } -void PivotTable::assignCell( const QString& outergroup, const ReportAccount& _row, unsigned column, MyMoneyMoney value, bool budget, bool stockSplit ) +void PivotTable::assignCell( const TQString& outergroup, const ReportAccount& _row, unsigned column, MyMoneyMoney value, bool budget, bool stockSplit ) { DEBUG_ENTER(__PRETTY_FUNCTION__); - DEBUG_OUTPUT(QString("Parameters: %1,%2,%3,%4,%5").arg(outergroup).arg(_row.debugName()).arg(column).arg(DEBUG_SENSITIVE(value.toDouble())).arg(budget)); + DEBUG_OUTPUT(TQString("Parameters: %1,%2,%3,%4,%5").tqarg(outergroup).tqarg(_row.debugName()).tqarg(column).tqarg(DEBUG_SENSITIVE(value.toDouble())).tqarg(budget)); // for budget reports, if this is the actual value, map it to the account which // holds its budget ReportAccount row = _row; if ( !budget && m_config_f.hasBudget() ) { - QString newrow = m_budgetMap[row.id()]; + TQString newrow = m_budgetMap[row.id()]; // if there was no mapping found, then the budget report is not interested // in this account. @@ -1245,16 +1245,16 @@ void PivotTable::assignCell( const QString& outergroup, const ReportAccount& _ro row = newrow; } - // ensure the row already exists (and its parental hierarchy) + // ensure the row already exists (and its tqparental hierarchy) createRow( outergroup, row, true ); - // Determine the inner group from the top-most parent account - QString innergroup( row.topParentName() ); + // Determine the inner group from the top-most tqparent account + TQString innergroup( row.topParentName() ); if ( m_numColumns <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of m_numColumns range (%2) in PivotTable::assignCell").arg(column).arg(m_numColumns)); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of m_numColumns range (%2) in PivotTable::assignCell").tqarg(column).tqarg(m_numColumns)); if ( m_grid[outergroup][innergroup][row][eActual].count() <= column ) - throw new MYMONEYEXCEPTION(QString("Column %1 out of grid range (%2) in PivotTable::assignCell").arg(column).arg(m_grid[outergroup][innergroup][row][eActual].count())); + throw new MYMONEYEXCEPTION(TQString("Column %1 out of grid range (%2) in PivotTable::assignCell").tqarg(column).tqarg(m_grid[outergroup][innergroup][row][eActual].count())); if(!stockSplit) { // Determine whether the value should be inverted before being placed in the row @@ -1272,44 +1272,44 @@ void PivotTable::assignCell( const QString& outergroup, const ReportAccount& _ro } -void PivotTable::createRow( const QString& outergroup, const ReportAccount& row, bool recursive ) +void PivotTable::createRow( const TQString& outergroup, const ReportAccount& row, bool recursive ) { DEBUG_ENTER(__PRETTY_FUNCTION__); - // Determine the inner group from the top-most parent account - QString innergroup( row.topParentName() ); + // Determine the inner group from the top-most tqparent account + TQString innergroup( row.topParentName() ); - if ( ! m_grid.contains(outergroup) ) + if ( ! m_grid.tqcontains(outergroup) ) { - DEBUG_OUTPUT(QString("Adding group [%1]").arg(outergroup)); + DEBUG_OUTPUT(TQString("Adding group [%1]").tqarg(outergroup)); m_grid[outergroup] = PivotOuterGroup(m_numColumns); } - if ( ! m_grid[outergroup].contains(innergroup) ) + if ( ! m_grid[outergroup].tqcontains(innergroup) ) { - DEBUG_OUTPUT(QString("Adding group [%1][%2]").arg(outergroup).arg(innergroup)); + DEBUG_OUTPUT(TQString("Adding group [%1][%2]").tqarg(outergroup).tqarg(innergroup)); m_grid[outergroup][innergroup] = PivotInnerGroup(m_numColumns); } - if ( ! m_grid[outergroup][innergroup].contains(row) ) + if ( ! m_grid[outergroup][innergroup].tqcontains(row) ) { - DEBUG_OUTPUT(QString("Adding row [%1][%2][%3]").arg(outergroup).arg(innergroup).arg(row.debugName())); + DEBUG_OUTPUT(TQString("Adding row [%1][%2][%3]").tqarg(outergroup).tqarg(innergroup).tqarg(row.debugName())); m_grid[outergroup][innergroup][row] = PivotGridRowSet(m_numColumns); if ( recursive && !row.isTopLevel() ) - createRow( outergroup, row.parent(), recursive ); + createRow( outergroup, row.tqparent(), recursive ); } } -unsigned PivotTable::columnValue(const QDate& _date) const +unsigned PivotTable::columnValue(const TQDate& _date) const { if (m_config_f.isColumnsAreDays()) - return (QDate().daysTo(_date)); + return (TQDate().daysTo(_date)); else return (_date.year() * 12 + _date.month()); } -QDate PivotTable::columnDate(int column) const +TQDate PivotTable::columnDate(int column) const { if (m_config_f.isColumnsAreDays()) return m_beginDate.addDays( m_config_f.columnPitch() * column - 1 ); @@ -1317,7 +1317,7 @@ QDate PivotTable::columnDate(int column) const return m_beginDate.addMonths( m_config_f.columnPitch() * column ).addDays(-1); } -QString PivotTable::renderCSV( void ) const +TQString PivotTable::renderCSV( void ) const { DEBUG_ENTER(__PRETTY_FUNCTION__); @@ -1325,11 +1325,11 @@ QString PivotTable::renderCSV( void ) const // Report Title // - QString result = QString("\"Report: %1\"\n").arg(m_config_f.name()); + TQString result = TQString("\"Report: %1\"\n").tqarg(m_config_f.name()); if ( m_config_f.isConvertCurrency() ) - result += i18n("All currencies converted to %1\n").arg(MyMoneyFile::instance()->baseCurrency().name()); + result += i18n("All currencies converted to %1\n").tqarg(MyMoneyFile::instance()->baseCurrency().name()); else - result += i18n("All values shown in %1 unless otherwise noted\n").arg(MyMoneyFile::instance()->baseCurrency().name()); + result += i18n("All values shown in %1 unless otherwise noted\n").tqarg(MyMoneyFile::instance()->baseCurrency().name()); // // Table Header @@ -1339,10 +1339,10 @@ QString PivotTable::renderCSV( void ) const unsigned column = 1; while ( column < m_numColumns ) - result += QString(",%1").arg(QString(m_columnHeadings[column++])); + result += TQString(",%1").tqarg(TQString(m_columnHeadings[column++])); if ( m_config_f.isShowingRowTotals() ) - result += QString(",%1").arg(i18n("Total")); + result += TQString(",%1").tqarg(i18n("Total")); result += "\n"; @@ -1374,7 +1374,7 @@ QString PivotTable::renderCSV( void ) const // Rows // - QString innergroupdata; + TQString innergroupdata; PivotInnerGroup::const_iterator it_row = (*it_innergroup).begin(); while ( it_row != (*it_innergroup).end() ) { @@ -1385,7 +1385,7 @@ QString PivotTable::renderCSV( void ) const // Columns // - QString rowdata; + TQString rowdata; unsigned column = 1; bool isUsed = false; @@ -1396,14 +1396,14 @@ QString PivotTable::renderCSV( void ) const //show columns for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { isUsed |= it_row.data()[ m_rowTypeList[i] ][column].isUsed(); - rowdata += QString(",\"%1\"").arg(it_row.data()[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); + rowdata += TQString(",\"%1\"").tqarg(it_row.data()[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); } column++; } if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - rowdata += QString(",\"%1\"").arg((*it_row)[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); + rowdata += TQString(",\"%1\"").tqarg((*it_row)[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); } // @@ -1411,13 +1411,13 @@ QString PivotTable::renderCSV( void ) const // if(!rowname.isClosed() || isUsed) { - innergroupdata += "\"" + QString().fill(' ',rowname.hierarchyDepth() - 1) + rowname.name(); + innergroupdata += "\"" + TQString().fill(' ',rowname.hierarchyDepth() - 1) + rowname.name(); // if we don't convert the currencies to the base currency and the // current row contains a foreign currency, then we append the currency // to the name of the account if (!m_config_f.isConvertCurrency() && rowname.isForeignCurrency() ) - innergroupdata += QString(" (%1)").arg(rowname.currencyId()); + innergroupdata += TQString(" (%1)").tqarg(rowname.currencyId()); innergroupdata += "\""; @@ -1434,7 +1434,7 @@ QString PivotTable::renderCSV( void ) const // bool finishrow = true; - QString finalRow; + TQString finalRow; bool isUsed = false; if ( m_config_f.detailLevel() == MyMoneyReport::eDetailAll && ((*it_innergroup).size() > 1 )) { @@ -1459,9 +1459,9 @@ QString PivotTable::renderCSV( void ) const ReportAccount rowname = (*it_innergroup).begin().key(); isUsed |= !rowname.isClosed(); - finalRow = "\"" + QString().fill(' ',rowname.hierarchyDepth() - 1) + rowname.name(); + finalRow = "\"" + TQString().fill(' ',rowname.hierarchyDepth() - 1) + rowname.name(); if (!m_config_f.isConvertCurrency() && rowname.isForeignCurrency() ) - finalRow += QString(" (%1)").arg(rowname.currencyId()); + finalRow += TQString(" (%1)").tqarg(rowname.currencyId()); finalRow += "\""; } @@ -1477,14 +1477,14 @@ QString PivotTable::renderCSV( void ) const { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { isUsed |= (*it_innergroup).m_total[ m_rowTypeList[i] ][column].isUsed(); - finalRow += QString(",\"%1\"").arg((*it_innergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); + finalRow += TQString(",\"%1\"").tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); } column++; } if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - finalRow += QString(",\"%1\"").arg((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); + finalRow += TQString(",\"%1\"").tqarg((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); } finalRow += "\n"; @@ -1504,18 +1504,18 @@ QString PivotTable::renderCSV( void ) const if ( m_config_f.isShowingColumnTotals() ) { - result += QString("%1 %2").arg(i18n("Total")).arg(it_outergroup.key()); + result += TQString("%1 %2").tqarg(i18n("Total")).tqarg(it_outergroup.key()); unsigned column = 1; while ( column < m_numColumns ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - result += QString(",\"%1\"").arg((*it_outergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); + result += TQString(",\"%1\"").tqarg((*it_outergroup).m_total[ m_rowTypeList[i] ][column].formatMoney(fraction, false)); column++; } if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - result += QString(",\"%1\"").arg((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); + result += TQString(",\"%1\"").tqarg((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); } result += "\n"; @@ -1533,14 +1533,14 @@ QString PivotTable::renderCSV( void ) const unsigned totalcolumn = 1; while ( totalcolumn < m_numColumns ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - result += QString(",\"%1\"").arg(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn].formatMoney(fraction, false)); + result += TQString(",\"%1\"").tqarg(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn].formatMoney(fraction, false)); totalcolumn++; } if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) - result += QString(",\"%1\"").arg(m_grid.m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); + result += TQString(",\"%1\"").tqarg(m_grid.m_total[ m_rowTypeList[i] ].m_total.formatMoney(fraction, false)); } result += "\n"; @@ -1549,55 +1549,55 @@ QString PivotTable::renderCSV( void ) const return result; } -QString PivotTable::renderHTML( void ) const +TQString PivotTable::renderHTML( void ) const { DEBUG_ENTER(__PRETTY_FUNCTION__); - QString colspan = QString(" colspan=\"%1\"").arg(m_numColumns + 1 + (m_config_f.isShowingRowTotals() ? 1 : 0) ); + TQString colspan = TQString(" colspan=\"%1\"").tqarg(m_numColumns + 1 + (m_config_f.isShowingRowTotals() ? 1 : 0) ); // // Report Title // - QString result = QString("<h2 class=\"report\">%1</h2>\n").arg(m_config_f.name()); + TQString result = TQString("<h2 class=\"report\">%1</h2>\n").tqarg(m_config_f.name()); //actual dates of the report - result += QString("<div class=\"subtitle\">"); - result += i18n("Report date range", "%1 through %2").arg(KGlobal::locale()->formatDate(m_config_f.fromDate(), true)).arg(KGlobal::locale()->formatDate(m_config_f.toDate(), true)); - result += QString("</div>\n"); - result += QString("<div class=\"gap\"> </div>\n"); + result += TQString("<div class=\"subtitle\">"); + result += i18n("Report date range", "%1 through %2").tqarg(KGlobal::locale()->formatDate(m_config_f.fromDate(), true)).tqarg(KGlobal::locale()->formatDate(m_config_f.toDate(), true)); + result += TQString("</div>\n"); + result += TQString("<div class=\"gap\"> </div>\n"); //currency conversion message - result += QString("<div class=\"subtitle\">"); + result += TQString("<div class=\"subtitle\">"); if ( m_config_f.isConvertCurrency() ) - result += i18n("All currencies converted to %1").arg(MyMoneyFile::instance()->baseCurrency().name()); + result += i18n("All currencies converted to %1").tqarg(MyMoneyFile::instance()->baseCurrency().name()); else - result += i18n("All values shown in %1 unless otherwise noted").arg(MyMoneyFile::instance()->baseCurrency().name()); - result += QString("</div>\n"); - result += QString("<div class=\"gap\"> </div>\n"); + result += i18n("All values shown in %1 unless otherwise noted").tqarg(MyMoneyFile::instance()->baseCurrency().name()); + result += TQString("</div>\n"); + result += TQString("<div class=\"gap\"> </div>\n"); // setup a leftborder for better readability of budget vs actual reports - QString leftborder; + TQString leftborder; if (m_rowTypeList.size() > 1) leftborder = " class=\"leftborder\""; // // Table Header // - result += QString("\n\n<table class=\"report\" cellspacing=\"0\">\n" - "<thead><tr class=\"itemheader\">\n<th>%1</th>").arg(i18n("Account")); + result += TQString("\n\n<table class=\"report\" cellspacing=\"0\">\n" + "<thead><tr class=\"itemheader\">\n<th>%1</th>").tqarg(i18n("Account")); - QString headerspan; + TQString headerspan; int span = m_rowTypeList.size(); - headerspan = QString(" colspan=\"%1\"").arg(span); + headerspan = TQString(" colspan=\"%1\"").tqarg(span); unsigned column = 1; while ( column < m_numColumns ) - result += QString("<th%1>%2</th>").arg(headerspan,QString(m_columnHeadings[column++]).replace(QRegExp(" "),"<br>")); + result += TQString("<th%1>%2</th>").tqarg(headerspan,TQString(m_columnHeadings[column++]).tqreplace(TQRegExp(" "),"<br>")); if ( m_config_f.isShowingRowTotals() ) - result += QString("<th%1>%2</th>").arg(headerspan).arg(i18n("Total")); + result += TQString("<th%1>%2</th>").tqarg(headerspan).tqarg(i18n("Total")); result += "</tr></thead>\n"; @@ -1611,22 +1611,22 @@ QString PivotTable::renderHTML( void ) const unsigned column = 1; while ( column < m_numColumns ) { - QString lb; + TQString lb; if(column != 1) lb = leftborder; for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(i18n( m_columnTypeHeaderList[i] )) - .arg(i == 0 ? lb : QString() ); + result += TQString("<td%2>%1</td>") + .tqarg(i18n( m_columnTypeHeaderList[i] )) + .tqarg(i == 0 ? lb : TQString() ); } column++; } if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(i18n( m_columnTypeHeaderList[i] )) - .arg(i == 0 ? leftborder : QString() ); + result += TQString("<td%2>%1</td>") + .tqarg(i18n( m_columnTypeHeaderList[i] )) + .tqarg(i == 0 ? leftborder : TQString() ); } } result += "</tr>"; @@ -1646,7 +1646,7 @@ QString PivotTable::renderHTML( void ) const // // I hope this doesn't bog the performance of reports, given that we're copying the entire report // data. If this is a perf hit, we could change to storing outergroup pointers, I think. - QValueList<PivotOuterGroup> outergroups; + TQValueList<PivotOuterGroup> outergroups; PivotGrid::const_iterator it_outergroup_map = m_grid.begin(); while ( it_outergroup_map != m_grid.end() ) { @@ -1660,14 +1660,14 @@ QString PivotTable::renderHTML( void ) const } qHeapSort(outergroups); - QValueList<PivotOuterGroup>::const_iterator it_outergroup = outergroups.begin(); + TQValueList<PivotOuterGroup>::const_iterator it_outergroup = outergroups.begin(); while ( it_outergroup != outergroups.end() ) { // // Outer Group Header // - result += QString("<tr class=\"sectionheader\"><td class=\"left\"%1>%2</td></tr>\n").arg(colspan).arg((*it_outergroup).m_displayName); + result += TQString("<tr class=\"sectionheader\"><td class=\"left\"%1>%2</td></tr>\n").tqarg(colspan).tqarg((*it_outergroup).m_displayName); // Skip the inner groups if the report only calls for outer group totals to be shown if ( m_config_f.detailLevel() != MyMoneyReport::eDetailGroup ) @@ -1685,7 +1685,7 @@ QString PivotTable::renderHTML( void ) const // Rows // - QString innergroupdata; + TQString innergroupdata; PivotInnerGroup::const_iterator it_row = (*it_innergroup).begin(); while ( it_row != (*it_innergroup).end() ) { @@ -1693,19 +1693,19 @@ QString PivotTable::renderHTML( void ) const // Columns // - QString rowdata; + TQString rowdata; unsigned column = 1; bool isUsed = it_row.data()[eActual][0].isUsed(); while ( column < m_numColumns ) { - QString lb; + TQString lb; if(column != 1) lb = leftborder; for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - rowdata += QString("<td%2>%1</td>") - .arg(coloredAmount(it_row.data()[ m_rowTypeList[i] ][column])) - .arg(i == 0 ? lb : QString()); + rowdata += TQString("<td%2>%1</td>") + .tqarg(coloredAmount(it_row.data()[ m_rowTypeList[i] ][column])) + .tqarg(i == 0 ? lb : TQString()); isUsed |= it_row.data()[ m_rowTypeList[i] ][column].isUsed(); } @@ -1716,9 +1716,9 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - rowdata += QString("<td%2>%1</td>") - .arg(coloredAmount(it_row.data()[ m_rowTypeList[i] ].m_total)) - .arg(i == 0 ? leftborder : QString()); + rowdata += TQString("<td%2>%1</td>") + .tqarg(coloredAmount(it_row.data()[ m_rowTypeList[i] ].m_total)) + .tqarg(i == 0 ? leftborder : TQString()); } } @@ -1730,13 +1730,13 @@ QString PivotTable::renderHTML( void ) const // don't show closed accounts if they have not been used if(!rowname.isClosed() || isUsed) { - innergroupdata += QString("<tr class=\"row-%1\"%2><td%3 class=\"left\" style=\"text-indent: %4.0em\">%5%6</td>") - .arg(rownum & 0x01 ? "even" : "odd") - .arg(rowname.isTopLevel() ? " id=\"topparent\"" : "") - .arg("") //.arg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank - .arg(rowname.hierarchyDepth() - 1) - .arg(rowname.name().replace(QRegExp(" "), " ")) - .arg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?QString():QString(" (%1)").arg(rowname.currency().id())); + innergroupdata += TQString("<tr class=\"row-%1\"%2><td%3 class=\"left\" style=\"text-indent: %4.0em\">%5%6</td>") + .tqarg(rownum & 0x01 ? "even" : "odd") + .tqarg(rowname.isTopLevel() ? " id=\"toptqparent\"" : "") + .tqarg("") //.tqarg((*it_row).m_total.isZero() ? colspan : "") // colspan the distance if this row will be blank + .tqarg(rowname.hierarchyDepth() - 1) + .tqarg(rowname.name().tqreplace(TQRegExp(" "), " ")) + .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id())); // Don't print this row if it's going to be all zeros // TODO: Uncomment this, and deal with the case where the data @@ -1755,7 +1755,7 @@ QString PivotTable::renderHTML( void ) const // bool finishrow = true; - QString finalRow; + TQString finalRow; bool isUsed = false; if ( m_config_f.detailLevel() == MyMoneyReport::eDetailAll && ((*it_innergroup).size() > 1 )) { @@ -1765,9 +1765,9 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingColumnTotals() ) { // Start the TOTALS row - finalRow = QString("<tr class=\"row-%1\" id=\"subtotal\"><td class=\"left\"> %2</td>") - .arg(rownum & 0x01 ? "even" : "odd") - .arg(i18n("Total")); + finalRow = TQString("<tr class=\"row-%1\" id=\"subtotal\"><td class=\"left\"> %2</td>") + .tqarg(rownum & 0x01 ? "even" : "odd") + .tqarg(i18n("Total")); // don't suppress display of totals isUsed = true; } @@ -1787,12 +1787,12 @@ QString PivotTable::renderHTML( void ) const // This works for me (ipwizard) ReportAccount rowname = (*it_innergroup).begin().key(); isUsed |= !rowname.isClosed(); - finalRow = QString("<tr class=\"row-%1\"%2><td class=\"left\" style=\"text-indent: %3.0em;\">%5%6</td>") - .arg(rownum & 0x01 ? "even" : "odd") - .arg( m_config_f.detailLevel() == MyMoneyReport::eDetailAll ? "id=\"solo\"" : "" ) - .arg(rowname.hierarchyDepth() - 1) - .arg(rowname.name().replace(QRegExp(" "), " ")) - .arg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?QString():QString(" (%1)").arg(rowname.currency().id())); + finalRow = TQString("<tr class=\"row-%1\"%2><td class=\"left\" style=\"text-indent: %3.0em;\">%5%6</td>") + .tqarg(rownum & 0x01 ? "even" : "odd") + .tqarg( m_config_f.detailLevel() == MyMoneyReport::eDetailAll ? "id=\"solo\"" : "" ) + .tqarg(rowname.hierarchyDepth() - 1) + .tqarg(rowname.name().tqreplace(TQRegExp(" "), " ")) + .tqarg((m_config_f.isConvertCurrency() || !rowname.isForeignCurrency() )?TQString():TQString(" (%1)").tqarg(rowname.currency().id())); } // Finish the row started above, unless told not to @@ -1802,14 +1802,14 @@ QString PivotTable::renderHTML( void ) const isUsed |= (*it_innergroup).m_total[eActual][0].isUsed(); while ( column < m_numColumns ) { - QString lb; + TQString lb; if(column != 1) lb = leftborder; for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - finalRow += QString("<td%2>%1</td>") - .arg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ][column])) - .arg(i == 0 ? lb : QString()); + finalRow += TQString("<td%2>%1</td>") + .tqarg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ][column])) + .tqarg(i == 0 ? lb : TQString()); isUsed |= (*it_innergroup).m_total[ m_rowTypeList[i] ][column].isUsed(); } @@ -1819,9 +1819,9 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - finalRow += QString("<td%2>%1</td>") - .arg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total)) - .arg(i == 0 ? leftborder : QString()); + finalRow += TQString("<td%2>%1</td>") + .tqarg(coloredAmount((*it_innergroup).m_total[ m_rowTypeList[i] ].m_total)) + .tqarg(i == 0 ? leftborder : TQString()); } } @@ -1844,18 +1844,18 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingColumnTotals() ) { - result += QString("<tr class=\"sectionfooter\"><td class=\"left\">%1 %2</td>").arg(i18n("Total")).arg((*it_outergroup).m_displayName); + result += TQString("<tr class=\"sectionfooter\"><td class=\"left\">%1 %2</td>").tqarg(i18n("Total")).tqarg((*it_outergroup).m_displayName); unsigned column = 1; while ( column < m_numColumns ) { - QString lb; + TQString lb; if(column != 1) lb = leftborder; for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ][column])) - .arg(i == 0 ? lb : QString()); + result += TQString("<td%2>%1</td>") + .tqarg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ][column])) + .tqarg(i == 0 ? lb : TQString()); } column++; @@ -1864,9 +1864,9 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total)) - .arg(i == 0 ? leftborder : QString()); + result += TQString("<td%2>%1</td>") + .tqarg(coloredAmount((*it_outergroup).m_total[ m_rowTypeList[i] ].m_total)) + .tqarg(i == 0 ? leftborder : TQString()); } } result += "</tr>\n"; @@ -1884,19 +1884,19 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingColumnTotals() ) { - result += QString("<tr class=\"spacer\"><td> </td></tr>\n"); - result += QString("<tr class=\"reportfooter\"><td class=\"left\">%1</td>").arg(i18n("Grand Total")); + result += TQString("<tr class=\"spacer\"><td> </td></tr>\n"); + result += TQString("<tr class=\"reportfooter\"><td class=\"left\">%1</td>").tqarg(i18n("Grand Total")); unsigned totalcolumn = 1; while ( totalcolumn < m_numColumns ) { - QString lb; + TQString lb; if(totalcolumn != 1) lb = leftborder; for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn])) - .arg(i == 0 ? lb : QString()); + result += TQString("<td%2>%1</td>") + .tqarg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ][totalcolumn])) + .tqarg(i == 0 ? lb : TQString()); } totalcolumn++; @@ -1905,27 +1905,27 @@ QString PivotTable::renderHTML( void ) const if ( m_config_f.isShowingRowTotals() ) { for(unsigned i = 0; i < m_rowTypeList.size(); ++i) { - result += QString("<td%2>%1</td>") - .arg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ].m_total)) - .arg(i == 0 ? leftborder : QString()); + result += TQString("<td%2>%1</td>") + .tqarg(coloredAmount(m_grid.m_total[ m_rowTypeList[i] ].m_total)) + .tqarg(i == 0 ? leftborder : TQString()); } } result += "</tr>\n"; } - result += QString("<tr class=\"spacer\"><td> </td></tr>\n"); - result += QString("<tr class=\"spacer\"><td> </td></tr>\n"); + result += TQString("<tr class=\"spacer\"><td> </td></tr>\n"); + result += TQString("<tr class=\"spacer\"><td> </td></tr>\n"); result += "</table>\n"; return result; } -void PivotTable::dump( const QString& file, const QString& /* context */) const +void PivotTable::dump( const TQString& file, const TQString& /* context */) const { - QFile g( file ); + TQFile g( file ); g.open( IO_WriteOnly ); - QTextStream(&g) << renderHTML(); + TQTextStream(&g) << renderHTML(); g.close(); } @@ -2030,13 +2030,13 @@ void PivotTable::drawChart( KReportChartView& _view ) const _view.setAccountSeries( accountSeries ); // Set up X axis labels (ie "abscissa" to use the technical term) - QStringList& abscissaNames = _view.abscissaNames(); + TQStringList& abscissaNames = _view.abscissaNames(); abscissaNames.clear(); if ( accountSeries ) { unsigned column = 1; while ( column < m_numColumns ) { - abscissaNames += QString(m_columnHeadings[column++]).replace(" ", " "); + abscissaNames += TQString(m_columnHeadings[column++]).tqreplace(" ", " "); } } else @@ -2064,7 +2064,7 @@ void PivotTable::drawChart( KReportChartView& _view ) const // // Rows // - QString innergroupdata; + TQString innergroupdata; PivotInnerGroup::const_iterator it_row = (*it_innergroup).begin(); while ( it_row != (*it_innergroup).end() ) { @@ -2213,14 +2213,14 @@ void PivotTable::drawChart( KReportChartView& _view ) const { // the first column of report which represents a date in the future, or one past the // last column if all columns are in the present day. Only relevant when accountSeries==true - unsigned futurecolumn = columnValue(QDate::currentDate()) - columnValue(m_beginDate) + 1; + unsigned futurecolumn = columnValue(TQDate::tqcurrentDate()) - columnValue(m_beginDate) + 1; // kdDebug(2) << "futurecolumn: " << futurecolumn << endl; // kdDebug(2) << "m_numColumns: " << m_numColumns << endl; // Properties for line charts whose values are in the future. KDChartPropertySet propSetFutureValue("future value", KDChartParams::KDCHART_PROPSET_NORMAL_DATA); - propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, Qt::DotLine); + propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, TQt::DotLine); const int idPropFutureValue = _view.params()->registerProperties(propSetFutureValue); for(int col = futurecolumn; col < m_numColumns; ++col) { @@ -2270,17 +2270,17 @@ unsigned PivotTable::drawChartRowSet(unsigned rowNum, const bool seriesTotals, c return ++rowNum; } -QString PivotTable::coloredAmount(const MyMoneyMoney& amount, const QString& currencySymbol, int prec) const +TQString PivotTable::coloredAmount(const MyMoneyMoney& amount, const TQString& currencySymbol, int prec) const { - QString result; + TQString result; if( amount.isNegative() ) - result += QString("<font color=\"rgb(%1,%2,%3)\">") - .arg(KMyMoneyGlobalSettings::listNegativeValueColor().red()) - .arg(KMyMoneyGlobalSettings::listNegativeValueColor().green()) - .arg(KMyMoneyGlobalSettings::listNegativeValueColor().blue()); + result += TQString("<font color=\"rgb(%1,%2,%3)\">") + .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().red()) + .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().green()) + .tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().blue()); result += amount.formatMoney(currencySymbol, prec); if( amount.isNegative() ) - result += QString("</font>"); + result += TQString("</font>"); return result; } @@ -2335,10 +2335,10 @@ void PivotTable::calculateForecast(void) forecast.setIncludeUnusedAccounts(true); //setup forecast dates - if(m_endDate > QDate::currentDate()) { + if(m_endDate > TQDate::tqcurrentDate()) { forecast.setForecastEndDate(m_endDate); - forecast.setForecastStartDate(QDate::currentDate()); - forecast.setForecastDays(QDate::currentDate().daysTo(m_endDate)); + forecast.setForecastStartDate(TQDate::tqcurrentDate()); + forecast.setForecastDays(TQDate::tqcurrentDate().daysTo(m_endDate)); } else { forecast.setForecastStartDate(m_beginDate); forecast.setForecastEndDate(m_endDate); @@ -2346,7 +2346,7 @@ void PivotTable::calculateForecast(void) } //adjust history dates if beginning date is before today - if(m_beginDate < QDate::currentDate()) { + if(m_beginDate < TQDate::tqcurrentDate()) { forecast.setHistoryEndDate(m_beginDate.addDays(-1)); forecast.setHistoryStartDate(forecast.historyEndDate().addDays(-forecast.accountsCycle()*forecast.forecastCycles())); } @@ -2365,7 +2365,7 @@ void PivotTable::calculateForecast(void) while ( it_row != (*it_innergroup).end() ) { unsigned column = 1; - QDate forecastDate = m_beginDate; + TQDate forecastDate = m_beginDate; //check whether columns are days or months if(m_config_f.isColumnsAreDays()) { @@ -2380,7 +2380,7 @@ void PivotTable::calculateForecast(void) while(column < m_numColumns) { //set forecastDate to last day of each month //TODO we really need a date manipulation util - forecastDate = QDate(forecastDate.year(), forecastDate.month(), forecastDate.daysInMonth()); + forecastDate = TQDate(forecastDate.year(), forecastDate.month(), forecastDate.daysInMonth()); //check that forecastDate is not over ending date if(forecastDate > m_endDate) forecastDate = m_endDate; @@ -2466,9 +2466,9 @@ void PivotTable::calculateMovingAverage (void) while(column < m_numColumns) { MyMoneyMoney totalPrice = MyMoneyMoney( 0, 1 ); - QDate averageStart = columnDate(column).addDays(-delta); - QDate averageEnd = columnDate(column).addDays(delta); - for(QDate averageDate = averageStart; averageDate <= averageEnd; averageDate = averageDate.addDays(1)) { + TQDate averageStart = columnDate(column).addDays(-delta); + TQDate averageEnd = columnDate(column).addDays(delta); + for(TQDate averageDate = averageStart; averageDate <= averageEnd; averageDate = averageDate.addDays(1)) { if(m_config_f.isConvertCurrency()) { totalPrice += it_row.key().deepCurrencyPrice(averageDate) * it_row.key().baseCurrencyPrice(averageDate); } else { @@ -2489,28 +2489,28 @@ void PivotTable::calculateMovingAverage (void) } else { //if columns are months while(column < m_numColumns) { - QDate averageStart = columnDate(column); + TQDate averageStart = columnDate(column); //set the right start date depending on the column type switch(m_config_f.columnType()) { case MyMoneyReport::eYears: { - averageStart = QDate(columnDate(column).year(), 1, 1); + averageStart = TQDate(columnDate(column).year(), 1, 1); break; } case MyMoneyReport::eBiMonths: { - averageStart = QDate(columnDate(column).year(), columnDate(column).month(), 1).addMonths(-1); + averageStart = TQDate(columnDate(column).year(), columnDate(column).month(), 1).addMonths(-1); break; } case MyMoneyReport::eQuarters: { - averageStart = QDate(columnDate(column).year(), columnDate(column).month(), 1).addMonths(-1); + averageStart = TQDate(columnDate(column).year(), columnDate(column).month(), 1).addMonths(-1); break; } case MyMoneyReport::eMonths: { - averageStart = QDate(columnDate(column).year(), columnDate(column).month(), 1); + averageStart = TQDate(columnDate(column).year(), columnDate(column).month(), 1); break; } case MyMoneyReport::eWeeks: @@ -2524,8 +2524,8 @@ void PivotTable::calculateMovingAverage (void) //gather the actual data and calculate the average MyMoneyMoney totalPrice = MyMoneyMoney(0, 1); - QDate averageEnd = columnDate(column); - for(QDate averageDate = averageStart; averageDate <= averageEnd; averageDate = averageDate.addDays(1)) { + TQDate averageEnd = columnDate(column); + for(TQDate averageDate = averageStart; averageDate <= averageEnd; averageDate = averageDate.addDays(1)) { if(m_config_f.isConvertCurrency()) { totalPrice += it_row.key().deepCurrencyPrice(averageDate) * it_row.key().baseCurrencyPrice(averageDate); } else { @@ -2582,15 +2582,15 @@ void PivotTable::includeInvestmentSubAccounts() // if we're not in expert mode, we need to make sure // that all stock accounts for the selected investment // account are also selected - QStringList accountList; + TQStringList accountList; if(m_config_f.accounts(accountList)) { if(!KMyMoneyGlobalSettings::expertMode()) { - QStringList::const_iterator it_a, it_b; + TQStringList::const_iterator it_a, it_b; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!accountList.contains(*it_b)) { + if(!accountList.tqcontains(*it_b)) { m_config_f.addAccount(*it_b); } } diff --git a/kmymoney2/reports/pivottable.h b/kmymoney2/reports/pivottable.h index 226c9a5..26ac53c 100644 --- a/kmymoney2/reports/pivottable.h +++ b/kmymoney2/reports/pivottable.h @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qvaluelist.h> +#include <tqmap.h> +#include <tqvaluelist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -76,15 +76,15 @@ public: /** * Render the report to an HTML stream. * - * @return QString HTML string representing the report + * @return TQString HTML string representing the report */ - QString renderHTML( void ) const; + TQString renderHTML( void ) const; /** * Render the report to a comma-separated-values stream. * - * @return QString CSV string representing the report + * @return TQString CSV string representing the report */ - QString renderCSV( void ) const; + TQString renderCSV( void ) const; /** * Render the report to a graphical chart @@ -99,7 +99,7 @@ public: * @param file The filename to dump into * @param context unused, but provided for interface compatibility */ - void dump( const QString& file, const QString& context=QString()) const; + void dump( const TQString& file, const TQString& context=TQString()) const; /** * Returns the grid generated by the report @@ -114,10 +114,10 @@ private: PivotGrid m_grid; - QStringList m_columnHeadings; + TQStringList m_columnHeadings; unsigned m_numColumns; - QDate m_beginDate; - QDate m_endDate; + TQDate m_beginDate; + TQDate m_endDate; bool m_runningSumsCalculated; /** @@ -125,17 +125,17 @@ private: * the budget for it. If an account is not contained in this map, it is not included * in the budget. */ - QMap<QString, QString> m_budgetMap; + TQMap<TQString, TQString> m_budgetMap; /** * This list contains the types of PivotGridRows that are going to be shown in the report */ - QValueList<ERowType> m_rowTypeList; + TQValueList<ERowType> m_rowTypeList; /** * This list contains the i18n headers for the column types */ - QValueList<QString> m_columnTypeHeaderList; + TQValueList<TQString> m_columnTypeHeaderList; MyMoneyReport m_config_f; @@ -153,7 +153,7 @@ private: * with $red, $green and $blue being the actual value for the * chosen color. */ - QString coloredAmount(const MyMoneyMoney& amount, const QString& currencySymbol = QString(), int prec = 2 ) const; + TQString coloredAmount(const MyMoneyMoney& amount, const TQString& currencySymbol = TQString(), int prec = 2 ) const; protected: /** @@ -165,9 +165,9 @@ protected: * * @param outergroup The outer row group * @param row The row itself - * @param recursive Whether to also recursively create rows for our parent accounts + * @param recursive Whether to also recursively create rows for our tqparent accounts */ - void createRow( const QString& outergroup, const ReportAccount& row, bool recursive ); + void createRow( const TQString& outergroup, const ReportAccount& row, bool recursive ); /** * Assigns a value into the grid @@ -183,7 +183,7 @@ protected: * @param stockSplit Wheter this is a stock split (@p true) or an actual * value (@p false). Defaults to @p false. */ - inline void assignCell( const QString& outergroup, const ReportAccount& row, unsigned column, MyMoneyMoney value, bool budget = false, bool stockSplit = false ); + inline void assignCell( const TQString& outergroup, const ReportAccount& row, unsigned column, MyMoneyMoney value, bool budget = false, bool stockSplit = false ); /** * Create a row for each included account. This is used when @@ -207,7 +207,7 @@ protected: * in the user's hierarchy and the account where the budget is held for it. * This is needed because the user can budget on a given account for that * account and all its descendants. Also if NO budget is placed on the - * account or any of its parents, the account is not included in the map. + * account or any of its tqparents, the account is not included in the map. */ void calculateBudgetMapping( void ); @@ -317,19 +317,19 @@ protected: * * @param _date The date */ - unsigned columnValue(const QDate& _date) const; + unsigned columnValue(const TQDate& _date) const; /** * Calculate the date of the last day covered by a given column. * * @param column The column */ - QDate columnDate(int column) const; + TQDate columnDate(int column) const; /** * Returns the balance of a given cell. Throws an exception once calculateRunningSums() has been run. */ - MyMoneyMoney cellBalance(const QString& outergroup, const ReportAccount& _row, unsigned column, bool budget); + MyMoneyMoney cellBalance(const TQString& outergroup, const ReportAccount& _row, unsigned column, bool budget); /** * Draws a PivotGridRowSet in a chart for the given ERowType diff --git a/kmymoney2/reports/pivottabletest.cpp b/kmymoney2/reports/pivottabletest.cpp index a235c0b..f5dbe12 100644 --- a/kmymoney2/reports/pivottabletest.cpp +++ b/kmymoney2/reports/pivottabletest.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qdom.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kdeversion.h> @@ -60,7 +60,7 @@ void PivotTableTest::setUp () MyMoneyFileTransaction ft; file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$")); file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$")); - file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1)); + file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1)); file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#")); file->setBaseCurrency(file->currency("USD")); @@ -73,16 +73,16 @@ void PivotTableTest::setUp () acLiability = (MyMoneyFile::instance()->liability().id()); acExpense = (MyMoneyFile::instance()->expense().id()); acIncome = (MyMoneyFile::instance()->income().id()); - acChecking = makeAccount(QString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,QDate(2004,5,15),acAsset); - acCredit = makeAccount(QString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,QDate(2004,7,15),acLiability); - acSolo = makeAccount(QString("Solo"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acParent = makeAccount(QString("Parent"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acChild = makeAccount(QString("Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acForeign = makeAccount(QString("Foreign"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); + acChecking = makeAccount(TQString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,TQDate(2004,5,15),acAsset); + acCredit = makeAccount(TQString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,TQDate(2004,7,15),acLiability); + acSolo = makeAccount(TQString("Solo"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acParent = makeAccount(TQString("Parent"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acChild = makeAccount(TQString("Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acForeign = makeAccount(TQString("Foreign"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); - acSecondChild = makeAccount(QString("Second Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acGrandChild1 = makeAccount(QString("Grand Child 1"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild); - acGrandChild2 = makeAccount(QString("Grand Child 2"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acChild); + acSecondChild = makeAccount(TQString("Second Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acGrandChild1 = makeAccount(TQString("Grand Child 1"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild); + acGrandChild2 = makeAccount(TQString("Grand Child 2"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acChild); MyMoneyInstitution i("Bank of the World","","","","","",""); file->addInstitution(i); @@ -102,7 +102,7 @@ void PivotTableTest::testNetWorthSingle() { MyMoneyReport filter; filter.setRowType( MyMoneyReport::eAssetLiability ); - filter.setDateFilter(QDate(2004,1,1),QDate(2004,7,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2004,7,1).addDays(-1)); XMLandback(filter); PivotTable networth_f(filter); writeTabletoCSV(networth_f); @@ -130,7 +130,7 @@ void PivotTableTest::testNetWorthOfsetting() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eAssetLiability ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); XMLandback(filter); PivotTable networth_f( filter ); CPPUNIT_ASSERT(networth_f.m_grid["Liability"]["Credit Card"][acCredit][eActual][7]==-moCreditOpen); @@ -146,7 +146,7 @@ void PivotTableTest::testNetWorthOpeningPrior() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eAssetLiability ); - filter.setDateFilter(QDate(2005,8,1),QDate(2005,12,31)); + filter.setDateFilter(TQDate(2005,8,1),TQDate(2005,12,31)); filter.setName("Net Worth Opening Prior 1"); XMLandback(filter); PivotTable networth_f( filter ); @@ -160,9 +160,9 @@ void PivotTableTest::testNetWorthOpeningPrior() // Test the net worth report to make sure that transactions prior to the report // period are included in the opening balance - TransactionHelper t1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acChecking, acChild ); + TransactionHelper t1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acChecking, acChild ); filter.setName("Net Worth Opening Prior 2"); PivotTable networth_f2( filter ); @@ -179,7 +179,7 @@ void PivotTableTest::testNetWorthDateFilter() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eAssetLiability ); - filter.setDateFilter(QDate(2004,1,1),QDate(2004,2,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2004,2,1).addDays(-1)); XMLandback(filter); PivotTable networth_f( filter ); CPPUNIT_ASSERT(networth_f.m_grid.m_total[eActual][1]==moZero); @@ -196,7 +196,7 @@ void PivotTableTest::testSpendingEmpty() PivotTable spending_f1( filter ); CPPUNIT_ASSERT(spending_f1.m_grid.m_total[eActual].m_total==moZero); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); PivotTable spending_f2( filter ); CPPUNIT_ASSERT(spending_f2.m_grid.m_total[eActual].m_total==moZero); } @@ -204,11 +204,11 @@ void PivotTableTest::testSpendingEmpty() void PivotTableTest::testSingleTransaction() { // Test a single transaction - TransactionHelper t( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal,moSolo, acChecking, acSolo ); + TransactionHelper t( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal,moSolo, acChecking, acSolo ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.setName("Spending with Single Transaction.html"); XMLandback(filter); PivotTable spending_f( filter ); @@ -222,7 +222,7 @@ void PivotTableTest::testSingleTransaction() filter.clear(); filter.setRowType(MyMoneyReport::eAssetLiability); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); XMLandback(filter); PivotTable networth_f( filter ); CPPUNIT_ASSERT(networth_f.m_grid["Asset"]["Checking Account"].m_total[eActual][2]==(moCheckingOpen-moSolo) ); @@ -232,13 +232,13 @@ void PivotTableTest::testSubAccount() { // Test a sub-account with a value, under an account with a value - TransactionHelper t1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.setDetailLevel(MyMoneyReport::eDetailAll); filter.setName("Spending with Sub-Account"); XMLandback(filter); @@ -255,7 +255,7 @@ void PivotTableTest::testSubAccount() filter.clear(); filter.setRowType(MyMoneyReport::eAssetLiability); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.setName("Net Worth with Sub-Account"); XMLandback(filter); PivotTable networth_f( filter ); @@ -268,13 +268,13 @@ void PivotTableTest::testSubAccount() void PivotTableTest::testFilterIEvsIE() { // Test that removing an income/spending account will remove the entry from an income/spending report - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addCategory(acChild); filter.addCategory(acSolo); XMLandback(filter); @@ -289,13 +289,13 @@ void PivotTableTest::testFilterIEvsIE() void PivotTableTest::testFilterALvsAL() { // Test that removing an asset/liability account will remove the entry from an asset/liability report - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eAssetLiability ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addAccount(acChecking); filter.addCategory(acChild); filter.addCategory(acSolo); @@ -307,13 +307,13 @@ void PivotTableTest::testFilterALvsAL() void PivotTableTest::testFilterALvsIE() { // Test that removing an asset/liability account will remove the entry from an income/spending report - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addAccount(acChecking); CPPUNIT_ASSERT(file->transactionList(filter).count() == 1); @@ -329,13 +329,13 @@ void PivotTableTest::testFilterAllvsIE() { // Test that removing an asset/liability account AND an income/expense // category will remove the entry from an income/spending report - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addAccount(acCredit); filter.addCategory(acChild); PivotTable spending_f( filter ); @@ -348,14 +348,14 @@ void PivotTableTest::testFilterAllvsIE() void PivotTableTest::testFilterBasics() { // Test that the filters are operating the way that the reports expect them to - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyTransactionFilter filter; filter.clear(); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addCategory(acSolo); filter.setReportAllSplits(false); filter.setConsiderCategory(true); @@ -371,7 +371,7 @@ void PivotTableTest::testFilterBasics() CPPUNIT_ASSERT(file->transactionList(filter).count() == 1); filter.clear(); - filter.setDateFilter(QDate(2004,9,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,9,1),TQDate(2005,1,1).addDays(-1)); filter.addCategory(acParent); filter.addAccount(acCredit); filter.setReportAllSplits(false); @@ -392,26 +392,26 @@ void PivotTableTest::testMultipleCurrencies() MyMoneyMoney moCanTransaction( 100.0 ); MyMoneyMoney moJpyTransaction( 100.0 ); - QString acCanChecking = makeAccount(QString("Canadian Checking"),MyMoneyAccount::Checkings,moCanOpening,QDate(2003,11,15),acAsset,"CAD"); - QString acJpyChecking = makeAccount(QString("Japanese Checking"),MyMoneyAccount::Checkings,moJpyOpening,QDate(2003,11,15),acAsset,"JPY"); - QString acCanCash = makeAccount(QString("Canadian"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acForeign,"CAD"); - QString acJpyCash = makeAccount(QString("Japanese"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acForeign,"JPY"); + TQString acCanChecking = makeAccount(TQString("Canadian Checking"),MyMoneyAccount::Checkings,moCanOpening,TQDate(2003,11,15),acAsset,"CAD"); + TQString acJpyChecking = makeAccount(TQString("Japanese Checking"),MyMoneyAccount::Checkings,moJpyOpening,TQDate(2003,11,15),acAsset,"JPY"); + TQString acCanCash = makeAccount(TQString("Canadian"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acForeign,"CAD"); + TQString acJpyCash = makeAccount(TQString("Japanese"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acForeign,"JPY"); - makePrice("CAD",QDate(2004,1,1),MyMoneyMoney(moCanPrice)); - makePrice("JPY",QDate(2004,1,1),MyMoneyMoney(moJpyPrice)); - makePrice("JPY",QDate(2004,5,1),MyMoneyMoney(moJpyPrice2)); - makePrice("JPY",QDate(2004,6,30),MyMoneyMoney(moJpyPrice3)); - makePrice("JPY",QDate(2004,7,15),MyMoneyMoney(moJpyPrice4)); + makePrice("CAD",TQDate(2004,1,1),MyMoneyMoney(moCanPrice)); + makePrice("JPY",TQDate(2004,1,1),MyMoneyMoney(moJpyPrice)); + makePrice("JPY",TQDate(2004,5,1),MyMoneyMoney(moJpyPrice2)); + makePrice("JPY",TQDate(2004,6,30),MyMoneyMoney(moJpyPrice3)); + makePrice("JPY",TQDate(2004,7,15),MyMoneyMoney(moJpyPrice4)); - TransactionHelper t1( QDate(2004,2,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); - TransactionHelper t2( QDate(2004,3,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); - TransactionHelper t3( QDate(2004,4,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); - TransactionHelper t4( QDate(2004,2,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); - TransactionHelper t5( QDate(2004,3,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); - TransactionHelper t6( QDate(2004,4,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); + TransactionHelper t1( TQDate(2004,2,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); + TransactionHelper t2( TQDate(2004,3,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); + TransactionHelper t3( TQDate(2004,4,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moJpyTransaction), acJpyChecking, acJpyCash, "JPY" ); + TransactionHelper t4( TQDate(2004,2,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); + TransactionHelper t5( TQDate(2004,3,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); + TransactionHelper t6( TQDate(2004,4,20), MyMoneySplit::ActionWithdrawal,MyMoneyMoney(moCanTransaction), acCanChecking, acCanCash, "CAD" ); #if 0 - QFile g( "multicurrencykmy.xml" ); + TQFile g( "multicurrencykmy.xml" ); g.open( IO_WriteOnly ); MyMoneyStorageXML xml; IMyMoneyStorageFormat& interface = xml; @@ -421,7 +421,7 @@ void PivotTableTest::testMultipleCurrencies() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); filter.setDetailLevel(MyMoneyReport::eDetailAll); filter.setConvertCurrency(true); filter.setName("Multiple Currency Spending Rerport (with currency conversion)"); @@ -436,7 +436,7 @@ void PivotTableTest::testMultipleCurrencies() CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Foreign"][acCanCash][eActual][3]==(moCanTransaction*moCanPrice)); CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Foreign"][acCanCash][eActual][4]==(moCanTransaction*moCanPrice)); - // test multiple foreign currencies under a common parent + // test multiple foreign currencies under a common tqparent CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Foreign"][acJpyCash][eActual][2]==(moJpyTransaction*moJpyPrice)); CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Foreign"][acJpyCash][eActual][3]==(moJpyTransaction*moJpyPrice)); CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Foreign"][acJpyCash][eActual][4]==(moJpyTransaction*moJpyPrice)); @@ -462,7 +462,7 @@ void PivotTableTest::testMultipleCurrencies() filter.clear(); filter.setName("Multiple currency net worth"); filter.setRowType(MyMoneyReport::eAssetLiability); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); XMLandback(filter); PivotTable networth_f( filter ); writeTabletoCSV(networth_f); @@ -497,12 +497,12 @@ void PivotTableTest::testAdvancedFilter() // amount { - TransactionHelper t1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); filter.setAmountFilter(moChild,moChild); XMLandback(filter); PivotTable spending_f( filter ); @@ -511,14 +511,14 @@ void PivotTableTest::testAdvancedFilter() // payee (specific) { - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t4( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moThomas, acCredit, acParent, QString(), "Thomas Baumgart" ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t4( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moThomas, acCredit, acParent, TQString(), "Thomas Baumgart" ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); filter.addPayee(MyMoneyFile::instance()->payeeByName("Thomas Baumgart").id()); filter.setName("Spending with Payee Filter"); XMLandback(filter); @@ -530,15 +530,15 @@ void PivotTableTest::testAdvancedFilter() } // payee (no payee) { - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t4( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moNoPayee, acCredit, acParent, QString(), QString() ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t4( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moNoPayee, acCredit, acParent, TQString(), TQString() ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); - filter.addPayee(QString()); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); + filter.addPayee(TQString()); XMLandback(filter); PivotTable spending_f( filter ); CPPUNIT_ASSERT(spending_f.m_grid["Expense"]["Parent"][acParent][eActual][11]==moNoPayee); @@ -547,24 +547,24 @@ void PivotTableTest::testAdvancedFilter() // text { - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t4( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moThomas, acCredit, acParent, QString(), "Thomas Baumgart" ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t4( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moThomas, acCredit, acParent, TQString(), "Thomas Baumgart" ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); - filter.setTextFilter(QRegExp("Thomas")); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); + filter.setTextFilter(TQRegExp("Thomas")); XMLandback(filter); PivotTable spending_f( filter ); } // type (payment, deposit, transfer) { - TransactionHelper t1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,2,1), MyMoneySplit::ActionDeposit, -moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,1), MyMoneySplit::ActionTransfer, moChild, acCredit, acChecking ); + TransactionHelper t1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,2,1), MyMoneySplit::ActionDeposit, -moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,1), MyMoneySplit::ActionTransfer, moChild, acCredit, acChecking ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); @@ -589,7 +589,7 @@ void PivotTableTest::testAdvancedFilter() CPPUNIT_ASSERT(spending_f3.m_grid.m_total[eActual].m_total == moZero); filter.setRowType(MyMoneyReport::eAssetLiability); - filter.setDateFilter( QDate(2004,1,1), QDate(2004,12,31) ); + filter.setDateFilter( TQDate(2004,1,1), TQDate(2004,12,31) ); XMLandback(filter); PivotTable networth_f4( filter ); @@ -601,12 +601,12 @@ void PivotTableTest::testAdvancedFilter() // state (reconciled, cleared, not) { - TransactionHelper t1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - QValueList<MyMoneySplit> splits = t1.splits(); + TQValueList<MyMoneySplit> splits = t1.splits(); splits[0].setReconcileFlag(MyMoneySplit::Cleared); splits[1].setReconcileFlag(MyMoneySplit::Cleared); t1.modifySplit(splits[0]); @@ -623,7 +623,7 @@ void PivotTableTest::testAdvancedFilter() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); filter.addState(MyMoneyTransactionFilter::cleared); XMLandback(filter); PivotTable spending_f( filter ); @@ -646,12 +646,12 @@ void PivotTableTest::testAdvancedFilter() // number { - TransactionHelper t1( QDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1( TQDate(2004,10,31), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - QValueList<MyMoneySplit> splits = t1.splits(); + TQValueList<MyMoneySplit> splits = t1.splits(); splits[0].setNumber("1"); splits[1].setNumber("1"); t1.modifySplit(splits[0]); @@ -684,7 +684,7 @@ void PivotTableTest::testAdvancedFilter() MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2004,1,1),QDate(2005,1,1).addDays(-1)); + filter.setDateFilter(TQDate(2004,1,1),TQDate(2005,1,1).addDays(-1)); filter.setNumberFilter("1","3"); XMLandback(filter); PivotTable spending_f( filter ); @@ -693,21 +693,21 @@ void PivotTableTest::testAdvancedFilter() // blank dates { - TransactionHelper t1y1( QDate(2003,10,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y1( QDate(2003,11,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y1( QDate(2003,12,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1y1( TQDate(2003,10,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y1( TQDate(2003,11,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y1( TQDate(2003,12,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1y2( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y2( QDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y2( QDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1y2( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y2( TQDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y2( TQDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1y3( QDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y3( QDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y3( QDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1y3( TQDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y3( TQDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y3( TQDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(),QDate(2004,7,1)); + filter.setDateFilter(TQDate(),TQDate(2004,7,1)); XMLandback(filter); PivotTable spending_f( filter ); CPPUNIT_ASSERT(spending_f.m_grid.m_total[eActual].m_total==-moSolo-moParent1-moParent2-moSolo-moParent1-moParent2); @@ -725,21 +725,21 @@ void PivotTableTest::testColumnType() { // test column type values of other than 'month' - TransactionHelper t1q1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q1( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q1( QDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1q1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q1( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q1( TQDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1q2( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q2( QDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q2( QDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1q2( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q2( TQDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q2( TQDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1y2( QDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y2( QDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y2( QDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1y2( TQDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y2( TQDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y2( TQDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); MyMoneyReport filter; filter.setRowType( MyMoneyReport::eExpenseIncome ); - filter.setDateFilter(QDate(2003,12,31),QDate(2005,12,31)); + filter.setDateFilter(TQDate(2003,12,31),TQDate(2005,12,31)); filter.setRowType( MyMoneyReport::eExpenseIncome ); filter.setColumnType(MyMoneyReport::eBiMonths); XMLandback(filter); @@ -809,19 +809,19 @@ void PivotTableTest::testColumnType() // Test days-based reports - TransactionHelper t1d1( QDate(2004,7,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2d1( QDate(2004,7,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3d1( QDate(2004,7,5), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1d1( TQDate(2004,7,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2d1( TQDate(2004,7,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3d1( TQDate(2004,7,5), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1d2( QDate(2004,7,14), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2d2( QDate(2004,7,15), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3d2( QDate(2004,7,20), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1d2( TQDate(2004,7,14), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2d2( TQDate(2004,7,15), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3d2( TQDate(2004,7,20), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t1d3( QDate(2004,8,2), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2d3( QDate(2004,8,3), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3d3( QDate(2004,8,4), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t1d3( TQDate(2004,8,2), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2d3( TQDate(2004,8,3), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3d3( TQDate(2004,8,4), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - filter.setDateFilter(QDate(2004,7,2),QDate(2004,7,14)); + filter.setDateFilter(TQDate(2004,7,2),TQDate(2004,7,14)); filter.setRowType( MyMoneyReport::eExpenseIncome ); filter.setColumnType(MyMoneyReport::eMonths); filter.setColumnsAreDays(true); @@ -837,7 +837,7 @@ void PivotTableTest::testColumnType() unsigned save_dayweekstart = KGlobal::locale()->weekStartDay(); KGlobal::locale()->setWeekStartDay(2); - filter.setDateFilter(QDate(2004,7,2),QDate(2004,8,1)); + filter.setDateFilter(TQDate(2004,7,2),TQDate(2004,8,1)); filter.setRowType( MyMoneyReport::eExpenseIncome ); filter.setColumnType(static_cast<MyMoneyReport::EColumnType>(7)); filter.setColumnsAreDays(true); @@ -868,23 +868,23 @@ void PivotTableTest::testInvestment(void) eqStock2 = makeEquity("Stock2","STK2"); // Accounts - acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,QDate(2004,1,1),acAsset); - acStock1 = makeAccount("Stock 1",MyMoneyAccount::Stock,moZero,QDate(2004,1,1),acInvestment,eqStock1); - acStock2 = makeAccount("Stock 2",MyMoneyAccount::Stock,moZero,QDate(2004,1,1),acInvestment,eqStock2); - acDividends = makeAccount("Dividends",MyMoneyAccount::Income,moZero,QDate(2004,1,1),acIncome); + acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,TQDate(2004,1,1),acAsset); + acStock1 = makeAccount("Stock 1",MyMoneyAccount::Stock,moZero,TQDate(2004,1,1),acInvestment,eqStock1); + acStock2 = makeAccount("Stock 2",MyMoneyAccount::Stock,moZero,TQDate(2004,1,1),acInvestment,eqStock2); + acDividends = makeAccount("Dividends",MyMoneyAccount::Income,moZero,TQDate(2004,1,1),acIncome); // Transactions // Date Action Shares Price Stock Asset Income - InvTransactionHelper s1b1( QDate(2004,2,1), MyMoneySplit::ActionBuyShares, 1000.00, 100.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1b2( QDate(2004,3,1), MyMoneySplit::ActionBuyShares, 1000.00, 110.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1s1( QDate(2004,4,1), MyMoneySplit::ActionBuyShares, -200.00, 120.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1s2( QDate(2004,5,1), MyMoneySplit::ActionBuyShares, -200.00, 100.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1r1( QDate(2004,6,1), MyMoneySplit::ActionReinvestDividend, 50.00, 100.00, acStock1, QString(), acDividends ); - InvTransactionHelper s1r2( QDate(2004,7,1), MyMoneySplit::ActionReinvestDividend, 50.00, 80.00, acStock1, QString(), acDividends ); - InvTransactionHelper s1c1( QDate(2004,8,1), MyMoneySplit::ActionDividend, 10.00, 100.00, acStock1, acChecking, acDividends ); - InvTransactionHelper s1c2( QDate(2004,9,1), MyMoneySplit::ActionDividend, 10.00, 120.00, acStock1, acChecking, acDividends ); + InvTransactionHelper s1b1( TQDate(2004,2,1), MyMoneySplit::ActionBuyShares, 1000.00, 100.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1b2( TQDate(2004,3,1), MyMoneySplit::ActionBuyShares, 1000.00, 110.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1s1( TQDate(2004,4,1), MyMoneySplit::ActionBuyShares, -200.00, 120.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1s2( TQDate(2004,5,1), MyMoneySplit::ActionBuyShares, -200.00, 100.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1r1( TQDate(2004,6,1), MyMoneySplit::ActionReinvestDividend, 50.00, 100.00, acStock1, TQString(), acDividends ); + InvTransactionHelper s1r2( TQDate(2004,7,1), MyMoneySplit::ActionReinvestDividend, 50.00, 80.00, acStock1, TQString(), acDividends ); + InvTransactionHelper s1c1( TQDate(2004,8,1), MyMoneySplit::ActionDividend, 10.00, 100.00, acStock1, acChecking, acDividends ); + InvTransactionHelper s1c2( TQDate(2004,9,1), MyMoneySplit::ActionDividend, 10.00, 120.00, acStock1, acChecking, acDividends ); - makeEquityPrice( eqStock1, QDate(2004,10,1), 100.00 ); + makeEquityPrice( eqStock1, TQDate(2004,10,1), 100.00 ); // // Net Worth Report (with investments) @@ -892,7 +892,7 @@ void PivotTableTest::testInvestment(void) MyMoneyReport networth_r; networth_r.setRowType( MyMoneyReport::eAssetLiability ); - networth_r.setDateFilter(QDate(2004,1,1),QDate(2004,12,31).addDays(-1)); + networth_r.setDateFilter(TQDate(2004,1,1),TQDate(2004,12,31).addDays(-1)); XMLandback(networth_r); PivotTable networth(networth_r); @@ -920,7 +920,7 @@ void PivotTableTest::testInvestment(void) #if 0 // Dump file & reports - QFile g( "investmentkmy.xml" ); + TQFile g( "investmentkmy.xml" ); g.open( IO_WriteOnly ); MyMoneyStorageXML xml; IMyMoneyStorageFormat& interface = xml; @@ -945,7 +945,7 @@ void PivotTableTest::testBudget(void) // 1. Budget on A, transations on A { BudgetHelper budget; - budget += BudgetEntryHelper( QDate(2006,1,1), acSolo, false, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acSolo, false, 100.0 ); MyMoneyReport report(MyMoneyReport::eBudgetActual, MyMoneyReport::eMonths, @@ -958,7 +958,7 @@ void PivotTableTest::testBudget(void) // 2. Budget on B, not applying to sub accounts, transactions on B and B:1 { BudgetHelper budget; - budget += BudgetEntryHelper( QDate(2006,1,1), acParent, false, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acParent, false, 100.0 ); MyMoneyReport report(MyMoneyReport::eBudgetActual, MyMoneyReport::eMonths, MyMoneyTransactionFilter::yearToDate, @@ -974,7 +974,7 @@ void PivotTableTest::testBudget(void) // 3. Budget on C, applying to sub accounts, transactions on C and C:1 and C:1:a { BudgetHelper budget; - budget += BudgetEntryHelper( QDate(2006,1,1), acParent, true, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acParent, true, 100.0 ); MyMoneyReport report(MyMoneyReport::eBudgetActual, MyMoneyReport::eMonths, MyMoneyTransactionFilter::yearToDate, @@ -989,9 +989,9 @@ void PivotTableTest::testBudget(void) // 4. Budget on D, not applying to sub accounts, budget on D:1 not applying, budget on D:2 applying. Transactions on D, D:1, D:2, D:2:a, D:2:b { BudgetHelper budget; - budget += BudgetEntryHelper( QDate(2006,1,1), acParent, false, 100.0 ); - budget += BudgetEntryHelper( QDate(2006,1,1), acChild, false, 100.0 ); - budget += BudgetEntryHelper( QDate(2006,1,1), acSecondChild, true, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acParent, false, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acChild, false, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acSecondChild, true, 100.0 ); MyMoneyReport report(MyMoneyReport::eBudgetActual, MyMoneyReport::eMonths, MyMoneyTransactionFilter::yearToDate, @@ -1003,12 +1003,12 @@ void PivotTableTest::testBudget(void) // - Totals for D, D:1, D:2 show up. D:2:a and D:2:b do not // - D actuals (only) compare against D budget // - Ditto for D:1 - // - D:2 acutals and children compare against D:2 budget + // - D:2 acutals and tqchildren compare against D:2 budget // 5. Budget on E, no transactions on E { BudgetHelper budget; - budget += BudgetEntryHelper( QDate(2006,1,1), acSolo, false, 100.0 ); + budget += BudgetEntryHelper( TQDate(2006,1,1), acSolo, false, 100.0 ); MyMoneyReport report(MyMoneyReport::eBudgetActual, MyMoneyReport::eMonths, MyMoneyTransactionFilter::yearToDate, diff --git a/kmymoney2/reports/querytable.cpp b/kmymoney2/reports/querytable.cpp index 29702c6..cc38a2f 100644 --- a/kmymoney2/reports/querytable.cpp +++ b/kmymoney2/reports/querytable.cpp @@ -25,9 +25,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluelist.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqvaluelist.h> +#include <tqfile.h> +#include <tqtextstream.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -59,7 +59,7 @@ namespace reports { // // **************************************************************************** -QDate CashFlowListItem::m_sToday = QDate::currentDate(); +TQDate CashFlowListItem::m_sToday = TQDate::tqcurrentDate(); MyMoneyMoney CashFlowListItem::NPV( double _rate ) const { @@ -158,12 +158,12 @@ double CashFlowList::calculateXIRR ( void ) const double CashFlowList::xirrResult ( double& rate ) const { - QDate date; + TQDate date; double r = rate + 1.0; double res = 0.00000;//back().value().toDouble(); - QValueList<CashFlowListItem>::const_iterator list_it = begin(); + TQValueList<CashFlowListItem>::const_iterator list_it = begin(); while( list_it != end() ) { double e_i = ( (* list_it).today().daysTo ( (* list_it).date() ) ) / 365.0; MyMoneyMoney val = (* list_it).value(); @@ -178,12 +178,12 @@ double CashFlowList::xirrResult ( double& rate ) const double CashFlowList::xirrResultDerive ( double& rate ) const { - QDate date; + TQDate date; double r = rate + 1.0; double res = 0.00000; - QValueList<CashFlowListItem>::const_iterator list_it = begin(); + TQValueList<CashFlowListItem>::const_iterator list_it = begin(); while( list_it != end() ) { double e_i = ( (* list_it).today().daysTo ( (* list_it).date() ) ) / 365.0; MyMoneyMoney val = (* list_it).value(); @@ -225,7 +225,7 @@ void CashFlowList::dumpDebug(void) const const_iterator it_item = begin(); while ( it_item != end() ) { - kdDebug(2) << (*it_item).date().toString(Qt::ISODate) << " " << (*it_item).value().toString() << endl; + kdDebug(2) << TQString((*it_item).date().toString(Qt::ISODate)) << " " << (*it_item).value().toString() << endl; ++it_item; } } @@ -334,7 +334,7 @@ void QueryTable::init(void) throw new MYMONEYEXCEPTION("QueryTable::QueryTable(): unhandled row type"); } - QString sort = m_group + "," + m_columns + ",id,rank"; + TQString sort = m_group + "," + m_columns + ",id,rank"; switch (m_config.rowType()) { case MyMoneyReport::eAccountByTopAccount: @@ -350,32 +350,32 @@ void QueryTable::init(void) unsigned qc = m_config.queryColumns(); - if ( qc & MyMoneyReport::eQCnumber ) + if ( qc & MyMoneyReport::eTQCnumber ) m_columns += ",number"; - if ( qc & MyMoneyReport::eQCpayee ) + if ( qc & MyMoneyReport::eTQCpayee ) m_columns += ",payee"; - if ( qc & MyMoneyReport::eQCcategory ) + if ( qc & MyMoneyReport::eTQCcategory ) m_columns += ",category"; - if ( qc & MyMoneyReport::eQCaccount ) + if ( qc & MyMoneyReport::eTQCaccount ) m_columns += ",account"; - if ( qc & MyMoneyReport::eQCreconciled ) + if ( qc & MyMoneyReport::eTQCreconciled ) m_columns += ",reconcileflag"; - if ( qc & MyMoneyReport::eQCmemo ) + if ( qc & MyMoneyReport::eTQCmemo ) m_columns += ",memo"; - if ( qc & MyMoneyReport::eQCaction ) + if ( qc & MyMoneyReport::eTQCaction ) m_columns += ",action"; - if ( qc & MyMoneyReport::eQCshares ) + if ( qc & MyMoneyReport::eTQCshares ) m_columns += ",shares"; - if ( qc & MyMoneyReport::eQCprice ) + if ( qc & MyMoneyReport::eTQCprice ) m_columns += ",price"; - if ( qc & MyMoneyReport::eQCperformance ) + if ( qc & MyMoneyReport::eTQCperformance ) m_columns += ",startingbal,buys,sells,reinvestincome,cashincome,return,returninvestment"; - if ( qc & MyMoneyReport::eQCloan ) + if ( qc & MyMoneyReport::eTQCloan ) { m_columns += ",payment,interest,fees"; m_postcolumns = "balance"; } - if ( qc & MyMoneyReport::eQCbalance) + if ( qc & MyMoneyReport::eTQCbalance) m_postcolumns = "balance"; TableRow::setSortCriteria(sort); @@ -417,14 +417,14 @@ void QueryTable::constructTransactionTable(void) } // support for opening and closing balances - QMap<QString, MyMoneyAccount> accts; + TQMap<TQString, MyMoneyAccount> accts; //get all transactions for this report - QValueList<MyMoneyTransaction> transactions = file->transactionList(report); - for (QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction) { + TQValueList<MyMoneyTransaction> transactions = file->transactionList(report); + for (TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction) { TableRow qA, qS; - QDate pd; + TQDate pd; qA["id"] = qS["id"] = (* it_transaction).id(); qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(Qt::ISODate); @@ -432,8 +432,8 @@ void QueryTable::constructTransactionTable(void) qA["commodity"] = qS["commodity"] = (* it_transaction).commodity(); pd = (* it_transaction).postDate(); - qA["month"] = qS["month"] = i18n("Month of %1").arg(QDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); - qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); + qA["month"] = qS["month"] = i18n("Month of %1").tqarg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); + qA["week"] = qS["week"] = i18n("Week of %1").tqarg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); qA["currency"] = qS["currency"] = ""; @@ -450,8 +450,8 @@ void QueryTable::constructTransactionTable(void) // to be the account (qA) that will have the sub-item "split" entries. we add // one transaction entry (qS) for each subsequent entry in the split. - const QValueList<MyMoneySplit>& splits = (*it_transaction).splits(); - QValueList<MyMoneySplit>::const_iterator myBegin, it_split; + const TQValueList<MyMoneySplit>& splits = (*it_transaction).splits(); + TQValueList<MyMoneySplit>::const_iterator myBegin, it_split; //S_end = splits.end(); for (it_split = splits.begin(), myBegin = splits.end(); it_split != splits.end(); ++it_split) { @@ -491,7 +491,7 @@ void QueryTable::constructTransactionTable(void) // split entries (qS) normally. bool loan_special_case = false; - if(m_config.queryColumns() & MyMoneyReport::eQCloan) { + if(m_config.queryColumns() & MyMoneyReport::eTQCloan) { ReportAccount splitAcc = (*it_split).accountId(); loan_special_case = splitAcc.isLoan(); } @@ -517,10 +517,10 @@ void QueryTable::constructTransactionTable(void) bool include_me = true; bool transaction_text = false; //indicates whether a text should be considered as a match for the transaction or for a split only - QString a_fullname = ""; - QString a_memo = ""; + TQString a_fullname = ""; + TQString a_memo = ""; unsigned int pass = 1; - QString myBeginCurrency = (file->account((*myBegin).accountId())).currencyId(); //currency of the main split + TQString myBeginCurrency = (file->account((*myBegin).accountId())).currencyId(); //currency of the main split do { MyMoneyMoney xr; ReportAccount splitAcc = (* it_split).accountId(); @@ -532,8 +532,8 @@ void QueryTable::constructTransactionTable(void) if(fraction == -1) fraction = file->baseCurrency().smallestAccountFraction(); - QString institution = splitAcc.institutionId(); - QString payee = (*it_split).payeeId(); + TQString institution = splitAcc.institutionId(); + TQString payee = (*it_split).payeeId(); //convert to base currency if ( m_config.isConvertCurrency() ) { @@ -548,8 +548,8 @@ void QueryTable::constructTransactionTable(void) if (splitAcc.isInvest()) { - // use the institution of the parent for stock accounts - institution = splitAcc.parent().institutionId(); + // use the institution of the tqparent for stock accounts + institution = splitAcc.tqparent().institutionId(); MyMoneyMoney shares = (*it_split).shares(); qA["action"] = (*it_split).action(); @@ -559,7 +559,7 @@ void QueryTable::constructTransactionTable(void) if (((*it_split).action() == MyMoneySplit::ActionBuyShares) && (*it_split).shares().isNegative()) qA["action"] = "Sell"; - qA["investaccount"] = splitAcc.parent().name(); + qA["investaccount"] = splitAcc.tqparent().name(); } if (it_split == myBegin) { @@ -671,7 +671,7 @@ void QueryTable::constructTransactionTable(void) //--- default case includes all transaction details else { - //this is when the splits are going to be shown as children of the main split + //this is when the splits are going to be shown as tqchildren of the main split if ((splits.count() > 2) && use_summary) { qA["value"] = ""; @@ -693,8 +693,8 @@ void QueryTable::constructTransactionTable(void) if (! splitAcc.isIncomeExpense()) { qA["category"] = ((*it_split).shares().isNegative()) ? - i18n("Transfer from %1").arg(splitAcc.fullName()) - : i18n("Transfer to %1").arg(splitAcc.fullName()); + i18n("Transfer from %1").tqarg(splitAcc.fullName()) + : i18n("Transfer to %1").tqarg(splitAcc.fullName()); qA["topcategory"] = splitAcc.topParentName(); qA["categorytype"] = i18n("Transfer"); } @@ -735,8 +735,8 @@ void QueryTable::constructTransactionTable(void) qS["topaccount"] = splitAcc.topParentName(); qS["category"] = ((*it_split).shares().isNegative()) - ? i18n("Transfer to %1").arg(a_fullname) - : i18n("Transfer from %1").arg(a_fullname); + ? i18n("Transfer to %1").tqarg(a_fullname) + : i18n("Transfer from %1").tqarg(a_fullname); qS["institution"] = institution.isEmpty() ? i18n("No Institution") @@ -807,14 +807,14 @@ void QueryTable::constructTransactionTable(void) return; } - QDate startDate, endDate; + TQDate startDate, endDate; report.validDateRange(startDate, endDate); - QString strStartDate = startDate.toString(Qt::ISODate); - QString strEndDate = endDate.toString(Qt::ISODate); + TQString strStartDate = startDate.toString(Qt::ISODate); + TQString strEndDate = endDate.toString(Qt::ISODate); startDate = startDate.addDays(-1); - QMap<QString, MyMoneyAccount>::const_iterator it_account, accts_end; + TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end; for (it_account = accts.begin(); it_account != accts.end(); ++it_account) { TableRow qA; @@ -827,11 +827,11 @@ void QueryTable::constructTransactionTable(void) if(fraction == -1) fraction = file->baseCurrency().smallestAccountFraction(); - QString institution = account.institutionId(); + TQString institution = account.institutionId(); - // use the institution of the parent for stock accounts + // use the institution of the tqparent for stock accounts if (account.isInvest()) - institution = account.parent().institutionId(); + institution = account.tqparent().institutionId(); MyMoneyMoney startBalance, endBalance, startPrice, endPrice; MyMoneyMoney startShares, endShares; @@ -868,7 +868,7 @@ void QueryTable::constructTransactionTable(void) qA["postdate"] = strStartDate; qA["balance"] = startBalance.convert(fraction).toString(); - qA["value"] = QString(); + qA["value"] = TQString(); qA["id"] = "A"; m_rows += qA; @@ -904,8 +904,8 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow // Account, Value on <Opening>, Buys, Sells, Income, Value on <Closing>, Return% MyMoneyReport report = m_config; - QDate startingDate; - QDate endingDate; + TQDate startingDate; + TQDate endingDate; MyMoneyMoney price; report.validDateRange( startingDate, endingDate ); startingDate = startingDate.addDays(-1); @@ -923,11 +923,11 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow { MyMoneyTransactionFilter filter; //get the transactions for the time before the report - filter.setDateFilter(QDate(), startingDate); + filter.setDateFilter(TQDate(), startingDate); filter.addAccount(account.id()); filter.setReportAllSplits(true); - QValueList<MyMoneyTransaction> startTransactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction> startTransactions = file->transactionList(filter); if(startTransactions.size() > 0) { //get the last transaction @@ -973,8 +973,8 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow report.setConsiderCategory(true); report.clearAccountFilter(); report.addAccount(account.id()); - QValueList<MyMoneyTransaction> transactions = file->transactionList( report ); - QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); + TQValueList<MyMoneyTransaction> transactions = file->transactionList( report ); + TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); while ( it_transaction != transactions.end() ) { // s is the split for the stock account @@ -990,7 +990,7 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow MyMoneyMoney value = s.value() * price; - const QString& action = s.action(); + const TQString& action = s.action(); if ( action == MyMoneySplit::ActionBuyShares ) { if ( s.value().isPositive() ) { @@ -1005,8 +1005,8 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow reinvestincome += CashFlowListItem( (*it_transaction).postDate(), value ); } else if ( action == MyMoneySplit::ActionDividend || action == MyMoneySplit::ActionYield ) { // find the split with the category, which has the actual amount of the dividend - QValueList<MyMoneySplit> splits = (*it_transaction).splits(); - QValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); + TQValueList<MyMoneySplit> splits = (*it_transaction).splits(); + TQValueList<MyMoneySplit>::const_iterator it_split = splits.begin(); bool found = false; while( it_split != splits.end() ) { ReportAccount acc = (*it_split).accountId(); @@ -1074,7 +1074,7 @@ void QueryTable::constructPerformanceRow( const ReportAccount& account, TableRow result["return"] = annualReturn.toString(); result["returninvestment"] = returnInvestment.toString(); } - catch (QString e) + catch (TQString e) { kdDebug(2) << e << endl; } @@ -1094,9 +1094,9 @@ void QueryTable::constructAccountTable(void) //make sure we have all subaccounts of investment accounts includeInvestmentSubAccounts(); - QValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount> accounts; file->accountList(accounts); - QValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); + TQValueList<MyMoneyAccount>::const_iterator it_account = accounts.begin(); while ( it_account != accounts.end() ) { ReportAccount account = *it_account; @@ -1146,9 +1146,9 @@ void QueryTable::constructAccountTable(void) qaccountrow["price"] = ( netprice.reduce() ).convert(MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision())).toString(); qaccountrow["value"] = ( netprice.reduce() * shares.reduce() ).convert(fraction).toString(); - QString iid = (*it_account).institutionId(); + TQString iid = (*it_account).institutionId(); - // If an account does not have an institution, get it from the top-parent. + // If an account does not have an institution, get it from the top-tqparent. if ( iid.isEmpty() && ! account.isTopLevel() ) { ReportAccount topaccount = account.topParent(); @@ -1169,7 +1169,7 @@ void QueryTable::constructAccountTable(void) constructPerformanceRow( account, qaccountrow ); } else - qaccountrow["equitytype"] = QString(); + qaccountrow["equitytype"] = TQString(); // don't add the account if it is closed. In fact, the business logic // should prevent that an account can be closed with a balance not equal @@ -1194,14 +1194,14 @@ void QueryTable::constructSplitsTable(void) report.setConsiderCategory(true); // support for opening and closing balances - QMap<QString, MyMoneyAccount> accts; + TQMap<TQString, MyMoneyAccount> accts; //get all transactions for this report - QValueList<MyMoneyTransaction> transactions = file->transactionList(report); - for (QValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction) { + TQValueList<MyMoneyTransaction> transactions = file->transactionList(report); + for (TQValueList<MyMoneyTransaction>::const_iterator it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction) { TableRow qA, qS; - QDate pd; + TQDate pd; qA["id"] = qS["id"] = (* it_transaction).id(); qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(Qt::ISODate); @@ -1209,8 +1209,8 @@ void QueryTable::constructSplitsTable(void) qA["commodity"] = qS["commodity"] = (* it_transaction).commodity(); pd = (* it_transaction).postDate(); - qA["month"] = qS["month"] = i18n("Month of %1").arg(QDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); - qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); + qA["month"] = qS["month"] = i18n("Month of %1").tqarg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); + qA["week"] = qS["week"] = i18n("Week of %1").tqarg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); qA["currency"] = qS["currency"] = ""; @@ -1226,8 +1226,8 @@ void QueryTable::constructSplitsTable(void) // that is not an income or expense account if there is no stock or loan account) // to be the account (qA) that will have the sub-item "split" entries. we add // one transaction entry (qS) for each subsequent entry in the split. - const QValueList<MyMoneySplit>& splits = (*it_transaction).splits(); - QValueList<MyMoneySplit>::const_iterator myBegin, it_split; + const TQValueList<MyMoneySplit>& splits = (*it_transaction).splits(); + TQValueList<MyMoneySplit>::const_iterator myBegin, it_split; //S_end = splits.end(); for (it_split = splits.begin(), myBegin = splits.end(); it_split != splits.end(); ++it_split) { @@ -1266,7 +1266,7 @@ void QueryTable::constructSplitsTable(void) // reference (loan) account (qA). however, we process the matching // split entries (qS) normally. bool loan_special_case = false; - if(m_config.queryColumns() & MyMoneyReport::eQCloan) { + if(m_config.queryColumns() & MyMoneyReport::eTQCloan) { ReportAccount splitAcc = (*it_split).accountId(); loan_special_case = splitAcc.isLoan(); } @@ -1276,8 +1276,8 @@ void QueryTable::constructSplitsTable(void) bool include_me = true; bool transaction_text = false; //indicates whether a text should be considered as a match for the transaction or for a split only - QString a_fullname = ""; - QString a_memo = ""; + TQString a_fullname = ""; + TQString a_memo = ""; unsigned int pass = 1; do { @@ -1291,8 +1291,8 @@ void QueryTable::constructSplitsTable(void) if(fraction == -1) fraction = file->baseCurrency().smallestAccountFraction(); - QString institution = splitAcc.institutionId(); - QString payee = (*it_split).payeeId(); + TQString institution = splitAcc.institutionId(); + TQString payee = (*it_split).payeeId(); if ( m_config.isConvertCurrency() ) { xr = (splitAcc.deepCurrencyPrice((*it_transaction).postDate()) * splitAcc.baseCurrencyPrice((*it_transaction).postDate())).reduce(); @@ -1308,8 +1308,8 @@ void QueryTable::constructSplitsTable(void) if (splitAcc.isInvest()) { - // use the institution of the parent for stock accounts - institution = splitAcc.parent().institutionId(); + // use the institution of the tqparent for stock accounts + institution = splitAcc.tqparent().institutionId(); MyMoneyMoney shares = (*it_split).shares(); qA["action"] = (*it_split).action(); @@ -1319,7 +1319,7 @@ void QueryTable::constructSplitsTable(void) if (((*it_split).action() == MyMoneySplit::ActionBuyShares) && (*it_split).shares().isNegative()) qA["action"] = "Sell"; - qA["investaccount"] = splitAcc.parent().name(); + qA["investaccount"] = splitAcc.tqparent().name(); } include_me = m_config.includes(splitAcc); @@ -1364,8 +1364,8 @@ void QueryTable::constructSplitsTable(void) //fill in account information if (! splitAcc.isIncomeExpense() && it_split != myBegin) { qA["account"] = ((*it_split).shares().isNegative()) ? - i18n("Transfer to %1").arg(myBeginAcc.fullName()) - : i18n("Transfer from %1").arg(myBeginAcc.fullName()); + i18n("Transfer to %1").tqarg(myBeginAcc.fullName()) + : i18n("Transfer from %1").tqarg(myBeginAcc.fullName()); } else if (it_split == myBegin ) { //handle the main split if((splits.count() > 2)) { @@ -1373,7 +1373,7 @@ void QueryTable::constructSplitsTable(void) qA["account"] = i18n("[Split Transaction]"); } else { //fill the account name of the second split - QValueList<MyMoneySplit>::const_iterator tempSplit = splits.begin(); + TQValueList<MyMoneySplit>::const_iterator tempSplit = splits.begin(); //there are supposed to be only 2 splits if we ever get here if(tempSplit == myBegin && splits.count() > 1) @@ -1383,8 +1383,8 @@ void QueryTable::constructSplitsTable(void) ReportAccount tempSplitAcc = (*tempSplit).accountId(); if (! tempSplitAcc.isIncomeExpense()) { qA["account"] = ((*it_split).shares().isNegative()) ? - i18n("Transfer to %1").arg(tempSplitAcc.fullName()) - : i18n("Transfer from %1").arg(tempSplitAcc.fullName()); + i18n("Transfer to %1").tqarg(tempSplitAcc.fullName()) + : i18n("Transfer from %1").tqarg(tempSplitAcc.fullName()); } else { qA["account"] = tempSplitAcc.fullName(); } @@ -1439,14 +1439,14 @@ void QueryTable::constructSplitsTable(void) return; } - QDate startDate, endDate; + TQDate startDate, endDate; report.validDateRange(startDate, endDate); - QString strStartDate = startDate.toString(Qt::ISODate); - QString strEndDate = endDate.toString(Qt::ISODate); + TQString strStartDate = startDate.toString(Qt::ISODate); + TQString strEndDate = endDate.toString(Qt::ISODate); startDate = startDate.addDays(-1); - QMap<QString, MyMoneyAccount>::const_iterator it_account, accts_end; + TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end; for (it_account = accts.begin(); it_account != accts.end(); ++it_account) { TableRow qA; @@ -1459,11 +1459,11 @@ void QueryTable::constructSplitsTable(void) if(fraction == -1) fraction = file->baseCurrency().smallestAccountFraction(); - QString institution = account.institutionId(); + TQString institution = account.institutionId(); - // use the institution of the parent for stock accounts + // use the institution of the tqparent for stock accounts if (account.isInvest()) - institution = account.parent().institutionId(); + institution = account.tqparent().institutionId(); MyMoneyMoney startBalance, endBalance, startPrice, endPrice; MyMoneyMoney startShares, endShares; @@ -1500,7 +1500,7 @@ void QueryTable::constructSplitsTable(void) qA["postdate"] = strStartDate; qA["balance"] = startBalance.convert(fraction).toString(); - qA["value"] = QString(); + qA["value"] = TQString(); qA["id"] = "A"; m_rows += qA; diff --git a/kmymoney2/reports/querytable.h b/kmymoney2/reports/querytable.h index 7beb3d4..e1b3918 100644 --- a/kmymoney2/reports/querytable.h +++ b/kmymoney2/reports/querytable.h @@ -23,13 +23,13 @@ * * ***************************************************************************/ -#ifndef QUERYTABLE_H -#define QUERYTABLE_H +#ifndef TQUERYTABLE_H +#define TQUERYTABLE_H // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -79,25 +79,25 @@ class CashFlowListItem { public: CashFlowListItem(void) {} - CashFlowListItem( const QDate& _date, const MyMoneyMoney& _value ): m_date(_date), m_value(_value) {} + CashFlowListItem( const TQDate& _date, const MyMoneyMoney& _value ): m_date(_date), m_value(_value) {} bool operator<( const CashFlowListItem _second ) const { return m_date < _second.m_date; } bool operator<=( const CashFlowListItem _second ) const { return m_date <= _second.m_date; } bool operator>( const CashFlowListItem _second ) const { return m_date > _second.m_date; } - const QDate& date( void ) const { return m_date; } + const TQDate& date( void ) const { return m_date; } const MyMoneyMoney& value( void ) const { return m_value; } MyMoneyMoney NPV( double _rate ) const; - static void setToday( const QDate& _today ) { m_sToday = _today; } - const QDate& today( void ) const { return m_sToday; } + static void setToday( const TQDate& _today ) { m_sToday = _today; } + const TQDate& today( void ) const { return m_sToday; } private: - QDate m_date; + TQDate m_date; MyMoneyMoney m_value; - static QDate m_sToday; + static TQDate m_sToday; }; -class CashFlowList: public QValueList<CashFlowListItem> +class CashFlowList: public TQValueList<CashFlowListItem> { public: CashFlowList(void) {} @@ -139,4 +139,4 @@ class CashFlowList: public QValueList<CashFlowListItem> } -#endif // QUERYREPORT_H +#endif // TQUERYREPORT_H diff --git a/kmymoney2/reports/querytabletest.cpp b/kmymoney2/reports/querytabletest.cpp index 8b3c579..73ab69d 100644 --- a/kmymoney2/reports/querytabletest.cpp +++ b/kmymoney2/reports/querytabletest.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqfile.h> #include <kdebug.h> #include <kdeversion.h> @@ -30,7 +30,7 @@ #include "reportstestcommon.h" #define private public -#include "querytable.h" +#include "tquerytable.h" #undef private #include "../mymoney/mymoneyaccount.h" @@ -56,7 +56,7 @@ void QueryTableTest::setUp () { MyMoneyFileTransaction ft; file->addCurrency(MyMoneySecurity("CAD", "Canadian Dollar", "C$")); file->addCurrency(MyMoneySecurity("USD", "US Dollar", "$")); - file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", QChar(0x00A5), 100, 1)); + file->addCurrency(MyMoneySecurity("JPY", "Japanese Yen", TQChar(0x00A5), 100, 1)); file->addCurrency(MyMoneySecurity("GBP", "British Pound", "#")); file->setBaseCurrency(file->currency("USD")); @@ -69,13 +69,13 @@ void QueryTableTest::setUp () { acLiability = (MyMoneyFile::instance()->liability().id()); acExpense = (MyMoneyFile::instance()->expense().id()); acIncome = (MyMoneyFile::instance()->income().id()); - acChecking = makeAccount(QString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,QDate(2004,5,15),acAsset); - acCredit = makeAccount(QString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,QDate(2004,7,15),acLiability); - acSolo = makeAccount(QString("Solo"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acParent = makeAccount(QString("Parent"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acChild = makeAccount(QString("Child"),MyMoneyAccount::Expense,0,QDate(2004,2,11),acParent); - acForeign = makeAccount(QString("Foreign"),MyMoneyAccount::Expense,0,QDate(2004,1,11),acExpense); - acTax = makeAccount(QString("Tax"), MyMoneyAccount::Expense,0,QDate(2005,1,11),acExpense, "", true); + acChecking = makeAccount(TQString("Checking Account"),MyMoneyAccount::Checkings,moCheckingOpen,TQDate(2004,5,15),acAsset); + acCredit = makeAccount(TQString("Credit Card"),MyMoneyAccount::CreditCard,moCreditOpen,TQDate(2004,7,15),acLiability); + acSolo = makeAccount(TQString("Solo"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acParent = makeAccount(TQString("Parent"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acChild = makeAccount(TQString("Child"),MyMoneyAccount::Expense,0,TQDate(2004,2,11),acParent); + acForeign = makeAccount(TQString("Foreign"),MyMoneyAccount::Expense,0,TQDate(2004,1,11),acExpense); + acTax = makeAccount(TQString("Tax"), MyMoneyAccount::Expense,0,TQDate(2005,1,11),acExpense, "", true); MyMoneyInstitution i("Bank of the World","","","","","",""); file->addInstitution(i); @@ -93,26 +93,26 @@ void QueryTableTest::testQueryBasics() { try { - TransactionHelper t1q1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q1( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q1( QDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q1( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q1( TQDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1q2( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q2( QDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q2( QDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4q2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q2( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q2( TQDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q2( TQDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4q2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1y2( QDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y2( QDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y2( QDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1y2( TQDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y2( TQDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y2( TQDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); unsigned cols; MyMoneyReport filter; filter.setRowType( MyMoneyReport::eCategory ); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCaccount; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCaccount; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // filter.setName("Transactions by Category"); XMLandback(filter); @@ -120,7 +120,7 @@ void QueryTableTest::testQueryBasics() writeTabletoHTML(qtbl_1,"Transactions by Category.html"); - QValueList<ListTable::TableRow> rows = qtbl_1.rows(); + TQValueList<ListTable::TableRow> rows = qtbl_1.rows(); CPPUNIT_ASSERT(rows.count() == 12); CPPUNIT_ASSERT(rows[0]["categorytype"]=="Expense"); @@ -130,14 +130,14 @@ void QueryTableTest::testQueryBasics() CPPUNIT_ASSERT(rows[11]["category"]=="Solo"); CPPUNIT_ASSERT(rows[11]["postdate"]=="2005-01-01"); - QString html = qtbl_1.renderHTML(); + TQString html = qtbl_1.renderHTML(); CPPUNIT_ASSERT( searchHTML(html,i18n("Total")+" Parent") == -(moParent1 + moParent2) * 3 ); CPPUNIT_ASSERT( searchHTML(html,i18n("Total")+" Parent: Child") == -(moChild) * 3 ); CPPUNIT_ASSERT( searchHTML(html,i18n("Total")+" Solo") == -(moSolo) * 3 ); CPPUNIT_ASSERT( searchHTML(html,i18n("Total")+" Expense") == -(moParent1 + moParent2 + moSolo + moChild) * 3 ); CPPUNIT_ASSERT( searchHTML(html,i18n("Grand Total")) == -(moParent1 + moParent2 + moSolo + moChild) * 3 + moCheckingOpen + moCreditOpen ); filter.setRowType( MyMoneyReport::eTopCategory ); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCaccount; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCaccount; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // filter.setName("Transactions by Top Category"); XMLandback(filter); @@ -166,7 +166,7 @@ void QueryTableTest::testQueryBasics() filter.setRowType( MyMoneyReport::eAccount ); filter.setName("Transactions by Account"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCcategory; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCcategory; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // XMLandback(filter); QueryTable qtbl_3(filter); @@ -200,7 +200,7 @@ void QueryTableTest::testQueryBasics() filter.setRowType( MyMoneyReport::ePayee ); filter.setName("Transactions by Payee"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCmemo | MyMoneyReport::eQCcategory; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCmemo | MyMoneyReport::eTQCcategory; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // XMLandback(filter); QueryTable qtbl_4(filter); @@ -226,7 +226,7 @@ void QueryTableTest::testQueryBasics() filter.setRowType( MyMoneyReport::eMonth ); filter.setName("Transactions by Month"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCcategory; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCcategory; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // XMLandback(filter); QueryTable qtbl_5(filter); @@ -254,7 +254,7 @@ void QueryTableTest::testQueryBasics() filter.setRowType( MyMoneyReport::eWeek ); filter.setName("Transactions by Week"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCcategory; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCcategory; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // XMLandback(filter); QueryTable qtbl_6(filter); @@ -311,23 +311,23 @@ void QueryTableTest::testCashFlowAnalysis() CashFlowList list; - list += CashFlowListItem( QDate(2004,5,3),1000.0 ); - list += CashFlowListItem( QDate(2004,5,20),59.0 ); - list += CashFlowListItem( QDate(2004,6,3),14.0 ); - list += CashFlowListItem( QDate(2004,6,24),92.0 ); - list += CashFlowListItem( QDate(2004,7,6),63.0 ); - list += CashFlowListItem( QDate(2004,7,25),15.0 ); - list += CashFlowListItem( QDate(2004,8,5),92.0 ); - list += CashFlowListItem( QDate(2004,9,2),18.0 ); - list += CashFlowListItem( QDate(2004,9,21),5.0 ); - list += CashFlowListItem( QDate(2004,10,16),-2037.0 ); + list += CashFlowListItem( TQDate(2004,5,3),1000.0 ); + list += CashFlowListItem( TQDate(2004,5,20),59.0 ); + list += CashFlowListItem( TQDate(2004,6,3),14.0 ); + list += CashFlowListItem( TQDate(2004,6,24),92.0 ); + list += CashFlowListItem( TQDate(2004,7,6),63.0 ); + list += CashFlowListItem( TQDate(2004,7,25),15.0 ); + list += CashFlowListItem( TQDate(2004,8,5),92.0 ); + list += CashFlowListItem( TQDate(2004,9,2),18.0 ); + list += CashFlowListItem( TQDate(2004,9,21),5.0 ); + list += CashFlowListItem( TQDate(2004,10,16),-2037.0 ); MyMoneyMoney IRR(list.IRR(),1000); CPPUNIT_ASSERT( IRR == MyMoneyMoney(1676,1000) ); list.pop_back(); - list += CashFlowListItem( QDate(2004,10,16),-1358.0 ); + list += CashFlowListItem( TQDate(2004,10,16),-1358.0 ); IRR = MyMoneyMoney( list.IRR(), 1000 ); @@ -338,7 +338,7 @@ void QueryTableTest::testAccountQuery() { try { - QString htmlcontext = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"html/kmymoney2.css\"></head><body>\n%1\n</body></html>\n"); + TQString htmlcontext = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"html/kmymoney2.css\"></head><body>\n%1\n</body></html>\n"); // // No transactions, opening balances only @@ -352,7 +352,7 @@ void QueryTableTest::testAccountQuery() writeTabletoHTML(qtbl_1,"Accounts by Institution (No transactions).html"); - QValueList<ListTable::TableRow> rows = qtbl_1.rows(); + TQValueList<ListTable::TableRow> rows = qtbl_1.rows(); CPPUNIT_ASSERT(rows.count() == 2); CPPUNIT_ASSERT(rows[0]["account"]=="Checking Account"); @@ -362,7 +362,7 @@ void QueryTableTest::testAccountQuery() CPPUNIT_ASSERT(MyMoneyMoney(rows[1]["value"])==moCreditOpen); CPPUNIT_ASSERT(rows[1]["equitytype"].isEmpty()); - QString html = qtbl_1.renderHTML(); + TQString html = qtbl_1.renderHTML(); CPPUNIT_ASSERT( searchHTML(html,i18n("Total")+" None") == moCheckingOpen+moCreditOpen ); CPPUNIT_ASSERT( searchHTML(html,i18n("Grand Total")) == moCheckingOpen+moCreditOpen ); @@ -370,20 +370,20 @@ void QueryTableTest::testAccountQuery() // Adding in transactions // - TransactionHelper t1q1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q1( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q1( QDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q1( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q1( TQDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1q2( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q2( QDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q2( QDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4q2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q2( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q2( TQDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q2( TQDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4q2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1y2( QDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y2( QDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y2( QDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1y2( TQDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y2( TQDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y2( TQDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); filter.setRowType( MyMoneyReport::eInstitution ); filter.setName("Accounts by Institution (With Transactions)"); @@ -439,25 +439,25 @@ void QueryTableTest::testInvestment(void) eqStock2 = makeEquity("Stock2","STK2"); // Accounts - acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,QDate(2004,1,1),acAsset); - acStock1 = makeAccount("Stock 1",MyMoneyAccount::Stock,moZero,QDate(2004,1,1),acInvestment,eqStock1); - acStock2 = makeAccount("Stock 2",MyMoneyAccount::Stock,moZero,QDate(2004,1,1),acInvestment,eqStock2); - acDividends = makeAccount("Dividends",MyMoneyAccount::Income,moZero,QDate(2004,1,1),acIncome); - acInterest = makeAccount("Interest",MyMoneyAccount::Income,moZero,QDate(2004,1,1),acIncome); + acInvestment = makeAccount("Investment",MyMoneyAccount::Investment,moZero,TQDate(2004,1,1),acAsset); + acStock1 = makeAccount("Stock 1",MyMoneyAccount::Stock,moZero,TQDate(2004,1,1),acInvestment,eqStock1); + acStock2 = makeAccount("Stock 2",MyMoneyAccount::Stock,moZero,TQDate(2004,1,1),acInvestment,eqStock2); + acDividends = makeAccount("Dividends",MyMoneyAccount::Income,moZero,TQDate(2004,1,1),acIncome); + acInterest = makeAccount("Interest",MyMoneyAccount::Income,moZero,TQDate(2004,1,1),acIncome); // Transactions // Date Action Shares Price Stock Asset Income - InvTransactionHelper s1b1( QDate(2004,2,1), MyMoneySplit::ActionBuyShares, 1000.00, 100.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1b2( QDate(2004,3,1), MyMoneySplit::ActionBuyShares, 1000.00, 110.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1s1( QDate(2004,4,1), MyMoneySplit::ActionBuyShares, -200.00, 120.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1s2( QDate(2004,5,1), MyMoneySplit::ActionBuyShares, -200.00, 100.00, acStock1, acChecking, QString() ); - InvTransactionHelper s1r1( QDate(2004,6,1), MyMoneySplit::ActionReinvestDividend, 50.00, 100.00, acStock1, QString(), acDividends ); - InvTransactionHelper s1r2( QDate(2004,7,1), MyMoneySplit::ActionReinvestDividend, 50.00, 80.00, acStock1, QString(), acDividends ); - InvTransactionHelper s1c1( QDate(2004,8,1), MyMoneySplit::ActionDividend, 10.00, 100.00, acStock1, acChecking, acDividends ); - InvTransactionHelper s1c2( QDate(2004,9,1), MyMoneySplit::ActionDividend, 10.00, 120.00, acStock1, acChecking, acDividends ); - InvTransactionHelper s1y1( QDate(2004,9,15), MyMoneySplit::ActionYield, 10.00, 110.00, acStock1, acChecking, acInterest ); - - makeEquityPrice( eqStock1, QDate(2004,10,1), 100.00 ); + InvTransactionHelper s1b1( TQDate(2004,2,1), MyMoneySplit::ActionBuyShares, 1000.00, 100.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1b2( TQDate(2004,3,1), MyMoneySplit::ActionBuyShares, 1000.00, 110.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1s1( TQDate(2004,4,1), MyMoneySplit::ActionBuyShares, -200.00, 120.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1s2( TQDate(2004,5,1), MyMoneySplit::ActionBuyShares, -200.00, 100.00, acStock1, acChecking, TQString() ); + InvTransactionHelper s1r1( TQDate(2004,6,1), MyMoneySplit::ActionReinvestDividend, 50.00, 100.00, acStock1, TQString(), acDividends ); + InvTransactionHelper s1r2( TQDate(2004,7,1), MyMoneySplit::ActionReinvestDividend, 50.00, 80.00, acStock1, TQString(), acDividends ); + InvTransactionHelper s1c1( TQDate(2004,8,1), MyMoneySplit::ActionDividend, 10.00, 100.00, acStock1, acChecking, acDividends ); + InvTransactionHelper s1c2( TQDate(2004,9,1), MyMoneySplit::ActionDividend, 10.00, 120.00, acStock1, acChecking, acDividends ); + InvTransactionHelper s1y1( TQDate(2004,9,15), MyMoneySplit::ActionYield, 10.00, 110.00, acStock1, acChecking, acInterest ); + + makeEquityPrice( eqStock1, TQDate(2004,10,1), 100.00 ); // // Investment Transactions Report @@ -465,13 +465,13 @@ void QueryTableTest::testInvestment(void) MyMoneyReport invtran_r( MyMoneyReport::eTopAccount, - MyMoneyReport::eQCaction|MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCaction|MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::userDefined, MyMoneyReport::eDetailAll, i18n("Investment Transactions"), i18n("Test Report") ); - invtran_r.setDateFilter(QDate(2004,1,1),QDate(2004,12,31)); + invtran_r.setDateFilter(TQDate(2004,1,1),TQDate(2004,12,31)); invtran_r.setInvestmentsOnly(true); XMLandback(invtran_r); QueryTable invtran(invtran_r); @@ -479,7 +479,7 @@ void QueryTableTest::testInvestment(void) #if 1 writeTabletoHTML(invtran,"investment_transactions_test.html"); - QValueList<ListTable::TableRow> rows = invtran.rows(); + TQValueList<ListTable::TableRow> rows = invtran.rows(); CPPUNIT_ASSERT(rows.count()==17); CPPUNIT_ASSERT(MyMoneyMoney(rows[1]["value"])==MyMoneyMoney(100000.00)); @@ -541,7 +541,7 @@ void QueryTableTest::testInvestment(void) CPPUNIT_ASSERT(rows[8]["action"]=="Yield"); #endif - QString html = invtran.renderHTML(); + TQString html = invtran.renderHTML(); #if 1 // i think this is the correct amount. different treatment of dividend and yield CPPUNIT_ASSERT( searchHTML(html,i18n("Total Stock 1")) == MyMoneyMoney(175000.00) ); @@ -557,13 +557,13 @@ void QueryTableTest::testInvestment(void) MyMoneyReport invhold_r( MyMoneyReport::eAccountByTopAccount, - MyMoneyReport::eQCperformance, + MyMoneyReport::eTQCperformance, MyMoneyTransactionFilter::userDefined, MyMoneyReport::eDetailAll, i18n("Investment Performance by Account"), i18n("Test Report") ); - invhold_r.setDateFilter(QDate(2004,1,1),QDate(2004,10,1)); + invhold_r.setDateFilter(TQDate(2004,1,1),TQDate(2004,10,1)); invhold_r.setInvestmentsOnly(true); XMLandback(invhold_r); QueryTable invhold(invhold_r); @@ -587,7 +587,7 @@ void QueryTableTest::testInvestment(void) #if 0 // Dump file & reports - QFile g( "investmentkmy.xml" ); + TQFile g( "investmentkmy.xml" ); g.open( IO_WriteOnly ); MyMoneyStorageXML xml; IMyMoneyStorageFormat& interface = xml; @@ -611,20 +611,20 @@ void QueryTableTest::testInvestment(void) { try { - TransactionHelper t1q1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q1( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q1( QDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y1( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q1( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q1( TQDate(2004,3,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y1( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1q2( QDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q2( QDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3q2( QDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4q2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1q2( TQDate(2004,4,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q2( TQDate(2004,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3q2( TQDate(2004,6,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4q2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); - TransactionHelper t1y2( QDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2y2( QDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); - TransactionHelper t3y2( QDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); - TransactionHelper t4y2( QDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); + TransactionHelper t1y2( TQDate(2005,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2y2( TQDate(2005,5,1), MyMoneySplit::ActionWithdrawal, moParent1, acCredit, acParent ); + TransactionHelper t3y2( TQDate(2005,9,1), MyMoneySplit::ActionWithdrawal, moParent2, acCredit, acParent ); + TransactionHelper t4y2( TQDate(2004,11,7), MyMoneySplit::ActionWithdrawal, moChild, acCredit, acChild ); unsigned cols; @@ -632,25 +632,25 @@ void QueryTableTest::testInvestment(void) filter.setRowType( MyMoneyReport::eAccount ); filter.setName("Transactions by Account"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCcategory | MyMoneyReport::eQCbalance; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCcategory | MyMoneyReport::eTQCbalance; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); // XMLandback(filter); QueryTable qtbl_3(filter); writeTabletoHTML(qtbl_3,"Transactions by Account.html"); - QString html = qtbl_3.renderHTML(); + TQString html = qtbl_3.renderHTML(); - QValueList<ListTable::TableRow> rows = qtbl_3.rows(); + TQValueList<ListTable::TableRow> rows = qtbl_3.rows(); CPPUNIT_ASSERT(rows.count() == 16); //this is to make sure that the dates of closing and opening balances and the balance numbers are ok - QString openingDate = KGlobal::locale()->formatDate(QDate(2004,1,1), true); - QString closingDate = KGlobal::locale()->formatDate(QDate(2005,9,1), true); - CPPUNIT_ASSERT( html.find(openingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Opening Balance")) > 0); - CPPUNIT_ASSERT( html.find(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -702.36</td></tr>") > 0); - CPPUNIT_ASSERT( html.find(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -705.69</td></tr>") > 0); + TQString openingDate = KGlobal::locale()->formatDate(TQDate(2004,1,1), true); + TQString closingDate = KGlobal::locale()->formatDate(TQDate(2005,9,1), true); + CPPUNIT_ASSERT( html.tqfind(openingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Opening Balance")) > 0); + CPPUNIT_ASSERT( html.tqfind(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -702.36</td></tr>") > 0); + CPPUNIT_ASSERT( html.tqfind(closingDate + "</td><td class=\"left\"></td><td class=\"left\">"+i18n("Closing Balance")+"</td><td class=\"left\"></td><td class=\"value\"></td><td> -705.69</td></tr>") > 0); } catch(MyMoneyException *e) @@ -664,15 +664,15 @@ void QueryTableTest::testInvestment(void) void QueryTableTest::testTaxReport() { try { - TransactionHelper t1q1( QDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); - TransactionHelper t2q1( QDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acChecking, acTax ); + TransactionHelper t1q1( TQDate(2004,1,1), MyMoneySplit::ActionWithdrawal, moSolo, acChecking, acSolo ); + TransactionHelper t2q1( TQDate(2004,2,1), MyMoneySplit::ActionWithdrawal, moParent1, acChecking, acTax ); unsigned cols; MyMoneyReport filter; filter.setRowType( MyMoneyReport::eCategory ); filter.setName("Tax Transactions"); - cols = MyMoneyReport::eQCnumber | MyMoneyReport::eQCpayee | MyMoneyReport::eQCaccount; + cols = MyMoneyReport::eTQCnumber | MyMoneyReport::eTQCpayee | MyMoneyReport::eTQCaccount; filter.setQueryColumns( static_cast<MyMoneyReport::EQueryColumns>(cols) ); filter.setTax(true); @@ -681,9 +681,9 @@ void QueryTableTest::testTaxReport() writeTabletoHTML(qtbl_3,"Tax Transactions.html"); - QValueList<ListTable::TableRow> rows = qtbl_3.rows(); + TQValueList<ListTable::TableRow> rows = qtbl_3.rows(); - QString html = qtbl_3.renderHTML(); + TQString html = qtbl_3.renderHTML(); CPPUNIT_ASSERT(rows.count() == 1); } catch(MyMoneyException *e) { CPPUNIT_FAIL(e->what()); diff --git a/kmymoney2/reports/querytabletest.h b/kmymoney2/reports/querytabletest.h index 36f3075..af5ae4b 100644 --- a/kmymoney2/reports/querytabletest.h +++ b/kmymoney2/reports/querytabletest.h @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#ifndef QUERYTABLETEST_H -#define QUERYTABLETEST_H +#ifndef TQUERYTABLETEST_H +#define TQUERYTABLETEST_H #include <cppunit/extensions/HelperMacros.h> #include "../mymoney/mymoneyfile.h" diff --git a/kmymoney2/reports/reportaccount.cpp b/kmymoney2/reports/reportaccount.cpp index 5f7e7f8..d38727d 100644 --- a/kmymoney2/reports/reportaccount.cpp +++ b/kmymoney2/reports/reportaccount.cpp @@ -52,11 +52,11 @@ ReportAccount::ReportAccount( const ReportAccount& copy ): DEBUG_ENTER(__PRETTY_FUNCTION__); } -ReportAccount::ReportAccount( const QString& accountid ): +ReportAccount::ReportAccount( const TQString& accountid ): MyMoneyAccount( MyMoneyFile::instance()->account(accountid) ) { DEBUG_ENTER(__PRETTY_FUNCTION__); - DEBUG_OUTPUT(QString("Account %1").arg(accountid)); + DEBUG_OUTPUT(TQString("Account %1").tqarg(accountid)); calculateAccountHierarchy(); } @@ -64,7 +64,7 @@ ReportAccount::ReportAccount( const MyMoneyAccount& account ): MyMoneyAccount( account ) { DEBUG_ENTER(__PRETTY_FUNCTION__); - DEBUG_OUTPUT(QString("Account %1").arg(account.id())); + DEBUG_OUTPUT(TQString("Account %1").tqarg(account.id())); calculateAccountHierarchy(); } @@ -73,21 +73,21 @@ void ReportAccount::calculateAccountHierarchy( void ) DEBUG_ENTER(__PRETTY_FUNCTION__); MyMoneyFile* file = MyMoneyFile::instance(); - QString resultid = id(); - QString parentid = parentAccountId(); + TQString resultid = id(); + TQString tqparentid = tqparentAccountId(); #ifdef DEBUG_HIDE_SENSITIVE m_nameHierarchy.prepend(file->account(resultid).id()); #else m_nameHierarchy.prepend(file->account(resultid).name()); #endif - while (!file->isStandardAccount(parentid)) + while (!file->isStandardAccount(tqparentid)) { - // take on the identity of our parent - resultid = parentid; + // take on the identity of our tqparent + resultid = tqparentid; // and try again - parentid = file->account(resultid).parentAccountId(); + tqparentid = file->account(resultid).tqparentAccountId(); #ifdef DEBUG_HIDE_SENSITIVE m_nameHierarchy.prepend(file->account(resultid).id()); #else @@ -96,7 +96,7 @@ void ReportAccount::calculateAccountHierarchy( void ) } } -MyMoneyMoney ReportAccount::deepCurrencyPrice( const QDate& date ) const +MyMoneyMoney ReportAccount::deepCurrencyPrice( const TQDate& date ) const { DEBUG_ENTER(__PRETTY_FUNCTION__); @@ -111,25 +111,25 @@ MyMoneyMoney ReportAccount::deepCurrencyPrice( const QDate& date ) const { result = price.rate(undersecurity.tradingCurrency()); - DEBUG_OUTPUT(QString("Converting under %1 to deep %2, price on %3 is %4") - .arg(undersecurity.name()) - .arg(file->security(undersecurity.tradingCurrency()).name()) - .arg(date.toString()) - .arg(result.toDouble())); + DEBUG_OUTPUT(TQString("Converting under %1 to deep %2, price on %3 is %4") + .tqarg(undersecurity.name()) + .tqarg(file->security(undersecurity.tradingCurrency()).name()) + .tqarg(date.toString()) + .tqarg(result.toDouble())); } else { - DEBUG_OUTPUT(QString("No price to convert under %1 to deep %2 on %3") - .arg(undersecurity.name()) - .arg(file->security(undersecurity.tradingCurrency()).name()) - .arg(date.toString())); + DEBUG_OUTPUT(TQString("No price to convert under %1 to deep %2 on %3") + .tqarg(undersecurity.name()) + .tqarg(file->security(undersecurity.tradingCurrency()).name()) + .tqarg(date.toString())); } } return result; } -MyMoneyMoney ReportAccount::baseCurrencyPrice( const QDate& date ) const +MyMoneyMoney ReportAccount::baseCurrencyPrice( const TQDate& date ) const { // Note that whether or not the user chooses to convert to base currency, all the values // for a given account/category are converted to the currency for THAT account/category @@ -156,7 +156,7 @@ MyMoneyMoney ReportAccount::baseCurrencyPrice( const QDate& date ) const return result; } -MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency, const QDate& date ) const +MyMoneyMoney ReportAccount::foreignCurrencyPrice( const TQString foreignCurrency, const TQDate& date ) const { DEBUG_ENTER(__PRETTY_FUNCTION__); @@ -166,7 +166,7 @@ MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency, MyMoneySecurity security = file->security(foreignCurrency); //check whether it is a currency or a commodity. In the latter case case, get the trading currency - QString tradingCurrency; + TQString tradingCurrency; if(security.isCurrency()) { tradingCurrency = foreignCurrency; } else { @@ -180,18 +180,18 @@ MyMoneyMoney ReportAccount::foreignCurrencyPrice( const QString foreignCurrency, if(price.isValid()) { result = price.rate(tradingCurrency); - DEBUG_OUTPUT(QString("Converting deep %1 to currency %2, price on %3 is %4") - .arg(file->currency(currency().id()).name()) - .arg(file->currency(foreignCurrency).name()) - .arg(date.toString()) - .arg(result.toDouble())); + DEBUG_OUTPUT(TQString("Converting deep %1 to currency %2, price on %3 is %4") + .tqarg(file->currency(currency().id()).name()) + .tqarg(file->currency(foreignCurrency).name()) + .tqarg(date.toString()) + .tqarg(result.toDouble())); } else { - DEBUG_OUTPUT(QString("No price to convert deep %1 to currency %2 on %3") - .arg(file->currency(currency().id()).name()) - .arg(file->currency(foreignCurrency).name()) - .arg(date.toString())); + DEBUG_OUTPUT(TQString("No price to convert deep %1 to currency %2 on %3") + .tqarg(file->currency(currency().id()).name()) + .tqarg(file->currency(foreignCurrency).name()) + .tqarg(date.toString())); } } return result; @@ -232,8 +232,8 @@ bool ReportAccount::operator<(const ReportAccount& second) const bool result = false; bool haveresult = false; - QStringList::const_iterator it_first = m_nameHierarchy.begin(); - QStringList::const_iterator it_second = second.m_nameHierarchy.begin(); + TQStringList::const_iterator it_first = m_nameHierarchy.begin(); + TQStringList::const_iterator it_second = second.m_nameHierarchy.begin(); while ( it_first != m_nameHierarchy.end() ) { // The first string is longer than the second, but otherwise identical @@ -265,7 +265,7 @@ bool ReportAccount::operator<(const ReportAccount& second) const if ( !haveresult && ( it_second != second.m_nameHierarchy.end() ) ) result = true; -// DEBUG_OUTPUT(QString("%1 < %2 is %3").arg(debugName(),second.debugName()).arg(result)); +// DEBUG_OUTPUT(TQString("%1 < %2 is %3").tqarg(debugName(),second.debugName()).tqarg(result)); return result; } @@ -274,21 +274,21 @@ bool ReportAccount::operator<(const ReportAccount& second) const * method only returns the last name in the list, which is the engine name] * of this account. * - * @return QString The account's name + * @return TQString The account's name */ -QString ReportAccount::name( void ) const +TQString ReportAccount::name( void ) const { return m_nameHierarchy.back(); } // MyMoneyAccount:fullHierarchyDebug() -QString ReportAccount::debugName( void ) const +TQString ReportAccount::debugName( void ) const { return m_nameHierarchy.join("|"); } // MyMoneyAccount:fullHierarchy() -QString ReportAccount::fullName( void ) const +TQString ReportAccount::fullName( void ) const { return m_nameHierarchy.join(": "); } @@ -305,9 +305,9 @@ unsigned ReportAccount::hierarchyDepth( void ) const return ( m_nameHierarchy.size() ); } -ReportAccount ReportAccount::parent( void ) const +ReportAccount ReportAccount::tqparent( void ) const { - return ReportAccount( parentAccountId() ); + return ReportAccount( tqparentAccountId() ); } ReportAccount ReportAccount::topParent( void ) const @@ -315,22 +315,22 @@ ReportAccount ReportAccount::topParent( void ) const DEBUG_ENTER(__PRETTY_FUNCTION__); MyMoneyFile* file = MyMoneyFile::instance(); - QString resultid = id(); - QString parentid = parentAccountId(); + TQString resultid = id(); + TQString tqparentid = tqparentAccountId(); - while (!file->isStandardAccount(parentid)) + while (!file->isStandardAccount(tqparentid)) { - // take on the identity of our parent - resultid = parentid; + // take on the identity of our tqparent + resultid = tqparentid; // and try again - parentid = file->account(resultid).parentAccountId(); + tqparentid = file->account(resultid).tqparentAccountId(); } return ReportAccount( resultid ); } -QString ReportAccount::topParentName( void ) const +TQString ReportAccount::topParentName( void ) const { return m_nameHierarchy.first(); } diff --git a/kmymoney2/reports/reportaccount.h b/kmymoney2/reports/reportaccount.h index e07f9b1..91db6a2 100644 --- a/kmymoney2/reports/reportaccount.h +++ b/kmymoney2/reports/reportaccount.h @@ -22,7 +22,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstringlist.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -54,20 +54,20 @@ namespace reports { class ReportAccount: public MyMoneyAccount { private: - QStringList m_nameHierarchy; + TQStringList m_nameHierarchy; public: /** * Default constructor * - * Needed to allow this object to be stored in a QMap. + * Needed to allow this object to be stored in a TQMap. */ ReportAccount( void ); /** * Copy constructor * - * Needed to allow this object to be stored in a QMap. + * Needed to allow this object to be stored in a TQMap. */ ReportAccount( const ReportAccount& ); @@ -76,7 +76,7 @@ public: * * @param accountid Account which this account descriptor should be based off of */ - ReportAccount( const QString& accountid ); + ReportAccount( const TQString& accountid ); /** * Regular constructor @@ -110,7 +110,7 @@ public: * @param date The date in question * @return MyMoneyMoney The value of the account's currency on that date */ - MyMoneyMoney deepCurrencyPrice( const QDate& date ) const; + MyMoneyMoney deepCurrencyPrice( const TQDate& date ) const; /** * Returns the price of this account's deep currency on the indicated date, @@ -119,7 +119,7 @@ public: * @param date The date in question * @return MyMoneyMoney The value of the account's currency on that date */ - MyMoneyMoney baseCurrencyPrice( const QDate& date ) const; + MyMoneyMoney baseCurrencyPrice( const TQDate& date ) const; /** * Returns the price of this account's deep currency on the indicated date, @@ -129,7 +129,7 @@ public: * @param date The date in question * @return MyMoneyMoney The value of the account's currency on that date */ - MyMoneyMoney foreignCurrencyPrice( const QString foreignCurrency, const QDate& date ) const; + MyMoneyMoney foreignCurrencyPrice( const TQString foreignCurrency, const TQDate& date ) const; /** * Fetch the trading symbol of this account's deep currency @@ -151,9 +151,9 @@ public: * method only returns the last name in the list, which is the engine name] * of this account. * - * @return QString The account's name + * @return TQString The account's name */ - QString name( void ) const; + TQString name( void ) const; /** * The entire hierarchy of this account descriptor @@ -161,52 +161,52 @@ public: * to always look pretty, while fullName() is. So if the user is ever * going to see the results, use fullName(). * - * @return QString The account's full hierarchy + * @return TQString The account's full hierarchy */ - QString fullName( void ) const; + TQString fullName( void ) const; /** * The entire hierarchy of this account descriptor, suitable for displaying * in debugging output * - * @return QString The account's full hierarchy (suitable for debugging) + * @return TQString The account's full hierarchy (suitable for debugging) */ - QString debugName( void ) const; + TQString debugName( void ) const; /** - * Whether this account is a 'top level' parent account. This means that - * it's parent is an account class, like asset, liability, expense or income + * Whether this account is a 'top level' tqparent account. This means that + * it's tqparent is an account class, like asset, liability, expense or income * - * @return bool True if this account is a top level parent account + * @return bool True if this account is a top level tqparent account */ /*inline*/ bool isTopLevel( void ) const; /** - * Returns the name of the top level parent account + * Returns the name of the top level tqparent account * - * (See isTopLevel for a definition of 'top level parent') + * (See isTopLevel for a definition of 'top level tqparent') * - * @return QString The name of the top level parent account + * @return TQString The name of the top level tqparent account */ - /*inline*/ QString topParentName( void ) const; + /*inline*/ TQString topParentName( void ) const; /** - * Returns a report account containing the top parent account + * Returns a report account containing the top tqparent account * - * @return ReportAccount The account of the top parent + * @return ReportAccount The account of the top tqparent */ ReportAccount topParent( void ) const; /** - * Returns a report account containing the immediate parent account + * Returns a report account containing the immediate tqparent account * - * @return ReportAccount The account of the immediate parent + * @return ReportAccount The account of the immediate tqparent */ - ReportAccount parent( void ) const; + ReportAccount tqparent( void ) const; /** * Returns the number of accounts in this account's hierarchy. If this is a - * Top Category, it returns 1. If it's parent is a Top Category, returns 2, + * Top Category, it returns 1. If it's tqparent is a Top Category, returns 2, * etc. * * @return unsigned Hierarchy depth diff --git a/kmymoney2/reports/reportdebug.h b/kmymoney2/reports/reportdebug.h index 3a95465..2e822d0 100644 --- a/kmymoney2/reports/reportdebug.h +++ b/kmymoney2/reports/reportdebug.h @@ -49,7 +49,7 @@ namespace reports { #define DEBUG_ENABLE(x) Debug::enable(x) #define DEBUG_ENABLE_KEY(x) Debug::setEnableKey(x) #ifdef DEBUG_HIDE_SENSITIVE -#define DEBUG_SENSITIVE(x) QString("hidden") +#define DEBUG_SENSITIVE(x) TQString("hidden") #else #define DEBUG_SENSITIVE(x) (x) #endif @@ -65,17 +65,17 @@ namespace reports { class Debug { - QString m_methodName; - static QString m_sTabs; + TQString m_methodName; + static TQString m_sTabs; static bool m_sEnabled; bool m_enabled; - static QString m_sEnableKey; + static TQString m_sEnableKey; public: - Debug( const QString& _name ); + Debug( const TQString& _name ); ~Debug(); - void output( const QString& _text ); + void output( const TQString& _text ); static void enable( bool _e ) { m_sEnabled = _e; } - static void setEnableKey( const QString& _s ) { m_sEnableKey = _s; } + static void setEnableKey( const TQString& _s ) { m_sEnableKey = _s; } }; } // end namespace reports diff --git a/kmymoney2/reports/reportstestcommon.cpp b/kmymoney2/reports/reportstestcommon.cpp index 31e6c1d..7d42abc 100644 --- a/kmymoney2/reports/reportstestcommon.cpp +++ b/kmymoney2/reports/reportstestcommon.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qdom.h> -#include <qfile.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqdom.h> +#include <tqfile.h> #include <kdebug.h> #include <kdeversion.h> @@ -31,7 +31,7 @@ #define private public #include "pivottable.h" -#include "querytable.h" +#include "tquerytable.h" #undef private using namespace reports; @@ -58,35 +58,35 @@ const MyMoneyMoney moChild(14.00); const MyMoneyMoney moThomas(5.11); const MyMoneyMoney moNoPayee(8944.70); -QString acAsset; -QString acLiability; -QString acExpense; -QString acIncome; -QString acChecking; -QString acCredit; -QString acSolo; -QString acParent; -QString acChild; -QString acSecondChild; -QString acGrandChild1; -QString acGrandChild2; -QString acForeign; -QString acCanChecking; -QString acJpyChecking; -QString acCanCash; -QString acJpyCash; -QString inBank; -QString eqStock1; -QString eqStock2; -QString acInvestment; -QString acStock1; -QString acStock2; -QString acDividends; -QString acInterest; -QString acTax; -QString acCash; - -TransactionHelper::TransactionHelper( const QDate& _date, const QString& _action, MyMoneyMoney _value, const QString& _accountid, const QString& _categoryid, const QString& _currencyid, const QString& _payee ) +TQString acAsset; +TQString acLiability; +TQString acExpense; +TQString acIncome; +TQString acChecking; +TQString acCredit; +TQString acSolo; +TQString acParent; +TQString acChild; +TQString acSecondChild; +TQString acGrandChild1; +TQString acGrandChild2; +TQString acForeign; +TQString acCanChecking; +TQString acJpyChecking; +TQString acCanCash; +TQString acJpyCash; +TQString inBank; +TQString eqStock1; +TQString eqStock2; +TQString acInvestment; +TQString acStock1; +TQString acStock2; +TQString acDividends; +TQString acInterest; +TQString acTax; +TQString acCash; + +TransactionHelper::TransactionHelper( const TQDate& _date, const TQString& _action, MyMoneyMoney _value, const TQString& _accountid, const TQString& _categoryid, const TQString& _currencyid, const TQString& _payee ) { // _currencyid is the currency of the transaction, and of the _value // both the account and category can have their own currency (athough the category having @@ -100,7 +100,7 @@ TransactionHelper::TransactionHelper( const QDate& _date, const QString& _action MyMoneyFileTransaction ft; setPostDate(_date); - QString currencyid = _currencyid; + TQString currencyid = _currencyid; if ( currencyid.isEmpty() ) currencyid=MyMoneyFile::instance()->baseCurrency().id(); setCommodity(currencyid); @@ -144,12 +144,12 @@ void TransactionHelper::update(void) ft.commit(); } -InvTransactionHelper::InvTransactionHelper( const QDate& _date, const QString& _action, MyMoneyMoney _shares, MyMoneyMoney _price, const QString& _stockaccountid, const QString& _transferid, const QString& _categoryid ) +InvTransactionHelper::InvTransactionHelper( const TQDate& _date, const TQString& _action, MyMoneyMoney _shares, MyMoneyMoney _price, const TQString& _stockaccountid, const TQString& _transferid, const TQString& _categoryid ) { init(_date, _action, _shares, _price, _stockaccountid, _transferid, _categoryid); } -void InvTransactionHelper::init( const QDate& _date, const QString& _action, MyMoneyMoney _shares, MyMoneyMoney _price, const QString& _stockaccountid, const QString& _transferid, const QString& _categoryid ) +void InvTransactionHelper::init( const TQDate& _date, const TQString& _action, MyMoneyMoney _shares, MyMoneyMoney _price, const TQString& _stockaccountid, const TQString& _transferid, const TQString& _categoryid ) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount stockaccount = file->account(_stockaccountid); @@ -216,8 +216,8 @@ void InvTransactionHelper::init( const QDate& _date, const QString& _action, MyM //kdDebug(2) << "updating price..." << endl; // update the price, while we're here - QString stockid = stockaccount.currencyId(); - QString basecurrencyid = file->baseCurrency().id(); + TQString stockid = stockaccount.currencyId(); + TQString basecurrencyid = file->baseCurrency().id(); MyMoneyPrice price = file->price( stockid, basecurrencyid, _date, true ); if ( !price.isValid() ) { @@ -228,7 +228,7 @@ void InvTransactionHelper::init( const QDate& _date, const QString& _action, MyM //kdDebug(2) << "successfully added " << id() << endl; } -QString makeAccount( const QString& _name, MyMoneyAccount::accountTypeE _type, MyMoneyMoney _balance, const QDate& _open, const QString& _parent, QString _currency, bool _taxReport ) +TQString makeAccount( const TQString& _name, MyMoneyAccount::accountTypeE _type, MyMoneyMoney _balance, const TQDate& _open, const TQString& _parent, TQString _currency, bool _taxReport ) { MyMoneyAccount info; MyMoneyFileTransaction ft; @@ -244,8 +244,8 @@ QString makeAccount( const QString& _name, MyMoneyAccount::accountTypeE _type, M if(_taxReport) info.setValue("Tax", "Yes"); - MyMoneyAccount parent = MyMoneyFile::instance()->account(_parent); - MyMoneyFile::instance()->addAccount( info, parent ); + MyMoneyAccount tqparent = MyMoneyFile::instance()->account(_parent); + MyMoneyFile::instance()->addAccount( info, tqparent ); // create the opening balance transaction if any if(!_balance.isZero()) { MyMoneySecurity sec = MyMoneyFile::instance()->currency(info.currencyId()); @@ -257,7 +257,7 @@ QString makeAccount( const QString& _name, MyMoneyAccount::accountTypeE _type, M return info.id(); } -void makePrice(const QString& _currencyid, const QDate& _date, const MyMoneyMoney& _price ) +void makePrice(const TQString& _currencyid, const TQDate& _date, const MyMoneyMoney& _price ) { MyMoneyFileTransaction ft; MyMoneyFile* file = MyMoneyFile::instance(); @@ -267,7 +267,7 @@ void makePrice(const QString& _currencyid, const QDate& _date, const MyMoneyMone ft.commit(); } -QString makeEquity(const QString& _name, const QString& _symbol ) +TQString makeEquity(const TQString& _name, const TQString& _symbol ) { MyMoneySecurity equity; MyMoneyFileTransaction ft; @@ -282,11 +282,11 @@ QString makeEquity(const QString& _name, const QString& _symbol ) return equity.id(); } -void makeEquityPrice(const QString& _id, const QDate& _date, const MyMoneyMoney& _price ) +void makeEquityPrice(const TQString& _id, const TQDate& _date, const MyMoneyMoney& _price ) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFileTransaction ft; - QString basecurrencyid = file->baseCurrency().id(); + TQString basecurrencyid = file->baseCurrency().id(); MyMoneyPrice price = file->price( _id, basecurrencyid, _date, true ); if ( !price.isValid() ) { @@ -296,114 +296,114 @@ void makeEquityPrice(const QString& _id, const QDate& _date, const MyMoneyMoney& ft.commit(); } -void writeRCFtoXMLDoc( const MyMoneyReport& filter, QDomDocument* doc ) +void writeRCFtoXMLDoc( const MyMoneyReport& filter, TQDomDocument* doc ) { - QDomProcessingInstruction instruct = doc->createProcessingInstruction(QString("xml"), QString("version=\"1.0\" encoding=\"utf-8\"")); + TQDomProcessingInstruction instruct = doc->createProcessingInstruction(TQString("xml"), TQString("version=\"1.0\" encoding=\"utf-8\"")); doc->appendChild(instruct); - QDomElement root = doc->createElement("KMYMONEY-FILE"); + TQDomElement root = doc->createElement("KMYMONEY-FILE"); doc->appendChild(root); - QDomElement reports = doc->createElement("REPORTS"); + TQDomElement reports = doc->createElement("REPORTS"); root.appendChild(reports); - QDomElement report = doc->createElement("REPORT"); + TQDomElement report = doc->createElement("REPORT"); filter.write(report,doc); reports.appendChild(report); } -void writeTabletoHTML( const PivotTable& table, const QString& _filename ) +void writeTabletoHTML( const PivotTable& table, const TQString& _filename ) { static unsigned filenumber = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("report-%1%2.html").arg((filenumber<10)?"0":"").arg(filenumber); + filename = TQString("report-%1%2.html").tqarg((filenumber<10)?"0":"").tqarg(filenumber); ++filenumber; } - QFile g( filename ); + TQFile g( filename ); g.open( IO_WriteOnly ); - QTextStream(&g) << table.renderHTML(); + TQTextStream(&g) << table.renderHTML(); g.close(); } -void writeTabletoHTML( const QueryTable& table, const QString& _filename ) +void writeTabletoHTML( const QueryTable& table, const TQString& _filename ) { static unsigned filenumber = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("report-%1%2.html").arg((filenumber<10)?"0":"").arg(filenumber); + filename = TQString("report-%1%2.html").tqarg((filenumber<10)?"0":"").tqarg(filenumber); ++filenumber; } - QFile g( filename ); + TQFile g( filename ); g.open( IO_WriteOnly ); - QTextStream(&g) << table.renderHTML(); + TQTextStream(&g) << table.renderHTML(); g.close(); } -void writeTabletoCSV( const PivotTable& table, const QString& _filename ) +void writeTabletoCSV( const PivotTable& table, const TQString& _filename ) { static unsigned filenumber = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("report-%1%2.csv").arg((filenumber<10)?"0":"").arg(filenumber); + filename = TQString("report-%1%2.csv").tqarg((filenumber<10)?"0":"").tqarg(filenumber); ++filenumber; } - QFile g( filename ); + TQFile g( filename ); g.open( IO_WriteOnly ); - QTextStream(&g) << table.renderCSV(); + TQTextStream(&g) << table.renderCSV(); g.close(); } -void writeTabletoCSV( const QueryTable& table, const QString& _filename ) +void writeTabletoCSV( const QueryTable& table, const TQString& _filename ) { static unsigned filenumber = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("qreport-%1%2.csv").arg((filenumber<10)?"0":"").arg(filenumber); + filename = TQString("qreport-%1%2.csv").tqarg((filenumber<10)?"0":"").tqarg(filenumber); ++filenumber; } - QFile g( filename ); + TQFile g( filename ); g.open( IO_WriteOnly ); - QTextStream(&g) << table.renderCSV(); + TQTextStream(&g) << table.renderCSV(); g.close(); } -void writeRCFtoXML( const MyMoneyReport& filter, const QString& _filename ) +void writeRCFtoXML( const MyMoneyReport& filter, const TQString& _filename ) { static unsigned filenum = 1; - QString filename = _filename; + TQString filename = _filename; if ( filename.isEmpty() ) { - filename = QString("report-%1%2.xml").arg(QString::number(filenum).rightJustify(2, '0')); + filename = TQString("report-%1%2.xml").tqarg(TQString::number(filenum).rightJustify(2, '0')); ++filenum; } - QDomDocument* doc = new QDomDocument("KMYMONEY-FILE"); + TQDomDocument* doc = new TQDomDocument("KMYMONEY-FILE"); Q_CHECK_PTR(doc); writeRCFtoXMLDoc(filter,doc); - QFile g( filename ); + TQFile g( filename ); g.open( IO_WriteOnly ); - QTextStream stream(&g); + TQTextStream stream(&g); #if KDE_IS_VERSION(3,2,0) - stream.setEncoding(QTextStream::UnicodeUTF8); + stream.setEncoding(TQTextStream::UnicodeUTF8); stream << doc->toString(); #else - //stream.setEncoding(QTextStream::Locale); - QString temp = doc->toString(); + //stream.setEncoding(TQTextStream::Locale); + TQString temp = doc->toString(); stream << temp.data(); #endif g.close(); @@ -411,21 +411,21 @@ void writeRCFtoXML( const MyMoneyReport& filter, const QString& _filename ) delete doc; } -bool readRCFfromXMLDoc( QValueList<MyMoneyReport>& list, QDomDocument* doc ) +bool readRCFfromXMLDoc( TQValueList<MyMoneyReport>& list, TQDomDocument* doc ) { bool result = false; - QDomElement rootElement = doc->documentElement(); + TQDomElement rootElement = doc->documentElement(); if(!rootElement.isNull()) { - QDomNode child = rootElement.firstChild(); + TQDomNode child = rootElement.firstChild(); while(!child.isNull() && child.isElement()) { - QDomElement childElement = child.toElement(); + TQDomElement childElement = child.toElement(); if("REPORTS" == childElement.tagName()) { result = true; - QDomNode subchild = child.firstChild(); + TQDomNode subchild = child.firstChild(); while(!subchild.isNull() && subchild.isElement()) { MyMoneyReport filter; @@ -442,12 +442,12 @@ bool readRCFfromXMLDoc( QValueList<MyMoneyReport>& list, QDomDocument* doc ) return result; } -bool readRCFfromXML( QValueList<MyMoneyReport>& list, const QString& filename ) +bool readRCFfromXML( TQValueList<MyMoneyReport>& list, const TQString& filename ) { int result = false; - QFile f( filename ); + TQFile f( filename ); f.open( IO_ReadOnly ); - QDomDocument* doc = new QDomDocument; + TQDomDocument* doc = new TQDomDocument; if(doc->setContent(&f, FALSE)) { result = readRCFfromXMLDoc(list,doc); @@ -465,11 +465,11 @@ void XMLandback( MyMoneyReport& filter ) // in all cases, the result should be the same if the read // & write methods are working correctly. - QDomDocument* doc = new QDomDocument("KMYMONEY-FILE"); + TQDomDocument* doc = new TQDomDocument("KMYMONEY-FILE"); Q_CHECK_PTR(doc); writeRCFtoXMLDoc(filter,doc); - QValueList<MyMoneyReport> list; + TQValueList<MyMoneyReport> list; if ( readRCFfromXMLDoc(list,doc) && list.count() > 0 ) filter = list[0]; else @@ -479,11 +479,11 @@ void XMLandback( MyMoneyReport& filter ) } -MyMoneyMoney searchHTML(const QString& _html, const QString& _search) +MyMoneyMoney searchHTML(const TQString& _html, const TQString& _search) { - QRegExp re(QString("%1[<>/td]*([\\-.0-9,]*)").arg(_search)); + TQRegExp re(TQString("%1[<>/td]*([\\-.0-9,]*)").tqarg(_search)); re.search(_html); - QString found = re.cap(1); + TQString found = re.cap(1); found.remove(','); return MyMoneyMoney(found.toDouble()); diff --git a/kmymoney2/reports/reportstestcommon.h b/kmymoney2/reports/reportstestcommon.h index 6f4826e..a3f40fd 100644 --- a/kmymoney2/reports/reportstestcommon.h +++ b/kmymoney2/reports/reportstestcommon.h @@ -18,8 +18,8 @@ #ifndef REPORTSTESTCOMMON_H #define REPORTSTESTCOMMON_H -#include <qvaluelist.h> -class QDomDocument; +#include <tqvaluelist.h> +class TQDomDocument; #include "../mymoney/mymoneyaccount.h" #include "../mymoney/mymoneytransaction.h" @@ -46,40 +46,40 @@ extern const MyMoneyMoney moChild; extern const MyMoneyMoney moThomas; extern const MyMoneyMoney moNoPayee; -extern QString acAsset; -extern QString acLiability; -extern QString acExpense; -extern QString acIncome; -extern QString acChecking; -extern QString acCredit; -extern QString acSolo; -extern QString acParent; -extern QString acChild; -extern QString acSecondChild; -extern QString acGrandChild1; -extern QString acGrandChild2; -extern QString acForeign; -extern QString acCanChecking; -extern QString acJpyChecking; -extern QString acCanCash; -extern QString acJpyCash; -extern QString inBank; -extern QString eqStock1; -extern QString eqStock2; -extern QString acInvestment; -extern QString acStock1; -extern QString acStock2; -extern QString acDividends; -extern QString acInterest; -extern QString acTax; -extern QString acCash; +extern TQString acAsset; +extern TQString acLiability; +extern TQString acExpense; +extern TQString acIncome; +extern TQString acChecking; +extern TQString acCredit; +extern TQString acSolo; +extern TQString acParent; +extern TQString acChild; +extern TQString acSecondChild; +extern TQString acGrandChild1; +extern TQString acGrandChild2; +extern TQString acForeign; +extern TQString acCanChecking; +extern TQString acJpyChecking; +extern TQString acCanCash; +extern TQString acJpyCash; +extern TQString inBank; +extern TQString eqStock1; +extern TQString eqStock2; +extern TQString acInvestment; +extern TQString acStock1; +extern TQString acStock2; +extern TQString acDividends; +extern TQString acInterest; +extern TQString acTax; +extern TQString acCash; class TransactionHelper: public MyMoneyTransaction { private: - QString m_id; + TQString m_id; public: - TransactionHelper( const QDate& _date, const QString& _action, MyMoneyMoney _value, const QString& _accountid, const QString& _categoryid, const QString& _currencyid = QString(), const QString& _payee="Test Payee" ); + TransactionHelper( const TQDate& _date, const TQString& _action, MyMoneyMoney _value, const TQString& _accountid, const TQString& _categoryid, const TQString& _currencyid = TQString(), const TQString& _payee="Test Payee" ); ~TransactionHelper(); void update(void); protected: @@ -89,42 +89,42 @@ protected: class InvTransactionHelper: public TransactionHelper { public: - InvTransactionHelper( const QDate& _date, const QString& _action, MyMoneyMoney _shares, MyMoneyMoney _value, const QString& _stockaccountid, const QString& _transferid, const QString& _categoryid ); - void init( const QDate& _date, const QString& _action, MyMoneyMoney _shares, MyMoneyMoney _value, const QString& _stockaccountid, const QString& _transferid, const QString& _categoryid ); + InvTransactionHelper( const TQDate& _date, const TQString& _action, MyMoneyMoney _shares, MyMoneyMoney _value, const TQString& _stockaccountid, const TQString& _transferid, const TQString& _categoryid ); + void init( const TQDate& _date, const TQString& _action, MyMoneyMoney _shares, MyMoneyMoney _value, const TQString& _stockaccountid, const TQString& _transferid, const TQString& _categoryid ); }; class BudgetEntryHelper { private: - QDate m_date; - QString m_categoryid; + TQDate m_date; + TQString m_categoryid; bool m_applytosub; MyMoneyMoney m_amount; public: BudgetEntryHelper( void ): m_applytosub(false) {} - BudgetEntryHelper( const QDate& _date, const QString& _categoryid, bool _applytosub, const MyMoneyMoney& _amount ): m_date(_date), m_categoryid(_categoryid), m_applytosub(_applytosub), m_amount(_amount) {} + BudgetEntryHelper( const TQDate& _date, const TQString& _categoryid, bool _applytosub, const MyMoneyMoney& _amount ): m_date(_date), m_categoryid(_categoryid), m_applytosub(_applytosub), m_amount(_amount) {} }; -class BudgetHelper: public QValueList<BudgetEntryHelper> +class BudgetHelper: public TQValueList<BudgetEntryHelper> { - MyMoneyMoney budgetAmount( const QDate& _date, const QString& _categoryid, bool& _applytosub ); + MyMoneyMoney budgetAmount( const TQDate& _date, const TQString& _categoryid, bool& _applytosub ); }; -extern QString makeAccount( const QString& _name, MyMoneyAccount::accountTypeE _type, MyMoneyMoney _balance, const QDate& _open, const QString& _parent, QString _currency="", bool _taxReport = false ); -extern void makePrice(const QString& _currencyid, const QDate& _date, const MyMoneyMoney& _price ); -QString makeEquity(const QString& _name, const QString& _symbol ); -extern void makeEquityPrice(const QString& _id, const QDate& _date, const MyMoneyMoney& _price ); -extern void writeRCFtoXMLDoc( const MyMoneyReport& filter, QDomDocument* doc ); -extern void writeTabletoHTML( const reports::PivotTable& table, const QString& _filename = QString() ); -extern void writeTabletoHTML( const reports::QueryTable& table, const QString& _filename = QString() ); -extern void writeTabletoCSV( const reports::PivotTable& table, const QString& _filename = QString() ); -extern void writeTabletoCSV( const reports::QueryTable& table, const QString& _filename = QString() ); -extern void writeRCFtoXML( const MyMoneyReport& filter, const QString& _filename = QString() ); -extern bool readRCFfromXMLDoc( QValueList<MyMoneyReport>& list, QDomDocument* doc ); -extern bool readRCFfromXML( QValueList<MyMoneyReport>& list, const QString& filename ); +extern TQString makeAccount( const TQString& _name, MyMoneyAccount::accountTypeE _type, MyMoneyMoney _balance, const TQDate& _open, const TQString& _parent, TQString _currency="", bool _taxReport = false ); +extern void makePrice(const TQString& _currencyid, const TQDate& _date, const MyMoneyMoney& _price ); +TQString makeEquity(const TQString& _name, const TQString& _symbol ); +extern void makeEquityPrice(const TQString& _id, const TQDate& _date, const MyMoneyMoney& _price ); +extern void writeRCFtoXMLDoc( const MyMoneyReport& filter, TQDomDocument* doc ); +extern void writeTabletoHTML( const reports::PivotTable& table, const TQString& _filename = TQString() ); +extern void writeTabletoHTML( const reports::QueryTable& table, const TQString& _filename = TQString() ); +extern void writeTabletoCSV( const reports::PivotTable& table, const TQString& _filename = TQString() ); +extern void writeTabletoCSV( const reports::QueryTable& table, const TQString& _filename = TQString() ); +extern void writeRCFtoXML( const MyMoneyReport& filter, const TQString& _filename = TQString() ); +extern bool readRCFfromXMLDoc( TQValueList<MyMoneyReport>& list, TQDomDocument* doc ); +extern bool readRCFfromXML( TQValueList<MyMoneyReport>& list, const TQString& filename ); extern void XMLandback( MyMoneyReport& filter ); -extern MyMoneyMoney searchHTML(const QString& _html, const QString& _search); +extern MyMoneyMoney searchHTML(const TQString& _html, const TQString& _search); } // end namespace test diff --git a/kmymoney2/reports/reporttable.h b/kmymoney2/reports/reporttable.h index 3bab330..a05ff51 100644 --- a/kmymoney2/reports/reporttable.h +++ b/kmymoney2/reports/reporttable.h @@ -42,10 +42,10 @@ protected: ReportTable() {} public: virtual ~ReportTable() {} - virtual QString renderHTML(void) const = 0; - virtual QString renderCSV(void) const = 0; + virtual TQString renderHTML(void) const = 0; + virtual TQString renderCSV(void) const = 0; virtual void drawChart(KReportChartView& view) const = 0; - virtual void dump(const QString& file, const QString& context=QString()) const = 0; + virtual void dump(const TQString& file, const TQString& context=TQString()) const = 0; }; } diff --git a/kmymoney2/views/kaccountsview.cpp b/kmymoney2/views/kaccountsview.cpp index b0800cd..f84bf63 100644 --- a/kmymoney2/views/kaccountsview.cpp +++ b/kmymoney2/views/kaccountsview.cpp @@ -17,10 +17,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qtabwidget.h> -#include <qpixmap.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqtabwidget.h> +#include <tqpixmap.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,8 +43,8 @@ #include "../kmymoney2.h" -KMyMoneyAccountIconItem::KMyMoneyAccountIconItem(QIconView *parent, const MyMoneyAccount& account) : - KIconViewItem(parent, account.name()), +KMyMoneyAccountIconItem::KMyMoneyAccountIconItem(TQIconView *tqparent, const MyMoneyAccount& account) : + KIconViewItem(tqparent, account.name()), m_account(account), m_reconcileFlag(false) { @@ -68,29 +68,29 @@ void KMyMoneyAccountIconItem::updateAccount(const MyMoneyAccount& account) setPixmap(account.accountPixmap(m_reconcileFlag)); } -KAccountsView::KAccountsView(QWidget *parent, const char *name) : - KAccountsViewDecl(parent,name), +KAccountsView::KAccountsView(TQWidget *tqparent, const char *name) : + KAccountsViewDecl(tqparent,name), m_assetItem(0), m_liabilityItem(0) { // create the searchline widget - // and insert it into the existing layout - m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->parentWidget()); - QVBoxLayout* layout = dynamic_cast<QVBoxLayout*>(m_accountTree->parentWidget()->layout()); - if(layout) { - layout->insertWidget(0, m_searchWidget); + // and insert it into the existing tqlayout + m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->tqparentWidget()); + TQVBoxLayout* tqlayout = dynamic_cast<TQVBoxLayout*>(m_accountTree->tqparentWidget()->tqlayout()); + if(tqlayout) { + tqlayout->insertWidget(0, m_searchWidget); } // setup icons for collapse and expand button KIconLoader *ic = KGlobal::iconLoader(); KGuiItem collapseGuiItem("", - QIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)), - QString(), - QString()); + TQIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)), + TQString(), + TQString()); KGuiItem expandGuiItem("", - QIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)), - QString(), - QString()); + TQIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)), + TQString(), + TQString()); m_collapseButton->setGuiItem(collapseGuiItem); m_expandButton->setGuiItem(expandGuiItem); @@ -101,21 +101,21 @@ KAccountsView::KAccountsView(QWidget *parent, const char *name) : config->setGroup("Last Use Settings"); m_tab->setCurrentPage(config->readNumEntry("KAccountsView_LastType", 0)); - connect(m_tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotTabChanged(QWidget*))); + connect(m_tab, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotTabChanged(TQWidget*))); - connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateNetWorth(void))); - connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateNetWorth(void))); + connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))); - connect(m_accountIcons, SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(slotSelectIcon(QIconViewItem*))); - connect(m_accountIcons, SIGNAL(rightButtonClicked(QIconViewItem*, const QPoint&)), this, SLOT(slotOpenContext(QIconViewItem*))); - connect(m_accountIcons, SIGNAL(executed(QIconViewItem*)), this, SLOT(slotOpenObject(QIconViewItem*))); + connect(m_accountIcons, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(slotSelectIcon(TQIconViewItem*))); + connect(m_accountIcons, TQT_SIGNAL(rightButtonClicked(TQIconViewItem*, const TQPoint&)), this, TQT_SLOT(slotOpenContext(TQIconViewItem*))); + connect(m_accountIcons, TQT_SIGNAL(executed(TQIconViewItem*)), this, TQT_SLOT(slotOpenObject(TQIconViewItem*))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts())); - connect(m_collapseButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse())); - connect(m_expandButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts())); + connect(m_collapseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse())); + connect(m_expandButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse())); } KAccountsView::~KAccountsView() @@ -137,7 +137,7 @@ void KAccountsView::slotLoadAccounts(void) slotTabChanged(m_tab->currentPage()); } -void KAccountsView::slotTabChanged(QWidget* _tab) +void KAccountsView::slotTabChanged(TQWidget* _tab) { AccountsViewTab tab = static_cast<AccountsViewTab>(m_tab->indexOf(_tab)); @@ -196,7 +196,7 @@ void KAccountsView::polish(void) { // don't forget base class implementation KAccountsViewDecl::polish(); - m_accountTree->setResizeMode(QListView::LastColumn); + m_accountTree->setResizeMode(TQListView::LastColumn); m_accountTree->restoreLayout("Account View Settings"); } @@ -222,7 +222,7 @@ void KAccountsView::loadIconView(void) ::timetrace("start load accounts icon view"); // remember the positions of the icons - QMap<QString, QPoint> posMap; + TQMap<TQString, TQPoint> posMap; KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(m_accountIcons->firstItem()); for(;p; p = dynamic_cast<KMyMoneyAccountIconItem*>(p->nextItem())) posMap[p->itemObject().id()] = p->pos(); @@ -232,16 +232,16 @@ void KAccountsView::loadIconView(void) // clear the current contents and recreate it m_accountIcons->clear(); - QMap<QString, MyMoneyAccount> accountMap; + TQMap<TQString, MyMoneyAccount> accountMap; MyMoneyFile* file = MyMoneyFile::instance(); // get account list and sort by name - QValueList<MyMoneyAccount> alist; + TQValueList<MyMoneyAccount> alist; file->accountList(alist); - QValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount>::const_iterator it_a; for(it_a = alist.begin(); it_a != alist.end(); ++it_a) { - accountMap[QString("%1-%2").arg((*it_a).name()).arg((*it_a).id())] = *it_a; + accountMap[TQString("%1-%2").tqarg((*it_a).name()).tqarg((*it_a).id())] = *it_a; } bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked() @@ -249,12 +249,12 @@ void KAccountsView::loadIconView(void) bool existNewIcons = false; // parse list and add all asset and liability accounts - QMap<QString, MyMoneyAccount>::const_iterator it; + TQMap<TQString, MyMoneyAccount>::const_iterator it; for(it = accountMap.begin(); it != accountMap.end(); ++it) { - QPoint loc; + TQPoint loc; if((*it).isClosed() && !showClosedAccounts) continue; - const QString& pos = (*it).value("kmm-iconpos"); + const TQString& pos = (*it).value("kmm-iconpos"); KMyMoneyAccountIconItem* item; switch((*it).accountGroup()) { case MyMoneyAccount::Equity: @@ -271,12 +271,12 @@ void KAccountsView::loadIconView(void) // if we have a position stored with the object and no other // idea of it's current position, then take the one // stored inside the object. Also, turn off auto arrangement - if(!pos.isEmpty() && posMap[(*it).id()] == QPoint()) { + if(!pos.isEmpty() && posMap[(*it).id()] == TQPoint()) { posMap[(*it).id()] = point(pos); } loc = posMap[(*it).id()]; - if(loc == QPoint()) { + if(loc == TQPoint()) { existNewIcons = true; } else { m_accountIcons->setAutoArrange(false); @@ -286,7 +286,7 @@ void KAccountsView::loadIconView(void) if((*it).id() == m_reconciliationAccount.id()) item->setReconciliation(true); - if(loc != QPoint()) { + if(loc != TQPoint()) { item->move(loc); } break; @@ -311,15 +311,15 @@ void KAccountsView::loadIconView(void) void KAccountsView::loadListView(void) { - QMap<QString, bool> isOpen; + TQMap<TQString, bool> isOpen; ::timetrace("start load accounts list view"); // remember the id of the current selected item KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem(); - QString selectedItemId = (item) ? item->id() : QString(); + TQString selectedItemId = (item) ? item->id() : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item && item->isOpen()) { @@ -329,7 +329,7 @@ void KAccountsView::loadListView(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_accountTree->setUpdatesEnabled(false); @@ -344,9 +344,9 @@ void KAccountsView::loadListView(void) MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySecurity> slist = file->currencyList(); + TQValueList<MyMoneySecurity> slist = file->currencyList(); slist += file->securityList(); - QValueList<MyMoneySecurity>::const_iterator it_s; + TQValueList<MyMoneySecurity>::const_iterator it_s; for(it_s = slist.begin(); it_s != slist.end(); ++it_s) { m_securityMap[(*it_s).id()] = *it_s; } @@ -388,13 +388,13 @@ void KAccountsView::loadListView(void) // scan through the list of accounts and re-expand those that were // expanded and re-select the one that was probably selected before - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.find(item->id()) != isOpen.end()) + if(isOpen.tqfind(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -403,11 +403,11 @@ void KAccountsView::loadListView(void) // reposition viewport m_accountTree->setContentsPos(startPoint.x(), startPoint.y()); - m_searchWidget->searchLine()->updateSearch(QString::null); + m_searchWidget->searchLine()->updateSearch(TQString()); // turn updates back on m_accountTree->setUpdatesEnabled(true); - m_accountTree->repaintContents(); + m_accountTree->tqrepaintContents(); // and in case we need to show things expanded, we'll do so if(KMyMoneyGlobalSettings::showAccountsExpanded()) @@ -419,7 +419,7 @@ void KAccountsView::loadListView(void) ::timetrace("done load accounts list view"); } -bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList) +bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -427,10 +427,10 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked() || !KMyMoneyGlobalSettings::hideClosedAccounts(); - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { const MyMoneyAccount& acc = file->account(*it_a); - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.isInvest()) { @@ -452,7 +452,7 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri delete e; } - KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security); + KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security); if(acc.id() == m_reconciliationAccount.id()) item->setReconciliation(true); @@ -478,14 +478,14 @@ bool KAccountsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStri return unused; } -void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance) +void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance) { Q_UNUSED(reconciliationDate); Q_UNUSED(endingBalance); // scan through the list of accounts and mark all non // expanded and re-select the one that was probably selected before - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); KMyMoneyAccountTreeItem* item; while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); @@ -506,7 +506,7 @@ void KAccountsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate& if(!acc.id().isEmpty()) { // scan through the list of accounts and mark // the one that is currently reconciled - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item && item->itemObject().id() == acc.id()) { @@ -534,19 +534,19 @@ void KAccountsView::slotUpdateNetWorth(void) MyMoneyMoney netWorth = m_assetItem->totalValue() - m_liabilityItem->totalValue(); - QString s(i18n("Net Worth: ")); + TQString s(i18n("Net Worth: ")); // FIXME figure out how to deal with the approximate // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.replace(QString(" "), QString(" ")); + s.tqreplace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); - QString v(netWorth.formatMoney(sec)); - s += v.replace(QString(" "), QString(" ")); + TQString v(netWorth.formatMoney(sec)); + s += v.tqreplace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "</font></b>"; } @@ -560,42 +560,42 @@ KMyMoneyAccountIconItem* KAccountsView::selectedIcon(void) const return dynamic_cast<KMyMoneyAccountIconItem*>(m_accountIcons->currentItem()); } -void KAccountsView::slotSelectIcon(QIconViewItem* item) +void KAccountsView::slotSelectIcon(TQIconViewItem* item) { KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item); if(p) emit selectObject(p->itemObject()); } -void KAccountsView::slotOpenContext(QIconViewItem* item) +void KAccountsView::slotOpenContext(TQIconViewItem* item) { KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item); if(p) emit openContextMenu(p->itemObject()); } -void KAccountsView::slotOpenObject(QIconViewItem* item) +void KAccountsView::slotOpenObject(TQIconViewItem* item) { KMyMoneyAccountIconItem* p = dynamic_cast<KMyMoneyAccountIconItem*>(item); if(p) emit openObject(p->itemObject()); } -QString KAccountsView::point(const QPoint& val) const +TQString KAccountsView::point(const TQPoint& val) const { - return QString("%1;%2").arg(val.x()).arg(val.y()); + return TQString("%1;%2").tqarg(val.x()).tqarg(val.y()); } -QPoint KAccountsView::point(const QString& val) const +TQPoint KAccountsView::point(const TQString& val) const { - QRegExp exp("(\\d+);(\\d+)"); + TQRegExp exp("(\\d+);(\\d+)"); int x = 0; int y = 0; if(exp.search(val) != -1) { x = exp.cap(1).toInt(); y = exp.cap(2).toInt(); } - return QPoint(x, y); + return TQPoint(x, y); } void KAccountsView::slotUpdateIconPos(unsigned int action) diff --git a/kmymoney2/views/kaccountsview.h b/kmymoney2/views/kaccountsview.h index ed30ac5..33a787c 100644 --- a/kmymoney2/views/kaccountsview.h +++ b/kmymoney2/views/kaccountsview.h @@ -49,12 +49,12 @@ public: /** * Constructor to be used to construct an account icon object. * - * @param parent pointer to the KIconView object this entry should be + * @param tqparent pointer to the KIconView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KIconView entry is constructed */ - KMyMoneyAccountIconItem(QIconView *parent, const MyMoneyAccount& account); + KMyMoneyAccountIconItem(TQIconView *tqparent, const MyMoneyAccount& account); ~KMyMoneyAccountIconItem(); /** @@ -87,10 +87,11 @@ private: class KAccountsView : public KAccountsViewDecl { Q_OBJECT + TQ_OBJECT private: public: - KAccountsView(QWidget *parent=0, const char *name=0); + KAccountsView(TQWidget *tqparent=0, const char *name=0); virtual ~KAccountsView(); public slots: @@ -103,8 +104,8 @@ public slots: void show(void); /** - * Override the base class behaviour to restore the layout. Do not - * do this in show() because show() itself may change the layout + * Override the base class behaviour to restore the tqlayout. Do not + * do this in show() because show() itself may change the tqlayout * in undesired ways. */ void polish(void); @@ -117,7 +118,7 @@ public slots: */ void slotUpdateIconPos(unsigned int action); - void slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance); + void slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance); protected: typedef enum { @@ -136,7 +137,7 @@ protected: void loadListView(void); void loadIconView(void); - bool loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList); + bool loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList); /** * This method returns a pointer to the currently selected @@ -144,15 +145,15 @@ protected: */ KMyMoneyAccountIconItem* selectedIcon(void) const; - QPoint point(const QString& str) const; - QString point(const QPoint& val) const; + TQPoint point(const TQString& str) const; + TQString point(const TQPoint& val) const; protected slots: void slotUpdateNetWorth(void); - void slotTabChanged(QWidget*); - void slotSelectIcon(QIconViewItem* item); - void slotOpenContext(QIconViewItem* item); - void slotOpenObject(QIconViewItem* item); + void slotTabChanged(TQWidget*); + void slotSelectIcon(TQIconViewItem* item); + void slotOpenContext(TQIconViewItem* item); + void slotOpenObject(TQIconViewItem* item); void slotExpandCollapse(void); signals: @@ -181,17 +182,17 @@ signals: /** * This signal is emitted, when the user selected to reparent the - * account @p acc to be a subordinate account of @p parent. + * account @p acc to be a subordinate account of @p tqparent. * * @param acc const reference to account to be reparented - * @param parent const reference to new parent account + * @param tqparent const reference to new tqparent account */ - void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& parent); + void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent); private: MyMoneyAccount m_reconciliationAccount; - QMap<QString, MyMoneySecurity> m_securityMap; - QMap<QString, unsigned long> m_transactionCountMap; + TQMap<TQString, MyMoneySecurity> m_securityMap; + TQMap<TQString, unsigned long> m_transactionCountMap; KMyMoneyAccountTreeItem* m_assetItem; KMyMoneyAccountTreeItem* m_liabilityItem; diff --git a/kmymoney2/views/kaccountsviewdecl.ui b/kmymoney2/views/kaccountsviewdecl.ui index c8bb5ac..922844f 100644 --- a/kmymoney2/views/kaccountsviewdecl.ui +++ b/kmymoney2/views/kaccountsviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountsViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KAccountsViewDecl</cstring> </property> @@ -19,11 +19,11 @@ <property name="margin"> <number>0</number> </property> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tab</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -45,9 +45,9 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -85,7 +85,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>515</width> <height>20</height> @@ -96,7 +96,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -127,7 +127,7 @@ </vbox> </widget> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_hiddenCategories</cstring> </property> @@ -135,9 +135,9 @@ <string>Note: Unused categories are not shown as selected by settings.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -153,18 +153,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>367</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_totalProfitsLabel</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -176,7 +176,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -200,5 +200,8 @@ <slot>slotCollapseAll()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kbudgetview.cpp b/kmymoney2/views/kbudgetview.cpp index a8d5bc1..c2bf5dc 100644 --- a/kmymoney2/views/kbudgetview.cpp +++ b/kmymoney2/views/kbudgetview.cpp @@ -19,17 +19,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qtabwidget.h> -#include <qlistbox.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqtabwidget.h> +#include <tqlistbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqtooltip.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,12 +61,12 @@ #include "../kmymoney2.h" // *** KBudgetListItem Implementation *** -KBudgetListItem::KBudgetListItem(KListView *parent, const MyMoneyBudget& budget) : - KListViewItem(parent), +KBudgetListItem::KBudgetListItem(KListView *tqparent, const MyMoneyBudget& budget) : + KListViewItem(tqparent), m_budget(budget) { setText(0, budget.name()); - setText(1, QString("%1").arg(budget.budgetStart().year())); + setText(1, TQString("%1").tqarg(budget.budgetStart().year())); // allow in column rename setRenameEnabled(0, true); @@ -76,18 +76,18 @@ KBudgetListItem::~KBudgetListItem() { } -void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void KBudgetListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { p->setFont(KMyMoneyGlobalSettings::listCellFont()); - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if (isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } @@ -95,8 +95,8 @@ void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, const int KBudgetView::m_iBudgetYearsAhead = 5; const int KBudgetView::m_iBudgetYearsBack = 3; -KBudgetView::KBudgetView(QWidget *parent, const char *name ) : - KBudgetViewDecl(parent,name), +KBudgetView::KBudgetView(TQWidget *tqparent, const char *name ) : + KBudgetViewDecl(tqparent,name), m_needReload(false), m_inSelection(false) { @@ -104,73 +104,73 @@ KBudgetView::KBudgetView(QWidget *parent, const char *name ) : m_budgetList->setSorting(0); KIconLoader* il = KGlobal::iconLoader(); - KGuiItem newButtenItem( QString(""), - QIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), + KGuiItem newButtenItem( TQString(""), + TQIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), i18n("Creates a new budget"), i18n("Use this to create a new empty budget.")); m_newButton->setGuiItem(newButtenItem); - QToolTip::add(m_newButton, newButtenItem.toolTip()); + TQToolTip::add(m_newButton, newButtenItem.toolTip()); - KGuiItem renameButtenItem( QString(""), - QIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)), + KGuiItem renameButtenItem( TQString(""), + TQIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)), i18n("Rename the current selected budget"), i18n("Use this to start renaming the selected budget.")); m_renameButton->setGuiItem(renameButtenItem); - QToolTip::add(m_renameButton, renameButtenItem.toolTip()); + TQToolTip::add(m_renameButton, renameButtenItem.toolTip()); - KGuiItem deleteButtenItem( QString(""), - QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), + KGuiItem deleteButtenItem( TQString(""), + TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete the current selected budget"), i18n("Use this to delete the selected budget.")); m_deleteButton->setGuiItem(deleteButtenItem); - QToolTip::add(m_deleteButton, deleteButtenItem.toolTip()); + TQToolTip::add(m_deleteButton, deleteButtenItem.toolTip()); - KGuiItem updateButtenItem( QString(""), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + KGuiItem updateButtenItem( TQString(""), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered values and stores the budget"), i18n("Use this to store the modified data.")); m_updateButton->setGuiItem(updateButtenItem); - QToolTip::add(m_updateButton, updateButtenItem.toolTip()); + TQToolTip::add(m_updateButton, updateButtenItem.toolTip()); - KGuiItem resetButtenItem( QString(""), - QIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)), + KGuiItem resetButtenItem( TQString(""), + TQIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)), i18n("Revert budget to last saved state"), i18n("Use this to discard the modified data.")); m_resetButton->setGuiItem(resetButtenItem); - QToolTip::add(m_resetButton, resetButtenItem.toolTip()); + TQToolTip::add(m_resetButton, resetButtenItem.toolTip()); - connect(m_budgetList, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)), - this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(m_budgetList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenameBudget(QListViewItem*,int,const QString&))); - connect(m_budgetList, SIGNAL(selectionChanged()), this, SLOT(slotSelectBudget())); + connect(m_budgetList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)), + this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(m_budgetList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenameBudget(TQListViewItem*,int,const TQString&))); + connect(m_budgetList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectBudget())); - connect(m_cbBudgetSubaccounts, SIGNAL(clicked()), this, SLOT(cb_includesSubaccounts_clicked())); + connect(m_cbBudgetSubaccounts, TQT_SIGNAL(clicked()), this, TQT_SLOT(cb_includesSubaccounts_clicked())); - connect(m_accountTree, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectAccount(QListViewItem*))); - connect(m_accountTree, SIGNAL(valueChanged()), this, SLOT(slotRefreshHideUnusedButton())); + connect(m_accountTree, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectAccount(TQListViewItem*))); + connect(m_accountTree, TQT_SIGNAL(valueChanged()), this, TQT_SLOT(slotRefreshHideUnusedButton())); // connect the buttons to the actions. Make sure the enabled state // of the actions is reflected by the buttons - connect(kmymoney2->action("budget_new"), SIGNAL(enabled(bool)), m_newButton, SLOT(setEnabled(bool))); - connect(m_renameButton, SIGNAL(clicked()), kmymoney2->action("budget_rename"), SLOT(activate())); - connect(kmymoney2->action("budget_rename"), SIGNAL(enabled(bool)), m_renameButton, SLOT(setEnabled(bool))); - connect(m_deleteButton, SIGNAL(clicked()), kmymoney2->action("budget_delete"), SLOT(activate())); - connect(kmymoney2->action("budget_delete"), SIGNAL(enabled(bool)), m_deleteButton, SLOT(setEnabled(bool))); + connect(kmymoney2->action("budget_new"), TQT_SIGNAL(enabled(bool)), m_newButton, TQT_SLOT(setEnabled(bool))); + connect(m_renameButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_rename"), TQT_SLOT(activate())); + connect(kmymoney2->action("budget_rename"), TQT_SIGNAL(enabled(bool)), m_renameButton, TQT_SLOT(setEnabled(bool))); + connect(m_deleteButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_delete"), TQT_SLOT(activate())); + connect(kmymoney2->action("budget_delete"), TQT_SIGNAL(enabled(bool)), m_deleteButton, TQT_SLOT(setEnabled(bool))); - connect(m_budgetValue, SIGNAL(valuesChanged()), this, SLOT(slotBudgetedAmountChanged())); + connect(m_budgetValue, TQT_SIGNAL(valuesChanged()), this, TQT_SLOT(slotBudgetedAmountChanged())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewBudget())); - connect(m_updateButton, SIGNAL(pressed()), this, SLOT(slotUpdateBudget())); - connect(m_resetButton, SIGNAL(pressed()), this, SLOT(slotResetBudget())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewBudget())); + connect(m_updateButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateBudget())); + connect(m_resetButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotResetBudget())); - connect(m_hideUnusedButton, SIGNAL(toggled(bool)), this, SLOT(slotHideUnused(bool))); + connect(m_hideUnusedButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotHideUnused(bool))); // setup initial state m_newButton->setEnabled(kmymoney2->action("budget_new")->isEnabled()); m_renameButton->setEnabled(kmymoney2->action("budget_rename")->isEnabled()); m_deleteButton->setEnabled(kmymoney2->action("budget_delete")->isEnabled()); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotRefreshView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotRefreshView())); } KBudgetView::~KBudgetView() @@ -179,8 +179,8 @@ KBudgetView::~KBudgetView() void KBudgetView::show() { - QTimer::singleShot(50, this, SLOT(slotRearrange())); - QWidget::show(); + TQTimer::singleShot(50, this, TQT_SLOT(slotRearrange())); + TQWidget::show(); if(m_needReload) { slotRefreshView(); } @@ -197,7 +197,7 @@ void KBudgetView::slotRearrange(void) resizeEvent(0); } -void KBudgetView::resizeEvent(QResizeEvent* ev) +void KBudgetView::resizeEvent(TQResizeEvent* ev) { // resize the register KBudgetViewDecl::resizeEvent(ev); @@ -212,7 +212,7 @@ void KBudgetView::slotReloadView(void) void KBudgetView::loadBudgets(void) { - QString id; + TQString id; ::timetrace("Start KBudgetView::loadBudgets"); @@ -220,7 +220,7 @@ void KBudgetView::loadBudgets(void) id = m_budget.id(); // remember the upper left corner of the viewport - QPoint startPoint = m_budgetList->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_budgetList->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_budgetList->setUpdatesEnabled(false); @@ -230,24 +230,24 @@ void KBudgetView::loadBudgets(void) m_budgetValue->clear(); // add the correct years to the drop down list - QDate date = QDate::currentDate(Qt::LocalTime); + TQDate date = TQDate::tqcurrentDate(Qt::LocalTime); int iStartYear = date.year() - m_iBudgetYearsBack; m_yearList.clear(); for (int i=0; i<m_iBudgetYearsAhead + m_iBudgetYearsBack; i++) - m_yearList += QString::number(iStartYear+i); + m_yearList += TQString::number(iStartYear+i); KBudgetListItem* currentItem = 0; - QValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); - QValueList<MyMoneyBudget>::ConstIterator it; + TQValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); + TQValueList<MyMoneyBudget>::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { KBudgetListItem* item = new KBudgetListItem(m_budgetList, *it); // create a list of unique years - if (m_yearList.findIndex(QString::number((*it).budgetStart().year())) == -1) - m_yearList += QString::number((*it).budgetStart().year()); + if (m_yearList.tqfindIndex(TQString::number((*it).budgetStart().year())) == -1) + m_yearList += TQString::number((*it).budgetStart().year()); if(item->budget().id() == id) { m_budget = (*it); @@ -266,7 +266,7 @@ void KBudgetView::loadBudgets(void) // turn updates back on m_budgetList->setUpdatesEnabled(true); - m_budgetList->repaintContents(); + m_budgetList->tqrepaintContents(); // reset the status of the buttons m_updateButton->setEnabled(false); @@ -278,9 +278,9 @@ void KBudgetView::loadBudgets(void) ::timetrace("End KBudgetView::loadBudgets"); } -void KBudgetView::ensureBudgetVisible(const QString& id) +void KBudgetView::ensureBudgetVisible(const TQString& id) { - for (QListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) { + for (TQListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) { KBudgetListItem* p = dynamic_cast<KBudgetListItem*>(item); if(p && p->budget().id() == id) { if(p->itemAbove()) @@ -300,7 +300,7 @@ void KBudgetView::slotRefreshView(void) { if(isVisible()) { if(m_inSelection) - QTimer::singleShot(0, this, SLOT(slotRefreshView())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRefreshView())); else { loadBudgets(); m_needReload = false; @@ -312,7 +312,7 @@ void KBudgetView::slotRefreshView(void) void KBudgetView::loadAccounts(void) { - QMap<QString, bool> isOpen; + TQMap<TQString, bool> isOpen; ::timetrace("start load budget account view"); @@ -329,10 +329,10 @@ void KBudgetView::loadAccounts(void) // remember the id of the current selected item KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem(); - QString selectedItemId = (item) ? item->id() : QString(); + TQString selectedItemId = (item) ? item->id() : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current()); if(item && item->isOpen()) { @@ -342,7 +342,7 @@ void KBudgetView::loadAccounts(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_accountTree->setUpdatesEnabled(false); @@ -368,13 +368,13 @@ void KBudgetView::loadAccounts(void) m_accountTree->setBaseCurrency(security); const MyMoneyAccount& income = file->income(); - QStringList incSubAcctList = income.accountList(); + TQStringList incSubAcctList = income.accountList(); m_incomeItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, income, m_budget, security, i18n("Income")); haveUnusedBudgets |= loadSubAccounts(m_incomeItem, incSubAcctList, m_budget); m_incomeItem->setSelectable(false); const MyMoneyAccount& expense = file->expense(); - QStringList expSubAcctList = expense.accountList(); + TQStringList expSubAcctList = expense.accountList(); m_expenseItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, expense, m_budget, security, i18n("Expense")); haveUnusedBudgets |= loadSubAccounts(m_expenseItem, expSubAcctList, m_budget); m_expenseItem->setSelectable(false); @@ -386,13 +386,13 @@ void KBudgetView::loadAccounts(void) // scan through the list of accounts and re-expand those that were // expanded and re-select the one that was probably selected before - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current()); if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.find(item->id()) != isOpen.end()) + if(isOpen.tqfind(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -403,7 +403,7 @@ void KBudgetView::loadAccounts(void) // turn updates back on m_accountTree->setUpdatesEnabled(true); - m_accountTree->repaintContents(); + m_accountTree->tqrepaintContents(); m_updateButton->setEnabled(!(selectedBudget() == m_budget)); m_resetButton->setEnabled(!(selectedBudget() == m_budget)); @@ -412,7 +412,7 @@ void KBudgetView::loadAccounts(void) } -bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QStringList& accountList, const MyMoneyBudget& budget) +bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStringList& accountList, const MyMoneyBudget& budget) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -421,24 +421,24 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString //sort the subaccount list //FIXME this is just a hack to order the accounts if ( !accountList.isEmpty() ) { - QMap<QString, MyMoneyAccount> accountMap; - QValueList<MyMoneyAccount> alist; + TQMap<TQString, MyMoneyAccount> accountMap; + TQValueList<MyMoneyAccount> alist; file->accountList ( alist, accountList ); accountList.clear(); - QValueList<MyMoneyAccount>::const_iterator it_ac; + TQValueList<MyMoneyAccount>::const_iterator it_ac; for ( it_ac = alist.begin(); it_ac != alist.end(); ++it_ac ) { accountMap[(*it_ac).name()] = *it_ac; } - QMap<QString, MyMoneyAccount>::const_iterator it_am; + TQMap<TQString, MyMoneyAccount>::const_iterator it_am; for ( it_am = accountMap.begin(); it_am != accountMap.end(); ++it_am ) { accountList.prepend((*it_am).id()); //use prepend instead of append otherwise account show up in ascending order } } - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { const MyMoneyAccount& acc = file->account(*it_a); - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.isInvest()) { @@ -460,12 +460,12 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString delete e; } - QStringList subAcctList = acc.accountList(); - KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(parent, acc, budget, prices, security); + TQStringList subAcctList = acc.accountList(); + KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(tqparent, acc, budget, prices, security); unused |= loadSubAccounts(item, subAcctList, budget); // no child accounts and no value assigned to this account - bool thisUnused = (!item->firstChild()) && (!budget.contains(acc.id())); + bool thisUnused = (!item->firstChild()) && (!budget.tqcontains(acc.id())); // In case of a budget which is unused and we are requested to suppress // the display of those, @@ -485,8 +485,8 @@ void KBudgetView::askSave(void) // check if the content of a currently selected budget was modified // and ask to store the data if (m_updateButton->isEnabled()) { - if (KMessageBox::questionYesNo(this, QString("<qt>%1</qt>").arg( - i18n("Do you want to save the changes for <b>%1</b>").arg(m_budget.name())), + if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg( + i18n("Do you want to save the changes for <b>%1</b>").tqarg(m_budget.name())), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdateBudget(); @@ -517,7 +517,7 @@ void KBudgetView::slotSelectBudget(void) m_assignmentBox->setEnabled(false); m_budget = MyMoneyBudget(); - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); item = dynamic_cast<KBudgetListItem*>(it_l.current()); if(item) { m_budget = item->budget(); @@ -527,7 +527,7 @@ void KBudgetView::slotSelectBudget(void) slotRefreshHideUnusedButton(); loadAccounts(); - QValueList<MyMoneyBudget> budgetList; + TQValueList<MyMoneyBudget> budgetList; if(!m_budget.id().isEmpty()) budgetList << m_budget; emit selectObjects(budgetList); @@ -546,7 +546,7 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const { static MyMoneyBudget nullBudget; - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); KBudgetListItem* item = dynamic_cast<KBudgetListItem*>(it_l.current()); if(item) { return item->budget(); @@ -557,12 +557,12 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const KMyMoneyAccountTreeBudgetItem* KBudgetView::selectedAccount(void) const { - QListViewItemIterator it_l(m_accountTree, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_accountTree, TQListViewItemIterator::Selected); KMyMoneyAccountTreeBudgetItem* item = dynamic_cast<KMyMoneyAccountTreeBudgetItem*>(it_l.current()); return item; } -void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p) +void KBudgetView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p) { Q_UNUSED(lv); Q_UNUSED(p); @@ -580,15 +580,15 @@ void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPo void KBudgetView::slotStartRename(void) { - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; if((it_v = it_l.current()) != 0) { it_v->startRename(0); } } // This variant is only called when a single budget is selected and renamed. -void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString& txt) +void KBudgetView::slotRenameBudget(TQListViewItem* p , int /*col*/, const TQString& txt) { KBudgetListItem *pBudget = dynamic_cast<KBudgetListItem*> (p); if (!pBudget) @@ -596,7 +596,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString //kdDebug() << "[KPayeesView::slotRenamePayee]" << endl; // create a copy of the new name without appended whitespaces - QString new_name = txt.stripWhiteSpace(); + TQString new_name = txt.stripWhiteSpace(); if (pBudget->budget().name() != new_name) { MyMoneyFileTransaction ft; try { @@ -609,7 +609,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString if (KMessageBox::questionYesNo(this, i18n("A budget with the name '%1' already exists. It is not advisable to have " "multiple budgets with the same identification name. Are you sure you would like " - "to rename the budget?").arg(new_name)) != KMessageBox::Yes) + "to rename the budget?").tqarg(new_name)) != KMessageBox::Yes) { p->setText(0,pBudget->budget().name()); return; @@ -633,7 +633,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -642,7 +642,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString } } -void KBudgetView::slotSelectAccount(QListViewItem* item) +void KBudgetView::slotSelectAccount(TQListViewItem* item) { if(item->listView() == m_accountTree) { m_assignmentBox->setEnabled(false); @@ -653,7 +653,7 @@ void KBudgetView::slotSelectAccount(QListViewItem* item) if (m_budget.id().isEmpty() ) return; - QString id = account->id(); + TQString id = account->id(); m_leAccounts->setText(MyMoneyFile::instance()->accountToCategory(id)); m_cbBudgetSubaccounts->setChecked(m_budget.account(id).budgetSubaccounts()); m_accountTotal->setValue(m_budget.account(id).totalBalance()); @@ -709,7 +709,7 @@ void KBudgetView::cb_includesSubaccounts_clicked() return; if(selectedAccount() != 0) { - QString accountID = selectedAccount()->id(); + TQString accountID = selectedAccount()->id(); // now, we get a reference to the accountgroup, to mofify its atribute, // and then put the resulting account group instead of the original @@ -734,7 +734,7 @@ void KBudgetView::slotResetBudget(void) loadAccounts(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to reset budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -748,7 +748,7 @@ void KBudgetView::slotUpdateBudget(void) slotRefreshHideUnusedButton(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -757,11 +757,11 @@ void KBudgetView::languageChange(void) { KBudgetViewDecl::languageChange(); - m_newButton->setText(QString()); - m_renameButton->setText(QString()); - m_deleteButton->setText(QString()); - m_updateButton->setText(QString()); - m_resetButton->setText(QString()); + m_newButton->setText(TQString()); + m_renameButton->setText(TQString()); + m_deleteButton->setText(TQString()); + m_updateButton->setText(TQString()); + m_resetButton->setText(TQString()); } #include "kbudgetview.moc" diff --git a/kmymoney2/views/kbudgetview.h b/kmymoney2/views/kbudgetview.h index f857a15..14c7611 100644 --- a/kmymoney2/views/kbudgetview.h +++ b/kmymoney2/views/kbudgetview.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -50,20 +50,20 @@ public: /** * Constructor to be used to construct a budget entry object. * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param budget const reference to MyMoneyBudget for which * the KListView entry is constructed */ - KBudgetListItem(KListView *parent, const MyMoneyBudget& budget); + KBudgetListItem(KListView *tqparent, const MyMoneyBudget& budget); ~KBudgetListItem(); /** - * This method is re-implemented from QListViewItem::paintCell(). - * Besides the standard implementation, the QPainter is set + * This method is re-implemented from TQListViewItem::paintCell(). + * Besides the standard implementation, the TQPainter is set * according to the applications settings. */ - void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); const MyMoneyBudget& budget(void) { return m_budget; }; void setBudget(const MyMoneyBudget& budget) { m_budget = budget; } @@ -79,14 +79,15 @@ private: class KBudgetView : public KBudgetViewDecl { Q_OBJECT + TQ_OBJECT public: - KBudgetView(QWidget *parent=0, const char *name=0); + KBudgetView(TQWidget *tqparent=0, const char *name=0); ~KBudgetView(); void show(); /** - * Override the base class behaviour to restore the layout. Do not - * do this in show() because show() itself may change the layout + * Override the base class behaviour to restore the tqlayout. Do not + * do this in show() because show() itself may change the tqlayout * in undesired ways. */ void polish(void); @@ -123,16 +124,16 @@ public slots: protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); void loadAccounts(void); - bool loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QStringList& accountList, const MyMoneyBudget& budget); + bool loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStringList& accountList, const MyMoneyBudget& budget); /** * This method loads all available budgets into the budget list widget. If a budget is * currently selected it remains selected if it is still present. */ void loadBudgets(void); - void ensureBudgetVisible(const QString& id); + void ensureBudgetVisible(const TQString& id); const MyMoneyBudget& selectedBudget(void) const; KMyMoneyAccountTreeBudgetItem* selectedAccount(void) const; void setTimeSpan(KMyMoneyAccountTreeBudgetItem *account, MyMoneyBudget::AccountGroup& accountGroup, int iTimeSpan); @@ -148,7 +149,7 @@ protected slots: * @param col The column where the name is located * @param txt The text of the new name */ - void slotRenameBudget(QListViewItem *p, int col, const QString& txt); + void slotRenameBudget(TQListViewItem *p, int col, const TQString& txt); /** * This slot is called when the amount of a budget is changed. It @@ -158,7 +159,7 @@ protected slots: /** */ - void slotSelectAccount(QListViewItem*); + void slotSelectAccount(TQListViewItem*); void AccountEnter(); @@ -181,14 +182,14 @@ private slots: * @param i the item on which the cursor resides * @param p position of the pointing device */ - void slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p); + void slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p); signals: /** * This signal serves as proxy for KMyMoneyBudgetList::selectObject() */ void openContextMenu(const MyMoneyObject& obj); - void selectObjects(const QValueList<MyMoneyBudget>& budget); + void selectObjects(const TQValueList<MyMoneyBudget>& budget); private: typedef enum { @@ -200,8 +201,8 @@ private: MyMoneyBudget m_budget; - QMap<QString, unsigned long> m_transactionCountMap; - QStringList m_yearList; + TQMap<TQString, unsigned long> m_transactionCountMap; + TQStringList m_yearList; KMyMoneyAccountTreeBudgetItem* m_incomeItem; KMyMoneyAccountTreeBudgetItem* m_expenseItem; diff --git a/kmymoney2/views/kbudgetviewdecl.ui b/kmymoney2/views/kbudgetviewdecl.ui index f3fb5be..e03457d 100644 --- a/kmymoney2/views/kbudgetviewdecl.ui +++ b/kmymoney2/views/kbudgetviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KBudgetViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KBudgetViewDecl</cstring> </property> @@ -30,15 +30,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -57,9 +57,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -163,9 +163,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -184,7 +184,7 @@ </sizepolicy> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_hideUnusedButton</cstring> </property> @@ -192,7 +192,7 @@ <string>Hide unused budget categories</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_assignmentBox</cstring> </property> @@ -211,15 +211,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -227,7 +227,7 @@ <string>Account</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_leAccounts</cstring> </property> @@ -246,7 +246,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -273,7 +273,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_cbBudgetSubaccounts</cstring> </property> @@ -281,9 +281,9 @@ <string>Include subaccounts</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -304,7 +304,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -344,5 +344,9 @@ <data format="PNG" length="870">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000032d49444154388db59531681c4714863f892dde8004b320c32e3870020b74458a6b0f5458e581c016a809a8496b42208454098604d2c4904a6954a410511ae752085b858c1208dc35221244b00119f60ac12ee860062c980719708a95a248f129459cd7cceeccf0edb76fff61a706830197d5ed765ff3166a30184c4d5d829fed3c7bdd5e6ce3bda71a5738ef301802e1d6d179477152303c1842bc822797a64fbf7b4a9a43be00ada817cb0e12011c2611205ccd73755f9c087c6b19bef0d7c100f5b8267d07caf10fe8ab9210156320fc01be16aa5a11043307f30b20a21041019985f48ef2f7fa0becc68e80475fd584e831b396f210f67795c3831a4940a3228925bb27f4d652ba4b01a199b73342f3981be0ca57745042ac30c632d853b6373d44b056c8ef0922508d94d14be59b2f4aeaf58cd5751069e06f3436890114332b9487d0bf80f61e64dc5f813c3790045453f67703fd4d4f7f6b4496b5597e689044af194f5f5e841800210478bee3d1a8f41e64acbe0f69ae6852e1cf0ccf7f74f4d652defbc042226c6f55e8f89f91bb6e9c387c9d521c9558db988a3416fe3c67e32b4779ec7167f0e8939ce19ea7fc5d298a80c875f03563930855ed2081bc05e91d5014ef53363eaf288e3d6285ee520a338e76c7a251a94e41e30470d3631004a262672e3eca59cec6978ef2b889979d11f2bb904af3be92081a416e28dfe831983920b1142345d5b0ff2234a6334276d7321ad53c795c511ca654a5a251996f19b83d158ef602b45a423d52f67703abeb29ee4ce9de4fc93378f218462f6b3efdb042cf3d59666977a0aa6fe9310888d25b13342afd4dcffeaee3d147399da540ab13f8f8b39c2cb3f8710d11ba2b96f9c57fcd7180287497a03ecde86f8dd8fe1a867b9ef6bb1612a84a871f6bd35b94e217a53832589970f2dcd85d9c7d4580d57521cbdaf4bfaf288e95e268d4ec8e60e72ccb0f2dbffea454e71e8d29f57882717152509482a48d8924b0bc12e82ee51445a03a6da079cbd0eec0fc22142b06620e89a3fc8d3783870743d814d2bc8994aa6ff286472e764902e5a96f72bbd3b4c37b280e95aa9e604c84e1cf978b37c74935797d7ae2ca7fac6968fe51ff0bf86dc30783c1d49f0baa9bb819e612310000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kbudgetvalues.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kcategoriesview.cpp b/kmymoney2/views/kcategoriesview.cpp index e01d62b..3c31f34 100644 --- a/kmymoney2/views/kcategoriesview.cpp +++ b/kmymoney2/views/kcategoriesview.cpp @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,44 +46,44 @@ #include "../kmymoney2.h" -KCategoriesView::KCategoriesView(QWidget *parent, const char *name ) : - KCategoriesViewDecl(parent, name), +KCategoriesView::KCategoriesView(TQWidget *tqparent, const char *name ) : + KCategoriesViewDecl(tqparent, name), m_incomeItem(0), m_expenseItem(0), m_needReload(false) { // create the searchline widget - // and insert it into the existing layout - m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->parentWidget()); - QVBoxLayout* layout = dynamic_cast<QVBoxLayout*>(m_accountTree->parentWidget()->layout()); - if(layout) { - layout->insertWidget(0, m_searchWidget); + // and insert it into the existing tqlayout + m_searchWidget = new KListViewSearchLineWidget(m_accountTree, m_accountTree->tqparentWidget()); + TQVBoxLayout* tqlayout = dynamic_cast<TQVBoxLayout*>(m_accountTree->tqparentWidget()->tqlayout()); + if(tqlayout) { + tqlayout->insertWidget(0, m_searchWidget); } // setup icons for collapse and expand button KIconLoader *ic = KGlobal::iconLoader(); KGuiItem collapseGuiItem("", - QIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)), - QString(), - QString()); + TQIconSet(ic->loadIcon("viewmag-", KIcon::Small, KIcon::SizeSmall)), + TQString(), + TQString()); KGuiItem expandGuiItem("", - QIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)), - QString(), - QString()); + TQIconSet(ic->loadIcon("viewmag+", KIcon::Small, KIcon::SizeSmall)), + TQString(), + TQString()); m_collapseButton->setGuiItem(collapseGuiItem); m_expandButton->setGuiItem(expandGuiItem); m_accountTree->setSectionHeader(i18n("Category")); - connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateProfit(void))); - connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateProfit(void))); + connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts())); - connect(m_collapseButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse())); - connect(m_expandButton, SIGNAL(clicked()), this, SLOT(slotExpandCollapse())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts())); + connect(m_collapseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse())); + connect(m_expandButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotExpandCollapse())); } KCategoriesView::~KCategoriesView() @@ -118,7 +118,7 @@ void KCategoriesView::show(void) void KCategoriesView::polish(void) { KCategoriesViewDecl::polish(); - m_accountTree->setResizeMode(QListView::LastColumn); + m_accountTree->setResizeMode(TQListView::LastColumn); m_accountTree->restoreLayout("Category View Settings"); } @@ -134,15 +134,15 @@ void KCategoriesView::slotLoadAccounts(void) void KCategoriesView::loadAccounts(void) { - QMap<QString, bool> isOpen; + TQMap<TQString, bool> isOpen; ::timetrace("start load categories view"); // remember the id of the current selected item KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem(); - QString selectedItemId = (item) ? item->id() : QString(); + TQString selectedItemId = (item) ? item->id() : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item && item->isOpen()) { @@ -152,7 +152,7 @@ void KCategoriesView::loadAccounts(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_accountTree->setUpdatesEnabled(false); @@ -167,9 +167,9 @@ void KCategoriesView::loadAccounts(void) MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySecurity> slist = file->currencyList(); + TQValueList<MyMoneySecurity> slist = file->currencyList(); slist += file->securityList(); - QValueList<MyMoneySecurity>::const_iterator it_s; + TQValueList<MyMoneySecurity>::const_iterator it_s; for(it_s = slist.begin(); it_s != slist.end(); ++it_s) { m_securityMap[(*it_s).id()] = *it_s; } @@ -198,13 +198,13 @@ void KCategoriesView::loadAccounts(void) // scan through the list of accounts and re-expand those that were // expanded and re-select the one that was probably selected before - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.find(item->id()) != isOpen.end()) + if(isOpen.tqfind(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -213,11 +213,11 @@ void KCategoriesView::loadAccounts(void) // reposition viewport m_accountTree->setContentsPos(startPoint.x(), startPoint.y()); - m_searchWidget->searchLine()->updateSearch(QString::null); + m_searchWidget->searchLine()->updateSearch(TQString()); // turn updates back on m_accountTree->setUpdatesEnabled(true); - m_accountTree->repaintContents(); + m_accountTree->tqrepaintContents(); // and in case we need to show things expanded, we'll do so if(KMyMoneyGlobalSettings::showAccountsExpanded()) @@ -229,16 +229,16 @@ void KCategoriesView::loadAccounts(void) ::timetrace("done load categories view"); } -bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList) +bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList) { MyMoneyFile* file = MyMoneyFile::instance(); bool unused = false; - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { const MyMoneyAccount& acc = file->account(*it_a); - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.isInvest()) { @@ -260,7 +260,7 @@ bool KCategoriesView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QSt delete e; } - KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security); + KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security); unused |= loadSubAccounts(item, acc.accountList()); // no child accounts and not transactions in this account means 'unused' @@ -286,7 +286,7 @@ void KCategoriesView::slotUpdateProfit(void) MyMoneyMoney profit = m_incomeItem->totalValue() - m_expenseItem->totalValue(); - QString s(i18n("Profit: ")); + TQString s(i18n("Profit: ")); if(profit.isNegative()) s = i18n("Loss: "); @@ -294,13 +294,13 @@ void KCategoriesView::slotUpdateProfit(void) // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.replace(QString(" "), QString(" ")); + s.tqreplace(TQString(" "), TQString(" ")); if(profit.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); - QString v(profit.abs().formatMoney(sec)); - s += v.replace(QString(" "), QString(" ")); + TQString v(profit.abs().formatMoney(sec)); + s += v.tqreplace(TQString(" "), TQString(" ")); if(profit.isNegative()) { s += "</font></b>"; } diff --git a/kmymoney2/views/kcategoriesview.h b/kmymoney2/views/kcategoriesview.h index 4a6ad3c..d37e74d 100644 --- a/kmymoney2/views/kcategoriesview.h +++ b/kmymoney2/views/kcategoriesview.h @@ -45,7 +45,7 @@ class KListViewSearchLineWidget; * @author Michael Edwardes, Thomas Baumgart * * While named "categories view", this view actually displays all accounts - * that are children of the global "Income" and "Expense" accounts. Even though + * that are tqchildren of the global "Income" and "Expense" accounts. Even though * categories are internally just accounts as well, the distinction between * categories and accounts in the user interface is done for better * usability and clarity. @@ -63,8 +63,9 @@ class KListViewSearchLineWidget; class KCategoriesView : public KCategoriesViewDecl { Q_OBJECT + TQ_OBJECT public: - KCategoriesView(QWidget *parent=0, const char *name=0); + KCategoriesView(TQWidget *tqparent=0, const char *name=0); virtual ~KCategoriesView(); @@ -78,15 +79,15 @@ public slots: void show(void); /** - * Override the base class behaviour to restore the layout. Do not - * do this in show() because show() itself may change the layout + * Override the base class behaviour to restore the tqlayout. Do not + * do this in show() because show() itself may change the tqlayout * in undesired ways. */ void polish(void); protected: void loadAccounts(void); - bool loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QStringList& accountList); + bool loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQStringList& accountList); protected slots: void slotUpdateProfit(void); @@ -99,7 +100,7 @@ private: * * @param type account type as defined in MyMoneyAccount::accountTypeE */ - const QPixmap accountImage(const MyMoneyAccount::accountTypeE type) const; + const TQPixmap accountImage(const MyMoneyAccount::accountTypeE type) const; signals: /** @@ -121,16 +122,16 @@ signals: /** * This signal is emitted, when the user selected to reparent the - * account @p acc to be a subordinate account of @p parent. + * account @p acc to be a subordinate account of @p tqparent. * * @param acc const reference to account to be reparented - * @param parent const reference to new parent account + * @param tqparent const reference to new tqparent account */ - void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& parent); + void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent); private: - QMap<QString, MyMoneySecurity> m_securityMap; - QMap<QString, unsigned long> m_transactionCountMap; + TQMap<TQString, MyMoneySecurity> m_securityMap; + TQMap<TQString, unsigned long> m_transactionCountMap; KMyMoneyAccountTreeItem* m_incomeItem; KMyMoneyAccountTreeItem* m_expenseItem; diff --git a/kmymoney2/views/kcategoriesviewdecl.ui b/kmymoney2/views/kcategoriesviewdecl.ui index 858cc54..7ede46b 100644 --- a/kmymoney2/views/kcategoriesviewdecl.ui +++ b/kmymoney2/views/kcategoriesviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCategoriesViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCategoriesViewDecl</cstring> </property> @@ -27,9 +27,9 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5_2</cstring> + <cstring>tqlayout5_2</cstring> </property> <hbox> <property name="name"> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>515</width> <height>20</height> @@ -76,7 +76,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_hiddenCategories</cstring> </property> @@ -84,9 +84,9 @@ <string>Note: Unused categories are not shown as selected by settings.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -102,18 +102,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>310</width> <height>16</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_totalProfitsLabel</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -125,7 +125,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -149,5 +149,8 @@ <slot>slotCollapseAll()</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kforecastview.cpp b/kmymoney2/views/kforecastview.cpp index c7bcb0a..bf27e7f 100644 --- a/kmymoney2/views/kforecastview.cpp +++ b/kmymoney2/views/kforecastview.cpp @@ -17,12 +17,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtabwidget.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qtextedit.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqtextedit.h> +#include <tqlayout.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,8 +46,8 @@ #include "../reports/pivottable.h" #include "../reports/pivotgrid.h" -KForecastView::KForecastView(QWidget *parent, const char *name) : - KForecastViewDecl(parent,name) +KForecastView::KForecastView(TQWidget *tqparent, const char *name) : + KForecastViewDecl(tqparent,name) { for(int i=0; i < MaxViewTabs; ++i) m_needReload[i] = false; @@ -56,11 +56,11 @@ KForecastView::KForecastView(QWidget *parent, const char *name) : config->setGroup("Last Use Settings"); m_tab->setCurrentPage(config->readNumEntry("KForecastView_LastType", 0)); - connect(m_tab, SIGNAL(currentChanged(QWidget*)), this, SLOT(slotTabChanged(QWidget*))); + connect(m_tab, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(slotTabChanged(TQWidget*))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadForecast())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadForecast())); - connect(m_forecastButton, SIGNAL(clicked()), this, SLOT(slotManualForecast())); + connect(m_forecastButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotManualForecast())); m_forecastList->setAllColumnsShowFocus(true); m_summaryList->setAllColumnsShowFocus(true); @@ -68,7 +68,7 @@ KForecastView::KForecastView(QWidget *parent, const char *name) : m_advancedList->setAllColumnsShowFocus(true); m_forecastChart = new KReportChartView(m_tabChart, "forecastChart" ); - m_forecastChart->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + m_forecastChart->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); loadForecastSettings(); @@ -78,7 +78,7 @@ KForecastView::~KForecastView() { } -void KForecastView::slotTabChanged(QWidget* _tab) +void KForecastView::slotTabChanged(TQWidget* _tab) { ForecastViewTab tab = static_cast<ForecastViewTab>(m_tab->indexOf(_tab)); @@ -212,7 +212,7 @@ void KForecastView::loadListView(void) void KForecastView::loadSummaryView(void) { MyMoneyForecast forecast; - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; int dropMinimum; int dropZero; @@ -246,7 +246,7 @@ void KForecastView::loadSummaryView(void) //Get all accounts of the right type to calculate forecast m_nameIdx.clear(); accList = forecast.accountList(); - QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ++accList_t ) { MyMoneyAccount acc = *accList_t; if(m_nameIdx[acc.id()] != acc.id()) { //Check if the account is there @@ -254,7 +254,7 @@ void KForecastView::loadSummaryView(void) } } - QMap<QString, QString>::ConstIterator it_nc; + TQMap<TQString, TQString>::ConstIterator it_nc; for(it_nc = m_nameIdx.begin(); it_nc != m_nameIdx.end(); ++it_nc) { const MyMoneyAccount& acc = file->account(*it_nc); @@ -269,7 +269,7 @@ void KForecastView::loadSummaryView(void) } //Check if the account is going to be below zero or below the minimal balance in the forecast period - QString minimumBalance = acc.value("minimumBalance"); + TQString minimumBalance = acc.value("minimumBalance"); MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance); //Check if the account is going to be below minimal balance @@ -279,7 +279,7 @@ void KForecastView::loadSummaryView(void) dropZero = forecast.daysToZeroBalance(acc); // spit out possible warnings - QString msg; + TQString msg; // if a minimum balance has been specified, an appropriate warning will // only be shown, if the drop below 0 is on a different day or not present @@ -292,14 +292,14 @@ void KForecastView::loadSummaryView(void) case -1: break; case 0: - msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %2 is below the minimum balance %3 today.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)); - msg += QString("</font>"); + msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %2 is below the minimum balance %3 today.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)); + msg += TQString("</font>"); break; default: - msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg(acc.name()).arg(minBalance.formatMoney(acc, currency)).arg(dropMinimum-1); - msg += QString("</font>"); + msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg(acc.name()).tqarg(minBalance.formatMoney(acc, currency)).tqarg(dropMinimum-1); + msg += TQString("</font>"); } if(!msg.isEmpty()) { @@ -308,31 +308,31 @@ void KForecastView::loadSummaryView(void) } // a drop below zero is always shown - msg = QString(); + msg = TQString(); switch(dropZero) { case -1: break; case 0: if(acc.accountGroup() == MyMoneyAccount::Asset) { - msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 is below %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)); - msg += QString("</font>"); + msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 is below %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)); + msg += TQString("</font>"); break; } if(acc.accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 is above %2 today.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)); + msg = i18n("The balance of %1 is above %2 today.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)); break; } break; default: if(acc.accountGroup() == MyMoneyAccount::Asset) { - msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The balance of %1 will drop below %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero); - msg += QString("</font>"); + msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The balance of %1 will drop below %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero); + msg += TQString("</font>"); break; } if(acc.accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg(acc.name()).arg(MyMoneyMoney().formatMoney(acc, currency)).arg(dropZero); + msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg(acc.name()).tqarg(MyMoneyMoney().formatMoney(acc, currency)).tqarg(dropZero); break; } } @@ -341,12 +341,12 @@ void KForecastView::loadSummaryView(void) } //advice about trends - msg = QString(); + msg = TQString(); MyMoneyMoney accCycleVariation = forecast.accountCycleVariation(acc); if (accCycleVariation < MyMoneyMoney(0, 1)) { - msg = QString("<font color=\"%1\">").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); - msg += i18n("The account %1 is decreasing %2 per cycle.").arg(acc.name()).arg(accCycleVariation.formatMoney(acc, currency)); - msg += QString("</font>"); + msg = TQString("<font color=\"%1\">").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name()); + msg += i18n("The account %1 is decreasing %2 per cycle.").tqarg(acc.name()).tqarg(accCycleVariation.formatMoney(acc, currency)); + msg += TQString("</font>"); } if(!msg.isEmpty()) { @@ -360,7 +360,7 @@ void KForecastView::loadSummaryView(void) void KForecastView::loadAdvancedView(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; MyMoneySecurity baseCurrency = file->baseCurrency(); MyMoneyForecast forecast; int daysToBeginDay; @@ -376,7 +376,7 @@ void KForecastView::loadAdvancedView(void) //Get all accounts of the right type to calculate forecast m_nameIdx.clear(); accList = forecast.accountList(); - QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); for(; accList_t != accList.end(); ++accList_t ) { MyMoneyAccount acc = *accList_t; if(m_nameIdx[acc.id()] != acc.id()) { //Check if the account is there @@ -393,32 +393,32 @@ void KForecastView::loadAdvancedView(void) int accountColumn = m_advancedList->addColumn(i18n("Account"), -1); //if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle - if(QDate::currentDate() < forecast.beginForecastDate()) { - daysToBeginDay = QDate::currentDate().daysTo(forecast.beginForecastDate()); + if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) { + daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate()); } else { daysToBeginDay = forecast.accountsCycle(); } //add columns for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = m_advancedList->addColumn(i18n("Min Bal %1").arg(i), -1); - m_advancedList->setColumnAlignment(col, Qt::AlignRight); - m_advancedList->addColumn(i18n("Min Date %1").arg(i), -1); + int col = m_advancedList->addColumn(i18n("Min Bal %1").tqarg(i), -1); + m_advancedList->setColumnAlignment(col, TQt::AlignRight); + m_advancedList->addColumn(i18n("Min Date %1").tqarg(i), -1); } for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = m_advancedList->addColumn(i18n("Max Bal %1").arg(i), -1); - m_advancedList->setColumnAlignment(col, Qt::AlignRight); - m_advancedList->addColumn(i18n("Max Date %1").arg(i), -1); + int col = m_advancedList->addColumn(i18n("Max Bal %1").tqarg(i), -1); + m_advancedList->setColumnAlignment(col, TQt::AlignRight); + m_advancedList->addColumn(i18n("Max Date %1").tqarg(i), -1); } int col = m_advancedList->addColumn(i18n("Average"), -1); - m_advancedList->setColumnAlignment(col, Qt::AlignRight); + m_advancedList->setColumnAlignment(col, TQt::AlignRight); m_advancedList->setSorting(-1); KMyMoneyForecastListViewItem *advancedItem = 0; - QMap<QString, QString>::ConstIterator it_nc; + TQMap<TQString, TQString>::ConstIterator it_nc; for(it_nc = m_nameIdx.begin(); it_nc != m_nameIdx.end(); ++it_nc) { const MyMoneyAccount& acc = file->account(*it_nc); - QString amount; + TQString amount; MyMoneyMoney amountMM; MyMoneySecurity currency; @@ -436,35 +436,35 @@ void KForecastView::loadAdvancedView(void) int it_c = 1; // iterator for the columns of the listview //get minimum balance list - QValueList<QDate> minBalanceList = forecast.accountMinimumBalanceDateList(acc); - QValueList<QDate>::Iterator t_min; + TQValueList<TQDate> minBalanceList = forecast.accountMinimumBalanceDateList(acc); + TQValueList<TQDate>::Iterator t_min; for(t_min = minBalanceList.begin(); t_min != minBalanceList.end() ; ++t_min) { - QDate minDate = *t_min; + TQDate minDate = *t_min; amountMM = forecast.forecastBalance(acc, minDate); amount = amountMM.formatMoney(acc, currency); advancedItem->setText(it_c, amount, amountMM.isNegative()); it_c++; - QString dateString = KGlobal::locale()->formatDate(minDate, true); + TQString dateString = KGlobal::locale()->formatDate(minDate, true); advancedItem->setText(it_c, dateString, amountMM.isNegative()); it_c++; } //get maximum balance list - QValueList<QDate> maxBalanceList = forecast.accountMaximumBalanceDateList(acc); - QValueList<QDate>::Iterator t_max; + TQValueList<TQDate> maxBalanceList = forecast.accountMaximumBalanceDateList(acc); + TQValueList<TQDate>::Iterator t_max; for(t_max = maxBalanceList.begin(); t_max != maxBalanceList.end() ; ++t_max) { - QDate maxDate = *t_max; + TQDate maxDate = *t_max; amountMM = forecast.forecastBalance(acc, maxDate); amount = amountMM.formatMoney(acc, currency); advancedItem->setText(it_c, amount, amountMM.isNegative()); it_c++; - QString dateString = KGlobal::locale()->formatDate(maxDate, true); + TQString dateString = KGlobal::locale()->formatDate(maxDate, true); advancedItem->setText(it_c, dateString, amountMM.isNegative()); it_c++; } @@ -481,15 +481,15 @@ void KForecastView::loadBudgetView(void) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyForecast forecast; -// QValueList<MyMoneyAccount> accList; +// TQValueList<MyMoneyAccount> accList; m_budgetList->setBaseCurrency(file->baseCurrency()); //get the settings from current page and calculate this year based on last year - QDate historyEndDate = QDate(QDate::currentDate().year()-1, 12, 31); - QDate historyStartDate = historyEndDate.addDays(-m_accountsCycle->value() * m_forecastCycles->value()); - QDate forecastStartDate = QDate(QDate::currentDate().year(), 1, 1); - QDate forecastEndDate = QDate::currentDate().addDays(m_forecastDays->value()); + TQDate historyEndDate = TQDate(TQDate::tqcurrentDate().year()-1, 12, 31); + TQDate historyStartDate = historyEndDate.addDays(-m_accountsCycle->value() * m_forecastCycles->value()); + TQDate forecastStartDate = TQDate(TQDate::tqcurrentDate().year(), 1, 1); + TQDate forecastEndDate = TQDate::tqcurrentDate().addDays(m_forecastDays->value()); forecast.setHistoryMethod(m_historyMethod->selectedId()); MyMoneyBudget budget; @@ -513,10 +513,10 @@ void KForecastView::loadBudgetView(void) m_budgetList->show(); } -QValueList<MyMoneyPrice> KForecastView::getAccountPrices(const MyMoneyAccount& acc) +TQValueList<MyMoneyPrice> KForecastView::getAccountPrices(const MyMoneyAccount& acc) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.isInvest()) { @@ -543,7 +543,7 @@ void KForecastView::addAssetLiabilityRows(const MyMoneyForecast& forecast) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyPrice> basePrices; + TQValueList<MyMoneyPrice> basePrices; m_assetItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->asset(), forecast, basePrices, file->baseCurrency() ); m_assetItem->setOpen(true); m_liabilityItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->liability(), forecast, basePrices, file->baseCurrency()); @@ -554,7 +554,7 @@ void KForecastView::addIncomeExpenseRows(const MyMoneyForecast& forecast) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyPrice> basePrices; + TQValueList<MyMoneyPrice> basePrices; m_incomeItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->income(), forecast, basePrices, file->baseCurrency() ); m_incomeItem->setOpen(true); m_expenseItem = new KMyMoneyAccountTreeForecastItem( m_totalItem, file->expense(), forecast, basePrices, file->baseCurrency()); @@ -576,10 +576,10 @@ bool KForecastView::includeAccount(MyMoneyForecast& forecast, const MyMoneyAccou if( forecast.isForecastAccount(acc) ) return true; - QStringList accounts = acc.accountList(); + TQStringList accounts = acc.accountList(); if(accounts.size() > 0) { - QStringList::ConstIterator it_acc; + TQStringList::ConstIterator it_acc; for(it_acc = accounts.begin(); it_acc != accounts.end(); ++it_acc) { MyMoneyAccount account = file->account(*it_acc); if( includeAccount(forecast, account) ) @@ -589,10 +589,10 @@ bool KForecastView::includeAccount(MyMoneyForecast& forecast, const MyMoneyAccou return false; } -void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* parentItem, int forecastType ) +void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* tqparentItem, int forecastType ) { - QMap<QString, QString> nameIdx; - QStringList accList; + TQMap<TQString, TQString> nameIdx; + TQStringList accList; MyMoneyFile* file = MyMoneyFile::instance(); KMyMoneyAccountTreeForecastItem *forecastItem = 0; @@ -602,16 +602,16 @@ void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount if(accList.size() == 0) return; - QStringList::ConstIterator accList_t; + TQStringList::ConstIterator accList_t; for(accList_t = accList.begin(); accList_t != accList.end(); ++accList_t ) { MyMoneyAccount subAccount = file->account(*accList_t); - //only add the account if it is a forecast account or the parent of a forecast account + //only add the account if it is a forecast account or the tqparent of a forecast account if(includeAccount(forecast, subAccount)) { nameIdx[subAccount.id()] = subAccount.id(); } } - QMap<QString, QString>::ConstIterator it_nc; + TQMap<TQString, TQString>::ConstIterator it_nc; for(it_nc = nameIdx.begin(); it_nc != nameIdx.end(); ++it_nc) { const MyMoneyAccount subAccount = file->account(*it_nc); @@ -623,14 +623,14 @@ void KForecastView::loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount currency = file->security(subAccount.currencyId()); } - QString amount; - QString vAmount; + TQString amount; + TQString vAmount; MyMoneyMoney vAmountMM; //get prices - QValueList<MyMoneyPrice> prices = getAccountPrices(subAccount); + TQValueList<MyMoneyPrice> prices = getAccountPrices(subAccount); - forecastItem = new KMyMoneyAccountTreeForecastItem( parentItem, subAccount, forecast, prices, currency, static_cast<KMyMoneyAccountTreeForecastItem::EForecastViewType>(forecastType) ); + forecastItem = new KMyMoneyAccountTreeForecastItem( tqparentItem, subAccount, forecast, prices, currency, static_cast<KMyMoneyAccountTreeForecastItem::EForecastViewType>(forecastType) ); forecastItem->setOpen(true); loadAccounts(forecast, subAccount, forecastItem, forecastType); @@ -658,7 +658,7 @@ void KForecastView::loadChartView(void) reportCfg.setColumnsAreDays( true ); reportCfg.setConvertCurrency( true ); reportCfg.setIncludingForecast( true ); - reportCfg.setDateFilter(QDate::currentDate(),QDate::currentDate().addDays(m_forecastDays->value())); + reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(m_forecastDays->value())); reports::PivotTable table(reportCfg); diff --git a/kmymoney2/views/kforecastview.h b/kmymoney2/views/kforecastview.h index 8beb24a..36de0e5 100644 --- a/kmymoney2/views/kforecastview.h +++ b/kmymoney2/views/kforecastview.h @@ -46,10 +46,11 @@ using namespace reports; class KForecastView : public KForecastViewDecl { Q_OBJECT + TQ_OBJECT private: public: - KForecastView(QWidget *parent=0, const char *name=0); + KForecastView(TQWidget *tqparent=0, const char *name=0); virtual ~KForecastView(); void show(void); @@ -69,7 +70,7 @@ protected: MaxViewTabs } ForecastViewTab; - QMap<QString, QString> m_nameIdx; + TQMap<TQString, TQString> m_nameIdx; /** @@ -108,21 +109,21 @@ protected: void loadForecastSettings(void); protected slots: - void slotTabChanged(QWidget*); + void slotTabChanged(TQWidget*); /** * Get the list of prices for an account * This is used later to create an instance of KMyMoneyAccountTreeForecastItem * */ - QValueList<MyMoneyPrice> getAccountPrices(const MyMoneyAccount& acc); + TQValueList<MyMoneyPrice> getAccountPrices(const MyMoneyAccount& acc); private: void addAssetLiabilityRows(const MyMoneyForecast& forecast); void addIncomeExpenseRows(const MyMoneyForecast& forecast); void addTotalRow(KMyMoneyAccountTreeForecast* forecastList, const MyMoneyForecast& forecast); bool includeAccount(MyMoneyForecast& forecast, const MyMoneyAccount& acc); - void loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* parentItem, int forecastType); + void loadAccounts(MyMoneyForecast& forecast, const MyMoneyAccount& account, KMyMoneyAccountTreeForecastItem* tqparentItem, int forecastType); bool m_needReload[MaxViewTabs]; KMyMoneyAccountTreeForecastItem* m_totalItem; diff --git a/kmymoney2/views/kforecastviewdecl.ui b/kmymoney2/views/kforecastviewdecl.ui index 6d2bf3b..3110bbf 100644 --- a/kmymoney2/views/kforecastviewdecl.ui +++ b/kmymoney2/views/kforecastviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KForecastViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KForecastViewDecl</cstring> </property> @@ -19,7 +19,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -30,15 +30,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -54,7 +54,7 @@ <string>Days to Forecast:</string> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>m_forecastDays</cstring> </property> @@ -65,7 +65,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -81,7 +81,7 @@ <string>Days of Accounts Cycle:</string> </property> </widget> - <widget class="QSpinBox" row="1" column="1"> + <widget class="TQSpinBox" row="1" column="1"> <property name="name"> <cstring>m_accountsCycle</cstring> </property> @@ -100,7 +100,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -108,7 +108,7 @@ <string>Day of Month to start Forecast:</string> </property> </widget> - <widget class="QSpinBox" row="2" column="1"> + <widget class="TQSpinBox" row="2" column="1"> <property name="name"> <cstring>m_beginDay</cstring> </property> @@ -119,7 +119,7 @@ <number>0</number> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -127,7 +127,7 @@ <string>Historic Cycles:</string> </property> </widget> - <widget class="QSpinBox" row="3" column="1"> + <widget class="TQSpinBox" row="3" column="1"> <property name="name"> <cstring>m_forecastCycles</cstring> </property> @@ -138,7 +138,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -146,7 +146,7 @@ <string>Chart Detail:</string> </property> </widget> - <widget class="QComboBox" row="4" column="1"> + <widget class="TQComboBox" row="4" column="1"> <item> <property name="text"> <string>All</string> @@ -189,24 +189,24 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>31</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout76</cstring> + <cstring>tqlayout76</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <vbox> <property name="name"> @@ -216,7 +216,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -232,7 +232,7 @@ <string>Current Forecast Method:</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_forecastMethod</cstring> </property> @@ -254,7 +254,7 @@ </property> </widget> </hbox> - <widget class="QButtonGroup" row="2" column="0"> + <widget class="TQButtonGroup" row="2" column="0"> <property name="name"> <cstring>m_historyMethod</cstring> </property> @@ -265,7 +265,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton11</cstring> </property> @@ -276,7 +276,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton12</cstring> </property> @@ -287,7 +287,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioButton12</cstring> </property> @@ -312,16 +312,16 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>6</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout75</cstring> + <cstring>tqlayout75</cstring> </property> <hbox> <property name="name"> @@ -345,7 +345,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>21</height> @@ -369,7 +369,7 @@ </widget> </hbox> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tab</cstring> </property> @@ -381,7 +381,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>summary</cstring> </property> @@ -470,7 +470,7 @@ <enum>AutoOneFit</enum> </property> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <item> <property name="text"> <string>New Item</string> @@ -502,7 +502,7 @@ </hbox> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>detail</cstring> </property> @@ -526,7 +526,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>advanced</cstring> </property> @@ -550,7 +550,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>budget</cstring> </property> @@ -574,7 +574,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_tabChart</cstring> </property> @@ -610,5 +610,5 @@ </sizepolicy> </customwidget> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kgloballedgerview.cpp b/kmymoney2/views/kgloballedgerview.cpp index bf95e50..981f5e1 100644 --- a/kmymoney2/views/kgloballedgerview.cpp +++ b/kmymoney2/views/kgloballedgerview.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qframe.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -65,26 +65,26 @@ public: MousePressFilter* m_mousePressFilter; KMyMoneyRegister::RegisterSearchLineWidget* m_registerSearchLine; - QPoint m_startPoint; - QString m_reconciliationAccount; - QDate m_reconciliationDate; + TQPoint m_startPoint; + TQString m_reconciliationAccount; + TQDate m_reconciliationDate; MyMoneyMoney m_endingBalance; int m_precision; bool m_inLoading; bool m_recursion; bool m_showDetails; KMyMoneyRegister::Action m_action; - QTimer m_viewPosTimer; + TQTimer m_viewPosTimer; }; -MousePressFilter::MousePressFilter(QWidget* parent, const char* name) : - QObject(parent, name), +MousePressFilter::MousePressFilter(TQWidget* tqparent, const char* name) : + TQObject(tqparent, name), m_lastMousePressEvent(0), m_filterActive(true) { } -void MousePressFilter::addWidget(QWidget* w) +void MousePressFilter::addWidget(TQWidget* w) { m_parents.append(w); } @@ -94,27 +94,27 @@ void MousePressFilter::setFilterActive(bool state) m_filterActive = state; } -bool MousePressFilter::isChildOf( QWidget* child, QWidget *parent ) +bool MousePressFilter::isChildOf( TQWidget* child, TQWidget *tqparent ) { while(child) { - if(child == parent) + if(child == tqparent) return true; // If one of the ancestors is a KPassivePopup then it's as // if it is a child of our own if(dynamic_cast<KPassivePopup*>(child)) return true; - child = child->parentWidget(); + child = child->tqparentWidget(); } return false; } -bool MousePressFilter::eventFilter(QObject* o, QEvent* e) +bool MousePressFilter::eventFilter(TQObject* o, TQEvent* e) { if(m_filterActive) { - if(e->type() == QEvent::MouseButtonPress && !m_lastMousePressEvent) { - QValueList<QWidget*>::const_iterator it_w; + if(e->type() == TQEvent::MouseButtonPress && !m_lastMousePressEvent) { + TQValueList<TQWidget*>::const_iterator it_w; for(it_w = m_parents.begin(); it_w != m_parents.end(); ++it_w) { - if(isChildOf((QWidget*)o, (*it_w))) { + if(isChildOf((TQWidget*)o, (*it_w))) { m_lastMousePressEvent = e; break; } @@ -126,7 +126,7 @@ bool MousePressFilter::eventFilter(QObject* o, QEvent* e) } } - if(e->type() != QEvent::MouseButtonPress) { + if(e->type() != TQEvent::MouseButtonPress) { m_lastMousePressEvent = 0; } } @@ -143,21 +143,21 @@ KGlobalLedgerView::Private::Private() : { } -QDate KGlobalLedgerView::m_lastPostDate; +TQDate KGlobalLedgerView::m_lastPostDate; -KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name ) - : KMyMoneyViewBase(parent, name, i18n("Ledgers")), +KGlobalLedgerView::KGlobalLedgerView(TQWidget *tqparent, const char *name ) + : KMyMoneyViewBase(tqparent, name, i18n("Ledgers")), d(new Private), m_needReload(false), m_newAccountLoaded(true), m_inEditMode(false) { - d->m_mousePressFilter = new MousePressFilter((QWidget*)this); + d->m_mousePressFilter = new MousePressFilter((TQWidget*)this); d->m_action = KMyMoneyRegister::ActionNone;; // create the toolbar frame at the top of the view - m_toolbarFrame = new QFrame(this); - QVBoxLayout* toolbarLayout = new QVBoxLayout(m_toolbarFrame, 0, 0); + m_toolbarFrame = new TQFrame(this); + TQVBoxLayout* toolbarLayout = new TQVBoxLayout(m_toolbarFrame, 0, 0); m_toolbar = new KToolBar(m_toolbarFrame, 0, true); toolbarLayout->addWidget(m_toolbar); @@ -176,21 +176,21 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name ) //m_toolbar->setMaximumSize(50,20); m_toolbar->alignItemRight(1); #endif - m_toolbar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); - layout()->addWidget(m_toolbarFrame); + m_toolbar->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + tqlayout()->addWidget(m_toolbarFrame); // create the register frame - m_registerFrame = new QFrame(this); - QVBoxLayout* registerFrameLayout = new QVBoxLayout(m_registerFrame, 0, 0); - layout()->addWidget(m_registerFrame); - layout()->setStretchFactor(m_registerFrame, 2); + m_registerFrame = new TQFrame(this); + TQVBoxLayout* registerFrameLayout = new TQVBoxLayout(m_registerFrame, 0, 0); + tqlayout()->addWidget(m_registerFrame); + tqlayout()->setStretchFactor(m_registerFrame, 2); m_register = new KMyMoneyRegister::Register(m_registerFrame); registerFrameLayout->addWidget(m_register); m_register->installEventFilter(this); - connect(m_register, SIGNAL(openContextMenu()), this, SIGNAL(openContextMenu())); - connect(m_register, SIGNAL(headerClicked()), this, SLOT(slotSortOptions())); - connect(m_register, SIGNAL(reconcileStateColumnClicked(KMyMoneyRegister::Transaction*)), this, SLOT(slotToggleTransactionMark(KMyMoneyRegister::Transaction*))); - connect(&d->m_viewPosTimer, SIGNAL(timeout()), this, SLOT(slotUpdateViewPos())); + connect(m_register, TQT_SIGNAL(openContextMenu()), this, TQT_SIGNAL(openContextMenu())); + connect(m_register, TQT_SIGNAL(headerClicked()), this, TQT_SLOT(slotSortOptions())); + connect(m_register, TQT_SIGNAL(reconcileStateColumnClicked(KMyMoneyRegister::Transaction*)), this, TQT_SLOT(slotToggleTransactionMark(KMyMoneyRegister::Transaction*))); + connect(&d->m_viewPosTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateViewPos())); // insert search line widget @@ -198,24 +198,24 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name ) m_toolbar->setStretchableWidget(d->m_registerSearchLine); // create the summary frame - m_summaryFrame = new QFrame(this); - QHBoxLayout* summaryFrameLayout = new QHBoxLayout(m_summaryFrame, 0, 0); - m_leftSummaryLabel = new QLabel(m_summaryFrame); - m_centerSummaryLabel = new QLabel(m_summaryFrame); - m_rightSummaryLabel = new QLabel(m_summaryFrame); + m_summaryFrame = new TQFrame(this); + TQHBoxLayout* summaryFrameLayout = new TQHBoxLayout(m_summaryFrame, 0, 0); + m_leftSummaryLabel = new TQLabel(m_summaryFrame); + m_centerSummaryLabel = new TQLabel(m_summaryFrame); + m_rightSummaryLabel = new TQLabel(m_summaryFrame); summaryFrameLayout->addWidget(m_leftSummaryLabel); - QSpacerItem* spacer = new QSpacerItem( 20, 1, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 20, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); summaryFrameLayout->addItem(spacer); summaryFrameLayout->addWidget(m_centerSummaryLabel); - spacer = new QSpacerItem( 20, 1, QSizePolicy::Expanding, QSizePolicy::Minimum ); + spacer = new TQSpacerItem( 20, 1, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); summaryFrameLayout->addItem(spacer); summaryFrameLayout->addWidget(m_rightSummaryLabel); - layout()->addWidget(m_summaryFrame); + tqlayout()->addWidget(m_summaryFrame); // create the button frame - m_buttonFrame = new QFrame(this); - QVBoxLayout* buttonLayout = new QVBoxLayout(m_buttonFrame, 0, 0); - layout()->addWidget(m_buttonFrame); + m_buttonFrame = new TQFrame(this); + TQVBoxLayout* buttonLayout = new TQVBoxLayout(m_buttonFrame, 0, 0); + tqlayout()->addWidget(m_buttonFrame); m_buttonbar = new KToolBar(m_buttonFrame, 0, true); m_buttonbar->setIconText(KToolBar::IconTextRight); buttonLayout->addWidget(m_buttonbar); @@ -229,26 +229,26 @@ KGlobalLedgerView::KGlobalLedgerView(QWidget *parent, const char *name ) kmymoney2->action("transaction_match")->plug(m_buttonbar); // create the transaction form frame - m_formFrame = new QFrame(this); - QVBoxLayout* frameLayout = new QVBoxLayout(m_formFrame, 5, 0); + m_formFrame = new TQFrame(this); + TQVBoxLayout* frameLayout = new TQVBoxLayout(m_formFrame, 5, 0); m_form = new KMyMoneyTransactionForm::TransactionForm(m_formFrame); frameLayout->addWidget(m_form->tabBar(m_formFrame)); frameLayout->addWidget(m_form); - m_formFrame->setFrameShape( QFrame::Panel ); - m_formFrame->setFrameShadow( QFrame::Raised ); - layout()->addWidget(m_formFrame); - - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView())); - connect(m_register, SIGNAL(focusChanged(KMyMoneyRegister::Transaction*)), m_form, SLOT(slotSetTransaction(KMyMoneyRegister::Transaction*))); - connect(m_register, SIGNAL(focusChanged()), kmymoney2, SLOT(slotUpdateActions())); - connect(m_accountComboBox, SIGNAL(accountSelected(const QString&)), this, SLOT(slotSelectAccount(const QString&))); - connect(m_register, SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&))); - connect(m_register, SIGNAL(editTransaction()), this, SIGNAL(startEdit())); - connect(m_register, SIGNAL(emptyItemSelected()), this, SLOT(slotNewTransaction())); - connect(m_register, SIGNAL(aboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)), this, SLOT(slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&))); - connect(d->m_mousePressFilter, SIGNAL(mousePressedOnExternalWidget(bool&)), this, SIGNAL(cancelOrEndEdit(bool&))); - - connect(m_form, SIGNAL(newTransaction(KMyMoneyRegister::Action)), this, SLOT(slotNewTransaction(KMyMoneyRegister::Action))); + m_formFrame->setFrameShape( TQFrame::Panel ); + m_formFrame->setFrameShadow( TQFrame::Raised ); + tqlayout()->addWidget(m_formFrame); + + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView())); + connect(m_register, TQT_SIGNAL(focusChanged(KMyMoneyRegister::Transaction*)), m_form, TQT_SLOT(slotSetTransaction(KMyMoneyRegister::Transaction*))); + connect(m_register, TQT_SIGNAL(focusChanged()), kmymoney2, TQT_SLOT(slotUpdateActions())); + connect(m_accountComboBox, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(slotSelectAccount(const TQString&))); + connect(m_register, TQT_SIGNAL(selectionChanged(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&))); + connect(m_register, TQT_SIGNAL(editTransaction()), this, TQT_SIGNAL(startEdit())); + connect(m_register, TQT_SIGNAL(emptyItemSelected()), this, TQT_SLOT(slotNewTransaction())); + connect(m_register, TQT_SIGNAL(aboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&)), this, TQT_SLOT(slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&))); + connect(d->m_mousePressFilter, TQT_SIGNAL(mousePressedOnExternalWidget(bool&)), this, TQT_SIGNAL(cancelOrEndEdit(bool&))); + + connect(m_form, TQT_SIGNAL(newTransaction(KMyMoneyRegister::Action)), this, TQT_SLOT(slotNewTransaction(KMyMoneyRegister::Action))); // setup mouse press filter d->m_mousePressFilter->addWidget(m_formFrame); @@ -287,8 +287,8 @@ void KGlobalLedgerView::clear(void) m_register->clear(); // setup header font - QFont font = KMyMoneyGlobalSettings::listHeaderFont(); - QFontMetrics fm( font ); + TQFont font = KMyMoneyGlobalSettings::listHeaderFont(); + TQFontMetrics fm( font ); int height = fm.lineSpacing()+6; m_register->horizontalHeader()->setMinimumHeight(height); m_register->horizontalHeader()->setMaximumHeight(height); @@ -305,7 +305,7 @@ void KGlobalLedgerView::clear(void) m_transactionList.clear(); // and the selected account in the combo box - m_accountComboBox->setSelected(QString()); + m_accountComboBox->setSelected(TQString()); // fraction defaults to two digits d->m_precision = 2; @@ -324,12 +324,12 @@ void KGlobalLedgerView::loadView(void) KMyMoneyRegister::SelectedTransactions list; emit transactionsSelected(list); - QMap<QString, bool> isSelected; - QString focusItemId; - QString anchorItemId; + TQMap<TQString, bool> isSelected; + TQString focusItemId; + TQString anchorItemId; if(!d->m_inLoading) - d->m_startPoint = QPoint(-1, -1); + d->m_startPoint = TQPoint(-1, -1); if(!m_newAccountLoaded) { // remember the current selected transactions @@ -348,11 +348,11 @@ void KGlobalLedgerView::loadView(void) // remember the upper left corner of the viewport if(!d->m_inLoading && d->m_showDetails == KMyMoneyGlobalSettings::showRegisterDetailed()) - d->m_startPoint = QPoint(m_register->contentsX(), m_register->contentsY()); + d->m_startPoint = TQPoint(m_register->contentsX(), m_register->contentsY()); } else { if(d->m_viewPosTimer.isActive()) d->m_viewPosTimer.stop(); - d->m_startPoint = QPoint(-1, -1); + d->m_startPoint = TQPoint(-1, -1); d->m_inLoading = false; d->m_registerSearchLine->searchLine()->reset(); } @@ -381,14 +381,14 @@ void KGlobalLedgerView::loadView(void) // ... and recreate it KMyMoneyRegister::RegisterItem* focusItem = 0; KMyMoneyRegister::RegisterItem* anchorItem = 0; - QMap<QString, MyMoneyMoney> actBalance, clearedBalance, futureBalance; - QMap<QString, MyMoneyMoney>::iterator it_b; + TQMap<TQString, MyMoneyMoney> actBalance, clearedBalance, futureBalance; + TQMap<TQString, MyMoneyMoney>::iterator it_b; try { // setup the filter to select the transactions we want to display // and update the sort order - QString sortOrder; - QString key; - QDate reconciliationDate = d->m_reconciliationDate; + TQString sortOrder; + TQString key; + TQDate reconciliationDate = d->m_reconciliationDate; MyMoneyTransactionFilter filter(m_account.id()); // if it's an investment account, we also take care of @@ -402,7 +402,7 @@ void KGlobalLedgerView::loadView(void) filter.addState(MyMoneyTransactionFilter::notReconciled); filter.addState(MyMoneyTransactionFilter::cleared); } else { - filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), QDate()); + filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), TQDate()); key = "kmm-sort-std"; sortOrder = KMyMoneyGlobalSettings::sortNormalView(); if (KMyMoneyGlobalSettings::hideReconciledTransactions() @@ -426,8 +426,8 @@ void KGlobalLedgerView::loadView(void) kmymoney2->slotStatusProgressBar(0, m_transactionList.count()); // create the elements for the register - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; - QMap<QString, int>uniqueMap; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> >::const_iterator it; + TQMap<TQString, int>uniqueMap; int i = 0; for(it = m_transactionList.begin(); it != m_transactionList.end(); ++it) { uniqueMap[(*it).first.id()]++; @@ -448,10 +448,10 @@ void KGlobalLedgerView::loadView(void) // show scheduled transactions which have a scheduled postdate // within the next 'period' days. In reconciliation mode, the // period starts on the statement date. - QDate endDate = QDate::currentDate().addDays(period); + TQDate endDate = TQDate::tqcurrentDate().addDays(period); if(isReconciliationAccount()) endDate = reconciliationDate.addDays(period); - QValueList<MyMoneySchedule> scheduleList = MyMoneyFile::instance()->scheduleList(m_account.id()); + TQValueList<MyMoneySchedule> scheduleList = MyMoneyFile::instance()->scheduleList(m_account.id()); while(scheduleList.count() > 0){ MyMoneySchedule& s = scheduleList.first(); for(;;) { @@ -464,11 +464,11 @@ void KGlobalLedgerView::loadView(void) // certainly be posted in the past. So we take todays date // as the alternative if(s.isOverdue()) - t.setPostDate(QDate::currentDate()); + t.setPostDate(TQDate::tqcurrentDate()); else t.setPostDate(s.adjustedNextDueDate()); - const QValueList<MyMoneySplit>& splits = t.splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& splits = t.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { new KMyMoneyRegister::StdTransactionScheduled(m_register, t, *it_s, uniqueMap[t.id()]); @@ -476,7 +476,7 @@ void KGlobalLedgerView::loadView(void) } // keep track of this payment locally (not in the engine) if(s.isOverdue()) - s.setLastPayment(QDate::currentDate()); + s.setLastPayment(TQDate::tqcurrentDate()); else s.setLastPayment(s.nextDueDate()); @@ -528,7 +528,7 @@ void KGlobalLedgerView::loadView(void) actBalance[m_account.id()] = MyMoneyMoney(); if(m_account.accountType() == MyMoneyAccount::Investment) { - QValueList<QString>::const_iterator it_a; + TQValueList<TQString>::const_iterator it_a; for(it_a = m_account.accountList().begin(); it_a != m_account.accountList().end(); ++it_a) { actBalance[*it_a] = MyMoneyMoney(); } @@ -544,10 +544,10 @@ void KGlobalLedgerView::loadView(void) || m_account.accountGroup() == MyMoneyAccount::Equity) factor = -factor; - QMap<QString, int> deposits; - QMap<QString, int> payments; - QMap<QString, MyMoneyMoney> depositAmount; - QMap<QString, MyMoneyMoney> paymentAmount; + TQMap<TQString, int> deposits; + TQMap<TQString, int> payments; + TQMap<TQString, MyMoneyMoney> depositAmount; + TQMap<TQString, MyMoneyMoney> paymentAmount; for(it_b = actBalance.begin(); it_b != actBalance.end(); ++it_b) { MyMoneyMoney balance = MyMoneyFile::instance()->balance(it_b.key()); balance = balance * factor; @@ -590,7 +590,7 @@ void KGlobalLedgerView::loadView(void) while(p) { KMyMoneyRegister::Transaction* t = dynamic_cast<KMyMoneyRegister::Transaction*>(p); if(t) { - if(isSelected.contains(t->id())) + if(isSelected.tqcontains(t->id())) t->setSelected(true); if(t->id() == focusItemId) @@ -629,7 +629,7 @@ void KGlobalLedgerView::loadView(void) } } - if(t->transaction().postDate() > QDate::currentDate()) { + if(t->transaction().postDate() > TQDate::tqcurrentDate()) { tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).data(), t->transaction().id().data(), split.id().data(), t->transaction().postDate().toString(Qt::ISODate).data()); actBalance[split.accountId()] -= split.shares() * factor; } @@ -652,11 +652,11 @@ void KGlobalLedgerView::loadView(void) arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } if(pStatement) { - pStatement->setText(i18n("%1 payments (%2)").arg(payments[m_account.id()]). + pStatement->setText(i18n("%1 payments (%2)").tqarg(payments[m_account.id()]). arg(paymentAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } if(dStatement) { - dStatement->setText(i18n("%1 deposits (%2)").arg(deposits[m_account.id()]). + dStatement->setText(i18n("%1 deposits (%2)").tqarg(deposits[m_account.id()]). arg(depositAmount[m_account.id()].abs().formatMoney(m_account.fraction())) ); } @@ -699,9 +699,9 @@ void KGlobalLedgerView::loadView(void) // (re-)position viewport if(m_newAccountLoaded) { if(focusItem) { - d->m_startPoint = QPoint(-1, -1); + d->m_startPoint = TQPoint(-1, -1); } else { - d->m_startPoint = QPoint(0, 0); + d->m_startPoint = TQPoint(0, 0); } } if(!d->m_inLoading) { @@ -715,7 +715,7 @@ void KGlobalLedgerView::loadView(void) emit accountSelected(m_account); } -void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& actBalance, const QMap<QString, MyMoneyMoney>& clearedBalance) +void KGlobalLedgerView::updateSummaryLine(const TQMap<TQString, MyMoneyMoney>& actBalance, const TQMap<TQString, MyMoneyMoney>& clearedBalance) { MyMoneyFile* file = MyMoneyFile::instance(); m_leftSummaryLabel->show(); @@ -724,24 +724,24 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act if(isReconciliationAccount()) { if(m_account.accountType() != MyMoneyAccount::Investment) { - m_leftSummaryLabel->setText(i18n("Statement: %1").arg(d->m_endingBalance.formatMoney("", d->m_precision))); - m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); - m_rightSummaryLabel->setText(i18n("Difference: %1").arg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision))); + m_leftSummaryLabel->setText(i18n("Statement: %1").tqarg(d->m_endingBalance.formatMoney("", d->m_precision))); + m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); + m_rightSummaryLabel->setText(i18n("Difference: %1").tqarg((clearedBalance[m_account.id()] - d->m_endingBalance).formatMoney("", d->m_precision))); } } else { // update summary line in normal mode - QDate reconcileDate = m_account.lastReconciliationDate(); + TQDate reconcileDate = m_account.lastReconciliationDate(); if(reconcileDate.isValid()) { - m_leftSummaryLabel->setText(i18n("Last reconciled: %1").arg(KGlobal::locale()->formatDate(reconcileDate, true))); + m_leftSummaryLabel->setText(i18n("Last reconciled: %1").tqarg(KGlobal::locale()->formatDate(reconcileDate, true))); } else { m_leftSummaryLabel->setText(i18n("Never reconciled")); } m_rightSummaryLabel->setPaletteForegroundColor(m_leftSummaryLabel->paletteForegroundColor()); if(m_account.accountType() != MyMoneyAccount::Investment) { - m_centerSummaryLabel->setText(i18n("Cleared: %1").arg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); - m_rightSummaryLabel->setText(i18n("Balance: %1").arg(actBalance[m_account.id()].formatMoney("", d->m_precision))); + m_centerSummaryLabel->setText(i18n("Cleared: %1").tqarg(clearedBalance[m_account.id()].formatMoney("", d->m_precision))); + m_rightSummaryLabel->setText(i18n("Balance: %1").tqarg(actBalance[m_account.id()].formatMoney("", d->m_precision))); bool showNegative = actBalance[m_account.id()].isNegative(); if(m_account.accountGroup() == MyMoneyAccount::Liability && !actBalance[m_account.id()].isZero()) showNegative = !showNegative; @@ -752,11 +752,11 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act m_centerSummaryLabel->hide(); MyMoneyMoney balance; MyMoneySecurity base = file->baseCurrency(); - QMap<QString, MyMoneyMoney>::const_iterator it_b; + TQMap<TQString, MyMoneyMoney>::const_iterator it_b; bool approx = false; for(it_b = actBalance.begin(); it_b != actBalance.end(); ++it_b) { MyMoneyAccount stock = file->account(it_b.key()); - QString currencyId = stock.currencyId(); + TQString currencyId = stock.currencyId(); MyMoneySecurity sec = file->security(currencyId); MyMoneyPrice priceInfo; MyMoneyMoney rate(1,1); @@ -775,7 +775,7 @@ void KGlobalLedgerView::updateSummaryLine(const QMap<QString, MyMoneyMoney>& act } balance += ((*it_b) * rate).convert(base.smallestAccountFraction()); } - m_rightSummaryLabel->setText(i18n("Investment value: %1%2").arg(approx ? "~" : "").arg(balance.formatMoney(base.tradingSymbol(), d->m_precision))); + m_rightSummaryLabel->setText(i18n("Investment value: %1%2").tqarg(approx ? "~" : "").tqarg(balance.formatMoney(base.tradingSymbol(), d->m_precision))); } } } @@ -784,18 +784,18 @@ void KGlobalLedgerView::slotUpdateViewPos(void) { m_register->setUpdatesEnabled(true); - if(d->m_startPoint == QPoint(-1, -1)) { + if(d->m_startPoint == TQPoint(-1, -1)) { m_register->ensureItemVisible(m_register->focusItem()); m_register->updateContents(); } else { m_register->setContentsPos(d->m_startPoint.x(), d->m_startPoint.y()); - m_register->repaintContents(); + m_register->tqrepaintContents(); } d->m_inLoading = false; } -void KGlobalLedgerView::resizeEvent(QResizeEvent* ev) +void KGlobalLedgerView::resizeEvent(TQResizeEvent* ev) { m_register->resize(KMyMoneyRegister::DetailColumn); m_form->resize(KMyMoneyTransactionForm::ValueColumn1); @@ -820,9 +820,9 @@ void KGlobalLedgerView::loadAccounts(void) m_accountComboBox->loadList((KMyMoneyUtils::categoryTypeE)(KMyMoneyUtils::asset | KMyMoneyUtils::liability)); if(m_account.id().isEmpty()) { - QStringList list = m_accountComboBox->accountList(); + TQStringList list = m_accountComboBox->accountList(); if(list.count()) { - QStringList::Iterator it; + TQStringList::Iterator it; for(it = list.begin(); it != list.end(); ++it) { MyMoneyAccount a = file->account(*it); if(!a.isInvest()) { @@ -849,7 +849,7 @@ void KGlobalLedgerView::loadAccounts(void) } } -void KGlobalLedgerView::selectTransaction(const QString& id) +void KGlobalLedgerView::selectTransaction(const TQString& id) { if(!id.isEmpty()) { KMyMoneyRegister::RegisterItem* p = m_register->lastItem(); @@ -879,14 +879,14 @@ void KGlobalLedgerView::slotSelectAllTransactions(void) } p = p->nextItem(); } - m_register->repaintItems(); + m_register->tqrepaintItems(); // inform everyone else about the selected items KMyMoneyRegister::SelectedTransactions list(m_register); emit transactionsSelected(list); } -void KGlobalLedgerView::slotSetReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance) +void KGlobalLedgerView::slotSetReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance) { if(d->m_reconciliationAccount != acc.id()) { // make sure the account is selected @@ -935,7 +935,7 @@ bool KGlobalLedgerView::slotSelectAccount(const MyMoneyObject& obj) return rc; } -bool KGlobalLedgerView::slotSelectAccount(const QString& id, const QString& transactionId) +bool KGlobalLedgerView::slotSelectAccount(const TQString& id, const TQString& transactionId) { bool rc = true; @@ -944,9 +944,9 @@ bool KGlobalLedgerView::slotSelectAccount(const QString& id, const QString& tran try { m_account = MyMoneyFile::instance()->account(id); // if a stock account is selected, we show the - // the corresponding parent (investment) account + // the corresponding tqparent (investment) account if(m_account.isInvest()) { - m_account = MyMoneyFile::instance()->account(m_account.parentAccountId()); + m_account = MyMoneyFile::instance()->account(m_account.tqparentAccountId()); } m_newAccountLoaded = true; slotLoadView(); @@ -1089,14 +1089,14 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected } // decide, if we edit in the register or in the form - TransactionEditorContainer* parent; + TransactionEditorContainer* tqparent; if(m_formFrame->isVisible()) - parent = m_form; + tqparent = m_form; else { - parent = m_register; + tqparent = m_register; } - editor = item->createEditor(parent, list, m_lastPostDate); + editor = item->createEditor(tqparent, list, m_lastPostDate); // check that we use the same transaction commodity in all selected transactions // if not, we need to update this in the editor's list. The user can also bail out @@ -1111,27 +1111,27 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected } if(editor) { - if(parent == m_register) { + if(tqparent == m_register) { // make sure, the height of the table is correct m_register->updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm()); } m_inEditMode = true; - connect(editor, SIGNAL(transactionDataSufficient(bool)), kmymoney2->action("transaction_enter"), SLOT(setEnabled(bool))); - connect(editor, SIGNAL(returnPressed()), kmymoney2->action("transaction_enter"), SLOT(activate())); - connect(editor, SIGNAL(escapePressed()), kmymoney2->action("transaction_cancel"), SLOT(activate())); + connect(editor, TQT_SIGNAL(transactionDataSufficient(bool)), kmymoney2->action("transaction_enter"), TQT_SLOT(setEnabled(bool))); + connect(editor, TQT_SIGNAL(returnPressed()), kmymoney2->action("transaction_enter"), TQT_SLOT(activate())); + connect(editor, TQT_SIGNAL(escapePressed()), kmymoney2->action("transaction_cancel"), TQT_SLOT(activate())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), editor, SLOT(slotReloadEditWidgets())); - connect(editor, SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), editor, TQT_SLOT(slotReloadEditWidgets())); + connect(editor, TQT_SIGNAL(finishEdit(const KMyMoneyRegister::SelectedTransactions&)), this, TQT_SLOT(slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions&))); - connect(editor, SIGNAL(objectCreation(bool)), d->m_mousePressFilter, SLOT(setFilterDeactive(bool))); - connect(editor, SIGNAL(createPayee(const QString&, QString&)), kmymoney2, SLOT(slotPayeeNew(const QString&, QString&))); - connect(editor, SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(editor, SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); - connect(editor, SIGNAL(assignNumber(void)), kmymoney2, SLOT(slotTransactionAssignNumber())); - connect(editor, SIGNAL(lastPostDateUsed(const QDate&)), this, SLOT(slotKeepPostDate(const QDate&))); + connect(editor, TQT_SIGNAL(objectCreation(bool)), d->m_mousePressFilter, TQT_SLOT(setFilterDeactive(bool))); + connect(editor, TQT_SIGNAL(createPayee(const TQString&, TQString&)), kmymoney2, TQT_SLOT(slotPayeeNew(const TQString&, TQString&))); + connect(editor, TQT_SIGNAL(createCategory(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotCategoryNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(editor, TQT_SIGNAL(createSecurity(MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotInvestmentNew(MyMoneyAccount&, const MyMoneyAccount&))); + connect(editor, TQT_SIGNAL(assignNumber(void)), kmymoney2, TQT_SLOT(slotTransactionAssignNumber())); + connect(editor, TQT_SIGNAL(lastPostDateUsed(const TQDate&)), this, TQT_SLOT(slotKeepPostDate(const TQDate&))); - // create the widgets, place them in the parent and load them with data + // create the widgets, place them in the tqparent and load them with data // setup tab order m_tabOrderWidgets.clear(); editor->setup(m_tabOrderWidgets, m_account, d->m_action); @@ -1139,22 +1139,22 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected Q_ASSERT(!m_tabOrderWidgets.isEmpty()); // install event filter in all taborder widgets - for(QWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { + for(TQWidget* w = m_tabOrderWidgets.first(); w; w = m_tabOrderWidgets.next()) { w->installEventFilter(this); } // Install a filter that checks if a mouse press happened outside // of one of our own widgets. - qApp->installEventFilter(d->m_mousePressFilter); + tqApp->installEventFilter(d->m_mousePressFilter); // Check if the editor has some preference on where to set the focus // If not, set the focus to the first widget in the tab order - QWidget* focusWidget = editor->firstWidget(); - if(!focusWidget) - focusWidget = m_tabOrderWidgets.first(); + TQWidget* tqfocusWidget = editor->firstWidget(); + if(!tqfocusWidget) + tqfocusWidget = m_tabOrderWidgets.first(); // for some reason, this only works reliably if delayed a bit - QTimer::singleShot(10, focusWidget, SLOT(setFocus())); + TQTimer::singleShot(10, tqfocusWidget, TQT_SLOT(setFocus())); // preset to 'I have no idea which type to create' for the next round. d->m_action = KMyMoneyRegister::ActionNone; @@ -1166,7 +1166,7 @@ TransactionEditor* KGlobalLedgerView::startEdit(const KMyMoneyRegister::Selected void KGlobalLedgerView::slotLeaveEditMode(const KMyMoneyRegister::SelectedTransactions& list) { m_inEditMode = false; - qApp->removeEventFilter(d->m_mousePressFilter); + tqApp->removeEventFilter(d->m_mousePressFilter); // a possible focusOut event may have removed the focus, so we // install it back again. @@ -1204,13 +1204,13 @@ bool KGlobalLedgerView::focusNextPrevChild(bool next) // qDebug("KGlobalLedgerView::focusNextPrevChild(editmode=%s)", m_inEditMode ? "true" : "false"); if(m_inEditMode) { - QWidget *w = 0; - QWidget *currentWidget; + TQWidget *w = 0; + TQWidget *currentWidget; - w = qApp->focusWidget(); - while(w && m_tabOrderWidgets.find(w) == -1) { - // qDebug("'%s' not in list, use parent", w->className()); - w = w->parentWidget(); + w = tqApp->tqfocusWidget(); + while(w && m_tabOrderWidgets.tqfind(w) == -1) { + // qDebug("'%s' not in list, use tqparent", w->className()); + w = w->tqparentWidget(); } // if(w) qDebug("tab order is at '%s'", w->className()); currentWidget = m_tabOrderWidgets.current(); @@ -1222,7 +1222,7 @@ bool KGlobalLedgerView::focusNextPrevChild(bool next) } if(w != currentWidget - && ((w->focusPolicy() & TabFocus) == TabFocus) + && ((w->focusPolicy() & TQ_TabFocus) == TQ_TabFocus) && w->isVisible() && w->isEnabled()) { // qDebug("Selecting '%s' as focus", w->className()); w->setFocus(); @@ -1258,26 +1258,26 @@ void KGlobalLedgerView::show(void) KMyMoneyViewBase::show(); } -bool KGlobalLedgerView::eventFilter(QObject* o, QEvent* e) +bool KGlobalLedgerView::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; - if(e->type() == QEvent::KeyPress) { - QKeyEvent *k = static_cast<QKeyEvent*>(e); + if(e->type() == TQEvent::KeyPress) { + TQKeyEvent *k = TQT_TQKEYEVENT(e); if(m_inEditMode) { // qDebug("object = %s, key = %d", o->className(), k->key()); - if(o == m_register) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) { // we hide all key press events from the register // while editing a transaction rc = true; } } else { // qDebug("object = %s, key = %d", o->className(), k->key()); - if(o == m_register) { - if((k->state() & Qt::KeyButtonMask) == 0) { + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_register)) { + if((k->state() & TQt::KeyButtonMask) == 0) { switch(k->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: kmymoney2->action("transaction_edit")->activate(); rc = true; break; @@ -1297,8 +1297,8 @@ void KGlobalLedgerView::slotSortOptions(void) { KSortOptionDlg* dlg = new KSortOptionDlg(this); - QString key; - QString sortOrder, def; + TQString key; + TQString sortOrder, def; if(isReconciliationAccount()) { key = "kmm-sort-reconcile"; def = KMyMoneyGlobalSettings::sortReconcileView(); @@ -1311,11 +1311,11 @@ void KGlobalLedgerView::slotSortOptions(void) if(!m_account.value(key).isEmpty()) sortOrder = m_account.value(key); - QString oldOrder = sortOrder; + TQString oldOrder = sortOrder; dlg->setSortOption(sortOrder, def); - if(dlg->exec() == QDialog::Accepted) { + if(dlg->exec() == TQDialog::Accepted) { sortOrder = dlg->sortOption(); if(sortOrder != oldOrder) { if(sortOrder.isEmpty()) { @@ -1343,12 +1343,12 @@ void KGlobalLedgerView::slotToggleTransactionMark(KMyMoneyRegister::Transaction* } } -void KGlobalLedgerView::slotKeepPostDate(const QDate& date) +void KGlobalLedgerView::slotKeepPostDate(const TQDate& date) { m_lastPostDate = date; } -bool KGlobalLedgerView::canCreateTransactions(QString& tooltip) const +bool KGlobalLedgerView::canCreateTransactions(TQString& tooltip) const { bool rc = true; if(m_account.id().isEmpty()) { @@ -1367,7 +1367,7 @@ bool KGlobalLedgerView::canCreateTransactions(QString& tooltip) const return rc; } -bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { if(m_register->focusItem() == 0) return false; @@ -1379,17 +1379,17 @@ bool KGlobalLedgerView::canProcessTransactions(const KMyMoneyRegister::SelectedT return list.count() > 0; } -bool KGlobalLedgerView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KGlobalLedgerView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { return canProcessTransactions(list,tooltip) && list.canModify(); } -bool KGlobalLedgerView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KGlobalLedgerView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { return canProcessTransactions(list,tooltip) && list.canDuplicate(); } -bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { // check if we can edit the list of transactions. We can edit, if // @@ -1421,7 +1421,7 @@ bool KGlobalLedgerView::canEditTransactions(const KMyMoneyRegister::SelectedTran KMyMoneyRegister::SelectedTransactions::const_iterator it_t; for(it_t = list.begin(); rc && it_t != list.end(); ++it_t) { if((*it_t).transaction().id().isEmpty()) { - tooltip = QString(); + tooltip = TQString(); rc = false; continue; } diff --git a/kmymoney2/views/kgloballedgerview.h b/kmymoney2/views/kgloballedgerview.h index 861bd0e..0d782ab 100644 --- a/kmymoney2/views/kgloballedgerview.h +++ b/kmymoney2/views/kgloballedgerview.h @@ -26,9 +26,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qwidgetlist.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqwidgetlist.h> +#include <tqstring.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,12 +45,12 @@ #include <kmymoney/register.h> #include <kmymoney/transactionform.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QPopupMenu; -class QFrame; -class QLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQPopupMenu; +class TQFrame; +class TQLabel; class KMyMoneyAccountCombo; class KToolBar; @@ -63,17 +63,18 @@ class TransactionEditor; * events on widgets outside a given set of widgets. This is used internally * to detect when to leave the edit mode. */ -class MousePressFilter : public QObject +class MousePressFilter : public TQObject { Q_OBJECT + TQ_OBJECT public: - MousePressFilter(QWidget* parent = 0, const char* name = 0); + MousePressFilter(TQWidget* tqparent = 0, const char* name = 0); /** - * Add widget @p w to the list of possible parent objects. See eventFilter() how + * Add widget @p w to the list of possible tqparent objects. See eventFilter() how * they will be used. */ - void addWidget(QWidget* w); + void addWidget(TQWidget* w); public slots: /** @@ -95,32 +96,32 @@ public slots: protected: /** * This method checks if the widget @p child is a child of - * the widget @p parent and returns either @a true or @a false. + * the widget @p tqparent and returns either @a true or @a false. * * @param child pointer to child widget - * @param parent pointer to parent widget - * @retval true @p child points to widget which has @p parent as parent or grand-parent - * @retval false @p child points to a widget which is not related to @p parent + * @param tqparent pointer to tqparent widget + * @retval true @p child points to widget which has @p tqparent as tqparent or grand-tqparent + * @retval false @p child points to a widget which is not related to @p tqparent */ - bool isChildOf(QWidget* child, QWidget* parent); + bool isChildOf(TQWidget* child, TQWidget* tqparent); /** * Reimplemented from base class. Sends out the mousePressedOnExternalWidget() signal * if object @p o points to an object which is not a child widget of any added previously * using the addWidget() method. The signal is sent out only once for each event @p e. * - * @param o pointer to QObject - * @param e pointer to QEvent + * @param o pointer to TQObject + * @param e pointer to TQEvent * @return always returns @a false */ - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); signals: void mousePressedOnExternalWidget(bool&); private: - QValueList<QWidget*> m_parents; - QEvent* m_lastMousePressEvent; + TQValueList<TQWidget*> m_parents; + TQEvent* m_lastMousePressEvent; bool m_filterActive; }; @@ -130,15 +131,16 @@ private: class KGlobalLedgerView : public KMyMoneyViewBase { Q_OBJECT + TQ_OBJECT public: - KGlobalLedgerView(QWidget *parent=0, const char *name=0); + KGlobalLedgerView(TQWidget *tqparent=0, const char *name=0); ~KGlobalLedgerView(); /** * This method returns the id of the currently selected account - * or QString() if none is selected. + * or TQString() if none is selected. */ - const QString accountId(void) const { return m_account.id(); } + const TQString accountId(void) const { return m_account.id(); } /** * Checks if new transactions can be created in the current context @@ -150,7 +152,7 @@ public: * @retval true Yes, view allows to create transactions (tooltip is not changed) * @retval false No, view does not support creation of transactions (tooltip is updated with message) */ - bool canCreateTransactions(QString& tooltip) const; + bool canCreateTransactions(TQString& tooltip) const; /** * Checks if a list of transactions can be modified (edit/delete) in the current context @@ -163,9 +165,9 @@ public: * @retval true Yes, view allows to edit/delete transactions (tooltip is not changed) * @retval false No, view cannot edit/delete transactions (tooltip is updated with message) */ - bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; - bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; /** * Checks if the list of transactions can be edited in the current context @@ -177,7 +179,7 @@ public: * * @return @c true if edit operation is possible, @c false if not */ - bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; TransactionEditor* startEdit(const KMyMoneyRegister::SelectedTransactions& list); @@ -204,13 +206,13 @@ public slots: * * @param accountId Internal id used for the account to show * @param transactionId Internal id used for the transaction to select. - * Default is QString() which will select the last + * Default is TQString() which will select the last * transaction in the ledger if not the same account * * @retval true selection of account referenced by @p id succeeded * @retval false selection of account failed */ - bool slotSelectAccount(const QString& accountId, const QString& transactionId = QString()); + bool slotSelectAccount(const TQString& accountId, const TQString& transactionId = TQString()); /** * This method is provided for convenience and acts as the method above. @@ -228,7 +230,7 @@ public slots: * @param endingBalance The calculated ending balance for the statement * Default ist 0. */ - void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const QDate& reconciliationDate = QDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney()); + void slotSetReconcileAccount(const MyMoneyAccount& account = MyMoneyAccount(), const TQDate& reconciliationDate = TQDate(), const MyMoneyMoney& endingBalance = MyMoneyMoney()); /** * Select all transactions in the ledger that are not hidden. @@ -253,9 +255,9 @@ protected: void loadView(void); - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); - void selectTransaction(const QString& id); + void selectTransaction(const TQString& id); /** * This method handles the focus of the keyboard. When in edit mode @@ -268,7 +270,7 @@ protected: */ bool focusNextPrevChild(bool next); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); /** * Returns @a true if setReconciliationAccount() has been called for @@ -287,7 +289,7 @@ protected: * @param actBalance map of account indexed values to be used as actual balance * @param clearedBalance map of account indexed values to be used as cleared balance */ - void updateSummaryLine(const QMap<QString, MyMoneyMoney>& actBalance, const QMap<QString, MyMoneyMoney>& clearedBalance); + void updateSummaryLine(const TQMap<TQString, MyMoneyMoney>& actBalance, const TQMap<TQString, MyMoneyMoney>& clearedBalance); /** * setup the default action according to the current account type @@ -301,13 +303,13 @@ protected slots: /** * Sets the contentsPos of the register to d->m_startPoint or makes - * the focus item visible if d->m_startPoint equals QPoint(-1, -1). + * the focus item visible if d->m_startPoint equals TQPoint(-1, -1). */ void slotUpdateViewPos(void); void slotSortOptions(void); void slotToggleTransactionMark(KMyMoneyRegister::Transaction* t); - void slotKeepPostDate(const QDate&); + void slotKeepPostDate(const TQDate&); void slotAboutToSelectItem(KMyMoneyRegister::RegisterItem*, bool&); @@ -318,7 +320,7 @@ protected: * and is used to preset the posting date when new transactions are created. * This member is initialised to the current date when the program is started. */ - static QDate m_lastPostDate; + static TQDate m_lastPostDate; private: /// \internal d-pointer class. @@ -327,11 +329,11 @@ private: Private* const d; // frames - QFrame* m_toolbarFrame; - QFrame* m_registerFrame; - QFrame* m_buttonFrame; - QFrame* m_formFrame; - QFrame* m_summaryFrame; + TQFrame* m_toolbarFrame; + TQFrame* m_registerFrame; + TQFrame* m_buttonFrame; + TQFrame* m_formFrame; + TQFrame* m_summaryFrame; // widgets KMyMoneyAccountCombo* m_accountComboBox; @@ -347,11 +349,11 @@ private: /** * This member holds the transaction list */ - QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; + TQValueList<TQPair<MyMoneyTransaction, MyMoneySplit> > m_transactionList; - QLabel* m_leftSummaryLabel; - QLabel* m_centerSummaryLabel; - QLabel* m_rightSummaryLabel; + TQLabel* m_leftSummaryLabel; + TQLabel* m_centerSummaryLabel; + TQLabel* m_rightSummaryLabel; KMyMoneyTransactionForm::TransactionForm* m_form; @@ -359,7 +361,7 @@ private: bool m_newAccountLoaded; bool m_inEditMode; - QWidgetList m_tabOrderWidgets; + TQWidgetList m_tabOrderWidgets; signals: void accountSelected(const MyMoneyObject&); @@ -396,7 +398,7 @@ signals: void toggleReconciliationFlag(void); private: - bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canProcessTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; }; #endif diff --git a/kmymoney2/views/khomeview.cpp b/kmymoney2/views/khomeview.cpp index 95b7323..51e9c65 100644 --- a/kmymoney2/views/khomeview.cpp +++ b/kmymoney2/views/khomeview.cpp @@ -23,16 +23,16 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qdatetime.h> -#include <qapplication.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqapplication.h> #include <dom/dom_element.h> #include <dom/dom_doc.h> #include <dom/dom_text.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qtimer.h> -#include <qbuffer.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqtimer.h> +#include <tqbuffer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -88,12 +88,12 @@ class KHomeView::Private { public: Private() {} - void addNameIndex(QMap<QString, MyMoneyAccount> &idx, const MyMoneyAccount& account); + void addNameIndex(TQMap<TQString, MyMoneyAccount> &idx, const MyMoneyAccount& account); }; -void KHomeView::Private::addNameIndex(QMap<QString, MyMoneyAccount> &idx, const MyMoneyAccount& account) +void KHomeView::Private::addNameIndex(TQMap<TQString, MyMoneyAccount> &idx, const MyMoneyAccount& account) { - QString key = account.name(); + TQString key = account.name(); if(idx[key].id().isEmpty()) { idx[key] = account; @@ -101,15 +101,15 @@ void KHomeView::Private::addNameIndex(QMap<QString, MyMoneyAccount> &idx, const } else if(idx[key].id() != account.id()) { key = account.name() + "[%1]"; int dup = 2; - while(!idx[key.arg(dup)].id().isEmpty() - && idx[key.arg(dup)].id() != account.id()) + while(!idx[key.tqarg(dup)].id().isEmpty() + && idx[key.tqarg(dup)].id() != account.id()) ++dup; - idx[key.arg(dup)] = account; + idx[key.tqarg(dup)] = account; } } -KHomeView::KHomeView(QWidget *parent, const char *name ) : - KMyMoneyViewBase(parent, name, i18n("Home")), +KHomeView::KHomeView(TQWidget *tqparent, const char *name ) : + KMyMoneyViewBase(tqparent, name, i18n("Home")), d(new Private), m_showAllSchedules(false), m_needReload(true) @@ -117,13 +117,13 @@ KHomeView::KHomeView(QWidget *parent, const char *name ) : m_part = new KHTMLPart(this, "htmlpart_km2"); addWidget(m_part->view()); - m_filename = KMyMoneyUtils::findResource("appdata", QString("html/home%1.html")); + m_filename = KMyMoneyUtils::findResource("appdata", TQString("html/home%1.html")); // m_part->openURL(m_filename); - connect(m_part->browserExtension(), SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), - this, SLOT(slotOpenURL(const KURL&, const KParts::URLArgs&))); + connect(m_part->browserExtension(), TQT_SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), + this, TQT_SLOT(slotOpenURL(const KURL&, const KParts::URLArgs&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView())); } KHomeView::~KHomeView() @@ -153,7 +153,7 @@ void KHomeView::show(void) loadView(); m_needReload = false; } - QWidget::show(); + TQWidget::show(); } void KHomeView::slotPrintView(void) @@ -167,7 +167,7 @@ void KHomeView::loadView(void) m_part->setZoomFactor( KMyMoneyGlobalSettings::fontSizePercentage() ); //kdDebug() << "Setting font size: " << m_part->zoomFactor() << endl; - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list); if(list.count() == 0) { @@ -186,7 +186,7 @@ void KHomeView::loadView(void) else { qDebug("Element id=test found!"); - QString tagname = e.tagName().string(); + TQString tagname = e.tagName().string(); qDebug("%s",tagname.latin1()); qDebug("%s id=%s",e.tagName().string().latin1(),e.getAttribute("id").string().latin1()); @@ -214,23 +214,23 @@ void KHomeView::loadView(void) //clear the forecast flag so it will be reloaded m_forecast.setForecastDone(false); - QString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); - QString header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").arg(filename); + TQString filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); + TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">\n").tqarg(filename); header += KMyMoneyUtils::variableCSS(); header += "</head><body id=\"summaryview\">\n"; - QString footer = "</body></html>\n"; + TQString footer = "</body></html>\n"; m_part->begin(); m_part->write(header); - m_part->write(QString("<div id=\"summarytitle\">%1</div>").arg(i18n("Your Financial Summary"))); + m_part->write(TQString("<div id=\"summarytitle\">%1</div>").tqarg(i18n("Your Financial Summary"))); - QStringList settings = KMyMoneyGlobalSettings::itemList(); + TQStringList settings = KMyMoneyGlobalSettings::itemList(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for(it = settings.begin(); it != settings.end(); ++it) { int option = (*it).toInt(); @@ -246,7 +246,7 @@ void KHomeView::loadView(void) case 3: // payment accounts // Check if preferred accounts are shown separately - if(settings.find("2") == settings.end()) { + if(settings.tqfind("2") == settings.end()) { showAccounts(static_cast<paymentTypeE> (Payment | Preferred), i18n("Payment Accounts")); } else { @@ -279,7 +279,7 @@ void KHomeView::loadView(void) } m_part->write("<div id=\"returnlink\">"); - m_part->write(link(VIEW_WELCOME, QString()) + i18n("Show KMyMoney welcome page") + linkend()); + m_part->write(link(VIEW_WELCOME, TQString()) + i18n("Show KMyMoney welcome page") + linkend()); m_part->write("</div>"); m_part->write("<div id=\"vieweffect\"></div>"); m_part->write(footer); @@ -291,7 +291,7 @@ void KHomeView::loadView(void) void KHomeView::showNetWorthGraph(void) { #ifdef HAVE_KDCHART - m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").arg(i18n("Networth Forecast"))); + m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").tqarg(i18n("Networth Forecast"))); MyMoneyReport reportCfg = MyMoneyReport( MyMoneyReport::eAssetLiability, @@ -311,7 +311,7 @@ void KHomeView::showNetWorthGraph(void) reportCfg.setColumnsAreDays( true ); reportCfg.setConvertCurrency( true ); reportCfg.setIncludingForecast( true ); - reportCfg.setDateFilter(QDate::currentDate(),QDate::currentDate().addDays(+90)); + reportCfg.setDateFilter(TQDate::tqcurrentDate(),TQDate::tqcurrentDate().addDays(+90)); reports::PivotTable table(reportCfg); @@ -330,7 +330,7 @@ void KHomeView::showNetWorthGraph(void) const int idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue); //KDChartPropertySet propSetLastValue("last value", idPropFutureValue); - //propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, Qt::AlignLeft | Qt::AlignBottom); + //propSetLastValue.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignBottom); //propSetLastValue.setExtraLinesWidth(KDChartPropertySet::OwnID, -4); //propSetLastValue.setExtraLinesColor(KDChartPropertySet::OwnID, KMyMoneyGlobalSettings::listGridColor()); // propSetLastValue.setShowMarker(KDChartPropertySet::OwnID, true); @@ -349,19 +349,19 @@ void KHomeView::showNetWorthGraph(void) chartWidget->resize(width()-80, nh); } - QPixmap pm(chartWidget->width(), chartWidget->height()); + TQPixmap pm(chartWidget->width(), chartWidget->height()); pm.fill(KGlobalSettings::baseColor()); - QPainter p(&pm); + TQPainter p(&pm); chartWidget->paintTo(p); - QByteArray ba; - QBuffer buffer( ba ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); pm.save( &buffer, "PNG" ); // writes pixmap into ba in PNG format m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); m_part->write("<tr>"); - m_part->write(QString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").arg(KCodecs::base64Encode(ba))); + m_part->write(TQString("<td><center><IMG SRC=\"data:image/png;base64,%1\" ALT=\"Networth\"></center></td>").tqarg(TQString(KCodecs::base64Encode(ba)))); m_part->write("</tr>"); m_part->write("</table></div></div>"); @@ -372,8 +372,8 @@ void KHomeView::showNetWorthGraph(void) void KHomeView::showPayments(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySchedule> overdues; - QValueList<MyMoneySchedule> schedule; + TQValueList<MyMoneySchedule> overdues; + TQValueList<MyMoneySchedule> schedule; int i = 0; //if forecast has not been executed yet, do it. @@ -383,12 +383,12 @@ void KHomeView::showPayments(void) schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate::currentDate(), - QDate::currentDate().addMonths(1)); + TQDate::tqcurrentDate(), + TQDate::tqcurrentDate().addMonths(1)); overdues = file->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), QDate(), true); + TQDate(), TQDate(), true); if(schedule.empty() && overdues.empty()) return; @@ -396,11 +396,11 @@ void KHomeView::showPayments(void) // HACK // Remove the finished schedules - QValueList<MyMoneySchedule>::Iterator d_it; + TQValueList<MyMoneySchedule>::Iterator d_it; for (d_it=schedule.begin(); d_it!=schedule.end();) { // FIXME cleanup old code - // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == QDate()) + // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == TQDate()) if ((*d_it).isFinished()) { d_it = schedule.remove(d_it); @@ -412,7 +412,7 @@ void KHomeView::showPayments(void) for (d_it=overdues.begin(); d_it!=overdues.end();) { // FIXME cleanup old code - // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == QDate()) + // if ((*d_it).isFinished() || (*d_it).nextPayment((*d_it).lastPayment()) == TQDate()) if ((*d_it).isFinished()) { d_it = overdues.remove(d_it); @@ -422,17 +422,17 @@ void KHomeView::showPayments(void) } m_part->write("<div class=\"shadow\"><div class=\"displayblock\">"); - m_part->write(QString("<div class=\"summaryheader\">%1</div>\n").arg(i18n("Payments"))); + m_part->write(TQString("<div class=\"summaryheader\">%1</div>\n").tqarg(i18n("Payments"))); if(overdues.count() > 0) { m_part->write("<div class=\"gap\"> </div>\n"); qBubbleSort(overdues); - QValueList<MyMoneySchedule>::Iterator it; - QValueList<MyMoneySchedule>::Iterator it_f; + TQValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule>::Iterator it_f; m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); - m_part->write(QString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").arg(showColoredAmount(i18n("Overdue payments"), true))); + m_part->write(TQString("<tr class=\"itemtitle warningtitle\" ><td colspan=\"5\">%1</td></tr>\n").tqarg(showColoredAmount(i18n("Overdue payments"), true))); m_part->write("<tr class=\"item warning\">"); m_part->write("<td class=\"left\" width=\"10%\">"); m_part->write(i18n("Date")); @@ -453,9 +453,9 @@ void KHomeView::showPayments(void) for(it = overdues.begin(); it != overdues.end(); ++it) { // determine number of overdue payments - QDate nextDate = (*it).adjustedNextDueDate(); + TQDate nextDate = (*it).adjustedNextDueDate(); int cnt = 0; - while(nextDate.isValid() && nextDate < QDate::currentDate()) { + while(nextDate.isValid() && nextDate < TQDate::tqcurrentDate()) { ++cnt; nextDate = (*it).nextPayment(nextDate); // for single occurence nextDate will not change, so we @@ -464,7 +464,7 @@ void KHomeView::showPayments(void) break; } - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*it, cnt); m_part->write("</tr>"); // make sure to not repeat overdues later again @@ -483,15 +483,15 @@ void KHomeView::showPayments(void) qBubbleSort(schedule); // Extract todays payments if any - QValueList<MyMoneySchedule> todays; - QValueList<MyMoneySchedule>::Iterator t_it; + TQValueList<MyMoneySchedule> todays; + TQValueList<MyMoneySchedule>::Iterator t_it; for (t_it=schedule.begin(); t_it!=schedule.end();) { - if ((*t_it).nextDueDate() == QDate::currentDate()) { + if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) { todays.append(*t_it); (*t_it).setNextDueDate((*t_it).nextPayment((*t_it).nextDueDate())); - //if nextDueDate is still currentDate then remove it from scheduled payments - if ((*t_it).nextDueDate() == QDate::currentDate()) { + //if nextDueDate is still tqcurrentDate then remove it from scheduled payments + if ((*t_it).nextDueDate() == TQDate::tqcurrentDate()) { t_it = schedule.remove(t_it); continue; } @@ -502,7 +502,7 @@ void KHomeView::showPayments(void) if (todays.count() > 0) { m_part->write("<div class=\"gap\"> </div>\n"); m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); - m_part->write(QString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Today's payments"))); + m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Today's payments"))); m_part->write("<tr class=\"item\">"); m_part->write("<td class=\"left\" width=\"10%\">"); m_part->write(i18n("Date")); @@ -522,7 +522,7 @@ void KHomeView::showPayments(void) m_part->write("</tr>"); for(t_it = todays.begin(); t_it != todays.end(); ++t_it) { - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*t_it); m_part->write("</tr>"); } @@ -533,10 +533,10 @@ void KHomeView::showPayments(void) { m_part->write("<div class=\"gap\"> </div>\n"); - QValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule>::Iterator it; m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); - m_part->write(QString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").arg(i18n("Future payments"))); + m_part->write(TQString("<tr class=\"itemtitle\"><td class=\"left\" colspan=\"5\">%1</td></tr>\n").tqarg(i18n("Future payments"))); m_part->write("<tr class=\"item\">"); m_part->write("<td class=\"left\" width=\"10%\">"); m_part->write(i18n("Date")); @@ -560,7 +560,7 @@ void KHomeView::showPayments(void) cnt = (m_showAllSchedules) ? -1 : 6; bool needMoreLess = m_showAllSchedules; - QDate lastDate = QDate::currentDate().addMonths(1); + TQDate lastDate = TQDate::tqcurrentDate().addMonths(1); qBubbleSort(schedule); do { it = schedule.begin(); @@ -569,7 +569,7 @@ void KHomeView::showPayments(void) // if the next due date is invalid (schedule is finished) // we remove it from the list - QDate nextDate = (*it).nextDueDate(); + TQDate nextDate = (*it).nextDueDate(); if(!nextDate.isValid()) { schedule.remove(it); continue; @@ -585,7 +585,7 @@ void KHomeView::showPayments(void) if(cnt > 0) --cnt; - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); showPaymentEntry(*it); m_part->write("</tr>"); @@ -602,12 +602,12 @@ void KHomeView::showPayments(void) while(1); if (needMoreLess) { - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); m_part->write("<td>"); if(m_showAllSchedules) { - m_part->write(link(VIEW_SCHEDULE, QString("?mode=%1").arg("reduced")) + i18n("Less...") + linkend()); + m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("reduced")) + i18n("Less...") + linkend()); } else { - m_part->write(link(VIEW_SCHEDULE, QString("?mode=%1").arg("full")) + i18n("More...") + linkend()); + m_part->write(link(VIEW_SCHEDULE, TQString("?mode=%1").tqarg("full")) + i18n("More...") + linkend()); } m_part->write("</td><td></td><td></td><td></td><td></td>"); m_part->write("</tr>"); @@ -620,7 +620,7 @@ void KHomeView::showPayments(void) void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) { - QString tmp; + TQString tmp; MyMoneyFile* file = MyMoneyFile::instance(); try { @@ -629,49 +629,49 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) MyMoneyTransaction t = sched.transaction(); // only show the entry, if it is still active // FIXME clean old code - // if(!sched.isFinished() && sched.nextPayment(sched.lastPayment()) != QDate()) { + // if(!sched.isFinished() && sched.nextPayment(sched.lastPayment()) != TQDate()) { if(!sched.isFinished()) { MyMoneySplit sp = t.splitByAccount(acc.id(), true); - QString pathEnter, pathSkip; + TQString pathEnter, pathSkip; KGlobal::iconLoader()->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, &pathEnter); KGlobal::iconLoader()->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall, KIcon::DefaultState, &pathSkip); //show payment date - tmp = QString("<td>") + + tmp = TQString("<td>") + KGlobal::locale()->formatDate(sched.adjustedNextDueDate(), true) + "</td><td>"; if(pathEnter.length() > 0) - tmp += link(VIEW_SCHEDULE, QString("?id=%1&mode=enter").arg(sched.id()), i18n("Enter schedule")) + QString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathEnter) + linkend(); + tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=enter").tqarg(sched.id()), i18n("Enter schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathEnter) + linkend(); if(pathSkip.length() > 0) - tmp += " " + link(VIEW_SCHEDULE, QString("?id=%1&mode=skip").arg(sched.id()), i18n("Skip schedule")) + QString("<img src=\"file://%1\" border=\"0\"></a>").arg(pathSkip) + linkend(); + tmp += " " + link(VIEW_SCHEDULE, TQString("?id=%1&mode=skip").tqarg(sched.id()), i18n("Skip schedule")) + TQString("<img src=\"file://%1\" border=\"0\"></a>").tqarg(pathSkip) + linkend(); - tmp += QString(" "); - tmp += link(VIEW_SCHEDULE, QString("?id=%1&mode=edit").arg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend(); + tmp += TQString(" "); + tmp += link(VIEW_SCHEDULE, TQString("?id=%1&mode=edit").tqarg(sched.id()), i18n("Edit schedule")) + sched.name() + linkend(); //show quantity of payments overdue if any if(cnt > 1) - tmp += i18n(" (%1 payments)").arg(cnt); + tmp += i18n(" (%1 payments)").tqarg(cnt); //show account of the main split tmp += "</td><td>"; - tmp += QString(file->account(acc.id()).name()); + tmp += TQString(file->account(acc.id()).name()); //show amount of the schedule tmp += "</td><td align=\"right\">"; const MyMoneySecurity& currency = MyMoneyFile::instance()->currency(acc.currencyId()); - QString amount = (sp.value()*cnt).formatMoney(acc, currency); - amount.replace(" "," "); + TQString amount = (sp.value()*cnt).formatMoney(acc, currency); + amount.tqreplace(" "," "); tmp += showColoredAmount(amount, (sp.value()*cnt).isNegative()) ; tmp += "</td>"; //show balance after payments tmp += "<td align=\"right\">"; MyMoneyMoney payment = MyMoneyMoney((sp.value()*cnt)); - QDate paymentDate = QDate(sched.nextDueDate()); + TQDate paymentDate = TQDate(sched.nextDueDate()); MyMoneyMoney balanceAfter = forecastPaymentBalance(acc, payment, paymentDate); - QString balance = balanceAfter.formatMoney(acc, currency); - balance.replace(" "," "); + TQString balance = balanceAfter.formatMoney(acc, currency); + balance.tqreplace(" "," "); tmp += showColoredAmount(balance, balanceAfter.isNegative()); tmp += "</td>"; @@ -685,13 +685,13 @@ void KHomeView::showPaymentEntry(const MyMoneySchedule& sched, int cnt) } } -void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header) +void KHomeView::showAccounts(KHomeView::paymentTypeE type, const TQString& header) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accounts; - QValueList<MyMoneyAccount>::Iterator it; - QValueList<MyMoneyAccount>::Iterator prevIt; - QMap<QString, MyMoneyAccount> nameIdx; + TQValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount>::Iterator prevIt; + TQMap<TQString, MyMoneyAccount> nameIdx; bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked(); @@ -767,7 +767,7 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header } if(accounts.count() > 0) { - QString tmp; + TQString tmp; int i = 0; tmp = "<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">" + header + "</div>\n<div class=\"gap\"> </div>\n"; m_part->write(tmp); @@ -786,9 +786,9 @@ void KHomeView::showAccounts(KHomeView::paymentTypeE type, const QString& header m_part->write("</tr>"); - QMap<QString, MyMoneyAccount>::const_iterator it_m; + TQMap<TQString, MyMoneyAccount>::const_iterator it_m; for(it_m = nameIdx.begin(); it_m != nameIdx.end(); ++it_m) { - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); showAccountEntry(*it_m); m_part->write("</tr>"); } @@ -812,17 +812,17 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc) showAccountEntry(acc, value, MyMoneyMoney(), showLimit); } else { //get balance for normal accounts - value = file->balance(acc.id(), QDate::currentDate()); + value = file->balance(acc.id(), TQDate::tqcurrentDate()); //if credit card or checkings account, show maximum credit if( acc.accountType() == MyMoneyAccount::CreditCard || acc.accountType() == MyMoneyAccount::Checkings ) { - QString maximumCredit = acc.value("maxCreditAbsolute"); + TQString maximumCredit = acc.value("maxCreditAbsolute"); MyMoneyMoney maxCredit = MyMoneyMoney(maximumCredit); showAccountEntry(acc, value, value - maxCredit, showLimit); } else { //otherwise use minimum balance - QString minimumBalance = acc.value("minBalanceAbsolute"); + TQString minimumBalance = acc.value("minBalanceAbsolute"); MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance); showAccountEntry(acc, value, value - minBalance, showLimit); } @@ -832,33 +832,33 @@ void KHomeView::showAccountEntry(const MyMoneyAccount& acc) void KHomeView::showAccountEntry(const MyMoneyAccount& acc, const MyMoneyMoney& value, const MyMoneyMoney& valueToMinBal, const bool showMinBal) { MyMoneyFile* file = MyMoneyFile::instance(); - QString tmp; + TQString tmp; MyMoneySecurity currency = file->currency(acc.currencyId()); - QString amount; - QString amountToMinBal; + TQString amount; + TQString amountToMinBal; //format amounts amount = value.formatMoney(acc, currency); - amount.replace(" "," "); + amount.tqreplace(" "," "); if(showMinBal) { amountToMinBal = valueToMinBal.formatMoney(acc, currency); - amountToMinBal.replace(" "," "); + amountToMinBal.tqreplace(" "," "); } - tmp = QString("<td>") + - link(VIEW_LEDGER, QString("?id=%1").arg(acc.id())) + acc.name() + linkend() + "</td>"; + tmp = TQString("<td>") + + link(VIEW_LEDGER, TQString("?id=%1").tqarg(acc.id())) + acc.name() + linkend() + "</td>"; //show account balance - tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amount, value.isNegative())); + tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amount, value.isNegative())); //show minimum balance column if requested if(showMinBal) { //if it is an investment, show minimum balance empty if(acc.accountType() == MyMoneyAccount::Investment) { - tmp += QString("<td class=\"right\"> </td>"); + tmp += TQString("<td class=\"right\"> </td>"); } else { //show minimum balance entry - tmp += QString("<td class=\"right\">%1</td>").arg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative())); + tmp += TQString("<td class=\"right\">%1</td>").tqarg(showColoredAmount(amountToMinBal, valueToMinBal.isNegative())); } } // qDebug("accountEntry = '%s'", tmp.latin1()); @@ -871,7 +871,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc) MyMoneyMoney value; value = file->balance(acc.id()); - QValueList<QString>::const_iterator it_a; + TQValueList<TQString>::const_iterator it_a; for(it_a = acc.accountList().begin(); it_a != acc.accountList().end(); ++it_a) { MyMoneyAccount stock = file->account(*it_a); try { @@ -886,7 +886,7 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc) val = val.convert(acc.fraction()); value += val; } catch(MyMoneyException* e) { - qWarning("%s", (QString("cannot convert stock balance of %1 to base currency: %2").arg(stock.name(), e->what())).data()); + qWarning("%s", (TQString("cannot convert stock balance of %1 to base currency: %2").tqarg(stock.name(), e->what())).data()); delete e; } } @@ -895,18 +895,18 @@ MyMoneyMoney KHomeView::investmentBalance(const MyMoneyAccount& acc) void KHomeView::showFavoriteReports(void) { - QValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); + TQValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); if ( reports.count() > 0 ) { bool firstTime = 1; int row = 0; - QValueList<MyMoneyReport>::const_iterator it_report = reports.begin(); + TQValueList<MyMoneyReport>::const_iterator it_report = reports.begin(); while( it_report != reports.end() ) { if ( (*it_report).isFavorite() ) { if(firstTime) { - m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").arg(i18n("Favorite Reports"))); + m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").tqarg(i18n("Favorite Reports"))); m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">"); m_part->write(i18n("Report")); @@ -916,12 +916,12 @@ void KHomeView::showFavoriteReports(void) firstTime = false; } - m_part->write(QString("<tr class=\"row-%1\"><td>%2%3%4</td><td align=\"left\">%5</td></tr>") - .arg(row++ & 0x01 ? "even" : "odd") - .arg(link(VIEW_REPORTS, QString("?id=%1").arg((*it_report).id()))) - .arg((*it_report).name()) - .arg(linkend()) - .arg((*it_report).comment()) + m_part->write(TQString("<tr class=\"row-%1\"><td>%2%3%4</td><td align=\"left\">%5</td></tr>") + .tqarg(row++ & 0x01 ? "even" : "odd") + .tqarg(link(VIEW_REPORTS, TQString("?id=%1").tqarg((*it_report).id()))) + .tqarg((*it_report).name()) + .tqarg(linkend()) + .tqarg((*it_report).comment()) ); } @@ -934,9 +934,9 @@ void KHomeView::showFavoriteReports(void) void KHomeView::showForecast(void) { - QMap<QString, MyMoneyAccount> nameIdx; + TQMap<TQString, MyMoneyAccount> nameIdx; MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accList; + TQValueList<MyMoneyAccount> accList; // if forecast has not been executed yet, do it. if(!m_forecast.isForecastDone()) @@ -945,7 +945,7 @@ void KHomeView::showForecast(void) accList = m_forecast.accountList(); // add it to a map to have it ordered by name - QValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); + TQValueList<MyMoneyAccount>::const_iterator accList_t = accList.begin(); for ( ; accList_t != accList.end(); ++accList_t ) { d->addNameIndex(nameIdx, *accList_t); } @@ -955,22 +955,22 @@ void KHomeView::showForecast(void) int colspan = 1; // get begin day - int beginDay = QDate::currentDate().daysTo(m_forecast.beginForecastDate()); + int beginDay = TQDate::tqcurrentDate().daysTo(m_forecast.beginForecastDate()); // if begin day is today skip to next cycle if(beginDay == 0) beginDay = m_forecast.accountsCycle(); // Now output header - m_part->write(QString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").arg(i18n("%1 Day Forecast").arg(m_forecast.forecastDays()))); + m_part->write(TQString("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">%1</div>\n<div class=\"gap\"> </div>\n").tqarg(i18n("%1 Day Forecast").tqarg(m_forecast.forecastDays()))); m_part->write("<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" class=\"summarytable\" >"); m_part->write("<tr class=\"item\"><td class=\"left\" width=\"40%\">"); m_part->write(i18n("Account")); m_part->write("</td>"); int colWidth = 55/ (m_forecast.forecastDays() / m_forecast.accountsCycle()); for(i = 0; (i*m_forecast.accountsCycle() + beginDay) <= m_forecast.forecastDays(); ++i) { - m_part->write(QString("<td width=\"%1%\" class=\"right\">").arg(colWidth)); + m_part->write(TQString("<td width=\"%1%\" class=\"right\">").tqarg(colWidth)); - m_part->write(i18n("%1 days").arg(i*m_forecast.accountsCycle() + beginDay)); + m_part->write(i18n("%1 days").tqarg(i*m_forecast.accountsCycle() + beginDay)); m_part->write("</td>"); colspan++; } @@ -979,17 +979,17 @@ void KHomeView::showForecast(void) // Now output entries i = 0; - QMap<QString, MyMoneyAccount>::ConstIterator it_account; + TQMap<TQString, MyMoneyAccount>::ConstIterator it_account; for(it_account = nameIdx.begin(); it_account != nameIdx.end(); ++it_account) { //MyMoneyAccount acc = (*it_n); - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); - m_part->write(QString("<td width=\"40%\">") + - link(VIEW_LEDGER, QString("?id=%1").arg((*it_account).id())) + (*it_account).name() + linkend() + "</td>"); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<td width=\"40%\">") + + link(VIEW_LEDGER, TQString("?id=%1").tqarg((*it_account).id())) + (*it_account).name() + linkend() + "</td>"); int dropZero = -1; //account dropped below zero int dropMinimum = -1; //account dropped below minimum balance - QString minimumBalance = (*it_account).value("minimumBalance"); + TQString minimumBalance = (*it_account).value("minimumBalance"); MyMoneyMoney minBalance = MyMoneyMoney(minimumBalance); MyMoneySecurity currency; MyMoneyMoney forecastBalance; @@ -1003,12 +1003,12 @@ void KHomeView::showForecast(void) } for (int f = beginDay; f <= m_forecast.forecastDays(); f += m_forecast.accountsCycle()) { - forecastBalance = m_forecast.forecastBalance(*it_account, QDate::currentDate().addDays(f)); - QString amount; + forecastBalance = m_forecast.forecastBalance(*it_account, TQDate::tqcurrentDate().addDays(f)); + TQString amount; amount = forecastBalance.formatMoney( *it_account, currency); - amount.replace(" "," "); - m_part->write(QString("<td width=\"%1%\" align=\"right\">").arg(colWidth)); - m_part->write(QString("%1</td>").arg(showColoredAmount(amount, forecastBalance.isNegative()))); + amount.tqreplace(" "," "); + m_part->write(TQString("<td width=\"%1%\" align=\"right\">").tqarg(colWidth)); + m_part->write(TQString("%1</td>").tqarg(showColoredAmount(amount, forecastBalance.isNegative()))); } m_part->write("</tr>"); @@ -1023,7 +1023,7 @@ void KHomeView::showForecast(void) // spit out possible warnings - QString msg; + TQString msg; // if a minimum balance has been specified, an appropriate warning will // only be shown, if the drop below 0 is on a different day or not present @@ -1036,48 +1036,48 @@ void KHomeView::showForecast(void) case -1: break; case 0: - msg = i18n("The balance of %1 is below the minimum balance %2 today.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is below the minimum balance %2 today.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)); msg = showColoredAmount(msg, true); break; default: - msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").arg((*it_account).name()).arg(minBalance.formatMoney(*it_account, currency)).arg(dropMinimum-1); + msg = i18n("The balance of %1 will drop below the minimum balance %2 in %3 days.").tqarg((*it_account).name()).tqarg(minBalance.formatMoney(*it_account, currency)).tqarg(dropMinimum-1); msg = showColoredAmount(msg, true); break; } if(!msg.isEmpty()) { - m_part->write(QString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").arg(msg).arg(colspan)); + m_part->write(TQString("<tr class=\"warning\" style=\"font-weight: normal;\" ><td colspan=%2 align=\"center\" >%1</td></tr>").tqarg(msg).tqarg(colspan)); } } // a drop below zero is always shown - msg = QString(); + msg = TQString(); switch(dropZero) { case -1: break; case 0: if((*it_account).accountGroup() == MyMoneyAccount::Asset) { - msg = i18n("The balance of %1 is below %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is below %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)); msg = showColoredAmount(msg, true); break; } if((*it_account).accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 is above %2 today.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)); + msg = i18n("The balance of %1 is above %2 today.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)); break; } break; default: if((*it_account).accountGroup() == MyMoneyAccount::Asset) { - msg = i18n("The balance of %1 will drop below %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero); + msg = i18n("The balance of %1 will drop below %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero); msg = showColoredAmount(msg, true); break; } if((*it_account).accountGroup() == MyMoneyAccount::Liability) { - msg = i18n("The balance of %1 will raise above %2 in %3 days.").arg((*it_account).name()).arg(MyMoneyMoney().formatMoney(*it_account, currency)).arg(dropZero); + msg = i18n("The balance of %1 will raise above %2 in %3 days.").tqarg((*it_account).name()).tqarg(MyMoneyMoney().formatMoney(*it_account, currency)).tqarg(dropZero); break; } } if(!msg.isEmpty()) { - m_part->write(QString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").arg(msg).arg(colspan)); + m_part->write(TQString("<tr class=\"warning\"><td colspan=%2 align=\"center\" ><b>%1</b></td></tr>").tqarg(msg).tqarg(colspan)); } } m_part->write("</table></div></div>"); @@ -1085,27 +1085,27 @@ void KHomeView::showForecast(void) } } -const QString KHomeView::link(const QString& view, const QString& query, const QString& _title) const +const TQString KHomeView::link(const TQString& view, const TQString& query, const TQString& _title) const { - QString titlePart; - QString title(_title); + TQString titlePart; + TQString title(_title); if(!title.isEmpty()) - titlePart = QString(" title=\"%1\"").arg(title.replace(" ", " ")); + titlePart = TQString(" title=\"%1\"").tqarg(title.tqreplace(" ", " ")); - return QString("<a href=\"/%1%2\"%3>").arg(view, query, titlePart); + return TQString("<a href=\"/%1%2\"%3>").tqarg(view, query, titlePart); } -const QString KHomeView::linkend(void) const +const TQString KHomeView::linkend(void) const { return "</a>"; } void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) { - QString protocol = url.protocol(); - QString view = url.fileName(false); - QString id = url.queryItem("id").data(); - QString mode = url.queryItem("mode").data(); + TQString protocol = url.protocol(); + TQString view = url.fileName(false); + TQString id = url.queryItem("id"); + TQString mode = url.queryItem("mode"); if ( protocol == "http" ) { @@ -1118,26 +1118,26 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) else { if(view == VIEW_LEDGER) { - emit ledgerSelected(id, QString()); + emit ledgerSelected(id, TQString()); } else if(view == VIEW_SCHEDULE) { if(mode == "enter") { emit scheduleSelected(id); - KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget()); + KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget()); Q_CHECK_PTR(mw); - QTimer::singleShot(0, mw->actionCollection()->action("schedule_enter"), SLOT(activate())); + TQTimer::singleShot(0, mw->actionCollection()->action("schedule_enter"), TQT_SLOT(activate())); } else if(mode == "edit") { emit scheduleSelected(id); - KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget()); + KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget()); Q_CHECK_PTR(mw); - QTimer::singleShot(0, mw->actionCollection()->action("schedule_edit"), SLOT(activate())); + TQTimer::singleShot(0, mw->actionCollection()->action("schedule_edit"), TQT_SLOT(activate())); } else if(mode == "skip") { emit scheduleSelected(id); - KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget()); + KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget()); Q_CHECK_PTR(mw); - QTimer::singleShot(0, mw->actionCollection()->action("schedule_skip"), SLOT(activate())); + TQTimer::singleShot(0, mw->actionCollection()->action("schedule_skip"), TQT_SLOT(activate())); } else if(mode == "full") { m_showAllSchedules = true; @@ -1152,11 +1152,11 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) emit reportSelected(id); } else if(view == VIEW_WELCOME) { - KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget()); + KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget()); Q_CHECK_PTR(mw); if ( mode == "whatsnew" ) { - QString fname = KMyMoneyUtils::findResource("appdata",QString("html/whats_new%1.html")); + TQString fname = KMyMoneyUtils::findResource("appdata",TQString("html/whats_new%1.html")); if(!fname.isEmpty()) m_part->openURL(fname); } @@ -1164,12 +1164,12 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) m_part->openURL(m_filename); } else if(view == "action") { - KMainWindow* mw = dynamic_cast<KMainWindow*>(qApp->mainWidget()); + KMainWindow* mw = dynamic_cast<KMainWindow*>(tqApp->mainWidget()); Q_CHECK_PTR(mw); - QTimer::singleShot(0, mw->actionCollection()->action( id ), SLOT(activate())); + TQTimer::singleShot(0, mw->actionCollection()->action( id ), TQT_SLOT(activate())); } else if(view == VIEW_HOME) { - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; MyMoneyFile::instance()->accountList(list); if(list.count() == 0) { KMessageBox::information(this, i18n("Before KMyMoney can give you detailed information about your financial status, you need to create at least one account. Until then, KMyMoney shows the welcome page instead.")); @@ -1184,13 +1184,13 @@ void KHomeView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) void KHomeView::showAssetsLiabilities(void) { - QValueList<MyMoneyAccount> accounts; - QValueList<MyMoneyAccount>::Iterator it; - QMap<QString, MyMoneyAccount> nameAssetsIdx; - QMap<QString, MyMoneyAccount> nameLiabilitiesIdx; + TQValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount>::Iterator it; + TQMap<TQString, MyMoneyAccount> nameAssetsIdx; + TQMap<TQString, MyMoneyAccount> nameLiabilitiesIdx; MyMoneyMoney netAssets; MyMoneyMoney netLiabilities; - QString fontStart, fontEnd; + TQString fontStart, fontEnd; MyMoneyFile* file = MyMoneyFile::instance(); int prec = MyMoneyMoney::denomToPrec(file->baseCurrency().smallestAccountFraction()); @@ -1257,10 +1257,10 @@ void KHomeView::showAssetsLiabilities(void) m_part->write("</td></tr>"); //get asset and liability accounts - QMap<QString, MyMoneyAccount>::const_iterator asset_it = nameAssetsIdx.begin(); - QMap<QString,MyMoneyAccount>::const_iterator liabilities_it = nameLiabilitiesIdx.begin(); + TQMap<TQString, MyMoneyAccount>::const_iterator asset_it = nameAssetsIdx.begin(); + TQMap<TQString,MyMoneyAccount>::const_iterator liabilities_it = nameLiabilitiesIdx.begin(); for(; asset_it != nameAssetsIdx.end() || liabilities_it != nameLiabilitiesIdx.end();) { - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); //write an asset account if we still have any if(asset_it != nameAssetsIdx.end()) { MyMoneyMoney value; @@ -1268,12 +1268,12 @@ void KHomeView::showAssetsLiabilities(void) if( (*asset_it).accountType() == MyMoneyAccount::Investment) { value = investmentBalance(*asset_it); } else { - value = MyMoneyFile::instance()->balance((*asset_it).id(), QDate::currentDate()); + value = MyMoneyFile::instance()->balance((*asset_it).id(), TQDate::tqcurrentDate()); } //calculate balance for foreign currency accounts if((*asset_it).currencyId() != file->baseCurrency().id()) { ReportAccount repAcc = ReportAccount((*asset_it).id()); - MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate()); + MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate()); MyMoneyMoney baseValue = value * curPrice; baseValue = baseValue.convert(10000); netAssets += baseValue; @@ -1294,11 +1294,11 @@ void KHomeView::showAssetsLiabilities(void) //write a liability account if(liabilities_it != nameLiabilitiesIdx.end()) { MyMoneyMoney value; - value = MyMoneyFile::instance()->balance((*liabilities_it).id(), QDate::currentDate()); + value = MyMoneyFile::instance()->balance((*liabilities_it).id(), TQDate::tqcurrentDate()); //calculate balance if foreign currency if((*liabilities_it).currencyId() != file->baseCurrency().id()) { ReportAccount repAcc = ReportAccount((*liabilities_it).id()); - MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate()); + MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate()); MyMoneyMoney baseValue = value * curPrice; baseValue = baseValue.convert(10000); netLiabilities += baseValue; @@ -1318,30 +1318,30 @@ void KHomeView::showAssetsLiabilities(void) MyMoneyMoney netWorth = netAssets+netLiabilities; //format assets, liabilities and net worth - QString amountAssets = netAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountLiabilities = netLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountNetWorth = netWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountAssets.replace(" "," "); - amountLiabilities.replace(" "," "); - amountNetWorth.replace(" "," "); + TQString amountAssets = netAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountLiabilities = netLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountNetWorth = netWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); + amountAssets.tqreplace(" "," "); + amountLiabilities.tqreplace(" "," "); + amountNetWorth.tqreplace(" "," "); - m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd")); //print total for assets - m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Assets")).arg(showColoredAmount(amountAssets, netAssets.isNegative()))); + m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Assets")).tqarg(showColoredAmount(amountAssets, netAssets.isNegative()))); //leave the intermediate column empty m_part->write("<td class=\"setcolor\"></td>"); //print total liabilities - m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Total Liabilities")).arg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()))); + m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Total Liabilities")).tqarg(showColoredAmount(amountLiabilities, netLiabilities.isNegative()))); m_part->write("</tr>"); //print net worth - m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd")); m_part->write("<td></td><td></td><td class=\"setcolor\"></td>"); - m_part->write(QString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").arg(i18n("Net Worth")).arg(showColoredAmount(amountNetWorth, netWorth.isNegative() ))); + m_part->write(TQString("<td class=\"left\">%1</td><td align=\"right\">%2</td>").tqarg(i18n("Net Worth")).tqarg(showColoredAmount(amountNetWorth, netWorth.isNegative() ))); m_part->write("</tr>"); m_part->write("</table>"); @@ -1392,19 +1392,19 @@ void KHomeView::showBudget(void) m_part->write(i18n("Difference")); m_part->write("</td></tr>"); - m_part->write(QString("<tr class=\"row-odd\">")); + m_part->write(TQString("<tr class=\"row-odd\">")); MyMoneyMoney totalBudgetValue = grid.m_total[eBudget].m_total; MyMoneyMoney totalActualValue = grid.m_total[eActual].m_total; MyMoneyMoney totalBudgetDiffValue = grid.m_total[eBudgetDiff].m_total; - QString totalBudgetAmount = totalBudgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString totalBudgetAmount = totalBudgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString totalActualAmount = totalActualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString totalBudgetDiffAmount = totalBudgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative()))); - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalActualAmount, totalActualValue.isNegative()))); - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetAmount, totalBudgetValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalActualAmount, totalActualValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(totalBudgetDiffAmount, totalBudgetDiffValue.isNegative()))); m_part->write("</tr>"); m_part->write("</table>"); @@ -1448,10 +1448,10 @@ void KHomeView::showBudget(void) //write the outergroup if it is the first row of outergroup being shown if(i == 0) { m_part->write("<tr style=\"font-weight:bold;\">"); - m_part->write(QString("<td class=\"left\" colspan=\"4\">%1</td>").arg(KMyMoneyUtils::accountTypeToString( rowname.accountType()))); + m_part->write(TQString("<td class=\"left\" colspan=\"4\">%1</td>").tqarg(KMyMoneyUtils::accountTypeToString( rowname.accountType()))); m_part->write("</tr>"); } - m_part->write(QString("<tr class=\"row-%1\">").arg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<tr class=\"row-%1\">").tqarg(i++ & 0x01 ? "even" : "odd")); //get values from grid MyMoneyMoney actualValue = it_row.data()[eActual][1]; @@ -1459,17 +1459,17 @@ void KHomeView::showBudget(void) MyMoneyMoney budgetDiffValue = it_row.data()[eBudgetDiff][1]; //format amounts - QString actualAmount = actualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString budgetAmount = budgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString actualAmount = actualValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString budgetAmount = budgetValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString budgetDiffAmount = budgetDiffValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); //account name - m_part->write(QString("<td>") + link(VIEW_LEDGER, QString("?id=%1").arg(rowname.id())) + rowname.name() + linkend() + "</td>"); + m_part->write(TQString("<td>") + link(VIEW_LEDGER, TQString("?id=%1").tqarg(rowname.id())) + rowname.name() + linkend() + "</td>"); //show amounts - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetAmount, budgetValue.isNegative()))); - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(actualAmount, actualValue.isNegative()))); - m_part->write(QString("<td align=\"right\">%1</td>").arg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetAmount, budgetValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(actualAmount, actualValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%1</td>").tqarg(showColoredAmount(budgetDiffAmount, budgetDiffValue.isNegative()))); m_part->write("</tr>"); } ++it_row; @@ -1481,19 +1481,19 @@ void KHomeView::showBudget(void) //if no negative differences are found, then inform that if(i == 0) { - m_part->write(QString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").arg(i++ & 0x01 ? "even" : "odd")); - m_part->write(QString("<td class=\"center\" colspan=\"4\">%1</td>").arg(i18n("No Budget Categories have been overrun"))); + m_part->write(TQString("<tr class=\"row-%1\" style=\"font-weight:bold;\">").tqarg(i++ & 0x01 ? "even" : "odd")); + m_part->write(TQString("<td class=\"center\" colspan=\"4\">%1</td>").tqarg(i18n("No Budget Categories have been overrun"))); m_part->write("</tr>"); } m_part->write("</table></div></div>"); } } -QString KHomeView::showColoredAmount(const QString& amount, bool isNegative) +TQString KHomeView::showColoredAmount(const TQString& amount, bool isNegative) { if(isNegative) { //if negative, get the settings for negative numbers - return QString("<font color=\"%1\">%2</font>").arg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount); + return TQString("<font color=\"%1\">%2</font>").tqarg(KMyMoneyGlobalSettings::listNegativeValueColor().name(), amount); } //if positive, return the same string @@ -1516,18 +1516,18 @@ void KHomeView::doForecast(void) m_forecast.doForecast(); } -MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, QDate& paymentDate) +MyMoneyMoney KHomeView::forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, TQDate& paymentDate) { - //if paymentDate before or equal to currentDate set it to current date plus 1 + //if paymentDate before or equal to tqcurrentDate set it to current date plus 1 //so we get to accumulate forecast balance correctly - if(paymentDate <= QDate::currentDate()) - paymentDate = QDate::currentDate().addDays(1); + if(paymentDate <= TQDate::tqcurrentDate()) + paymentDate = TQDate::tqcurrentDate().addDays(1); //check if the account is already there - if(m_accountList.find(acc.id()) == m_accountList.end() - || m_accountList[acc.id()].find(paymentDate) == m_accountList[acc.id()].end()) + if(m_accountList.tqfind(acc.id()) == m_accountList.end() + || m_accountList[acc.id()].tqfind(paymentDate) == m_accountList[acc.id()].end()) { - if(paymentDate == QDate::currentDate()) { + if(paymentDate == TQDate::tqcurrentDate()) { m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate); } else { m_accountList[acc.id()][paymentDate] = m_forecast.forecastBalance(acc, paymentDate.addDays(-1)); @@ -1547,25 +1547,25 @@ void KHomeView::showCashFlowSummary() int prec = MyMoneyMoney::denomToPrec(file->baseCurrency().smallestAccountFraction()); //set start and end of month dates - QDate startOfMonth = QDate(QDate::currentDate().year(), QDate::currentDate().month(), 1); - QDate endOfMonth = QDate(QDate::currentDate().year(), QDate::currentDate().month(), QDate::currentDate().daysInMonth()); + TQDate startOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), 1); + TQDate endOfMonth = TQDate(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), TQDate::tqcurrentDate().daysInMonth()); //Add total income and expenses for this month //get transactions for current month filter.setDateFilter(startOfMonth, endOfMonth); filter.setReportAllSplits(false); - QValueList<MyMoneyTransaction> transactions = file->transactionList(filter); + TQValueList<MyMoneyTransaction> transactions = file->transactionList(filter); //if no transaction then skip and print total in zero if(transactions.size() > 0) { - QValueList<MyMoneyTransaction>::const_iterator it_transaction; + TQValueList<MyMoneyTransaction>::const_iterator it_transaction; //get all transactions for this month for(it_transaction = transactions.begin(); it_transaction != transactions.end(); ++it_transaction ) { //get the splits for each transaction - const QValueList<MyMoneySplit>& splits = (*it_transaction).splits(); - QValueList<MyMoneySplit>::const_iterator it_split; + const TQValueList<MyMoneySplit>& splits = (*it_transaction).splits(); + TQValueList<MyMoneySplit>::const_iterator it_split; for(it_split = splits.begin(); it_split != splits.end(); ++it_split) { if(!(*it_split).shares().isZero()) { ReportAccount repSplitAcc = ReportAccount((*it_split).accountId()); @@ -1596,10 +1596,10 @@ void KHomeView::showCashFlowSummary() } //format income and expenses - QString amountIncome = incomeValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountExpense = expenseValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountIncome.replace(" "," "); - amountExpense.replace(" "," "); + TQString amountIncome = incomeValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountExpense = expenseValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + amountIncome.tqreplace(" "," "); + amountExpense.tqreplace(" "," "); //calculate schedules @@ -1610,14 +1610,14 @@ void KHomeView::showCashFlowSummary() MyMoneyMoney scheduledOtherTransfer; //get overdues and schedules until the end of this month - QValueList<MyMoneySchedule> schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY, + TQValueList<MyMoneySchedule> schedule = file->scheduleList("", MyMoneySchedule::TYPE_ANY, MyMoneySchedule::OCCUR_ANY, MyMoneySchedule::STYPE_ANY, - QDate(), + TQDate(), endOfMonth); //Remove the finished schedules - QValueList<MyMoneySchedule>::Iterator finished_it; + TQValueList<MyMoneySchedule>::Iterator finished_it; for (finished_it=schedule.begin(); finished_it!=schedule.end();) { if ((*finished_it).isFinished()) { finished_it = schedule.remove(finished_it); @@ -1627,9 +1627,9 @@ void KHomeView::showCashFlowSummary() } //add income and expenses - QValueList<MyMoneySchedule>::Iterator sched_it; + TQValueList<MyMoneySchedule>::Iterator sched_it; for (sched_it=schedule.begin(); sched_it!=schedule.end();) { - QDate nextDate = (*sched_it).nextDueDate(); + TQDate nextDate = (*sched_it).nextDueDate(); int cnt = 0; while(nextDate.isValid() && nextDate <= endOfMonth) { @@ -1650,18 +1650,18 @@ void KHomeView::showCashFlowSummary() // take care of the autoCalc stuff if((*sched_it).type() == MyMoneySchedule::TYPE_LOANPAYMENT) { - QDate nextDate = (*sched_it).nextPayment((*sched_it).lastPayment()); + TQDate nextDate = (*sched_it).nextPayment((*sched_it).lastPayment()); //make sure we have all 'starting balances' so that the autocalc works - QValueList<MyMoneySplit>::const_iterator it_s; - QMap<QString, MyMoneyMoney> balanceMap; + TQValueList<MyMoneySplit>::const_iterator it_s; + TQMap<TQString, MyMoneyMoney> balanceMap; for(it_s = transaction.splits().begin(); it_s != transaction.splits().end(); ++it_s ) { MyMoneyAccount acc = file->account((*it_s).accountId()); // collect all overdues on the first day - QDate schedDate = nextDate; - if(QDate::currentDate() >= nextDate) - schedDate = QDate::currentDate().addDays(1); + TQDate schedDate = nextDate; + if(TQDate::tqcurrentDate() >= nextDate) + schedDate = TQDate::tqcurrentDate().addDays(1); balanceMap[acc.id()] += file->balance(acc.id()); } @@ -1669,8 +1669,8 @@ void KHomeView::showCashFlowSummary() } //go through the splits and assign to liquid or other transfers - const QValueList<MyMoneySplit> splits = transaction.splits(); - QValueList<MyMoneySplit>::const_iterator split_it; + const TQValueList<MyMoneySplit> splits = transaction.splits(); + TQValueList<MyMoneySplit>::const_iterator split_it; for (split_it = splits.begin(); split_it != splits.end(); ++split_it) { if( (*split_it).accountId() != acc.id() ) { ReportAccount repSplitAcc = ReportAccount((*split_it).accountId()); @@ -1680,7 +1680,7 @@ void KHomeView::showCashFlowSummary() //convert to foreign currency if needed if(repSplitAcc.currencyId() != file->baseCurrency().id()) { - MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(QDate::currentDate()); + MyMoneyMoney curPrice = repSplitAcc.baseCurrencyPrice(TQDate::tqcurrentDate()); value = value * curPrice; value = value.convert(10000); } @@ -1707,19 +1707,19 @@ void KHomeView::showCashFlowSummary() } //format the currency strings - QString amountScheduledIncome = scheduledIncome.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountScheduledExpense = scheduledExpense.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountScheduledLiquidTransfer = scheduledLiquidTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountScheduledOtherTransfer = scheduledOtherTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountScheduledIncome = scheduledIncome.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountScheduledExpense = scheduledExpense.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountScheduledLiquidTransfer = scheduledLiquidTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountScheduledOtherTransfer = scheduledOtherTransfer.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountScheduledIncome.replace(" "," "); - amountScheduledExpense.replace(" "," "); - amountScheduledLiquidTransfer.replace(" "," "); - amountScheduledOtherTransfer.replace(" "," "); + amountScheduledIncome.tqreplace(" "," "); + amountScheduledExpense.tqreplace(" "," "); + amountScheduledLiquidTransfer.tqreplace(" "," "); + amountScheduledOtherTransfer.tqreplace(" "," "); //get liquid assets and liabilities - QValueList<MyMoneyAccount> accounts; - QValueList<MyMoneyAccount>::const_iterator account_it; + TQValueList<MyMoneyAccount> accounts; + TQValueList<MyMoneyAccount>::const_iterator account_it; MyMoneyMoney liquidAssets; MyMoneyMoney liquidLiabilities; @@ -1733,11 +1733,11 @@ void KHomeView::showCashFlowSummary() case MyMoneyAccount::Savings: case MyMoneyAccount::Cash: { - MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), QDate::currentDate()); + MyMoneyMoney value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate()); //calculate balance for foreign currency accounts if((*account_it).currencyId() != file->baseCurrency().id()) { ReportAccount repAcc = ReportAccount((*account_it).id()); - MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate()); + MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate()); MyMoneyMoney baseValue = value * curPrice; liquidAssets += baseValue; liquidAssets = liquidAssets.convert(10000); @@ -1750,11 +1750,11 @@ void KHomeView::showCashFlowSummary() case MyMoneyAccount::CreditCard: { MyMoneyMoney value; - value = MyMoneyFile::instance()->balance((*account_it).id(), QDate::currentDate()); + value = MyMoneyFile::instance()->balance((*account_it).id(), TQDate::tqcurrentDate()); //calculate balance if foreign currency if((*account_it).currencyId() != file->baseCurrency().id()) { ReportAccount repAcc = ReportAccount((*account_it).id()); - MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(QDate::currentDate()); + MyMoneyMoney curPrice = repAcc.baseCurrencyPrice(TQDate::tqcurrentDate()); MyMoneyMoney baseValue = value * curPrice; liquidLiabilities += baseValue; liquidLiabilities = liquidLiabilities.convert(10000); @@ -1773,12 +1773,12 @@ void KHomeView::showCashFlowSummary() MyMoneyMoney liquidWorth = liquidAssets+liquidLiabilities; //format assets, liabilities and net worth - QString amountLiquidAssets = liquidAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountLiquidLiabilities = liquidLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountLiquidWorth = liquidWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountLiquidAssets.replace(" "," "); - amountLiquidLiabilities.replace(" "," "); - amountLiquidWorth.replace(" "," "); + TQString amountLiquidAssets = liquidAssets.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountLiquidLiabilities = liquidLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountLiquidWorth = liquidWorth.formatMoney(file->baseCurrency().tradingSymbol(), prec); + amountLiquidAssets.tqreplace(" "," "); + amountLiquidLiabilities.tqreplace(" "," "); + amountLiquidWorth.tqreplace(" "," "); //show the summary m_part->write("<div class=\"shadow\"><div class=\"displayblock\"><div class=\"summaryheader\">" + i18n("Cash Flow Summary") + "</div>\n<div class=\"gap\"> </div>\n"); @@ -1807,19 +1807,19 @@ void KHomeView::showCashFlowSummary() m_part->write("</tr>"); //add row with banding - m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); + m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); //print current income - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountIncome, incomeValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountIncome, incomeValue.isNegative()))); //print the scheduled income - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledIncome, scheduledIncome.isNegative()))); //print current expenses - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpense, expenseValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpense, expenseValue.isNegative()))); //print the scheduled expenses - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledExpense, scheduledExpense.isNegative()))); m_part->write("</tr>"); m_part->write("</table>"); @@ -1849,19 +1849,19 @@ void KHomeView::showCashFlowSummary() m_part->write("</tr>"); //add row with banding - m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); + m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); //print current liquid assets - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidAssets, liquidAssets.isNegative()))); //print the scheduled transfers - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledLiquidTransfer, scheduledLiquidTransfer.isNegative()))); //print current liabilities - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountLiquidLiabilities, liquidLiabilities.isNegative()))); //print the scheduled transfers - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountScheduledOtherTransfer, scheduledOtherTransfer.isNegative()))); m_part->write("</tr>"); @@ -1873,12 +1873,12 @@ void KHomeView::showCashFlowSummary() MyMoneyMoney expectedAsset = liquidAssets + scheduledIncome + scheduledExpense + scheduledLiquidTransfer + scheduledOtherTransfer; MyMoneyMoney expectedLiabilities = liquidLiabilities + scheduledLiquidTransfer; - QString amountExpectedAsset = expectedAsset.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountExpectedLiabilities = expectedLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); - QString amountProfit = profitValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); - amountProfit.replace(" "," "); - amountExpectedAsset.replace(" "," "); - amountExpectedLiabilities.replace(" "," "); + TQString amountExpectedAsset = expectedAsset.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountExpectedLiabilities = expectedLiabilities.formatMoney(file->baseCurrency().tradingSymbol(), prec); + TQString amountProfit = profitValue.formatMoney(file->baseCurrency().tradingSymbol(), prec); + amountProfit.tqreplace(" "," "); + amountExpectedAsset.tqreplace(" "," "); + amountExpectedLiabilities.tqreplace(" "," "); @@ -1888,7 +1888,7 @@ void KHomeView::showCashFlowSummary() //income and expense title m_part->write("<tr class=\"itemtitle\">"); m_part->write("<td class=\"left\" colspan=\"4\">"); - m_part->write(i18n("Cash Flow Status")); + m_part->write(i18n("Cash Flow tqStatus")); m_part->write("</td></tr>"); //column titles m_part->write("<tr class=\"item\">"); @@ -1905,17 +1905,17 @@ void KHomeView::showCashFlowSummary() m_part->write("</tr>"); //add row with banding - m_part->write(QString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); + m_part->write(TQString("<tr class=\"row-even\" style=\"font-weight:bold;\">")); m_part->write("<td> </td>"); //print expected assets - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedAsset, expectedAsset.isNegative()))); //print expected liabilities - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountExpectedLiabilities, expectedLiabilities.isNegative()))); //print expected profit - m_part->write(QString("<td align=\"right\">%2</td>").arg(showColoredAmount(amountProfit, profitValue.isNegative()))); + m_part->write(TQString("<td align=\"right\">%2</td>").tqarg(showColoredAmount(amountProfit, profitValue.isNegative()))); m_part->write("</tr>"); diff --git a/kmymoney2/views/khomeview.h b/kmymoney2/views/khomeview.h index 213fd91..f580ed4 100644 --- a/kmymoney2/views/khomeview.h +++ b/kmymoney2/views/khomeview.h @@ -24,9 +24,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -class QVBoxLayout; -class QFrame; +#include <tqwidget.h> +class TQVBoxLayout; +class TQFrame; // ---------------------------------------------------------------------------- // KDE Includes @@ -51,6 +51,7 @@ class QFrame; class KHomeView : public KMyMoneyViewBase { Q_OBJECT + TQ_OBJECT public: /** * Definition of bitmap used as argument for showAccounts(). @@ -60,13 +61,13 @@ public: Payment = 2 ///< show payment accounts }; - KHomeView(QWidget *parent=0, const char *name=0); + KHomeView(TQWidget *tqparent=0, const char *name=0); ~KHomeView(); protected: void showPayments(void); void showPaymentEntry(const MyMoneySchedule&, int cnt = 1); - void showAccounts(paymentTypeE type, const QString& hdr); + void showAccounts(paymentTypeE type, const TQString& hdr); void showAccountEntry(const MyMoneyAccount&); void showFavoriteReports(void); void showForecast(void); @@ -78,8 +79,8 @@ protected: void showBudget(void); void showCashFlowSummary(void); - const QString link(const QString& view, const QString& query, const QString& title = QString()) const; - const QString linkend(void) const; + const TQString link(const TQString& view, const TQString& query, const TQString& title = TQString()) const; + const TQString linkend(void) const; void loadView(void); public slots: @@ -99,9 +100,9 @@ public slots: void slotPrintView(void); signals: - void ledgerSelected(const QString& id, const QString& transaction); - void scheduleSelected(const QString& id); - void reportSelected(const QString& id); + void ledgerSelected(const TQString& id, const TQString& transaction); + void scheduleSelected(const TQString& id); + void reportSelected(const TQString& id); private: /// \internal d-pointer class. @@ -112,7 +113,7 @@ private: /** * daily balances of an account */ - typedef QMap<QDate, MyMoneyMoney> dailyBalances; + typedef TQMap<TQDate, MyMoneyMoney> dailyBalances; /** * Print an account and its balance and limit @@ -129,7 +130,7 @@ private: * Print text in the color set for negative numbers, if @p amount is negative * abd @p isNegative is true */ - QString showColoredAmount(const QString& amount, bool isNegative); + TQString showColoredAmount(const TQString& amount, bool isNegative); /** * Run the forecast @@ -139,11 +140,11 @@ private: /** * Calculate the forecast balance after a payment has been made */ - MyMoneyMoney forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, QDate& paymentDate); + MyMoneyMoney forecastPaymentBalance(const MyMoneyAccount& acc, const MyMoneyMoney& payment, TQDate& paymentDate); KHTMLPart* m_part; - QVBoxLayout* m_qvboxlayoutPage; - QString m_filename; + TQVBoxLayout* m_qvboxtqlayoutPage; + TQString m_filename; bool m_showAllSchedules; bool m_needReload; MyMoneyForecast m_forecast; @@ -151,7 +152,7 @@ private: /** * daily forecast balance of accounts */ - QMap<QString, dailyBalances> m_accountList; + TQMap<TQString, dailyBalances> m_accountList; }; diff --git a/kmymoney2/views/kinstitutionsview.cpp b/kmymoney2/views/kinstitutionsview.cpp index 2c3ac5d..5fd9999 100644 --- a/kmymoney2/views/kinstitutionsview.cpp +++ b/kmymoney2/views/kinstitutionsview.cpp @@ -17,9 +17,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qheader.h> -#include <qlabel.h> -#include <qtabwidget.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqtabwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,19 +36,19 @@ #include "../kmymoneyglobalsettings.h" #include "../kmymoney2.h" -KInstitutionsView::KInstitutionsView(QWidget *parent, const char *name) : - KInstitutionsViewDecl(parent,name), +KInstitutionsView::KInstitutionsView(TQWidget *tqparent, const char *name) : + KInstitutionsViewDecl(tqparent,name), m_needReload(false) { m_accountTree->header()->setLabel(0, i18n("Institution/Account")); - connect(m_accountTree, SIGNAL(selectObject(const MyMoneyObject&)), this, SIGNAL(selectObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(openContextMenu(const MyMoneyObject&)), this, SIGNAL(openContextMenu(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(valueChanged(void)), this, SLOT(slotUpdateNetWorth(void))); - connect(m_accountTree, SIGNAL(openObject(const MyMoneyObject&)), this, SIGNAL(openObject(const MyMoneyObject&))); - connect(m_accountTree, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), this, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))); + connect(m_accountTree, TQT_SIGNAL(selectObject(const MyMoneyObject&)), this, TQT_SIGNAL(selectObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), this, TQT_SIGNAL(openContextMenu(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(valueChanged(void)), this, TQT_SLOT(slotUpdateNetWorth(void))); + connect(m_accountTree, TQT_SIGNAL(openObject(const MyMoneyObject&)), this, TQT_SIGNAL(openObject(const MyMoneyObject&))); + connect(m_accountTree, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), this, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadAccounts())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadAccounts())); } KInstitutionsView::~KInstitutionsView() @@ -75,7 +75,7 @@ void KInstitutionsView::show(void) void KInstitutionsView::polish(void) { KInstitutionsViewDecl::polish(); - m_accountTree->setResizeMode(QListView::LastColumn); + m_accountTree->setResizeMode(TQListView::LastColumn); m_accountTree->restoreLayout("Institution View Settings"); } @@ -90,15 +90,15 @@ void KInstitutionsView::slotLoadAccounts(void) void KInstitutionsView::loadAccounts(void) { - QMap<QString, bool> isOpen; + TQMap<TQString, bool> isOpen; ::timetrace("start load institutions view"); // remember the id of the current selected item KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem(); - QString selectedItemId = (item) ? item->id() : QString(); + TQString selectedItemId = (item) ? item->id() : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item && item->isOpen()) { @@ -108,7 +108,7 @@ void KInstitutionsView::loadAccounts(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_accountTree->setUpdatesEnabled(false); @@ -121,25 +121,25 @@ void KInstitutionsView::loadAccounts(void) MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> alist; + TQValueList<MyMoneyAccount> alist; file->accountList(alist); - QValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount>::const_iterator it_a; for(it_a = alist.begin(); it_a != alist.end(); ++it_a) { m_accountMap[(*it_a).id()] = *it_a; } // we need to make sure we show stock accounts - // under the right institution (the one of the parent account) - QMap<QString, MyMoneyAccount>::iterator it_am; + // under the right institution (the one of the tqparent account) + TQMap<TQString, MyMoneyAccount>::iterator it_am; for(it_am = m_accountMap.begin(); it_am != m_accountMap.end(); ++it_am) { if((*it_am).isInvest()) { - (*it_am).setInstitutionId(m_accountMap[(*it_am).parentAccountId()].institutionId()); + (*it_am).setInstitutionId(m_accountMap[(*it_am).tqparentAccountId()].institutionId()); } } - QValueList<MyMoneySecurity> slist = file->currencyList(); + TQValueList<MyMoneySecurity> slist = file->currencyList(); slist += file->securityList(); - QValueList<MyMoneySecurity>::const_iterator it_s; + TQValueList<MyMoneySecurity>::const_iterator it_s; for(it_s = slist.begin(); it_s != slist.end(); ++it_s) { m_securityMap[(*it_s).id()] = *it_s; } @@ -157,13 +157,13 @@ void KInstitutionsView::loadAccounts(void) none.setName(i18n("Accounts with no institution assigned")); KMyMoneyAccountTreeItem* noInstitutionItem = new KMyMoneyAccountTreeItem(m_accountTree, none); noInstitutionItem->setPixmap(0,none.pixmap()); - loadSubAccounts(noInstitutionItem, QString()); + loadSubAccounts(noInstitutionItem, TQString()); // hide it, if unused noInstitutionItem->setVisible(noInstitutionItem->childCount() != 0); - QValueList<MyMoneyInstitution> list = file->institutionList(); - QValueList<MyMoneyInstitution>::const_iterator it_i; + TQValueList<MyMoneyInstitution> list = file->institutionList(); + TQValueList<MyMoneyInstitution>::const_iterator it_i; for(it_i = list.begin(); it_i != list.end(); ++it_i) { KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(m_accountTree, *it_i); item->setPixmap(0, none.pixmap()); @@ -177,13 +177,13 @@ void KInstitutionsView::loadAccounts(void) // scan through the list of accounts and re-expand those that were // expanded and re-select the one that was probably selected before - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.find(item->id()) != isOpen.end()) + if(isOpen.tqfind(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -194,16 +194,16 @@ void KInstitutionsView::loadAccounts(void) // turn updates back on m_accountTree->setUpdatesEnabled(true); - m_accountTree->repaintContents(); + m_accountTree->tqrepaintContents(); ::timetrace("done load institutions view"); } -void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent) +void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent) { bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked(); - const MyMoneyAccount& account = dynamic_cast<const MyMoneyAccount&>(parent->itemObject()); - QValueList<QString>::const_iterator it_a; + const MyMoneyAccount& account = dynamic_cast<const MyMoneyAccount&>(tqparent->itemObject()); + TQValueList<TQString>::const_iterator it_a; MyMoneyFile* file = MyMoneyFile::instance(); for(it_a = account.accountList().begin(); it_a != account.accountList().end(); ++it_a) { MyMoneyAccount acc = m_accountMap[(*it_a)]; @@ -212,23 +212,23 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent) if(acc.isClosed() && !showClosedAccounts) continue; const MyMoneySecurity& security = m_securityMap[acc.currencyId()]; - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; prices += file->price(acc.currencyId(), security.tradingCurrency()); if(security.tradingCurrency() != file->baseCurrency().id()) { MyMoneySecurity sec = m_securityMap[security.tradingCurrency()]; prices += file->price(sec.id(), file->baseCurrency().id()); } - KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security); + KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security); if(acc.id() == m_reconciliationAccount.id()) item->setReconciliation(true); } } -void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QString& institutionId) +void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQString& institutionId) { MyMoneyFile* file = MyMoneyFile::instance(); - QMap<QString, MyMoneyAccount>::const_iterator it_a; + TQMap<TQString, MyMoneyAccount>::const_iterator it_a; MyMoneyMoney value; bool showClosedAccounts = kmymoney2->toggleAction("view_show_all_accounts")->isChecked(); @@ -244,7 +244,7 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q if(acc.institutionId() == institutionId && !acc.isInvest() && (!acc.isClosed() || showClosedAccounts)) { - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.currencyId() != file->baseCurrency().id()) { @@ -257,7 +257,7 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q delete e; } - KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(parent, acc, prices, security); + KMyMoneyAccountTreeItem* item = new KMyMoneyAccountTreeItem(tqparent, acc, prices, security); if(acc.id() == m_reconciliationAccount.id()) item->setReconciliation(true); @@ -276,8 +276,8 @@ void KInstitutionsView::loadSubAccounts(KMyMoneyAccountTreeItem* parent, const Q // it does not take the negative sign for liability accounts // into account. So we correct this here with the value we // have calculated while filling the list - parent->adjustTotalValue(-parent->totalValue()); // load a 0 - parent->adjustTotalValue(value); // now store the new value + tqparent->adjustTotalValue(-tqparent->totalValue()); // load a 0 + tqparent->adjustTotalValue(value); // now store the new value // we need to call slotUpdateNetWorth() here manually, because // KMyMoneyAccountTreeItem::adjustTotalValue() does not send out @@ -297,19 +297,19 @@ void KInstitutionsView::slotUpdateNetWorth(void) item = dynamic_cast<KMyMoneyAccountTreeItem*>(item->nextSibling()); } - QString s(i18n("Net Worth: ")); + TQString s(i18n("Net Worth: ")); // FIXME figure out how to deal with the approximate // if(!(file->totalValueValid(assetAccount.id()) & file->totalValueValid(liabilityAccount.id()))) // s += "~ "; - s.replace(QString(" "), QString(" ")); + s.tqreplace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "<b><font color=\"red\">"; } const MyMoneySecurity& sec = MyMoneyFile::instance()->baseCurrency(); - QString v(netWorth.formatMoney(sec)); - s += v.replace(QString(" "), QString(" ")); + TQString v(netWorth.formatMoney(sec)); + s += v.tqreplace(TQString(" "), TQString(" ")); if(netWorth.isNegative()) { s += "</font></b>"; } @@ -318,14 +318,14 @@ void KInstitutionsView::slotUpdateNetWorth(void) m_totalProfitsLabel->setText(s); } -void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance) +void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance) { Q_UNUSED(reconciliationDate); Q_UNUSED(endingBalance); // scan through the list of accounts and mark all non // expanded and re-select the one that was probably selected before - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); KMyMoneyAccountTreeItem* item; while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); @@ -337,7 +337,7 @@ void KInstitutionsView::slotReconcileAccount(const MyMoneyAccount& acc, const QD m_reconciliationAccount = acc; if(!acc.id().isEmpty()) { - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeItem*>(it_lvi.current()); if(item && item->itemObject().id() == acc.id()) { diff --git a/kmymoney2/views/kinstitutionsview.h b/kmymoney2/views/kinstitutionsview.h index 3a35713..9c1ab96 100644 --- a/kmymoney2/views/kinstitutionsview.h +++ b/kmymoney2/views/kinstitutionsview.h @@ -42,10 +42,11 @@ class KInstitutionsView : public KInstitutionsViewDecl { Q_OBJECT + TQ_OBJECT private: public: - KInstitutionsView(QWidget *parent=0, const char *name=0); + KInstitutionsView(TQWidget *tqparent=0, const char *name=0); virtual ~KInstitutionsView(); public slots: @@ -58,22 +59,22 @@ public slots: void show(void); /** - * Override the base class behaviour to restore the layout. Do not - * do this in show() because show() itself may change the layout + * Override the base class behaviour to restore the tqlayout. Do not + * do this in show() because show() itself may change the tqlayout * in undesired ways. */ void polish(void); - void slotReconcileAccount(const MyMoneyAccount& acc, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance); + void slotReconcileAccount(const MyMoneyAccount& acc, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance); protected: void loadAccounts(void); // load accounts that are kept at a specific institution - void loadSubAccounts(KMyMoneyAccountTreeItem* parent, const QString& institutionId); + void loadSubAccounts(KMyMoneyAccountTreeItem* tqparent, const TQString& institutionId); - // load stock accounts under the investment account (parent) - void loadSubAccounts(KMyMoneyAccountTreeItem* parent); + // load stock accounts under the investment account (tqparent) + void loadSubAccounts(KMyMoneyAccountTreeItem* tqparent); protected slots: void slotUpdateNetWorth(void); @@ -85,7 +86,7 @@ private: * * @param type account type as defined in MyMoneyAccount::accountTypeE */ - const QPixmap accountImage(const MyMoneyAccount::accountTypeE type) const; + const TQPixmap accountImage(const MyMoneyAccount::accountTypeE type) const; signals: /** @@ -117,9 +118,9 @@ signals: private: MyMoneyAccount m_reconciliationAccount; - QMap<QString, MyMoneyAccount> m_accountMap; - QMap<QString, MyMoneySecurity> m_securityMap; - QMap<QString, unsigned long> m_transactionCountMap; + TQMap<TQString, MyMoneyAccount> m_accountMap; + TQMap<TQString, MyMoneySecurity> m_securityMap; + TQMap<TQString, unsigned long> m_transactionCountMap; /// set if a view needs to be reloaded during show() bool m_needReload; diff --git a/kmymoney2/views/kinstitutionsviewdecl.ui b/kmymoney2/views/kinstitutionsviewdecl.ui index 3a0a740..678ec08 100644 --- a/kmymoney2/views/kinstitutionsviewdecl.ui +++ b/kmymoney2/views/kinstitutionsviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KInstitutionsViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KInstitutionsViewDecl</cstring> </property> @@ -27,9 +27,9 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -45,18 +45,18 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_totalProfitsLabel</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -68,7 +68,7 @@ <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignVCenter|AlignRight</set> </property> <property name="hAlign" stdset="0"> @@ -78,5 +78,8 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccounttree.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kinvestmentlistitem.cpp b/kmymoney2/views/kinvestmentlistitem.cpp index c2c41d9..f3cf29b 100644 --- a/kmymoney2/views/kinvestmentlistitem.cpp +++ b/kmymoney2/views/kinvestmentlistitem.cpp @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpainter.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,8 +40,8 @@ #include <kmymoney/mymoneysecurity.h> #include <kmymoney/mymoneyfile.h> -KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount& account) - : KListViewItem(parent) +KInvestmentListItem::KInvestmentListItem(KListView* tqparent, const MyMoneyAccount& account) + : KListViewItem(tqparent) { bColumn5Negative = false; bColumn6Negative = false; @@ -50,7 +50,7 @@ KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount bColumn9Negative = false; m_account = account; - m_listView = parent; + m_listView = tqparent; MyMoneySecurity security; MyMoneyFile* file = MyMoneyFile::instance(); @@ -60,7 +60,7 @@ KInvestmentListItem::KInvestmentListItem(KListView* parent, const MyMoneyAccount int prec = MyMoneyMoney::denomToPrec(m_tradingCurrency.smallestAccountFraction()); - QValueList<MyMoneyTransaction> transactionList; + TQValueList<MyMoneyTransaction> transactionList; // FIXME PRICE // equity_price_history history = equity.priceHistory(); @@ -100,37 +100,37 @@ KInvestmentListItem::~KInvestmentListItem() // FIXME PRICE #if 0 -const QString KInvestmentListItem::calculate1WeekGain(const equity_price_history& history) +const TQString KInvestmentListItem::calculate1WeekGain(const equity_price_history& history) { return calculateGain(history, -7, 0, false, bColumn6Negative); } -const QString KInvestmentListItem::calculate4WeekGain(const equity_price_history& history) +const TQString KInvestmentListItem::calculate4WeekGain(const equity_price_history& history) { return calculateGain(history, -28, 0, false, bColumn7Negative); } -const QString KInvestmentListItem::calculate3MonthGain(const equity_price_history& history) +const TQString KInvestmentListItem::calculate3MonthGain(const equity_price_history& history) { return calculateGain(history, 0, -3, false, bColumn8Negative); } -const QString KInvestmentListItem::calculateYTDGain(const equity_price_history& history) +const TQString KInvestmentListItem::calculateYTDGain(const equity_price_history& history) { return calculateGain(history, 0, 0, true, bColumn9Negative); } -const QString KInvestmentListItem::calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative) +const TQString KInvestmentListItem::calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative) { bNegative = false; if(history.isEmpty()) { - return QString("0.0%"); + return TQString("0.0%"); } else { bool bFoundCurrent = false, bFoundComparison = false; - QDate tempDate, comparisonDate = QDate::currentDate(); + TQDate tempDate, comparisonDate = TQDate::tqcurrentDate(); if(YTD) { @@ -147,9 +147,9 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his //find the current value, or closest to the current value. equity_price_history::ConstIterator itToday = history.end(); - for(tempDate = QDate::currentDate(); tempDate >= comparisonDate; ) + for(tempDate = TQDate::tqcurrentDate(); tempDate >= comparisonDate; ) { - itToday = history.find(tempDate); + itToday = history.tqfind(tempDate); if(itToday != history.end()) { currentValue = itToday.data(); @@ -162,14 +162,14 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his if(!bFoundCurrent) { - return QString("0.0%"); + return TQString("0.0%"); } - //find a date that is closest to a week old, not older, and not today's date. Because its a QMap, this map + //find a date that is closest to a week old, not older, and not today's date. Because its a TQMap, this map //should already be sorted earliest to latest. for(equity_price_history::ConstIterator it = history.begin(); it != history.end(); ++it) { - if(it.key() >= comparisonDate && it.key() < QDate::currentDate()) + if(it.key() >= comparisonDate && it.key() < TQDate::tqcurrentDate()) { comparisonDate = it.key(); comparisonValue = it.data(); @@ -180,7 +180,7 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his if(!bFoundComparison) { - return QString("0.0%"); + return TQString("0.0%"); } //qDebug("Current date/value to use is %s/%s, Previous is %s/%s", tempDate.toString().data(), currentValue.toString().data(), comparisonDate.toString().data(), comparisonValue.toString().data()); @@ -195,21 +195,21 @@ const QString KInvestmentListItem::calculateGain(const equity_price_history& his bNegative = true; } - QString ds = QString("%1%").arg(result, 0, 'f', 3); + TQString ds = TQString("%1%").tqarg(result, 0, 'f', 3); return ds; /*MyMoneyMoney result = (currentValue / comparisonValue); result = result * 100; result = result - 100; qDebug("final result = %s", result.toString().data()); - return QString(result.formatMoney("", 3) + "%");*/ + return TQString(result.formatMoney("", 3) + "%");*/ } } - return QString(""); + return TQString(""); } #endif -int KInvestmentListItem::compare(QListViewItem* i, int col, bool ascending) const +int KInvestmentListItem::compare(TQListViewItem* i, int col, bool ascending) const { KInvestmentListItem* item = dynamic_cast<KInvestmentListItem*>(i); // do special sorting only for numeric columns @@ -247,7 +247,7 @@ int KInvestmentListItem::compare(QListViewItem* i, int col, bool ascending) cons return KListViewItem::compare(i, col, ascending); } -void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align) +void KInvestmentListItem::paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align) { bool bPaintRed = false; if((column == COLUMN_RAWGAIN_INDEX && bColumn5Negative) || @@ -261,15 +261,15 @@ void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int co p->save(); - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if(isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); #ifndef KMM_DESIGNER - QFont font = KMyMoneyGlobalSettings::listCellFont(); + TQFont font = KMyMoneyGlobalSettings::listCellFont(); // strike out closed accounts if(m_account.isClosed()) font.setStrikeOut(true); @@ -279,15 +279,15 @@ void KInvestmentListItem::paintCell(QPainter * p, const QColorGroup & cg, int co if(bPaintRed) { - QColorGroup _cg( cg2); - QColor c = _cg.text(); - _cg.setColor(QColorGroup::Text, Qt::red); - QListViewItem::paintCell(p, _cg, column, width, align); - _cg.setColor(QColorGroup::Text, c); + TQColorGroup _cg( cg2); + TQColor c = _cg.text(); + _cg.setColor(TQColorGroup::Text, TQt::red); + TQListViewItem::paintCell(p, _cg, column, width, align); + _cg.setColor(TQColorGroup::Text, c); } else { - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } p->restore(); diff --git a/kmymoney2/views/kinvestmentlistitem.h b/kmymoney2/views/kinvestmentlistitem.h index d0ad62b..cb0d944 100644 --- a/kmymoney2/views/kinvestmentlistitem.h +++ b/kmymoney2/views/kinvestmentlistitem.h @@ -59,30 +59,30 @@ class KInvestmentListItem : public KListViewItem { public: - KInvestmentListItem(KListView* parent, const MyMoneyAccount& security); + KInvestmentListItem(KListView* tqparent, const MyMoneyAccount& security); ~KInvestmentListItem(); - QString securityId() const { return m_account.currencyId(); }; + TQString securityId() const { return m_account.currencyId(); }; const MyMoneyAccount& account(void) const { return m_account; }; const MyMoneySecurity tradingCurrency(void) const { return m_tradingCurrency; }; /** * Helper method to show the right order */ - int compare(QListViewItem* i, int col, bool ascending) const; + int compare(TQListViewItem* i, int col, bool ascending) const; protected: - void paintCell(QPainter * p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align); private: // FIXME PRICE #if 0 - const QString calculate1WeekGain(const equity_price_history& history); - const QString calculate4WeekGain(const equity_price_history& history); - const QString calculate3MonthGain(const equity_price_history& history); - const QString calculateYTDGain(const equity_price_history& history); - const QString calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative); + const TQString calculate1WeekGain(const equity_price_history& history); + const TQString calculate4WeekGain(const equity_price_history& history); + const TQString calculate3MonthGain(const equity_price_history& history); + const TQString calculateYTDGain(const equity_price_history& history); + const TQString calculateGain(const equity_price_history& history, int dayDifference, int monthDifference, bool YTD, bool& bNegative); #endif private: diff --git a/kmymoney2/views/kinvestmentview.cpp b/kmymoney2/views/kinvestmentview.cpp index ae8cc11..d6ebb1a 100644 --- a/kmymoney2/views/kinvestmentview.cpp +++ b/kmymoney2/views/kinvestmentview.cpp @@ -62,8 +62,8 @@ public: -KInvestmentView::KInvestmentView(QWidget *parent, const char *name) : - KInvestmentViewDecl(parent,name), +KInvestmentView::KInvestmentView(TQWidget *tqparent, const char *name) : + KInvestmentViewDecl(tqparent,name), d(new Private) { m_table->setRootIsDecorated(false); @@ -72,31 +72,31 @@ KInvestmentView::KInvestmentView(QWidget *parent, const char *name) : m_table->addColumn(i18n("Symbol")); int col = m_table->addColumn(i18n("Value")); - m_table->setColumnAlignment(col, Qt::AlignRight); + m_table->setColumnAlignment(col, TQt::AlignRight); col = m_table->addColumn(i18n("Quantity")); - m_table->setColumnAlignment(col, Qt::AlignRight); + m_table->setColumnAlignment(col, TQt::AlignRight); col = m_table->addColumn(i18n("Price")); - m_table->setColumnAlignment(col, Qt::AlignRight); + m_table->setColumnAlignment(col, TQt::AlignRight); m_table->setMultiSelection(false); - m_table->setColumnWidthMode(0, QListView::Maximum); + m_table->setColumnWidthMode(0, TQListView::Maximum); m_table->header()->setResizeEnabled(true); m_table->setAllColumnsShowFocus(true); m_table->setShowSortIndicator(true); m_table->restoreLayout(KGlobal::config(), "Investment Settings"); - connect(m_table, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)), - this, SLOT(slotListContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(m_table, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(slotSelectionChanged(QListViewItem *))); + connect(m_table, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)), + this, TQT_SLOT(slotListContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(m_table, TQT_SIGNAL(selectionChanged(TQListViewItem *)), this, TQT_SLOT(slotSelectionChanged(TQListViewItem *))); - connect(m_accountComboBox, SIGNAL(accountSelected(const QString&)), - this, SLOT(slotSelectAccount(const QString&))); + connect(m_accountComboBox, TQT_SIGNAL(accountSelected(const TQString&)), + this, TQT_SLOT(slotSelectAccount(const TQString&))); - connect(m_table, SIGNAL(doubleClicked(QListViewItem*,const QPoint&, int)), kmymoney2->action("investment_edit"), SLOT(activate())); + connect(m_table, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&, int)), kmymoney2->action("investment_edit"), TQT_SLOT(activate())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView())); } KInvestmentView::~KInvestmentView() @@ -105,7 +105,7 @@ KInvestmentView::~KInvestmentView() delete d; } -void KInvestmentView::slotSelectionChanged(QListViewItem *item) +void KInvestmentView::slotSelectionChanged(TQListViewItem *item) { kmymoney2->slotSelectInvestment(); @@ -121,7 +121,7 @@ void KInvestmentView::slotSelectionChanged(QListViewItem *item) } } -void KInvestmentView::slotListContextMenu(KListView* /* lv */, QListViewItem* /*item*/, const QPoint& /*point*/) +void KInvestmentView::slotListContextMenu(KListView* /* lv */, TQListViewItem* /*item*/, const TQPoint& /*point*/) { kmymoney2->slotSelectInvestment(); KInvestmentListItem *pItem = dynamic_cast<KInvestmentListItem*>(m_table->selectedItem()); @@ -160,9 +160,9 @@ void KInvestmentView::loadAccounts(void) m_accountComboBox->loadList(MyMoneyAccount::Investment); if(d->m_account.id().isEmpty()) { - QStringList list = m_accountComboBox->accountList(); + TQStringList list = m_accountComboBox->accountList(); if(list.count()) { - QStringList::Iterator it; + TQStringList::Iterator it; for(it = list.begin(); it != list.end(); ++it) { MyMoneyAccount a = file->account(*it); if(a.accountType() == MyMoneyAccount::Investment) { @@ -205,7 +205,7 @@ bool KInvestmentView::slotSelectAccount(const MyMoneyObject& obj) return rc; } -bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transactionId, const bool /* reconciliation*/) +bool KInvestmentView::slotSelectAccount(const TQString& id, const TQString& transactionId, const bool /* reconciliation*/) { bool rc = true; @@ -215,9 +215,9 @@ bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transa try { d->m_account = MyMoneyFile::instance()->account(id); // if a stock account is selected, we show the - // the corresponding parent (investment) account + // the corresponding tqparent (investment) account if(d->m_account.isInvest()) { - d->m_account = MyMoneyFile::instance()->account(d->m_account.parentAccountId()); + d->m_account = MyMoneyFile::instance()->account(d->m_account.tqparentAccountId()); } // TODO if we don't have an investment account, then we should switch to the ledger view d->m_newAccountLoaded = true; @@ -246,8 +246,8 @@ bool KInvestmentView::slotSelectAccount(const QString& id, const QString& transa void KInvestmentView::clear(void) { // setup header font - QFont font = KMyMoneyGlobalSettings::listHeaderFont(); - QFontMetrics fm( font ); + TQFont font = KMyMoneyGlobalSettings::listHeaderFont(); + TQFontMetrics fm( font ); int height = fm.lineSpacing()+6; m_table->header()->setMinimumHeight(height); m_table->header()->setMaximumHeight(height); @@ -261,7 +261,7 @@ void KInvestmentView::clear(void) m_table->clear(); // and the selected account in the combo box - m_accountComboBox->setSelected(QString()); + m_accountComboBox->setSelected(TQString()); } void KInvestmentView::loadView(void) @@ -287,9 +287,9 @@ void KInvestmentView::loadView(void) || !KMyMoneyGlobalSettings::hideClosedAccounts(); try { d->m_account = file->account(d->m_account.id()); - QStringList securities = d->m_account.accountList(); + TQStringList securities = d->m_account.accountList(); - for(QStringList::ConstIterator it = securities.begin(); it != securities.end(); ++it) { + for(TQStringList::ConstIterator it = securities.begin(); it != securities.end(); ++it) { MyMoneyAccount acc = file->account(*it); if(!acc.isClosed() || showClosedAccounts) new KInvestmentListItem(m_table, acc); diff --git a/kmymoney2/views/kinvestmentview.h b/kmymoney2/views/kinvestmentview.h index ba0aecc..98e2b9a 100644 --- a/kmymoney2/views/kinvestmentview.h +++ b/kmymoney2/views/kinvestmentview.h @@ -47,9 +47,10 @@ class MyMoneyInvestTransaction; class KInvestmentView : public KInvestmentViewDecl { Q_OBJECT + TQ_OBJECT public: - KInvestmentView(QWidget *parent=0, const char *name=0); + KInvestmentView(TQWidget *tqparent=0, const char *name=0); ~KInvestmentView(); /** @@ -79,7 +80,7 @@ public slots: * @retval true selection of account referenced by @p id succeeded * @retval false selection of account failed */ - bool slotSelectAccount(const QString& accountId, const QString& transactionId = QString(), const bool reconciliation = false); + bool slotSelectAccount(const TQString& accountId, const TQString& transactionId = TQString(), const bool reconciliation = false); /** * This method is provided for convenience and acts as the method above. @@ -110,9 +111,9 @@ protected slots: * This slot receives the signal from the listview @c lv control that the context menu * was requested for @c item at @c point. */ - void slotListContextMenu(KListView* lv, QListViewItem* item, const QPoint& point); + void slotListContextMenu(KListView* lv, TQListViewItem* item, const TQPoint& point); - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); signals: @@ -120,7 +121,7 @@ signals: * This signal is emitted, if an account has been selected * which cannot handled by this view. */ - void accountSelected(const QString& accountId, const QString& transactionId); + void accountSelected(const TQString& accountId, const TQString& transactionId); void accountSelected(const MyMoneyObject&); diff --git a/kmymoney2/views/kinvestmentviewdecl.ui b/kmymoney2/views/kinvestmentviewdecl.ui index 1c74d50..d339bbf 100644 --- a/kmymoney2/views/kinvestmentviewdecl.ui +++ b/kmymoney2/views/kinvestmentviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KInvestmentViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KInvestmentViewDecl</cstring> </property> @@ -22,15 +22,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -53,7 +53,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>280</width> <height>20</height> @@ -79,5 +79,8 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyaccountcombo.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kmymoneyfile.cpp b/kmymoney2/views/kmymoneyfile.cpp index 4046cc0..76d3ea1 100644 --- a/kmymoney2/views/kmymoneyfile.cpp +++ b/kmymoney2/views/kmymoneyfile.cpp @@ -39,7 +39,7 @@ KMyMoneyFile::KMyMoneyFile() } /* -KMyMoneyFile::KMyMoneyFile(const QString&) +KMyMoneyFile::KMyMoneyFile(const TQString&) { } */ diff --git a/kmymoney2/views/kmymoneyfile.h b/kmymoney2/views/kmymoneyfile.h index ccda128..d7675c0 100644 --- a/kmymoney2/views/kmymoneyfile.h +++ b/kmymoney2/views/kmymoneyfile.h @@ -42,7 +42,7 @@ private: bool m_open; protected: - // KMyMoneyFile(const QString&); + // KMyMoneyFile(const TQString&); public: KMyMoneyFile(); diff --git a/kmymoney2/views/kmymoneytransaction.cpp b/kmymoney2/views/kmymoneytransaction.cpp index ee16a6a..373c55e 100644 --- a/kmymoney2/views/kmymoneytransaction.cpp +++ b/kmymoney2/views/kmymoneytransaction.cpp @@ -45,7 +45,7 @@ KMyMoneyTransaction::~KMyMoneyTransaction() { } -void KMyMoneyTransaction::setSplitId(const QString& id) +void KMyMoneyTransaction::setSplitId(const TQString& id) { m_splitId = id; } diff --git a/kmymoney2/views/kmymoneytransaction.h b/kmymoney2/views/kmymoneytransaction.h index 4deb184..f15f204 100644 --- a/kmymoney2/views/kmymoneytransaction.h +++ b/kmymoney2/views/kmymoneytransaction.h @@ -50,11 +50,11 @@ public: KMyMoneyTransaction(const MyMoneyTransaction& t); ~KMyMoneyTransaction(); - void setSplitId(const QString& id); - const QString& splitId(void) const { return m_splitId; }; + void setSplitId(const TQString& id); + const TQString& splitId(void) const { return m_splitId; }; private: - QString m_splitId; + TQString m_splitId; }; diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index 8719d79..bf1b5cc 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -25,17 +25,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qprogressdialog.h> -#include <qtextcodec.h> -#include <qstatusbar.h> - -#include <qcursor.h> -#include <qregexp.h> -#include <qlayout.h> -#include <qobjectlist.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqprogressdialog.h> +#include <tqtextcodec.h> +#include <tqstatusbar.h> + +#include <tqcursor.h> +#include <tqregexp.h> +#include <tqlayout.h> +#include <tqobjectlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -120,15 +120,15 @@ #define RECOVER_KEY_ID "0xD2B08440" -KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) - : KJanusWidget(parent, name, KJanusWidget::IconList), +KMyMoneyView::KMyMoneyView(TQWidget *tqparent, const char *name) + : KJanusWidget(tqparent, name, KJanusWidget::IconList), // m_bankRightClick(false), m_inConstructor(true), m_fileOpen(false), m_fmode(0600) { // the global variable kmymoney2 is not yet assigned. So we construct it here - QObject* kmymoney2 = parent->parent(); + TQObject* kmymoney2 = tqparent->tqparent(); const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16; newStorage(); @@ -137,100 +137,100 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) DesktopIcon("home", iconSize)); m_homeView = new KHomeView(m_homeViewFrame, "HomeView"); - connect(m_homeView, SIGNAL(ledgerSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); - connect(m_homeView, SIGNAL(scheduleSelected(const QString&)), - this, SLOT(slotScheduleSelected(const QString&))); - connect(m_homeView, SIGNAL(reportSelected(const QString&)), - this, SLOT(slotShowReport(const QString&))); + connect(m_homeView, TQT_SIGNAL(ledgerSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); + connect(m_homeView, TQT_SIGNAL(scheduleSelected(const TQString&)), + this, TQT_SLOT(slotScheduleSelected(const TQString&))); + connect(m_homeView, TQT_SIGNAL(reportSelected(const TQString&)), + this, TQT_SLOT(slotShowReport(const TQString&))); // Page 1 m_institutionsViewFrame = addVBoxPage( i18n("Institutions"), i18n("Institutions"), DesktopIcon("institutions", iconSize)); addTitleBar(m_institutionsViewFrame, i18n("Institutions")); m_institutionsView = new KInstitutionsView(m_institutionsViewFrame, "InstitutionsView"); - connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotInstitutionEdit(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&))); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_institutionsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); + connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotInstitutionEdit(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&))); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_institutionsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); // Page 2 m_accountsViewFrame = addVBoxPage( i18n("Accounts"), i18n("Accounts"), DesktopIcon("accounts", iconSize)); addTitleBar(m_accountsViewFrame, i18n("Accounts")); m_accountsView = new KAccountsView(m_accountsViewFrame, "AccountsView"); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInvestment(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); - connect(this, SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, SLOT(slotUpdateIconPos(unsigned int))); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_accountsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInvestment(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(this, TQT_SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, TQT_SLOT(slotUpdateIconPos(unsigned int))); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_accountsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); // Page 3 m_scheduleViewFrame = addVBoxPage( i18n("Scheduled\ntransactions"), i18n("Bills & Reminders"), DesktopIcon("schedule", iconSize)); addTitleBar(m_scheduleViewFrame, i18n("Scheduled transactions")); m_scheduledView = new KScheduledView(m_scheduleViewFrame, "ScheduledView"); - connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_scheduledView, SLOT(slotReloadView())); - connect(m_scheduledView, SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, SLOT(slotSelectSchedule(const MyMoneySchedule&))); - connect(m_scheduledView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowScheduleContextMenu())); - connect(m_scheduledView, SIGNAL(enterSchedule()), kmymoney2, SLOT(slotScheduleEnter())); - connect(m_scheduledView, SIGNAL(skipSchedule()), kmymoney2, SLOT(slotScheduleSkip())); - connect(m_scheduledView, SIGNAL(editSchedule()), kmymoney2, SLOT(slotScheduleEdit())); + connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_scheduledView, TQT_SLOT(slotReloadView())); + connect(m_scheduledView, TQT_SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, TQT_SLOT(slotSelectSchedule(const MyMoneySchedule&))); + connect(m_scheduledView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowScheduleContextMenu())); + connect(m_scheduledView, TQT_SIGNAL(enterSchedule()), kmymoney2, TQT_SLOT(slotScheduleEnter())); + connect(m_scheduledView, TQT_SIGNAL(skipSchedule()), kmymoney2, TQT_SLOT(slotScheduleSkip())); + connect(m_scheduledView, TQT_SIGNAL(editSchedule()), kmymoney2, TQT_SLOT(slotScheduleEdit())); // Page 4 m_categoriesViewFrame = addVBoxPage( i18n("Categories"), i18n("Categories"), DesktopIcon("categories", iconSize)); addTitleBar(m_categoriesViewFrame, i18n("Categories")); m_categoriesView = new KCategoriesView(m_categoriesViewFrame, "CategoriesView"); - connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); // Page 5 m_payeesViewFrame = addVBoxPage( i18n("Payees"), i18n("Payees"), DesktopIcon("payee", iconSize)); addTitleBar(m_payeesViewFrame, i18n("Payees")); m_payeesView = new KPayeesView(m_payeesViewFrame, "PayeesView"); - connect(kmymoney2, SIGNAL(payeeCreated(const QString&)), m_payeesView, SLOT(slotSelectPayeeAndTransaction(const QString&))); - connect(kmymoney2, SIGNAL(payeeRename()), m_payeesView, SLOT(slotStartRename())); - connect(m_payeesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowPayeeContextMenu())); - connect(m_payeesView, SIGNAL(selectObjects(const QValueList<MyMoneyPayee>&)), kmymoney2, SLOT(slotSelectPayees(const QValueList<MyMoneyPayee>&))); - connect(m_payeesView, SIGNAL(transactionSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); + connect(kmymoney2, TQT_SIGNAL(payeeCreated(const TQString&)), m_payeesView, TQT_SLOT(slotSelectPayeeAndTransaction(const TQString&))); + connect(kmymoney2, TQT_SIGNAL(payeeRename()), m_payeesView, TQT_SLOT(slotStartRename())); + connect(m_payeesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowPayeeContextMenu())); + connect(m_payeesView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyPayee>&)), kmymoney2, TQT_SLOT(slotSelectPayees(const TQValueList<MyMoneyPayee>&))); + connect(m_payeesView, TQT_SIGNAL(transactionSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); // Page 6 m_ledgerViewFrame = addVBoxPage( i18n("Ledgers"), i18n("Ledgers"), DesktopIcon("ledger", iconSize)); m_ledgerView = new KGlobalLedgerView(m_ledgerViewFrame, "GlobalLedgerView"); - connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_ledgerView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowTransactionContextMenu())); - connect(m_ledgerView, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&))); - connect(m_ledgerView, SIGNAL(newTransaction()), kmymoney2, SLOT(slotTransactionsNew())); - connect(m_ledgerView, SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, SLOT(slotTransactionsCancelOrEnter(bool&))); - connect(m_ledgerView, SIGNAL(startEdit()), kmymoney2, SLOT(slotTransactionsEdit())); - connect(m_ledgerView, SIGNAL(endEdit()), kmymoney2, SLOT(slotTransactionsEnter())); - connect(m_ledgerView, SIGNAL(toggleReconciliationFlag()), kmymoney2, SLOT(slotToggleReconciliationFlag())); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_ledgerView, SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); - connect(kmymoney2, SIGNAL(selectAllTransactions()), m_ledgerView, SLOT(slotSelectAllTransactions())); + connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_ledgerView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowTransactionContextMenu())); + connect(m_ledgerView, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, TQT_SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&))); + connect(m_ledgerView, TQT_SIGNAL(newTransaction()), kmymoney2, TQT_SLOT(slotTransactionsNew())); + connect(m_ledgerView, TQT_SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, TQT_SLOT(slotTransactionsCancelOrEnter(bool&))); + connect(m_ledgerView, TQT_SIGNAL(startEdit()), kmymoney2, TQT_SLOT(slotTransactionsEdit())); + connect(m_ledgerView, TQT_SIGNAL(endEdit()), kmymoney2, TQT_SLOT(slotTransactionsEnter())); + connect(m_ledgerView, TQT_SIGNAL(toggleReconciliationFlag()), kmymoney2, TQT_SLOT(slotToggleReconciliationFlag())); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_ledgerView, TQT_SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); + connect(kmymoney2, TQT_SIGNAL(selectAllTransactions()), m_ledgerView, TQT_SLOT(slotSelectAllTransactions())); // Page 7 m_investmentViewFrame = addVBoxPage( i18n("Investments"), i18n("Investments"), DesktopIcon("investments", iconSize)); addTitleBar(m_investmentViewFrame, i18n("Investments")); m_investmentView = new KInvestmentView(m_investmentViewFrame, "InvestmentView"); - connect(m_investmentView, SIGNAL(accountSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); - connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_investmentView, SIGNAL(investmentRightMouseClick()), kmymoney2, SLOT(slotShowInvestmentContextMenu())); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_investmentView, TQT_SIGNAL(investmentRightMouseClick()), kmymoney2, TQT_SLOT(slotShowInvestmentContextMenu())); // Page 8 m_reportsViewFrame = addVBoxPage(i18n("Reports"), i18n("Reports"), @@ -242,10 +242,10 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) DesktopIcon("budget", iconSize)); addTitleBar(m_budgetViewFrame, i18n("Budgets")); m_budgetView = new KBudgetView(m_budgetViewFrame, "BudgetView"); - connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_budgetView, SLOT(slotRefreshView())); - connect(m_budgetView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowBudgetContextMenu())); - connect(m_budgetView, SIGNAL(selectObjects(const QValueList<MyMoneyBudget>&)), kmymoney2, SLOT(slotSelectBudget(const QValueList<MyMoneyBudget>&))); - connect(kmymoney2, SIGNAL(budgetRename()), m_budgetView, SLOT(slotStartRename())); + connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_budgetView, TQT_SLOT(slotRefreshView())); + connect(m_budgetView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowBudgetContextMenu())); + connect(m_budgetView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyBudget>&)), kmymoney2, TQT_SLOT(slotSelectBudget(const TQValueList<MyMoneyBudget>&))); + connect(kmymoney2, TQT_SIGNAL(budgetRename()), m_budgetView, TQT_SLOT(slotStartRename())); // Page 10 m_forecastViewFrame = addVBoxPage( i18n("Forecast"), i18n("Forecast"), @@ -254,19 +254,19 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) m_forecastView = new KForecastView(m_forecastViewFrame, "ForecastView"); // get rid of the title text - QWidget* widget = dynamic_cast<QWidget*>(child("KJanusWidgetTitleLabel", "QLabel")); + TQWidget* widget = dynamic_cast<TQWidget*>(child("KJanusWidgetTitleLabel", TQLABEL_OBJECT_NAME_STRING)); if(widget) widget->hide(); // and the separator below it - widget = dynamic_cast<QWidget*>(child(0, "KSeparator")); + widget = dynamic_cast<TQWidget*>(child(0, "KSeparator")); if(widget) widget->hide(); // select the page first, before connecting the aboutToShow signal // because we don't want to override the information stored in the config file showPage(0); - connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotRememberPage(QWidget*))); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotRememberPage(TQWidget*))); m_inConstructor = false; } @@ -276,24 +276,24 @@ KMyMoneyView::~KMyMoneyView() removeStorage(); } -void KMyMoneyView::addTitleBar(QWidget* parent, const QString& title) +void KMyMoneyView::addTitleBar(TQWidget* tqparent, const TQString& title) { - KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( parent, "titleLabel" ); - label->setMinimumSize( QSize( 100, 30 ) ); + KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( tqparent, "titleLabel" ); + label->setMinimumSize( TQSize( 100, 30 ) ); label->setRightImageFile("pics/titlelabel_background.png" ); label->setText(title); } void KMyMoneyView::showTitleBar(bool show) { - QObjectList *l = queryList( 0, "titleLabel" ); - QObjectListIterator it( *l ); // iterate over the labels - QObject *obj; + TQObjectList *l = queryList( 0, "titleLabel" ); + TQObjectListIterator it( *l ); // iterate over the labels + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... ++it; - ((QWidget*)obj)->setShown( show ); + ((TQWidget*)obj)->setShown( show ); } delete l; // delete the list, not the objects } @@ -337,7 +337,7 @@ bool KMyMoneyView::canPrint(void) return rc; } -bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, QString& tooltip) const +bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, TQString& tooltip) const { // we can only create transactions in the ledger view so // we check that this is the active page @@ -350,7 +350,7 @@ bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransac return rc; } -bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { // we can only modify transactions in the ledger view so // we check that this is the active page @@ -365,7 +365,7 @@ bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransac return rc; } -bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { // we can only duplicate transactions in the ledger view so // we check that this is the active page @@ -380,7 +380,7 @@ bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTran return rc; } -bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { bool rc; // we can only edit transactions in the ledger view so @@ -397,7 +397,7 @@ bool KMyMoneyView::createNewTransaction(void) { bool rc = false; KMyMoneyRegister::SelectedTransactions list; - QString txt; + TQString txt; if(canCreateTransactions(list, txt)) { rc = m_ledgerView->selectEmptyTransaction(); } @@ -407,7 +407,7 @@ bool KMyMoneyView::createNewTransaction(void) TransactionEditor* KMyMoneyView::startEdit(const KMyMoneyRegister::SelectedTransactions& list) { TransactionEditor* editor = 0; - QString txt; + TQString txt; if(canEditTransactions(list, txt) || canCreateTransactions(list, txt)) { editor = m_ledgerView->startEdit(list); } @@ -451,16 +451,16 @@ void KMyMoneyView::enableViews(int state) emit viewStateChanged(state != 0); } -void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& transaction) +void KMyMoneyView::slotLedgerSelected(const TQString& _accId, const TQString& transaction) { MyMoneyAccount acc = MyMoneyFile::instance()->account(_accId); - QString accId(_accId); + TQString accId(_accId); switch(acc.accountType()) { case MyMoneyAccount::Stock: // if a stock account is selected, we show the - // the corresponding parent (investment) account - acc = MyMoneyFile::instance()->account(acc.parentAccountId()); + // the corresponding tqparent (investment) account + acc = MyMoneyFile::instance()->account(acc.tqparentAccountId()); accId = acc.id(); // tricky fall through here @@ -492,19 +492,19 @@ void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& tran } } -void KMyMoneyView::slotPayeeSelected(const QString& payee, const QString& account, const QString& transaction) +void KMyMoneyView::slotPayeeSelected(const TQString& payee, const TQString& account, const TQString& transaction) { showPage(pageIndex(m_payeesViewFrame)); m_payeesView->slotSelectPayeeAndTransaction(payee, account, transaction); } -void KMyMoneyView::slotScheduleSelected(const QString& scheduleId) +void KMyMoneyView::slotScheduleSelected(const TQString& scheduleId) { MyMoneySchedule sched = MyMoneyFile::instance()->schedule(scheduleId); kmymoney2->slotSelectSchedule(sched); } -void KMyMoneyView::slotShowReport(const QString& reportid) +void KMyMoneyView::slotShowReport(const TQString& reportid) { showPage(pageIndex(m_reportsViewFrame)); m_reportsView->slotOpenReport(reportid); @@ -536,7 +536,7 @@ void KMyMoneyView::closeFile(void) m_fileOpen = false; } -void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len) +void KMyMoneyView::ungetString(TQIODevice *qfile, char *buf, int len) { buf = &buf[len-1]; while(len--) { @@ -546,7 +546,7 @@ void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len) bool KMyMoneyView::readFile(const KURL& url) { - QString filename; + TQString filename; // newStorage(); m_fileOpen = false; @@ -583,7 +583,7 @@ bool KMyMoneyView::readFile(const KURL& url) } else { if(!KIO::NetAccess::download(url, filename, NULL)) { KMessageBox::detailedError(this, - i18n("Error while loading file '%1'!").arg(url.url()), + i18n("Error while loading file '%1'!").tqarg(url.url()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -592,26 +592,26 @@ bool KMyMoneyView::readFile(const KURL& url) // let's glimps into the file to figure out, if it's one // of the old (uncompressed) or new (compressed) files. - QFile file(filename); - QFileInfo info(file); + TQFile file(filename); + TQFileInfo info(file); if(!info.isFile()) { - QString msg=i18n("<b>%1</b> is not a KMyMoney file.").arg(filename); - KMessageBox::error(this, QString("<p>")+msg, i18n("Filetype Error")); + TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").tqarg(filename); + KMessageBox::error(this, TQString("<p>")+msg, i18n("Filetype Error")); return false; } m_fmode = 0600; - m_fmode |= info.permission(QFileInfo::ReadGroup) ? 040 : 0; - m_fmode |= info.permission(QFileInfo::WriteGroup) ? 020 : 0; - m_fmode |= info.permission(QFileInfo::ReadOther) ? 004 : 0; - m_fmode |= info.permission(QFileInfo::WriteOther) ? 002 : 0; + m_fmode |= info.permission(TQFileInfo::ReadGroup) ? 040 : 0; + m_fmode |= info.permission(TQFileInfo::WriteGroup) ? 020 : 0; + m_fmode |= info.permission(TQFileInfo::ReadOther) ? 004 : 0; + m_fmode |= info.permission(TQFileInfo::WriteOther) ? 002 : 0; - QIODevice *qfile = 0; + TQIODevice *qfile = 0; bool rc = true; // There's a problem with the KFilterDev and KGPGFile classes: // One supports the at(n) member but not ungetch() together with // readBlock() and the other does not provide an at(n) method but - // supports readBlock() that considers the ungetch() buffer. QFile + // supports readBlock() that considers the ungetch() buffer. TQFile // supports everything so this is not a problem. We solve the problem // for now by keeping track of which method can be used. bool haveAt = true; @@ -619,29 +619,29 @@ bool KMyMoneyView::readFile(const KURL& url) emit kmmFilePlugin (preOpen); ::timetrace("start reading file"); if(file.open(IO_ReadOnly)) { - QByteArray hdr(2); + TQByteArray hdr(2); int cnt; cnt = file.readBlock(hdr.data(), 2); file.close(); if(cnt == 2) { - if(QString(hdr) == QString("\037\213")) { // gzipped? + if(TQString(hdr) == TQString("\037\213")) { // gzipped? ::timetrace("detected GZIP"); qfile = KFilterDev::deviceForFile(filename, COMPRESSION_MIME_TYPE); - } else if(QString(hdr) == QString("--")){ // PGP ASCII armored? + } else if(TQString(hdr) == TQString("--")){ // PGP ASCII armored? ::timetrace("detected GPG"); if(KGPGFile::GPGAvailable()) { ::timetrace("have GPG"); - qfile = new KGPGFile(filename); + qfile = TQT_TQIODEVICE(new KGPGFile(filename)); haveAt = false; isEncrypted = true; } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").arg(filename))); - qfile = new QFile(file.name()); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").tqarg(filename))); + qfile = TQT_TQIODEVICE(new TQFile(file.name())); } } else { // we can't use file directly, as we delete qfile later on - qfile = new QFile(file.name()); + qfile = TQT_TQIODEVICE(new TQFile(file.name())); } ::timetrace("open file"); @@ -656,9 +656,9 @@ bool KMyMoneyView::readFile(const KURL& url) // Ok, we got the first block of 8 bytes. Read in the two // unsigned long int's by preserving endianess. This is - // achieved by reading them through a QDataStream object - Q_INT32 magic0, magic1; - QDataStream s(hdr, IO_ReadOnly); + // achieved by reading them through a TQDataStream object + TQ_INT32 magic0, magic1; + TQDataStream s(hdr, IO_ReadOnly); s >> magic0; s >> magic1; @@ -689,9 +689,9 @@ bool KMyMoneyView::readFile(const KURL& url) qfile->at(0); else ungetString(qfile, hdr.data(), 70); - QRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>"); - QRegExp gncexp("<gnc-v(\\d+)"); - QCString txt(hdr, 70); + TQRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>"); + TQRegExp gncexp("<gnc-v(\\d+)"); + TQCString txt(hdr, 70); if(kmyexp.search(txt) != -1) { ::timetrace("is XML format"); pReader = new MyMoneyStorageXML; @@ -714,18 +714,18 @@ bool KMyMoneyView::readFile(const KURL& url) ::timetrace("done reading to memory"); } else { if(m_fileType == KmmBinary) { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").tqarg(filename))); } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").tqarg(filename))); } rc = false; } } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").tqarg(filename))); rc = false; } } catch (MyMoneyException *e) { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").arg(filename, e->what()))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").tqarg(filename, e->what()))); delete e; rc = false; } @@ -735,13 +735,13 @@ bool KMyMoneyView::readFile(const KURL& url) } qfile->close(); } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); rc = false; } delete qfile; } } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); rc = false; } @@ -775,7 +775,7 @@ bool KMyMoneyView::readFile(const KURL& url) return initializeStorage(); } -void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const QString& name) const +void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const TQString& name) const { MyMoneyFile* file = MyMoneyFile::instance(); if(_acc.name() != name) { @@ -805,7 +805,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { retry = false; break; case 1: // permanent error - KMessageBox::detailedError (this, i18n("Can't open database %1\n").arg(dbURL.prettyURL()), reader->lastError()); + KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(dbURL.prettyURL()), reader->lastError()); if (pDBMgr) { removeStorage(); delete pDBMgr; @@ -819,7 +819,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { } return false; } else { - QString options = dbURL.queryItem("options") + ",override"; + TQString options = dbURL.queryItem("options") + ",override"; dbURL.removeQueryItem("mode"); // now redundant dbURL.removeQueryItem("options"); dbURL.addQueryItem("options", options); @@ -911,7 +911,7 @@ bool KMyMoneyView::initializeStorage() // Check if we have to modify the file before we allow to work with it IMyMoneyStorage* s = MyMoneyFile::instance()->storage(); while (s->fileFixVersion() < s->currentFixVersion()) { - qDebug("%s", (QString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data()); + qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(s->currentFixVersion())).data()); switch (s->fileFixVersion()) { case 0: fixFile_0(); @@ -967,11 +967,11 @@ bool KMyMoneyView::initializeStorage() return true; } -void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const QString& keyList) +void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const TQString& keyList) { - QIODevice *dev = qfile; + TQIODevice *dev = TQT_TQIODEVICE(qfile); KFilterBase *base = 0; - QIODevice *statusDevice = dev; + TQIODevice *statusDevice = dev; bool encryptedOk = true; bool encryptRecover = false; @@ -983,23 +983,23 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, if(KMyMoneyGlobalSettings::encryptRecover()) { encryptRecover = true; - if(!KGPGFile::keyAvailable(QString(RECOVER_KEY_ID))) { - KMessageBox::sorry(this, QString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").arg(RECOVER_KEY_ID), i18n("GPG-Key not found")); + if(!KGPGFile::keyAvailable(TQString(RECOVER_KEY_ID))) { + KMessageBox::sorry(this, TQString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").tqarg(RECOVER_KEY_ID), i18n("GPG-Key not found")); encryptRecover = false; } } - QStringList keys = QStringList::split(",", keyList); - QStringList::const_iterator it_s; + TQStringList keys = TQStringList::split(",", keyList); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.begin(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) { - KMessageBox::sorry(this, QString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").arg(*it_s), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").tqarg(*it_s), i18n("GPG-Key not found")); encryptedOk = false; } } if(encryptedOk == true) { - QString msg = QString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>."); + TQString msg = TQString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>."); if(KMessageBox::questionYesNo(this, msg, i18n("Store GPG encrypted"), KStdGuiItem::yes(), KStdGuiItem::no(), "StoreEncrypted") == KMessageBox::No) { encryptedOk = false; @@ -1007,7 +1007,7 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, } } - int mask = umask((~m_fmode) & 0777); + int tqmask = umask((~m_fmode) & 0777); bool blocked = MyMoneyFile::instance()->signalsBlocked(); MyMoneyFile::instance()->blockSignals(true); MyMoneyFileTransaction ft; @@ -1017,8 +1017,8 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, base++; KGPGFile *kgpg = new KGPGFile(qfile->name()); if(kgpg) { - QStringList keys = QStringList::split(",", keyList); - QStringList::const_iterator it_s; + TQStringList keys = TQStringList::split(",", keyList); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.end(); ++it_s) { kgpg->addRecipient((*it_s).latin1()); } @@ -1027,11 +1027,11 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, } MyMoneyFile::instance()->setValue("kmm-encryption-key", keyList); } - statusDevice = dev = kgpg; + statusDevice = dev = TQT_TQIODEVICE(kgpg); if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); } } else if(!plaintext) { @@ -1039,26 +1039,26 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, base = KFilterBase::findFilterByMimeType( COMPRESSION_MIME_TYPE ); if(base) { qfile->close(); - base->setDevice(qfile, false); + base->setDevice(TQT_TQIODEVICE(qfile), false); // we need to reopen the file to set the mode inside the filter stuff dev = new KFilterDev(base, true); if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); } statusDevice = base->device(); } } - umask(mask); + umask(tqmask); ft.commit(); pWriter->setProgressCallback(&KMyMoneyView::progressCallback); - dev->resetStatus(); + dev->resetqStatus(); pWriter->writeFile(dev, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())); MyMoneyFile::instance()->blockSignals(blocked); if(statusDevice->status() != IO_Ok) { - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); } pWriter->setProgressCallback(0); @@ -1067,16 +1067,16 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, dev->close(); if(statusDevice->status() != IO_Ok) { delete dev; - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); } delete dev; } else qfile->close(); } -bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) +bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) { - QString filename = url.path(); + TQString filename = url.path(); if (!fileOpen()) { KMessageBox::error(this, i18n("Tried to access a file when it's not open")); @@ -1090,7 +1090,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) "If you still want to use older versions of KMyMoney with your data files, " "please make sure you keep a backup-file of your finance data. " "If you want to abort this operation, please press Cancel now"), - QString::null, KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel) + TQString(), KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel) return false; #endif @@ -1115,19 +1115,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) bool rc = true; try { if(! url.isValid()) { - throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").arg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(url.url())); } if(url.isLocalFile()) { filename = url.path(); int fmode = 0600; gid_t gid = static_cast<gid_t>(-1); // don't change the group id (see "man 2 chown") - QFileInfo fi(filename); + TQFileInfo fi(filename); if(fi.exists()) { - fmode |= fi.permission(QFileInfo::ReadGroup) ? 040 : 0; - fmode |= fi.permission(QFileInfo::WriteGroup) ? 020 : 0; - fmode |= fi.permission(QFileInfo::ReadOther) ? 004 : 0; - fmode |= fi.permission(QFileInfo::WriteOther) ? 002 : 0; + fmode |= fi.permission(TQFileInfo::ReadGroup) ? 040 : 0; + fmode |= fi.permission(TQFileInfo::WriteGroup) ? 020 : 0; + fmode |= fi.permission(TQFileInfo::ReadOther) ? 004 : 0; + fmode |= fi.permission(TQFileInfo::WriteOther) ? 002 : 0; if(fi.groupId() != static_cast<uint>(-2)) gid = fi.groupId(); } @@ -1135,19 +1135,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) // create a new basic block here, so that the object qfile gets // deleted, before we reach the chown() call { - int mask = umask((~fmode) & 0777); + int tqmask = umask((~fmode) & 0777); KSaveFile qfile(filename, fmode); - umask(mask); + umask(tqmask); if(qfile.status() == 0) { try { saveToLocalFile(qfile.file(), pWriter, plaintext, keyList); } catch (MyMoneyException* e) { qfile.abort(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } else { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } chown(filename, static_cast<uid_t>(-1), gid); @@ -1155,7 +1155,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) KTempFile tmpfile; saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList); if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL)) - throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url())); tmpfile.unlink(); } m_fileType = KmmXML; @@ -1210,7 +1210,7 @@ bool KMyMoneyView::saveAsDatabase(const KURL& url) KMessageBox::detailedError (this, i18n("Can't open or create database %1\n" "Retry SaveAsDatabase and click Help" - " for further info").arg(url.prettyURL()), writer->lastError()); + " for further info").tqarg(url.prettyURL()), writer->lastError()); } delete writer; return (rc); @@ -1224,7 +1224,7 @@ bool KMyMoneyView::dirty(void) return MyMoneyFile::instance()->dirty(); } -bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance) +bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance) { bool ok = true; @@ -1249,7 +1249,7 @@ bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDat void KMyMoneyView::finishReconciliation(const MyMoneyAccount& /* account */) { - emit reconciliationStarts(MyMoneyAccount(), QDate(), MyMoneyMoney()); + emit reconciliationStarts(MyMoneyAccount(), TQDate(), MyMoneyMoney()); } void KMyMoneyView::newFile(void) @@ -1268,7 +1268,7 @@ void KMyMoneyView::slotSetBaseCurrency(const MyMoneySecurity& baseCurrency) MyMoneyFile::instance()->setBaseCurrency(baseCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(e->what()), i18n("Set base currency")); delete e; } } @@ -1282,15 +1282,15 @@ void KMyMoneyView::selectBaseCurrency(void) // check if we have a base currency. If not, we need to select one if(file->baseCurrency().id().isEmpty()) { KCurrencyEditDlg dlg(this, "CurrencyEditDlg"); - connect(&dlg, SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, SLOT(slotSetBaseCurrency(const MyMoneySecurity&))); + connect(&dlg, TQT_SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, TQT_SLOT(slotSetBaseCurrency(const MyMoneySecurity&))); dlg.exec(); } if(!file->baseCurrency().id().isEmpty()) { // check that all accounts have a currency - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; file->accountList(list); - QValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount>::Iterator it; // don't forget those standard accounts list << file->asset(); @@ -1370,7 +1370,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("BAM", i18n("Bosnian Convertible Mark")), create); loadDefaultCurrency(MyMoneySecurity("BWP", i18n("Botswana Pula")), create); loadDefaultCurrency(MyMoneySecurity("BRL", i18n("Brazilian Real"), "R$"), create); - loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("BND", i18n("Brunei Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("BGL", i18n("Bulgarian Lev")), create); loadDefaultCurrency(MyMoneySecurity("BIF", i18n("Burundi Franc")), create); @@ -1385,7 +1385,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("CNY", i18n("Chinese Yuan Renminbi")), create); loadDefaultCurrency(MyMoneySecurity("COP", i18n("Colombian Peso")), create); loadDefaultCurrency(MyMoneySecurity("KMF", i18n("Comoros Franc")), create); - loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), QChar(0x20A1)), create); + loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), TQChar(0x20A1)), create); loadDefaultCurrency(MyMoneySecurity("HRK", i18n("Croatian Kuna")), create); loadDefaultCurrency(MyMoneySecurity("CUP", i18n("Cuban Peso")), create); loadDefaultCurrency(MyMoneySecurity("CZK", i18n("Czech Koruna")), create); @@ -1393,18 +1393,18 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("DJF", i18n("Djibouti Franc")), create); loadDefaultCurrency(MyMoneySecurity("DOP", i18n("Dominican Peso")), create); loadDefaultCurrency(MyMoneySecurity("XCD", i18n("East Caribbean Dollar"), "$"), create); - loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("SVC", i18n("El Salvador Colon")), create); loadDefaultCurrency(MyMoneySecurity("ERN", i18n("Eritrean Nakfa")), create); loadDefaultCurrency(MyMoneySecurity("EEK", i18n("Estonian Kroon")), create); loadDefaultCurrency(MyMoneySecurity("ETB", i18n("Ethiopian Birr")), create); - loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), QChar(0x20ac)), true); - loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), TQChar(0x20ac)), true); + loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("FJD", i18n("Fiji Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("GMD", i18n("Gambian Dalasi")), create); loadDefaultCurrency(MyMoneySecurity("GEL", i18n("Georgian Lari")), create); loadDefaultCurrency(MyMoneySecurity("GHC", i18n("Ghanaian Cedi")), create); - loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("GTQ", i18n("Guatemalan Quetzal")), create); loadDefaultCurrency(MyMoneySecurity("GWP", i18n("Guinea-Bissau Peso")), create); loadDefaultCurrency(MyMoneySecurity("GYD", i18n("Guyanan Dollar"), "$"), create); @@ -1413,21 +1413,21 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("HKD", i18n("Hong Kong Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("HUF", i18n("Hungarian Forint"), "HUF", 1, 1, 100), create); loadDefaultCurrency(MyMoneySecurity("ISK", i18n("Iceland Krona")), create); - loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), QChar(0x20A8)), create); + loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), TQChar(0x20A8)), create); loadDefaultCurrency(MyMoneySecurity("IDR", i18n("Indonesian Rupiah"), "IDR", 100, 1), create); loadDefaultCurrency(MyMoneySecurity("IRR", i18n("Iranian Rial"), "IRR", 1, 1), create); loadDefaultCurrency(MyMoneySecurity("IQD", i18n("Iraqi Dinar"), "IQD", 1000, 1000), create); - loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), QChar(0x20AA)), create); + loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), TQChar(0x20AA)), create); loadDefaultCurrency(MyMoneySecurity("JMD", i18n("Jamaican Dollar"), "$"), create); - loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), QChar(0x00A5), 100, 1), create); + loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), TQChar(0x00A5), 100, 1), create); loadDefaultCurrency(MyMoneySecurity("JOD", i18n("Jordanian Dinar"), "JOD", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("KZT", i18n("Kazakhstan Tenge")), create); loadDefaultCurrency(MyMoneySecurity("KES", i18n("Kenyan Shilling")), create); loadDefaultCurrency(MyMoneySecurity("KWD", i18n("Kuwaiti Dinar"), "KWD", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("KGS", i18n("Kyrgyzstan Som")), create); - loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), QChar(0x20AD)), create); + loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), TQChar(0x20AD)), create); loadDefaultCurrency(MyMoneySecurity("LVL", i18n("Latvian Lats")), create); - loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("LSL", i18n("Lesotho Loti")), create); loadDefaultCurrency(MyMoneySecurity("LRD", i18n("Liberian Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("LYD", i18n("Libyan Dinar"), "LYD", 1000, 1000), create); @@ -1443,7 +1443,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("MUR", i18n("Mauritius Rupee")), create); loadDefaultCurrency(MyMoneySecurity("MXN", i18n("Mexican Peso"), "$"), create); loadDefaultCurrency(MyMoneySecurity("MDL", i18n("Moldavian Leu")), create); - loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), QChar(0x20AE)), create); + loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), TQChar(0x20AE)), create); loadDefaultCurrency(MyMoneySecurity("MAD", i18n("Moroccan Dirham")), create); loadDefaultCurrency(MyMoneySecurity("MZM", i18n("Mozambique Metical")), create); loadDefaultCurrency(MyMoneySecurity("MMK", i18n("Myanmar Kyat")), create); @@ -1451,8 +1451,8 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("NPR", i18n("Nepalese Rupee")), create); loadDefaultCurrency(MyMoneySecurity("NZD", i18n("New Zealand Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("NIC", i18n("Nicaraguan Cordoba Oro")), create); - loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), QChar(0x20A6)), create); - loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), QChar(0x20A9)), create); + loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), TQChar(0x20A6)), create); + loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), TQChar(0x20A9)), create); loadDefaultCurrency(MyMoneySecurity("NOK", i18n("Norwegian Kroner"), "kr"), create); loadDefaultCurrency(MyMoneySecurity("OMR", i18n("Omani Rial"), "OMR", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("PKR", i18n("Pakistan Rupee")), create); @@ -1460,9 +1460,9 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("PGK", i18n("Papua New Guinea Kina")), create); loadDefaultCurrency(MyMoneySecurity("PYG", i18n("Paraguay Guarani")), create); loadDefaultCurrency(MyMoneySecurity("PEN", i18n("Peruvian Nuevo Sol")), create); - loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), QChar(0x20B1)), create); + loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), TQChar(0x20B1)), create); loadDefaultCurrency(MyMoneySecurity("PLN", i18n("Polish Zloty")), create); - loadDefaultCurrency(MyMoneySecurity("QAR", i18n("Qatari Rial")), create); + loadDefaultCurrency(MyMoneySecurity("TQAR", i18n("Qatari Rial")), create); loadDefaultCurrency(MyMoneySecurity("RON", i18n("Romanian Leu (new)")), true); loadDefaultCurrency(MyMoneySecurity("RUB", i18n("Russian Ruble")), true); loadDefaultCurrency(MyMoneySecurity("RWF", i18n("Rwanda Franc")), create); @@ -1477,19 +1477,19 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("SBD", i18n("Solomon Islands Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("SOS", i18n("Somali Shilling")), create); loadDefaultCurrency(MyMoneySecurity("ZAR", i18n("South African Rand")), create); - loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), QChar(0x20A9)), create); + loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), TQChar(0x20A9)), create); loadDefaultCurrency(MyMoneySecurity("LKR", i18n("Sri Lanka Rupee")), create); - loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("SDD", i18n("Sudanese Dinar")), create); loadDefaultCurrency(MyMoneySecurity("SRG", i18n("Suriname Guilder")), create); loadDefaultCurrency(MyMoneySecurity("SZL", i18n("Swaziland Lilangeni")), create); loadDefaultCurrency(MyMoneySecurity("SEK", i18n("Swedish Krona")), create); loadDefaultCurrency(MyMoneySecurity("CHF", i18n("Swiss Franc"), "SFr"), create); - loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("TWD", i18n("Taiwan Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("TJS", i18n("Tajikistan Somani")), create); loadDefaultCurrency(MyMoneySecurity("TZS", i18n("Tanzanian Shilling")), create); - loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), QChar(0x0E3F)), create); + loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), TQChar(0x0E3F)), create); loadDefaultCurrency(MyMoneySecurity("TOP", i18n("Tongan Pa'anga")), create); loadDefaultCurrency(MyMoneySecurity("TTD", i18n("Trinidad and Tobago Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("TND", i18n("Tunisian Dinar"), "TND", 1000, 1000), create); @@ -1503,7 +1503,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("UZS", i18n("Uzbekistani Sum")), create); loadDefaultCurrency(MyMoneySecurity("VUV", i18n("Vanuatu Vatu")), create); loadDefaultCurrency(MyMoneySecurity("VEB", i18n("Venezuelan Bolivar")), create); - loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), QChar(0x20AB)), create); + loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), TQChar(0x20AB)), create); loadDefaultCurrency(MyMoneySecurity("YUM", i18n("Yugoslav Dinar")), create); loadDefaultCurrency(MyMoneySecurity("ZMK", i18n("Zambian Kwacha")), create); loadDefaultCurrency(MyMoneySecurity("ZWD", i18n("Zimbabwe Dollar"), "$"), create); @@ -1514,7 +1514,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("XAG", i18n("Silver"), "XAG", 1, 1000000), create); } -void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, const QString& sym, const QDate& date, const MyMoneyMoney& rate, const QString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) +void KMyMoneyView::loadAncientCurrency(const TQString& id, const TQString& name, const TQString& sym, const TQDate& date, const MyMoneyMoney& rate, const TQString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyPrice price(id, newId, date, rate, "KMyMoney"); @@ -1544,34 +1544,34 @@ void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, c void KMyMoneyView::loadAncientCurrencies(void) { - loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", QDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR"); - loadAncientCurrency("DEM", i18n("German Mark"), "DM", QDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR"); - loadAncientCurrency("FRF", i18n("French Franc"), "FF", QDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR"); - loadAncientCurrency("ITL", i18n("Italian Lira"), QChar(0x20A4), QDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR"); - loadAncientCurrency("ESP", i18n("Spanish Peseta"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR"); - loadAncientCurrency("NLG", i18n("Dutch Guilder"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR"); - loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); - loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); - loadAncientCurrency("PTE", i18n("Portuguese Escudo"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR"); - loadAncientCurrency("IEP", i18n("Irish Pound"), QChar(0x00A3), QDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR"); - loadAncientCurrency("FIM", i18n("Finnish Markka"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR"); - loadAncientCurrency("GRD", i18n("Greek Drachma"), QChar(0x20AF), QDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR"); + loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", TQDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR"); + loadAncientCurrency("DEM", i18n("German Mark"), "DM", TQDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR"); + loadAncientCurrency("FRF", i18n("French Franc"), "FF", TQDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR"); + loadAncientCurrency("ITL", i18n("Italian Lira"), TQChar(0x20A4), TQDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR"); + loadAncientCurrency("ESP", i18n("Spanish Peseta"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR"); + loadAncientCurrency("NLG", i18n("Dutch Guilder"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR"); + loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); + loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); + loadAncientCurrency("PTE", i18n("Portuguese Escudo"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR"); + loadAncientCurrency("IEP", i18n("Irish Pound"), TQChar(0x00A3), TQDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR"); + loadAncientCurrency("FIM", i18n("Finnish Markka"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR"); + loadAncientCurrency("GRD", i18n("Greek Drachma"), TQChar(0x20AF), TQDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR"); - loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", QDate(2005,6,30), MyMoneyMoney(1, 10000), "RON"); + loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", TQDate(2005,6,30), MyMoneyMoney(1, 10000), "RON"); - loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", QDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB"); + loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", TQDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB"); - loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", QDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR"); + loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", TQDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR"); // Source: http://www.tf-portfoliosolutions.net/products/turkishlira.aspx - loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", QDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY"); + loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", TQDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY"); // Source: http://www.focus.de/finanzen/news/malta-und-zypern_aid_66058.html - loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", QDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); - loadAncientCurrency("CYP", i18n("Cyprus Pound"), QString("C%1").arg(QChar(0x00A3)), QDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); + loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", TQDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); + loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); // Source: http://www.focus.de/finanzen/news/waehrungszone-slowakei-ist-neuer-euro-staat_aid_359025.html - loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", QDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); + loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", TQDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); } void KMyMoneyView::viewUp(void) @@ -1580,7 +1580,7 @@ void KMyMoneyView::viewUp(void) return; } -void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/) +void KMyMoneyView::viewAccountList(const TQString& /*selectAccount*/) { if(pageIndex(m_accountsViewFrame) != activePageIndex()) showPage(1); @@ -1591,13 +1591,13 @@ void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/) void KMyMoneyView::slotRefreshViews() { // turn off sync between ledger and investment view - disconnect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&))); - disconnect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&))); + disconnect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + disconnect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); // TODO turn sync between ledger and investment view if selected by user if(KMyMoneyGlobalSettings::syncLedgerInvestment()) { - connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); } showTitleBar(KMyMoneyGlobalSettings::showTitleBar()); @@ -1623,12 +1623,12 @@ void KMyMoneyView::slotShowTransactionDetail(bool detailed) } -void KMyMoneyView::progressCallback(int current, int total, const QString& msg) +void KMyMoneyView::progressCallback(int current, int total, const TQString& msg) { kmymoney2->progressCallback(current, total, msg); } -void KMyMoneyView::slotRememberPage(QWidget* w) +void KMyMoneyView::slotRememberPage(TQWidget* w) { KConfig *config = KGlobal::config(); config->setGroup("Last Use Settings"); @@ -1645,22 +1645,22 @@ void KMyMoneyView::fixFile_2(void) MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyTransactionFilter filter; filter.setReportAllSplits( false ); - QValueList<MyMoneyTransaction> transactionList; + TQValueList<MyMoneyTransaction> transactionList; file->transactionList(transactionList, filter); // scan the transactions and modify transactions with two splits // which reference an account and a category to have the memo text // of the account. - QValueList<MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneyTransaction>::Iterator it_t; int count = 0; for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) { if((*it_t).splitCount() == 2) { - QString accountId; - QString categoryId; - QString accountMemo; - QString categoryMemo; - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQString accountId; + TQString categoryId; + TQString accountMemo; + TQString categoryMemo; + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyAccount acc = file->account((*it_s).accountId()); if(acc.isIncomeExpense()) { @@ -1688,23 +1688,23 @@ void KMyMoneyView::fixFile_2(void) void KMyMoneyView::fixFile_1(void) { - // we need to fix reports. If the account filter list contains + // we need to fix reports. If the account filter list tqcontains // investment accounts, we need to add the stock accounts to the list // as well if we don't have the expert mode enabled if(!KMyMoneyGlobalSettings::expertMode()) { try { - QValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); - QValueList<MyMoneyReport>::iterator it_r; + TQValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); + TQValueList<MyMoneyReport>::iterator it_r; for(it_r = reports.begin(); it_r != reports.end(); ++it_r) { - QStringList list; + TQStringList list; (*it_r).accounts(list); - QStringList missing; - QStringList::const_iterator it_a, it_b; + TQStringList missing; + TQStringList::const_iterator it_a, it_b; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.contains(*it_b)) { + if(!list.tqcontains(*it_b)) { missing.append(*it_b); } } @@ -1724,20 +1724,20 @@ void KMyMoneyView::fixFile_1(void) #if 0 if(!m_accountsView->allItemsSelected()) { // retrieve a list of selected accounts - QStringList list; + TQStringList list; m_accountsView->selectedItems(list); // if we're not in expert mode, we need to make sure // that all stock accounts for the selected investment // account are also selected if(!KMyMoneyGlobalSettings::expertMode()) { - QStringList missing; - QStringList::const_iterator it_a, it_b; + TQStringList missing; + TQStringList::const_iterator it_a, it_b; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.contains(*it_b)) { + if(!list.tqcontains(*it_b)) { missing.append(*it_b); } } @@ -1764,13 +1764,13 @@ void KMyMoneyView::fixFile_0(void) */ MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accountList; + TQValueList<MyMoneyAccount> accountList; file->accountList(accountList); ::timetrace("Have account list"); - QValueList<MyMoneyAccount>::Iterator it_a; - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneyAccount>::Iterator it_a; + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); ::timetrace("Have schedule list"); - QValueList<MyMoneySchedule>::Iterator it_s; + TQValueList<MyMoneySchedule>::Iterator it_s; MyMoneyAccount equity = file->equity(); MyMoneyAccount asset = file->asset(); @@ -1784,15 +1784,15 @@ void KMyMoneyView::fixFile_0(void) } // until early before 0.8 release, the equity account was not saved to // the file. If we have an equity account with no sub-accounts but - // find and equity account that has equity() as it's parent, we reparent + // find and equity account that has equity() as it's tqparent, we reparent // this account. Need to move it to asset() first, because otherwise // MyMoneyFile::reparent would act as NOP. if(equityListEmpty && (*it_a).accountType() == MyMoneyAccount::Equity) { - if((*it_a).parentAccountId() == equity.id()) { + if((*it_a).tqparentAccountId() == equity.id()) { MyMoneyAccount acc = *it_a; - // tricky, force parent account to be empty so that we really - // can re-parent it - acc.setParentAccountId(QString()); + // tricky, force tqparent account to be empty so that we really + // can re-tqparent it + acc.setParentAccountId(TQString()); file->reparentAccount(acc, equity); kdDebug(2) << __func__ << " fixed account " << acc.id() << " reparented to " << equity.id() << endl; } @@ -1812,8 +1812,8 @@ void KMyMoneyView::fixFile_0(void) void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched) { MyMoneyTransaction t = sched.transaction(); - QValueList<MyMoneySplit> splitList = t.splits(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit> splitList = t.splits(); + TQValueList<MyMoneySplit>::ConstIterator it_s; bool updated = false; try { @@ -1844,7 +1844,7 @@ void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched) if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) { kdDebug(2) << __func__ << " " << sched.id() << " " << (*it_s).id() << " should be 'not reconciled'" << endl; MyMoneySplit split = *it_s; - split.setReconcileDate(QDate()); + split.setReconcileDate(TQDate()); split.setReconcileFlag(MyMoneySplit::NotReconciled); t.modifySplit(split); updated = true; @@ -1884,7 +1884,7 @@ void KMyMoneyView::fixLoanAccount_0(MyMoneyAccount acc) i18n("The account \"%1\" was previously created as loan account but some information " "is missing. The new loan wizard will be started to collect all relevant " "information. Please use a KMyMoney version >= 0.8.7 and < 0.9 to correct the problem." - ).arg(acc.name()), + ).tqarg(acc.name()), i18n("Account problem")); throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore"); @@ -1911,7 +1911,7 @@ void KMyMoneyView::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n // to the account pool. Note: the schedule code used to leave // this always the first split, but the loan code leaves it as // the second one. So I thought, searching is a good alternative .... - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId().isEmpty()) { MyMoneySplit s = (*it_s); @@ -1952,16 +1952,16 @@ void KMyMoneyView::fixTransactions_0(void) #endif ::timetrace("fixTransactions: get schedule list"); - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); ::timetrace("fixTransactions: get transaction list"); MyMoneyTransactionFilter filter; filter.setReportAllSplits( false ); - QValueList<MyMoneyTransaction> transactionList; + TQValueList<MyMoneyTransaction> transactionList; file->transactionList(transactionList, filter); ::timetrace("fixTransactions: have list"); - QValueList<MyMoneySchedule>::Iterator it_x; - QStringList interestAccounts; + TQValueList<MyMoneySchedule>::Iterator it_x; + TQStringList interestAccounts; KMSTATUS(i18n("Fix transactions")); kmymoney2->slotStatusProgressBar(0, scheduleList.count() + transactionList.count()); @@ -1970,12 +1970,12 @@ void KMyMoneyView::fixTransactions_0(void) // scan the schedules to find interest accounts for(it_x = scheduleList.begin(); it_x != scheduleList.end(); ++it_x) { MyMoneyTransaction t = (*it_x).transaction(); - QValueList<MyMoneySplit>::ConstIterator it_s; - QStringList accounts; + TQValueList<MyMoneySplit>::ConstIterator it_s; + TQStringList accounts; bool hasDuplicateAccounts = false; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { - if(accounts.contains((*it_s).accountId())) { + if(accounts.tqcontains((*it_s).accountId())) { hasDuplicateAccounts = true; kdDebug(2) << __func__ << " " << t.id() << " has multiple splits with account " << (*it_s).accountId() << endl; } else { @@ -1983,7 +1983,7 @@ void KMyMoneyView::fixTransactions_0(void) } if((*it_s).action() == MyMoneySplit::ActionInterest) { - if(interestAccounts.contains((*it_s).accountId()) == 0) { + if(interestAccounts.tqcontains((*it_s).accountId()) == 0) { interestAccounts << (*it_s).accountId(); } } @@ -1998,12 +1998,12 @@ void KMyMoneyView::fixTransactions_0(void) ::timetrace("fixTransactions: start loop"); // scan the transactions and modify loan transactions - QValueList<MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneyTransaction>::Iterator it_t; for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) { const char *defaultAction = 0; - QValueList<MyMoneySplit> splits = (*it_t).splits(); - QValueList<MyMoneySplit>::Iterator it_s; - QStringList accounts; + TQValueList<MyMoneySplit> splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::Iterator it_s; + TQStringList accounts; // check if base commodity is set. if not, set baseCurrency if((*it_t).commodity().isEmpty()) { @@ -2091,14 +2091,14 @@ void KMyMoneyView::fixTransactions_0(void) // and check if there are any duplicates in this transactions for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyAccount splitAccount = file->account((*it_s).accountId()); - if(accounts.contains((*it_s).accountId())) { + if(accounts.tqcontains((*it_s).accountId())) { hasDuplicateAccounts = true; } else { accounts << (*it_s).accountId(); } // if this split references an interest account, the action // must be of type ActionInterest - if(interestAccounts.contains((*it_s).accountId())) { + if(interestAccounts.tqcontains((*it_s).accountId())) { if((*it_s).action() != MyMoneySplit::ActionInterest) { kdDebug(2) << __func__ << " " << (*it_t).id() << " contains an interest account (" << (*it_s).accountId() << ") but does not have ActionInterest" << endl; (*it_s).setAction(MyMoneySplit::ActionInterest); @@ -2175,10 +2175,10 @@ void KMyMoneyView::slotPrintView(void) m_homeView->slotPrintView(); } -KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& icon) +KMyMoneyViewBase* KMyMoneyView::addPage(const TQString& title, const TQString& icon) { const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16; - QFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize)); + TQFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize)); return new KMyMoneyViewBase(frm, title.latin1(), title); } @@ -2189,8 +2189,8 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -2202,30 +2202,30 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico class KMyMoneyViewBase::Private { public: - QFrame* m_titleLine; + TQFrame* m_titleLine; KMyMoneyTitleLabel* m_titleLabel; - QVBoxLayout* m_viewLayout; + TQVBoxLayout* m_viewLayout; }; -KMyMoneyViewBase::KMyMoneyViewBase(QWidget* parent, const char* name, const QString& title) : - QWidget(parent, name), +KMyMoneyViewBase::KMyMoneyViewBase(TQWidget* tqparent, const char* name, const TQString& title) : + TQWidget(tqparent, name), d(new Private) { - d->m_viewLayout = new QVBoxLayout(this); + d->m_viewLayout = new TQVBoxLayout(this); d->m_viewLayout->setSpacing( 6 ); d->m_viewLayout->setMargin( 0 ); d->m_titleLabel = new KMyMoneyTitleLabel( this, "titleLabel" ); - d->m_titleLabel->setMinimumSize( QSize( 100, 30 ) ); + d->m_titleLabel->setMinimumSize( TQSize( 100, 30 ) ); d->m_titleLabel->setRightImageFile("pics/titlelabel_background.png" ); d->m_titleLabel->setText(title); d->m_viewLayout->addWidget( d->m_titleLabel ); #if 0 - d->m_titleLine = new QFrame( this, "titleLine" ); - d->m_titleLine->setFrameShape( QFrame::HLine ); - d->m_titleLine->setFrameShadow( QFrame::Sunken ); - d->m_titleLine->setFrameShape( QFrame::HLine ); + d->m_titleLine = new TQFrame( this, "titleLine" ); + d->m_titleLine->setFrameShape( TQFrame::HLine ); + d->m_titleLine->setFrameShadow( TQFrame::Sunken ); + d->m_titleLine->setFrameShape( TQFrame::HLine ); d->m_viewLayout->addWidget( d->m_titleLine ); #endif } @@ -2235,12 +2235,12 @@ KMyMoneyViewBase::~KMyMoneyViewBase() delete d; } -void KMyMoneyViewBase::addWidget(QWidget* w) +void KMyMoneyViewBase::addWidget(TQWidget* w) { d->m_viewLayout->addWidget(w); } -QVBoxLayout* KMyMoneyViewBase::layout(void) const +TQVBoxLayout* KMyMoneyViewBase::tqlayout(void) const { return d->m_viewLayout; } diff --git a/kmymoney2/views/kmymoneyview.h b/kmymoney2/views/kmymoneyview.h index 13e3d76..e1c1266 100644 --- a/kmymoney2/views/kmymoneyview.h +++ b/kmymoney2/views/kmymoneyview.h @@ -24,10 +24,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -class QVBox; -class QFile; -class QVBoxLayout; +#include <tqwidget.h> +class TQVBox; +class TQFile; +class TQVBoxLayout; // ---------------------------------------------------------------------------- // KDE Includes @@ -65,7 +65,7 @@ class TransactionEditor; class KForecastView; /** - * This class represents the view of the MyMoneyFile which contains + * This class represents the view of the MyMoneyFile which tqcontains * Banks/Accounts/Transactions, Recurring transactions (or Bills & Deposits) * and scripts (yet to be implemented). Each different aspect of the file * is represented by a tab within the view. @@ -77,6 +77,7 @@ class KForecastView; class KMyMoneyView : public KJanusWidget { Q_OBJECT + TQ_OBJECT public: enum viewID { @@ -127,17 +128,17 @@ private: KReportsView* m_reportsView; KForecastView* m_forecastView; - QVBox* m_homeViewFrame; - QVBox* m_accountsViewFrame; - QVBox* m_institutionsViewFrame; - QVBox* m_categoriesViewFrame; - QVBox* m_payeesViewFrame; - QVBox* m_budgetViewFrame; - QVBox* m_scheduleViewFrame; - QVBox* m_ledgerViewFrame; - QVBox* m_investmentViewFrame; - QVBox* m_reportsViewFrame; - QVBox* m_forecastViewFrame; + TQVBox* m_homeViewFrame; + TQVBox* m_accountsViewFrame; + TQVBox* m_institutionsViewFrame; + TQVBox* m_categoriesViewFrame; + TQVBox* m_payeesViewFrame; + TQVBox* m_budgetViewFrame; + TQVBox* m_scheduleViewFrame; + TQVBox* m_ledgerViewFrame; + TQVBox* m_investmentViewFrame; + TQVBox* m_reportsViewFrame; + TQVBox* m_forecastViewFrame; bool m_inConstructor; @@ -161,9 +162,9 @@ private: fileTypeE m_fileType; private: - void addTitleBar(QWidget* parent, const QString& title); + void addTitleBar(TQWidget* tqparent, const TQString& title); - void ungetString(QIODevice *qfile, char * buf, int len); + void ungetString(TQIODevice *qfile, char * buf, int len); /** * This method creates the currency @p curr if it does not exist and @@ -180,7 +181,7 @@ private: /** * */ - void loadAncientCurrency(const QString& id, const QString& name, const QString& sym, const QDate& date, const MyMoneyMoney& rate, const QString& newId, const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0); + void loadAncientCurrency(const TQString& id, const TQString& name, const TQString& sym, const TQDate& date, const MyMoneyMoney& rate, const TQString& newId, const int partsPerUnit = 100, const int smallestCashFraction = 100, const int smallestAccountFraction = 0); /** * if no base currency is defined, start the dialog and force it to be set @@ -200,9 +201,9 @@ private: */ void removeStorage(void); - void viewAccountList(const QString& selectAccount); // Show the accounts view + void viewAccountList(const TQString& selectAccount); // Show the accounts view - static void progressCallback(int current, int total, const QString&); + static void progressCallback(int current, int total, const TQString&); /** */ @@ -222,14 +223,14 @@ private: void createSchedule(MyMoneySchedule s, MyMoneyAccount& a); - void checkAccountName(const MyMoneyAccount& acc, const QString& name) const; + void checkAccountName(const MyMoneyAccount& acc, const TQString& name) const; public: /** * The constructor for KMyMoneyView. Just creates all the tabs for the * different aspects of the MyMoneyFile. */ - KMyMoneyView(QWidget *parent=0, const char *name=0); + KMyMoneyView(TQWidget *tqparent=0, const char *name=0); /** * Destructor @@ -266,14 +267,14 @@ public: * * @param url The URL to save into. * If no protocol is specified, file:// is assumed. - * @param keyList QString containing a comma separated list of keys + * @param keyList TQString containing a comma separated list of keys * to be used for encryption. If @p keyList is empty, * the file will be saved unencrypted (the default) * * @retval false save operation failed * @retval true save operation was successful */ - bool saveFile(const KURL& url, const QString& keyList = QString()); + bool saveFile(const KURL& url, const TQString& keyList = TQString()); /** * Saves the data into permanent storage on a new or empty SQL database. * @@ -340,9 +341,9 @@ public: */ void enableViews(int state = -1); - KMyMoneyViewBase* addPage(const QString& title, const QString& icon = QString()); + KMyMoneyViewBase* addPage(const TQString& title, const TQString& icon = TQString()); - void addWidget(QWidget* w); + void addWidget(TQWidget* w); virtual bool showPage(int index); @@ -357,7 +358,7 @@ public: * @retval true Yes, view allows to create a transaction (tooltip is not changed) * @retval false No, view cannot to create a transaction (tooltip is updated with message) */ - bool canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; /** * check if the current view allows to modify (edit/delete) the selected transactions @@ -370,9 +371,9 @@ public: * @retval true Yes, view allows to edit/delete transactions (tooltip is not changed) * @retval false No, view cannot edit/delete transactions (tooltip is updated with message) */ - bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; - bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; /** * check if the current view allows to edit the selected transactions @@ -385,7 +386,7 @@ public: * @retval true Yes, view allows to enter/edit transactions * @retval false No, view cannot enter/edit transactions */ - bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const; + bool canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const; /** * check if the current view allows to print something @@ -410,7 +411,7 @@ public: * @retval true Reconciliation started * @retval false Account cannot be reconciled */ - bool startReconciliation(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance); + bool startReconciliation(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance); /** * Used to finish reconciliation of account @a account. It switches the @@ -437,7 +438,7 @@ public slots: * * @param widget pointer to page widget */ - void slotRememberPage(QWidget* widget); + void slotRememberPage(TQWidget* widget); /** * Brings up a dialog to change the list(s) settings and saves them into the @@ -445,7 +446,7 @@ public slots: * * @see KListSettingsDlg * Refreshs all views. Used e.g. after settings have been changed or - * data has been loaded from external sources (QIF import). + * data has been loaded from external sources (TQIF import). **/ void slotRefreshViews(); @@ -457,7 +458,7 @@ public slots: * @param acc The ID of the account to be shown * @param transaction The ID of the transaction to be selected */ - void slotLedgerSelected(const QString& acc, const QString& transaction = QString()); + void slotLedgerSelected(const TQString& acc, const TQString& transaction = TQString()); /** * Called, whenever the payees view should pop up and a specific @@ -467,7 +468,7 @@ public slots: * @param accountId The ID of the account to be shown * @param transactionId The ID of the transaction to be selected */ - void slotPayeeSelected(const QString& payeeId, const QString& accountId, const QString& transactionId); + void slotPayeeSelected(const TQString& payeeId, const TQString& accountId, const TQString& transactionId); /** * Called, whenever the schedule view should pop up and a specific @@ -475,7 +476,7 @@ public slots: * * @param schedule The ID of the schedule to be shown */ - void slotScheduleSelected(const QString& schedule); + void slotScheduleSelected(const TQString& schedule); /** * Called, whenever the report view should pop up and a specific @@ -483,7 +484,7 @@ public slots: * * @param reportid The ID of the report to be shown */ - void slotShowReport(const QString& reportid); + void slotShowReport(const TQString& reportid); /** * Same as the above, but the caller passes in an actual report @@ -546,15 +547,15 @@ private: * the final destination is reached over a network * protocol (e.g. FTP) * - * @param qf pointer to QFile representing the opened file + * @param qf pointer to TQFile representing the opened file * @param writer pointer to the formatter * @param plaintext whether to override any compression & encryption settings - * @param keyList QString containing a comma separated list of keys to be used for encryption + * @param keyList TQString containing a comma separated list of keys to be used for encryption * If @p keyList is empty, the file will be saved unencrypted * * @note This method will close the file when it is written. */ - void saveToLocalFile(QFile* qf, IMyMoneyStorageFormat* writer, bool plaintext=false, const QString& keyList = QString()); + void saveToLocalFile(TQFile* qf, IMyMoneyStorageFormat* writer, bool plaintext=false, const TQString& keyList = TQString()); /** * Internal method used by slotAccountNew() and slotAccountCategory(). @@ -587,7 +588,7 @@ signals: * @param endingBalance collected ending balance when reconciliation starts * 0 otherwise */ - void reconciliationStarts(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance); + void reconciliationStarts(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance); }; @@ -595,16 +596,17 @@ signals: * This class is an abstract base class that all specific views * should be based on. */ -class KMyMoneyViewBase : public QWidget +class KMyMoneyViewBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMyMoneyViewBase(QWidget* parent, const char *name, const QString& title); + KMyMoneyViewBase(TQWidget* tqparent, const char *name, const TQString& title); virtual ~KMyMoneyViewBase(); - void setTitle(const QString& title); - QVBoxLayout* layout(void) const; - void addWidget(QWidget* w); + void setTitle(const TQString& title); + TQVBoxLayout* tqlayout(void) const; + void addWidget(TQWidget* w); /** * This method is used to edit the currently selected transactions @@ -614,7 +616,7 @@ public: * @retval false view was not capable to edit transactions * @retval true view was capable to edit the transactions and did so */ - bool editTransactions(const QValueList<MyMoneyTransaction>& transactions) const { Q_UNUSED(transactions) return false; } + bool editTransactions(const TQValueList<MyMoneyTransaction>& transactions) const { Q_UNUSED(transactions) return false; } private: /// \internal d-pointer class. class Private; diff --git a/kmymoney2/views/kpayeesview.cpp b/kmymoney2/views/kpayeesview.cpp index ad17ff4..83c7e8f 100644 --- a/kmymoney2/views/kpayeesview.cpp +++ b/kmymoney2/views/kpayeesview.cpp @@ -25,22 +25,22 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qtabwidget.h> -#include <qcursor.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpainter.h> -#include <qheader.h> -#include <qbuttongroup.h> -#include <qsplitter.h> -#include <qmap.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqtabwidget.h> +#include <tqcursor.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpainter.h> +#include <tqheader.h> +#include <tqbuttongroup.h> +#include <tqsplitter.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -70,7 +70,7 @@ /* KTransactionPtrVector */ /* -------------------------------------------------------------------------------*/ -int KTransactionPtrVector::compareItems(const QString& s1, const QString& s2) const +int KTransactionPtrVector::compareItems(const TQString& s1, const TQString& s2) const { if(s1 == s2) return 0; @@ -99,7 +99,7 @@ int KTransactionPtrVector::compareItems(KTransactionPtrVector::Item d1, KTransac s2 = t2->splitByPayee(m_id); break; } - QString p1, p2; + TQString p1, p2; switch(m_sortType) { case SortValue: @@ -245,13 +245,13 @@ void KTransactionPtrVector::setSortType(const TransactionSortE type) sort(); } -void KTransactionPtrVector::setAccountId(const QString& id) +void KTransactionPtrVector::setAccountId(const TQString& id) { m_id = id; m_idMode = AccountMode; } -void KTransactionPtrVector::setPayeeId(const QString& id) +void KTransactionPtrVector::setPayeeId(const TQString& id) { m_id = id; m_idMode = PayeeMode; @@ -260,8 +260,8 @@ void KTransactionPtrVector::setPayeeId(const QString& id) // *** KPayeeListItem Implementation *** -KPayeeListItem::KPayeeListItem(KListView *parent, const MyMoneyPayee& payee) : - KListViewItem(parent), +KPayeeListItem::KPayeeListItem(KListView *tqparent, const MyMoneyPayee& payee) : + KListViewItem(tqparent), m_payee(payee) { setText(0, payee.name()); @@ -273,22 +273,22 @@ KPayeeListItem::~KPayeeListItem() { } -void KPayeeListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void KPayeeListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if(isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); p->setFont(KMyMoneyGlobalSettings::listCellFont()); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } -KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* parent, const QString& accountId, const QString& transactionId) : - KListViewItem(view, parent) +KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* tqparent, const TQString& accountId, const TQString& transactionId) : + KListViewItem(view, tqparent) { m_accountId = accountId; m_transactionId = transactionId; @@ -298,14 +298,14 @@ KTransactionListItem::~KTransactionListItem() { } -void KTransactionListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KTransactionListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg = cg; - _cg.setColor(QColorGroup::Base, backgroundColor()); - QListViewItem::paintCell(p, _cg, column, width, alignment); + TQColorGroup _cg = cg; + _cg.setColor(TQColorGroup::Base, backgroundColor()); + TQListViewItem::paintCell(p, _cg, column, width, tqalignment); } -const QColor KTransactionListItem::backgroundColor(void) +const TQColor KTransactionListItem::backgroundColor(void) { return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor(); } @@ -315,30 +315,30 @@ const QColor KTransactionListItem::backgroundColor(void) // *** KPayeesView Implementation *** -KPayeesView::KPayeesView(QWidget *parent, const char *name ) : - KPayeesViewDecl(parent,name), +KPayeesView::KPayeesView(TQWidget *tqparent, const char *name ) : + KPayeesViewDecl(tqparent,name), m_needReload(false), m_needConnection(true), m_updatesQueued(0), m_inSelection(false) { // create the searchline widget - // and insert it into the existing layout + // and insert it into the existing tqlayout m_searchWidget = new KListViewSearchLineWidget(m_payeesList, this); - m_searchWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + m_searchWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); KPayeesViewDeclLayout->insertWidget(0, m_searchWidget); - m_splitter = new QSplitter(this); - m_payeesList->reparent(m_splitter, QPoint(0,0), true); - m_tabWidget->reparent(m_splitter, QPoint(0, 0), true); - m_splitter->setResizeMode(m_tabWidget, QSplitter::Stretch); + m_splitter = new TQSplitter(this); + m_payeesList->reparent(m_splitter, TQPoint(0,0), true); + m_tabWidget->reparent(m_splitter, TQPoint(0, 0), true); + m_splitter->setResizeMode(m_tabWidget, TQSplitter::Stretch); m_splitter->setOpaqueResize(); - layout10->addWidget(m_splitter); + tqlayout10->addWidget(m_splitter); // use the size settings of the last run (if any) KConfig *config = KGlobal::config(); config->setGroup("Last Use Settings"); - QValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize"); + TQValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize"); if(sizes.size() == 2) { if(!sizes[0] || !sizes[1]) { sizes[0] = 1; @@ -348,10 +348,10 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) : } m_transactionView->setSorting(-1); - m_transactionView->setColumnWidthMode(2, QListView::Manual); - m_transactionView->setColumnAlignment(3, Qt::AlignRight); + m_transactionView->setColumnWidthMode(2, TQListView::Manual); + m_transactionView->setColumnAlignment(3, TQt::AlignRight); // never show horizontal scroll bars - m_transactionView->setHScrollBarMode(QScrollView::AlwaysOff); + m_transactionView->setHScrollBarMode(TQScrollView::AlwaysOff); m_payeesList->addColumn(i18n("Name")); @@ -366,44 +366,44 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) : KIconLoader* il = KGlobal::iconLoader(); KGuiItem updateButtenItem( i18n("Update"), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it"), i18n("Use this to accept the modified data.")); m_updateButton->setGuiItem(updateButtenItem); - connect(m_payeesList, SIGNAL(selectionChanged()), this, SLOT(slotSelectPayee())); - connect(m_payeesList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenamePayee(QListViewItem*,int,const QString&))); + connect(m_payeesList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectPayee())); + connect(m_payeesList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenamePayee(TQListViewItem*,int,const TQString&))); - connect(addressEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged())); - connect(postcodeEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(telephoneEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(emailEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(notesEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged())); - connect(matchKeyEditList, SIGNAL(changed()), this, SLOT(slotKeyListChanged())); + connect(addressEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged())); + connect(postcodeEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(telephoneEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(emailEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(notesEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged())); + connect(matchKeyEditList, TQT_SIGNAL(changed()), this, TQT_SLOT(slotKeyListChanged())); - connect(radioNoMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(radioNameMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(radioKeyMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(checkMatchIgnoreCase, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); + connect(radioNoMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(radioNameMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(radioKeyMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(checkMatchIgnoreCase, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); - connect(checkEnableDefaultAccount, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(comboDefaultAccount, SIGNAL(accountSelected(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(buttonSelectMyAccount, SIGNAL(clicked()), this, SLOT(slotChooseDefaultAccount())); + connect(checkEnableDefaultAccount, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(comboDefaultAccount, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(buttonSelectMyAccount, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChooseDefaultAccount())); - connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdatePayee())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdatePayee())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); - connect(m_payeesList, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&))); + connect(m_payeesList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&))); -// connect(m_payeesList, SIGNAL(rightButtonClicked(QListViewItem* , const QPoint&, int)), -// this, SLOT(slotOpenContextMenu(QListViewItem*))); +// connect(m_payeesList, TQT_SIGNAL(rightButtonClicked(TQListViewItem* , const TQPoint&, int)), +// this, TQT_SLOT(slotOpenContextMenu(TQListViewItem*))); - connect(m_transactionView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotTransactionDoubleClicked(QListViewItem*))); + connect(m_transactionView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotTransactionDoubleClicked(TQListViewItem*))); - connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(rearrange(void))); + connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(rearrange(void))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadPayees())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadPayees())); } KPayeesView::~KPayeesView() @@ -419,7 +419,7 @@ void KPayeesView::slotQueueUpdate(void) m_updatesQueued++; // The KListViewSearchLineWidget has an internal timer for update purposes // of 200 ms, so we should be safe with 250 ms here - QTimer::singleShot(250, this, SLOT(slotActivateUpdate())); + TQTimer::singleShot(250, this, TQT_SLOT(slotActivateUpdate())); } void KPayeesView::slotActivateUpdate(void) @@ -432,20 +432,20 @@ void KPayeesView::slotActivateUpdate(void) void KPayeesView::slotChooseDefaultAccount(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QMap<QString,int> account_count; + TQMap<TQString,int> account_count; for (int i = 0; i < m_transactionPtrVector.size(); ++i) { KMyMoneyTransaction* t = m_transactionPtrVector[i]; MyMoneySplit s = t->splitById(t->splitId()); const MyMoneyAccount& acc = file->account(s.accountId()); - QString txt; + TQString txt; if (s.action() != MyMoneySplit::ActionAmortization && acc.accountType() != MyMoneyAccount::AssetLoan && !file->isTransfer(*t) && t->splitCount() == 2) { MyMoneySplit s0 = t->splitByAccount(s.accountId(), false); - if (account_count.contains(s0.accountId())) { + if (account_count.tqcontains(s0.accountId())) { account_count[s0.accountId()]++; } else { @@ -454,7 +454,7 @@ void KPayeesView::slotChooseDefaultAccount(void) } } - QMapIterator<QString,int> most_frequent, iter; + TQMapIterator<TQString,int> most_frequent, iter; most_frequent = account_count.end(); for (iter = account_count.begin(); iter != account_count.end(); iter++) { if (iter.data() > most_frequent.data()) { @@ -470,19 +470,19 @@ void KPayeesView::slotChooseDefaultAccount(void) void KPayeesView::slotStartRename(void) { - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; if((it_v = it_l.current()) != 0) { it_v->startRename(0); } } // This variant is only called when a single payee is selected and renamed. -void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QString& txt) +void KPayeesView::slotRenamePayee(TQListViewItem* p , int /* col */, const TQString& txt) { //kdDebug() << "[KPayeesView::slotRenamePayee]" << endl; // create a copy of the new name without appended whitespaces - QString new_name = txt.stripWhiteSpace(); + TQString new_name = txt.stripWhiteSpace(); if (m_payee.name() != new_name) { MyMoneyFileTransaction ft; try { @@ -495,7 +495,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin if (KMessageBox::questionYesNo(this, i18n("A payee with the name '%1' already exists. It is not advisable to have " "multiple payees with the same identification name. Are you sure you would like " - "to rename the payee?").arg(new_name)) != KMessageBox::Yes) + "to rename the payee?").tqarg(new_name)) != KMessageBox::Yes) { p->setText(0,m_payee.name()); return; @@ -521,7 +521,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -530,9 +530,9 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin } } -void KPayeesView::ensurePayeeVisible(const QString& id) +void KPayeesView::ensurePayeeVisible(const TQString& id) { - for (QListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) { + for (TQListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) { KPayeeListItem* p = dynamic_cast<KPayeeListItem*>(item); if(p && p->payee().id() == id) { if(p->itemAbove()) @@ -548,10 +548,10 @@ void KPayeesView::ensurePayeeVisible(const QString& id) } } -void KPayeesView::selectedPayees(QValueList<MyMoneyPayee>& payeesList) const +void KPayeesView::selectedPayees(TQValueList<MyMoneyPayee>& payeesList) const { - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected | QListViewItemIterator::Visible); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -565,8 +565,8 @@ void KPayeesView::slotSelectPayee(void) // check if the content of a currently selected payee was modified // and ask to store the data if (m_updateButton->isEnabled()) { - if (KMessageBox::questionYesNo(this, QString("<qt>%1</qt>").arg( - i18n("Do you want to save the changes for <b>%1</b>?").arg(m_newName)), + if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg( + i18n("Do you want to save the changes for <b>%1</b>?").tqarg(m_newName)), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdatePayee(); @@ -576,7 +576,7 @@ void KPayeesView::slotSelectPayee(void) // loop over all payees and count the number of payees, also // optain last selected payee - QValueList<MyMoneyPayee> payeesList; + TQValueList<MyMoneyPayee> payeesList; selectedPayees(payeesList); emit selectObjects(payeesList); @@ -593,18 +593,18 @@ void KPayeesView::slotSelectPayee(void) m_tabWidget->setEnabled(false); // disable tab widget clearItemData(); // disable renaming in all listviewitem - for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) + for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) i->setRenameEnabled(0, false); return; } // otherwise we have just one selected, enable payee information widget m_tabWidget->setEnabled(true); // enable renaming in all listviewitem - for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) + for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) i->setRenameEnabled(0, true); // as of now we are updating only the last selected payee, and until - // selection mode of the QListView has been changed to Extended, this + // selection mode of the TQListView has been changed to Extended, this // will also be the only selection and behave exactly as before - Andreas try { m_payee = payeesList[0]; @@ -620,7 +620,7 @@ void KPayeesView::slotSelectPayee(void) emailEdit->setText(m_payee.email()); notesEdit->setText(m_payee.notes()); - QStringList keys; + TQStringList keys; bool ignorecase = false; MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); @@ -646,11 +646,11 @@ void KPayeesView::slotSelectPayee(void) void KPayeesView::clearItemData(void) { - addressEdit->setText(QString()); - postcodeEdit->setText(QString()); - telephoneEdit->setText(QString()); - emailEdit->setText(QString()); - notesEdit->setText(QString()); + addressEdit->setText(TQString()); + postcodeEdit->setText(TQString()); + telephoneEdit->setText(TQString()); + emailEdit->setText(TQString()); + notesEdit->setText(TQString()); showTransactions(); } @@ -664,16 +664,16 @@ void KPayeesView::showTransactions(void) m_transactionView->clear(); if(m_payee.id().isEmpty() || !m_tabWidget->isEnabled()) { - m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); return; } // setup the list and the pointer vector MyMoneyTransactionFilter filter; filter.addPayee(m_payee.id()); - filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), QDate()); + filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), TQDate()); - QValueList<MyMoneyTransaction> list = file->transactionList(filter); + TQValueList<MyMoneyTransaction> list = file->transactionList(filter); m_transactionList.clear(); m_transactionPtrVector.clear(); @@ -681,8 +681,8 @@ void KPayeesView::showTransactions(void) m_transactionPtrVector.setPayeeId(m_payee.id()); m_transactionPtrVector.setSortType(KTransactionPtrVector::SortPostDate); - QValueList<MyMoneyTransaction>::ConstIterator it_t; - QString lastId; + TQValueList<MyMoneyTransaction>::ConstIterator it_t; + TQString lastId; int ofs = 0; for(i = 0, it_t = list.begin(); it_t != list.end(); ++it_t) { @@ -699,7 +699,7 @@ void KPayeesView::showTransactions(void) MyMoneyAccount acc = MyMoneyFile::instance()->account(filter.matchingSplits()[ofs].accountId()); if(acc.accountGroup() == MyMoneyAccount::Asset || acc.accountGroup() == MyMoneyAccount::Liability) { - QValueList<KMyMoneyTransaction>::ConstIterator it_k; + TQValueList<KMyMoneyTransaction>::ConstIterator it_k; it_k = m_transactionList.append(k); balance += k.splitById(k.splitId()).value(); m_transactionPtrVector.insert(i, &(*it_k)); @@ -723,28 +723,28 @@ void KPayeesView::showTransactions(void) item->setText(0, s.number()); item->setText(1, KGlobal::locale()->formatDate(t->postDate(), true)); - QString txt; + TQString txt; if(s.action() == MyMoneySplit::ActionAmortization) { if(acc.accountType() == MyMoneyAccount::Loan) { if(s.value().isPositive()) { - txt = i18n("Amortization of %1").arg(acc.name()); + txt = i18n("Amortization of %1").tqarg(acc.name()); } else { - txt = i18n("Payment to %1").arg(acc.name()); + txt = i18n("Payment to %1").tqarg(acc.name()); } } else if(acc.accountType() == MyMoneyAccount::AssetLoan) { if(s.value().isNegative()) { - txt = i18n("Amortization of %1").arg(acc.name()); + txt = i18n("Amortization of %1").tqarg(acc.name()); } else { - txt = i18n("Payment to %1").arg(acc.name()); + txt = i18n("Payment to %1").tqarg(acc.name()); } } else { - txt = i18n("Loan payment from %1").arg(acc.name()); + txt = i18n("Loan payment from %1").tqarg(acc.name()); } } else if (file->isTransfer(*t)) { if(!s.value().isNegative()) { - txt = i18n("Transfer to %1").arg(acc.name()); + txt = i18n("Transfer to %1").tqarg(acc.name()); } else { - txt = i18n("Transfer from %1").arg(acc.name()); + txt = i18n("Transfer from %1").tqarg(acc.name()); } } else if(t->splitCount() > 2) { txt = i18n("Split transaction (category replacement)", "Split transaction"); @@ -755,7 +755,7 @@ void KPayeesView::showTransactions(void) item->setText(2, txt); item->setText(3, s.value().formatMoney(acc.fraction())); } - m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); // Trick: it seems, that the initial sizing of the view does // not work correctly. At least, the columns do not get displayed @@ -763,14 +763,14 @@ void KPayeesView::showTransactions(void) // is incorrect. If the widget is visible, resizing works correctly. // So, we let the dialog show up and resize it then. It's not really // clean, but the only way I got the damned thing working. - QTimer::singleShot(50, this, SLOT(rearrange())); + TQTimer::singleShot(50, this, TQT_SLOT(rearrange())); } void KPayeesView::slotKeyListChanged(void) { bool rc = false; bool ignorecase = false; - QStringList keys; + TQStringList keys; // J.Rodehueser: delete unused variable 'type' // orig: MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); m_payee.matchData(ignorecase, keys); @@ -801,7 +801,7 @@ void KPayeesView::slotPayeeDataChanged(void) || (!notesEdit->text().isEmpty() && m_payee.notes() != notesEdit->text())); bool ignorecase = false; - QStringList keys; + TQStringList keys; MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); rc |= (static_cast<int>(type) != m_matchType->selectedId()); @@ -831,7 +831,7 @@ void KPayeesView::slotPayeeDataChanged(void) rc |= !m_payee.defaultAccountId().isEmpty(); } else { - QString temp = comboDefaultAccount->selectedAccounts().front(); + TQString temp = comboDefaultAccount->selectedAccounts().front(); rc |= ( temp.isEmpty() != m_payee.defaultAccountId().isEmpty()) || (!m_payee.defaultAccountId().isEmpty() && temp != m_payee.defaultAccountId()); } @@ -860,7 +860,7 @@ void KPayeesView::slotUpdatePayee(void) m_payee.setDefaultAccountId(); if (checkEnableDefaultAccount->isChecked()) { - QString temp; + TQString temp; if (!comboDefaultAccount->selectedAccounts().empty()) { temp = comboDefaultAccount->selectedAccounts().front(); m_payee.setDefaultAccountId(temp); @@ -872,7 +872,7 @@ void KPayeesView::slotUpdatePayee(void) } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -882,7 +882,7 @@ void KPayeesView::readConfig(void) { m_transactionView->setFont(KMyMoneyGlobalSettings::listCellFont()); - QFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() ); int height = fm.lineSpacing()+6; m_transactionView->header()->setMinimumHeight(height); @@ -890,7 +890,7 @@ void KPayeesView::readConfig(void) m_transactionView->header()->setFont(KMyMoneyGlobalSettings::listHeaderFont()); m_payeesList->setDefaultRenameAction( - KMyMoneyGlobalSettings::focusChangeIsEnter() ? QListView::Accept : QListView::Reject); + KMyMoneyGlobalSettings::focusChangeIsEnter() ? TQListView::Accept : TQListView::Reject); //initialize the account list? comboDefaultAccount->loadList((KMyMoneyUtils::categoryTypeE)(KMyMoneyUtils::asset | KMyMoneyUtils::liability | MyMoneyAccount::Income | MyMoneyAccount::Expense)); @@ -904,7 +904,7 @@ void KPayeesView::show(void) // If you want to learn about the details, see the source of KListViewSearchLineWidget's // constructor if(m_needConnection) { - connect(m_searchWidget->searchLine(), SIGNAL(textChanged(const QString&)), this, SLOT(slotQueueUpdate(void))); + connect(m_searchWidget->searchLine(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotQueueUpdate(void))); m_needConnection = false; } @@ -913,13 +913,13 @@ void KPayeesView::show(void) m_needReload = false; } - // fixup the layout - QTimer::singleShot(0, this, SLOT(rearrange())); + // fixup the tqlayout + TQTimer::singleShot(0, this, TQT_SLOT(rearrange())); // don't forget base class implementation KPayeesViewDecl::show(); - QValueList<MyMoneyPayee> list; + TQValueList<MyMoneyPayee> list; selectedPayees(list); emit selectObjects(list); } @@ -928,7 +928,7 @@ void KPayeesView::slotLoadPayees(void) { if(isVisible()) { if(m_inSelection) - QTimer::singleShot(0, this, SLOT(slotLoadPayees())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadPayees())); else loadPayees(); } else { @@ -941,15 +941,15 @@ void KPayeesView::loadPayees(void) if(m_inSelection) return; - QMap<QString, bool> isSelected; - QString id; + TQMap<TQString, bool> isSelected; + TQString id; ::timetrace("Start KPayeesView::loadPayees"); readConfig(); // remember which items are selected in the list - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -963,7 +963,7 @@ void KPayeesView::loadPayees(void) id = currentItem->payee().id(); // remember the upper left corner of the viewport - QPoint startPoint = m_payeesList->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_payeesList->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_payeesList->setUpdatesEnabled(false); @@ -973,8 +973,8 @@ void KPayeesView::loadPayees(void) m_transactionView->clear(); currentItem = 0; - QValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList(); - QValueList<MyMoneyPayee>::ConstIterator it; + TQValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList(); + TQValueList<MyMoneyPayee>::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { KPayeeListItem* item = new KPayeeListItem(m_payeesList, *it); @@ -991,11 +991,11 @@ void KPayeesView::loadPayees(void) // reposition viewport m_payeesList->setContentsPos(startPoint.x(), startPoint.y()); - m_searchWidget->searchLine()->updateSearch(QString::null); + m_searchWidget->searchLine()->updateSearch(TQString()); // turn updates back on m_payeesList->setUpdatesEnabled(true); - m_payeesList->repaintContents(); + m_payeesList->tqrepaintContents(); slotSelectPayee(); @@ -1007,7 +1007,7 @@ void KPayeesView::rearrange(void) resizeEvent(0); } -void KPayeesView::resizeEvent(QResizeEvent* ev) +void KPayeesView::resizeEvent(TQResizeEvent* ev) { // resize the register int w = m_transactionView->visibleWidth(); @@ -1023,14 +1023,14 @@ void KPayeesView::resizeEvent(QResizeEvent* ev) KPayeesViewDecl::resizeEvent(ev); } -void KPayeesView::slotTransactionDoubleClicked(QListViewItem* i) +void KPayeesView::slotTransactionDoubleClicked(TQListViewItem* i) { KTransactionListItem* item = static_cast<KTransactionListItem *>(i); if (item) emit transactionSelected(item->accountId(), item->transactionId()); } -void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QString& accountId, const QString& transactionId) +void KPayeesView::slotSelectPayeeAndTransaction(const TQString& payeeId, const TQString& accountId, const TQString& transactionId) { if(!isVisible()) return; @@ -1041,8 +1041,8 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS m_searchWidget->searchLine()->updateSearch(); // deselect all other selected items - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -1051,7 +1051,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS } // find the payee in the list - QListViewItem* it; + TQListViewItem* it; for(it = m_payeesList->firstChild(); it; it = it->itemBelow()) { KPayeeListItem* item = dynamic_cast<KPayeeListItem *>(it); if(item && item->payee().id() == payeeId) { @@ -1088,7 +1088,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS } } -void KPayeesView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p) +void KPayeesView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p) { Q_UNUSED(p); if(lv == m_payeesList) { diff --git a/kmymoney2/views/kpayeesview.h b/kmymoney2/views/kpayeesview.h index 92f98fd..f4a481e 100644 --- a/kmymoney2/views/kpayeesview.h +++ b/kmymoney2/views/kpayeesview.h @@ -29,8 +29,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -class QSplitter; +#include <tqwidget.h> +class TQSplitter; // ---------------------------------------------------------------------------- // KDE Includes @@ -57,7 +57,7 @@ class KListViewSearchLineWidget; * vector is created, the sort method is set to SortPostDate. * The sort type can be changed using the method setSortType(). */ -class KTransactionPtrVector : public QPtrVector<KMyMoneyTransaction> { +class KTransactionPtrVector : public TQPtrVector<KMyMoneyTransaction> { public: /** * This enumerator defines the possible sort methods. @@ -111,20 +111,20 @@ public: * get information about the split referencing the current account * during the sort phase. */ - void setAccountId(const QString& id); + void setAccountId(const TQString& id); /** * This method is used to set the payee id to have a chance to * get information about the split referencing the current payee * during the sort phase. */ - void setPayeeId(const QString& id); + void setPayeeId(const TQString& id); protected: int compareItems(KTransactionPtrVector::Item d1, KTransactionPtrVector::Item d2); private: - int compareItems(const QString& s1, const QString& s2) const; + int compareItems(const TQString& s1, const TQString& s2) const; private: enum { @@ -132,7 +132,7 @@ private: PayeeMode }; short m_idMode; - QString m_id; + TQString m_id; TransactionSortE m_sortType; }; @@ -147,20 +147,20 @@ public: /** * Constructor to be used to construct a payee entry object. * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param payee const reference to MyMoneyPayee for which * the KListView entry is constructed */ - KPayeeListItem(KListView *parent, const MyMoneyPayee& payee); + KPayeeListItem(KListView *tqparent, const MyMoneyPayee& payee); ~KPayeeListItem(); /** - * This method is re-implemented from QListViewItem::paintCell(). - * Besides the standard implementation, the QPainter is set + * This method is re-implemented from TQListViewItem::paintCell(). + * Besides the standard implementation, the TQPainter is set * according to the applications settings. */ - void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); const MyMoneyPayee& payee(void) const { return m_payee; }; @@ -175,48 +175,49 @@ private: class KTransactionListItem : public KListViewItem { public: - KTransactionListItem(KListView* view, KTransactionListItem* parent, const QString& accountId, const QString& transaction); + KTransactionListItem(KListView* view, KTransactionListItem* tqparent, const TQString& accountId, const TQString& transaction); ~KTransactionListItem(); - const QString& transactionId(void) const { return m_transactionId; }; + const TQString& transactionId(void) const { return m_transactionId; }; - const QString& accountId(void) const { return m_accountId; }; + const TQString& accountId(void) const { return m_accountId; }; /** * use my own paint method */ - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); /** * use my own backgroundColor method */ - const QColor backgroundColor(); + const TQColor backgroundColor(); private: - QString m_transactionId; - QString m_accountId; + TQString m_transactionId; + TQString m_accountId; }; class KPayeesView : public KPayeesViewDecl { Q_OBJECT + TQ_OBJECT public: - KPayeesView(QWidget *parent=0, const char *name=0); + KPayeesView(TQWidget *tqparent=0, const char *name=0); ~KPayeesView(); void show(void); public slots: - void slotSelectPayeeAndTransaction(const QString& payeeId, const QString& accountId = QString(), const QString& transactionId = QString()); + void slotSelectPayeeAndTransaction(const TQString& payeeId, const TQString& accountId = TQString(), const TQString& transactionId = TQString()); void slotLoadPayees(void); void slotStartRename(void); void slotHelp(void); protected: - void resizeEvent(QResizeEvent*); + void resizeEvent(TQResizeEvent*); void loadPayees(void); - void selectedPayees(QValueList<MyMoneyPayee>& payeesList) const; - void ensurePayeeVisible(const QString& id); + void selectedPayees(TQValueList<MyMoneyPayee>& payeesList) const; + void ensurePayeeVisible(const TQString& id); void clearItemData(void); protected slots: @@ -244,7 +245,7 @@ protected slots: * This slot is called when the name of a payee is changed inside * the payee list view and only a single payee is selected. */ - void slotRenamePayee(QListViewItem *p, int col, const QString& txt); + void slotRenamePayee(TQListViewItem *p, int col, const TQString& txt); /** * Updates the payee data in m_payee from the information in the @@ -252,7 +253,7 @@ protected slots: */ void slotUpdatePayee(void); - void slotTransactionDoubleClicked(QListViewItem *); + void slotTransactionDoubleClicked(TQListViewItem *); private slots: void rearrange(void); @@ -265,7 +266,7 @@ private slots: * @param item the item on which the cursor resides * @param p position of the pointer device */ - void slotOpenContextMenu(KListView* lv, QListViewItem* item, const QPoint& p); + void slotOpenContextMenu(KListView* lv, TQListViewItem* item, const TQPoint& p); void slotQueueUpdate(void); @@ -277,20 +278,20 @@ private: void readConfig(void); signals: - void transactionSelected(const QString& accountId, const QString& transactionId); + void transactionSelected(const TQString& accountId, const TQString& transactionId); void openContextMenu(const MyMoneyObject& obj); - void selectObjects(const QValueList<MyMoneyPayee>& payees); + void selectObjects(const TQValueList<MyMoneyPayee>& payees); private: MyMoneyPayee m_payee; - QString m_newName; + TQString m_newName; - QSplitter* m_splitter; + TQSplitter* m_splitter; /** * This member holds a list of all transactions */ - QValueList<KMyMoneyTransaction> m_transactionList; + TQValueList<KMyMoneyTransaction> m_transactionList; /** * This member keeps a vector of pointers to all visible (filtered) diff --git a/kmymoney2/views/kpayeesviewdecl.ui b/kmymoney2/views/kpayeesviewdecl.ui index 3584e6f..0c2705e 100644 --- a/kmymoney2/views/kpayeesviewdecl.ui +++ b/kmymoney2/views/kpayeesviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KPayeesViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KPayeesViewDecl</cstring> </property> @@ -19,9 +19,9 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -52,7 +52,7 @@ <bool>false</bool> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tabWidget</cstring> </property> @@ -64,7 +64,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -75,7 +75,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>transactionGroup</cstring> </property> @@ -92,7 +92,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout11</cstring> </property> @@ -161,14 +161,14 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_balanceLabel</cstring> </property> <property name="text"> <string>Balance: </string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -178,7 +178,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>tab</cstring> </property> @@ -189,7 +189,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>detailsGroup</cstring> </property> @@ -206,7 +206,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> @@ -218,7 +218,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -228,7 +228,7 @@ <string>E-Mail:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -240,7 +240,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -250,7 +250,7 @@ <string>Postal Code:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> @@ -262,7 +262,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -272,7 +272,7 @@ <string>Telephone/Fax:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel4_2</cstring> </property> @@ -284,7 +284,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -293,26 +293,26 @@ <property name="text"> <string>Notes</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>postcodeEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>telephoneEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>emailEdit</cstring> </property> </widget> - <widget class="QMultiLineEdit" row="0" column="1"> + <widget class="TQMultiLineEdit" row="0" column="1"> <property name="name"> <cstring>addressEdit</cstring> </property> @@ -325,7 +325,7 @@ </sizepolicy> </property> </widget> - <widget class="QMultiLineEdit" row="4" column="1"> + <widget class="TQMultiLineEdit" row="4" column="1"> <property name="name"> <cstring>notesEdit</cstring> </property> @@ -338,7 +338,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> @@ -350,7 +350,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>90</width> <height>0</height> @@ -359,7 +359,7 @@ <property name="text"> <string>Address:</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop|AlignLeft</set> </property> </widget> @@ -375,7 +375,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -384,7 +384,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage</cstring> </property> @@ -395,14 +395,14 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> <property name="title"> <string>Transaction Matching</string> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>m_matchType</cstring> </property> @@ -426,7 +426,7 @@ <property name="exclusive"> <bool>true</bool> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioNoMatch</cstring> </property> @@ -445,7 +445,7 @@ <bool>true</bool> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioNameMatch</cstring> </property> @@ -461,7 +461,7 @@ <string>Match on Payee name</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>radioKeyMatch</cstring> </property> @@ -498,7 +498,7 @@ <string>This list contains the names that will match this payee if a transaction is imported from an external source. Keep in mind, that you can specify regular expressions here.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkMatchIgnoreCase</cstring> </property> @@ -516,7 +516,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -525,7 +525,7 @@ </spacer> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>TabPage2</cstring> </property> @@ -536,7 +536,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>checkEnableDefaultAccount</cstring> </property> @@ -545,15 +545,15 @@ new transactions with this payee</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>labelDefaultAccount</cstring> </property> @@ -586,7 +586,7 @@ new transactions with this payee</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -598,9 +598,9 @@ new transactions with this payee</string> </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -632,7 +632,7 @@ new transactions with this payee</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>260</width> <height>21</height> @@ -662,5 +662,5 @@ new transactions with this payee</string> <includes> <include location="local" impldecl="in declaration">../widgets/kmymoneyaccountcombo.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/views/kreportsview.cpp b/kmymoney2/views/kreportsview.cpp index 6c7da52..36de4c9 100755 --- a/kmymoney2/views/kreportsview.cpp +++ b/kmymoney2/views/kreportsview.cpp @@ -30,22 +30,22 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qdatetime.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qclipboard.h> -#include <qapplication.h> -#include <qprinter.h> -#include <qpainter.h> -#include <qfile.h> -#include <qtimer.h> -#include <qiconset.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtooltip.h> -#include <qcheckbox.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqdatetime.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqclipboard.h> +#include <tqapplication.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqfile.h> +#include <tqtimer.h> +#include <tqiconset.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> +#include <tqcheckbox.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -86,12 +86,12 @@ using namespace reports; * KReportsView::KReportTab Implementation */ -KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& report ): - QWidget( parent, "reporttab" ), +KReportsView::KReportTab::KReportTab(KTabWidget* tqparent, const MyMoneyReport& report ): + TQWidget( tqparent, "reporttab" ), m_part( new KHTMLPart( this, "reporttabpart" ) ), m_chartView( new KReportChartView( this, "reportchart" ) ), m_control( new kMyMoneyReportControlDecl( this, "reportcontrol" ) ), - m_layout( new QVBoxLayout( this, 11, 6, "reporttablayout" ) ), + m_layout( new TQVBoxLayout( this, 11, 6, "reporttabtqlayout" ) ), m_report( report ), m_deleteMe( false ), m_showingChart( false ), @@ -105,20 +105,20 @@ KReportsView::KReportTab::KReportTab(KTabWidget* parent, const MyMoneyReport& re m_control->buttonChart->hide(); } - m_chartView->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + m_chartView->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); m_chartView->hide(); - m_layout->addWidget( m_control ); //, 0, Qt::AlignTop ); + m_layout->addWidget( m_control ); //, 0, TQt::AlignTop ); m_layout->addWidget( m_part->view() ); m_layout->addWidget( m_chartView ); // I like this icon... - QString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png"); + TQString icon = KGlobal::dirs()->findResource("icon", "default.kde/16x16/mimetypes/spreadsheet.png"); // but if it's not there, we'll use ye ol' standard icon - if ( icon == QString::null ) + if ( icon == TQString() ) icon = KGlobal::dirs()->findResource("icon", "hicolor/16x16/apps/kmymoney2.png"); - parent->insertTab( this, QIconSet(QPixmap(icon)), report.name() ); - parent->setTabEnabled( this, true ); + tqparent->insertTab( this, TQIconSet(TQPixmap(icon)), report.name() ); + tqparent->setTabEnabled( this, true ); #ifdef HAVE_KDCHART if ( m_report.isChartByDefault() ) @@ -139,29 +139,29 @@ void KReportsView::KReportTab::print(void) void KReportsView::KReportTab::copyToClipboard(void) { - QTextDrag* pdrag = new QTextDrag( createTable() ); + TQTextDrag* pdrag = new TQTextDrag( createTable() ); pdrag->setSubtype("html"); - QApplication::clipboard()->setData(pdrag); + TQApplication::tqclipboard()->setData(pdrag); } -void KReportsView::KReportTab::saveAs( const QString& filename, bool includeCSS ) +void KReportsView::KReportTab::saveAs( const TQString& filename, bool includeCSS ) { - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_WriteOnly ) ) { - if ( QFileInfo(filename).extension(false).lower() == "csv") + if ( TQFileInfo(filename).extension(false).lower() == "csv") { - QTextStream(&file) << m_table->renderCSV(); + TQTextStream(&file) << m_table->renderCSV(); } else { - QTextStream stream(&file); + TQTextStream stream(&file); - QRegExp exp(QString("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").arg(KGlobal::locale()->encoding())); - QString table = createTable(); + TQRegExp exp(TQString("(.*)(<link.*css\" href=)\"(.*)\">(<meta.*%1\" />)(.*)").tqarg(KGlobal::locale()->encoding())); + TQString table = createTable(); if(exp.search(table) != -1 && includeCSS) { - QFile cssFile(exp.cap(3)); + TQFile cssFile(exp.cap(3)); if(cssFile.open(IO_ReadOnly)) { - QTextStream cssStream(&cssFile); + TQTextStream cssStream(&cssFile); stream << exp.cap(1); stream << exp.cap(4); stream << endl << "<style type=\"text/css\">" << endl << "<!--" << endl; @@ -195,7 +195,7 @@ void KReportsView::KReportTab::show(void) m_needReload = false; updateReport(); } - QWidget::show(); + TQWidget::show(); } void KReportsView::KReportTab::updateReport(void) @@ -230,24 +230,24 @@ void KReportsView::KReportTab::updateReport(void) m_chartView->update(); } -QString KReportsView::KReportTab::createTable(const QString& links) +TQString KReportsView::KReportTab::createTable(const TQString& links) { - QString filename; + TQString filename; if(!MyMoneyFile::instance()->value("reportstylesheet").isEmpty()) - filename = KGlobal::dirs()->findResource("appdata", QString("html/%1").arg(MyMoneyFile::instance()->value("reportstylesheet"))); + filename = KGlobal::dirs()->findResource("appdata", TQString("html/%1").tqarg(MyMoneyFile::instance()->value("reportstylesheet"))); if(filename.isEmpty()) filename = KGlobal::dirs()->findResource("appdata", "html/kmymoney2.css"); - QString header = QString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") + - QString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").arg(filename); + TQString header = TQString("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">\n") + + TQString("<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"%1\">").tqarg(filename); - header += QString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").arg(KGlobal::locale()->encoding()); + header += TQString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%1\" />").tqarg(KGlobal::locale()->encoding()); header += KMyMoneyUtils::variableCSS(); header += "</head><body>\n"; - QString footer = "</body></html>\n"; + TQString footer = "</body></html>\n"; - QString html; + TQString html; try { html += header; html += links; @@ -260,7 +260,7 @@ QString KReportsView::KReportTab::createTable(const QString& links) { kdDebug(2) << "KReportsView::KReportTab::createTable(): ERROR " << e->what() << endl; - QString error = QString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).arg(e->what()); + TQString error = TQString(i18n("There was an error creating your report: \"%1\".\nPlease report this error to the developer's list: kmymoney2-developer@lists.sourceforge.net")).tqarg(e->what()); KMessageBox::error(this, error, i18n("Critical Error")); @@ -285,7 +285,7 @@ void KReportsView::KReportTab::toggleChart(void) m_chartView->hide(); m_control->buttonChart->setText( i18n( "Chart" ) ); - QToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) ); + TQToolTip::add( m_control->buttonChart, i18n( "Show the chart version of this report" ) ); } else { @@ -293,7 +293,7 @@ void KReportsView::KReportTab::toggleChart(void) m_chartView->show(); m_control->buttonChart->setText( i18n( "Report" ) ); - QToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) ); + TQToolTip::add( m_control->buttonChart, i18n( "Show the report version of this chart" ) ); } m_showingChart = ! m_showingChart; } @@ -308,11 +308,11 @@ public: Private() : includeCSS(0) {} - QCheckBox* includeCSS; + TQCheckBox* includeCSS; }; -KReportsView::KReportsView(QWidget *parent, const char *name ) : - KMyMoneyViewBase(parent, name, i18n("Reports")), +KReportsView::KReportsView(TQWidget *tqparent, const char *name ) : + KMyMoneyViewBase(tqparent, name, i18n("Reports")), d(new Private), m_needReload(false) { @@ -320,29 +320,29 @@ KReportsView::KReportsView(QWidget *parent, const char *name ) : addWidget( m_reportTabWidget ); m_reportTabWidget->setHoverCloseButton( true ); - m_listTab = (new QWidget( m_reportTabWidget, "indextab" )); - m_listTabLayout = ( new QVBoxLayout( m_listTab, 11, 6, "indextabLayout") ); + m_listTab = (new TQWidget( m_reportTabWidget, "indextab" )); + m_listTabLayout = ( new TQVBoxLayout( m_listTab, 11, 6, "indextabLayout") ); m_reportListView = new KListView( m_listTab, "m_reportListView" ); m_listTabLayout->addWidget( m_reportListView ); m_reportTabWidget->insertTab( m_listTab, i18n("Reports") ); m_reportListView->addColumn(i18n("Report")); m_reportListView->addColumn(i18n("Comment")); - m_reportListView->setResizeMode(QListView::AllColumns); + m_reportListView->setResizeMode(TQListView::AllColumns); m_reportListView->setAllColumnsShowFocus(true); m_reportListView->setRootIsDecorated(true); m_reportListView->setShadeSortColumn(false); - connect( m_reportTabWidget, SIGNAL(closeRequest(QWidget*)), - this, SLOT(slotClose(QWidget*)) ); - connect(m_reportListView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotOpenReport(QListViewItem*))); - connect(m_reportListView, SIGNAL(returnPressed(QListViewItem*)), - this, SLOT(slotOpenReport(QListViewItem*))); - connect( m_reportListView, SIGNAL(contextMenu(KListView*,QListViewItem*,const QPoint &)), - this, SLOT(slotListContextMenu(KListView*,QListViewItem*,const QPoint &))); + connect( m_reportTabWidget, TQT_SIGNAL(closeRequest(TQWidget*)), + this, TQT_SLOT(slotClose(TQWidget*)) ); + connect(m_reportListView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotOpenReport(TQListViewItem*))); + connect(m_reportListView, TQT_SIGNAL(returnPressed(TQListViewItem*)), + this, TQT_SLOT(slotOpenReport(TQListViewItem*))); + connect( m_reportListView, TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint &)), + this, TQT_SLOT(slotListContextMenu(KListView*,TQListViewItem*,const TQPoint &))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadView())); } KReportsView::~KReportsView() @@ -376,16 +376,16 @@ void KReportsView::slotLoadView(void) } } -QString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const +TQString KReportsView::KReportGroupListItem::key ( int column, bool ascending ) const { if (column == 0) - return QString::number(m_nr).rightJustify(3,'0'); + return TQString::number(m_nr).rightJustify(3,'0'); else return KListViewItem::key(column,ascending); } -KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, const int nr, QString name) : - KListViewItem(parent), +KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* tqparent, const int nr, TQString name) : + KListViewItem(tqparent), m_name(name) { setNr(nr); @@ -394,7 +394,7 @@ KReportsView::KReportGroupListItem::KReportGroupListItem(KListView* parent, cons void KReportsView::KReportGroupListItem::setNr(const int nr) { m_nr = nr; - setText(0, QString("%1. %2").arg(nr).arg(m_name)); + setText(0, TQString("%1. %2").tqarg(nr).tqarg(m_name)); } void KReportsView::loadView(void) @@ -403,12 +403,12 @@ void KReportsView::loadView(void) // remember the id of the current selected item and the // items that are shown 'expanded' - QMap<QString, bool> isOpen; - QListViewItem *item = m_reportListView->selectedItem(); - QString selectedPage = (item) ? item->text(0) : QString(); + TQMap<TQString, bool> isOpen; + TQListViewItem *item = m_reportListView->selectedItem(); + TQString selectedPage = (item) ? item->text(0) : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_reportListView); + TQListViewItemIterator it_lvi(m_reportListView); while(it_lvi.current()) { item = it_lvi.current(); if(item && item->isOpen()) { @@ -418,7 +418,7 @@ void KReportsView::loadView(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_reportListView->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_reportListView->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_reportListView->setUpdatesEnabled(false); @@ -432,18 +432,18 @@ void KReportsView::loadView(void) // Default Reports KReportGroupListItem* chartnode = new KReportGroupListItem(m_reportListView, 10, i18n("Charts")); - QMap<QString,KReportGroupListItem*> groupitems; - QValueList<ReportGroup> defaultreports; + TQMap<TQString,KReportGroupListItem*> groupitems; + TQValueList<ReportGroup> defaultreports; defaultReports(defaultreports); - QValueList<ReportGroup>::const_iterator it_group = defaultreports.begin(); + TQValueList<ReportGroup>::const_iterator it_group = defaultreports.begin(); while ( it_group != defaultreports.end() ) { - QString groupname = (*it_group).name(); + TQString groupname = (*it_group).name(); KReportGroupListItem* curnode = new KReportGroupListItem(m_reportListView, pagenumber++, (*it_group).title()); - curnode->setOpen(isOpen.find(curnode->text(0)) != isOpen.end()); + curnode->setOpen(isOpen.tqfind(curnode->text(0)) != isOpen.end()); groupitems[groupname] = curnode; - QValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin(); + TQValueList<MyMoneyReport>::const_iterator it_report = (*it_group).begin(); while( it_report != (*it_group).end() ) { MyMoneyReport report = *it_report; @@ -464,16 +464,16 @@ void KReportsView::loadView(void) // Rename the charts item to place it at this point in the list. chartnode->setNr(pagenumber++); - chartnode->setOpen(isOpen.find(chartnode->text(0)) != isOpen.end()); + chartnode->setOpen(isOpen.tqfind(chartnode->text(0)) != isOpen.end()); // Custom reports KReportGroupListItem* favoritenode = new KReportGroupListItem(m_reportListView,pagenumber++, i18n("Favorite Reports")); - favoritenode->setOpen(isOpen.find(favoritenode->text(0)) != isOpen.end()); + favoritenode->setOpen(isOpen.tqfind(favoritenode->text(0)) != isOpen.end()); KReportGroupListItem* orphannode = NULL; - QValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList(); - QValueList<MyMoneyReport>::const_iterator it_report = customreports.begin(); + TQValueList<MyMoneyReport> customreports = MyMoneyFile::instance()->reportList(); + TQValueList<MyMoneyReport>::const_iterator it_report = customreports.begin(); while( it_report != customreports.end() ) { // If this report is in a known group, place it there @@ -504,7 +504,7 @@ void KReportsView::loadView(void) // turn updates back on m_reportListView->setUpdatesEnabled(true); - m_reportListView->repaintContents(); + m_reportListView->tqrepaintContents(); // // Go through the tabs to set their update flag or delete them if needed @@ -529,8 +529,8 @@ void KReportsView::loadView(void) void KReportsView::slotOpenURL(const KURL &url, const KParts::URLArgs& /* args */) { - QString view = url.fileName(false); - QString command = url.queryItem("command").data(); + TQString view = url.fileName(false); + TQString command = url.queryItem("command"); if(view == VIEW_REPORTS) { @@ -576,28 +576,28 @@ void KReportsView::slotSaveView(void) { KReportTab* tab = dynamic_cast<KReportTab*>(m_reportTabWidget->currentPage()); if(tab) { - QVBox* vbox = new QVBox(); - d->includeCSS = new QCheckBox(i18n("Include Stylesheet"), vbox); + TQVBox* vbox = new TQVBox(); + d->includeCSS = new TQCheckBox(i18n("Include Stylesheet"), vbox); // the following code is copied from KFileDialog::getSaveFileName, // adjust to our local needs (filetypes etc.) and // enhanced to show the m_saveEncrypted combo box KFileDialog dlg( ":kmymoney-export", - QString("%1|%2\n").arg("*.csv").arg(i18n("CSV (Filefilter)", "CSV files")) + - QString("%1|%2\n").arg("*.html").arg(i18n("HTML (Filefilter)", "HTML files")), + TQString("%1|%2\n").tqarg("*.csv").tqarg(i18n("CSV (Filefilter)", "CSV files")) + + TQString("%1|%2\n").tqarg("*.html").tqarg(i18n("HTML (Filefilter)", "HTML files")), this, "filedialog", true, vbox); - connect(&dlg, SIGNAL(filterChanged(const QString&)), this, SLOT(slotSaveFilterChanged(const QString&))); + connect(&dlg, TQT_SIGNAL(filterChanged(const TQString&)), this, TQT_SLOT(slotSaveFilterChanged(const TQString&))); dlg.setOperationMode( KFileDialog::Saving ); dlg.setCaption(i18n("Export as")); slotSaveFilterChanged("*.csv"); // init gui - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { KURL newURL = dlg.selectedURL(); if (!newURL.isEmpty()) { - QString newName = newURL.prettyURL(0, KURL::StripFileProtocol); + TQString newName = newURL.prettyURL(0, KURL::StripFileProtocol); - if(newName.findRev('.') == -1) + if(newName.tqfindRev('.') == -1) newName.append(".html"); tab->saveAs( newName, d->includeCSS->isEnabled() && d->includeCSS->isChecked() ); @@ -606,7 +606,7 @@ void KReportsView::slotSaveView(void) } } -void KReportsView::slotSaveFilterChanged(const QString& filter) +void KReportsView::slotSaveFilterChanged(const TQString& filter) { d->includeCSS->setEnabled(filter == "*.html"); } @@ -657,7 +657,7 @@ void KReportsView::slotDuplicate(void) if(tab) { MyMoneyReport dupe = tab->report(); - dupe.setName( QString(i18n("Copy of %1")).arg(dupe.name()) ); + dupe.setName( TQString(i18n("Copy of %1")).tqarg(dupe.name()) ); if ( dupe.comment() == i18n("Default Report") ) dupe.setComment( i18n("Custom Report") ); dupe.clearId(); @@ -688,7 +688,7 @@ void KReportsView::slotDelete(void) MyMoneyReport report = tab->report(); if ( ! report.id().isEmpty() ) { - if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, QString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").arg(report.name())+QString("</qt>"), i18n("Delete Report?"))) + if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, TQString("<qt>")+i18n("Are you sure you want to delete report <b>%1</b>? There is no way to recover it!").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?"))) { // close the tab and then remove the report so that it is not // generated again during the following loadView() call @@ -700,11 +700,11 @@ void KReportsView::slotDelete(void) } } else - KMessageBox::information(this, QString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").arg(report.name())+QString("</qt>"), i18n("Delete Report?")); + KMessageBox::information(this, TQString("<qt>")+i18n("Sorry, <b>%1</b> is a default report. You may not delete it.").tqarg(report.name())+TQString("</qt>"), i18n("Delete Report?")); } } -void KReportsView::slotOpenReport(const QString& id) +void KReportsView::slotOpenReport(const TQString& id) { if ( ! id.isEmpty() ) { @@ -731,7 +731,7 @@ void KReportsView::slotOpenReport(const QString& id) } } -void KReportsView::slotOpenReport(QListViewItem* item) +void KReportsView::slotOpenReport(TQListViewItem* item) { KReportListItem *reportItem = dynamic_cast<KReportListItem*> (item); @@ -776,7 +776,7 @@ void KReportsView::slotOpenReport(QListViewItem* item) } else if (item) { - // this is not a KReportListItem, so it's a regular QListViewItem, which + // this is not a KReportListItem, so it's a regular TQListViewItem, which // means its a header. // // double-click on a header means toggle the expand/collapse state @@ -825,7 +825,7 @@ void KReportsView::slotCloseCurrent(void) slotClose(m_reportTabWidget->currentPage()); } -void KReportsView::slotClose(QWidget* w) +void KReportsView::slotClose(TQWidget* w) { KReportTab* tab = dynamic_cast<KReportTab*>(w); if(tab) { @@ -850,20 +850,20 @@ void KReportsView::addReportTab(const MyMoneyReport& report) { KReportTab* tab = new KReportTab(m_reportTabWidget,report); - connect( tab->control()->buttonChart, SIGNAL(clicked()), - this, SLOT(slotToggleChart(void ))); - connect( tab->control()->buttonConfigure, SIGNAL(clicked()), - this, SLOT(slotConfigure(void ))); - connect( tab->control()->buttonNew, SIGNAL(clicked()), - this, SLOT(slotDuplicate(void ))); - connect( tab->control()->buttonCopy, SIGNAL(clicked()), - this, SLOT(slotCopyView(void ))); - connect( tab->control()->buttonExport, SIGNAL(clicked()), - this, SLOT(slotSaveView(void ))); - connect( tab->control()->buttonDelete, SIGNAL(clicked()), - this, SLOT(slotDelete(void ))); - connect( tab->control()->buttonClose, SIGNAL(clicked()), - this, SLOT(slotCloseCurrent(void ))); + connect( tab->control()->buttonChart, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotToggleChart(void ))); + connect( tab->control()->buttonConfigure, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotConfigure(void ))); + connect( tab->control()->buttonNew, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDuplicate(void ))); + connect( tab->control()->buttonCopy, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCopyView(void ))); + connect( tab->control()->buttonExport, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotSaveView(void ))); + connect( tab->control()->buttonDelete, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotDelete(void ))); + connect( tab->control()->buttonClose, TQT_SIGNAL(clicked()), + this, TQT_SLOT(slotCloseCurrent(void ))); // if this is a default report, then you can't delete it! if ( report.id().isEmpty() ) @@ -875,15 +875,15 @@ void KReportsView::addReportTab(const MyMoneyReport& report) } -void KReportsView::slotListContextMenu(KListView* lv,QListViewItem* item,const QPoint & p) +void KReportsView::slotListContextMenu(KListView* lv,TQListViewItem* item,const TQPoint & p) { if ( lv == m_reportListView && item ) { - QPopupMenu* contextmenu = new QPopupMenu(this); - contextmenu->insertItem( i18n("&Open"), this, SLOT(slotOpenFromList()) ); - contextmenu->insertItem( i18n("&Configure"), this, SLOT(slotConfigureFromList()) ); - contextmenu->insertItem( i18n("&New report"), this, SLOT(slotNewFromList()) ); - contextmenu->insertItem( i18n("&Delete"), this, SLOT(slotDeleteFromList()) ); + TQPopupMenu* contextmenu = new TQPopupMenu(this); + contextmenu->insertItem( i18n("&Open"), this, TQT_SLOT(slotOpenFromList()) ); + contextmenu->insertItem( i18n("&Configure"), this, TQT_SLOT(slotConfigureFromList()) ); + contextmenu->insertItem( i18n("&New report"), this, TQT_SLOT(slotNewFromList()) ); + contextmenu->insertItem( i18n("&Delete"), this, TQT_SLOT(slotDeleteFromList()) ); contextmenu->popup(p); } @@ -929,7 +929,7 @@ void KReportsView::slotDeleteFromList(void) } } -void KReportsView::defaultReports(QValueList<ReportGroup>& groups) +void KReportsView::defaultReports(TQValueList<ReportGroup>& groups) { { ReportGroup list("Income and Expenses", i18n("Income and Expenses")); @@ -1040,7 +1040,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eInstitution, - MyMoneyReport::eQCnone, + MyMoneyReport::eTQCnone, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailTop, i18n("Account Balances by Institution"), @@ -1050,7 +1050,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountType, - MyMoneyReport::eQCnone, + MyMoneyReport::eTQCnone, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailTop, i18n("Account Balances by Type"), @@ -1064,7 +1064,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccount, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Account"), @@ -1073,7 +1073,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) //list.back().setConvertCurrency(false); list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Category"), @@ -1081,7 +1081,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Payee"), @@ -1089,7 +1089,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eMonth, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Month"), @@ -1097,7 +1097,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eWeek, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Transactions by Week"), @@ -1105,7 +1105,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) )); list.push_back(MyMoneyReport( MyMoneyReport::eAccount, - MyMoneyReport::eQCloan, + MyMoneyReport::eTQCloan, MyMoneyTransactionFilter::allDates, MyMoneyReport::eDetailAll, i18n("Loan Transactions"), @@ -1114,10 +1114,10 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setLoansOnly(true); list.push_back(MyMoneyReport( MyMoneyReport::eAccountReconcile, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCcategory|MyMoneyReport::eQCbalance, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCbalance, MyMoneyTransactionFilter::last3Months, MyMoneyReport::eDetailAll, - i18n("Transactions by Reconciliation Status"), + i18n("Transactions by Reconciliation tqStatus"), i18n("Default Report") )); groups.push_back(list); @@ -1126,7 +1126,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) ReportGroup list("CashFlow", i18n("Cash Flow")); list.push_back(MyMoneyReport( MyMoneyReport::eCashFlow, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Cash Flow Transactions This Month"), @@ -1139,7 +1139,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eTopAccount, - MyMoneyReport::eQCaction|MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCaction|MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Transactions"), @@ -1149,7 +1149,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountByTopAccount, - MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Holdings by Account"), @@ -1159,7 +1159,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eEquityType, - MyMoneyReport::eQCshares|MyMoneyReport::eQCprice, + MyMoneyReport::eTQCshares|MyMoneyReport::eTQCprice, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Holdings by Type"), @@ -1169,7 +1169,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eAccountByTopAccount, - MyMoneyReport::eQCperformance, + MyMoneyReport::eTQCperformance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Performance by Account"), @@ -1179,7 +1179,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eEquityType, - MyMoneyReport::eQCperformance, + MyMoneyReport::eTQCperformance, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Investment Performance by Type"), @@ -1289,7 +1289,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Category"), @@ -1298,7 +1298,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::yearToDate, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Payee"), @@ -1307,7 +1307,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::eCategory, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCpayee|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCpayee|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::lastFiscalYear, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Category Last Fiscal Year"), @@ -1316,7 +1316,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setTax(true); list.push_back(MyMoneyReport( MyMoneyReport::ePayee, - MyMoneyReport::eQCnumber|MyMoneyReport::eQCcategory|MyMoneyReport::eQCaccount, + MyMoneyReport::eTQCnumber|MyMoneyReport::eTQCcategory|MyMoneyReport::eTQCaccount, MyMoneyTransactionFilter::lastFiscalYear, MyMoneyReport::eDetailAll, i18n("Tax Transactions by Payee Last Fiscal Year"), @@ -1350,7 +1350,7 @@ void KReportsView::defaultReports(QValueList<ReportGroup>& groups) list.back().setShowingRowTotals(true); list.back().setBudget("Any",true); // in case we're in January, we show the last year - if(QDate::currentDate().month() == 1) { + if(TQDate::tqcurrentDate().month() == 1) { list.back().setDateFilter(MyMoneyTransactionFilter::lastYear); } diff --git a/kmymoney2/views/kreportsview.h b/kmymoney2/views/kreportsview.h index eaa8c7c..218155a 100755 --- a/kmymoney2/views/kreportsview.h +++ b/kmymoney2/views/kreportsview.h @@ -33,11 +33,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qvaluevector.h> -#include <qwidget.h> +#include <tqvaluevector.h> +#include <tqwidget.h> -class QVBoxLayout; -class QListViewItem; +class TQVBoxLayout; +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -77,6 +77,7 @@ namespace KReportView { class KReportsView : public KMyMoneyViewBase { Q_OBJECT + TQ_OBJECT public: /** @@ -87,13 +88,13 @@ public: * @author Ace Jones */ - class KReportTab: public QWidget + class KReportTab: public TQWidget { private: KHTMLPart* m_part; reports::KReportChartView* m_chartView; kMyMoneyReportControlDecl* m_control; - QVBoxLayout* m_layout; + TQVBoxLayout* m_layout; MyMoneyReport m_report; bool m_deleteMe; bool m_showingChart; @@ -101,15 +102,15 @@ public: reports::ReportTable* m_table; public: - KReportTab(KTabWidget* parent, const MyMoneyReport& report ); + KReportTab(KTabWidget* tqparent, const MyMoneyReport& report ); ~KReportTab(); const MyMoneyReport& report(void) const { return m_report; } void print(void); void toggleChart(void); void copyToClipboard(void); - void saveAs( const QString& filename, bool includeCSS = false ); + void saveAs( const TQString& filename, bool includeCSS = false ); void updateReport(void); - QString createTable(const QString& links=QString()); + TQString createTable(const TQString& links=TQString()); const kMyMoneyReportControlDecl* control(void) const { return m_control; } bool isReadyToDelete(void) const { return m_deleteMe; } void setReadyToDelete(bool f) { m_deleteMe = f; } @@ -129,21 +130,21 @@ public: class KReportListItem: public KListViewItem { private: - QString m_id; + TQString m_id; MyMoneyReport m_report; public: - KReportListItem( KListView* parent, const MyMoneyReport& report ): - KListViewItem( parent, report.name(), report.comment() ), + KReportListItem( KListView* tqparent, const MyMoneyReport& report ): + KListViewItem( tqparent, report.name(), report.comment() ), m_id( report.id() ), m_report( report ) {} - KReportListItem( KListViewItem* parent, const MyMoneyReport& report ): - KListViewItem( parent, report.name(), report.comment() ), + KReportListItem( KListViewItem* tqparent, const MyMoneyReport& report ): + KListViewItem( tqparent, report.name(), report.comment() ), m_id( report.id() ), m_report( report ) {} - //const QString& id(void) const { return m_id; } + //const TQString& id(void) const { return m_id; } const MyMoneyReport& report(void) const { return m_report; } }; @@ -151,11 +152,11 @@ public: { private: int m_nr; - QString m_name; + TQString m_name; public: - KReportGroupListItem( KListView* parent,const int nr,const QString name); - virtual QString key ( int column, bool ascending ) const; + KReportGroupListItem( KListView* tqparent,const int nr,const TQString name); + virtual TQString key ( int column, bool ascending ) const; void setNr(const int nr); }; @@ -167,16 +168,16 @@ public: * * @author Ace Jones */ - class ReportGroup: public QValueList<MyMoneyReport> + class ReportGroup: public TQValueList<MyMoneyReport> { private: - QString m_name; ///< the title of the group in non-translated form - QString m_title; ///< the title of the group in i18n-ed form + TQString m_name; ///< the title of the group in non-translated form + TQString m_title; ///< the title of the group in i18n-ed form public: ReportGroup( void ) {} - ReportGroup( const QString& name, const QString& title ): m_name( name ), m_title(title) {} - const QString& name( void ) const { return m_name; } - const QString& title(void) const { return m_title; } + ReportGroup( const TQString& name, const TQString& title ): m_name( name ), m_title(title) {} + const TQString& name( void ) const { return m_name; } + const TQString& title(void) const { return m_title; } }; private: @@ -186,22 +187,22 @@ private: Private* const d; KTabWidget* m_reportTabWidget; KListView* m_reportListView; - QWidget* m_listTab; - QVBoxLayout* m_listTabLayout; + TQWidget* m_listTab; + TQVBoxLayout* m_listTabLayout; bool m_needReload; public: /** * Standard constructor. * - * @param parent The QWidget this is used in. + * @param tqparent The TQWidget this is used in. * @param name The QT name. * * @return An object of type KReportsView * * @see ~KReportsView */ - KReportsView(QWidget *parent=0, const char *name=0); + KReportsView(TQWidget *tqparent=0, const char *name=0); /** * Standard destructor. @@ -222,7 +223,7 @@ public: protected: void addReportTab(const MyMoneyReport&); void loadView(void); - static void defaultReports(QValueList<ReportGroup>&); + static void defaultReports(TQValueList<ReportGroup>&); public slots: void slotOpenURL(const KURL &url, const KParts::URLArgs& args); @@ -234,21 +235,21 @@ public slots: void slotConfigure(void); void slotDuplicate(void); void slotToggleChart(void); - void slotOpenReport(QListViewItem*); - void slotOpenReport(const QString&); + void slotOpenReport(TQListViewItem*); + void slotOpenReport(const TQString&); void slotOpenReport(const MyMoneyReport&); void slotCloseCurrent(void); - void slotClose(QWidget*); + void slotClose(TQWidget*); void slotCloseAll(void); void slotDelete(void); - void slotListContextMenu(KListView*,QListViewItem*,const QPoint &); + void slotListContextMenu(KListView*,TQListViewItem*,const TQPoint &); void slotOpenFromList(void); void slotConfigureFromList(void); void slotNewFromList(void); void slotDeleteFromList(void); protected slots: - void slotSaveFilterChanged(const QString&); + void slotSaveFilterChanged(const TQString&); signals: /** diff --git a/kmymoney2/views/kscheduledlistitem.cpp b/kmymoney2/views/kscheduledlistitem.cpp index 6ba0b56..d48b881 100644 --- a/kmymoney2/views/kscheduledlistitem.cpp +++ b/kmymoney2/views/kscheduledlistitem.cpp @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpainter.h> -#include <qstyle.h> +#include <tqpainter.h> +#include <tqstyle.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,8 +42,8 @@ #include "../kmymoneyglobalsettings.h" #include "../kmymoneyutils.h" -KScheduledListItem::KScheduledListItem(KListView *parent, const QString& name, const QPixmap& pixmap, const QString& sortKey) : - KListViewItem(parent, name), +KScheduledListItem::KScheduledListItem(KListView *tqparent, const TQString& name, const TQPixmap& pixmap, const TQString& sortKey) : + KListViewItem(tqparent, name), m_sortKey(sortKey) { setPixmap(0, pixmap); @@ -51,8 +51,8 @@ KScheduledListItem::KScheduledListItem(KListView *parent, const QString& name, c m_sortKey = name; } -KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoneySchedule& schedule/*, bool even*/) - : KListViewItem(parent) +KScheduledListItem::KScheduledListItem(KScheduledListItem *tqparent, const MyMoneySchedule& schedule/*, bool even*/) + : KListViewItem(tqparent) { m_schedule = schedule; m_sortKey = schedule.name(); @@ -63,7 +63,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney MyMoneyTransaction transaction = schedule.transaction(); MyMoneySplit s1 = transaction.splits()[0]; MyMoneySplit s2 = transaction.splits()[1]; - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; MyMoneySplit split; MyMoneyAccount acc; @@ -130,7 +130,7 @@ KScheduledListItem::KScheduledListItem(KScheduledListItem *parent, const MyMoney else setText(2, "---"); m_amount = split.shares().abs(); - setText(3, QString("%1 ").arg(m_amount.formatMoney(acc, currency))); + setText(3, TQString("%1 ").tqarg(m_amount.formatMoney(acc, currency))); // Do the real next payment like ms-money etc if (schedule.isFinished()) { @@ -154,38 +154,38 @@ KScheduledListItem::~KScheduledListItem() { } -void KScheduledListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) +void KScheduledListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); - QColor textColour = KGlobalSettings::textColor(); - QFont cellFont = KMyMoneyGlobalSettings::listCellFont(); + TQColor textColour = KGlobalSettings::textColor(); + TQFont cellFont = KMyMoneyGlobalSettings::listCellFont(); // avoid colorizing lines that do not contain a schedule if(!m_schedule.id().isEmpty()) { if (m_schedule.isFinished()) - textColour = Qt::darkGreen; + textColour = TQt::darkGreen; else if (m_schedule.isOverdue()) - textColour = Qt::red; + textColour = TQt::red; } - cg2.setColor(QColorGroup::Text, textColour); + cg2.setColor(TQColorGroup::Text, textColour); // display group items in bold - if (!parent()) + if (!tqparent()) cellFont.setBold(true); p->setFont(cellFont); if (isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } -int KScheduledListItem::compare(QListViewItem* i, int col, bool ascending) const +int KScheduledListItem::compare(TQListViewItem* i, int col, bool ascending) const { KScheduledListItem* item = dynamic_cast<KScheduledListItem*>(i); int rc; diff --git a/kmymoney2/views/kscheduledlistitem.h b/kmymoney2/views/kscheduledlistitem.h index c5e4728..62df861 100644 --- a/kmymoney2/views/kscheduledlistitem.h +++ b/kmymoney2/views/kscheduledlistitem.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> +#include <tqpixmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,27 +56,27 @@ public: * * Other types may be added in the future. * - * @param parent The list view to be a child of. + * @param tqparent The list view to be a child of. * @param description The (translated) description. * @param pixmap A pixmap for the entry * @param sortKey a sortkey, if empty, @c description will be used. * * @see MyMoneySchedule */ - KScheduledListItem(KListView *parent, const QString& description, const QPixmap& pixmap = QPixmap(), const QString& sortKey = QString()); + KScheduledListItem(KListView *tqparent, const TQString& description, const TQPixmap& pixmap = TQPixmap(), const TQString& sortKey = TQString()); /** - * This constructor is used to create a child of one of the children + * This constructor is used to create a child of one of the tqchildren * created by the above method. * * This child describes a schedule and represents the data in schedule. * - * @param parent The list view item to be a child of. + * @param tqparent The list view item to be a child of. * @param schedule The schedule to be represented. * * @see MyMoneySchedule */ - KScheduledListItem(KScheduledListItem *parent, const MyMoneySchedule& schedule/*, bool even*/); + KScheduledListItem(KScheduledListItem *tqparent, const MyMoneySchedule& schedule/*, bool even*/); /** * Standard destructor. @@ -91,16 +91,16 @@ public: * * @return The schedule id. */ - const QString& scheduleId(void) const { return m_schedule.id(); } + const TQString& scheduleId(void) const { return m_schedule.id(); } - int compare(QListViewItem* i, int col, bool ascending) const; + int compare(TQListViewItem* i, int col, bool ascending) const; protected: - void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); + void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); private: MyMoneySchedule m_schedule; - QString m_sortKey; + TQString m_sortKey; MyMoneyMoney m_amount; }; diff --git a/kmymoney2/views/kscheduledview.cpp b/kmymoney2/views/kscheduledview.cpp index 42c09db..7f6ebe0 100644 --- a/kmymoney2/views/kscheduledview.cpp +++ b/kmymoney2/views/kscheduledview.cpp @@ -23,12 +23,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qheader.h> -#include <qtoolbutton.h> -#include <qcombobox.h> -#include <qtabwidget.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqheader.h> +#include <tqtoolbutton.h> +#include <tqcombobox.h> +#include <tqtabwidget.h> +#include <tqlayout.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -55,15 +55,15 @@ #include "../kmymoney2.h" -KScheduledView::KScheduledView(QWidget *parent, const char *name ) : - KScheduledViewDecl(parent,name, false), +KScheduledView::KScheduledView(TQWidget *tqparent, const char *name ) : + KScheduledViewDecl(tqparent,name, false), m_openBills(true), m_openDeposits(true), m_openTransfers(true), m_openLoans(true) { // create the searchline widget - // and insert it into the existing layout + // and insert it into the existing tqlayout m_searchWidget = new KListViewSearchLineWidget(m_qlistviewScheduled, m_listTab); m_listTabLayout->insertWidget(0, m_searchWidget); @@ -74,7 +74,7 @@ KScheduledView::KScheduledView(QWidget *parent, const char *name ) : m_qlistviewScheduled->addColumn(i18n("Next Due Date")); m_qlistviewScheduled->addColumn(i18n("Frequency")); m_qlistviewScheduled->addColumn(i18n("Payment Method")); - m_qlistviewScheduled->setColumnAlignment(3, Qt::AlignRight); + m_qlistviewScheduled->setColumnAlignment(3, TQt::AlignRight); readConfig(); @@ -83,37 +83,37 @@ KScheduledView::KScheduledView(QWidget *parent, const char *name ) : if(m_qlistviewScheduled->sortColumn() == -1) m_qlistviewScheduled->setSorting(0); - connect(m_qbuttonNew, SIGNAL(clicked()), kmymoney2->action("schedule_new"), SLOT(activate())); + connect(m_qbuttonNew, TQT_SIGNAL(clicked()), kmymoney2->action("schedule_new"), TQT_SLOT(activate())); // attach popup to 'Filter...' button m_kaccPopup = new KPopupMenu(this); m_kaccPopup->setCheckable(true); m_accountsCombo->setPopup(m_kaccPopup); - connect(m_kaccPopup, SIGNAL(activated(int)), this, SLOT(slotAccountActivated(int))); + connect(m_kaccPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotAccountActivated(int))); m_qbuttonNew->setGuiItem(KMyMoneyUtils::scheduleNewGuiItem()); m_accountsCombo->setGuiItem(KMyMoneyUtils::accountsFilterGuiItem()); KIconLoader *il = KGlobal::iconLoader(); - m_tabWidget->setTabIconSet(m_listTab, QIconSet(il->loadIcon("contents", KIcon::Small, KIcon::SizeSmall))); - m_tabWidget->setTabIconSet(m_calendarTab, QIconSet(il->loadIcon("calendartab", KIcon::User, KIcon::SizeSmall))); + m_tabWidget->setTabIconSet(m_listTab, TQIconSet(il->loadIcon("contents", KIcon::Small, KIcon::SizeSmall))); + m_tabWidget->setTabIconSet(m_calendarTab, TQIconSet(il->loadIcon("calendartab", KIcon::User, KIcon::SizeSmall))); - connect(m_qlistviewScheduled, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), - this, SLOT(slotListViewContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(m_qlistviewScheduled, SIGNAL(selectionChanged(QListViewItem*)), - this, SLOT(slotSetSelectedItem(QListViewItem*))); + connect(m_qlistviewScheduled, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), + this, TQT_SLOT(slotListViewContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(m_qlistviewScheduled, TQT_SIGNAL(selectionChanged(TQListViewItem*)), + this, TQT_SLOT(slotSetSelectedItem(TQListViewItem*))); - connect(m_qlistviewScheduled, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)), - this, SLOT(slotListItemExecuted(QListViewItem*, const QPoint&, int))); - connect(m_qlistviewScheduled, SIGNAL(expanded(QListViewItem*)), - this, SLOT(slotListViewExpanded(QListViewItem*))); - connect(m_qlistviewScheduled, SIGNAL(collapsed(QListViewItem*)), - this, SLOT(slotListViewCollapsed(QListViewItem*))); + connect(m_qlistviewScheduled, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), + this, TQT_SLOT(slotListItemExecuted(TQListViewItem*, const TQPoint&, int))); + connect(m_qlistviewScheduled, TQT_SIGNAL(expanded(TQListViewItem*)), + this, TQT_SLOT(slotListViewExpanded(TQListViewItem*))); + connect(m_qlistviewScheduled, TQT_SIGNAL(collapsed(TQListViewItem*)), + this, TQT_SLOT(slotListViewCollapsed(TQListViewItem*))); - connect(m_calendar, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)), this, SLOT(slotBriefEnterClicked(const MyMoneySchedule&, const QDate&))); - connect(m_calendar, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)), this, SLOT(slotBriefSkipClicked(const MyMoneySchedule&, const QDate&))); + connect(m_calendar, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SLOT(slotBriefEnterClicked(const MyMoneySchedule&, const TQDate&))); + connect(m_calendar, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SLOT(slotBriefSkipClicked(const MyMoneySchedule&, const TQDate&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadView())); } KScheduledView::~KScheduledView() @@ -121,11 +121,11 @@ KScheduledView::~KScheduledView() writeConfig(); } -void KScheduledView::refresh(bool full, const QString& schedId) +void KScheduledView::refresh(bool full, const TQString& schedId) { m_qlistviewScheduled->header()->setFont(KMyMoneyGlobalSettings::listHeaderFont()); - QPoint startPoint = QPoint(m_qlistviewScheduled->contentsX(), m_qlistviewScheduled->contentsY()); + TQPoint startPoint = TQPoint(m_qlistviewScheduled->contentsX(), m_qlistviewScheduled->contentsY()); m_qlistviewScheduled->clear(); @@ -141,7 +141,7 @@ void KScheduledView::refresh(bool full, const QString& schedId) MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount acc; - QStringList::ConstIterator it_s; + TQStringList::ConstIterator it_s; acc = file->asset(); for(it_s = acc.accountList().begin(); it_s != acc.accountList().end(); ++it_s) @@ -163,7 +163,7 @@ void KScheduledView::refresh(bool full, const QString& schedId) m_calendar->refresh(); MyMoneyFile *file = MyMoneyFile::instance(); - QValueList<MyMoneySchedule> scheduledItems = file->scheduleList(); + TQValueList<MyMoneySchedule> scheduledItems = file->scheduleList(); if (scheduledItems.count() == 0) return; @@ -173,7 +173,7 @@ void KScheduledView::refresh(bool full, const QString& schedId) KScheduledListItem *itemLoans = new KScheduledListItem(m_qlistviewScheduled, i18n("Loans"), KMyMoneyUtils::transferScheduleIcon(KIcon::Small), "2"); KScheduledListItem *itemTransfers = new KScheduledListItem(m_qlistviewScheduled, i18n("Transfers"), KMyMoneyUtils::transferScheduleIcon(KIcon::Small), "3"); - QValueList<MyMoneySchedule>::Iterator it; + TQValueList<MyMoneySchedule>::Iterator it; KScheduledListItem *openItem=0; @@ -183,7 +183,7 @@ void KScheduledView::refresh(bool full, const QString& schedId) KScheduledListItem* item=0; bool bContinue=true; - QStringList::iterator accIt; + TQStringList::iterator accIt; for (accIt=m_filterAccounts.begin(); accIt!=m_filterAccounts.end(); ++accIt) { if (*accIt == schedData.account().id()) @@ -196,7 +196,7 @@ void KScheduledView::refresh(bool full, const QString& schedId) if (!bContinue) continue; - KScheduledListItem* parent = 0; + KScheduledListItem* tqparent = 0; switch (schedData.type()) { case MyMoneySchedule::TYPE_ANY: @@ -204,25 +204,25 @@ void KScheduledView::refresh(bool full, const QString& schedId) // We just sort it as bill and fall through here case MyMoneySchedule::TYPE_BILL: - parent = itemBills; + tqparent = itemBills; break; case MyMoneySchedule::TYPE_DEPOSIT: - parent = itemDeposits; + tqparent = itemDeposits; break; case MyMoneySchedule::TYPE_TRANSFER: - parent = itemTransfers; + tqparent = itemTransfers; break; case MyMoneySchedule::TYPE_LOANPAYMENT: - parent = itemLoans; + tqparent = itemLoans; break; } - if(parent) { + if(tqparent) { if(!KMyMoneyGlobalSettings::hideFinishedSchedules() || !schedData.isFinished()) { - item = new KScheduledListItem(parent, schedData); + item = new KScheduledListItem(tqparent, schedData); if (schedData.id() == schedId) openItem = item; } @@ -237,11 +237,11 @@ void KScheduledView::refresh(bool full, const QString& schedId) // working when coming from hidden form to visible form. I assume, this // has something to do with the delayed update of the display somehow. resize(width(), height()-1); - QTimer::singleShot(10, this, SLOT(slotTimerDone())); + TQTimer::singleShot(10, this, TQT_SLOT(slotTimerDone())); m_qlistviewScheduled->update(); - // force repaint in case the filter is set - m_searchWidget->searchLine()->updateSearch(QString::null); + // force tqrepaint in case the filter is set + m_searchWidget->searchLine()->updateSearch(TQString()); if (m_openBills) itemBills->setOpen(true); @@ -266,16 +266,16 @@ void KScheduledView::refresh(bool full, const QString& schedId) void KScheduledView::slotTimerDone(void) { - QListViewItem* item; + TQListViewItem* item; item = m_qlistviewScheduled->selectedItem(); if(item) { m_qlistviewScheduled->ensureItemVisible(item); } - // force a repaint of all items to update the branches + // force a tqrepaint of all items to update the branches for(item = m_qlistviewScheduled->firstChild(); item != 0; item = item->itemBelow()) { - m_qlistviewScheduled->repaintItem(item); + m_qlistviewScheduled->tqrepaintItem(item); } resize(width(), height()+1); } @@ -290,7 +290,7 @@ void KScheduledView::slotReloadView(void) refresh(true, m_selectedSchedule); m_needReload = false; - QTimer::singleShot(50, this, SLOT(slotRearrange())); + TQTimer::singleShot(50, this, TQT_SLOT(slotRearrange())); } } @@ -304,7 +304,7 @@ void KScheduledView::show() void KScheduledView::slotRearrange(void) { - resizeEvent(0); + resizeEvent((TQResizeEvent*)0); } void KScheduledView::readConfig(void) @@ -336,14 +336,14 @@ void KScheduledView::writeConfig(void) m_qlistviewScheduled->saveLayout(KGlobal::config(), "Schedule View Settings"); } -void KScheduledView::slotListViewContextMenu(KListView* /* view */, QListViewItem *item, const QPoint& /* pos */) +void KScheduledView::slotListViewContextMenu(KListView* /* view */, TQListViewItem *item, const TQPoint& /* pos */) { KScheduledListItem *scheduleItem = dynamic_cast<KScheduledListItem *>(item); if (scheduleItem) { try { - QString scheduleId = scheduleItem->scheduleId(); + TQString scheduleId = scheduleItem->scheduleId(); if (!scheduleId.isEmpty()) // Top level item { @@ -364,7 +364,7 @@ void KScheduledView::slotListViewContextMenu(KListView* /* view */, QListViewIte } } -void KScheduledView::slotListItemExecuted(QListViewItem* item, const QPoint&, int) +void KScheduledView::slotListItemExecuted(TQListViewItem* item, const TQPoint&, int) { KScheduledListItem* scheduleItem = (KScheduledListItem*)item; if (!scheduleItem) @@ -372,7 +372,7 @@ void KScheduledView::slotListItemExecuted(QListViewItem* item, const QPoint&, in try { - QString scheduleId = scheduleItem->scheduleId(); + TQString scheduleId = scheduleItem->scheduleId(); if (!scheduleId.isEmpty()) // Top level item { @@ -398,7 +398,7 @@ void KScheduledView::slotAccountActivated(int id) int accountCount=0; MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyAccount acc; - QStringList::ConstIterator it_s; + TQStringList::ConstIterator it_s; acc = file->asset(); for(it_s = acc.accountList().begin(); it_s != acc.accountList().end(); ++it_s) @@ -421,7 +421,7 @@ void KScheduledView::slotAccountActivated(int id) } } -void KScheduledView::slotListViewExpanded(QListViewItem* item) +void KScheduledView::slotListViewExpanded(TQListViewItem* item) { KScheduledListItem *scheduleItem = (KScheduledListItem*)item; if (scheduleItem) @@ -437,7 +437,7 @@ void KScheduledView::slotListViewExpanded(QListViewItem* item) } } -void KScheduledView::slotListViewCollapsed(QListViewItem* item) +void KScheduledView::slotListViewCollapsed(TQListViewItem* item) { KScheduledListItem *scheduleItem = (KScheduledListItem*)item; if (scheduleItem) @@ -453,12 +453,12 @@ void KScheduledView::slotListViewCollapsed(QListViewItem* item) } } -void KScheduledView::slotSelectSchedule(const QString& schedule) +void KScheduledView::slotSelectSchedule(const TQString& schedule) { refresh(true, schedule); } -void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, const QDate& date) +void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, const TQDate& date) { Q_UNUSED(date); @@ -466,7 +466,7 @@ void KScheduledView::slotBriefEnterClicked(const MyMoneySchedule& schedule, cons emit enterSchedule(); } -void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const QDate& date) +void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const TQDate& date) { Q_UNUSED(date); @@ -474,7 +474,7 @@ void KScheduledView::slotBriefSkipClicked(const MyMoneySchedule& schedule, const emit skipSchedule(); } -void KScheduledView::slotSetSelectedItem(QListViewItem* item) +void KScheduledView::slotSetSelectedItem(TQListViewItem* item) { emit scheduleSelected(MyMoneySchedule()); KScheduledListItem* schedItem = static_cast<KScheduledListItem*>(item); diff --git a/kmymoney2/views/kscheduledview.h b/kmymoney2/views/kscheduledview.h index 9eac41a..25600bd 100644 --- a/kmymoney2/views/kscheduledview.h +++ b/kmymoney2/views/kscheduledview.h @@ -25,8 +25,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qlistview.h> +#include <tqwidget.h> +#include <tqlistview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,12 +56,13 @@ class KPopupMenu; class KScheduledView : public KScheduledViewDecl { Q_OBJECT + TQ_OBJECT public: /** - * Standard constructor for QWidgets. + * Standard constructor for TQWidgets. */ - KScheduledView(QWidget *parent=0, const char *name=0); + KScheduledView(TQWidget *tqparent=0, const char *name=0); /** * Standard destructor. @@ -74,7 +75,7 @@ public: void show(); public slots: - void slotSelectSchedule(const QString& schedule); + void slotSelectSchedule(const TQString& schedule); void slotReloadView(void); signals: @@ -94,27 +95,27 @@ protected slots: * @param pos The position to popup * @return none **/ - void slotListViewContextMenu(KListView* view, QListViewItem* item, const QPoint& pos); + void slotListViewContextMenu(KListView* view, TQListViewItem* item, const TQPoint& pos); - void slotListItemExecuted(QListViewItem*, const QPoint&, int); + void slotListItemExecuted(TQListViewItem*, const TQPoint&, int); void slotAccountActivated(int); - void slotListViewCollapsed(QListViewItem* item); - void slotListViewExpanded(QListViewItem* item); + void slotListViewCollapsed(TQListViewItem* item); + void slotListViewExpanded(TQListViewItem* item); - void slotBriefSkipClicked(const MyMoneySchedule& schedule, const QDate&); - void slotBriefEnterClicked(const MyMoneySchedule& schedule, const QDate&); + void slotBriefSkipClicked(const MyMoneySchedule& schedule, const TQDate&); + void slotBriefEnterClicked(const MyMoneySchedule& schedule, const TQDate&); void slotTimerDone(void); - void slotSetSelectedItem(QListViewItem* item); + void slotSetSelectedItem(TQListViewItem* item); void slotRearrange(void); private: /// The selected schedule id in the list view. - QString m_selectedSchedule; + TQString m_selectedSchedule; /// Read config file void readConfig(void); @@ -125,7 +126,7 @@ private: /** * Refresh the view. */ - void refresh(bool full=true, const QString& schedId = QString()); + void refresh(bool full=true, const TQString& schedId = TQString()); /** * Loads the accounts into the combo box. @@ -133,7 +134,7 @@ private: // void loadAccounts(void); KPopupMenu *m_kaccPopup; - QStringList m_filterAccounts; + TQStringList m_filterAccounts; bool m_openBills; bool m_openDeposits; bool m_openTransfers; diff --git a/kmymoney2/views/kscheduledviewdecl.ui b/kmymoney2/views/kscheduledviewdecl.ui index faa3fe8..215ec7f 100644 --- a/kmymoney2/views/kscheduledviewdecl.ui +++ b/kmymoney2/views/kscheduledviewdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KScheduledViewDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KScheduledViewDecl</cstring> </property> @@ -19,9 +19,9 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>80</width> <height>20</height> @@ -76,11 +76,11 @@ <enum>Horizontal</enum> </property> </widget> - <widget class="QTabWidget"> + <widget class="TQTabWidget"> <property name="name"> <cstring>m_tabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_listTab</cstring> </property> @@ -113,7 +113,7 @@ </widget> </vbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_calendarTab</cstring> </property> @@ -157,5 +157,5 @@ <data format="PNG" length="824">89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b000002ff49444154388db59531681c4714863f992dde820cb370815b50600f54e8ca0ba43970712a8fb838438a3895634813d238a5ab80e314ae4d0a812060a4226017c27221c8a9da6b8c4fe0e00d28b0571cec82043b85611f78c12966efa4bb8bc085f29a6567df7cef9f7fdeccaec571cc2cbaddee47ae21e2385e5b9b815f1ebcfcd8de6a63ad25cb338af7c52741acb5a4a729a3d723a82ec6bd99d267bf3f23fc1c4cab2442d14a915986e792fdfa59569766573049417784f1b12e8267954dab24b78714450a28beaf941f847c2a14e70a0841035a2d45d641eb027213c210c69756320767794684d6508bef0befde1a860796e4c402333542b4256c0f0cdd1e50b97191458be6e0e27d81563a87c643d8fb2d7793d685d696413cc8a6cae46f65f7d79c7c62b87b4f2e15fd0fb0d302be0fefde4a0d557a5f35e90f84e0334014d590f855c9de4ecee17e4eb319d1ff3a00ec02f8c67299f283307c61e7d06fbf1782d082588a33e1cf1705fd81cf773f3601e1f9bec59e2f4b5c7ef5209f0ac95f16630cfd818067c103b586dd274a726229cee0fe8380d191cb4d1267d3d58aa1de7d258ceae5d7d0a78fdd269a86f0c52d414c49bbe3762c9b686de41560d7a72e41c4795a6486a78f95e4c4151481d686efbe7b3398ac58b1a23868b8c474aaa8068c8e714a8dd06c1af2a9e5d1c38c641c909dba6e08237f19b358a7ac5cf3479bc2e41f257e55d2ffc6a73833746f09e186cfa387904f2cbffc90a2aa9886d0e99464d3c5965b512cebd01f1800f67672e2a392fb0f023a3d883a053ffddcc2340dd65ab452b6074dc2cd15c1cbceb863daed413e353cdfcfd97d92333a12da6d0181ec3443cf753ef3cdd092de0e116ff1a02cdc157338ca9d7b8269461cfee1ba2139b9286e1a427f10110f2d561555b076d18a39383d4d99a4c0cd0b787f20747b214962c8266e3cdcf0e97c59126ec2f6edd089f40a92f115e0d1eb11ba238461dd6a15f32b53666de841965bb203575a3cc15a48c64a965fe57105e3635db8fa96dcffc431172b5d715d7103dc3fea7f015f373c8ee3b57f0135105a0fae7717960000000049454e44ae426082</data> </image> </images> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/Makefile.am b/kmymoney2/widgets/Makefile.am index 51fa159..2d43022 100644 --- a/kmymoney2/widgets/Makefile.am +++ b/kmymoney2/widgets/Makefile.am @@ -14,7 +14,7 @@ selectedtransaction.cpp #register.cpp registeritem.cpp transaction.cpp transactionform.cpp transactioneditor.cpp transactioneditorcontainer.cpp kmymoneychecklistitem.cpp kmymoneylistviewitem.cpp kmymoneyforecastlistviewitem.cpp kmymoneyselector.cpp \ #transactionsortoption.ui -EXTRA_DIST = kmymoney.widgets kmymoneygpgconfigdecl.ui kmymoneyonlinequoteconfigdecl.ui kmymoneyreportconfigtab1decl.ui kmymoneyreportconfigtab2decl.ui kmymoneyreportconfigtab3decl.ui kmymoneyreportcontroldecl.ui kschedulebriefwidget.ui kmymoneyreportconfigtabchartdecl.ui transactionsortoption.ui transactionsortoption.ui.h sortoptionlistitem.h makekdewidgets.in kbudgetvaluesdecl.ui kaccounttemplateselectordecl.ui +EXTRA_DIST = kmymoney.widgets kmymoneygpgconfigdecl.ui kmymoneyonlinequoteconfigdecl.ui kmymoneyreportconfigtab1decl.ui kmymoneyreportconfigtab2decl.ui kmymoneyreportconfigtab3decl.ui kmymoneyreportcontroldecl.ui kschedulebriefwidget.ui kmymoneyreportconfigtabchartdecl.ui transactionsortoption.ui transactionsortoption.ui.h sortoptionlistitem.h kbudgetvaluesdecl.ui kaccounttemplateselectordecl.ui # include the widgets that are available to 3rd party sw (e.g. plugins or # Qt designer) here @@ -58,8 +58,7 @@ libkmymoney_la_SOURCES = kmmwidgets.cpp ../kmymoneysettings.cpp kmymoneycompleti noinst_LTLIBRARIES = libkmymoney.la kmmwidgets.cpp: $(srcdir)/kmymoney.widgets - chmod +x makekdewidgets - ./makekdewidgets -g KMyMoney -n CustomWidgetPlugin -o kmmwidgets.cpp -i kmymoney $(abs_srcdir)/kmymoney.widgets + $(MAKEKDEWIDGETS) -g KMyMoney -n CustomWidgetPlugin -o kmmwidgets.cpp $(abs_srcdir)/kmymoney.widgets # make sure to compile the Qt designer version w/o the memory leak checker # also we need a copy of the mymoneymoney.lo file which has been compiled diff --git a/kmymoney2/widgets/kaccounttemplateselector.cpp b/kmymoney2/widgets/kaccounttemplateselector.cpp index 8ba6f0a..1816fab 100644 --- a/kmymoney2/widgets/kaccounttemplateselector.cpp +++ b/kmymoney2/widgets/kaccounttemplateselector.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdir.h> -#include <qheader.h> -#include <qtimer.h> +#include <tqdir.h> +#include <tqheader.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,14 +41,14 @@ class KTemplateListItem : public KListViewItem { public: - KTemplateListItem(QListViewItem* parent, const QString& text); + KTemplateListItem(TQListViewItem* tqparent, const TQString& text); void setAvailable(void); public: bool m_isAvailable; }; -KTemplateListItem::KTemplateListItem(QListViewItem* parent, const QString& text) : - KListViewItem(parent, text), +KTemplateListItem::KTemplateListItem(TQListViewItem* tqparent, const TQString& text) : + KListViewItem(tqparent, text), m_isAvailable(false) { } @@ -63,41 +63,41 @@ class KAccountTemplateSelector::Private public: Private(KAccountTemplateSelector* p) { m_parent = p; } #ifndef KMM_DESIGNER - QValueList<MyMoneyTemplate> selectedTemplates(void) const; - QListViewItem* hierarchyItem(const QString& parent, const QString& name); + TQValueList<MyMoneyTemplate> selectedTemplates(void) const; + TQListViewItem* hierarchyItem(const TQString& tqparent, const TQString& name); void loadHierarchy(void); #endif public: KAccountTemplateSelector* m_parent; - QMap<QString, QListViewItem*> m_templateHierarchy; + TQMap<TQString, TQListViewItem*> m_templateHierarchy; #ifndef KMM_DESIGNER - QMap<QString, MyMoneyTemplate> m_templates; - QMap<QString, QString> countries; - QMap<QString, QString>::iterator it_m; - QStringList dirlist; + TQMap<TQString, MyMoneyTemplate> m_templates; + TQMap<TQString, TQString> countries; + TQMap<TQString, TQString>::iterator it_m; + TQStringList dirlist; int id; #endif }; #ifndef KMM_DESIGNER -QListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const QString& parent, const QString& name) +TQListViewItem* KAccountTemplateSelector::Private::hierarchyItem(const TQString& tqparent, const TQString& name) { - if(!m_templateHierarchy.contains(parent) - || m_templateHierarchy[parent] == 0) { - QRegExp exp("(.*):(.*)"); - if(exp.search(parent) != -1) - m_templateHierarchy[parent] = hierarchyItem(exp.cap(1), exp.cap(2)); + if(!m_templateHierarchy.tqcontains(tqparent) + || m_templateHierarchy[tqparent] == 0) { + TQRegExp exp("(.*):(.*)"); + if(exp.search(tqparent) != -1) + m_templateHierarchy[tqparent] = hierarchyItem(exp.cap(1), exp.cap(2)); } - return new KTemplateListItem(m_templateHierarchy[parent], name); + return new KTemplateListItem(m_templateHierarchy[tqparent], name); } void KAccountTemplateSelector::Private::loadHierarchy(void) { m_templateHierarchy.clear(); - QListViewItemIterator it(m_parent->m_groupList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it(m_parent->m_groupList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it.current()) != 0) { m_templates[it_v->text(2)].hierarchy(m_templateHierarchy); ++it; @@ -109,8 +109,8 @@ void KAccountTemplateSelector::Private::loadHierarchy(void) #if 0 // add the hierarchy from the MyMoneyFile object - QValueList<MyMoneyAccount> aList; - QValueList<MyMoneyAccount>::const_iterator it_a; + TQValueList<MyMoneyAccount> aList; + TQValueList<MyMoneyAccount>::const_iterator it_a; MyMoneyFile* file = MyMoneyFile::instance(); file->accountList(aList); if(aList.count() > 0) { @@ -127,9 +127,9 @@ void KAccountTemplateSelector::Private::loadHierarchy(void) #endif m_parent->m_accountList->clear(); - QMap<QString, QListViewItem*>::iterator it_m; + TQMap<TQString, TQListViewItem*>::iterator it_m; - QRegExp exp("(.*):(.*)"); + TQRegExp exp("(.*):(.*)"); for(it_m = m_templateHierarchy.begin(); it_m != m_templateHierarchy.end(); ++it_m) { if(exp.search(it_m.key()) == -1) { (*it_m) = new KListViewItem(m_parent->m_accountList, it_m.key()); @@ -145,11 +145,11 @@ void KAccountTemplateSelector::Private::loadHierarchy(void) } } -QValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates(void) const +TQValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates(void) const { - QValueList<MyMoneyTemplate> list; - QListViewItemIterator it(m_parent->m_groupList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQValueList<MyMoneyTemplate> list; + TQListViewItemIterator it(m_parent->m_groupList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it.current()) != 0) { list << m_templates[it_v->text(2)]; ++it; @@ -159,15 +159,15 @@ QValueList<MyMoneyTemplate> KAccountTemplateSelector::Private::selectedTemplates #endif -KAccountTemplateSelector::KAccountTemplateSelector(QWidget* parent, const char* name) : - KAccountTemplateSelectorDecl(parent, name), +KAccountTemplateSelector::KAccountTemplateSelector(TQWidget* tqparent, const char* name) : + KAccountTemplateSelectorDecl(tqparent, name), d(new Private(this)) { m_accountList->header()->hide(); - connect(m_groupList, SIGNAL(selectionChanged()), this, SLOT(slotLoadHierarchy())); + connect(m_groupList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotLoadHierarchy())); // kick off loading of account template data - QTimer::singleShot(0, this, SLOT(slotLoadTemplateList())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadTemplateList())); } KAccountTemplateSelector::~KAccountTemplateSelector() @@ -178,40 +178,40 @@ KAccountTemplateSelector::~KAccountTemplateSelector() void KAccountTemplateSelector::slotLoadTemplateList(void) { #ifndef KMM_DESIGNER - QStringList dirs; + TQStringList dirs; // get list of template subdirs and scan them for the list of subdirs d->dirlist = KGlobal::dirs()->findDirs("appdata", "templates"); - QStringList::iterator it; + TQStringList::iterator it; for(it = d->dirlist.begin(); it != d->dirlist.end(); ++it) { - QDir dir(*it); + TQDir dir(*it); // qDebug("Reading dir '%s' with %d entries", (*it).data(), dir.count()); - dirs = dir.entryList("*", QDir::Dirs); - QStringList::iterator it_d; + dirs = dir.entryList("*", TQDir::Dirs); + TQStringList::iterator it_d; for(it_d= dirs.begin(); it_d != dirs.end(); ++it_d) { // we don't care about . and .. if((*it_d) == ".." || (*it_d) == "." || (*it_d) == "C") continue; - QRegExp exp("(..)_(..)"); + TQRegExp exp("(..)_(..)"); if(exp.search(*it_d) != -1) { - QString country = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2)); + TQString country = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2)); if(country.isEmpty()) country = exp.cap(2); - QString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); - if(d->countries.contains(country)) { + TQString lang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); + if(d->countries.tqcontains(country)) { if(d->countries[country] != *it_d) { - QString oName = d->countries[country]; + TQString oName = d->countries[country]; exp.search(oName); - QString oCountry = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2)); - QString oLang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); + TQString oCountry = KGlobal::locale()->twoAlphaToCountryName(exp.cap(2)); + TQString oLang = KGlobal::locale()->twoAlphaToLanguageName(exp.cap(1)); d->countries.remove(country); - d->countries[QString("%1 (%2)").arg(oCountry).arg(oLang)] = oName; - d->countries[QString("%1 (%2)").arg(country).arg(lang)] = *it_d; + d->countries[TQString("%1 (%2)").tqarg(oCountry).tqarg(oLang)] = oName; + d->countries[TQString("%1 (%2)").tqarg(country).tqarg(lang)] = *it_d; } } else { d->countries[country] = *it_d; } } else if((*it_d).length() == 2) { - QString country = KGlobal::locale()->twoAlphaToCountryName((*it_d).upper()); + TQString country = KGlobal::locale()->twoAlphaToCountryName((*it_d).upper()); d->countries[country] = *it_d; } else { qDebug("'%s/%s' not scanned", (*it).data(), (*it_d).data()); @@ -225,7 +225,7 @@ void KAccountTemplateSelector::slotLoadTemplateList(void) d->m_templates.clear(); d->it_m = d->countries.begin(); d->id = 1; - QTimer::singleShot(0, this, SLOT(slotLoadCountry())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadCountry())); #endif } @@ -233,18 +233,18 @@ void KAccountTemplateSelector::slotLoadCountry(void) { #ifndef KMM_DESIGNER - KListViewItem* parent = new KListViewItem(m_groupList, d->it_m.key()); - parent->setSelectable(false); - QStringList::iterator it; + KListViewItem* tqparent = new KListViewItem(m_groupList, d->it_m.key()); + tqparent->setSelectable(false); + TQStringList::iterator it; for(it = d->dirlist.begin(); it != d->dirlist.end(); ++it) { - QStringList::iterator it_f; - QDir dir(QString("%1%2").arg(*it).arg(*(d->it_m))); + TQStringList::iterator it_f; + TQDir dir(TQString("%1%2").tqarg(*it).tqarg(*(d->it_m))); if(dir.exists()) { - QStringList files = dir.entryList("*", QDir::Files); + TQStringList files = dir.entryList("*", TQDir::Files); for(it_f = files.begin(); it_f != files.end(); ++it_f) { - MyMoneyTemplate templ(QString("%1/%2").arg(dir.canonicalPath()).arg(*it_f)); - d->m_templates[QString("%1").arg(d->id)] = templ; - new KListViewItem(parent, templ.title(), templ.shortDescription(), QString("%1").arg(d->id)); + MyMoneyTemplate templ(TQString("%1/%2").tqarg(dir.canonicalPath()).tqarg(*it_f)); + d->m_templates[TQString("%1").tqarg(d->id)] = templ; + new KListViewItem(tqparent, templ.title(), templ.shortDescription(), TQString("%1").tqarg(d->id)); ++d->id; } } @@ -252,7 +252,7 @@ void KAccountTemplateSelector::slotLoadCountry(void) ++d->it_m; if(d->it_m != d->countries.end()) - QTimer::singleShot(0, this, SLOT(slotLoadCountry())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadCountry())); else { d->loadHierarchy(); } @@ -267,12 +267,12 @@ void KAccountTemplateSelector::slotLoadHierarchy(void) #endif } -QValueList<MyMoneyTemplate> KAccountTemplateSelector::selectedTemplates(void) const +TQValueList<MyMoneyTemplate> KAccountTemplateSelector::selectedTemplates(void) const { #ifndef KMM_DESIGNER return d->selectedTemplates(); #else - return QValueList<MyMoneyTemplate>(); + return TQValueList<MyMoneyTemplate>(); #endif } diff --git a/kmymoney2/widgets/kaccounttemplateselector.h b/kmymoney2/widgets/kaccounttemplateselector.h index df2c3fd..859d08f 100644 --- a/kmymoney2/widgets/kaccounttemplateselector.h +++ b/kmymoney2/widgets/kaccounttemplateselector.h @@ -36,11 +36,12 @@ class MyMoneyTemplate; class KAccountTemplateSelector : public KAccountTemplateSelectorDecl { Q_OBJECT + TQ_OBJECT public: - KAccountTemplateSelector(QWidget* parent = 0, const char* name = 0); + KAccountTemplateSelector(TQWidget* tqparent = 0, const char* name = 0); ~KAccountTemplateSelector(); - QValueList<MyMoneyTemplate> selectedTemplates(void) const; + TQValueList<MyMoneyTemplate> selectedTemplates(void) const; private slots: void slotLoadHierarchy(void); diff --git a/kmymoney2/widgets/kaccounttemplateselectordecl.cpp b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp index 8fed754..795ac29 100644 --- a/kmymoney2/widgets/kaccounttemplateselectordecl.cpp +++ b/kmymoney2/widgets/kaccounttemplateselectordecl.cpp @@ -2,8 +2,8 @@ #include <klocale.h> #ifndef KMM_I18N #define KMM_I18N -inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); } -inline QString kmm_i18n(const char* msg) { return i18n(msg); } +inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); } +inline TQString kmm_i18n(const char* msg) { return i18n(msg); } #endif /**************************************************************************** ** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kaccounttemplateselectordecl.ui' @@ -15,75 +15,75 @@ inline QString kmm_i18n(const char* msg) { return i18n(msg); } #include "kaccounttemplateselectordecl.h" -#include <qvariant.h> -#include <qpushbutton.h> -#include <qheader.h> +#include <tqvariant.h> +#include <tqpushbutton.h> +#include <tqheader.h> #include <klistview.h> -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <ktextedit.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> /* - * Constructs a KAccountTemplateSelectorDecl as a child of 'parent', with the + * Constructs a KAccountTemplateSelectorDecl as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. */ -KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "KAccountTemplateSelectorDecl" ); - KAccountTemplateSelectorDeclLayout = new QVBoxLayout( this, 0, 6, "KAccountTemplateSelectorDeclLayout"); + KAccountTemplateSelectorDeclLayout = new TQVBoxLayout( this, 0, 6, "KAccountTemplateSelectorDeclLayout"); m_groupList = new KListView( this, "m_groupList" ); m_groupList->addColumn( kmm_i18n( "Account Types" ) ); m_groupList->addColumn( kmm_i18n( "Description" ) ); - m_groupList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) ); - m_groupList->setMinimumSize( QSize( 0, 150 ) ); + m_groupList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, m_groupList->sizePolicy().hasHeightForWidth() ) ); + m_groupList->setMinimumSize( TQSize( 0, 150 ) ); m_groupList->setProperty( "selectionMode", "Extended" ); m_groupList->setAllColumnsShowFocus( TRUE ); m_groupList->setRootIsDecorated( TRUE ); m_groupList->setFullWidth( TRUE ); KAccountTemplateSelectorDeclLayout->addWidget( m_groupList ); - layout3 = new QHBoxLayout( 0, 0, 6, "layout3"); + tqlayout3 = new TQHBoxLayout( 0, 0, 6, "tqlayout3"); - groupBox1 = new QGroupBox( this, "groupBox1" ); - groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) ); + groupBox1 = new TQGroupBox( this, "groupBox1" ); + groupBox1->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 2, groupBox1->sizePolicy().hasHeightForWidth() ) ); groupBox1->setColumnLayout(0, Qt::Vertical ); - groupBox1->layout()->setSpacing( 6 ); - groupBox1->layout()->setMargin( 11 ); - groupBox1Layout = new QVBoxLayout( groupBox1->layout() ); - groupBox1Layout->setAlignment( Qt::AlignTop ); + groupBox1->tqlayout()->setSpacing( 6 ); + groupBox1->tqlayout()->setMargin( 11 ); + groupBox1Layout = new TQVBoxLayout( groupBox1->tqlayout() ); + groupBox1Layout->tqsetAlignment( TQt::AlignTop ); m_description = new KTextEdit( groupBox1, "m_description" ); - m_description->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) ); + m_description->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_description->sizePolicy().hasHeightForWidth() ) ); m_description->setReadOnly( TRUE ); groupBox1Layout->addWidget( m_description ); - layout3->addWidget( groupBox1 ); + tqlayout3->addWidget( groupBox1 ); - groupBox2 = new QGroupBox( this, "groupBox2" ); - groupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) ); + groupBox2 = new TQGroupBox( this, "groupBox2" ); + groupBox2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 2, groupBox2->sizePolicy().hasHeightForWidth() ) ); groupBox2->setColumnLayout(0, Qt::Vertical ); - groupBox2->layout()->setSpacing( 6 ); - groupBox2->layout()->setMargin( 11 ); - groupBox2Layout = new QVBoxLayout( groupBox2->layout() ); - groupBox2Layout->setAlignment( Qt::AlignTop ); + groupBox2->tqlayout()->setSpacing( 6 ); + groupBox2->tqlayout()->setMargin( 11 ); + groupBox2Layout = new TQVBoxLayout( groupBox2->tqlayout() ); + groupBox2Layout->tqsetAlignment( TQt::AlignTop ); m_accountList = new KListView( groupBox2, "m_accountList" ); m_accountList->addColumn( kmm_i18n( "Name" ) ); - m_accountList->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) ); - m_accountList->setMinimumSize( QSize( 0, 150 ) ); + m_accountList->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 3, m_accountList->sizePolicy().hasHeightForWidth() ) ); + m_accountList->setMinimumSize( TQSize( 0, 150 ) ); m_accountList->setProperty( "selectionMode", "NoSelection" ); m_accountList->setAllColumnsShowFocus( TRUE ); m_accountList->setRootIsDecorated( TRUE ); m_accountList->setFullWidth( TRUE ); groupBox2Layout->addWidget( m_accountList ); - layout3->addWidget( groupBox2 ); - KAccountTemplateSelectorDeclLayout->addLayout( layout3 ); + tqlayout3->addWidget( groupBox2 ); + KAccountTemplateSelectorDeclLayout->addLayout( tqlayout3 ); languageChange(); - resize( QSize(546, 346).expandedTo(minimumSizeHint()) ); + resize( TQSize(546, 346).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); } @@ -92,7 +92,7 @@ KAccountTemplateSelectorDecl::KAccountTemplateSelectorDecl( QWidget* parent, con */ KAccountTemplateSelectorDecl::~KAccountTemplateSelectorDecl() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* diff --git a/kmymoney2/widgets/kaccounttemplateselectordecl.ui b/kmymoney2/widgets/kaccounttemplateselectordecl.ui index 6ed4b6d..f4f2e55 100644 --- a/kmymoney2/widgets/kaccounttemplateselectordecl.ui +++ b/kmymoney2/widgets/kaccounttemplateselectordecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountTemplateSelectorDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KAccountTemplateSelectorDecl</cstring> </property> @@ -53,7 +53,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>150</height> @@ -72,15 +72,15 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -117,7 +117,7 @@ </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupBox2</cstring> </property> @@ -159,7 +159,7 @@ <verstretch>3</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>150</height> @@ -184,5 +184,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kbudgetvalues.cpp b/kmymoney2/widgets/kbudgetvalues.cpp index 2d6c2d7..994eac6 100644 --- a/kmymoney2/widgets/kbudgetvalues.cpp +++ b/kmymoney2/widgets/kbudgetvalues.cpp @@ -18,14 +18,14 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtabwidget.h> -#include <qlabel.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qwidgetstack.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qapplication.h> +#include <tqtabwidget.h> +#include <tqlabel.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqwidgetstack.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,11 +43,11 @@ #include "kbudgetvalues.h" #include <kmymoney/kmymoneyedit.h> -KBudgetValues::KBudgetValues(QWidget* parent, const char* name) : - KBudgetValuesDecl(parent, name), +KBudgetValues::KBudgetValues(TQWidget* tqparent, const char* name) : + KBudgetValuesDecl(tqparent, name), m_currentTab(m_monthlyButton) { - m_budgetDate = QDate(2007,1,1); + m_budgetDate = TQDate(2007,1,1); m_field[0] = m_amount1; m_field[1] = m_amount2; @@ -79,26 +79,26 @@ KBudgetValues::KBudgetValues(QWidget* parent, const char* name) : m_monthlyButton->setChecked(true); slotChangePeriod(m_periodGroup->id(m_monthlyButton)); - // connect(m_budgetLevel, SIGNAL(currentChanged(QWidget*)), this, SIGNAL(valuesChanged())); - connect(m_amountMonthly, SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate())); - connect(m_amountYearly, SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate())); + // connect(m_budgetLevel, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SIGNAL(valuesChanged())); + connect(m_amountMonthly, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate())); + connect(m_amountYearly, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate())); m_amountMonthly->installEventFilter(this); m_amountYearly->installEventFilter(this); for(int i=0; i < 12; ++i) { - connect(m_field[i], SIGNAL(valueChanged(const QString&)), this, SLOT(slotNeedUpdate())); + connect(m_field[i], TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotNeedUpdate())); m_field[i]->installEventFilter(this); } - connect(m_clearButton, SIGNAL(clicked()), this, SLOT(slotClearAllValues())); - connect(m_periodGroup, SIGNAL(clicked(int)), this, SLOT(slotChangePeriod(int))); - connect(this, SIGNAL(valuesChanged()), this, SLOT(slotUpdateClearButton())); + connect(m_clearButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClearAllValues())); + connect(m_periodGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotChangePeriod(int))); + connect(this, TQT_SIGNAL(valuesChanged()), this, TQT_SLOT(slotUpdateClearButton())); KGuiItem clearItem(KStdGuiItem::clear()); m_clearButton->setGuiItem(clearItem); m_clearButton->setText(""); - QToolTip::add(m_clearButton, clearItem.toolTip()); + TQToolTip::add(m_clearButton, clearItem.toolTip()); } @@ -106,22 +106,22 @@ KBudgetValues::~KBudgetValues() { } -bool KBudgetValues::eventFilter(QObject* o, QEvent* e) +bool KBudgetValues::eventFilter(TQObject* o, TQEvent* e) { bool rc = false; if(o->isWidgetType() - && (e->type() == QEvent::KeyPress)) { - QKeyEvent* k = dynamic_cast<QKeyEvent*>(e); - if((k->state() & Qt::KeyButtonMask) == 0) { - QKeyEvent evt(e->type(), - Qt::Key_Tab, 0, k->state(), QString::null, + && (e->type() == TQEvent::KeyPress)) { + TQKeyEvent* k = dynamic_cast<TQKeyEvent*>(e); + if((k->state() & TQt::KeyButtonMask) == 0) { + TQKeyEvent evt(e->type(), + TQt::Key_Tab, 0, k->state(), TQString(), k->isAutoRepeat(), k->count()); switch(k->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: + case TQt::Key_Return: + case TQt::Key_Enter: // send out a TAB key event - QApplication::sendEvent( o, &evt ); + TQApplication::sendEvent( o, &evt ); // don't process this one any further rc = true; break; @@ -145,7 +145,7 @@ void KBudgetValues::clear(void) void KBudgetValues::slotClearAllValues(void) { - QWidget* tab = m_periodGroup->selected(); + TQWidget* tab = m_periodGroup->selected(); if(tab == m_monthlyButton) { m_amountMonthly->setValue(MyMoneyMoney()); } else if(tab == m_yearlyButton) { @@ -166,7 +166,7 @@ void KBudgetValues::slotChangePeriod(int id) return; inside = true; - QWidget *tab = m_periodGroup->find(id); + TQWidget *tab = m_periodGroup->tqfind(id); fillMonthLabels(); MyMoneyMoney newValue; @@ -184,7 +184,7 @@ void KBudgetValues::slotChangePeriod(int id) newValue = (newValue / MyMoneyMoney(12, 1)).convert(); } if(!newValue.isZero()) { - if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in a monthly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in a monthly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { m_amountMonthly->setValue(newValue); } } @@ -203,7 +203,7 @@ void KBudgetValues::slotChangePeriod(int id) newValue += m_field[i]->value(); } if(!newValue.isZero()) { - if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in a yearly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in a yearly budget of <b>%1</b>. Should this value be used to fill the monthly budget?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { m_amountYearly->setValue(newValue); } } @@ -222,7 +222,7 @@ void KBudgetValues::slotChangePeriod(int id) } if(!newValue.isZero()) { - if(KMessageBox::questionYesNo(this, QString("<qt>")+i18n("You have entered budget values using a different base which would result in an individual monthly budget of <b>%1</b>. Should this value be used to fill the monthly budgets?").arg(newValue.formatMoney("", 2))+QString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { + if(KMessageBox::questionYesNo(this, TQString("<qt>")+i18n("You have entered budget values using a different base which would result in an individual monthly budget of <b>%1</b>. Should this value be used to fill the monthly budgets?").tqarg(newValue.formatMoney("", 2))+TQString("</qt>"), i18n("Auto assignment (caption)", "Auto assignment"), KStdGuiItem::yes(), KStdGuiItem::no(), "use_previous_budget_values") == KMessageBox::Yes) { for(int i=0; i < 12; ++i) m_field[i]->setValue(newValue); } @@ -238,7 +238,7 @@ void KBudgetValues::slotChangePeriod(int id) void KBudgetValues::slotNeedUpdate(void) { if(!signalsBlocked()) - QTimer::singleShot(0, this, SIGNAL(valuesChanged())); + TQTimer::singleShot(0, this, TQT_SIGNAL(valuesChanged())); } void KBudgetValues::enableMonths(bool enabled) @@ -251,7 +251,7 @@ void KBudgetValues::enableMonths(bool enabled) void KBudgetValues::fillMonthLabels(void) { - QDate date(m_budgetDate); + TQDate date(m_budgetDate); for(int i = 0; i < 12; ++i) { m_label[i]->setText(KGlobal::locale()->calendar()->monthName(date, true)); date = date.addMonths(1); @@ -262,7 +262,7 @@ void KBudgetValues::setBudgetValues(const MyMoneyBudget& budget, const MyMoneyBu { MyMoneyBudget::PeriodGroup period; m_budgetDate = budget.budgetStart(); - QDate date; + TQDate date; // make sure all values are zero so that slotChangePeriod() // doesn't check for anything. @@ -300,7 +300,7 @@ void KBudgetValues::budgetValues(const MyMoneyBudget& budget, MyMoneyBudget::Acc MyMoneyBudget::PeriodGroup period; m_budgetDate = budget.budgetStart(); period.setStartDate(m_budgetDate); - QDate date; + TQDate date; budgetAccount.clearPeriods(); if(m_periodGroup->selected() == m_monthlyButton) { diff --git a/kmymoney2/widgets/kbudgetvalues.h b/kmymoney2/widgets/kbudgetvalues.h index 5b8c2cc..e2e7a09 100644 --- a/kmymoney2/widgets/kbudgetvalues.h +++ b/kmymoney2/widgets/kbudgetvalues.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdatetime.h> -class QLabel; +#include <tqdatetime.h> +class TQLabel; // ---------------------------------------------------------------------------- // KDE Includes @@ -40,8 +40,9 @@ class kMyMoneyEdit; class KBudgetValues : public KBudgetValuesDecl { Q_OBJECT + TQ_OBJECT public: - KBudgetValues(QWidget* parent = 0, const char* name = 0); + KBudgetValues(TQWidget* tqparent = 0, const char* name = 0); ~KBudgetValues(); void setBudgetValues(const MyMoneyBudget& budget, const MyMoneyBudget::AccountGroup& budgetAccount); @@ -69,13 +70,13 @@ class KBudgetValues : public KBudgetValuesDecl void slotUpdateClearButton(void); protected: - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); private: kMyMoneyEdit* m_field[12]; - QLabel* m_label[12]; - QWidget* m_currentTab; - QDate m_budgetDate; + TQLabel* m_label[12]; + TQWidget* m_currentTab; + TQDate m_budgetDate; signals: void valuesChanged(void); diff --git a/kmymoney2/widgets/kbudgetvaluesdecl.cpp b/kmymoney2/widgets/kbudgetvaluesdecl.cpp index 43d71f5..ac2e9f7 100644 --- a/kmymoney2/widgets/kbudgetvaluesdecl.cpp +++ b/kmymoney2/widgets/kbudgetvaluesdecl.cpp @@ -2,8 +2,8 @@ #include <klocale.h> #ifndef KMM_I18N #define KMM_I18N -inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); } -inline QString kmm_i18n(const char* msg) { return i18n(msg); } +inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); } +inline TQString kmm_i18n(const char* msg) { return i18n(msg); } #endif /**************************************************************************** ** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kbudgetvaluesdecl.ui' @@ -15,190 +15,190 @@ inline QString kmm_i18n(const char* msg) { return i18n(msg); } #include "kbudgetvaluesdecl.h" -#include <qvariant.h> +#include <tqvariant.h> #include <kmymoney/kmymoneyedit.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qwidgetstack.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqwidgetstack.h> #include <kpushbutton.h> -#include <qbuttongroup.h> -#include <qradiobutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqradiobutton.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> /* - * Constructs a KBudgetValuesDecl as a child of 'parent', with the + * Constructs a KBudgetValuesDecl as a child of 'tqparent', with the * name 'name' and widget flags set to 'f'. */ -KBudgetValuesDecl::KBudgetValuesDecl( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) +KBudgetValuesDecl::KBudgetValuesDecl( TQWidget* tqparent, const char* name, WFlags fl ) + : TQWidget( tqparent, name, fl ) { if ( !name ) setName( "KBudgetValuesDecl" ); - KBudgetValuesDeclLayout = new QGridLayout( this, 1, 1, 0, 6, "KBudgetValuesDeclLayout"); + KBudgetValuesDeclLayout = new TQGridLayout( this, 1, 1, 0, 6, "KBudgetValuesDeclLayout"); m_amount10 = new kMyMoneyEdit( this, "m_amount10" ); - m_amount10->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount10->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount10, 3, 5 ); m_amount6 = new kMyMoneyEdit( this, "m_amount6" ); - m_amount6->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount6->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount6, 5, 3 ); m_amount5 = new kMyMoneyEdit( this, "m_amount5" ); - m_amount5->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount5->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount5, 4, 3 ); - m_label6 = new QLabel( this, "m_label6" ); + m_label6 = new TQLabel( this, "m_label6" ); KBudgetValuesDeclLayout->addWidget( m_label6, 5, 2 ); - m_label8 = new QLabel( this, "m_label8" ); + m_label8 = new TQLabel( this, "m_label8" ); KBudgetValuesDeclLayout->addWidget( m_label8, 1, 4 ); m_amount9 = new kMyMoneyEdit( this, "m_amount9" ); - m_amount9->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount9->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount9, 2, 5 ); m_amount11 = new kMyMoneyEdit( this, "m_amount11" ); - m_amount11->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount11->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount11, 4, 5 ); - m_label12 = new QLabel( this, "m_label12" ); + m_label12 = new TQLabel( this, "m_label12" ); KBudgetValuesDeclLayout->addWidget( m_label12, 5, 4 ); - m_label10 = new QLabel( this, "m_label10" ); + m_label10 = new TQLabel( this, "m_label10" ); KBudgetValuesDeclLayout->addWidget( m_label10, 3, 4 ); - m_label7 = new QLabel( this, "m_label7" ); + m_label7 = new TQLabel( this, "m_label7" ); KBudgetValuesDeclLayout->addWidget( m_label7, 0, 4 ); m_amount3 = new kMyMoneyEdit( this, "m_amount3" ); - m_amount3->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount3->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount3, 2, 3 ); - m_label4 = new QLabel( this, "m_label4" ); + m_label4 = new TQLabel( this, "m_label4" ); KBudgetValuesDeclLayout->addWidget( m_label4, 3, 2 ); m_amount12 = new kMyMoneyEdit( this, "m_amount12" ); - m_amount12->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount12->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount12, 5, 5 ); - m_label3 = new QLabel( this, "m_label3" ); + m_label3 = new TQLabel( this, "m_label3" ); KBudgetValuesDeclLayout->addWidget( m_label3, 2, 2 ); - m_label1 = new QLabel( this, "m_label1" ); + m_label1 = new TQLabel( this, "m_label1" ); KBudgetValuesDeclLayout->addWidget( m_label1, 0, 2 ); - m_label2 = new QLabel( this, "m_label2" ); + m_label2 = new TQLabel( this, "m_label2" ); KBudgetValuesDeclLayout->addWidget( m_label2, 1, 2 ); - m_label5 = new QLabel( this, "m_label5" ); + m_label5 = new TQLabel( this, "m_label5" ); KBudgetValuesDeclLayout->addWidget( m_label5, 4, 2 ); - m_label11 = new QLabel( this, "m_label11" ); + m_label11 = new TQLabel( this, "m_label11" ); KBudgetValuesDeclLayout->addWidget( m_label11, 4, 4 ); m_amount4 = new kMyMoneyEdit( this, "m_amount4" ); - m_amount4->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount4->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount4, 3, 3 ); - m_label9 = new QLabel( this, "m_label9" ); + m_label9 = new TQLabel( this, "m_label9" ); KBudgetValuesDeclLayout->addWidget( m_label9, 2, 4 ); m_amount8 = new kMyMoneyEdit( this, "m_amount8" ); - m_amount8->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount8->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount8, 1, 5 ); m_amount2 = new kMyMoneyEdit( this, "m_amount2" ); - m_amount2->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount2->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount2, 1, 3 ); m_amount7 = new kMyMoneyEdit( this, "m_amount7" ); - m_amount7->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount7->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); KBudgetValuesDeclLayout->addWidget( m_amount7, 0, 5 ); - m_firstItemStack = new QWidgetStack( this, "m_firstItemStack" ); + m_firstItemStack = new TQWidgetStack( this, "m_firstItemStack" ); - m_monthlyPage = new QWidget( m_firstItemStack, "m_monthlyPage" ); - m_monthlyPageLayout = new QHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout"); + m_monthlyPage = new TQWidget( m_firstItemStack, "m_monthlyPage" ); + m_monthlyPageLayout = new TQHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout"); m_amountMonthly = new kMyMoneyEdit( m_monthlyPage, "m_amountMonthly" ); - m_amountMonthly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amountMonthly->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); m_monthlyPageLayout->addWidget( m_amountMonthly ); m_firstItemStack->addWidget( m_monthlyPage, 0 ); - m_yearlyPage = new QWidget( m_firstItemStack, "m_yearlyPage" ); - m_yearlyPageLayout = new QHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout"); + m_yearlyPage = new TQWidget( m_firstItemStack, "m_yearlyPage" ); + m_yearlyPageLayout = new TQHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout"); m_amountYearly = new kMyMoneyEdit( m_yearlyPage, "m_amountYearly" ); - m_amountYearly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amountYearly->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); m_yearlyPageLayout->addWidget( m_amountYearly ); m_firstItemStack->addWidget( m_yearlyPage, 1 ); - m_individualPage = new QWidget( m_firstItemStack, "m_individualPage" ); - m_individualPageLayout = new QHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout"); + m_individualPage = new TQWidget( m_firstItemStack, "m_individualPage" ); + m_individualPageLayout = new TQHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout"); m_amount1 = new kMyMoneyEdit( m_individualPage, "m_amount1" ); - m_amount1->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_amount1->setProperty( "resetButtonVisibility", TQVariant( FALSE, 0 ) ); m_individualPageLayout->addWidget( m_amount1 ); m_firstItemStack->addWidget( m_individualPage, 2 ); KBudgetValuesDeclLayout->addWidget( m_firstItemStack, 0, 3 ); - layout12 = new QVBoxLayout( 0, 0, 6, "layout12"); + tqlayout12 = new TQVBoxLayout( 0, 0, 6, "tqlayout12"); m_clearButton = new KPushButton( this, "m_clearButton" ); - layout12->addWidget( m_clearButton ); - spacer7 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding ); - layout12->addItem( spacer7 ); + tqlayout12->addWidget( m_clearButton ); + spacer7 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); + tqlayout12->addItem( spacer7 ); - KBudgetValuesDeclLayout->addMultiCellLayout( layout12, 0, 5, 1, 1 ); + KBudgetValuesDeclLayout->addMultiCellLayout( tqlayout12, 0, 5, 1, 1 ); - m_periodGroup = new QButtonGroup( this, "m_periodGroup" ); + m_periodGroup = new TQButtonGroup( this, "m_periodGroup" ); m_periodGroup->setColumnLayout(0, Qt::Vertical ); - m_periodGroup->layout()->setSpacing( 6 ); - m_periodGroup->layout()->setMargin( 11 ); - m_periodGroupLayout = new QVBoxLayout( m_periodGroup->layout() ); - m_periodGroupLayout->setAlignment( Qt::AlignTop ); + m_periodGroup->tqlayout()->setSpacing( 6 ); + m_periodGroup->tqlayout()->setMargin( 11 ); + m_periodGroupLayout = new TQVBoxLayout( m_periodGroup->tqlayout() ); + m_periodGroupLayout->tqsetAlignment( TQt::AlignTop ); - m_monthlyButton = new QRadioButton( m_periodGroup, "m_monthlyButton" ); + m_monthlyButton = new TQRadioButton( m_periodGroup, "m_monthlyButton" ); m_periodGroupLayout->addWidget( m_monthlyButton ); - m_yearlyButton = new QRadioButton( m_periodGroup, "m_yearlyButton" ); + m_yearlyButton = new TQRadioButton( m_periodGroup, "m_yearlyButton" ); m_periodGroupLayout->addWidget( m_yearlyButton ); - m_individualButton = new QRadioButton( m_periodGroup, "m_individualButton" ); + m_individualButton = new TQRadioButton( m_periodGroup, "m_individualButton" ); m_periodGroupLayout->addWidget( m_individualButton ); - spacer10 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding ); + spacer10 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); m_periodGroupLayout->addItem( spacer10 ); KBudgetValuesDeclLayout->addMultiCellWidget( m_periodGroup, 0, 5, 0, 0 ); languageChange(); - resize( QSize(553, 188).expandedTo(minimumSizeHint()) ); + resize( TQSize(553, 188).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); // tab order @@ -226,7 +226,7 @@ KBudgetValuesDecl::KBudgetValuesDecl( QWidget* parent, const char* name, WFlags */ KBudgetValuesDecl::~KBudgetValuesDecl() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } /* @@ -247,7 +247,7 @@ void KBudgetValuesDecl::languageChange() m_label5->setText( kmm_i18n( "xxx" ) ); m_label11->setText( kmm_i18n( "xxx" ) ); m_label9->setText( kmm_i18n( "xxx" ) ); - m_clearButton->setText( QString::null ); + m_clearButton->setText( TQString() ); m_periodGroup->setTitle( kmm_i18n( "Period" ) ); m_monthlyButton->setText( kmm_i18n( "Monthly" ) ); m_yearlyButton->setText( kmm_i18n( "Yearly" ) ); diff --git a/kmymoney2/widgets/kbudgetvaluesdecl.ui b/kmymoney2/widgets/kbudgetvaluesdecl.ui index 6870d64..bfc2d1d 100644 --- a/kmymoney2/widgets/kbudgetvaluesdecl.ui +++ b/kmymoney2/widgets/kbudgetvaluesdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KBudgetValuesDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KBudgetValuesDecl</cstring> </property> @@ -43,7 +43,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="5" column="2"> + <widget class="TQLabel" row="5" column="2"> <property name="name"> <cstring>m_label6</cstring> </property> @@ -51,7 +51,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="1" column="4"> + <widget class="TQLabel" row="1" column="4"> <property name="name"> <cstring>m_label8</cstring> </property> @@ -75,7 +75,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="5" column="4"> + <widget class="TQLabel" row="5" column="4"> <property name="name"> <cstring>m_label12</cstring> </property> @@ -83,7 +83,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="3" column="4"> + <widget class="TQLabel" row="3" column="4"> <property name="name"> <cstring>m_label10</cstring> </property> @@ -91,7 +91,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="0" column="4"> + <widget class="TQLabel" row="0" column="4"> <property name="name"> <cstring>m_label7</cstring> </property> @@ -107,7 +107,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="3" column="2"> + <widget class="TQLabel" row="3" column="2"> <property name="name"> <cstring>m_label4</cstring> </property> @@ -123,7 +123,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>m_label3</cstring> </property> @@ -131,7 +131,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>m_label1</cstring> </property> @@ -139,7 +139,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>m_label2</cstring> </property> @@ -147,7 +147,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="4" column="2"> + <widget class="TQLabel" row="4" column="2"> <property name="name"> <cstring>m_label5</cstring> </property> @@ -155,7 +155,7 @@ <string>xxx</string> </property> </widget> - <widget class="QLabel" row="4" column="4"> + <widget class="TQLabel" row="4" column="4"> <property name="name"> <cstring>m_label11</cstring> </property> @@ -171,7 +171,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLabel" row="2" column="4"> + <widget class="TQLabel" row="2" column="4"> <property name="name"> <cstring>m_label9</cstring> </property> @@ -203,11 +203,11 @@ <bool>false</bool> </property> </widget> - <widget class="QWidgetStack" row="0" column="3"> + <widget class="TQWidgetStack" row="0" column="3"> <property name="name"> <cstring>m_firstItemStack</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_monthlyPage</cstring> </property> @@ -231,7 +231,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_yearlyPage</cstring> </property> @@ -255,7 +255,7 @@ </widget> </hbox> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>m_individualPage</cstring> </property> @@ -280,9 +280,9 @@ </hbox> </widget> </widget> - <widget class="QLayoutWidget" row="0" column="1" rowspan="6" colspan="1"> + <widget class="TQLayoutWidget" row="0" column="1" rowspan="6" colspan="1"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <vbox> <property name="name"> @@ -306,7 +306,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -315,7 +315,7 @@ </spacer> </vbox> </widget> - <widget class="QButtonGroup" row="0" column="0" rowspan="6" colspan="1"> + <widget class="TQButtonGroup" row="0" column="0" rowspan="6" colspan="1"> <property name="name"> <cstring>m_periodGroup</cstring> </property> @@ -326,7 +326,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_monthlyButton</cstring> </property> @@ -334,7 +334,7 @@ <string>Monthly</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_yearlyButton</cstring> </property> @@ -342,7 +342,7 @@ <string>Yearly</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>m_individualButton</cstring> </property> @@ -360,7 +360,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -396,5 +396,5 @@ <includes> <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> </includes> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kguiutils.cpp b/kmymoney2/widgets/kguiutils.cpp index c6157f9..f0e1d91 100644 --- a/kmymoney2/widgets/kguiutils.cpp +++ b/kmymoney2/widgets/kguiutils.cpp @@ -17,16 +17,16 @@ // ---------------------------------------------------------------------------- // QT Includes - // No need for QDateEdit, QSpinBox, etc., since these always return values + // No need for TQDateEdit, TQSpinBox, etc., since these always return values -#include <qcheckbox.h> -#include <qlistbox.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qwidget.h> -#include <qhbox.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqwidget.h> +#include <tqhbox.h> +#include <tqspinbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,46 +40,46 @@ /************************************************************************** * * * The MandatoryFieldGroup code is courtesy of * - * Mark Summerfield in Qt Quarterly * + * Mark Summerfield in TQt Quarterly * * http://doc.trolltech.com/qq/qq11-mandatoryfields.html * * * * Enhanced by Thomas Baumgart to support the lineedit field of a * - * a QComboBox. * + * a TQComboBox. * * * **************************************************************************/ -void kMandatoryFieldGroup::add(QWidget *widget) +void kMandatoryFieldGroup::add(TQWidget *widget) { - if (!widgets.contains(widget)) { - if (widget->inherits("QCheckBox")) - connect((QCheckBox*)widget->qt_cast("QCheckBox"), - SIGNAL(clicked()), - this, SLOT(changed())); - - else if (widget->inherits("QComboBox")) { - QComboBox* combo = (QComboBox*)widget->qt_cast("QComboBox"); - QLineEdit* lineedit = combo->lineEdit(); + if (!widgets.tqcontains(widget)) { + if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) + connect((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING), + TQT_SIGNAL(clicked()), + this, TQT_SLOT(changed())); + + else if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) { + TQComboBox* combo = (TQComboBox*)widget->qt_cast(TQCOMBOBOX_OBJECT_NAME_STRING); + TQLineEdit* lineedit = combo->lineEdit(); if(lineedit) { - connect(lineedit, SIGNAL(textChanged(const QString&)), this, SLOT(changed())); + connect(lineedit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changed())); } else { - connect(combo, SIGNAL(highlighted(int)), this, SLOT(changed())); + connect(combo, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(changed())); } } - else if (widget->inherits("QLineEdit")) - connect((QLineEdit*)widget->qt_cast("QLineEdit"), - SIGNAL(textChanged(const QString&)), - this, SLOT(changed())); + else if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) + connect((TQLineEdit*)widget->qt_cast(TQLINEEDIT_OBJECT_NAME_STRING), + TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(changed())); - else if (widget->inherits("QSpinBox")) - connect((QSpinBox*)widget->qt_cast("QSpinBox"), - SIGNAL(valueChanged(const QString&)), - this, SLOT(changed())); + else if (widget->inherits(TQSPINBOX_OBJECT_NAME_STRING)) + connect((TQSpinBox*)widget->qt_cast(TQSPINBOX_OBJECT_NAME_STRING), + TQT_SIGNAL(valueChanged(const TQString&)), + this, TQT_SLOT(changed())); - else if (widget->inherits("QListBox")) - connect((QListBox*)widget->qt_cast("QListBox"), - SIGNAL(selectionChanged()), - this, SLOT(changed())); + else if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING)) + connect((TQListBox*)widget->qt_cast(TQLISTBOX_OBJECT_NAME_STRING), + TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(changed())); else { qWarning("MandatoryFieldGroup: unsupported class %s", @@ -94,15 +94,15 @@ void kMandatoryFieldGroup::add(QWidget *widget) } -void kMandatoryFieldGroup::remove(QWidget *widget) +void kMandatoryFieldGroup::remove(TQWidget *widget) { - widget->setPaletteBackgroundColor(widget->colorGroup().background()); + widget->setPaletteBackgroundColor(widget->tqcolorGroup().background()); widgets.remove(widget); changed(); } -void kMandatoryFieldGroup::setOkButton(QPushButton *button) +void kMandatoryFieldGroup::setOkButton(TQPushButton *button) { if (okButton && okButton != button) okButton->setEnabled(true); @@ -114,36 +114,36 @@ void kMandatoryFieldGroup::setOkButton(QPushButton *button) void kMandatoryFieldGroup::changed(void) { bool enable = true; - QValueList<QWidget *>::ConstIterator i; + TQValueList<TQWidget *>::ConstIterator i; for (i = widgets.begin(); i != widgets.end(); ++i) { - QWidget *widget = *i; + TQWidget *widget = *i; // disabled widgets don't count if(!(widget->isEnabled())) { continue; } - if (widget->inherits("QCheckBox")) { - if (((QCheckBox*)widget->qt_cast("QCheckBox"))->state() == QButton::NoChange) { + if (widget->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { + if (((TQCheckBox*)widget->qt_cast(TQCHECKBOX_OBJECT_NAME_STRING))->state() == TQButton::NoChange) { enable = false; break; } else continue; } - if (widget->inherits("QComboBox")) { - if (((QComboBox*)widget->qt_cast("QComboBox"))->currentText().isEmpty()) { + if (widget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING)) { + if (((TQComboBox*)widget->qt_cast(TQCOMBOBOX_OBJECT_NAME_STRING))->currentText().isEmpty()) { enable = false; break; } else continue; } - if (widget->inherits("QLineEdit")) { - if (((QLineEdit*)widget->qt_cast("QLineEdit"))->text().isEmpty()) { + if (widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { + if (((TQLineEdit*)widget->qt_cast(TQLINEEDIT_OBJECT_NAME_STRING))->text().isEmpty()) { enable = false; break; } else continue; } - if (widget->inherits("QListBox")) { - if (((QListBox*)widget->qt_cast("QListBox"))->selectedItem() == 0) { + if (widget->inherits(TQLISTBOX_OBJECT_NAME_STRING)) { + if (((TQListBox*)widget->qt_cast(TQLISTBOX_OBJECT_NAME_STRING))->selectedItem() == 0) { enable = false; break; } else @@ -162,9 +162,9 @@ void kMandatoryFieldGroup::changed(void) void kMandatoryFieldGroup::clear(void) { - QValueList<QWidget *>::Iterator i; + TQValueList<TQWidget *>::Iterator i; for (i = widgets.begin(); i != widgets.end(); ++i) - (*i)->setPaletteBackgroundColor((*i)->colorGroup().background()); + (*i)->setPaletteBackgroundColor((*i)->tqcolorGroup().background()); widgets.clear(); if (okButton) { okButton->setEnabled(true); diff --git a/kmymoney2/widgets/kguiutils.h b/kmymoney2/widgets/kguiutils.h index 9a7b603..94cd756 100644 --- a/kmymoney2/widgets/kguiutils.h +++ b/kmymoney2/widgets/kguiutils.h @@ -21,9 +21,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qvaluelist.h> -class QWidget; +#include <tqobject.h> +#include <tqvaluelist.h> +class TQWidget; // ---------------------------------------------------------------------------- // KDE Includes @@ -37,27 +37,28 @@ class QWidget; /** * @author Tony Bloomfield */ -class kMandatoryFieldGroup : public QObject +class kMandatoryFieldGroup : public TQObject { Q_OBJECT + TQ_OBJECT public: - kMandatoryFieldGroup(QObject *parent) : - QObject(parent), okButton(0), m_enabled(true) {} + kMandatoryFieldGroup(TQObject *tqparent) : + TQObject(tqparent), okButton(0), m_enabled(true) {} /** * This method adds a widget to the list of mandatory fields for the current dialog * * @param widget pointer to the widget to be added */ - void add(QWidget *widget); + void add(TQWidget *widget); /** * This method removes a widget form the list of mandatory fields for the current dialog * * @param widget pointer to the widget to be removed */ - void remove(QWidget *widget); + void remove(TQWidget *widget); /** * This method designates the button to be enabled when all mandatory fields @@ -65,7 +66,7 @@ public: * * @param button pointer to the 'ok' button */ - void setOkButton(QPushButton *button); + void setOkButton(TQPushButton *button); /** * This method returns if all requirements for the mandatory group @@ -86,8 +87,8 @@ signals: void stateChanged(bool state); private: - QValueList<QWidget *> widgets; - QPushButton* okButton; + TQValueList<TQWidget *> widgets; + TQPushButton* okButton; bool m_enabled; }; diff --git a/kmymoney2/widgets/klistviewsearchline.cpp b/kmymoney2/widgets/klistviewsearchline.cpp index 5aba160..cd27928 100644 --- a/kmymoney2/widgets/klistviewsearchline.cpp +++ b/kmymoney2/widgets/klistviewsearchline.cpp @@ -25,11 +25,11 @@ #include <kdebug.h> #include <klocale.h> -#include <qapplication.h> -#include <qtimer.h> -#include <qpopupmenu.h> -#include <qlabel.h> -#include <qheader.h> +#include <tqapplication.h> +#include <tqtimer.h> +#include <tqpopupmenu.h> +#include <tqlabel.h> +#include <tqheader.h> #define KLISTVIEWSEARCHLINE_ALLVISIBLECOLUMNS_ID 2004 @@ -47,47 +47,47 @@ public: bool caseSensitive; bool activeSearch; bool keepParentsVisible; - QString search; + TQString search; int queuedSearches; - QValueList<int> searchColumns; + TQValueList<int> searchColumns; }; //////////////////////////////////////////////////////////////////////////////// // public methods //////////////////////////////////////////////////////////////////////////////// -KListViewSearchLine::KListViewSearchLine(QWidget *parent, KListView *listView, const char *name) : - KLineEdit(parent, name) +KListViewSearchLine::KListViewSearchLine(TQWidget *tqparent, KListView *listView, const char *name) : + KLineEdit(tqparent, name) { d = new KListViewSearchLinePrivate; d->listView = listView; - connect(this, SIGNAL(textChanged(const QString &)), - this, SLOT(queueSearch(const QString &))); + connect(this, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(queueSearch(const TQString &))); if(listView) { - connect(listView, SIGNAL(destroyed()), - this, SLOT(listViewDeleted())); + connect(listView, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(listViewDeleted())); #if KDE_IS_VERSION(3,3,0) - connect(listView, SIGNAL(itemAdded(QListViewItem *)), - this, SLOT(itemAdded(QListViewItem *))); + connect(listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), + this, TQT_SLOT(itemAdded(TQListViewItem *))); #endif } else setEnabled(false); } -KListViewSearchLine::KListViewSearchLine(QWidget *parent, const char *name) : - KLineEdit(parent, name) +KListViewSearchLine::KListViewSearchLine(TQWidget *tqparent, const char *name) : + KLineEdit(tqparent, name) { d = new KListViewSearchLinePrivate; d->listView = 0; - connect(this, SIGNAL(textChanged(const QString &)), - this, SLOT(queueSearch(const QString &))); + connect(this, TQT_SIGNAL(textChanged(const TQString &)), + this, TQT_SLOT(queueSearch(const TQString &))); setEnabled(false); } @@ -102,7 +102,7 @@ bool KListViewSearchLine::caseSensitive() const return d->caseSensitive; } -QValueList<int> KListViewSearchLine::searchColumns() const +TQValueList<int> KListViewSearchLine::searchColumns() const { return d->searchColumns; } @@ -121,7 +121,7 @@ KListView *KListViewSearchLine::listView() const // public slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::updateSearch(const QString &s) +void KListViewSearchLine::updateSearch(const TQString &s) { if(!d->listView) return; @@ -131,7 +131,7 @@ void KListViewSearchLine::updateSearch(const QString &s) // If there's a selected item that is visible, make sure that it's visible // when the search changes too (assuming that it still matches). - QListViewItem *currentItem = 0; + TQListViewItem *currentItem = 0; switch(d->listView->selectionMode()) { @@ -142,12 +142,12 @@ void KListViewSearchLine::updateSearch(const QString &s) break; default: { - int flags = QListViewItemIterator::Selected | QListViewItemIterator::Visible; - for(QListViewItemIterator it(d->listView, flags); + int flags = TQListViewItemIterator::Selected | TQListViewItemIterator::Visible; + for(TQListViewItemIterator it(d->listView, flags); it.current() && !currentItem; ++it) { - if(d->listView->itemRect(it.current()).isValid()) + if(d->listView->tqitemRect(it.current()).isValid()) currentItem = it.current(); } } @@ -172,7 +172,7 @@ void KListViewSearchLine::setKeepParentsVisible(bool v) d->keepParentsVisible = v; } -void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns) +void KListViewSearchLine::setSearchColumns(const TQValueList<int> &columns) { d->searchColumns = columns; } @@ -180,24 +180,24 @@ void KListViewSearchLine::setSearchColumns(const QValueList<int> &columns) void KListViewSearchLine::setListView(KListView *lv) { if(d->listView) { - disconnect(d->listView, SIGNAL(destroyed()), - this, SLOT(listViewDeleted())); + disconnect(d->listView, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(listViewDeleted())); #if KDE_IS_VERSION(3,3,0) - disconnect(d->listView, SIGNAL(itemAdded(QListViewItem *)), - this, SLOT(itemAdded(QListViewItem *))); + disconnect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), + this, TQT_SLOT(itemAdded(TQListViewItem *))); #endif } d->listView = lv; if(lv) { - connect(d->listView, SIGNAL(destroyed()), - this, SLOT(listViewDeleted())); + connect(d->listView, TQT_SIGNAL(destroyed()), + this, TQT_SLOT(listViewDeleted())); #if KDE_IS_VERSION(3,3,0) - connect(d->listView, SIGNAL(itemAdded(QListViewItem *)), - this, SLOT(itemAdded(QListViewItem *))); + connect(d->listView, TQT_SIGNAL(itemAdded(TQListViewItem *)), + this, TQT_SLOT(itemAdded(TQListViewItem *))); #endif } @@ -208,7 +208,7 @@ void KListViewSearchLine::setListView(KListView *lv) // protected members //////////////////////////////////////////////////////////////////////////////// -bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString &s) const +bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString &s) const { if(s.isEmpty()) return true; @@ -217,17 +217,17 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString & // specifified. If it is empty default to searching all of the columns. if(!d->searchColumns.isEmpty()) { - QValueList<int>::ConstIterator it = d->searchColumns.begin(); + TQValueList<int>::ConstIterator it = d->searchColumns.begin(); for(; it != d->searchColumns.end(); ++it) { if(*it < item->listView()->columns() && - item->text(*it).find(s, 0, d->caseSensitive) >= 0) + item->text(*it).tqfind(s, 0, d->caseSensitive) >= 0) return true; } } else { for(int i = 0; i < item->listView()->columns(); i++) { if(item->listView()->columnWidth(i) > 0 && - item->text(i).find(s, 0, d->caseSensitive) >= 0) + item->text(i).tqfind(s, 0, d->caseSensitive) >= 0) { return true; } @@ -237,13 +237,13 @@ bool KListViewSearchLine::itemMatches(const QListViewItem *item, const QString & return false; } -QPopupMenu *KListViewSearchLine::createPopupMenu() +TQPopupMenu *KListViewSearchLine::createPopupMenu() { - QPopupMenu *popup = KLineEdit::createPopupMenu(); + TQPopupMenu *popup = KLineEdit::createPopupMenu(); if (d->listView->columns()>1) { - QPopupMenu *subMenu = new QPopupMenu(popup); - connect(subMenu, SIGNAL(activated(int)), this, SLOT(searchColumnsMenuActivated(int))); + TQPopupMenu *subMenu = new TQPopupMenu(popup); + connect(subMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(searchColumnsMenuActivated(int))); popup->insertSeparator(); popup->insertItem(i18n("Search Columns"), subMenu); @@ -253,20 +253,20 @@ QPopupMenu *KListViewSearchLine::createPopupMenu() bool allColumnsAreSearchColumns = true; // TODO Make the entry order match the actual column order - QHeader* const header = d->listView->header(); + TQHeader* const header = d->listView->header(); int visibleColumns = 0; for(int i = 0; i < d->listView->columns(); i++) { if(d->listView->columnWidth(i)>0) { - QString columnText = d->listView->columnText(i); + TQString columnText = d->listView->columnText(i); if(columnText.isEmpty()) { int visiblePosition=1; for(int j = 0; j < header->mapToIndex(i); j++) if(d->listView->columnWidth(header->mapToSection(j))>0) visiblePosition++; - columnText = i18n("Column number %1","Column No. %1").arg(visiblePosition); + columnText = i18n("Column number %1","Column No. %1").tqarg(visiblePosition); } subMenu->insertItem(columnText, visibleColumns); - if(d->searchColumns.isEmpty() || d->searchColumns.find(i) != d->searchColumns.end()) + if(d->searchColumns.isEmpty() || d->searchColumns.tqfind(i) != d->searchColumns.end()) subMenu->setItemChecked(visibleColumns, true); else allColumnsAreSearchColumns = false; @@ -287,11 +287,11 @@ QPopupMenu *KListViewSearchLine::createPopupMenu() // protected slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::queueSearch(const QString &search) +void KListViewSearchLine::queueSearch(const TQString &search) { d->queuedSearches++; d->search = search; - QTimer::singleShot(200, this, SLOT(activateSearch())); + TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); } void KListViewSearchLine::activateSearch() @@ -306,7 +306,7 @@ void KListViewSearchLine::activateSearch() // private slots //////////////////////////////////////////////////////////////////////////////// -void KListViewSearchLine::itemAdded(QListViewItem *item) const +void KListViewSearchLine::itemAdded(TQListViewItem *item) const { item->setVisible(itemMatches(item, text())); } @@ -326,7 +326,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) d->searchColumns.clear(); } else { - if(d->searchColumns.find(id) != d->searchColumns.end()) + if(d->searchColumns.tqfind(id) != d->searchColumns.end()) d->searchColumns.remove(id); else { if(d->searchColumns.isEmpty()) { @@ -348,10 +348,10 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) void KListViewSearchLine::checkItemParentsNotVisible() { - QListViewItemIterator it(d->listView); + TQListViewItemIterator it(d->listView); for(; it.current(); ++it) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); if(itemMatches(item, d->search)) item->setVisible(true); else @@ -365,23 +365,23 @@ void KListViewSearchLine::checkItemParentsNotVisible() * * \p item The list view item to start showing / hiding items at. Typically, this is the first child of another item, or the * the first child of the list view. - * \p highestHiddenParent The highest (closest to root) ancestor of \p item which is hidden. If 0, all parents of + * \p highestHiddenParent The highest (closest to root) ancestor of \p item which is hidden. If 0, all tqparents of * \p item must be visible. * \return \c true if an item which should be visible is found, \c false if all items found should be hidden. If this function * returns true and \p highestHiddenParent was not 0, highestHiddenParent will have been shown. */ -bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent) +bool KListViewSearchLine::checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent) { bool visible = false; - QListViewItem * first = item; + TQListViewItem * first = item; for(; item; item = item->nextSibling()) { - //What we pass to our children as highestHiddenParent: - QListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item; + //What we pass to our tqchildren as highestHiddenParent: + TQListViewItem * hhp = highestHiddenParent ? highestHiddenParent : item->isVisible() ? 0L : item; bool childMatch = false; if(item->firstChild() && checkItemParentsVisible(item->firstChild(), hhp)) childMatch = true; - // Should this item be shown? It should if any children should be, or if it matches. + // Should this item be shown? It should if any tqchildren should be, or if it matches. if(childMatch || itemMatches(item, d->search)) { visible = true; @@ -390,13 +390,13 @@ bool KListViewSearchLine::checkItemParentsVisible(QListViewItem *item, QListView highestHiddenParent->setVisible(true); // Calling setVisible on our ancestor will unhide all its descendents. Hide the ones // before us that should not be shown. - for(QListViewItem *hide = first; hide != item; hide = hide->nextSibling()) + for(TQListViewItem *hide = first; hide != item; hide = hide->nextSibling()) hide->setVisible(false); highestHiddenParent = 0; - // If we matched, than none of our children matched, yet the setVisible() call on our + // If we matched, than none of our tqchildren matched, yet the setVisible() call on our // ancestor unhid them, undo the damage: if(!childMatch) - for(QListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling()) + for(TQListViewItem *hide = item->firstChild(); hide; hide = hide->nextSibling()) hide->setVisible(false); } else @@ -418,20 +418,20 @@ public: KListViewSearchLineWidgetPrivate() : listView(0), searchLine(0), clearButton(0) {} KListView *listView; KListViewSearchLine *searchLine; - QToolButton *clearButton; + TQToolButton *clearButton; }; KListViewSearchLineWidget::KListViewSearchLineWidget(KListView *listView, - QWidget *parent, + TQWidget *tqparent, const char *name) : - QHBox(parent, name) + TQHBox(tqparent, name) { d = new KListViewSearchLineWidgetPrivate; d->listView = listView; setSpacing(5); - QTimer::singleShot(0, this, SLOT(createWidgets())); + TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); } KListViewSearchLineWidget::~KListViewSearchLineWidget() @@ -451,14 +451,14 @@ void KListViewSearchLineWidget::createWidgets() positionInToolBar(); if(!d->clearButton) { - d->clearButton = new QToolButton(this); - QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"); + d->clearButton = new TQToolButton(this); + TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"); d->clearButton->setIconSet(icon); } d->clearButton->show(); - QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget"); + TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget"); d->searchLine = createSearchLine(d->listView); d->searchLine->show(); @@ -466,7 +466,7 @@ void KListViewSearchLineWidget::createWidgets() label->setBuddy(d->searchLine); label->show(); - connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(clear())); + connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear())); } KListViewSearchLine *KListViewSearchLineWidget::searchLine() const @@ -476,7 +476,7 @@ KListViewSearchLine *KListViewSearchLineWidget::searchLine() const void KListViewSearchLineWidget::positionInToolBar() { - KToolBar *toolBar = dynamic_cast<KToolBar *>(parent()); + KToolBar *toolBar = dynamic_cast<KToolBar *>(tqparent()); if(toolBar) { @@ -491,7 +491,7 @@ void KListViewSearchLineWidget::positionInToolBar() if(toolBar->getWidget(id) == this) { toolBar->setItemAutoSized(id); if(!d->clearButton) { - QString icon = QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"; + TQString icon = TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"; d->clearButton = new KToolBarButton(icon, 2005, toolBar); } toolBar->insertWidget(2005, d->clearButton->width(), d->clearButton, index); diff --git a/kmymoney2/widgets/klistviewsearchline.h b/kmymoney2/widgets/klistviewsearchline.h index 041687e..299f350 100644 --- a/kmymoney2/widgets/klistviewsearchline.h +++ b/kmymoney2/widgets/klistviewsearchline.h @@ -21,12 +21,12 @@ #define KLISTVIEWSEARCHLINE_H #include <klineedit.h> -#include <qhbox.h> +#include <tqhbox.h> #include <kmymoney/export.h> class KListView; -class QListViewItem; -class QToolButton; +class TQListViewItem; +class TQToolButton; /** * This class makes it easy to add a search line for filtering the items in a @@ -41,6 +41,7 @@ class QToolButton; class KMYMONEY_EXPORT KListViewSearchLine : public KLineEdit { Q_OBJECT + TQ_OBJECT public: @@ -51,13 +52,13 @@ public: * If \a listView is null then the widget will be disabled until a listview * is set with setListView(). */ - KListViewSearchLine(QWidget *parent = 0, KListView *listView = 0, const char *name = 0); + KListViewSearchLine(TQWidget *tqparent = 0, KListView *listView = 0, const char *name = 0); /** * Constructs a KListViewSearchLine without any KListView to filter. The * KListView object has to be set later with setListView(). */ - KListViewSearchLine(QWidget *parent, const char *name); + KListViewSearchLine(TQWidget *tqparent, const char *name); /** * Destroys the KListViewSearchLine. @@ -77,10 +78,10 @@ public: * * @see setSearchColumns */ - QValueList<int> searchColumns() const; + TQValueList<int> searchColumns() const; /** - * If this is true (the default) then the parents of matched items will also + * If this is true (the default) then the tqparents of matched items will also * be shown. * * @see setKeepParentsVisible() @@ -99,7 +100,7 @@ public slots: * Updates search to only make visible the items that match \a s. If * \a s is null then the line edit's text will be used. */ - virtual void updateSearch(const QString &s = QString::null); + virtual void updateSearch(const TQString &s = TQString()); /** * Make the search case sensitive or case insensitive. @@ -110,10 +111,10 @@ public slots: /** * When a search is active on a list that's organized into a tree view if - * a parent or ancesestor of an item is does not match the search then it - * will be hidden and as such so too will any children that match. + * a tqparent or ancesestor of an item is does not match the search then it + * will be hidden and as such so too will any tqchildren that match. * - * If this is set to true (the default) then the parents of matching items + * If this is set to true (the default) then the tqparents of matching items * will be shown. * * @see keepParentsVisible @@ -127,7 +128,7 @@ public slots: * * @see searchColumns */ - void setSearchColumns(const QValueList<int> &columns); + void setSearchColumns(const TQValueList<int> &columns); /** * Sets the KListView that is filtered by this search line. If \a lv is null @@ -144,14 +145,14 @@ protected: * based on the value of caseSensitive(). This can be overridden in * subclasses to implement more complicated matching schemes. */ - virtual bool itemMatches(const QListViewItem *item, const QString &s) const; + virtual bool itemMatches(const TQListViewItem *item, const TQString &s) const; /** * Re-implemented for internal reasons. API not affected. * - * See QLineEdit::mousePressEvent(). + * See TQLineEdit::mousePressEvent(). */ - virtual QPopupMenu *createPopupMenu(); + virtual TQPopupMenu *createPopupMenu(); protected slots: /** @@ -167,7 +168,7 @@ protected slots: * * @see activateSearch() */ - void queueSearch(const QString &search); + void queueSearch(const TQString &search); /** * When the timer started with queueSearch() expires this slot is called. @@ -182,20 +183,20 @@ protected slots: private: /** - * This is used in case parent items of matching items shouldn't be + * This is used in case tqparent items of matching items shouldn't be * visible. It hides all items that don't match the search string. */ void checkItemParentsNotVisible(); /** - * This is used in case parent items of matching items should be visible. - * It makes a recursive call to all children. It returns true if at least + * This is used in case tqparent items of matching items should be visible. + * It makes a recursive call to all tqchildren. It returns true if at least * one item in the subtree with the given root item is visible. */ - bool checkItemParentsVisible(QListViewItem *item, QListViewItem *highestHiddenParent = 0); + bool checkItemParentsVisible(TQListViewItem *item, TQListViewItem *highestHiddenParent = 0); private slots: - void itemAdded(QListViewItem *item) const; + void itemAdded(TQListViewItem *item) const; void listViewDeleted(); void searchColumnsMenuActivated(int); @@ -210,16 +211,17 @@ private: * * @since 3.4 */ -class KMYMONEY_EXPORT KListViewSearchLineWidget : public QHBox +class KMYMONEY_EXPORT KListViewSearchLineWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** - * Creates a KListViewSearchLineWidget for \a listView with \a parent as the - * parent with and \a name. + * Creates a KListViewSearchLineWidget for \a listView with \a tqparent as the + * tqparent with and \a name. */ - KListViewSearchLineWidget(KListView *listView = 0, QWidget *parent = 0, + KListViewSearchLineWidget(KListView *listView = 0, TQWidget *tqparent = 0, const char *name = 0); /** diff --git a/kmymoney2/widgets/kmymoney.widgets b/kmymoney2/widgets/kmymoney.widgets index f844780..7df4bdb 100644 --- a/kmymoney2/widgets/kmymoney.widgets +++ b/kmymoney2/widgets/kmymoney.widgets @@ -1,8 +1,6 @@ -[Includes] -kinstance.h - -[Init] -new KInstance("kmmwidgets"); +[Global] +Includes=kinstance.h +Init=new KInstance("kmmwidgets"); [KMyMoneyTitleLabel] diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.cpp b/kmymoney2/widgets/kmymoneyaccountcombo.cpp index 8a44786..67a416f 100644 --- a/kmymoney2/widgets/kmymoneyaccountcombo.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcombo.cpp @@ -23,10 +23,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdrawutil.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qapplication.h> +#include <tqdrawutil.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,25 +38,25 @@ #include <kmymoney/kmymoneyaccountcombo.h> #include "kmymoneyaccountcompletion.h" -KMyMoneyAccountCombo::KMyMoneyAccountCombo( QWidget* parent, const char* name ) : - KComboBox( parent, name ), +KMyMoneyAccountCombo::KMyMoneyAccountCombo( TQWidget* tqparent, const char* name ) : + KComboBox( tqparent, name ), m_completion(0), m_mlbDown(false) { #ifndef KMM_DESIGNER m_completion = new kMyMoneyAccountCompletion(this); - connect(this, SIGNAL(clicked()), this, SLOT(slotButtonPressed())); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSelected(const QString&))); + connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonPressed())); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSelected(const TQString&))); #endif // make sure that we can display a minimum of characters - QFontMetrics fm(font()); + TQFontMetrics fm(font()); setMinimumWidth(fm.maxWidth()*15); setMaximumHeight(height()); // we only use this one item and replace the text as we have our own dropdown box - insertItem(QString("")); + insertItem(TQString("")); } KMyMoneyAccountCombo::~KMyMoneyAccountCombo() @@ -68,7 +68,7 @@ void KMyMoneyAccountCombo::slotButtonPressed(void) m_completion->show(); } -void KMyMoneyAccountCombo::slotSelected(const QString& id) +void KMyMoneyAccountCombo::slotSelected(const TQString& id) { try { MyMoneyAccount acc = MyMoneyFile::instance()->account(id); @@ -79,7 +79,7 @@ void KMyMoneyAccountCombo::slotSelected(const QString& id) } } -void KMyMoneyAccountCombo::setSelected(const QString& id) +void KMyMoneyAccountCombo::setSelected(const TQString& id) { if(!id.isEmpty()) { try { @@ -90,7 +90,7 @@ void KMyMoneyAccountCombo::setSelected(const QString& id) delete e; } } else { - setText(QString()); + setText(TQString()); m_completion->setSelected(id); } } @@ -101,12 +101,12 @@ void KMyMoneyAccountCombo::setSelected(const MyMoneyAccount& acc) setText(acc.name()); } -void KMyMoneyAccountCombo::setText(const QString& txt) +void KMyMoneyAccountCombo::setText(const TQString& txt) { changeItem(txt, currentItem()); } -int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QString>& accountIdList, const bool clear) +int KMyMoneyAccountCombo::loadList(const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear) { AccountSet set; @@ -116,7 +116,7 @@ int KMyMoneyAccountCombo::loadList(const QString& baseName, const QValueList<QSt int KMyMoneyAccountCombo::loadList(KMyMoneyUtils::categoryTypeE typeMask) { AccountSet set; - QValueList<int> typeList; + TQValueList<int> typeList; if(typeMask & KMyMoneyUtils::asset) { set.addAccountGroup(MyMoneyAccount::Asset); @@ -143,13 +143,13 @@ int KMyMoneyAccountCombo::loadList(MyMoneyAccount::accountTypeE type) return set.load(m_completion->selector()); } -void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k) +void KMyMoneyAccountCombo::keyPressEvent(TQKeyEvent* k) { switch(k->key()) { - case Qt::Key_Tab: + case TQt::Key_Tab: break; - case Qt::Key_Space: + case TQt::Key_Space: emit clicked(); break; @@ -159,22 +159,22 @@ void KMyMoneyAccountCombo::keyPressEvent(QKeyEvent* k) return; } -void KMyMoneyAccountCombo::mousePressEvent(QMouseEvent *e) +void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e) { - if ( e->button() != LeftButton ) { + if ( e->button() != Qt::LeftButton ) { e->ignore(); return; } - bool hit = rect().contains( e->pos() ); + bool hit = TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ); if ( hit ) { // mouse press on button m_mlbDown = TRUE; // left mouse button down emit pressed(); } } -void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e) +void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e) { - if ( e->button() != LeftButton ) { + if ( e->button() != Qt::LeftButton ) { e->ignore(); return; } @@ -182,7 +182,7 @@ void KMyMoneyAccountCombo::mouseReleaseEvent(QMouseEvent *e) return; m_mlbDown = FALSE; // left mouse button up emit released(); - if ( rect().contains( e->pos() ) ) { // mouse release on button + if ( TQT_TQRECT_OBJECT(rect()).tqcontains( e->pos() ) ) { // mouse release on button emit clicked(); } } @@ -192,25 +192,25 @@ int KMyMoneyAccountCombo::count(void) const return m_completion->selector()->accountList().count(); } -QStringList KMyMoneyAccountCombo::accountList(const QValueList<MyMoneyAccount::accountTypeE>& list) const +TQStringList KMyMoneyAccountCombo::accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list) const { return m_completion->selector()->accountList(list); }; -int KMyMoneyAccountCombo::loadList(const QValueList<int>& list) +int KMyMoneyAccountCombo::loadList(const TQValueList<int>& list) { // FIXME make the caller construct the AccountSet directly AccountSet set; - QValueList<int>::const_iterator it; + TQValueList<int>::const_iterator it; for(it = list.begin(); it != list.end(); ++it) { set.addAccountType(static_cast<MyMoneyAccount::accountTypeE>(*it)); } return set.load(m_completion->selector()); }; -QStringList KMyMoneyAccountCombo::selectedAccounts(void) const +TQStringList KMyMoneyAccountCombo::selectedAccounts(void) const { - QStringList list; + TQStringList list; m_completion->selector()->selectedItems(list); return list; }; diff --git a/kmymoney2/widgets/kmymoneyaccountcombo.h b/kmymoney2/widgets/kmymoneyaccountcombo.h index 770d5ad..623260d 100644 --- a/kmymoney2/widgets/kmymoneyaccountcombo.h +++ b/kmymoney2/widgets/kmymoneyaccountcombo.h @@ -44,8 +44,9 @@ class kMyMoneyAccountCompletion; class KMyMoneyAccountCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - KMyMoneyAccountCombo( QWidget* parent = 0, const char* name = 0 ); + KMyMoneyAccountCombo( TQWidget* tqparent = 0, const char* name = 0 ); ~KMyMoneyAccountCombo(); /** @@ -56,23 +57,23 @@ public: /** * This method loads the set of accounts into the widget * as defined by the parameter @p accountIdList. @p accountIdList is - * a QValueList of account ids. + * a TQValueList of account ids. * - * @param baseName QString which should be used as group text - * @param accountIdList QValueList of QString account ids + * @param baseName TQString which should be used as group text + * @param accountIdList TQValueList of TQString account ids * which should be loaded into the widget * @param clear if true (default) clears the widget before populating * @return This method returns the number of accounts loaded into the list */ - int loadList(const QString& baseName, const QValueList<QString>& accountIdList, const bool clear = true); + int loadList(const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear = true); - QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const; + TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const; int loadList(KMyMoneyUtils::categoryTypeE typeMask); - int loadList(const QValueList<int>& list); + int loadList(const TQValueList<int>& list); int loadList(MyMoneyAccount::accountTypeE type); - void setSelected(const QString& id); + void setSelected(const TQString& id); void setSelected(const MyMoneyAccount& acc); /** @@ -81,28 +82,28 @@ public: * * @return list of selected accounts */ - QStringList selectedAccounts(void) const; + TQStringList selectedAccounts(void) const; - virtual void keyPressEvent(QKeyEvent* e); + virtual void keyPressEvent(TQKeyEvent* e); public slots: void slotButtonPressed(void); - void slotSelected(const QString&); + void slotSelected(const TQString&); protected slots: signals: - void accountSelected(const QString&); + void accountSelected(const TQString&); void pressed(); void released(); void clicked(); protected: - void mousePressEvent(QMouseEvent *e); - void mouseReleaseEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); + void mouseReleaseEvent(TQMouseEvent *e); - void setText(const QString& txt); + void setText(const TQString& txt); private: kMyMoneyAccountCompletion* m_completion; diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp index bb2af2e..6de78e5 100644 --- a/kmymoney2/widgets/kmymoneyaccountcompletion.cpp +++ b/kmymoney2/widgets/kmymoneyaccountcompletion.cpp @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> -#include <qregexp.h> +#include <tqapplication.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -37,8 +37,8 @@ #include "kmymoneyaccountcompletion.h" #include <kmymoney/mymoneyfile.h> -kMyMoneyAccountCompletion::kMyMoneyAccountCompletion(QWidget *parent, const char *name ) : - kMyMoneyCompletion(parent, name) +kMyMoneyAccountCompletion::kMyMoneyAccountCompletion(TQWidget *tqparent, const char *name ) : + kMyMoneyCompletion(tqparent, name) { delete m_selector; m_selector = new kMyMoneyAccountSelector(this, 0, 0, false); @@ -62,32 +62,32 @@ kMyMoneyAccountCompletion::~kMyMoneyAccountCompletion() { } -void kMyMoneyAccountCompletion::slotMakeCompletion(const QString& txt) +void kMyMoneyAccountCompletion::slotMakeCompletion(const TQString& txt) { // if(txt.isEmpty() || txt.length() == 0) // return; int cnt = 0; - if(txt.contains(MyMoneyFile::AccountSeperator) == 0) { - m_lastCompletion = QRegExp(QRegExp::escape(txt.stripWhiteSpace()), false); + if(txt.tqcontains(MyMoneyFile::AccountSeperator) == 0) { + m_lastCompletion = TQRegExp(TQRegExp::escape(txt.stripWhiteSpace()), false); cnt = selector()->slotMakeCompletion(m_lastCompletion); } else { - QStringList parts = QStringList::split(MyMoneyFile::AccountSeperator, txt); - QString pattern("^"); - QStringList::iterator it; + TQStringList parts = TQStringList::split(MyMoneyFile::AccountSeperator, txt); + TQString pattern("^"); + TQStringList::iterator it; for(it = parts.begin(); it != parts.end(); ++it) { if(pattern.length() > 1) pattern += MyMoneyFile::AccountSeperator; - pattern += QRegExp::escape(QString(*it).stripWhiteSpace()) + ".*"; + pattern += TQRegExp::escape(TQString(*it).stripWhiteSpace()) + ".*"; } pattern += "$"; - m_lastCompletion = QRegExp(pattern, false); + m_lastCompletion = TQRegExp(pattern, false); cnt = selector()->slotMakeCompletion(m_lastCompletion); // if we don't have a match, we try it again, but this time // we add a wildcard for the top level if(cnt == 0) { - pattern = pattern.insert(1, QString(".*")+MyMoneyFile::AccountSeperator); - m_lastCompletion = QRegExp(pattern, false); + pattern = pattern.insert(1, TQString(".*")+MyMoneyFile::AccountSeperator); + m_lastCompletion = TQRegExp(pattern, false); cnt = selector()->slotMakeCompletion(m_lastCompletion); } } diff --git a/kmymoney2/widgets/kmymoneyaccountcompletion.h b/kmymoney2/widgets/kmymoneyaccountcompletion.h index 725a07c..4d309fd 100644 --- a/kmymoney2/widgets/kmymoneyaccountcompletion.h +++ b/kmymoney2/widgets/kmymoneyaccountcompletion.h @@ -26,8 +26,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -class QListViewItem; +#include <tqwidget.h> +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -44,12 +44,13 @@ class QListViewItem; class kMyMoneyAccountCompletion : public kMyMoneyCompletion { Q_OBJECT + TQ_OBJECT public: - kMyMoneyAccountCompletion(QWidget *parent=0, const char *name=0); + kMyMoneyAccountCompletion(TQWidget *tqparent=0, const char *name=0); virtual ~kMyMoneyAccountCompletion(); - QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const { return selector()->accountList(list); } + TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const { return selector()->accountList(list); } /** * reimplemented from kMyMoneyCompletion @@ -57,7 +58,7 @@ public: kMyMoneyAccountSelector* selector(void) const { return dynamic_cast<kMyMoneyAccountSelector*>(m_selector); } public slots: - void slotMakeCompletion(const QString& txt); + void slotMakeCompletion(const TQString& txt); }; #endif diff --git a/kmymoney2/widgets/kmymoneyaccountselector.cpp b/kmymoney2/widgets/kmymoneyaccountselector.cpp index f1596b4..762591f 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.cpp +++ b/kmymoney2/widgets/kmymoneyaccountselector.cpp @@ -23,13 +23,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qheader.h> -#include <qlabel.h> -#include <qtimer.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qrect.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqtimer.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqrect.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -49,8 +49,8 @@ #include "../kmymoneyutils.h" #include "../kmymoneyglobalsettings.h" -kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *name, QWidget::WFlags flags, const bool createButtons) : - KMyMoneySelector(parent, name, flags), +kMyMoneyAccountSelector::kMyMoneyAccountSelector(TQWidget *tqparent, const char *name, TQWidget::WFlags flags, const bool createButtons) : + KMyMoneySelector(tqparent, name, flags), m_allAccountsButton(0), m_noAccountButton(0), m_incomeCategoriesButton(0), @@ -58,7 +58,7 @@ kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *na { if(createButtons) { - QVBoxLayout* buttonLayout = new QVBoxLayout( 0, 0, 6, "accountSelectorButtonLayout"); + TQVBoxLayout* buttonLayout = new TQVBoxLayout( 0, 0, 6, "accountSelectorButtonLayout"); m_allAccountsButton = new KPushButton( this, "m_allAccountsButton" ); m_allAccountsButton->setText( i18n( "All" ) ); @@ -76,14 +76,14 @@ kMyMoneyAccountSelector::kMyMoneyAccountSelector(QWidget *parent, const char *na m_noAccountButton->setText( i18n( "None" ) ); buttonLayout->addWidget( m_noAccountButton ); - QSpacerItem* spacer = new QSpacerItem( 0, 67, QSizePolicy::Minimum, QSizePolicy::Expanding ); + TQSpacerItem* spacer = new TQSpacerItem( 0, 67, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); buttonLayout->addItem( spacer ); m_layout->addLayout( buttonLayout ); - connect(m_allAccountsButton, SIGNAL(clicked()), this, SLOT(slotSelectAllAccounts())); - connect(m_noAccountButton, SIGNAL(clicked()), this, SLOT(slotDeselectAllAccounts())); - connect(m_incomeCategoriesButton, SIGNAL(clicked()), this, SLOT(slotSelectIncomeCategories())); - connect(m_expenseCategoriesButton, SIGNAL(clicked()), this, SLOT(slotSelectExpenseCategories())); + connect(m_allAccountsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectAllAccounts())); + connect(m_noAccountButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDeselectAllAccounts())); + connect(m_incomeCategoriesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectIncomeCategories())); + connect(m_expenseCategoriesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectExpenseCategories())); } // sort the list of accounts in ascending order @@ -104,10 +104,10 @@ void kMyMoneyAccountSelector::removeButtons(void) void kMyMoneyAccountSelector::selectCategories(const bool income, const bool expense) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { - if(static_cast<QCheckListItem*>(it_v)->text() == i18n("Income categories")) + if(static_cast<TQCheckListItem*>(it_v)->text() == i18n("Income categories")) selectAllSubItems(it_v, income); else selectAllSubItems(it_v, expense); @@ -115,35 +115,35 @@ void kMyMoneyAccountSelector::selectCategories(const bool income, const bool exp emit stateChanged(); } -void kMyMoneyAccountSelector::setSelectionMode(QListView::SelectionMode mode) +void kMyMoneyAccountSelector::setSelectionMode(TQListView::SelectionMode mode) { - m_incomeCategoriesButton->setHidden(mode == QListView::Multi); - m_expenseCategoriesButton->setHidden(mode == QListView::Multi); + m_incomeCategoriesButton->setHidden(mode == TQListView::Multi); + m_expenseCategoriesButton->setHidden(mode == TQListView::Multi); KMyMoneySelector::setSelectionMode(mode); } -QStringList kMyMoneyAccountSelector::accountList(const QValueList<MyMoneyAccount::accountTypeE>& filterList) const +TQStringList kMyMoneyAccountSelector::accountList(const TQValueList<MyMoneyAccount::accountTypeE>& filterList) const { - QStringList list; - QListViewItemIterator it; - QListViewItem* it_v; - QValueList<MyMoneyAccount::accountTypeE>::ConstIterator it_f; + TQStringList list; + TQListViewItemIterator it; + TQListViewItem* it_v; + TQValueList<MyMoneyAccount::accountTypeE>::ConstIterator it_f; - it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable); + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable); while((it_v = it.current()) != 0) { { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.find(acc.accountType()); + it_f = filterList.tqfind(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } } else if(it_v->rtti() == 0) { KMyMoneyListViewItem* it_c = dynamic_cast<KMyMoneyListViewItem*>(it_v); MyMoneyAccount acc = MyMoneyFile::instance()->account(it_c->id()); - it_f = filterList.find(acc.accountType()); + it_f = filterList.tqfind(acc.accountType()); if(filterList.count() == 0 || it_f != filterList.end()) list << it_c->id(); } @@ -153,7 +153,7 @@ QStringList kMyMoneyAccountSelector::accountList(const QValueList<MyMoneyAccoun return list; } -bool kMyMoneyAccountSelector::match(const QRegExp& exp, QListViewItem* item) const +bool kMyMoneyAccountSelector::match(const TQRegExp& exp, TQListViewItem* item) const { if(!item->isSelectable()) return false; @@ -169,12 +169,12 @@ bool kMyMoneyAccountSelector::match(const QRegExp& exp, QListViewItem* item) con return exp.search(it_l->key(1, true)) != -1; } -bool kMyMoneyAccountSelector::contains(const QString& txt) const +bool kMyMoneyAccountSelector::tqcontains(const TQString& txt) const { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); + TQListViewItem* it_v; - QString baseName = i18n("Asset") + "|" + + TQString baseName = i18n("Asset") + "|" + i18n("Liability") + "|" + i18n("Income")+ "|" + i18n("Expense")+ "|" + @@ -182,7 +182,7 @@ bool kMyMoneyAccountSelector::contains(const QString& txt) const i18n("Security"); while((it_v = it.current()) != 0) { - QRegExp exp(QString("^(?:%1):%2$").arg(baseName).arg(QRegExp::escape(txt))); + TQRegExp exp(TQString("^(?:%1):%2$").tqarg(baseName).tqarg(TQRegExp::escape(txt))); if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); if(exp.search(it_c->key(1, true)) != -1) { @@ -200,24 +200,24 @@ bool kMyMoneyAccountSelector::contains(const QString& txt) const } # if 0 -void kMyMoneyAccountSelector::update(const QString& /* id */) +void kMyMoneyAccountSelector::update(const TQString& /* id */) { - QListViewItem* it_v = m_listView->currentItem(); - QString previousHighlighted; + TQListViewItem* it_v = m_listView->currentItem(); + TQString previousHighlighted; bool state = false; - if(m_selMode == QListView::Multi && it_v) { + if(m_selMode == TQListView::Multi && it_v) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { previousHighlighted = it_c->id(); state = it_c->isOn(); } } } - QStringList list = selectedAccounts(); - QStringList::Iterator it; + TQStringList list = selectedAccounts(); + TQStringList::Iterator it; if(!m_typeList.isEmpty()) loadList(m_typeList); @@ -233,7 +233,7 @@ void kMyMoneyAccountSelector::update(const QString& /* id */) setSelected(*it, true); } - if(m_selMode == QListView::Multi) { + if(m_selMode == TQListView::Multi) { // make the previous highlighted item highlighted again if(!previousHighlighted.isEmpty()) { setSelected(previousHighlighted); @@ -287,8 +287,8 @@ void AccountSet::addAccountType(MyMoneyAccount::accountTypeE type) void AccountSet::removeAccountType(MyMoneyAccount::accountTypeE type) { - QValueList<MyMoneyAccount::accountTypeE>::iterator it; - it = m_typeList.find(type); + TQValueList<MyMoneyAccount::accountTypeE>::iterator it; + it = m_typeList.tqfind(type); if(it != m_typeList.end()) { m_typeList.remove(it); } @@ -301,93 +301,93 @@ void AccountSet::clear(void) int AccountSet::load(kMyMoneyAccountSelector* selector) { - QStringList list; - QStringList::ConstIterator it_l; + TQStringList list; + TQStringList::ConstIterator it_l; int count = 0; int typeMask = 0; - QString currentId; + TQString currentId; - if(selector->selectionMode() == QListView::Single) { - QStringList list; + if(selector->selectionMode() == TQListView::Single) { + TQStringList list; selector->selectedItems(list); if(list.count() > 0) currentId = list.first(); } - if((m_typeList.contains(MyMoneyAccount::Checkings) - + m_typeList.contains(MyMoneyAccount::Savings) - + m_typeList.contains(MyMoneyAccount::Cash) - + m_typeList.contains(MyMoneyAccount::AssetLoan) - + m_typeList.contains(MyMoneyAccount::CertificateDep) - + m_typeList.contains(MyMoneyAccount::Investment) - + m_typeList.contains(MyMoneyAccount::Stock) - + m_typeList.contains(MyMoneyAccount::MoneyMarket) - + m_typeList.contains(MyMoneyAccount::Asset) - + m_typeList.contains(MyMoneyAccount::Currency)) > 0) + if((m_typeList.tqcontains(MyMoneyAccount::Checkings) + + m_typeList.tqcontains(MyMoneyAccount::Savings) + + m_typeList.tqcontains(MyMoneyAccount::Cash) + + m_typeList.tqcontains(MyMoneyAccount::AssetLoan) + + m_typeList.tqcontains(MyMoneyAccount::CertificateDep) + + m_typeList.tqcontains(MyMoneyAccount::Investment) + + m_typeList.tqcontains(MyMoneyAccount::Stock) + + m_typeList.tqcontains(MyMoneyAccount::MoneyMarket) + + m_typeList.tqcontains(MyMoneyAccount::Asset) + + m_typeList.tqcontains(MyMoneyAccount::Currency)) > 0) typeMask |= KMyMoneyUtils::asset; - if((m_typeList.contains(MyMoneyAccount::CreditCard) - + m_typeList.contains(MyMoneyAccount::Loan) - + m_typeList.contains(MyMoneyAccount::Liability)) > 0) + if((m_typeList.tqcontains(MyMoneyAccount::CreditCard) + + m_typeList.tqcontains(MyMoneyAccount::Loan) + + m_typeList.tqcontains(MyMoneyAccount::Liability)) > 0) typeMask |= KMyMoneyUtils::liability; - if((m_typeList.contains(MyMoneyAccount::Income)) > 0) + if((m_typeList.tqcontains(MyMoneyAccount::Income)) > 0) typeMask |= KMyMoneyUtils::income; - if((m_typeList.contains(MyMoneyAccount::Expense)) > 0) + if((m_typeList.tqcontains(MyMoneyAccount::Expense)) > 0) typeMask |= KMyMoneyUtils::expense; - if((m_typeList.contains(MyMoneyAccount::Equity)) > 0) + if((m_typeList.tqcontains(MyMoneyAccount::Equity)) > 0) typeMask |= KMyMoneyUtils::equity; selector->clear(); KListView* lv = selector->listView(); m_count = 0; - QString key; - QListViewItem* after = 0; + TQString key; + TQListViewItem* after = 0; // create the favorite section first and sort it to the beginning - key = QString("A%1").arg(i18n("Favorites")); + key = TQString("A%1").tqarg(i18n("Favorites")); m_favorites = selector->newItem(i18n("Favorites"), key); - for(int mask = 0x01; mask != KMyMoneyUtils::last; mask <<= 1) { - QListViewItem* item = 0; - if((typeMask & mask & KMyMoneyUtils::asset) != 0) { + for(int tqmask = 0x01; tqmask != KMyMoneyUtils::last; tqmask <<= 1) { + TQListViewItem* item = 0; + if((typeMask & tqmask & KMyMoneyUtils::asset) != 0) { ++m_count; - key = QString("B%1").arg(i18n("Asset")); + key = TQString("B%1").tqarg(i18n("Asset")); item = selector->newItem(i18n("Asset accounts"), key); list = m_file->asset().accountList(); } - if((typeMask & mask & KMyMoneyUtils::liability) != 0) { + if((typeMask & tqmask & KMyMoneyUtils::liability) != 0) { ++m_count; - key = QString("C%1").arg(i18n("Liability")); + key = TQString("C%1").tqarg(i18n("Liability")); item = selector->newItem(i18n("Liability accounts"), key); list = m_file->liability().accountList(); } - if((typeMask & mask & KMyMoneyUtils::income) != 0) { + if((typeMask & tqmask & KMyMoneyUtils::income) != 0) { ++m_count; - key = QString("D%1").arg(i18n("Income")); + key = TQString("D%1").tqarg(i18n("Income")); item = selector->newItem(i18n("Income categories"), key); list = m_file->income().accountList(); - if(selector->selectionMode() == QListView::Multi) { + if(selector->selectionMode() == TQListView::Multi) { selector->m_incomeCategoriesButton->show(); } } - if((typeMask & mask & KMyMoneyUtils::expense) != 0) { + if((typeMask & tqmask & KMyMoneyUtils::expense) != 0) { ++m_count; - key = QString("E%1").arg(i18n("Expense")); + key = TQString("E%1").tqarg(i18n("Expense")); item = selector->newItem(i18n("Expense categories"), key); list = m_file->expense().accountList(); - if(selector->selectionMode() == QListView::Multi) { + if(selector->selectionMode() == TQListView::Multi) { selector->m_expenseCategoriesButton->show(); } } - if((typeMask & mask & KMyMoneyUtils::equity) != 0) { + if((typeMask & tqmask & KMyMoneyUtils::equity) != 0) { ++m_count; - key = QString("F%1").arg(i18n("Equity")); + key = TQString("F%1").tqarg(i18n("Equity")); item = selector->newItem(i18n("Equity accounts"), key); list = m_file->equity().accountList(); } @@ -405,11 +405,11 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) //if it is still open or it has been set to show closed accounts if(includeAccount(acc) && (!isHidingClosedAccounts() || !acc.isClosed()) ) { - QString tmpKey; + TQString tmpKey; tmpKey = key + MyMoneyFile::AccountSeperator + acc.name(); - QListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id()); + TQListViewItem* subItem = selector->newItem(item, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.contains(acc.accountType())) { + && m_typeList.tqcontains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -418,7 +418,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.contains(acc.accountType()) ) { + if( !m_typeList.tqcontains(acc.accountType()) ) { subItem->setEnabled(false); } } @@ -429,7 +429,7 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) // if we don't have a favorite account or the selector is for multi-mode // we get rid of the favorite entry and subentries. - if(m_favorites->childCount() == 0 || selector->selectionMode() == QListView::Multi) { + if(m_favorites->childCount() == 0 || selector->selectionMode() == TQListView::Multi) { delete m_favorites; m_favorites = 0; } @@ -449,10 +449,10 @@ int AccountSet::load(kMyMoneyAccountSelector* selector) return count; } -int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName, const QValueList<QString>& accountIdList, const bool clear) +int AccountSet::load(kMyMoneyAccountSelector* selector, const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear) { int count = 0; - QListViewItem* item = 0; + TQListViewItem* item = 0; m_typeList.clear(); if(clear) { @@ -463,14 +463,14 @@ int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName, item = selector->newItem(baseName); ++m_count; - QValueList<QString>::ConstIterator it; + TQValueList<TQString>::ConstIterator it; for(it = accountIdList.begin(); it != accountIdList.end(); ++it) { const MyMoneyAccount& acc = m_file->account(*it); if(acc.isClosed()) continue; - QString tmpKey; + TQString tmpKey; // the first character must be preset. Since we don't know any sort order here, we just use A - tmpKey = QString("A%1%2%3").arg(baseName, MyMoneyFile::AccountSeperator, acc.name()); + tmpKey = TQString("A%1%2%3").tqarg(baseName, MyMoneyFile::AccountSeperator, acc.name()); selector->newItem(item, acc.name(), tmpKey, acc.id()); ++m_count; ++count; @@ -486,9 +486,9 @@ int AccountSet::load(kMyMoneyAccountSelector* selector, const QString& baseName, return count; } -int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem* parent, const QString& key, const QStringList& list) +int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewItem* tqparent, const TQString& key, const TQStringList& list) { - QStringList::ConstIterator it_l; + TQStringList::ConstIterator it_l; int count = 0; for(it_l = list.begin(); it_l != list.end(); ++it_l) { @@ -499,13 +499,13 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem if(includeAccount(acc) && !acc.isClosed()) { - QString tmpKey; + TQString tmpKey; tmpKey = key + MyMoneyFile::AccountSeperator + acc.name(); ++count; ++m_count; - QListViewItem* item = selector->newItem(parent, acc.name(), tmpKey, acc.id()); + TQListViewItem* item = selector->newItem(tqparent, acc.name(), tmpKey, acc.id()); if(acc.value("PreferredAccount") == "Yes" - && m_typeList.contains(acc.accountType())) { + && m_typeList.tqcontains(acc.accountType())) { selector->newItem(m_favorites, acc.name(), tmpKey, acc.id()); } if(acc.accountList().count() > 0) { @@ -514,7 +514,7 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem } //disable the item if it has been added only because a subaccount matches the type - if( !m_typeList.contains(acc.accountType()) ) { + if( !m_typeList.tqcontains(acc.accountType()) ) { item->setEnabled(false); } } @@ -524,13 +524,13 @@ int AccountSet::loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem bool AccountSet::includeAccount(const MyMoneyAccount& acc) { - if( m_typeList.contains(acc.accountType()) ) + if( m_typeList.tqcontains(acc.accountType()) ) return true; - QStringList accounts = acc.accountList(); + TQStringList accounts = acc.accountList(); if(accounts.size() > 0) { - QStringList::ConstIterator it_acc; + TQStringList::ConstIterator it_acc; for(it_acc = accounts.begin(); it_acc != accounts.end(); ++it_acc) { MyMoneyAccount account = m_file->account(*it_acc); if( includeAccount(account) ) diff --git a/kmymoney2/widgets/kmymoneyaccountselector.h b/kmymoney2/widgets/kmymoneyaccountselector.h index 2fc0635..632cdc5 100644 --- a/kmymoney2/widgets/kmymoneyaccountselector.h +++ b/kmymoney2/widgets/kmymoneyaccountselector.h @@ -56,10 +56,11 @@ class MyMoneyFile; class kMyMoneyAccountSelector : public KMyMoneySelector { Q_OBJECT + TQ_OBJECT public: friend class AccountSet; - kMyMoneyAccountSelector(QWidget *parent=0, const char *name=0, QWidget::WFlags flags = 0, const bool createButtons = true); + kMyMoneyAccountSelector(TQWidget *tqparent=0, const char *name=0, TQWidget::WFlags flags = 0, const bool createButtons = true); virtual ~kMyMoneyAccountSelector(); /** @@ -68,35 +69,35 @@ public: * a list of specific account types only. In this case, pass * a list of account types as parameter @p list. * - * @param list QValueList of account types to be returned. If this + * @param list TQValueList of account types to be returned. If this * list is empty (the default), then the ids of all accounts * will be returned. - * @return QStringList of account ids + * @return TQStringList of account ids */ - QStringList accountList(const QValueList<MyMoneyAccount::accountTypeE>& list = QValueList<MyMoneyAccount::accountTypeE>()) const; + TQStringList accountList(const TQValueList<MyMoneyAccount::accountTypeE>& list = TQValueList<MyMoneyAccount::accountTypeE>()) const; - void setSelectionMode(QListView::SelectionMode mode); + void setSelectionMode(TQListView::SelectionMode mode); /** * This method checks if a given @a item matches the given regular expression @a exp. * * @param exp const reference to a regular expression object - * @param item pointer to QListViewItem + * @param item pointer to TQListViewItem * * @retval true item matches * @retval false item does not match */ - virtual bool match(const QRegExp& exp, QListViewItem* item) const; + virtual bool match(const TQRegExp& exp, TQListViewItem* item) const; /** - * This method returns, if any of the items in the selector contains + * This method returns, if any of the items in the selector tqcontains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool contains(const QString& txt) const; + virtual bool tqcontains(const TQString& txt) const; /** * This method removes all the buttons of the widget @@ -119,13 +120,13 @@ public slots: protected: /** * This method loads the list of subaccounts as found in the - * @p list and attaches them to the parent widget passed as @p parent. + * @p list and attaches them to the tqparent widget passed as @p tqparent. * - * @param parent pointer to parent widget - * @param list QStringList containing the ids of all subaccounts to load + * @param tqparent pointer to tqparent widget + * @param list TQStringList containing the ids of all subaccounts to load * @return This method returns the number of accounts loaded into the list */ - int loadSubAccounts(QListViewItem* parent, const QStringList& list); + int loadSubAccounts(TQListViewItem* tqparent, const TQStringList& list); /** * This is a helper method for selectAllIncomeCategories() @@ -149,8 +150,8 @@ protected: KPushButton* m_noAccountButton; KPushButton* m_incomeCategoriesButton; KPushButton* m_expenseCategoriesButton; - QValueList<int> m_typeList; - QStringList m_accountList; + TQValueList<int> m_typeList; + TQStringList m_accountList; }; @@ -166,7 +167,7 @@ public: void clear(void); int load(kMyMoneyAccountSelector* selector); - int load(kMyMoneyAccountSelector* selector, const QString& baseName, const QValueList<QString>& accountIdList, const bool clear = false); + int load(kMyMoneyAccountSelector* selector, const TQString& baseName, const TQValueList<TQString>& accountIdList, const bool clear = false); int count(void) const { return m_count; } @@ -174,14 +175,14 @@ public: bool isHidingClosedAccounts (void) { return m_hideClosedAccounts; } protected: - int loadSubAccounts(kMyMoneyAccountSelector* selector, QListViewItem* parent, const QString& key, const QStringList& list); + int loadSubAccounts(kMyMoneyAccountSelector* selector, TQListViewItem* tqparent, const TQString& key, const TQStringList& list); bool includeAccount(const MyMoneyAccount& acc); private: int m_count; MyMoneyFile* m_file; - QValueList<MyMoneyAccount::accountTypeE> m_typeList; - QListViewItem* m_favorites; + TQValueList<MyMoneyAccount::accountTypeE> m_typeList; + TQListViewItem* m_favorites; bool m_hideClosedAccounts; }; #endif diff --git a/kmymoney2/widgets/kmymoneyaccounttree.cpp b/kmymoney2/widgets/kmymoneyaccounttree.cpp index 1b669ef..f74a8f8 100644 --- a/kmymoney2/widgets/kmymoneyaccounttree.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttree.cpp @@ -18,15 +18,15 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpoint.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qcursor.h> -#include <qheader.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstyle.h> +#include <tqpoint.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqcursor.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstyle.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,38 +46,38 @@ #include <kmymoney/kmymoneyutils.h> -KMyMoneyAccountTree::KMyMoneyAccountTree(QWidget* parent, const char *name) : - KMyMoneyAccountTreeBase(parent,name) +KMyMoneyAccountTree::KMyMoneyAccountTree(TQWidget* tqparent, const char *name) : + KMyMoneyAccountTreeBase(tqparent,name) { showType(); m_taxReportColumn = addColumn(i18n("Column heading for category in tax report", "Tax")); - setColumnWidthMode(m_taxReportColumn, QListView::Manual); - setColumnAlignment(m_taxReportColumn, Qt::AlignHCenter); + setColumnWidthMode(m_taxReportColumn, TQListView::Manual); + setColumnAlignment(m_taxReportColumn, TQt::AlignHCenter); m_vatCategoryColumn = addColumn(i18n("Column heading for VAT category", "VAT")); - setColumnWidthMode(m_vatCategoryColumn, QListView::Manual); - setColumnAlignment(m_vatCategoryColumn, Qt::AlignHCenter); + setColumnWidthMode(m_vatCategoryColumn, TQListView::Manual); + setColumnAlignment(m_vatCategoryColumn, TQt::AlignHCenter); showValue(); } -KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security , const QString& name) : - KMyMoneyAccountTreeBaseItem(parent,account,security,name), +KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security , const TQString& name) : + KMyMoneyAccountTreeBaseItem(tqparent,account,security,name), m_reconcileFlag(false) { updateAccount(); } -KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : - KMyMoneyAccountTreeBaseItem(parent,account,price,security), +KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : + KMyMoneyAccountTreeBaseItem(tqparent,account,price,security), m_reconcileFlag(false) { updateAccount(); } -KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyInstitution& institution) : - KMyMoneyAccountTreeBaseItem(parent,institution), +KMyMoneyAccountTreeItem::KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyInstitution& institution) : + KMyMoneyAccountTreeBaseItem(tqparent,institution), m_reconcileFlag(false) { } @@ -88,7 +88,7 @@ void KMyMoneyAccountTreeItem::fillColumns() if (!lv) return; KMyMoneyAccountTreeBaseItem::fillColumns(); - QPixmap checkMark = QPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small)); + TQPixmap checkMark = TQPixmap(KGlobal::iconLoader()->loadIcon("ok", KIcon::Small)); MyMoneyMoney vatRate; if (!isInstitution()) setPixmap(lv->nameColumn(), m_account.accountPixmap(m_reconcileFlag, 22)); @@ -104,7 +104,7 @@ void KMyMoneyAccountTreeItem::fillColumns() } if(!m_account.value("VatRate").isEmpty()) { vatRate = MyMoneyMoney(m_account.value("VatRate")) * MyMoneyMoney(100,1); - setText(lv->vatCategoryColumn(), QString("%1 %").arg(vatRate.formatMoney("", 1))); + setText(lv->vatCategoryColumn(), TQString("%1 %").tqarg(vatRate.formatMoney("", 1))); } break; default: diff --git a/kmymoney2/widgets/kmymoneyaccounttree.h b/kmymoney2/widgets/kmymoneyaccounttree.h index a4b741d..0b2d1ac 100644 --- a/kmymoney2/widgets/kmymoneyaccounttree.h +++ b/kmymoney2/widgets/kmymoneyaccounttree.h @@ -26,8 +26,9 @@ class KMyMoneyAccountTreeItem; class KMyMoneyAccountTree : public KMyMoneyAccountTreeBase { Q_OBJECT + TQ_OBJECT public: - KMyMoneyAccountTree(QWidget* parent = 0, const char *name = 0); + KMyMoneyAccountTree(TQWidget* tqparent = 0, const char *name = 0); int taxReportColumn(void) const { return m_taxReportColumn; } int vatCategoryColumn(void) const { return m_vatCategoryColumn; } private: @@ -42,18 +43,18 @@ public: * Constructor to be used to construct an institution entry * object. * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param institution const reference to MyMoneyInstitution for which * the KListView entry is constructed */ - KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyInstitution& institution); + KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyInstitution& institution); /** * Constructor to be used to construct a standard account entry object (e.g. Asset, * Liability, etc.). * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -62,13 +63,13 @@ public: * @param name name of the account to be used instead of the one stored with @p account * If empty, the one stored with @p account will be used. Default: empty */ - KMyMoneyAccountTreeItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString()); + KMyMoneyAccountTreeItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString()); /** * Constructor to be used to construct an account entry * object. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -77,7 +78,7 @@ public: * @param security const reference to the security used to show the value. Usually * one should pass MyMoneyFile::baseCurrency() here. */ - KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); + KMyMoneyAccountTreeItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); void setReconciliation(bool); diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp index da35ea1..b64b17c 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebase.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttreebase.cpp @@ -18,15 +18,15 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpoint.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qtimer.h> -#include <qcursor.h> -#include <qheader.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstyle.h> +#include <tqpoint.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqtimer.h> +#include <tqcursor.h> +#include <tqheader.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstyle.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,8 +46,8 @@ #include <kmymoney/kmymoneyutils.h> -KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* name) : - KListView(parent, name), +KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(TQWidget* tqparent, const char* name) : + KListView(tqparent, name), m_accountConnections(false), m_institutionConnections(false), m_queuedSort(0) @@ -56,7 +56,7 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na setAllColumnsShowFocus(true); m_nameColumn = addColumn(i18n("Account")); - setColumnWidthMode(m_nameColumn, QListView::Manual); + setColumnWidthMode(m_nameColumn, TQListView::Manual); m_typeColumn = -1; m_balanceColumn = -1; @@ -64,7 +64,7 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na setMultiSelection(false); - setResizeMode(QListView::LastColumn); + setResizeMode(TQListView::LastColumn); setShowSortIndicator(true); setSorting(0); @@ -80,14 +80,14 @@ KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(QWidget* parent, const char* na m_baseCurrency.setSmallestAccountFraction(100); m_baseCurrency.setSmallestCashFraction(100); - connect(this, SIGNAL(dropped(QDropEvent*,QListViewItem*,QListViewItem*)), this, SLOT(slotObjectDropped(QDropEvent*,QListViewItem*,QListViewItem*))); - connect(this, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectObject(QListViewItem*))); - connect(this, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)), this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(this, SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)), this, SLOT(slotOpenObject(QListViewItem*))); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*,TQListViewItem*)), this, TQT_SLOT(slotObjectDropped(TQDropEvent*,TQListViewItem*,TQListViewItem*))); + connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectObject(TQListViewItem*))); + connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)), this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(slotOpenObject(TQListViewItem*))); // drag and drop timer connections - connect( &m_autoopenTimer, SIGNAL( timeout() ), this, SLOT( slotOpenFolder() ) ); - connect( &m_autoscrollTimer, SIGNAL( timeout() ), this, SLOT( slotAutoScroll() ) ); + connect( &m_autoopenTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotOpenFolder() ) ); + connect( &m_autoscrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotAutoScroll() ) ); } @@ -97,7 +97,7 @@ KMyMoneyAccountTreeBase::~KMyMoneyAccountTreeBase() saveLayout(KGlobal::config(), m_configGroup); } -void KMyMoneyAccountTreeBase::restoreLayout(const QString& group) +void KMyMoneyAccountTreeBase::restoreLayout(const TQString& group) { if (!m_configGroup.isEmpty()) return; // already done @@ -111,26 +111,26 @@ void KMyMoneyAccountTreeBase::restoreLayout(const QString& group) void KMyMoneyAccountTreeBase::showType(void) { m_typeColumn = addColumn(i18n("Type")); - setColumnWidthMode(m_typeColumn, QListView::Manual); - setColumnAlignment(m_typeColumn, Qt::AlignLeft); + setColumnWidthMode(m_typeColumn, TQListView::Manual); + setColumnAlignment(m_typeColumn, TQt::AlignLeft); } void KMyMoneyAccountTreeBase::showValue(void) { m_balanceColumn = addColumn(i18n("Total Balance")); - setColumnWidthMode(m_balanceColumn, QListView::Manual); - setColumnAlignment(m_balanceColumn, Qt::AlignRight); + setColumnWidthMode(m_balanceColumn, TQListView::Manual); + setColumnAlignment(m_balanceColumn, TQt::AlignRight); m_valueColumn = addColumn(i18n("Total Value")); - setColumnWidthMode(m_valueColumn, QListView::Manual); - setColumnAlignment(m_valueColumn, Qt::AlignRight); + setColumnWidthMode(m_valueColumn, TQListView::Manual); + setColumnAlignment(m_valueColumn, TQt::AlignRight); } void KMyMoneyAccountTreeBase::connectNotify(const char * /* s */) { // update drag and drop settings - m_accountConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0); - m_institutionConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0); + m_accountConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0); + m_institutionConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0); setDragEnabled(m_accountConnections | m_institutionConnections); setAcceptDrops(m_accountConnections | m_institutionConnections); } @@ -138,13 +138,13 @@ void KMyMoneyAccountTreeBase::connectNotify(const char * /* s */) void KMyMoneyAccountTreeBase::disconnectNotify(const char * /* s */) { // update drag and drop settings - m_accountConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0); - m_institutionConnections = (receivers(SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0); + m_accountConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&))) != 0); + m_institutionConnections = (tqreceivers(TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&))) != 0); setDragEnabled(m_accountConnections | m_institutionConnections); setAcceptDrops(m_accountConnections | m_institutionConnections); } -void KMyMoneyAccountTreeBase::setSectionHeader(const QString& txt) +void KMyMoneyAccountTreeBase::setSectionHeader(const TQString& txt) { header()->setLabel(nameColumn(), txt); } @@ -154,12 +154,12 @@ KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::selectedItem(void) const return dynamic_cast<KMyMoneyAccountTreeBaseItem *>(KListView::selectedItem()); } -const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const QString& id) const +const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const TQString& id) const { - // tried to use a QListViewItemIterator but that does not fit + // tried to use a TQListViewItemIterator but that does not fit // with the constness of this method. Arghhh. - QListViewItem* p = firstChild(); + TQListViewItem* p = firstChild(); while(p) { // item found, check for the id KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(p); @@ -167,10 +167,10 @@ const KMyMoneyAccountTreeBaseItem* KMyMoneyAccountTreeBase::findItem(const QStri break; // item did not match, search the next one - QListViewItem* next = p->firstChild(); + TQListViewItem* next = p->firstChild(); if(!next) { while((next = p->nextSibling()) == 0) { - p = p->parent(); + p = p->tqparent(); if(!p) break; } @@ -186,9 +186,9 @@ bool KMyMoneyAccountTreeBase::dropAccountOnAccount(const MyMoneyAccount& accFrom bool rc = false; // it does not make sense to reparent an account to oneself - // or to reparent it to it's current parent + // or to reparent it to it's current tqparent if(accTo.id() != accFrom.id() - && accFrom.parentAccountId() != accTo.id()) { + && accFrom.tqparentAccountId() != accTo.id()) { // Moving within a group is generally ok rc = accTo.accountGroup() == accFrom.accountGroup(); @@ -231,14 +231,14 @@ bool KMyMoneyAccountTreeBase::dropAccountOnAccount(const MyMoneyAccount& accFrom return rc; } -bool KMyMoneyAccountTreeBase::acceptDrag(QDropEvent* event) const +bool KMyMoneyAccountTreeBase::acceptDrag(TQDropEvent* event) const { bool rc; if((rc = (acceptDrops()) && (event->source() == viewport()))) { rc = false; KMyMoneyAccountTreeBaseItem* to = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(itemAt( contentsToViewport(event->pos()) )); - QString fromId(event->encodedData("text/plain")); + TQString fromId(event->tqencodedData("text/plain")); const KMyMoneyAccountTreeBaseItem* from = findItem(fromId); // we can only move accounts around @@ -265,19 +265,19 @@ bool KMyMoneyAccountTreeBase::acceptDrag(QDropEvent* event) const void KMyMoneyAccountTreeBase::startDrag(void) { - QListViewItem* item = currentItem(); + TQListViewItem* item = currentItem(); KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem *>(item); if(!p) return; if(p->isAccount()) { - QTextDrag* drag = new QTextDrag(p->id(), viewport()); + TQTextDrag* drag = new TQTextDrag(p->id(), viewport()); drag->setSubtype("plain"); // use the icon that is attached to the item to be dragged if (p->pixmap(0)) { - QPixmap pixmap(*p->pixmap(0)); - QPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 ); + TQPixmap pixmap(*p->pixmap(0)); + TQPoint hotspot( pixmap.width() / 2, pixmap.height() / 2 ); drag->setPixmap(pixmap, hotspot); } @@ -287,7 +287,7 @@ void KMyMoneyAccountTreeBase::startDrag(void) return; } -void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem* /* parent */, QListViewItem* /* after */) +void KMyMoneyAccountTreeBase::slotObjectDropped(TQDropEvent* event, TQListViewItem* /* tqparent */, TQListViewItem* /* after */) { m_autoopenTimer.stop(); slotStopAutoScroll(); @@ -296,7 +296,7 @@ void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem KMyMoneyAccountTreeBaseItem* newParent = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(m_dropItem); if(newParent) { - QString fromId(event->encodedData("text/plain")); + TQString fromId(event->tqencodedData("text/plain")); const KMyMoneyAccountTreeBaseItem* from = findItem(fromId); // we can only move accounts around @@ -321,7 +321,7 @@ void KMyMoneyAccountTreeBase::slotObjectDropped(QDropEvent* event, QListViewItem } } -void KMyMoneyAccountTreeBase::slotSelectObject(QListViewItem* i) +void KMyMoneyAccountTreeBase::slotSelectObject(TQListViewItem* i) { emit selectObject(MyMoneyInstitution()); emit selectObject(MyMoneyAccount()); @@ -332,7 +332,7 @@ void KMyMoneyAccountTreeBase::slotSelectObject(QListViewItem* i) } } -void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint&) +void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint&) { Q_UNUSED(lv); @@ -352,7 +352,7 @@ void KMyMoneyAccountTreeBase::slotOpenContextMenu(KListView* lv, QListViewItem* } } -void KMyMoneyAccountTreeBase::slotOpenObject(QListViewItem* i) +void KMyMoneyAccountTreeBase::slotOpenObject(TQListViewItem* i) { KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem *>(i); if(item) { @@ -380,7 +380,7 @@ void KMyMoneyAccountTreeBase::slotOpenFolder(void) m_autoopenTimer.stop(); if ( m_dropItem && !m_dropItem->isOpen() ) { m_dropItem->setOpen( TRUE ); - m_dropItem->repaint(); + m_dropItem->tqrepaint(); } } @@ -403,14 +403,14 @@ void KMyMoneyAccountTreeBase::slotAutoScroll(void) // don't show a highlighter during scrolling cleanItemHighlighter(); - QPoint p = viewport()->mapFromGlobal( QCursor::pos() ); + TQPoint p = viewport()->mapFromGlobal( TQCursor::pos() ); if ( m_autoscrollAccel-- <= 0 && m_autoscrollTime ) { m_autoscrollAccel = initialScrollAccel; m_autoscrollTime--; m_autoscrollTimer.start( m_autoscrollTime ); } - int l = QMAX(1,(initialScrollTime-m_autoscrollTime)); + int l = TQMAX(1,(initialScrollTime-m_autoscrollTime)); int dx=0,dy=0; if ( p.y() < autoscrollMargin ) { @@ -430,10 +430,10 @@ void KMyMoneyAccountTreeBase::slotAutoScroll(void) } } -void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e) +void KMyMoneyAccountTreeBase::contentsDragMoveEvent(TQDragMoveEvent* e) { - QPoint vp = contentsToViewport(e->pos()); - QRect inside_margin((contentsX() > 0) ? autoscrollMargin : 0, + TQPoint vp = contentsToViewport(e->pos()); + TQRect inside_margin((contentsX() > 0) ? autoscrollMargin : 0, (contentsY() > 0) ? autoscrollMargin : 0, visibleWidth() - ((contentsX() + visibleWidth() < contentsWidth()) ? autoscrollMargin*2 : 0), @@ -441,22 +441,22 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e) ? autoscrollMargin*2 : 0)); bool accepted = false; - QListViewItem *i = itemAt( vp ); + TQListViewItem *i = itemAt( vp ); if ( i ) { accepted = acceptDrag(e); if(accepted && !m_autoscrollTimer.isActive()) { if (dropHighlighter()) { - QRect tmpRect = drawItemHighlighter(0, i); + TQRect tmpRect = drawItemHighlighter(0, i); if (tmpRect != m_lastDropHighlighter) { cleanItemHighlighter(); m_lastDropHighlighter = tmpRect; - viewport()->repaint(tmpRect); + viewport()->tqrepaint(tmpRect); } } } - if ( !inside_margin.contains(vp) ) { + if ( !inside_margin.tqcontains(vp) ) { slotStartAutoScroll(); - e->accept(QRect(0,0,0,0)); // Keep sending move events + e->accept(TQRect(0,0,0,0)); // Keep sending move events m_autoopenTimer.stop(); } else { @@ -472,10 +472,10 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e) } if ( accepted ) { switch ( e->action() ) { - case QDropEvent::Copy: - case QDropEvent::Link: + case TQDropEvent::Copy: + case TQDropEvent::Link: break; - case QDropEvent::Move: + case TQDropEvent::Move: e->acceptAction(); break; default: @@ -495,27 +495,27 @@ void KMyMoneyAccountTreeBase::contentsDragMoveEvent(QDragMoveEvent* e) void KMyMoneyAccountTreeBase::cleanItemHighlighter(void) { if(m_lastDropHighlighter.isValid()) { - QRect rect=m_lastDropHighlighter; - m_lastDropHighlighter = QRect(); - // make sure, we repaint a bit more. that's important during + TQRect rect=m_lastDropHighlighter; + m_lastDropHighlighter = TQRect(); + // make sure, we tqrepaint a bit more. that's important during // autoscroll. if we don't do that, parts of the highlighter // do not get removed rect.moveBy(-1, -1); - rect.setSize(rect.size() + QSize(2,2)); - viewport()->repaint(rect, true); + rect.setSize(rect.size() + TQSize(2,2)); + viewport()->tqrepaint(rect, true); } } -void KMyMoneyAccountTreeBase::viewportPaintEvent(QPaintEvent* e) +void KMyMoneyAccountTreeBase::viewportPaintEvent(TQPaintEvent* e) { - QListView::viewportPaintEvent(e); + TQListView::viewportPaintEvent(e); if (m_lastDropHighlighter.isValid() && e->rect().intersects(m_lastDropHighlighter)) { - QPainter painter(viewport()); + TQPainter painter(viewport()); // This is where we actually draw the drop-highlighter - style().drawPrimitive(QStyle::PE_FocusRect, &painter, m_lastDropHighlighter, colorGroup(), - QStyle::Style_FocusAtBorder); + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, m_lastDropHighlighter, tqcolorGroup(), + TQStyle::Style_FocusAtBorder); } } @@ -533,8 +533,8 @@ const MyMoneyObject& KMyMoneyAccountTreeBaseItem::itemObject(void) const return m_account; } -KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyInstitution& institution) : - KListViewItem(parent), +KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyInstitution& institution) : + KListViewItem(tqparent), m_totalValue(MyMoneyMoney(0)), m_negative(false), m_institution(institution), @@ -543,8 +543,8 @@ KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, cons setName(); } -KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security, const QString& name) : - KListViewItem(parent), +KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security, const TQString& name) : + KListViewItem(tqparent), m_security(security), m_totalValue(MyMoneyMoney(0)), m_account(account), @@ -560,8 +560,8 @@ KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KListView *parent, cons setName(); } -KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : - KListViewItem(parent), +KMyMoneyAccountTreeBaseItem::KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : + KListViewItem(tqparent), m_price(price), m_security(security), m_totalValue(MyMoneyMoney(0)), @@ -576,18 +576,18 @@ KMyMoneyAccountTreeBaseItem::~KMyMoneyAccountTreeBaseItem() { } -const QString& KMyMoneyAccountTreeBaseItem::id(void) const +const TQString& KMyMoneyAccountTreeBaseItem::id(void) const { if(m_type == Institution) return m_institution.id(); return m_account.id(); } -bool KMyMoneyAccountTreeBaseItem::isChildOf(const QListViewItem* const item) const +bool KMyMoneyAccountTreeBaseItem::isChildOf(const TQListViewItem* const item) const { - QListViewItem *p = parent(); + TQListViewItem *p = tqparent(); while(p && p != item) { - p = p->parent(); + p = p->tqparent(); } return (p != 0); } @@ -596,8 +596,8 @@ MyMoneyMoney KMyMoneyAccountTreeBaseItem::value() const { // calculate the new value by running down the price list MyMoneyMoney result = balance(); - QValueList<MyMoneyPrice>::const_iterator it_p; - QString security = m_security.id(); + TQValueList<MyMoneyPrice>::const_iterator it_p; + TQString security = m_security.id(); for(it_p = m_price.begin(); it_p != m_price.end(); ++it_p) { result = (result * (MyMoneyMoney(1,1) / (*it_p).rate(security))).convert(MyMoneyMoney::precToDenom(KMyMoneyGlobalSettings::pricePrecision())); if((*it_p).from() == security) @@ -636,7 +636,7 @@ void KMyMoneyAccountTreeBaseItem::fillColumns() if (lv->valueColumn()<0) return; // show the top accounts always in total value - if((isOpen() || m_account.accountList().count() == 0) && parent()) { + if((isOpen() || m_account.accountList().count() == 0) && tqparent()) { // only show the balance, if its a different security/currency if(m_security.id() != listView()->baseCurrency().id()) { @@ -646,7 +646,7 @@ void KMyMoneyAccountTreeBaseItem::fillColumns() } else { setText(lv->balanceColumn(), " "); - if(parent()) + if(tqparent()) setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()) + " "); else setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency())); @@ -684,30 +684,30 @@ void KMyMoneyAccountTreeBaseItem::adjustTotalValue(const MyMoneyMoney& diff) { m_totalValue += diff; - // if the entry has no children, + // if the entry has no tqchildren, // or it is the top entry // or it is currently not open // we need to display the value of it KMyMoneyAccountTreeBase* lv = dynamic_cast<KMyMoneyAccountTreeBase*>(listView()); if(!lv) return; - if(!firstChild() || !parent() || (!isOpen() && firstChild())) { + if(!firstChild() || !tqparent() || (!isOpen() && firstChild())) { if(firstChild()) setText(lv->balanceColumn(), " "); - if(parent()) + if(tqparent()) setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency()) + " "); else setText(lv->valueColumn(), m_totalValue.formatMoney(listView()->baseCurrency())); } // now make sure, the upstream accounts also get notified about the value change - KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(parent()); + KMyMoneyAccountTreeBaseItem* p = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(tqparent()); if(p != 0) { p->adjustTotalValue(diff); } } -int KMyMoneyAccountTreeBaseItem::compare(QListViewItem* i, int col, bool ascending) const +int KMyMoneyAccountTreeBaseItem::compare(TQListViewItem* i, int col, bool ascending) const { KMyMoneyAccountTreeBaseItem* item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(i); // do special sorting only if @@ -734,20 +734,20 @@ int KMyMoneyAccountTreeBaseItem::compare(QListViewItem* i, int col, bool ascendi return KListViewItem::compare(i, col, ascending); } -void KMyMoneyAccountTreeBaseItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void KMyMoneyAccountTreeBaseItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); //set item background if(isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); #ifndef KMM_DESIGNER // display base accounts in bold - QFont font = KMyMoneyGlobalSettings::listCellFont(); - if(!parent()) + TQFont font = KMyMoneyGlobalSettings::listCellFont(); + if(!tqparent()) font.setBold(true); // strike out closed accounts @@ -757,21 +757,21 @@ void KMyMoneyAccountTreeBaseItem::paintCell(QPainter *p, const QColorGroup & cg, p->setFont(font); #endif //set text color - QColor textColour; + TQColor textColour; if(m_negative == true) { textColour = KMyMoneyGlobalSettings::listNegativeValueColor(); //if the item is marked is marked as negative, all columns will be painted negative } else { textColour = m_columnsColor[column]; //otherwise, respect the color for each column } - cg2.setColor(QColorGroup::Text, textColour); + cg2.setColor(TQColorGroup::Text, textColour); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } void KMyMoneyAccountTreeBase::expandCollapseAll(bool expand) { - QListViewItemIterator it(this); - QListViewItem* p; + TQListViewItemIterator it(this); + TQListViewItem* p; while((p = it.current()) != 0) { p->setOpen(expand); ++it; @@ -792,7 +792,7 @@ void KMyMoneyAccountTreeBase::queueSort(void) { if (sortColumn() == balanceColumn() || sortColumn() == valueColumn()) { ++m_queuedSort; - QTimer::singleShot(100, this, SLOT(slotActivateSort())); + TQTimer::singleShot(100, this, TQT_SLOT(slotActivateSort())); } } @@ -808,13 +808,13 @@ void KMyMoneyAccountTreeBaseItem::setNegative(bool isNegative) m_negative = isNegative; } -void KMyMoneyAccountTreeBaseItem::setText( int column, const QString &text, const bool &negative) +void KMyMoneyAccountTreeBaseItem::setText( int column, const TQString &text, const bool &negative) { //if negative set the map to negative color according to KMyMoneySettings if(negative) { m_columnsColor[column] = KMyMoneyGlobalSettings::listNegativeValueColor(); } else { - m_columnsColor[column] = QColorGroup::Text; + m_columnsColor[column] = TQColorGroup::Text; } KListViewItem::setText(column, text); diff --git a/kmymoney2/widgets/kmymoneyaccounttreebase.h b/kmymoney2/widgets/kmymoneyaccounttreebase.h index 4ee6a32..7b27b6a 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebase.h +++ b/kmymoney2/widgets/kmymoneyaccounttreebase.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -class QDragObject; +#include <tqtimer.h> +class TQDragObject; // ---------------------------------------------------------------------------- // KDE Includes @@ -45,8 +45,9 @@ class KMyMoneyAccountTreeBase : public KListView friend class KMyMoneyAccountTreeBaseItem; Q_OBJECT + TQ_OBJECT public: - KMyMoneyAccountTreeBase(QWidget* parent = 0, const char *name = 0); + KMyMoneyAccountTreeBase(TQWidget* tqparent = 0, const char *name = 0); virtual ~KMyMoneyAccountTreeBase(); /** @@ -54,7 +55,7 @@ public: * * @param txt the text to be used in the header */ - void setSectionHeader(const QString& txt); + void setSectionHeader(const TQString& txt); /** * overridden from base class implementation to return a pointer @@ -73,12 +74,12 @@ public: void emitValueChanged(void) { emit valueChanged(); }; /** - * restores the layout from the config file + * restores the tqlayout from the config file * @param group the group to be used from the config file. * At destruction time, we will use this group name to save - * the layout. + * the tqlayout. */ - void restoreLayout(const QString& group); + void restoreLayout(const TQString& group); public slots: /** autoscroll support */ @@ -88,21 +89,21 @@ public slots: void slotCollapseAll(void); protected: - virtual bool acceptDrag (QDropEvent* event) const; + virtual bool acceptDrag (TQDropEvent* event) const; virtual void startDrag(void); - const KMyMoneyAccountTreeBaseItem* findItem(const QString& id) const; + const KMyMoneyAccountTreeBaseItem* findItem(const TQString& id) const; /** * This method checks, if account @p accFrom can be dropped onto * account @p accTo. * * @param accFrom source account - * @param accTo new parent account for @p accFrom + * @param accTo new tqparent account for @p accFrom * @retval true drop is ok - * @retval false drop is not ok (@p accTo cannot be parent of @p accFrom) + * @retval false drop is not ok (@p accTo cannot be tqparent of @p accFrom) */ bool dropAccountOnAccount(const MyMoneyAccount& accFrom, const MyMoneyAccount& accTo) const; - // virtual void contentsDropEvent(QDropEvent*); + // virtual void contentsDropEvent(TQDropEvent*); /** * This member counts the connects to the signals @@ -120,7 +121,7 @@ protected: */ void disconnectNotify(const char *); - void contentsDragMoveEvent( QDragMoveEvent *e ); + void contentsDragMoveEvent( TQDragMoveEvent *e ); /** * Reimplemented for internal reasons. @@ -129,14 +130,14 @@ protected: * * The API is unaffected. */ - virtual void viewportPaintEvent(QPaintEvent*); + virtual void viewportPaintEvent(TQPaintEvent*); void expandCollapseAll(bool expand); void queueSort(void); protected slots: - void slotObjectDropped(QDropEvent* event, QListViewItem* parent, QListViewItem* after); + void slotObjectDropped(TQDropEvent* event, TQListViewItem* tqparent, TQListViewItem* after); /** * Select the object pointed to by @p i. This slot emits selectObject signals @@ -144,9 +145,9 @@ protected slots: * to deselect current selections. If @p i points to a KMyMoneyAccountTreeItem * object, it emits selectObject() for this item. * - * @param i pointer to QListViewItem of object to be selected + * @param i pointer to TQListViewItem of object to be selected */ - void slotSelectObject(QListViewItem *i); + void slotSelectObject(TQListViewItem *i); /** * This slot is connected to the accout list view's contextMenu signal @@ -154,19 +155,19 @@ protected slots: * and sends out the necessary signal openContextMenu. * * @param lv pointer to KListView - * @param i pointer to QListViewItem + * @param i pointer to TQListViewItem * @param p position information */ - void slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p); + void slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p); /** * This slot is connected to the accout list view's executed signal * and checks if the item pointed to by @p i is either an account or institution * and sends out the necessary signal openObject. * - * @param i pointer to QListViewItem + * @param i pointer to TQListViewItem */ - void slotOpenObject(QListViewItem* i); + void slotOpenObject(TQListViewItem* i); void slotAutoScroll(void); @@ -182,18 +183,18 @@ private: MyMoneySecurity m_baseCurrency; bool m_accountConnections; bool m_institutionConnections; - QTimer m_autoopenTimer; - QTimer m_autoscrollTimer; + TQTimer m_autoopenTimer; + TQTimer m_autoscrollTimer; int m_autoscrollTime; int m_autoscrollAccel; - QListViewItem* m_dropItem; - QRect m_lastDropHighlighter; + TQListViewItem* m_dropItem; + TQRect m_lastDropHighlighter; int m_queuedSort; int m_nameColumn; int m_typeColumn; int m_valueColumn; int m_balanceColumn; - QString m_configGroup; + TQString m_configGroup; public: int typeColumn(void) const { return m_typeColumn; } @@ -237,12 +238,12 @@ signals: /** * This signal is emitted, when the user selected to reparent the - * account @p acc to be a subordinate account of @p parent. + * account @p acc to be a subordinate account of @p tqparent. * * @param acc const reference to account to be reparented - * @param parent const reference to new parent account + * @param tqparent const reference to new tqparent account */ - void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& parent); + void reparent(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent); /** * This signal is emitted, when the user selected to reparent the @@ -266,18 +267,18 @@ public: * Constructor to be used to construct an institution entry * object. * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param institution const reference to MyMoneyInstitution for which * the KListView entry is constructed */ - KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyInstitution& institution); + KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyInstitution& institution); /** * Constructor to be used to construct a standard account entry object (e.g. Asset, * Liability, etc.). * - * @param parent pointer to the KListView object this entry should be + * @param tqparent pointer to the KListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -286,13 +287,13 @@ public: * @param name name of the account to be used instead of the one stored with @p account * If empty, the one stored with @p account will be used. Default: empty */ - KMyMoneyAccountTreeBaseItem(KListView *parent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString()); + KMyMoneyAccountTreeBaseItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString()); /** * Constructor to be used to construct an account entry * object. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -301,7 +302,7 @@ public: * @param security const reference to the security used to show the value. Usually * one should pass MyMoneyFile::baseCurrency() here. */ - KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *parent, const MyMoneyAccount& account, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); + KMyMoneyAccountTreeBaseItem(KMyMoneyAccountTreeBaseItem *tqparent, const MyMoneyAccount& account, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); ~KMyMoneyAccountTreeBaseItem(); @@ -342,17 +343,17 @@ public: * * @return const reference to id of object */ - const QString& id(void) const; + const TQString& id(void) const; /** * Helper method to show the right order */ - int compare(QListViewItem* i, int col, bool ascending) const; + int compare(TQListViewItem* i, int col, bool ascending) const; /** * If o is TRUE all child items are shown initially. The user can * hide them by clicking the - icon to the left of the item. If - * o is FALSE, the children of this item are initially hidden. + * o is FALSE, the tqchildren of this item are initially hidden. * The user can show them by clicking the + icon to the left of the item. * * Overrides KListViewItem::setOpen() and exchanges the value field @@ -364,11 +365,11 @@ public: virtual void setOpen(bool o); /** - * This method is re-implemented from QListViewItem::paintCell(). - * Besides the standard implementation, the QPainter is set + * This method is re-implemented from TQListViewItem::paintCell(). + * Besides the standard implementation, the TQPainter is set * according to the applications settings. */ - void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align); + void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); /** * Convenience method to return casted pointer @@ -410,12 +411,12 @@ public: * by @p item. * * @param item pointer to other KMyMoneyAccountTreeItem that - * should be checked for parent/grand-parenthood of this + * should be checked for tqparent/grand-tqparenthood of this * object * @retval true @p this object is a decendant of @p item * @retval false @p this object is no decendant of @p item */ - bool isChildOf(const QListViewItem* const item) const; + bool isChildOf(const TQListViewItem* const item) const; /** * Sets the whole item to be shown with negative colors @@ -426,7 +427,7 @@ public: * Sets the text of a given column. @param negative indicates whether it should * be shown as negative number or not */ - void setText( int column, const QString &text, const bool &negative = false ); + void setText( int column, const TQString &text, const bool &negative = false ); protected: /** @@ -446,18 +447,18 @@ protected: * Computes and returns the current value of the account held by this item. * This is the same as balance() but in the currency of the view. * if value() changed since the item has been displayed, updateAccount() - * will notify the parent. + * will notify the tqparent. * @return value of the account held by this item */ MyMoneyMoney value() const; protected: MyMoneyMoney m_value; - QValueList<MyMoneyPrice> m_price; + TQValueList<MyMoneyPrice> m_price; MyMoneySecurity m_security; MyMoneyMoney m_totalValue; MyMoneyAccount m_account; - QMap<int, QColor> m_columnsColor; + TQMap<int, TQColor> m_columnsColor; bool m_negative; private: diff --git a/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp b/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp index cd1da0b..9a6a7db 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttreebudget.cpp @@ -19,14 +19,14 @@ // Project Includes #include <kmymoneyaccounttreebudget.h> -KMyMoneyAccountTreeBudget::KMyMoneyAccountTreeBudget(QWidget* parent, const char* name) : - KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(parent, name) +KMyMoneyAccountTreeBudget::KMyMoneyAccountTreeBudget(TQWidget* tqparent, const char* name) : + KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(tqparent, name) { showType(); showValue(); } -void KMyMoneyAccountTreeBudget::slotSelectObject(const QListViewItem* i) +void KMyMoneyAccountTreeBudget::slotSelectObject(const TQListViewItem* i) { emit selectObject(MyMoneyInstitution()); emit selectObject(MyMoneyAccount()); @@ -37,15 +37,15 @@ void KMyMoneyAccountTreeBudget::slotSelectObject(const QListViewItem* i) } } -KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security, const QString& name) : - KMyMoneyAccountTreeBaseItem(parent, account, security, name), +KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security, const TQString& name) : + KMyMoneyAccountTreeBaseItem(tqparent, account, security, name), m_budget(budget) { updateAccount(true); } -KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *parent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : - KMyMoneyAccountTreeBaseItem(parent, account, price, security), +KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *tqparent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security) : + KMyMoneyAccountTreeBaseItem(tqparent, account, price, security), m_budget(budget) { updateAccount(true); diff --git a/kmymoney2/widgets/kmymoneyaccounttreebudget.h b/kmymoney2/widgets/kmymoneyaccounttreebudget.h index 86c1b07..470a8f8 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreebudget.h +++ b/kmymoney2/widgets/kmymoneyaccounttreebudget.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -class QDragObject; +#include <tqtimer.h> +class TQDragObject; // ---------------------------------------------------------------------------- // KDE Includes @@ -39,12 +39,13 @@ class KMyMoneyAccountTreeBudgetItem; class KMyMoneyAccountTreeBudget : public KMyMoneyAccountTreeBase { Q_OBJECT + TQ_OBJECT public: - KMyMoneyAccountTreeBudget(QWidget* parent = 0, const char *name = 0); + KMyMoneyAccountTreeBudget(TQWidget* tqparent = 0, const char *name = 0); virtual ~KMyMoneyAccountTreeBudget() {} public slots: - void slotSelectObject(const QListViewItem* i); + void slotSelectObject(const TQListViewItem* i); }; @@ -56,7 +57,7 @@ public: * Constructor to be used to construct an account * entry object for a budget. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -67,13 +68,13 @@ public: * @param security const reference to the security used to show the value. Usually * one should pass MyMoneyFile::baseCurrency() here. */ - KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *parent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); + KMyMoneyAccountTreeBudgetItem(KMyMoneyAccountTreeBudgetItem *tqparent, const MyMoneyAccount& account, const MyMoneyBudget& budget, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity()); /** * Constructor to be used to construct an account * entry object for a budget. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -84,7 +85,7 @@ public: * @param name name of the account to be used instead of the one stored with @p account * If empty, the one stored with @p account will be used. Default: empty */ - KMyMoneyAccountTreeBudgetItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString()); + KMyMoneyAccountTreeBudgetItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyBudget &budget, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString()); ~KMyMoneyAccountTreeBudgetItem(); diff --git a/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp b/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp index 0da5194..df1f735 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp +++ b/kmymoney2/widgets/kmymoneyaccounttreeforecast.cpp @@ -30,10 +30,10 @@ using namespace reports; -KMyMoneyAccountTreeForecast::KMyMoneyAccountTreeForecast(QWidget* parent, const char* name) : - KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(parent, name) +KMyMoneyAccountTreeForecast::KMyMoneyAccountTreeForecast(TQWidget* tqparent, const char* name) : + KMyMoneyAccountTreeBase::KMyMoneyAccountTreeBase(tqparent, name) { - setResizeMode(QListView::NoColumn); + setResizeMode(TQListView::NoColumn); } void KMyMoneyAccountTreeForecast::showAccount( void ) @@ -57,14 +57,14 @@ void KMyMoneyAccountTreeForecast::showSummary(MyMoneyForecast& forecast) addColumn(i18n("Current"), -1); //if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle - if(QDate::currentDate() < forecast.beginForecastDate()) { - daysToBeginDay = QDate::currentDate().daysTo(forecast.beginForecastDate()); + if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) { + daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate()); } else { daysToBeginDay = forecast.accountsCycle(); } for(int i = 0; ((i*forecast.accountsCycle())+daysToBeginDay) <= forecast.forecastDays(); ++i) { int intervalDays = ((i*forecast.accountsCycle())+daysToBeginDay); - QString columnName = i18n("%1 days").arg(intervalDays, 0, 10); + TQString columnName = i18n("%1 days").tqarg(intervalDays, 0, 10); addColumn(columnName, -1); } @@ -73,7 +73,7 @@ void KMyMoneyAccountTreeForecast::showSummary(MyMoneyForecast& forecast) //align columns for(int i = 1; i < columns(); ++i) { - setColumnAlignment(i, Qt::AlignRight); + setColumnAlignment(i, TQt::AlignRight); } } @@ -84,8 +84,8 @@ void KMyMoneyAccountTreeForecast::showDetailed(MyMoneyForecast& forecast) addColumn(i18n("Current"), -1); for(int i = 1; i <= forecast.forecastDays(); ++i) { - QDate forecastDate = QDate::currentDate().addDays(i); - QString columnName = KGlobal::locale()->formatDate(forecastDate, true); + TQDate forecastDate = TQDate::tqcurrentDate().addDays(i); + TQString columnName = KGlobal::locale()->formatDate(forecastDate, true); addColumn(columnName, -1); } @@ -94,7 +94,7 @@ void KMyMoneyAccountTreeForecast::showDetailed(MyMoneyForecast& forecast) //align columns for(int i = 1; i < columns(); ++i) { - setColumnAlignment(i, Qt::AlignRight); + setColumnAlignment(i, TQt::AlignRight); } } @@ -103,36 +103,36 @@ void KMyMoneyAccountTreeForecast::showAdvanced(MyMoneyForecast& forecast) int daysToBeginDay; //if beginning of forecast is today, set the begin day to next cycle to avoid repeating the first cycle - if(QDate::currentDate() < forecast.beginForecastDate()) { - daysToBeginDay = QDate::currentDate().daysTo(forecast.beginForecastDate()); + if(TQDate::tqcurrentDate() < forecast.beginForecastDate()) { + daysToBeginDay = TQDate::tqcurrentDate().daysTo(forecast.beginForecastDate()); } else { daysToBeginDay = forecast.accountsCycle(); } //add columns for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = addColumn(i18n("Min Bal %1").arg(i), -1); - setColumnAlignment(col, Qt::AlignRight); - addColumn(i18n("Min Date %1").arg(i), -1); + int col = addColumn(i18n("Min Bal %1").tqarg(i), -1); + setColumnAlignment(col, TQt::AlignRight); + addColumn(i18n("Min Date %1").tqarg(i), -1); } for(int i = 1; ((i * forecast.accountsCycle()) + daysToBeginDay) <= forecast.forecastDays(); ++i) { - int col = addColumn(i18n("Max Bal %1").arg(i), -1); - setColumnAlignment(col, Qt::AlignRight); - addColumn(i18n("Max Date %1").arg(i), -1); + int col = addColumn(i18n("Max Bal %1").tqarg(i), -1); + setColumnAlignment(col, TQt::AlignRight); + addColumn(i18n("Max Date %1").tqarg(i), -1); } int col = addColumn(i18n("Average"), -1); - setColumnAlignment(col, Qt::AlignRight); + setColumnAlignment(col, TQt::AlignRight); } void KMyMoneyAccountTreeForecast::showBudget(MyMoneyForecast& forecast) { - QDate forecastStartDate = forecast.forecastStartDate(); - QDate forecastEndDate = forecast.forecastEndDate(); + TQDate forecastStartDate = forecast.forecastStartDate(); + TQDate forecastEndDate = forecast.forecastEndDate(); //add cycle interval columns - QDate f_date = forecastStartDate; + TQDate f_date = forecastStartDate; for(; f_date <= forecastEndDate; f_date = f_date.addMonths(1)) { - QString columnName = QDate::longMonthName(f_date.month()); + TQString columnName = TQDate::longMonthName(f_date.month()); addColumn(columnName, -1); } //add total column @@ -141,11 +141,11 @@ void KMyMoneyAccountTreeForecast::showBudget(MyMoneyForecast& forecast) //align columns for(int i = 1; i < columns(); ++i) { - setColumnAlignment(i, Qt::AlignRight); + setColumnAlignment(i, TQt::AlignRight); } } -void KMyMoneyAccountTreeForecast::slotSelectObject(const QListViewItem* i) +void KMyMoneyAccountTreeForecast::slotSelectObject(const TQListViewItem* i) { emit selectObject(MyMoneyInstitution()); emit selectObject(MyMoneyAccount()); @@ -156,16 +156,16 @@ void KMyMoneyAccountTreeForecast::slotSelectObject(const QListViewItem* i) } } -KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security, const QString& name) : - KMyMoneyAccountTreeBaseItem(parent, account, security, name), +KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security, const TQString& name) : + KMyMoneyAccountTreeBaseItem(tqparent, account, security, name), m_forecast(forecast) { updateAccount(true); } -KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *parent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const QValueList<MyMoneyPrice>& price, const MyMoneySecurity& security, const EForecastViewType forecastType) : - KMyMoneyAccountTreeBaseItem(parent, account, price, security), +KMyMoneyAccountTreeForecastItem::KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *tqparent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const TQValueList<MyMoneyPrice>& price, const MyMoneySecurity& security, const EForecastViewType forecastType) : + KMyMoneyAccountTreeBaseItem(tqparent, account, price, security), m_forecast(forecast), m_forecastType(forecastType) { @@ -205,8 +205,8 @@ void KMyMoneyAccountTreeForecastItem::updateSummary() MyMoneyFile* file = MyMoneyFile::instance(); int daysToBeginDay; - if(QDate::currentDate() < m_forecast.beginForecastDate()) { - daysToBeginDay = QDate::currentDate().daysTo(m_forecast.beginForecastDate()); + if(TQDate::tqcurrentDate() < m_forecast.beginForecastDate()) { + daysToBeginDay = TQDate::tqcurrentDate().daysTo(m_forecast.beginForecastDate()); } else { daysToBeginDay = m_forecast.accountsCycle(); } @@ -221,7 +221,7 @@ void KMyMoneyAccountTreeForecastItem::updateSummary() //add current balance column - QDate summaryDate = QDate::currentDate(); + TQDate summaryDate = TQDate::tqcurrentDate(); amountMM = m_forecast.forecastBalance(m_account, summaryDate); //calculate the balance in base currency for the total row @@ -231,7 +231,7 @@ void KMyMoneyAccountTreeForecastItem::updateSummary() it_c++; //iterate through all other columns - for(QDate summaryDate = QDate::currentDate().addDays(daysToBeginDay); summaryDate <= m_forecast.forecastEndDate();summaryDate = summaryDate.addDays(m_forecast.accountsCycle()), ++it_c) { + for(TQDate summaryDate = TQDate::tqcurrentDate().addDays(daysToBeginDay); summaryDate <= m_forecast.forecastEndDate();summaryDate = summaryDate.addDays(m_forecast.accountsCycle()), ++it_c) { amountMM = m_forecast.forecastBalance(m_account, summaryDate); //calculate the balance in base currency for the total row @@ -248,8 +248,8 @@ void KMyMoneyAccountTreeForecastItem::updateSummary() void KMyMoneyAccountTreeForecastItem::updateDetailed() { - QString amount; - QString vAmount; + TQString amount; + TQString vAmount; MyMoneyMoney vAmountMM; MyMoneyFile* file = MyMoneyFile::instance(); @@ -263,7 +263,7 @@ void KMyMoneyAccountTreeForecastItem::updateDetailed() int it_c = 1; // iterator for the columns of the listview - for(QDate forecastDate = QDate::currentDate(); forecastDate <= m_forecast.forecastEndDate(); ++it_c, forecastDate = forecastDate.addDays(1)) { + for(TQDate forecastDate = TQDate::tqcurrentDate(); forecastDate <= m_forecast.forecastEndDate(); ++it_c, forecastDate = forecastDate.addDays(1)) { MyMoneyMoney amountMM = m_forecast.forecastBalance(m_account, forecastDate); //calculate the balance in base currency for the total row @@ -286,7 +286,7 @@ void KMyMoneyAccountTreeForecastItem::updateBudget() MyMoneyFile* file = MyMoneyFile::instance(); int it_c = 1; // iterator for the columns of the listview - QDate forecastDate = m_forecast.forecastStartDate(); + TQDate forecastDate = m_forecast.forecastStartDate(); if(m_account.isInvest()) { MyMoneySecurity underSecurity = file->security(m_account.currencyId()); @@ -329,14 +329,14 @@ void KMyMoneyAccountTreeForecastItem::adjustParentValue(int column, const MyMone m_values[column] += value; m_values[column] = m_values[column].convert(listView()->baseCurrency().smallestAccountFraction()); - // if the entry has no children, + // if the entry has no tqchildren, // or it is the top entry // or it is currently not open // we need to display the value of it KMyMoneyAccountTreeForecast* lv = dynamic_cast<KMyMoneyAccountTreeForecast*>(listView()); if(!lv) return; - if(!firstChild() || !parent() || (!isOpen() && firstChild()) + if(!firstChild() || !tqparent() || (!isOpen() && firstChild()) || depth() == 1 ) { if(firstChild()) setText(column, " "); @@ -345,15 +345,15 @@ void KMyMoneyAccountTreeForecastItem::adjustParentValue(int column, const MyMone } // now make sure, the upstream accounts also get notified about the value change - KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(parent()); + KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(tqparent()); if(p != 0) { p->adjustParentValue(column, value); } } -void KMyMoneyAccountTreeForecastItem::setValue(int column, MyMoneyMoney amount, QDate forecastDate) +void KMyMoneyAccountTreeForecastItem::setValue(int column, MyMoneyMoney amount, TQDate forecastDate) { - KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(parent()); + KMyMoneyAccountTreeForecastItem* p = dynamic_cast<KMyMoneyAccountTreeForecastItem*>(tqparent()); //calculate the balance in base currency for the total row if(m_account.currencyId() != listView()->baseCurrency().id()) { diff --git a/kmymoney2/widgets/kmymoneyaccounttreeforecast.h b/kmymoney2/widgets/kmymoneyaccounttreeforecast.h index 925d2e9..5f3cd85 100644 --- a/kmymoney2/widgets/kmymoneyaccounttreeforecast.h +++ b/kmymoney2/widgets/kmymoneyaccounttreeforecast.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -class QDragObject; +#include <tqtimer.h> +class TQDragObject; // ---------------------------------------------------------------------------- // KDE Includes @@ -39,8 +39,9 @@ class KMyMoneyAccountTreeForecastItem; class KMyMoneyAccountTreeForecast : public KMyMoneyAccountTreeBase { Q_OBJECT + TQ_OBJECT public: - KMyMoneyAccountTreeForecast(QWidget* parent = 0, const char *name = 0); + KMyMoneyAccountTreeForecast(TQWidget* tqparent = 0, const char *name = 0); virtual ~KMyMoneyAccountTreeForecast() {} void showSummary(MyMoneyForecast& forecast); @@ -51,7 +52,7 @@ class KMyMoneyAccountTreeForecast : public KMyMoneyAccountTreeBase void clearColumns(void); public slots: - void slotSelectObject(const QListViewItem* i); + void slotSelectObject(const TQListViewItem* i); }; @@ -65,7 +66,7 @@ public: * Constructor to be used to construct an account * entry object for a forecast. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -76,13 +77,13 @@ public: * @param security const reference to the security used to show the value. Usually * one should pass MyMoneyFile::baseCurrency() here. */ - KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *parent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const QValueList<MyMoneyPrice>& price = QValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity(), const EForecastViewType forecastViewType = eUndefined); + KMyMoneyAccountTreeForecastItem(KMyMoneyAccountTreeForecastItem *tqparent, const MyMoneyAccount& account, const MyMoneyForecast& forecast, const TQValueList<MyMoneyPrice>& price = TQValueList<MyMoneyPrice>(), const MyMoneySecurity& security = MyMoneySecurity(), const EForecastViewType forecastViewType = eUndefined); /** * Constructor to be used to construct an account * entry object for a forecast. * - * @param parent pointer to the parent KAccountListView object this entry should be + * @param tqparent pointer to the tqparent KAccountListView object this entry should be * added to. * @param account const reference to MyMoneyAccount for which * the KListView entry is constructed @@ -93,7 +94,7 @@ public: * @param name name of the account to be used instead of the one stored with @p account * If empty, the one stored with @p account will be used. Default: empty */ - KMyMoneyAccountTreeForecastItem(KListView *parent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security = MyMoneySecurity(), const QString& name = QString()); + KMyMoneyAccountTreeForecastItem(KListView *tqparent, const MyMoneyAccount& account, const MyMoneyForecast &forecast, const MyMoneySecurity& security = MyMoneySecurity(), const TQString& name = TQString()); ~KMyMoneyAccountTreeForecastItem(); @@ -153,14 +154,14 @@ protected: MyMoneyMoney balance() const; void showAmount(int column, const MyMoneyMoney amount, const MyMoneySecurity security); void adjustParentValue(int column, const MyMoneyMoney& value); - void setValue(int column, MyMoneyMoney amount, QDate forecastDate); + void setValue(int column, MyMoneyMoney amount, TQDate forecastDate); void setAmount(int column, MyMoneyMoney amount); private: MyMoneyForecast m_forecast; int m_daysToBeginDay; - QMap<int, MyMoneyMoney> m_values; - QMap<int, MyMoneyMoney> m_amounts; + TQMap<int, MyMoneyMoney> m_values; + TQMap<int, MyMoneyMoney> m_amounts; EForecastViewType m_forecastType; }; diff --git a/kmymoney2/widgets/kmymoneybriefschedule.cpp b/kmymoney2/widgets/kmymoneybriefschedule.cpp index 82776af..c4143ca 100644 --- a/kmymoney2/widgets/kmymoneybriefschedule.cpp +++ b/kmymoney2/widgets/kmymoneybriefschedule.cpp @@ -23,10 +23,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qtoolbutton.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,27 +43,27 @@ #include "kmymoneybriefschedule.h" #include "../kmymoneyutils.h" -KMyMoneyBriefSchedule::KMyMoneyBriefSchedule(QWidget *parent, const char *name ) - : kScheduleBriefWidget(parent,name, WStyle_Customize | WStyle_NoBorder) +KMyMoneyBriefSchedule::KMyMoneyBriefSchedule(TQWidget *tqparent, const char *name ) + : kScheduleBriefWidget(tqparent,name, WStyle_Customize | WStyle_NoBorder) { KIconLoader *ic = KGlobal::iconLoader(); - m_nextButton->setPixmap(BarIcon(QString::fromLatin1("1rightarrow"))); - m_prevButton->setPixmap(BarIcon(QString::fromLatin1("1leftarrow"))); + m_nextButton->setPixmap(BarIcon(TQString::tqfromLatin1("1rightarrow"))); + m_prevButton->setPixmap(BarIcon(TQString::tqfromLatin1("1leftarrow"))); - connect(m_prevButton, SIGNAL(clicked()), this, SLOT(slotPrevClicked())); - connect(m_nextButton, SIGNAL(clicked()), this, SLOT(slotNextClicked())); - connect(m_closeButton, SIGNAL(clicked()), this, SLOT(hide())); - connect(m_skipButton, SIGNAL(clicked()), this, SLOT(slotSkipClicked())); - connect(m_buttonEnter, SIGNAL(clicked()), this, SLOT(slotEnterClicked())); + connect(m_prevButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPrevClicked())); + connect(m_nextButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNextClicked())); + connect(m_closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(hide())); + connect(m_skipButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSkipClicked())); + connect(m_buttonEnter, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotEnterClicked())); KGuiItem skipGuiItem( i18n("&Skip"), - QIconSet(ic->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(ic->loadIcon("player_fwd", KIcon::Small, KIcon::SizeSmall)), i18n("Skip this transaction"), i18n("Use this button to skip this transaction")); m_skipButton->setGuiItem(skipGuiItem); KGuiItem enterGuiItem( i18n("&Enter"), - QIconSet(ic->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(ic->loadIcon("key_enter", KIcon::Small, KIcon::SizeSmall)), i18n("Record this transaction into the register"), i18n("Use this button to record this transaction")); m_buttonEnter->setGuiItem(enterGuiItem); @@ -73,7 +73,7 @@ KMyMoneyBriefSchedule::~KMyMoneyBriefSchedule() { } -void KMyMoneyBriefSchedule::setSchedules(QValueList<MyMoneySchedule> list, const QDate& date) +void KMyMoneyBriefSchedule::setSchedules(TQValueList<MyMoneySchedule> list, const TQDate& date) { m_scheduleList = list; m_date = date; @@ -94,12 +94,12 @@ void KMyMoneyBriefSchedule::loadSchedule() MyMoneySchedule sched = m_scheduleList[m_index]; m_indexLabel->setText(i18n("%1 of %2") - .arg(QString::number(m_index+1)) - .arg(QString::number(m_scheduleList.count()))); + .tqarg(TQString::number(m_index+1)) + .tqarg(TQString::number(m_scheduleList.count()))); m_name->setText(sched.name()); m_type->setText(KMyMoneyUtils::scheduleTypeToString(sched.type())); m_account->setText(sched.account().name()); - QString text; + TQString text; MyMoneyMoney amount = sched.transaction().splitByAccount(sched.account().id()).value(); amount = amount.abs(); @@ -107,35 +107,35 @@ void KMyMoneyBriefSchedule::loadSchedule() { int transactions = sched.paymentDates(m_date, sched.endDate()).count()-1; text = i18n("Payment on %1 for %2 with %3 transactions remaining occuring %4.") - .arg(KGlobal::locale()->formatDate(m_date, true)) - .arg(amount.formatMoney(sched.account().fraction())) - .arg(QString::number(transactions)) - .arg(i18n(sched.occurenceToString())); + .tqarg(KGlobal::locale()->formatDate(m_date, true)) + .tqarg(amount.formatMoney(sched.account().fraction())) + .tqarg(TQString::number(transactions)) + .tqarg(i18n(sched.occurenceToString())); } else { text = i18n("Payment on %1 for %2 occuring %4.") - .arg(KGlobal::locale()->formatDate(m_date, true)) - .arg(amount.formatMoney(sched.account().fraction())) - .arg(i18n(sched.occurenceToString())); + .tqarg(KGlobal::locale()->formatDate(m_date, true)) + .tqarg(amount.formatMoney(sched.account().fraction())) + .tqarg(i18n(sched.occurenceToString())); } - if (m_date < QDate::currentDate()) + if (m_date < TQDate::tqcurrentDate()) { if (sched.isOverdue()) { - QDate startD = (sched.lastPayment().isValid()) ? + TQDate startD = (sched.lastPayment().isValid()) ? sched.lastPayment() : sched.startDate(); if (m_date.isValid()) startD = m_date; - int days = startD.daysTo(QDate::currentDate()); - int transactions = sched.paymentDates(startD, QDate::currentDate()).count(); + int days = startD.daysTo(TQDate::tqcurrentDate()); + int transactions = sched.paymentDates(startD, TQDate::tqcurrentDate()).count(); text += "<br><font color=red>"; text += i18n("%1 days overdue (%2 occurences).") - .arg(QString::number(days)) - .arg(QString::number(transactions)); + .tqarg(TQString::number(days)) + .tqarg(TQString::number(transactions)); text += "</color>"; } } diff --git a/kmymoney2/widgets/kmymoneybriefschedule.h b/kmymoney2/widgets/kmymoneybriefschedule.h index f910e35..252cd78 100644 --- a/kmymoney2/widgets/kmymoneybriefschedule.h +++ b/kmymoney2/widgets/kmymoneybriefschedule.h @@ -25,8 +25,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqstringlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,14 +42,15 @@ class KMyMoneyBriefSchedule : public kScheduleBriefWidget { Q_OBJECT + TQ_OBJECT public: - KMyMoneyBriefSchedule(QWidget *parent=0, const char *name=0); + KMyMoneyBriefSchedule(TQWidget *tqparent=0, const char *name=0); ~KMyMoneyBriefSchedule(); - void setSchedules(QValueList<MyMoneySchedule> list, const QDate& date); + void setSchedules(TQValueList<MyMoneySchedule> list, const TQDate& date); signals: - void enterClicked(const MyMoneySchedule&, const QDate&); - void skipClicked(const MyMoneySchedule&, const QDate&); + void enterClicked(const MyMoneySchedule&, const TQDate&); + void skipClicked(const MyMoneySchedule&, const TQDate&); protected slots: void slotPrevClicked(); @@ -58,9 +59,9 @@ protected slots: void slotSkipClicked(); private: - QValueList<MyMoneySchedule> m_scheduleList; + TQValueList<MyMoneySchedule> m_scheduleList; unsigned int m_index; - QDate m_date; + TQDate m_date; void loadSchedule(); }; diff --git a/kmymoney2/widgets/kmymoneycalculator.cpp b/kmymoney2/widgets/kmymoneycalculator.cpp index 3e59331..8e1cbdd 100644 --- a/kmymoney2/widgets/kmymoneycalculator.cpp +++ b/kmymoney2/widgets/kmymoneycalculator.cpp @@ -23,9 +23,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qsignalmapper.h> -#include <qregexp.h> +#include <tqlabel.h> +#include <tqsignalmapper.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,19 +38,19 @@ #include "kmymoneycalculator.h" -kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name) - : QFrame(parent, name) +kMyMoneyCalculator::kMyMoneyCalculator(TQWidget* tqparent, const char *name) + : TQFrame(tqparent, name) { m_comma = KGlobal::locale()->monetaryDecimalSymbol()[0]; m_clearOperandOnDigit = false; - QGridLayout* grid = new QGridLayout(this, 5, 5, 1, 2); + TQGridLayout* grid = new TQGridLayout(this, 5, 5, 1, 2); - display = new QLabel(this); - display->setBackgroundColor(QColor("#BDFFB4")); + display = new TQLabel(this); + display->setBackgroundColor(TQColor("#BDFFB4")); - display->setFrameStyle( QFrame::Panel | QFrame::Sunken ); - display->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + display->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + display->tqsetAlignment(TQt::AlignRight | TQt::AlignVCenter); grid->addMultiCellWidget(display, 0, 0, 0, 4); buttons[0] = new KPushButton("0", this); @@ -67,7 +67,7 @@ kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name) buttons[MINUS] = new KPushButton("-", this); buttons[STAR] = new KPushButton("X", this); buttons[COMMA] = new KPushButton(m_comma, this); - buttons[EQUAL] = new KPushButton("=", this); + buttons[ETQUAL] = new KPushButton("=", this); buttons[SLASH] = new KPushButton("/", this); buttons[CLEAR] = new KPushButton("C", this); buttons[CLEARALL] = new KPushButton("AC", this); @@ -90,41 +90,41 @@ kMyMoneyCalculator::kMyMoneyCalculator(QWidget* parent, const char *name) grid->addWidget(buttons[MINUS], 4, 3); grid->addWidget(buttons[STAR], 3, 4); grid->addWidget(buttons[SLASH], 4, 4); - grid->addWidget(buttons[EQUAL], 4, 2); + grid->addWidget(buttons[ETQUAL], 4, 2); grid->addWidget(buttons[PLUSMINUS], 2, 3); grid->addWidget(buttons[PERCENT], 2, 4); grid->addWidget(buttons[CLEAR], 1, 3); grid->addWidget(buttons[CLEARALL], 1, 4); - buttons[EQUAL]->setFocus(); + buttons[ETQUAL]->setFocus(); op1 = 0.0; stackedOp = op = 0; - operand = QString(); + operand = TQString(); changeDisplay("0"); // connect the digit signals through a signal mapper - QSignalMapper* mapper = new QSignalMapper(this); + TQSignalMapper* mapper = new TQSignalMapper(TQT_TQOBJECT(this)); for(int i = 0; i < 10; ++i) { - mapper->setMapping(buttons[i], i); - connect(buttons[i], SIGNAL(clicked()), mapper, SLOT(map())); + mapper->setMapping(TQT_TQOBJECT(buttons[i]), i); + connect(buttons[i], TQT_SIGNAL(clicked()), mapper, TQT_SLOT(map())); } - connect(mapper, SIGNAL(mapped(int)), this, SLOT(digitClicked(int))); + connect(mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(digitClicked(int))); // connect the calculation operations through another mapper - mapper = new QSignalMapper(this); - for(int i = PLUS; i <= EQUAL; ++i) { - mapper->setMapping(buttons[i], i); - connect(buttons[i], SIGNAL(clicked()), mapper, SLOT(map())); + mapper = new TQSignalMapper(TQT_TQOBJECT(this)); + for(int i = PLUS; i <= ETQUAL; ++i) { + mapper->setMapping(TQT_TQOBJECT(buttons[i]), i); + connect(buttons[i], TQT_SIGNAL(clicked()), mapper, TQT_SLOT(map())); } - connect(mapper, SIGNAL(mapped(int)), this, SLOT(calculationClicked(int))); + connect(mapper, TQT_SIGNAL(mapped(int)), this, TQT_SLOT(calculationClicked(int))); // connect all remaining signals - connect(buttons[COMMA], SIGNAL(clicked()), SLOT(commaClicked())); - connect(buttons[PLUSMINUS], SIGNAL(clicked()), SLOT(plusminusClicked())); - connect(buttons[PERCENT], SIGNAL(clicked()), SLOT(percentClicked())); - connect(buttons[CLEAR], SIGNAL(clicked()), SLOT(clearClicked())); - connect(buttons[CLEARALL], SIGNAL(clicked()), SLOT(clearAllClicked())); + connect(buttons[COMMA], TQT_SIGNAL(clicked()), TQT_SLOT(commaClicked())); + connect(buttons[PLUSMINUS], TQT_SIGNAL(clicked()), TQT_SLOT(plusminusClicked())); + connect(buttons[PERCENT], TQT_SIGNAL(clicked()), TQT_SLOT(percentClicked())); + connect(buttons[CLEAR], TQT_SIGNAL(clicked()), TQT_SLOT(clearClicked())); + connect(buttons[CLEARALL], TQT_SIGNAL(clicked()), TQT_SLOT(clearAllClicked())); for(int i = 0; i < MAX_BUTTONS; ++i) { buttons[i]->setMinimumSize(40, 30); @@ -146,11 +146,11 @@ kMyMoneyCalculator::~kMyMoneyCalculator() void kMyMoneyCalculator::digitClicked(int button) { if(m_clearOperandOnDigit) { - operand = QString(); + operand = TQString(); m_clearOperandOnDigit = false; } - operand += QChar(button + 0x30); + operand += TQChar(button + 0x30); if(operand.length() > 16) operand = operand.left(16); changeDisplay(operand); @@ -160,7 +160,7 @@ void kMyMoneyCalculator::commaClicked(void) { if(operand.length() == 0) operand = "0"; - if(operand.contains('.', FALSE) == 0) + if(operand.tqcontains('.', FALSE) == 0) operand.append('.'); if(operand.length() > 16) @@ -174,8 +174,8 @@ void kMyMoneyCalculator::plusminusClicked(void) operand = m_result; if(operand.length() > 0) { - if(operand.find('-') != -1) - operand.replace('-', QString()); + if(operand.tqfind('-') != -1) + operand.tqreplace('-', TQString()); else operand.prepend('-'); changeDisplay(operand); @@ -184,7 +184,7 @@ void kMyMoneyCalculator::plusminusClicked(void) void kMyMoneyCalculator::calculationClicked(int button) { - if(operand.length() == 0 && op != 0 && button == EQUAL) { + if(operand.length() == 0 && op != 0 && button == ETQUAL) { op = 0; m_result = normalizeString(op1); changeDisplay(m_result); @@ -237,7 +237,7 @@ void kMyMoneyCalculator::calculationClicked(int button) if(error) { op = 0; changeDisplay("Error"); - operand = QString(); + operand = TQString(); } else { op1 = op2; m_result = normalizeString(op1); @@ -249,18 +249,18 @@ void kMyMoneyCalculator::calculationClicked(int button) changeDisplay(m_result); } - if(button != EQUAL) { + if(button != ETQUAL) { op = button; } else { op = 0; emit signalResultAvailable(); } - operand = QString(); + operand = TQString(); } -QString kMyMoneyCalculator::normalizeString(const double& val) +TQString kMyMoneyCalculator::normalizeString(const double& val) { - QString str; + TQString str; str.setNum(val, 'f'); int i = str.length(); while(i > 1 && str[i-1] == '0') { @@ -290,7 +290,7 @@ void kMyMoneyCalculator::clearClicked(void) void kMyMoneyCalculator::clearAllClicked(void) { - operand = QString(); + operand = TQString(); op = 0; changeDisplay("0"); } @@ -315,93 +315,93 @@ void kMyMoneyCalculator::percentClicked(void) } } -const QString kMyMoneyCalculator::result(void) const +const TQString kMyMoneyCalculator::result(void) const { - QString txt = m_result; - txt.replace(QRegExp("\\."), m_comma); + TQString txt = m_result; + txt.tqreplace(TQRegExp("\\."), m_comma); if(txt[0] == '-') { txt = txt.mid(1); // get rid of the minus sign - QString mask; + TQString tqmask; switch(KGlobal::locale()->negativeMonetarySignPosition()) { case KLocale::ParensAround: - mask = "(%1)"; + tqmask = "(%1)"; break; case KLocale::AfterQuantityMoney: - mask = "%1-"; + tqmask = "%1-"; break; case KLocale::AfterMoney: case KLocale::BeforeMoney: - mask = "%1 -"; + tqmask = "%1 -"; break; case KLocale::BeforeQuantityMoney: - mask = "-%1"; + tqmask = "-%1"; break; } - txt = QString(mask).arg(txt); + txt = TQString(tqmask).tqarg(txt); } return txt; } -void kMyMoneyCalculator::changeDisplay(const QString& str) +void kMyMoneyCalculator::changeDisplay(const TQString& str) { - QString txt = str; - txt.replace(QRegExp("\\."), m_comma); + TQString txt = str; + txt.tqreplace(TQRegExp("\\."), m_comma); display->setText("<b>" + txt + "</b>"); } -void kMyMoneyCalculator::keyPressEvent(QKeyEvent* ev) +void kMyMoneyCalculator::keyPressEvent(TQKeyEvent* ev) { int button = -1; switch(ev->key()) { - case Qt::Key_0: - case Qt::Key_1: - case Qt::Key_2: - case Qt::Key_3: - case Qt::Key_4: - case Qt::Key_5: - case Qt::Key_6: - case Qt::Key_7: - case Qt::Key_8: - case Qt::Key_9: + case TQt::Key_0: + case TQt::Key_1: + case TQt::Key_2: + case TQt::Key_3: + case TQt::Key_4: + case TQt::Key_5: + case TQt::Key_6: + case TQt::Key_7: + case TQt::Key_8: + case TQt::Key_9: if(m_clearOperandOnDigit) { - operand = QString(); + operand = TQString(); m_clearOperandOnDigit = false; } - button = ev->key() - Qt::Key_0; + button = ev->key() - TQt::Key_0; break; - case Qt::Key_Plus: + case TQt::Key_Plus: button = PLUS; break; - case Qt::Key_Minus: + case TQt::Key_Minus: button = MINUS; break; - case Qt::Key_Comma: - case Qt::Key_Period: + case TQt::Key_Comma: + case TQt::Key_Period: if(m_clearOperandOnDigit) { - operand = QString(); + operand = TQString(); m_clearOperandOnDigit = false; } button = COMMA; break; - case Qt::Key_Slash: + case TQt::Key_Slash: button = SLASH; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: button = CLEAR; break; - case Qt::Key_Asterisk: + case TQt::Key_Asterisk: button = STAR; break; - case Qt::Key_Return: - case Qt::Key_Enter: - case Qt::Key_Equal: - button = EQUAL; + case TQt::Key_Return: + case TQt::Key_Enter: + case TQt::Key_Equal: + button = ETQUAL; break; - case Qt::Key_Escape: + case TQt::Key_Escape: button = CLEARALL; break; - case Qt::Key_Percent: + case TQt::Key_Percent: button = PERCENT; break; default: @@ -414,26 +414,26 @@ void kMyMoneyCalculator::keyPressEvent(QKeyEvent* ev) m_clearOperandOnDigit = false; } -void kMyMoneyCalculator::setInitialValues(const QString& value, QKeyEvent* ev) +void kMyMoneyCalculator::setInitialValues(const TQString& value, TQKeyEvent* ev) { bool negative = false; // setup operand operand = value; - operand.replace(QRegExp(QString("\\")+KGlobal::locale()->thousandsSeparator()), QString()); - operand.replace(QRegExp(QString("\\")+m_comma), "."); - if(operand.contains('(')) { + operand.tqreplace(TQRegExp(TQString("\\")+KGlobal::locale()->thousandsSeparator()), TQString()); + operand.tqreplace(TQRegExp(TQString("\\")+m_comma), "."); + if(operand.tqcontains('(')) { negative = true; - operand.replace("(", QString()); - operand.replace(")", QString()); + operand.tqreplace("(", TQString()); + operand.tqreplace(")", TQString()); } - if(operand.contains('-')) { + if(operand.tqcontains('-')) { negative = true; - operand.replace("-", QString()); + operand.tqreplace("-", TQString()); } if(operand.isEmpty()) operand = "0"; else if(negative) - operand = QString("-%1").arg(operand); + operand = TQString("-%1").tqarg(operand); changeDisplay(operand); diff --git a/kmymoney2/widgets/kmymoneycalculator.h b/kmymoney2/widgets/kmymoneycalculator.h index 594d6c7..64674a1 100644 --- a/kmymoney2/widgets/kmymoneycalculator.h +++ b/kmymoney2/widgets/kmymoneycalculator.h @@ -26,13 +26,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qframe.h> -#include <qlayout.h> -#include <qgrid.h> -#include <qlcdnumber.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqgrid.h> +#include <tqlcdnumber.h> +#include <tqlineedit.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -56,10 +56,11 @@ * without having the user to re-type the data. See setInitialValues() * for details. */ -class kMyMoneyCalculator : public QFrame { +class kMyMoneyCalculator : public TQFrame { Q_OBJECT + TQ_OBJECT public: - kMyMoneyCalculator(QWidget* parent = 0, const char *name = 0); + kMyMoneyCalculator(TQWidget* tqparent = 0, const char *name = 0); ~kMyMoneyCalculator(); /** @@ -67,10 +68,10 @@ public: * calculation. The fractional part is separated from the * integral part by the character setup using setComma(). * - * @return QString representing the result of the + * @return TQString representing the result of the * last operation */ - const QString result(void) const; + const TQString result(void) const; /** * This method is used to set the character to be used @@ -78,9 +79,9 @@ public: * of an operand. Upon creation of the object, m_comma is * set to the current locale setting of KDE's decimalSymbol. * - * @param ch QChar representing the character to be used + * @param ch TQChar representing the character to be used */ - void setComma(const QChar ch) { m_comma = ch; }; + void setComma(const TQChar ch) { m_comma = ch; }; /** * This method is used to preset the first operand and start @@ -88,10 +89,10 @@ public: * by kMyMoneyEdit. If @p ev is 0, then no operation will be * started. * - * @param value reference to QString representing the operands value - * @param ev pointer to QKeyEvent representing the operation's key + * @param value reference to TQString representing the operands value + * @param ev pointer to TQKeyEvent representing the operation's key */ - void setInitialValues(const QString& value, QKeyEvent* ev); + void setInitialValues(const TQString& value, TQKeyEvent* ev); signals: /** @@ -100,16 +101,16 @@ signals: void signalResultAvailable(); protected: - void keyPressEvent(QKeyEvent* ev); + void keyPressEvent(TQKeyEvent* ev); /** - * This method is used to transform a double into a QString + * This method is used to transform a double into a TQString * and removing any trailing 0's and decimal seperators * * @param val reference to double value to be converted - * @return QString object containing the converted value + * @return TQString object containing the converted value */ - QString normalizeString(const double& val); + TQString normalizeString(const double& val); protected slots: /** @@ -124,7 +125,7 @@ protected slots: /** * This methods starts the operation contained in the parameter * - * @param button The Qt::Keycode for the button pressed or clicked + * @param button The TQt::Keycode for the button pressed or clicked */ void calculationClicked(int button); @@ -158,27 +159,27 @@ protected slots: * This method updates the display of the calculator with * the text passed as argument * - * @param str reference to QString containing the new display contents + * @param str reference to TQString containing the new display contents */ - void changeDisplay(const QString& str); + void changeDisplay(const TQString& str); private: /** * This member variable stores the current (second) operand */ - QString operand; + TQString operand; /** * This member variable stores the last result */ - QString m_result; + TQString m_result; /** * This member variable stores the representation of the * character to be used to separate the integer and fractional * part of numbers. The internal representation is always a period. */ - QChar m_comma; + TQChar m_comma; /** * The numeric representation of a stacked first operand @@ -204,7 +205,7 @@ private: /** * This member stores a pointer to the display area */ - QLabel *display; + TQLabel *display; /** * This member array stores the pointers to the various @@ -221,7 +222,7 @@ private: /* 0-9 are used by digits */ COMMA = 10, /* - * make sure, that PLUS through EQUAL remain in + * make sure, that PLUS through ETQUAL remain in * the order they are. Otherwise, check the calculation * signal mapper */ @@ -229,7 +230,7 @@ private: MINUS, SLASH, STAR, - EQUAL, + ETQUAL, PLUSMINUS, PERCENT, CLEAR, diff --git a/kmymoney2/widgets/kmymoneycalendar.cpp b/kmymoney2/widgets/kmymoneycalendar.cpp index 8f5291f..761cda8 100644 --- a/kmymoney2/widgets/kmymoneycalendar.cpp +++ b/kmymoney2/widgets/kmymoneycalendar.cpp @@ -45,17 +45,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpainter.h> -#include <qdrawutil.h> -#include <qframe.h> -#include <qpainter.h> -#include <qdialog.h> -#include <qstyle.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qfont.h> -#include <qvalidator.h> -#include <qpushbutton.h> +#include <tqpainter.h> +#include <tqdrawutil.h> +#include <tqframe.h> +#include <tqpainter.h> +#include <tqdialog.h> +#include <tqstyle.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqfont.h> +#include <tqvalidator.h> +#include <tqpushbutton.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -85,14 +85,14 @@ public: kMyMoneyCalendarPrivate() : closeButton(0L), selectWeek(0L), userButton1(0), userButton2(0) {} - QToolButton *closeButton; - QToolButton *selectWeek; - QPushButton *userButton1; - QPushButton *userButton2; + TQToolButton *closeButton; + TQToolButton *selectWeek; + TQPushButton *userButton1; + TQPushButton *userButton2; }; -kMyMoneyCalendar::kMyMoneyCalendar(QWidget *parent, const char *name ) : - QFrame(parent,name), +kMyMoneyCalendar::kMyMoneyCalendar(TQWidget *tqparent, const char *name ) : + TQFrame(tqparent,name), table(0), d(new kMyMoneyCalendarPrivate) { @@ -103,83 +103,83 @@ kMyMoneyCalendar::~kMyMoneyCalendar() delete d; } -void kMyMoneyCalendar::init( const QDate &dt ) +void kMyMoneyCalendar::init( const TQDate &dt ) { - styleControl = new QPushButton(i18n("Select Style"), this); - yearForward = new QToolButton(this); - yearBackward = new QToolButton(this); - monthForward = new QToolButton(this); - monthBackward = new QToolButton(this); - selectMonth = new QToolButton(this); - selectYear = new QToolButton(this); + styleControl = new TQPushButton(i18n("Select Style"), this); + yearForward = new TQToolButton(this); + yearBackward = new TQToolButton(this); + monthForward = new TQToolButton(this); + monthBackward = new TQToolButton(this); + selectMonth = new TQToolButton(this); + selectYear = new TQToolButton(this); line = new KLineEdit(this); val = new KDateValidator(this); fontsize = 10; - d->selectWeek = new QToolButton( this ); + d->selectWeek = new TQToolButton( this ); // KIconLoader *kiconloader = KGlobal::iconLoader(); KPopupMenu* kpopupmenuNew = new KPopupMenu(this); - kpopupmenuNew->insertItem(i18n("Week"), this, SLOT(slotSetStyleWeekly())); - kpopupmenuNew->insertItem(i18n("Month"), this, SLOT(slotSetStyleMonthly())); -/* kpopupmenuNew->insertItem(i18n("3 Months"), this, SLOT(slotSetStyleQuarterly())); */ + kpopupmenuNew->insertItem(i18n("Week"), this, TQT_SLOT(slotSetStyleWeekly())); + kpopupmenuNew->insertItem(i18n("Month"), this, TQT_SLOT(slotSetStyleMonthly())); +/* kpopupmenuNew->insertItem(i18n("3 Months"), this, TQT_SLOT(slotSetStyleQuarterly())); */ styleControl->setPopup(kpopupmenuNew); - QToolTip::add(styleControl, i18n("Choose Style")); - QToolTip::add(yearForward, i18n("Next year")); - QToolTip::add(yearBackward, i18n("Previous year")); - QToolTip::add(monthForward, i18n("Next month")); - QToolTip::add(monthBackward, i18n("Previous month")); - QToolTip::add(d->selectWeek, i18n("Select a week")); - QToolTip::add(selectMonth, i18n("Select a month")); - QToolTip::add(selectYear, i18n("Select a year")); + TQToolTip::add(styleControl, i18n("Choose Style")); + TQToolTip::add(yearForward, i18n("Next year")); + TQToolTip::add(yearBackward, i18n("Previous year")); + TQToolTip::add(monthForward, i18n("Next month")); + TQToolTip::add(monthBackward, i18n("Previous month")); + TQToolTip::add(d->selectWeek, i18n("Select a week")); + TQToolTip::add(selectMonth, i18n("Select a month")); + TQToolTip::add(selectYear, i18n("Select a year")); // ----- setFontSize(10); line->setValidator(val); line->installEventFilter( this ); - yearForward->setPixmap(BarIcon(QString::fromLatin1("2rightarrow"))); - yearBackward->setPixmap(BarIcon(QString::fromLatin1("2leftarrow"))); - monthForward->setPixmap(BarIcon(QString::fromLatin1("1rightarrow"))); - monthBackward->setPixmap(BarIcon(QString::fromLatin1("1leftarrow"))); + yearForward->setPixmap(BarIcon(TQString::tqfromLatin1("2rightarrow"))); + yearBackward->setPixmap(BarIcon(TQString::tqfromLatin1("2leftarrow"))); + monthForward->setPixmap(BarIcon(TQString::tqfromLatin1("1rightarrow"))); + monthBackward->setPixmap(BarIcon(TQString::tqfromLatin1("1leftarrow"))); setDate(dt); // set button texts - connect(table, SIGNAL(dateChanged(QDate)), SLOT(dateChangedSlot(QDate))); - connect(table, SIGNAL(tableClicked()), SLOT(tableClickedSlot())); - connect(monthForward, SIGNAL(clicked()), SLOT(monthForwardClicked())); - connect(monthBackward, SIGNAL(clicked()), SLOT(monthBackwardClicked())); - connect(yearForward, SIGNAL(clicked()), SLOT(yearForwardClicked())); - connect(yearBackward, SIGNAL(clicked()), SLOT(yearBackwardClicked())); - connect(d->selectWeek, SIGNAL(clicked()), SLOT(selectWeekClicked())); - connect(selectMonth, SIGNAL(clicked()), SLOT(selectMonthClicked())); - connect(selectYear, SIGNAL(clicked()), SLOT(selectYearClicked())); - connect(line, SIGNAL(returnPressed()), SLOT(lineEnterPressed())); + connect(table, TQT_SIGNAL(dateChanged(TQDate)), TQT_SLOT(dateChangedSlot(TQDate))); + connect(table, TQT_SIGNAL(tableClicked()), TQT_SLOT(tableClickedSlot())); + connect(monthForward, TQT_SIGNAL(clicked()), TQT_SLOT(monthForwardClicked())); + connect(monthBackward, TQT_SIGNAL(clicked()), TQT_SLOT(monthBackwardClicked())); + connect(yearForward, TQT_SIGNAL(clicked()), TQT_SLOT(yearForwardClicked())); + connect(yearBackward, TQT_SIGNAL(clicked()), TQT_SLOT(yearBackwardClicked())); + connect(d->selectWeek, TQT_SIGNAL(clicked()), TQT_SLOT(selectWeekClicked())); + connect(selectMonth, TQT_SIGNAL(clicked()), TQT_SLOT(selectMonthClicked())); + connect(selectYear, TQT_SIGNAL(clicked()), TQT_SLOT(selectYearClicked())); + connect(line, TQT_SIGNAL(returnPressed()), TQT_SLOT(lineEnterPressed())); if (table) table->setFocus(); } bool -kMyMoneyCalendar::eventFilter(QObject *o, QEvent *e ) +kMyMoneyCalendar::eventFilter(TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::KeyPress ) { - QKeyEvent *k = (QKeyEvent *)e; + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *k = (TQKeyEvent *)e; - if ( (k->key() == Qt::Key_Prior) || - (k->key() == Qt::Key_Next) || - (k->key() == Qt::Key_Up) || - (k->key() == Qt::Key_Down) ) + if ( (k->key() == TQt::Key_Prior) || + (k->key() == TQt::Key_Next) || + (k->key() == TQt::Key_Up) || + (k->key() == TQt::Key_Down) ) { - QApplication::sendEvent( table, e ); + TQApplication::sendEvent( table, e ); table->setFocus(); return TRUE; // eat event } } - return QFrame::eventFilter( o, e ); + return TQFrame::eventFilter( o, e ); } void -kMyMoneyCalendar::resizeEvent(QResizeEvent*) +kMyMoneyCalendar::resizeEvent(TQResizeEvent*) { - QWidget *buttons[] = { + TQWidget *buttons[] = { styleControl, d->userButton1, d->userButton2, @@ -192,7 +192,7 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*) d->closeButton }; const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]); - QSize sizes[NoOfButtons]; + TQSize sizes[NoOfButtons]; int buttonHeight=0; int count; int w; @@ -200,18 +200,18 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*) // ----- calculate button row height: for(count=0; count<NoOfButtons; ++count) { if ( buttons[count] ) { // closeButton may be 0L - sizes[count]=buttons[count]->sizeHint(); - buttonHeight=QMAX(buttonHeight, sizes[count].height()); + sizes[count]=buttons[count]->tqsizeHint(); + buttonHeight=TQMAX(buttonHeight, sizes[count].height()); } else - sizes[count] = QSize(0,0); // closeButton + sizes[count] = TQSize(0,0); // closeButton } // ----- calculate size of the month button: for(count=0; count<NoOfButtons; ++count) { if(buttons[count]==selectMonth) { - QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton, selectMonth, maxMonthRect); - sizes[count].setWidth(QMAX(metricBound.width(), maxMonthRect.width()+2*QApplication::style().pixelMetric(QStyle::PM_ButtonMargin))); + TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect); + sizes[count].setWidth(TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin))); } } // ----- place the buttons: @@ -245,7 +245,7 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*) } // ----- place the line edit for direct input: - sizes[0]=line->sizeHint(); + sizes[0]=line->tqsizeHint(); int week_width=d->selectWeek->fontMetrics().width(i18n("Week XX"))+((d->closeButton != 0L) ? 50 : 20); line->setGeometry(0, height()-sizes[0].height(), width()-week_width, sizes[0].height()); d->selectWeek->setGeometry(width()-week_width, height()-sizes[0].height(), week_width, sizes[0].height()); @@ -257,11 +257,11 @@ kMyMoneyCalendar::resizeEvent(QResizeEvent*) } void -kMyMoneyCalendar::dateChangedSlot(QDate date) +kMyMoneyCalendar::dateChangedSlot(TQDate date) { kdDebug() << "kMyMoneyCalendar::dateChangedSlot: date changed (" << date.year() << "/" << date.month() << "/" << date.day() << ")." << endl; line->setText(KGlobal::locale()->formatDate(date, true)); - d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date))); + d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date))); selectMonth->setText(MONTH_NAME(date.month(), date.year(), false)); selectYear->setText(date.toString("yyyy")); emit(dateChanged(date)); @@ -275,29 +275,29 @@ kMyMoneyCalendar::tableClickedSlot() emit(tableClicked()); } -const QDate& +const TQDate& kMyMoneyCalendar::getDate() const { return table->getDate(); } -const QDate & +const TQDate & kMyMoneyCalendar::date() const { return table->getDate(); } bool -kMyMoneyCalendar::setDate(const QDate& date) +kMyMoneyCalendar::setDate(const TQDate& date) { if (!table) return true; // hack if(date.isValid()) { - QString temp; + TQString temp; // ----- table->setDate(date); - d->selectWeek->setText(i18n("Week %1").arg(weekOfYear(date))); + d->selectWeek->setText(i18n("Week %1").tqarg(weekOfYear(date))); selectMonth->setText(MONTH_NAME(date.month(), date.year(), false)); temp.setNum(date.year()); selectYear->setText(temp); @@ -341,13 +341,13 @@ kMyMoneyCalendar::selectWeekClicked() KPopupFrame* popup = new KPopupFrame(this); KDateInternalWeekSelector* picker = new KDateInternalWeekSelector(/*fontsize, */popup); // ----- - picker->resize(picker->sizeHint()); + picker->resize(picker->tqsizeHint()); popup->setMainWidget(picker); - connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); + connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); picker->setFocus(); - if(popup->exec(d->selectWeek->mapToGlobal(QPoint(0, d->selectWeek->height())))) + if(popup->exec(d->selectWeek->mapToGlobal(TQPoint(0, d->selectWeek->height())))) { - QDate date; + TQDate date; int year; // ----- week=picker->getWeek(); @@ -380,13 +380,13 @@ kMyMoneyCalendar::selectMonthClicked() KPopupFrame* popup = new KPopupFrame(this); KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(/*fontsize, */popup); // ----- - picker->resize(picker->sizeHint()); + picker->resize(picker->tqsizeHint()); popup->setMainWidget(picker); picker->setFocus(); - connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); - if(popup->exec(selectMonth->mapToGlobal(QPoint(0, selectMonth->height())))) + connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); + if(popup->exec(selectMonth->mapToGlobal(TQPoint(0, selectMonth->height())))) { - QDate date; + TQDate date; int day; // ----- month=picker->getResult(); @@ -394,7 +394,7 @@ kMyMoneyCalendar::selectMonthClicked() day=date.day(); // ----- construct a valid date in this month: date.setYMD(date.year(), month, 1); - date.setYMD(date.year(), month, QMIN(day, date.daysInMonth())); + date.setYMD(date.year(), month, TQMIN(day, date.daysInMonth())); // ----- set this month setDate(date); } else { @@ -412,13 +412,13 @@ kMyMoneyCalendar::selectYearClicked() KPopupFrame* popup = new KPopupFrame(this); KDateInternalYearSelector* picker = new KDateInternalYearSelector(fontsize, popup); // ----- - picker->resize(picker->sizeHint()); + picker->resize(picker->tqsizeHint()); popup->setMainWidget(picker); - connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); + connect(picker, TQT_SIGNAL(closeMe(int)), popup, TQT_SLOT(close(int))); picker->setFocus(); - if(popup->exec(selectYear->mapToGlobal(QPoint(0, selectMonth->height())))) + if(popup->exec(selectYear->mapToGlobal(TQPoint(0, selectMonth->height())))) { - QDate date; + TQDate date; int day; // ----- year=picker->getYear(); @@ -426,7 +426,7 @@ kMyMoneyCalendar::selectYearClicked() day=date.day(); // ----- construct a valid date in this month: date.setYMD(year, date.month(), 1); - date.setYMD(year, date.month(), QMIN(day, date.daysInMonth())); + date.setYMD(year, date.month(), TQMIN(day, date.daysInMonth())); // ----- set this month setDate(date); } else { @@ -439,7 +439,7 @@ kMyMoneyCalendar::selectYearClicked() void kMyMoneyCalendar::setEnabled(bool enable) { - QWidget *widgets[]= { + TQWidget *widgets[]= { styleControl, yearForward, yearBackward, monthForward, monthBackward, selectMonth, selectYear, line, table, d->selectWeek, d->userButton1, d->userButton2 }; @@ -456,9 +456,9 @@ kMyMoneyCalendar::setEnabled(bool enable) void kMyMoneyCalendar::lineEnterPressed() { - QDate temp; + TQDate temp; // ----- - if(val->date(line->text(), temp)==QValidator::Acceptable) + if(val->date(line->text(), temp)==TQValidator::Acceptable) { kdDebug() << "kMyMoneyCalendar::lineEnterPressed: valid date entered." << endl; emit(dateEntered(temp)); @@ -469,11 +469,11 @@ kMyMoneyCalendar::lineEnterPressed() } } -QSize -kMyMoneyCalendar::sizeHint() const +TQSize +kMyMoneyCalendar::tqsizeHint() const { - QSize tableSize=table->sizeHint(); - QWidget *buttons[]={ + TQSize tableSize=table->tqsizeHint(); + TQWidget *buttons[]={ styleControl, yearBackward, monthBackward, @@ -486,30 +486,30 @@ kMyMoneyCalendar::sizeHint() const d->userButton2 }; const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]); - QSize sizes[NoOfButtons]; + TQSize sizes[NoOfButtons]; int cx=0, cy=0, count; // ----- store the size hints: for(count=0; count<NoOfButtons; ++count) { if ( buttons[count] ) - sizes[count]=buttons[count]->sizeHint(); + sizes[count]=buttons[count]->tqsizeHint(); else - sizes[count] = QSize(0,0); + sizes[count] = TQSize(0,0); if(buttons[count]==selectMonth) { - QSize metricBound = style().sizeFromContents(QStyle::CT_ToolButton, selectMonth, maxMonthRect); - cx+=QMAX(metricBound.width(), maxMonthRect.width()+2*QApplication::style().pixelMetric(QStyle::PM_ButtonMargin)); + TQSize metricBound = tqstyle().tqsizeFromContents(TQStyle::CT_ToolButton, selectMonth, maxMonthRect); + cx+=TQMAX(metricBound.width(), maxMonthRect.width()+2*TQApplication::tqstyle().tqpixelMetric(TQStyle::PM_ButtonMargin)); } else { cx+=sizes[count].width(); } - cy=QMAX(sizes[count].height(), cy); + cy=TQMAX(sizes[count].height(), cy); } // ----- calculate width hint: - cx=QMAX(cx, tableSize.width()); // line edit ignored + cx=TQMAX(cx, tableSize.width()); // line edit ignored // ----- calculate height hint: - cy+=tableSize.height()+line->sizeHint().height(); - return QSize(cx, cy); + cy+=tableSize.height()+line->tqsizeHint().height(); + return TQSize(cx, cy); } void @@ -517,7 +517,7 @@ kMyMoneyCalendar::setFontSize(int s) { if (table) { - QWidget *buttons[]= { + TQWidget *buttons[]= { // styleControl // yearBackward, // monthBackward, @@ -528,8 +528,8 @@ kMyMoneyCalendar::setFontSize(int s) }; const int NoOfButtons=sizeof(buttons)/sizeof(buttons[0]); int count; - QFont font; - QRect r; + TQFont font; + TQRect r; // ----- fontsize=s; for(count=0; count<NoOfButtons; ++count) @@ -538,12 +538,12 @@ kMyMoneyCalendar::setFontSize(int s) font.setPointSize(s); buttons[count]->setFont(font); } - QFontMetrics metrics(selectMonth->fontMetrics()); + TQFontMetrics metrics(selectMonth->fontMetrics()); for(int i=1; i <= 12; ++i) - { // maxMonthRect is used by sizeHint() + { // maxMonthRect is used by tqsizeHint() r=metrics.boundingRect(MONTH_NAME(i, 2000, false)); - maxMonthRect.setWidth(QMAX(r.width(), maxMonthRect.width())); - maxMonthRect.setHeight(QMAX(r.height(), maxMonthRect.height())); + maxMonthRect.setWidth(TQMAX(r.width(), maxMonthRect.width())); + maxMonthRect.setHeight(TQMAX(r.height(), maxMonthRect.height())); } table->setFontSize(s); } @@ -556,11 +556,11 @@ kMyMoneyCalendar::setCloseButton( bool enable ) return; if ( enable ) { - d->closeButton = new QToolButton( this ); - QToolTip::add(d->closeButton, i18n("Close")); + d->closeButton = new TQToolButton( this ); + TQToolTip::add(d->closeButton, i18n("Close")); d->closeButton->setPixmap( SmallIcon("remove") ); - connect( d->closeButton, SIGNAL( clicked() ), - topLevelWidget(), SLOT( close() ) ); + connect( d->closeButton, TQT_SIGNAL( clicked() ), + tqtopLevelWidget(), TQT_SLOT( close() ) ); } else { delete d->closeButton; @@ -575,23 +575,23 @@ bool kMyMoneyCalendar::hasCloseButton() const return (d->closeButton != 0L); } -int kMyMoneyCalendar::weekOfYear(QDate date) +int kMyMoneyCalendar::weekOfYear(TQDate date) { // Calculate ISO 8601 week number (taken from glibc/Gnumeric) int year, week, wday, jan1wday, nextjan1wday; - QDate jan1date, nextjan1date; + TQDate jan1date, nextjan1date; year=date.year(); wday=date.dayOfWeek(); - jan1date=QDate(year,1,1); + jan1date=TQDate(year,1,1); jan1wday=jan1date.dayOfWeek(); week = (date.dayOfYear()-1 + jan1wday-1)/7 + ((jan1wday-1) == 0 ? 1 : 0); /* Does date belong to last week of previous year? */ if ((week == 0) && (jan1wday > 4 /*THURSDAY*/)) { - QDate tmpdate=QDate(year-1,12,31); + TQDate tmpdate=TQDate(year-1,12,31); return weekOfYear(tmpdate); } @@ -599,7 +599,7 @@ int kMyMoneyCalendar::weekOfYear(QDate date) week++; if (week == 53) { - nextjan1date=QDate(year+1, 1, 1); + nextjan1date=TQDate(year+1, 1, 1); nextjan1wday = nextjan1date.dayOfWeek(); if (nextjan1wday <= 4 /*THURSDAY*/) week = 1; @@ -623,10 +623,10 @@ void kMyMoneyCalendar::slotSetStyleMonthly() void kMyMoneyCalendar::slotSetStyleQuarterly() { - setType(kMyMoneyDateTbl::QUARTERLY); + setType(kMyMoneyDateTbl::TQUARTERLY); } -void kMyMoneyCalendar::setUserButton1(bool enable, QPushButton* pb) +void kMyMoneyCalendar::setUserButton1(bool enable, TQPushButton* pb) { if ( enable == (d->userButton1 != 0L) ) return; @@ -642,7 +642,7 @@ void kMyMoneyCalendar::setUserButton1(bool enable, QPushButton* pb) updateGeometry(); } -void kMyMoneyCalendar::setUserButton2(bool enable, QPushButton* pb) +void kMyMoneyCalendar::setUserButton2(bool enable, TQPushButton* pb) { if ( enable == (d->userButton2 != 0L) ) return; diff --git a/kmymoney2/widgets/kmymoneycalendar.h b/kmymoney2/widgets/kmymoneycalendar.h index b0e2328..25ce79f 100644 --- a/kmymoney2/widgets/kmymoneycalendar.h +++ b/kmymoney2/widgets/kmymoneycalendar.h @@ -49,8 +49,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qframe.h> -#include <qdatetime.h> +#include <tqframe.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,11 +61,11 @@ // Project Includes #include "kmymoneydatetbl.h" -class QLineEdit; -class QToolButton; +class TQLineEdit; +class TQToolButton; class KDateValidator; class kMyMoneyDateTbl; -class QPushButton; +class TQPushButton; /** * A representation of a calendar. @@ -73,15 +73,16 @@ class QPushButton; * @author Michael Edwardes 2003 * **/ -class kMyMoneyCalendar : public QFrame { +class kMyMoneyCalendar : public TQFrame { Q_OBJECT + TQ_OBJECT public: public: /** * Standard constructor. **/ - kMyMoneyCalendar(QWidget *parent=0, const char *name=0); + kMyMoneyCalendar(TQWidget *tqparent=0, const char *name=0); /** * Standard destructor. @@ -104,7 +105,7 @@ public: * size hint, try adding 28 to each of the reported numbers of * pixels. **/ - QSize sizeHint() const; + TQSize tqsizeHint() const; /** * Sets the date. @@ -112,18 +113,18 @@ public: * @returns @p false and does not change anything * if the date given is invalid. **/ - bool setDate(const QDate&); + bool setDate(const TQDate&); /** * Returns the selected date. * @deprecated **/ - const QDate& getDate() const; + const TQDate& getDate() const; /** * @returns the selected date. */ - const QDate &date() const; + const TQDate &date() const; /** * Enables or disables the widget. @@ -143,7 +144,7 @@ public: /** * By calling this method with @p enable = true, KDatePicker will show * a little close-button in the upper button-row. Clicking the - * close-button will cause the KDatePicker's topLevelWidget()'s close() + * close-button will cause the KDatePicker's tqtopLevelWidget()'s close() * method being called. This is mostly useful for toplevel datepickers * without a window manager decoration. * @see #hasCloseButton @@ -163,41 +164,41 @@ public: **/ virtual void setDateTable(kMyMoneyDateTbl *tbl) = 0; - void setUserButton1(bool enable, QPushButton* pb); - void setUserButton2(bool enable, QPushButton* pb); + void setUserButton1(bool enable, TQPushButton* pb); + void setUserButton2(bool enable, TQPushButton* pb); protected: - /// to catch move keyEvents when QLineEdit has keyFocus - virtual bool eventFilter(QObject *o, QEvent *e ); + /// to catch move keyEvents when TQLineEdit has keyFocus + virtual bool eventFilter(TQObject *o, TQEvent *e ); /// the resize event - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); /// the style control button - QPushButton *styleControl; + TQPushButton *styleControl; /// the year forward button - QToolButton *yearForward; + TQToolButton *yearForward; /// the year backward button - QToolButton *yearBackward; + TQToolButton *yearBackward; /// the month forward button - QToolButton *monthForward; + TQToolButton *monthForward; /// the month backward button - QToolButton *monthBackward; + TQToolButton *monthBackward; /// the button for selecting the month directly - QToolButton *selectMonth; + TQToolButton *selectMonth; /// the button for selecting the year directly - QToolButton *selectYear; + TQToolButton *selectYear; /// the line edit to enter the date directly - QLineEdit *line; + TQLineEdit *line; /// the validator for the line edit: KDateValidator *val; /// the date table kMyMoneyDateTbl *table; /// the size calculated during resize events - // QSize sizehint; + // TQSize sizehint; /// the widest month string in pixels: - QSize maxMonthRect; + TQSize maxMonthRect; protected slots: - void dateChangedSlot(QDate); + void dateChangedSlot(TQDate); void tableClickedSlot(); void monthForwardClicked(); void monthBackwardClicked(); @@ -220,19 +221,19 @@ signals: * selected. * @see dateSelected */ - void dateChanged(QDate); + void dateChanged(TQDate); /** This signal is emitted each time a day has been selected by * clicking on the table (hitting a day in the current month). It * has the same meaning as dateSelected() in older versions of * KDatePicker. */ - void dateSelected(QDate); + void dateSelected(TQDate); /** This signal is emitted when enter is pressed and a VALID date * has been entered before into the line edit. Connect to both * dateEntered() and dateSelected() to receive all events where the * user really enters a date. */ - void dateEntered(QDate); + void dateEntered(TQDate); /** This signal is emitted when the day has been selected by * clicking on it in the table. */ @@ -244,13 +245,13 @@ private: protected: virtual void virtual_hook( int id, void* data ); - void init( const QDate &dt ); + void init( const TQDate &dt ); private: class kMyMoneyCalendarPrivate; kMyMoneyCalendarPrivate* const d; // calculate ISO 8601 week number - int weekOfYear(QDate); + int weekOfYear(TQDate); #if KDE_IS_VERSION(3,2,0) #define MONTH_NAME(a,b,c) KGlobal::locale()->calendar()->monthName(a,b,c) diff --git a/kmymoney2/widgets/kmymoneycategory.cpp b/kmymoney2/widgets/kmymoneycategory.cpp index e14a5a5..7fc8c5a 100644 --- a/kmymoney2/widgets/kmymoneycategory.cpp +++ b/kmymoney2/widgets/kmymoneycategory.cpp @@ -18,11 +18,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qrect.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qlayout.h> -#include <qtimer.h> +#include <tqrect.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqlayout.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -49,42 +49,42 @@ public: recursive(false) {} KPushButton* splitButton; - QFrame* frame; + TQFrame* frame; bool recursive; }; -KMyMoneyCategory::KMyMoneyCategory(QWidget* parent, const char * name, bool splitButton) : - KMyMoneyCombo(true, parent, name), +KMyMoneyCategory::KMyMoneyCategory(TQWidget* tqparent, const char * name, bool splitButton) : + KMyMoneyCombo(true, tqparent, name), d(new Private) { if(splitButton) { - d->frame = new QFrame(0); + d->frame = new TQFrame(0); d->frame->setFocusProxy(this); - QHBoxLayout* layout = new QHBoxLayout(d->frame); + TQHBoxLayout* tqlayout = new TQHBoxLayout(d->frame); // make sure not to use our own overridden version of reparent() here - KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, QPoint(0, 0), true); - if(parent) - d->frame->reparent(parent, QPoint(0, 0), true); + KMyMoneyCombo::reparent(d->frame, getWFlags() & ~WType_Mask, TQPoint(0, 0), true); + if(tqparent) + d->frame->reparent(tqparent, TQPoint(0, 0), true); // create button KGuiItem splitButtonItem("", - QIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small, + TQIconSet(KGlobal::iconLoader()->loadIcon("split_transaction", KIcon::Small, KIcon::SizeSmall)), "", ""); d->splitButton = new KPushButton(splitButtonItem, d->frame, "splitButton"); - layout->addWidget(this, 5); - layout->addWidget(d->splitButton); + tqlayout->addWidget(this, 5); + tqlayout->addWidget(d->splitButton); } m_completion = new kMyMoneyAccountCompletion(this, 0); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(textChanged(const QString&)), m_completion, SLOT(slotMakeCompletion(const QString&))); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(textChanged(const TQString&)), m_completion, TQT_SLOT(slotMakeCompletion(const TQString&))); } KMyMoneyCategory::~KMyMoneyCategory() { - // make sure to wipe out the frame, button and layout - if(d->frame && !d->frame->parentWidget()) + // make sure to wipe out the frame, button and tqlayout + if(d->frame && !d->frame->tqparentWidget()) d->frame->deleteLater(); delete d; @@ -95,19 +95,19 @@ KPushButton* KMyMoneyCategory::splitButton(void) const return d->splitButton; } -void KMyMoneyCategory::setPalette(const QPalette& palette) +void KMyMoneyCategory::setPalette(const TQPalette& palette) { if(d->frame) d->frame->setPalette(palette); KMyMoneyCombo::setPalette(palette); } -void KMyMoneyCategory::reparent(QWidget *parent, WFlags w, const QPoint& pos, bool showIt) +void KMyMoneyCategory::reparent(TQWidget *tqparent, WFlags w, const TQPoint& pos, bool showIt) { if(d->frame) - d->frame->reparent(parent, w, pos, showIt); + d->frame->reparent(tqparent, w, pos, showIt); else - KMyMoneyCombo::reparent(parent, w, pos, showIt); + KMyMoneyCombo::reparent(tqparent, w, pos, showIt); } kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const @@ -115,7 +115,7 @@ kMyMoneyAccountSelector* KMyMoneyCategory::selector(void) const return dynamic_cast<kMyMoneyAccountSelector*>(KMyMoneyCombo::selector()); } -void KMyMoneyCategory::setCurrentTextById(const QString& id) +void KMyMoneyCategory::setCurrentTextById(const TQString& id) { if(!id.isEmpty()) setCurrentText(MyMoneyFile::instance()->accountToCategory(id)); @@ -124,7 +124,7 @@ void KMyMoneyCategory::setCurrentTextById(const QString& id) setSuppressObjectCreation(false); } -void KMyMoneyCategory::slotItemSelected(const QString& id) +void KMyMoneyCategory::slotItemSelected(const TQString& id) { setCurrentTextById(id); @@ -136,7 +136,7 @@ void KMyMoneyCategory::slotItemSelected(const QString& id) } } -void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev) +void KMyMoneyCategory::focusOutEvent(TQFocusEvent *ev) { if(isSplitTransaction()) { KComboBox::focusOutEvent(ev); @@ -145,14 +145,14 @@ void KMyMoneyCategory::focusOutEvent(QFocusEvent *ev) } } -void KMyMoneyCategory::focusInEvent(QFocusEvent *ev) +void KMyMoneyCategory::focusInEvent(TQFocusEvent *ev) { KMyMoneyCombo::focusInEvent(ev); // make sure, we get a clean state before we automagically move the focus to // some other widget (like for 'split transaction'). We do this by delaying // the emission of the focusIn signal until the next run of the event loop. - QTimer::singleShot(0, this, SIGNAL(focusIn())); + TQTimer::singleShot(0, this, TQT_SIGNAL(focusIn())); } void KMyMoneyCategory::setSplitTransaction(void) @@ -183,8 +183,8 @@ void KMyMoneyCategory::setDisabled(bool disable) setEnabled(!disable); } -KMyMoneySecurity::KMyMoneySecurity(QWidget* parent, const char * name) : - KMyMoneyCategory(parent, name, false) +KMyMoneySecurity::KMyMoneySecurity(TQWidget* tqparent, const char * name) : + KMyMoneyCategory(tqparent, name, false) { } @@ -192,7 +192,7 @@ KMyMoneySecurity::~KMyMoneySecurity() { } -void KMyMoneySecurity::setCurrentTextById(const QString& id) +void KMyMoneySecurity::setCurrentTextById(const TQString& id) { if(!id.isEmpty()) KMyMoneyCategory::setCurrentText(MyMoneyFile::instance()->account(id).name()); diff --git a/kmymoney2/widgets/kmymoneycategory.h b/kmymoney2/widgets/kmymoneycategory.h index 474062d..5d90983 100644 --- a/kmymoney2/widgets/kmymoneycategory.h +++ b/kmymoney2/widgets/kmymoneycategory.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -class QWidget; -class QFrame; +class TQWidget; +class TQFrame; // ---------------------------------------------------------------------------- // KDE Includes @@ -48,7 +48,7 @@ class kMyMoneyAccountSelector; * If any match is found a list selection box is opened and the user can use * the up/down, page-up/page-down keys or the mouse to navigate in the list. If * an account is selected, the selection box is closed. Other key-strokes are - * directed to the parent object to manipulate the text. The visible contents of + * directed to the tqparent object to manipulate the text. The visible contents of * the selection box is updated with every key-stroke. * * This object is a replacement of the kMyMoneyCategory object and should be used @@ -59,26 +59,27 @@ class kMyMoneyAccountSelector; class KMyMoneyCategory : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor for the account selection object. * * If parameter @a splitButton is @a true, the widget - * will construct a surrounding QFrame and reparent itself to be a child of this - * QFrame. It also adds a KPushButton with the "Split" icon to the right of the + * will construct a surrounding TQFrame and reparent itself to be a child of this + * TQFrame. It also adds a KPushButton with the "Split" icon to the right of the * input field. In this case it is important not to use the pointer to this widget - * but it's parent when placing the object in a QLayout, QTable or some such. The - * parent widget (the QFrame in this case) can be extracted with the parentWidget() + * but it's tqparent when placing the object in a TQLayout, TQTable or some such. The + * tqparent widget (the TQFrame in this case) can be extracted with the tqparentWidget() * method. * - * Reparenting is handled by the object transparently for both cases. + * Retqparenting is handled by the object transparently for both cases. * * Standard usage example (no split button): * * @code * KMyMoneyCategory* category = new KMyMoneyCategory; * category->reparent(newParent); - * layout->addWidget(category); + * tqlayout->addWidget(category); * table->setCellWidget(category); * @endcode * @@ -87,11 +88,11 @@ public: * @code * KMyMoneyCategory* category = new KMyMoneyCategory(0, 0, true); * category->reparent(newParent); - * layout->addWidget(category->parentWidget()); - * table->setCellWidget(category->parentWidget()); + * tqlayout->addWidget(category->tqparentWidget()); + * table->setCellWidget(category->tqparentWidget()); * @endcode */ - KMyMoneyCategory(QWidget* parent = 0, const char* name = 0, bool splitButton = false); + KMyMoneyCategory(TQWidget* tqparent = 0, const char* name = 0, bool splitButton = false); virtual ~KMyMoneyCategory(); @@ -111,12 +112,12 @@ public: /** * Reimplemented for internal reasons. No API change */ - virtual void reparent( QWidget *parent, WFlags, const QPoint &, bool showIt = FALSE ); + virtual void reparent( TQWidget *tqparent, WFlags, const TQPoint &, bool showIt = FALSE ); /** * Reimplemented for internal reasons. No API change. */ - virtual void setPalette(const QPalette& palette); + virtual void setPalette(const TQPalette& palette); /** * Force the text field to show the text for split transaction. @@ -131,7 +132,7 @@ public: /** * overridden for internal reasons, no API change */ - void setCurrentText(const QString& txt = QString()) { KMyMoneyCombo::setCurrentText(txt); } + void setCurrentText(const TQString& txt = TQString()) { KMyMoneyCombo::setCurrentText(txt); } protected: /** @@ -139,20 +140,20 @@ protected: * * @sa focusIn() */ - virtual void focusInEvent(QFocusEvent* ev); + virtual void focusInEvent(TQFocusEvent* ev); /** * Reimplemented to support protected category text ("split transactions") */ - virtual void focusOutEvent(QFocusEvent* ev); + virtual void focusOutEvent(TQFocusEvent* ev); /** * set the widgets text area based on the item with the given @a id. */ - virtual void setCurrentTextById(const QString& id); + virtual void setCurrentTextById(const TQString& id); public slots: - virtual void slotItemSelected(const QString& id); + virtual void slotItemSelected(const TQString& id); virtual void setEnabled(bool); virtual void setDisabled(bool); @@ -177,20 +178,21 @@ private: class KMyMoneySecurity : public KMyMoneyCategory { Q_OBJECT + TQ_OBJECT public: - KMyMoneySecurity(QWidget* parent = 0, const char* name = 0); + KMyMoneySecurity(TQWidget* tqparent = 0, const char* name = 0); virtual ~KMyMoneySecurity(); /** * overridden for internal reasons, no API change */ - void setCurrentText(const QString& txt = QString()) { KMyMoneyCategory::setCurrentText(txt); } + void setCurrentText(const TQString& txt = TQString()) { KMyMoneyCategory::setCurrentText(txt); } protected: /** * set the widgets text area based on the item with the given @a id. */ - virtual void setCurrentTextById(const QString& id); + virtual void setCurrentTextById(const TQString& id); }; #endif diff --git a/kmymoney2/widgets/kmymoneychecklistitem.cpp b/kmymoney2/widgets/kmymoneychecklistitem.cpp index 8992beb..c1b9be9 100644 --- a/kmymoney2/widgets/kmymoneychecklistitem.cpp +++ b/kmymoney2/widgets/kmymoneychecklistitem.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qfont.h> -#include <qpainter.h> +#include <tqfont.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -31,8 +31,8 @@ #include "kmymoneylistviewitem.h" #include "../kmymoneyglobalsettings.h" -KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, const QString& txt, const QString& key, const QString& id, Type type) : - QCheckListItem(parent, txt, type), +KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListView* tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type) : + TQCheckListItem(tqparent, txt, type), m_key(key), m_id(id), m_isOdd(0), @@ -43,8 +43,8 @@ KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, const QString& t m_key = txt; } -KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListViewItem* parent, const QString& txt, const QString& key, const QString& id, Type type) : - QCheckListItem(parent, txt, type), +KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListViewItem* tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type) : + TQCheckListItem(tqparent, txt, type), m_key(key), m_id(id), m_isOdd(0), @@ -55,8 +55,8 @@ KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListViewItem* parent, const QStrin m_key = txt; } -KMyMoneyCheckListItem::KMyMoneyCheckListItem(QListView* parent, QListViewItem* after, const QString& txt, const QString& key, const QString& id, Type type) : - QCheckListItem(parent, after, txt, type), +KMyMoneyCheckListItem::KMyMoneyCheckListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, const TQString& key, const TQString& id, Type type) : + TQCheckListItem(tqparent, after, txt, type), m_key(key), m_id(id), m_isOdd(0), @@ -71,7 +71,7 @@ KMyMoneyCheckListItem::~KMyMoneyCheckListItem() { } -QString KMyMoneyCheckListItem::key(int column, bool ascending) const +TQString KMyMoneyCheckListItem::key(int column, bool ascending) const { Q_UNUSED(ascending); @@ -85,20 +85,20 @@ void KMyMoneyCheckListItem::stateChange(bool state) emit stateChanged(state); } -void KMyMoneyCheckListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KMyMoneyCheckListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg = cg; - _cg.setColor(QColorGroup::Base, backgroundColor()); + TQColorGroup _cg = cg; + _cg.setColor(TQColorGroup::Base, backgroundColor()); // write the groups in bold - QFont f = p->font(); + TQFont f = p->font(); f.setBold(!isSelectable()); p->setFont(f); - QCheckListItem::paintCell(p, _cg, column, width, alignment); + TQCheckListItem::paintCell(p, _cg, column, width, tqalignment); } -const QColor KMyMoneyCheckListItem::backgroundColor() +const TQColor KMyMoneyCheckListItem::backgroundColor() { return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor(); } @@ -118,15 +118,15 @@ bool KMyMoneyCheckListItem::isAlternate(void) KMyMoneyCheckListItem* clItem; KMyMoneyListViewItem* liItem; bool previous = true; - if(QListViewItem::parent()) { - clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()); - liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()); + if(TQListViewItem::tqparent()) { + clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()); + liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()); if(clItem) previous = clItem->m_isOdd; else previous = liItem->m_isOdd; - clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()->firstChild()); - liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()->firstChild()); + clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()->firstChild()); + liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()->firstChild()); } else { clItem = dynamic_cast<KMyMoneyCheckListItem *>(listView()->firstChild()); liItem = dynamic_cast<KMyMoneyListViewItem*>(listView()->firstChild()); diff --git a/kmymoney2/widgets/kmymoneychecklistitem.h b/kmymoney2/widgets/kmymoneychecklistitem.h index 6a22ec9..34776ce 100644 --- a/kmymoney2/widgets/kmymoneychecklistitem.h +++ b/kmymoney2/widgets/kmymoneychecklistitem.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> -#include <qlistview.h> +#include <tqobject.h> +#include <tqlistview.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -33,34 +33,35 @@ class KMyMoneyListViewItem; /** - * This class implements a derived version of a QCheckListItem that + * This class implements a derived version of a TQCheckListItem that * allows the storage of an engine object id with the object and emits * a signal upon state change. * * @author Thomas Baumgart */ -class KMyMoneyCheckListItem : public QObject, public QCheckListItem +class KMyMoneyCheckListItem : public TQObject, public TQCheckListItem { friend class KMyMoneyListViewItem; Q_OBJECT + TQ_OBJECT public: - KMyMoneyCheckListItem(QListView *parent, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox); - KMyMoneyCheckListItem(QListView *parent, QListViewItem* after, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox); - KMyMoneyCheckListItem(QListViewItem *parent, const QString& txt, const QString& key, const QString& id, Type type = QCheckListItem::CheckBox); + KMyMoneyCheckListItem(TQListView *tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox); + KMyMoneyCheckListItem(TQListView *tqparent, TQListViewItem* after, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox); + KMyMoneyCheckListItem(TQListViewItem *tqparent, const TQString& txt, const TQString& key, const TQString& id, Type type = TQCheckListItem::CheckBox); ~KMyMoneyCheckListItem(); - const QString& id(void) const { return m_id; }; + const TQString& id(void) const { return m_id; }; /** * use my own paint method */ - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); /** * use my own backgroundColor method */ - const QColor backgroundColor(); + const TQColor backgroundColor(); /** * see KListViewItem::isAlternate() @@ -73,7 +74,7 @@ public: * the constructor concatenated with the value returned by text(0) is returned. For @a column * equals to 1, the @a key as passed to the constructor except the first character is returned. */ - QString key(int column, bool ascending) const; + TQString key(int column, bool ascending) const; signals: void stateChanged(bool); @@ -82,8 +83,8 @@ protected: virtual void stateChange(bool); private: - QString m_key; - QString m_id; + TQString m_key; + TQString m_id; // copied from KListViewItem() unsigned int m_isOdd : 1; unsigned int m_isKnown : 1; diff --git a/kmymoney2/widgets/kmymoneycombo.cpp b/kmymoney2/widgets/kmymoneycombo.cpp index 8bbec10..387929f 100644 --- a/kmymoney2/widgets/kmymoneycombo.cpp +++ b/kmymoney2/widgets/kmymoneycombo.cpp @@ -18,10 +18,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qrect.h> -#include <qstyle.h> -#include <qpainter.h> -#include <qapplication.h> +#include <tqrect.h> +#include <tqstyle.h> +#include <tqpainter.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,7 +43,7 @@ #include <kmymoney/mymoneyscheduled.h> #include "../kmymoneyutils.h" -KMyMoneyCombo::KMyMoneyCombo(QWidget *w, const char *name) : +KMyMoneyCombo::KMyMoneyCombo(TQWidget *w, const char *name) : KComboBox(w, name), m_completion(0), m_edit(0), @@ -52,7 +52,7 @@ KMyMoneyCombo::KMyMoneyCombo(QWidget *w, const char *name) : { } -KMyMoneyCombo::KMyMoneyCombo(bool rw, QWidget *w, const char *name) : +KMyMoneyCombo::KMyMoneyCombo(bool rw, TQWidget *w, const char *name) : KComboBox(rw, w, name), m_completion(0), m_edit(0), @@ -65,17 +65,17 @@ KMyMoneyCombo::KMyMoneyCombo(bool rw, QWidget *w, const char *name) : } } -void KMyMoneyCombo::setCurrentTextById(const QString& id) +void KMyMoneyCombo::setCurrentTextById(const TQString& id) { setCurrentText(); if(!id.isEmpty()) { - QListViewItem* item = selector()->item(id); + TQListViewItem* item = selector()->item(id); if(item) setCurrentText(item->text(0)); } } -void KMyMoneyCombo::slotItemSelected(const QString& id) +void KMyMoneyCombo::slotItemSelected(const TQString& id) { if(editable()) { bool blocked = signalsBlocked(); @@ -110,37 +110,37 @@ void KMyMoneyCombo::setEditable(bool y) } } -void KMyMoneyCombo::setHint(const QString& hint) const +void KMyMoneyCombo::setHint(const TQString& hint) const { if(m_edit) m_edit->setHint(hint); } -void KMyMoneyCombo::paintEvent(QPaintEvent* ev) +void KMyMoneyCombo::paintEvent(TQPaintEvent* ev) { KComboBox::paintEvent(ev); // if we don't have an edit field, we need to paint the text onto the button if(!m_edit) { if(m_completion) { - QStringList list; + TQStringList list; selector()->selectedItems(list); if(!list.isEmpty()) { - QString str = selector()->item(list[0])->text(0); + TQString str = selector()->item(list[0])->text(0); // we only paint, if the text is longer than 1 char. Assumption // is that length 1 is the blank case so no need to do painting if(str.length() > 1) { - QPainter p( this ); - const QColorGroup & g = colorGroup(); + TQPainter p( this ); + const TQColorGroup & g = tqcolorGroup(); p.setPen(g.text()); - QRect re = style().querySubControlMetrics( QStyle::CC_ComboBox, this, - QStyle::SC_ComboBoxEditField ); - re = QStyle::visualRect(re, this); + TQRect re = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxEditField ); + re = TQStyle::tqvisualRect(re, this); p.setClipRect( re ); p.save(); p.setFont(font()); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); int x = re.x(), y = re.y() + fm.ascent(); p.drawText( x, y, str ); p.restore(); @@ -150,7 +150,7 @@ void KMyMoneyCombo::paintEvent(QPaintEvent* ev) } } -void KMyMoneyCombo::setPaletteBackgroundColor(const QColor& color) +void KMyMoneyCombo::setPaletteBackgroundColor(const TQColor& color) { KComboBox::setPaletteBackgroundColor(color); if(m_edit) { @@ -158,10 +158,10 @@ void KMyMoneyCombo::setPaletteBackgroundColor(const QColor& color) } } -void KMyMoneyCombo::mousePressEvent(QMouseEvent *e) +void KMyMoneyCombo::mousePressEvent(TQMouseEvent *e) { - // mostly copied from QCombo::mousePressEvent() and adjusted for our needs - if(e->button() != LeftButton) + // mostly copied from TQCombo::mousePressEvent() and adjusted for our needs + if(e->button() != Qt::LeftButton) return; if(((!editable() || isInArrowArea(mapToGlobal(e->pos()))) && selector()->itemList().count()) && !m_completion->isVisible()) { @@ -178,24 +178,24 @@ void KMyMoneyCombo::mousePressEvent(QMouseEvent *e) } } -bool KMyMoneyCombo::isInArrowArea(const QPoint& pos) const +bool KMyMoneyCombo::isInArrowArea(const TQPoint& pos) const { - QRect arrowRect = style().querySubControlMetrics( QStyle::CC_ComboBox, this, - QStyle::SC_ComboBoxArrow); - arrowRect = QStyle::visualRect(arrowRect, this); + TQRect arrowRect = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxArrow); + arrowRect = TQStyle::tqvisualRect(arrowRect, this); // Correction for motif style, where arrow is smaller // and thus has a rect that doesn't fit the button. - arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); + arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // if the button is not editable, it covers the whole widget if(!editable()) arrowRect = rect(); - return arrowRect.contains(mapFromGlobal(pos)); + return arrowRect.tqcontains(mapFromGlobal(pos)); } -void KMyMoneyCombo::keyPressEvent(QKeyEvent* e) +void KMyMoneyCombo::keyPressEvent(TQKeyEvent* e) { if((e->key() == Key_F4 && e->state() == 0 ) || (e->key() == Key_Down && (e->state() & AltButton)) || @@ -211,19 +211,19 @@ void KMyMoneyCombo::keyPressEvent(QKeyEvent* e) void KMyMoneyCombo::connectNotify(const char* signal) { - if(signal && !strcmp(signal, SIGNAL(createItem(const QString&,QString&)))) { + if(signal && !strcmp(signal, TQT_SIGNAL(createItem(const TQString&,TQString&)))) { m_canCreateObjects = true; } } void KMyMoneyCombo::disconnectNotify(const char* signal) { - if(signal && !strcmp(signal, SIGNAL(createItem(const QString&,QString&)))) { + if(signal && !strcmp(signal, TQT_SIGNAL(createItem(const TQString&,TQString&)))) { m_canCreateObjects = false; } } -void KMyMoneyCombo::focusOutEvent(QFocusEvent* e) +void KMyMoneyCombo::focusOutEvent(TQFocusEvent* e) { if(m_inFocusOutEvent) { KComboBox::focusOutEvent(e); @@ -233,8 +233,8 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e) m_inFocusOutEvent = true; if(editable() && !currentText().isEmpty()) { if(m_canCreateObjects) { - if(!m_completion->selector()->contains(currentText())) { - QString id; + if(!m_completion->selector()->tqcontains(currentText())) { + TQString id; // annouce that we go into a possible dialog to create an object // This can be used by upstream widgets to disable filters etc. emit objectCreation(true); @@ -254,8 +254,8 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e) // else if we cannot create objects, and the current text is not // in the list, then we clear the text and the selection. - } else if(!m_completion->selector()->contains(currentText())) { - setCurrentText(QString()); + } else if(!m_completion->selector()->tqcontains(currentText())) { + setCurrentText(TQString()); } } @@ -263,11 +263,11 @@ void KMyMoneyCombo::focusOutEvent(QFocusEvent* e) // force update of hint and id if there is no text in the widget if(editable() && currentText().isEmpty()) { - QString id = m_id; - m_id = QString(); + TQString id = m_id; + m_id = TQString(); if(!id.isEmpty()) emit itemSelected(m_id); - repaint(); + tqrepaint(); } m_inFocusOutEvent = false; } @@ -282,12 +282,12 @@ kMyMoneyCompletion* KMyMoneyCombo::completion(void) const return m_completion; } -void KMyMoneyCombo::selectedItem(QString& id) const +void KMyMoneyCombo::selectedItem(TQString& id) const { id = m_id; } -void KMyMoneyCombo::selectedItems(QStringList& list) const +void KMyMoneyCombo::selectedItems(TQStringList& list) const { if(lineEdit() && lineEdit()->text().length() == 0) { list.clear(); @@ -296,7 +296,7 @@ void KMyMoneyCombo::selectedItems(QStringList& list) const } } -void KMyMoneyCombo::setSelectedItem(const QString& id) +void KMyMoneyCombo::setSelectedItem(const TQString& id) { m_completion->selector()->setSelected(id, true); blockSignals(true); @@ -305,54 +305,54 @@ void KMyMoneyCombo::setSelectedItem(const QString& id) update(); } -QSize KMyMoneyCombo::sizeHint() const +TQSize KMyMoneyCombo::tqsizeHint() const { - return KComboBox::sizeHint(); + return KComboBox::tqsizeHint(); // I wanted to use the code below to adjust the size of the combo box - // according to the largest item in the selector list. Apparently that + // according to the largest item in the selector list. Aptqparently that // does not work too well in the enter and edit schedule dialog for // the category combo box. So we just use the standard implementation for now. #if 0 constPolish(); int i, w; - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); - int maxW = count() ? 18 : 7 * fm.width(QChar('x')) + 18; - int maxH = QMAX( fm.lineSpacing(), 14 ) + 2; + int maxW = count() ? 18 : 7 * fm.width(TQChar('x')) + 18; + int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2; w = selector()->optimizedWidth(); if ( w > maxW ) maxW = w; - QSize sizeHint = (style().sizeFromContents(QStyle::CT_ComboBox, this, - QSize(maxW, maxH)). - expandedTo(QApplication::globalStrut())); + TQSize tqsizeHint = (style().sizeFromContents(TQStyle::CT_ComboBox, this, + TQSize(maxW, maxH)). + expandedTo(TQApplication::globalStrut())); - return sizeHint; + return tqsizeHint; #endif } -KMyMoneyReconcileCombo::KMyMoneyReconcileCombo(QWidget* w, const char* name) : +KMyMoneyReconcileCombo::KMyMoneyReconcileCombo(TQWidget* w, const char* name) : KMyMoneyCombo(false, w, name) { m_completion = new kMyMoneyCompletion(this, 0); - // connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SIGNAL(itemSelected(const QString&))); + // connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SIGNAL(itemSelected(const TQString&))); // add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details) - // selector()->newTopItem(i18n("Frozen"), QString(), "F"); - selector()->newTopItem(i18n("Reconciled"), QString(), "R"); - selector()->newTopItem(i18n("Cleared"), QString(), "C"); - selector()->newTopItem(i18n("Not reconciled"), QString(), " "); - selector()->newTopItem(" ", QString(), "U"); + // selector()->newTopItem(i18n("Frozen"), TQString(), "F"); + selector()->newTopItem(i18n("Reconciled"), TQString(), "R"); + selector()->newTopItem(i18n("Cleared"), TQString(), "C"); + selector()->newTopItem(i18n("Not reconciled"), TQString(), " "); + selector()->newTopItem(" ", TQString(), "U"); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetState(const QString&))); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetState(const TQString&))); } -void KMyMoneyReconcileCombo::slotSetState(const QString& state) +void KMyMoneyReconcileCombo::slotSetState(const TQString& state) { setSelectedItem(state); } @@ -364,7 +364,7 @@ void KMyMoneyReconcileCombo::removeDontCare(void) void KMyMoneyReconcileCombo::setState(MyMoneySplit::reconcileFlagE state) { - QString id; + TQString id; switch(state) { case MyMoneySplit::NotReconciled: id = " "; @@ -392,7 +392,7 @@ MyMoneySplit::reconcileFlagE KMyMoneyReconcileCombo::state(void) const { MyMoneySplit::reconcileFlagE state = MyMoneySplit::NotReconciled; - QStringList list; + TQStringList list; selector()->selectedItems(list); if(!list.isEmpty()) { if(list[0] == "C") @@ -408,28 +408,28 @@ MyMoneySplit::reconcileFlagE KMyMoneyReconcileCombo::state(void) const } -KMyMoneyComboAction::KMyMoneyComboAction(QWidget* w, const char* name) : +KMyMoneyComboAction::KMyMoneyComboAction(TQWidget* w, const char* name) : KMyMoneyCombo(false, w, name) { m_completion = new kMyMoneyCompletion(this, 0); - QString num; + TQString num; // add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details) - selector()->newTopItem(i18n("ATM"), QString(), num.setNum(KMyMoneyRegister::ActionAtm)); - selector()->newTopItem(i18n("Withdrawal"), QString(), num.setNum(KMyMoneyRegister::ActionWithdrawal)); - selector()->newTopItem(i18n("Transfer"), QString(), num.setNum(KMyMoneyRegister::ActionTransfer)); - selector()->newTopItem(i18n("Deposit"), QString(), num.setNum(KMyMoneyRegister::ActionDeposit)); - selector()->newTopItem(i18n("Cheque"), QString(), num.setNum(KMyMoneyRegister::ActionCheck)); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetAction(const QString&))); + selector()->newTopItem(i18n("ATM"), TQString(), num.setNum(KMyMoneyRegister::ActionAtm)); + selector()->newTopItem(i18n("Withdrawal"), TQString(), num.setNum(KMyMoneyRegister::ActionWithdrawal)); + selector()->newTopItem(i18n("Transfer"), TQString(), num.setNum(KMyMoneyRegister::ActionTransfer)); + selector()->newTopItem(i18n("Deposit"), TQString(), num.setNum(KMyMoneyRegister::ActionDeposit)); + selector()->newTopItem(i18n("Cheque"), TQString(), num.setNum(KMyMoneyRegister::ActionCheck)); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetAction(const TQString&))); } void KMyMoneyComboAction::protectItem(int id, bool protect) { - QString num; + TQString num; selector()->protectItem(num.setNum(id), protect); } -void KMyMoneyComboAction::slotSetAction(const QString& act) +void KMyMoneyComboAction::slotSetAction(const TQString& act) { setSelectedItem(act); update(); @@ -442,14 +442,14 @@ void KMyMoneyComboAction::setAction(int action) kdDebug(2) << "KMyMoneyComboAction::slotSetAction(" << action << ") invalid. Replaced with 2\n"; action = 2; } - QString act; + TQString act; act.setNum(action); setSelectedItem(act); } int KMyMoneyComboAction::action(void) const { - QStringList list; + TQStringList list; selector()->selectedItems(list); if(!list.isEmpty()) { return list[0].toInt(); @@ -458,35 +458,35 @@ int KMyMoneyComboAction::action(void) const return 0; } -KMyMoneyCashFlowCombo::KMyMoneyCashFlowCombo(QWidget* w, const char* name, MyMoneyAccount::accountTypeE accountType) : +KMyMoneyCashFlowCombo::KMyMoneyCashFlowCombo(TQWidget* w, const char* name, MyMoneyAccount::accountTypeE accountType) : KMyMoneyCombo(false, w, name) { m_completion = new kMyMoneyCompletion(this, 0); - QString num; + TQString num; // add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details) if(accountType == MyMoneyAccount::Income || accountType == MyMoneyAccount::Expense) { // this is used for income/expense accounts to just show the reverse sense - selector()->newTopItem(i18n("Activity for expense categories", "Paid"), QString(), num.setNum(KMyMoneyRegister::Deposit)); - selector()->newTopItem(i18n("Activity for income categories", "Received"), QString(), num.setNum(KMyMoneyRegister::Payment)); + selector()->newTopItem(i18n("Activity for expense categories", "Paid"), TQString(), num.setNum(KMyMoneyRegister::Deposit)); + selector()->newTopItem(i18n("Activity for income categories", "Received"), TQString(), num.setNum(KMyMoneyRegister::Payment)); } else { - selector()->newTopItem(i18n("From"), QString(), num.setNum(KMyMoneyRegister::Deposit)); - selector()->newTopItem(i18n("Pay to"), QString(), num.setNum(KMyMoneyRegister::Payment)); + selector()->newTopItem(i18n("From"), TQString(), num.setNum(KMyMoneyRegister::Deposit)); + selector()->newTopItem(i18n("Pay to"), TQString(), num.setNum(KMyMoneyRegister::Payment)); } - selector()->newTopItem(" ", QString(), num.setNum(KMyMoneyRegister::Unknown)); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetDirection(const QString&))); + selector()->newTopItem(" ", TQString(), num.setNum(KMyMoneyRegister::Unknown)); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetDirection(const TQString&))); } void KMyMoneyCashFlowCombo::setDirection(KMyMoneyRegister::CashFlowDirection dir) { m_dir = dir; - QString num; + TQString num; setSelectedItem(num.setNum(dir)); } -void KMyMoneyCashFlowCombo::slotSetDirection(const QString& id) +void KMyMoneyCashFlowCombo::slotSetDirection(const TQString& id) { - QString num; + TQString num; for(int i = KMyMoneyRegister::Deposit; i <= KMyMoneyRegister::Unknown; ++i) { num.setNum(i); if(num == id) { @@ -500,41 +500,41 @@ void KMyMoneyCashFlowCombo::slotSetDirection(const QString& id) void KMyMoneyCashFlowCombo::removeDontCare(void) { - QString num; + TQString num; selector()->removeItem(num.setNum(KMyMoneyRegister::Unknown)); } -KMyMoneyActivityCombo::KMyMoneyActivityCombo(QWidget* w, const char* name) : +KMyMoneyActivityCombo::KMyMoneyActivityCombo(TQWidget* w, const char* name) : KMyMoneyCombo(false, w, name), m_activity(MyMoneySplit::UnknownTransactionType) { m_completion = new kMyMoneyCompletion(this, 0); - QString num; + TQString num; // add the items in reverse order of appearance (see KMyMoneySelector::newItem() for details) - selector()->newTopItem(i18n("Split shares"), QString(), num.setNum(MyMoneySplit::SplitShares)); - selector()->newTopItem(i18n("Remove shares"), QString(), num.setNum(MyMoneySplit::RemoveShares)); - selector()->newTopItem(i18n("Add shares"), QString(), num.setNum(MyMoneySplit::AddShares)); - selector()->newTopItem(i18n("Yield"), QString(), num.setNum(MyMoneySplit::Yield)); - selector()->newTopItem(i18n("Reinvest dividend"), QString(), num.setNum(MyMoneySplit::ReinvestDividend)); - selector()->newTopItem(i18n("Dividend"), QString(), num.setNum(MyMoneySplit::Dividend)); - selector()->newTopItem(i18n("Sell shares"), QString(), num.setNum(MyMoneySplit::SellShares)); - selector()->newTopItem(i18n("Buy shares"), QString(), num.setNum(MyMoneySplit::BuyShares)); + selector()->newTopItem(i18n("Split shares"), TQString(), num.setNum(MyMoneySplit::SplitShares)); + selector()->newTopItem(i18n("Remove shares"), TQString(), num.setNum(MyMoneySplit::RemoveShares)); + selector()->newTopItem(i18n("Add shares"), TQString(), num.setNum(MyMoneySplit::AddShares)); + selector()->newTopItem(i18n("Yield"), TQString(), num.setNum(MyMoneySplit::Yield)); + selector()->newTopItem(i18n("Reinvest dividend"), TQString(), num.setNum(MyMoneySplit::ReinvestDividend)); + selector()->newTopItem(i18n("Dividend"), TQString(), num.setNum(MyMoneySplit::Dividend)); + selector()->newTopItem(i18n("Sell shares"), TQString(), num.setNum(MyMoneySplit::SellShares)); + selector()->newTopItem(i18n("Buy shares"), TQString(), num.setNum(MyMoneySplit::BuyShares)); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(itemSelected(const QString&)), this, SLOT(slotSetActivity(const QString&))); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotSetActivity(const TQString&))); } void KMyMoneyActivityCombo::setActivity(MyMoneySplit::investTransactionTypeE activity) { m_activity = activity; - QString num; + TQString num; setSelectedItem(num.setNum(activity)); } -void KMyMoneyActivityCombo::slotSetActivity(const QString& id) +void KMyMoneyActivityCombo::slotSetActivity(const TQString& id) { - QString num; + TQString num; for(int i = MyMoneySplit::BuyShares; i <= MyMoneySplit::SplitShares; ++i) { num.setNum(i); if(num == id) { @@ -546,57 +546,57 @@ void KMyMoneyActivityCombo::slotSetActivity(const QString& id) update(); } -KMyMoneyPayeeCombo::KMyMoneyPayeeCombo(QWidget* parent, const char * name) : - KMyMoneyCombo(true, parent, name) +KMyMoneyPayeeCombo::KMyMoneyPayeeCombo(TQWidget* tqparent, const char * name) : + KMyMoneyCombo(true, tqparent, name) { m_completion = new kMyMoneyCompletion(this); // set to ascending sort selector()->listView()->setSorting(0); - connect(m_completion, SIGNAL(itemSelected(const QString&)), this, SLOT(slotItemSelected(const QString&))); - connect(this, SIGNAL(textChanged(const QString&)), m_completion, SLOT(slotMakeCompletion(const QString&))); + connect(m_completion, TQT_SIGNAL(itemSelected(const TQString&)), this, TQT_SLOT(slotItemSelected(const TQString&))); + connect(this, TQT_SIGNAL(textChanged(const TQString&)), m_completion, TQT_SLOT(slotMakeCompletion(const TQString&))); } -void KMyMoneyPayeeCombo::loadPayees(const QValueList<MyMoneyPayee>& list) +void KMyMoneyPayeeCombo::loadPayees(const TQValueList<MyMoneyPayee>& list) { selector()->listView()->clear(); - QValueList<MyMoneyPayee>::const_iterator it; + TQValueList<MyMoneyPayee>::const_iterator it; for(it = list.begin(); it != list.end(); ++it) { - selector()->newTopItem((*it).name(), QString(), (*it).id()); + selector()->newTopItem((*it).name(), TQString(), (*it).id()); } } class KMyMoneyGeneralCombo::Private { public: - QMap<QString, int> m_strings; - void insertItem(const QString& s, int id) { m_strings[s] = id; } + TQMap<TQString, int> m_strings; + void insertItem(const TQString& s, int id) { m_strings[s] = id; } - int itemId(const QString& s) const { - QMap<QString, int>::const_iterator it; - it = m_strings.find(s); + int itemId(const TQString& s) const { + TQMap<TQString, int>::const_iterator it; + it = m_strings.tqfind(s); if(it != m_strings.end()) return *it; return -1; } - const QString& itemText(int id) { - QMap<QString, int>::const_iterator it; + const TQString& itemText(int id) { + TQMap<TQString, int>::const_iterator it; for(it = m_strings.begin(); it != m_strings.end(); ++it) { if(*it == id) { return it.key(); } } - return QString::null; + return TQString(); } }; -KMyMoneyGeneralCombo::KMyMoneyGeneralCombo(QWidget* w, const char* name) : +KMyMoneyGeneralCombo::KMyMoneyGeneralCombo(TQWidget* w, const char* name) : KComboBox(w, name), d(new Private) { - connect(this, SIGNAL(highlighted(int)), this, SLOT(slotChangeItem(int))); + connect(this, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotChangeItem(int))); } KMyMoneyGeneralCombo::~KMyMoneyGeneralCombo() @@ -616,7 +616,7 @@ int KMyMoneyGeneralCombo::item(void) const void KMyMoneyGeneralCombo::setCurrentItem(int id) { - const QString& txt = d->itemText(id); + const TQString& txt = d->itemText(id); for(int idx = 0; idx < count(); ++idx) { if(txt == text(idx)) { KComboBox::setCurrentItem(idx); @@ -636,7 +636,7 @@ void KMyMoneyGeneralCombo::clear(void) KComboBox::clear(); } -void KMyMoneyGeneralCombo::insertItem(const QString& txt, int id, int idx) +void KMyMoneyGeneralCombo::insertItem(const TQString& txt, int id, int idx) { d->insertItem(txt, id); KComboBox::insertItem(txt, idx); @@ -644,7 +644,7 @@ void KMyMoneyGeneralCombo::insertItem(const QString& txt, int id, int idx) void KMyMoneyGeneralCombo::removeItem(int id) { - const QString& txt = d->itemText(id); + const TQString& txt = d->itemText(id); for(int idx = 0; idx < count(); ++idx) { if(txt == text(idx)) { KComboBox::removeItem(idx); @@ -658,8 +658,8 @@ void KMyMoneyGeneralCombo::slotChangeItem(int idx) emit itemSelected(d->itemId(text(idx))); } -KMyMoneyPeriodCombo::KMyMoneyPeriodCombo(QWidget* parent, const char* name) : - KMyMoneyGeneralCombo(parent, name) +KMyMoneyPeriodCombo::KMyMoneyPeriodCombo(TQWidget* tqparent, const char* name) : + KMyMoneyGeneralCombo(tqparent, name) { insertItem(i18n("All dates"), MyMoneyTransactionFilter::allDates); insertItem(i18n("As of today"), MyMoneyTransactionFilter::asOfToday); @@ -704,28 +704,28 @@ MyMoneyTransactionFilter::dateOptionE KMyMoneyPeriodCombo::currentItem(void) con return static_cast<MyMoneyTransactionFilter::dateOptionE>(KMyMoneyGeneralCombo::currentItem()); } -QDate KMyMoneyPeriodCombo::start(MyMoneyTransactionFilter::dateOptionE id) +TQDate KMyMoneyPeriodCombo::start(MyMoneyTransactionFilter::dateOptionE id) { - QDate start, end; + TQDate start, end; MyMoneyTransactionFilter::translateDateRange(id, start, end); return start; } -QDate KMyMoneyPeriodCombo::end(MyMoneyTransactionFilter::dateOptionE id) +TQDate KMyMoneyPeriodCombo::end(MyMoneyTransactionFilter::dateOptionE id) { - QDate start, end; + TQDate start, end; MyMoneyTransactionFilter::translateDateRange(id, start, end); return end; } #if 0 -void KMyMoneyPeriodCombo::dates(QDate& start, QDate& end, MyMoneyTransactionFilter::dateOptionE id) +void KMyMoneyPeriodCombo::dates(TQDate& start, TQDate& end, MyMoneyTransactionFilter::dateOptionE id) { } #endif -KMyMoneyOccurenceCombo::KMyMoneyOccurenceCombo(QWidget* parent, const char* name) : - KMyMoneyGeneralCombo(parent, name) +KMyMoneyOccurenceCombo::KMyMoneyOccurenceCombo(TQWidget* tqparent, const char* name) : + KMyMoneyGeneralCombo(tqparent, name) { } @@ -734,8 +734,8 @@ MyMoneySchedule::occurenceE KMyMoneyOccurenceCombo::currentItem(void) const return static_cast<MyMoneySchedule::occurenceE>(KMyMoneyGeneralCombo::currentItem()); } -KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(QWidget* parent, const char* name) : - KMyMoneyOccurenceCombo(parent, name) +KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(TQWidget* tqparent, const char* name) : + KMyMoneyOccurenceCombo(tqparent, name) { insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE); insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY); @@ -745,8 +745,8 @@ KMyMoneyOccurencePeriodCombo::KMyMoneyOccurencePeriodCombo(QWidget* parent, cons insertItem(i18n(MyMoneySchedule::occurencePeriodToString(MyMoneySchedule::OCCUR_YEARLY)), MyMoneySchedule::OCCUR_YEARLY); } -KMyMoneyFrequencyCombo::KMyMoneyFrequencyCombo(QWidget* parent, const char* name) : - KMyMoneyOccurenceCombo(parent, name) +KMyMoneyFrequencyCombo::KMyMoneyFrequencyCombo(TQWidget* tqparent, const char* name) : + KMyMoneyOccurenceCombo(tqparent, name) { insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_ONCE)), MyMoneySchedule::OCCUR_ONCE); insertItem(i18n(MyMoneySchedule::occurenceToString(MyMoneySchedule::OCCUR_DAILY)), MyMoneySchedule::OCCUR_DAILY); diff --git a/kmymoney2/widgets/kmymoneycombo.h b/kmymoney2/widgets/kmymoneycombo.h index c85847d..f889f3e 100644 --- a/kmymoney2/widgets/kmymoneycombo.h +++ b/kmymoney2/widgets/kmymoneycombo.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtimer.h> -#include <qmutex.h> +#include <tqtimer.h> +#include <tqmutex.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -51,9 +51,10 @@ class kMyMoneyLineEdit; class KMyMoneyCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - KMyMoneyCombo(QWidget *w = 0, const char *name=0); - KMyMoneyCombo(bool rw, QWidget *w = 0, const char *name=0); + KMyMoneyCombo(TQWidget *w = 0, const char *name=0); + KMyMoneyCombo(bool rw, TQWidget *w = 0, const char *name=0); /** * This method is used to turn on/off the hint display and to setup the appropriate text. @@ -62,7 +63,7 @@ public: * * @param hint reference to text. If @a hint is empty, no hint will be shown. */ - void setHint(const QString& hint) const; + void setHint(const TQString& hint) const; /** * overridden for internal reasons. @@ -88,90 +89,90 @@ public: /** * This method returns the ids of the currently selected items */ - void selectedItems(QStringList& list) const; + void selectedItems(TQStringList& list) const; /** * This method returns the id of the first selected item. * Usage makes usually only sense when the selection mode - * of the associated KMyMoneySelector is QListView::Single. + * of the associated KMyMoneySelector is TQListView::Single. * * @sa KMyMoneySelector::setSelectionMode() * - * @param id reference to QString containing the id. If no item + * @param id reference to TQString containing the id. If no item * is selected id will be empty. */ - void selectedItem(QString& id) const KDE_DEPRECATED; + void selectedItem(TQString& id) const KDE_DEPRECATED; /** * This method returns the id of the first selected item. * Usage makes usually only sense when the selection mode - * of the associated KMyMoneySelector is QListView::Single. + * of the associated KMyMoneySelector is TQListView::Single. * * @sa KMyMoneySelector::setSelectionMode() * - * @return reference to QString containing the id. If no item - * is selected the QString will be empty. + * @return reference to TQString containing the id. If no item + * is selected the TQString will be empty. */ - const QString& selectedItem(void) const { return m_id; } + const TQString& selectedItem(void) const { return m_id; } /** * This method selects the item with the respective @a id. * - * @param id reference to QString containing the id + * @param id reference to TQString containing the id */ - void setSelectedItem(const QString& id); + void setSelectedItem(const TQString& id); /** * This method checks if the position @a pos is part of the * area of the drop down arrow. */ - bool isInArrowArea(const QPoint& pos) const; + bool isInArrowArea(const TQPoint& pos) const; void setSuppressObjectCreation(bool suppress) { m_canCreateObjects = !suppress; } /** * overridden for internal reasons, no API change */ - void setCurrentText(const QString& txt = QString()) { KComboBox::setCurrentText(txt); } + void setCurrentText(const TQString& txt = TQString()) { KComboBox::setCurrentText(txt); } /** * overridden to set the background color of the lineedit as well */ - void setPaletteBackgroundColor(const QColor& color); + void setPaletteBackgroundColor(const TQColor& color); /** * Overridden to support our own completion box */ - QSize sizeHint() const; + TQSize tqsizeHint() const; protected slots: - virtual void slotItemSelected(const QString& id); + virtual void slotItemSelected(const TQString& id); protected: /** * reimplemented to support our own popup widget */ - void mousePressEvent(QMouseEvent *e); + void mousePressEvent(TQMouseEvent *e); /** * reimplemented to support our own popup widget */ - void keyPressEvent(QKeyEvent *e); + void keyPressEvent(TQKeyEvent *e); /** * reimplemented to support our own popup widget */ - void paintEvent(QPaintEvent *); + void paintEvent(TQPaintEvent *); /** * reimplemented to support detection of new items */ - void focusOutEvent(QFocusEvent* ); + void focusOutEvent(TQFocusEvent* ); /** * set the widgets text area based on the item with the given @a id. */ - virtual void setCurrentTextById(const QString& id); + virtual void setCurrentTextById(const TQString& id); /** * Overridden for internal reasons, no API change @@ -197,16 +198,16 @@ protected: /** * The currently selected item */ - QString m_id; + TQString m_id; signals: - void itemSelected(const QString& id); + void itemSelected(const TQString& id); void objectCreation(bool); - void createItem(const QString&, QString&); + void createItem(const TQString&, TQString&); private: - QTimer m_timer; - QMutex m_focusMutex; + TQTimer m_timer; + TQMutex m_focusMutex; /** * Flag to control object creation. Use setSuppressObjectCreation() * to modify it's setting. Defaults to @a false. @@ -227,15 +228,16 @@ private: class KMyMoneyReconcileCombo : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyReconcileCombo(QWidget *w = 0, const char *name=0); + KMyMoneyReconcileCombo(TQWidget *w = 0, const char *name=0); void setState(MyMoneySplit::reconcileFlagE state); MyMoneySplit::reconcileFlagE state(void) const; void removeDontCare(void); protected slots: - void slotSetState(const QString&); + void slotSetState(const TQString&); }; /** @@ -248,15 +250,16 @@ protected slots: class KMyMoneyComboAction : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyComboAction(QWidget *w = 0, const char *name=0); + KMyMoneyComboAction(TQWidget *w = 0, const char *name=0); void setAction(int state); int action(void) const; void protectItem(int id, bool protect); protected slots: - void slotSetAction(const QString&); + void slotSetAction(const TQString&); signals: void actionSelected(int); @@ -270,19 +273,20 @@ signals: class KMyMoneyCashFlowCombo : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: /** * Create a combo box that contains the entries "Pay to", "From" and * " " for don't care. */ - KMyMoneyCashFlowCombo(QWidget *w = 0, const char *name=0, MyMoneyAccount::accountTypeE type = MyMoneyAccount::Asset); + KMyMoneyCashFlowCombo(TQWidget *w = 0, const char *name=0, MyMoneyAccount::accountTypeE type = MyMoneyAccount::Asset); void setDirection(KMyMoneyRegister::CashFlowDirection dir); KMyMoneyRegister::CashFlowDirection direction(void) const { return m_dir; } void removeDontCare(void); protected slots: - void slotSetDirection(const QString& id); + void slotSetDirection(const TQString& id); signals: void directionSelected(KMyMoneyRegister::CashFlowDirection); @@ -299,17 +303,18 @@ private: class KMyMoneyActivityCombo : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: /** * Create a combo box that contains the entries "Buy", "Sell" etc. */ - KMyMoneyActivityCombo(QWidget *w = 0, const char *name=0); + KMyMoneyActivityCombo(TQWidget *w = 0, const char *name=0); void setActivity(MyMoneySplit::investTransactionTypeE activity); MyMoneySplit::investTransactionTypeE activity(void) const { return m_activity; } protected slots: - void slotSetActivity(const QString& id); + void slotSetActivity(const TQString& id); signals: void activitySelected(MyMoneySplit::investTransactionTypeE); @@ -327,7 +332,7 @@ private: * If any match is found a list selection box is opened and the user can use * the up/down, page-up/page-down keys or the mouse to navigate in the list. If * a payee is selected, the selection box is closed. Other key-strokes are - * directed to the parent object to manipulate the text. The visible contents of + * directed to the tqparent object to manipulate the text. The visible contents of * the selection box is updated with every key-stroke. * * This object is a replacement of the kMyMoneyPayee object and should be used @@ -338,20 +343,22 @@ private: class KMyMoneyPayeeCombo : public KMyMoneyCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyPayeeCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyPayeeCombo(TQWidget* tqparent = 0, const char* name = 0); - void loadPayees(const QValueList<MyMoneyPayee>& list); + void loadPayees(const TQValueList<MyMoneyPayee>& list); }; class KMyMoneyGeneralCombo : public KComboBox { Q_OBJECT + TQ_OBJECT public: - KMyMoneyGeneralCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyGeneralCombo(TQWidget* tqparent = 0, const char* name = 0); virtual ~KMyMoneyGeneralCombo(); - void insertItem(const QString& txt, int id, int idx = -1); + void insertItem(const TQString& txt, int id, int idx = -1); void setItem(int id) KDE_DEPRECATED; // replace with setCurrentItem(id) int item(void) const KDE_DEPRECATED; // replace with currentItem() @@ -369,7 +376,7 @@ signals: protected: // prevent the caller to use the standard KComboBox insertItem function with a default idx - void insertItem(const QString&); + void insertItem(const TQString&); protected slots: void slotChangeItem(int idx); @@ -389,8 +396,9 @@ private: class KMyMoneyPeriodCombo : public KMyMoneyGeneralCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyPeriodCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyPeriodCombo(TQWidget* tqparent = 0, const char* name = 0); MyMoneyTransactionFilter::dateOptionE currentItem(void) const; void setCurrentItem(MyMoneyTransactionFilter::dateOptionE id); @@ -398,31 +406,32 @@ public: /** * This function returns the actual start date for the given * period definition given by @p id. For user defined periods - * the returned value is QDate() + * the returned value is TQDate() */ - static QDate start(MyMoneyTransactionFilter::dateOptionE id); + static TQDate start(MyMoneyTransactionFilter::dateOptionE id); /** * This function returns the actual end date for the given * period definition given by @p id. For user defined periods - * the returned value is QDate() + * the returned value is TQDate() */ - static QDate end(MyMoneyTransactionFilter::dateOptionE id); + static TQDate end(MyMoneyTransactionFilter::dateOptionE id); - // static void dates(QDate& start, QDate& end, MyMoneyTransactionFilter::dateOptionE id); + // static void dates(TQDate& start, TQDate& end, MyMoneyTransactionFilter::dateOptionE id); }; /** * This class implements an occurence selector - * as a parent class for both OccurencePeriod and Frequency combos + * as a tqparent class for both OccurencePeriod and Frequency combos * * @author Colin Wright */ class KMyMoneyOccurenceCombo : public KMyMoneyGeneralCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyOccurenceCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyOccurenceCombo(TQWidget* tqparent = 0, const char* name = 0); MyMoneySchedule::occurenceE currentItem(void) const; }; @@ -435,8 +444,9 @@ public: class KMyMoneyOccurencePeriodCombo : public KMyMoneyOccurenceCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyOccurencePeriodCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyOccurencePeriodCombo(TQWidget* tqparent = 0, const char* name = 0); }; /** @@ -446,8 +456,9 @@ public: class KMyMoneyFrequencyCombo : public KMyMoneyOccurenceCombo { Q_OBJECT + TQ_OBJECT public: - KMyMoneyFrequencyCombo(QWidget* parent = 0, const char* name = 0); + KMyMoneyFrequencyCombo(TQWidget* tqparent = 0, const char* name = 0); /** * This method returns the number of events for the selected payment diff --git a/kmymoney2/widgets/kmymoneycompletion.cpp b/kmymoney2/widgets/kmymoneycompletion.cpp index f9bc7a3..55e4d75 100644 --- a/kmymoney2/widgets/kmymoneycompletion.cpp +++ b/kmymoney2/widgets/kmymoneycompletion.cpp @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -40,23 +40,23 @@ const int kMyMoneyCompletion::MAX_ITEMS = 16; -kMyMoneyCompletion::kMyMoneyCompletion(QWidget *parent, const char *name ) : - QVBox(parent, name, WType_Popup) +kMyMoneyCompletion::kMyMoneyCompletion(TQWidget *tqparent, const char *name ) : + TQVBox(tqparent, name, WType_Popup) { m_selector = new KMyMoneySelector(this); m_selector->listView()->setFocusProxy(this); - m_parent = parent; - setFocusProxy((parent) ? parent : (QWidget*) NoFocus); - setFrameStyle(QFrame::PopupPanel | QFrame::Raised); + m_parent = tqparent; + setFocusProxy((tqparent) ? tqparent : (TQWidget*) TQ_NoFocus); + setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised); connectSignals(m_selector, m_selector->listView()); } -void kMyMoneyCompletion::connectSignals(QWidget* widget, KListView* lv) +void kMyMoneyCompletion::connectSignals(TQWidget* widget, KListView* lv) { m_widget = widget; m_lv = lv; - connect(lv, SIGNAL(executed(QListViewItem*,const QPoint&,int)), this, SLOT(slotItemSelected(QListViewItem*,const QPoint&,int))); + connect(lv, TQT_SIGNAL(executed(TQListViewItem*,const TQPoint&,int)), this, TQT_SLOT(slotItemSelected(TQListViewItem*,const TQPoint&,int))); } kMyMoneyCompletion::~kMyMoneyCompletion() @@ -65,7 +65,7 @@ kMyMoneyCompletion::~kMyMoneyCompletion() void kMyMoneyCompletion::adjustSize(void) { - QListViewItemIterator it(m_lv, QListViewItemIterator::Visible); + TQListViewItemIterator it(m_lv, TQListViewItemIterator::Visible); int count = 0; while(it.current()) { ++count; @@ -76,17 +76,17 @@ void kMyMoneyCompletion::adjustSize(void) void kMyMoneyCompletion::adjustSize(const int count) { - int w = m_widget->sizeHint().width(); + int w = m_widget->tqsizeHint().width(); if(m_parent && w < m_parent->width()) w = m_parent->width(); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); if(w < fm.maxWidth()*15) w = fm.maxWidth()*15; int h = 0; - QListViewItemIterator it(m_lv, QListViewItemIterator::Visible); - QListViewItem* item = it.current(); + TQListViewItemIterator it(m_lv, TQListViewItemIterator::Visible); + TQListViewItem* item = it.current(); if(item) h = item->height() * (count > MAX_ITEMS ? MAX_ITEMS : count); @@ -99,11 +99,11 @@ void kMyMoneyCompletion::adjustSize(const int count) // and modified to our local needs // this is probably better, once kde switches to requiring qt3.1 - // QRect screenSize = QApplication::desktop()->availableGeometry(d->m_parent); + // TQRect screenSize = TQApplication::desktop()->availableGeometry(d->m_parent); // for now use this since it's qt3.0.x-safe - QRect screenSize = QApplication::desktop()->screenGeometry(QApplication::desktop()->screenNumber(m_parent)); + TQRect screenSize = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(m_parent)); - QPoint orig = m_parent->mapToGlobal( QPoint(0, m_parent->height()) ); + TQPoint orig = m_parent->mapToGlobal( TQPoint(0, m_parent->height()) ); int x = orig.x(); int y = orig.y(); @@ -133,7 +133,7 @@ void kMyMoneyCompletion::show(bool presetSelected) if(m_parent) { m_parent->installEventFilter(this); // make sure to install the filter for the combobox lineedit as well - // We have do this here because QObject::installEventFilter() is not + // We have do this here because TQObject::installEventFilter() is not // declared virtual and we have no chance to override it in KMyMoneyCombo KMyMoneyCombo* c = dynamic_cast<KMyMoneyCombo*>(m_parent); if(c && c->lineEdit()) { @@ -141,7 +141,7 @@ void kMyMoneyCompletion::show(bool presetSelected) } } - QVBox::show(); + TQVBox::show(); } void kMyMoneyCompletion::hide(void) @@ -149,37 +149,37 @@ void kMyMoneyCompletion::hide(void) if(m_parent) { m_parent->removeEventFilter(this); // make sure to uninstall the filter for the combobox lineedit as well - // We have do this here because QObject::installEventFilter() is not + // We have do this here because TQObject::installEventFilter() is not // declared virtual and we have no chance to override it in KMyMoneyCombo KMyMoneyCombo* c = dynamic_cast<KMyMoneyCombo*>(m_parent); if(c && c->lineEdit()) { c->lineEdit()->removeEventFilter(this); } } - QVBox::hide(); + TQVBox::hide(); } -bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e) +bool kMyMoneyCompletion::eventFilter(TQObject* o, TQEvent* e) { int type = e->type(); KMyMoneyCombo *c = dynamic_cast<KMyMoneyCombo*>(m_parent); - QListViewItem* item; - if(o == m_parent || (c && o == c->lineEdit())) { + TQListViewItem* item; + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_parent) || (c && TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(c->lineEdit()))) { if(isVisible()) { - if(type == QEvent::KeyPress) { - QKeyEvent* ev = static_cast<QKeyEvent*> (e); - QKeyEvent evt(QEvent::KeyPress, - Key_Down, 0, ev->state(), QString::null, + if(type == TQEvent::KeyPress) { + TQKeyEvent* ev = TQT_TQKEYEVENT (e); + TQKeyEvent evt(TQEvent::KeyPress, + Key_Down, 0, ev->state(), TQString(), ev->isAutoRepeat(), ev->count()); - QKeyEvent evbt(QEvent::KeyPress, - Key_Up, 0, ev->state(), QString::null, + TQKeyEvent evbt(TQEvent::KeyPress, + Key_Up, 0, ev->state(), TQString(), ev->isAutoRepeat(), ev->count()); switch(ev->key()) { case Key_Tab: case Key_BackTab: - slotItemSelected(m_lv->currentItem(), QPoint(0,0), 0); + slotItemSelected(m_lv->currentItem(), TQPoint(0,0), 0); break; case Key_Down: @@ -222,7 +222,7 @@ bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e) case Key_Enter: case Key_Return: - slotItemSelected(m_lv->currentItem(), QPoint(0,0), 0); + slotItemSelected(m_lv->currentItem(), TQPoint(0,0), 0); ev->accept(); return true; @@ -264,10 +264,10 @@ bool kMyMoneyCompletion::eventFilter(QObject* o, QEvent* e) } } } - return QVBox::eventFilter(o, e); + return TQVBox::eventFilter(o, e); } -void kMyMoneyCompletion::slotMakeCompletion(const QString& txt) +void kMyMoneyCompletion::slotMakeCompletion(const TQString& txt) { int cnt = selector()->slotMakeCompletion(txt.stripWhiteSpace()); @@ -282,11 +282,11 @@ void kMyMoneyCompletion::slotMakeCompletion(const QString& txt) } } -void kMyMoneyCompletion::slotItemSelected(QListViewItem *item, const QPoint&, int) +void kMyMoneyCompletion::slotItemSelected(TQListViewItem *item, const TQPoint&, int) { KMyMoneyListViewItem* it_v = static_cast<KMyMoneyListViewItem*>(item); if(it_v && it_v->isSelectable()) { - QString id = it_v->id(); + TQString id = it_v->id(); // hide the widget, so we can debug the slots that are connect // to the signal we emit very soon hide(); @@ -295,7 +295,7 @@ void kMyMoneyCompletion::slotItemSelected(QListViewItem *item, const QPoint&, in } } -void kMyMoneyCompletion::setSelected(const QString& id) +void kMyMoneyCompletion::setSelected(const TQString& id) { m_id = id; m_selector->setSelected(id, true); diff --git a/kmymoney2/widgets/kmymoneycompletion.h b/kmymoney2/widgets/kmymoneycompletion.h index 1efea63..ca83f0b 100644 --- a/kmymoney2/widgets/kmymoneycompletion.h +++ b/kmymoney2/widgets/kmymoneycompletion.h @@ -26,10 +26,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qvbox.h> -#include <qregexp.h> -class QListViewItem; +#include <tqwidget.h> +#include <tqvbox.h> +#include <tqregexp.h> +class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -45,12 +45,13 @@ class KMyMoneySelector; * @author Thomas Baumgart */ -class kMyMoneyCompletion : public QVBox +class kMyMoneyCompletion : public TQVBox { Q_OBJECT + TQ_OBJECT public: - kMyMoneyCompletion(QWidget *parent=0, const char *name=0); + kMyMoneyCompletion(TQWidget *tqparent=0, const char *name=0); virtual ~kMyMoneyCompletion(); /** @@ -70,21 +71,21 @@ public: * * @param id id of account to be selected */ - void setSelected(const QString& id); + void setSelected(const TQString& id); virtual KMyMoneySelector* selector(void) const { return m_selector; } public slots: - void slotMakeCompletion(const QString& txt); + void slotMakeCompletion(const TQString& txt); - void slotItemSelected(QListViewItem *item, const QPoint& pos, int col); + void slotItemSelected(TQListViewItem *item, const TQPoint& pos, int col); protected: /** * Reimplemented from kMyMoneyAccountSelector to get events from the viewport (to hide * this widget on mouse-click, Escape-presses, etc. */ - virtual bool eventFilter( QObject *, QEvent * ); + virtual bool eventFilter( TQObject *, TQEvent * ); /** * This method resizes the widget to show a maximum of @p count @@ -100,20 +101,20 @@ protected: */ void adjustSize(void); - void connectSignals(QWidget *widget, KListView* lv); + void connectSignals(TQWidget *widget, KListView* lv); void show(bool presetSelected); signals: - void itemSelected(const QString& id); + void itemSelected(const TQString& id); protected: - QWidget* m_parent; - QWidget* m_widget; - QString m_id; + TQWidget* m_parent; + TQWidget* m_widget; + TQString m_id; KListView* m_lv; KMyMoneySelector* m_selector; - QRegExp m_lastCompletion; + TQRegExp m_lastCompletion; static const int MAX_ITEMS; diff --git a/kmymoney2/widgets/kmymoneycurrencyselector.cpp b/kmymoney2/widgets/kmymoneycurrencyselector.cpp index 009dc2b..4b50e4d 100644 --- a/kmymoney2/widgets/kmymoneycurrencyselector.cpp +++ b/kmymoney2/widgets/kmymoneycurrencyselector.cpp @@ -23,8 +23,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qbitmap.h> +#include <tqpixmap.h> +#include <tqbitmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,22 +36,22 @@ #include "kmymoneycurrencyselector.h" -KMyMoneySecuritySelector::KMyMoneySecuritySelector(QWidget *parent, const char *name ) : - KComboBox(parent, name), +KMyMoneySecuritySelector::KMyMoneySecuritySelector(TQWidget *tqparent, const char *name ) : + KComboBox(tqparent, name), m_displayItem(FullName), m_displayOnly(false), m_displayType(TypeAll) { - // update(QString()); + // update(TQString()); } -KMyMoneySecuritySelector::KMyMoneySecuritySelector(displayTypeE type, QWidget *parent, const char *name ) : - KComboBox(parent,name), +KMyMoneySecuritySelector::KMyMoneySecuritySelector(displayTypeE type, TQWidget *tqparent, const char *name ) : + KComboBox(tqparent,name), m_displayItem(FullName), m_displayOnly(false), m_displayType(type) { - // update(QString()); + // update(TQString()); } KMyMoneySecuritySelector::~KMyMoneySecuritySelector() @@ -61,13 +61,13 @@ KMyMoneySecuritySelector::~KMyMoneySecuritySelector() void KMyMoneySecuritySelector::selectDisplayItem(KMyMoneySecuritySelector::displayItemE item) { m_displayItem = item; - update(QString()); + update(TQString()); } -void KMyMoneySecuritySelector::update(const QString& id) +void KMyMoneySecuritySelector::update(const TQString& id) { MyMoneySecurity curr = MyMoneyFile::instance()->baseCurrency(); - QString baseCurrency = curr.id(); + TQString baseCurrency = curr.id(); if(!id.isEmpty()) curr = m_currency; @@ -82,23 +82,23 @@ void KMyMoneySecuritySelector::update(const QString& id) // sort qHeapSort(m_list); - QValueList<MyMoneySecurity>::ConstIterator it; + TQValueList<MyMoneySecurity>::ConstIterator it; // construct a transparent 16x16 pixmap - QPixmap empty(16, 16); - empty.setMask(QBitmap(16, 16, true)); + TQPixmap empty(16, 16); + empty.setMask(TQBitmap(16, 16, true)); int itemId = 0; int m_selectedItemId = 0; for(it = m_list.begin(); it != m_list.end(); ++it) { - QString display; + TQString display; switch(m_displayItem) { default: case FullName: if((*it).isCurrency()) { - display = QString("%2 (%1)").arg((*it).id()).arg((*it).name()); + display = TQString("%2 (%1)").tqarg((*it).id()).tqarg((*it).name()); } else - display = QString("%2 (%1)").arg((*it).tradingSymbol()).arg((*it).name()); + display = TQString("%2 (%1)").tqarg((*it).tradingSymbol()).tqarg((*it).name()); break; break; @@ -110,7 +110,7 @@ void KMyMoneySecuritySelector::update(const QString& id) break; } if((*it).id() == baseCurrency) { - insertItem(QPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png")), + insertItem(TQPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png")), display, itemId); } else { insertItem(empty, display, itemId); @@ -133,10 +133,10 @@ void KMyMoneySecuritySelector::setDisplayOnly(const bool disp) switch(disp) { case true: - connect(this, SIGNAL(activated(int)), this, SLOT(slotSetInitialCurrency())); + connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetInitialCurrency())); break; case false: - disconnect(this, SIGNAL(activated(int)), this, SLOT(slotSetInitialCurrency())); + disconnect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetInitialCurrency())); break; } m_displayOnly = disp; @@ -155,11 +155,11 @@ const MyMoneySecurity& KMyMoneySecuritySelector::security(void) const void KMyMoneySecuritySelector::setSecurity(const MyMoneySecurity& currency) { m_currency = currency; - update(QString("x")); + update(TQString("x")); } -KMyMoneyCurrencySelector::KMyMoneyCurrencySelector(QWidget *parent, const char *name ) : - KMyMoneySecuritySelector(TypeCurrencies, parent, name) +KMyMoneyCurrencySelector::KMyMoneyCurrencySelector(TQWidget *tqparent, const char *name ) : + KMyMoneySecuritySelector(TypeCurrencies, tqparent, name) { } diff --git a/kmymoney2/widgets/kmymoneycurrencyselector.h b/kmymoney2/widgets/kmymoneycurrencyselector.h index e733eb2..00e3af6 100644 --- a/kmymoney2/widgets/kmymoneycurrencyselector.h +++ b/kmymoney2/widgets/kmymoneycurrencyselector.h @@ -26,7 +26,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> +#include <tqwidget.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -45,6 +45,7 @@ class KMyMoneySecuritySelector : public KComboBox { Q_OBJECT + TQ_OBJECT public: enum displayItemE { Symbol = 0, @@ -57,8 +58,8 @@ public: TypeAll = 0x03 }; - KMyMoneySecuritySelector(QWidget *parent=0, const char *name=0); - KMyMoneySecuritySelector(displayTypeE type = TypeAll, QWidget *parent=0, const char *name=0); + KMyMoneySecuritySelector(TQWidget *tqparent=0, const char *name=0); + KMyMoneySecuritySelector(displayTypeE type = TypeAll, TQWidget *tqparent=0, const char *name=0); virtual ~KMyMoneySecuritySelector(); const MyMoneySecurity& security(void) const; @@ -66,7 +67,7 @@ public: void selectDisplayItem(KMyMoneySecuritySelector::displayItemE item); void setDisplayOnly(const bool disp); - void update(const QString& id); + void update(const TQString& id); public slots: void slotSetInitialSecurity(void); @@ -77,13 +78,13 @@ private: int m_selectedItemId; bool m_displayOnly; displayTypeE m_displayType; - QValueList<MyMoneySecurity> m_list; + TQValueList<MyMoneySecurity> m_list; }; class KMyMoneyCurrencySelector : public KMyMoneySecuritySelector { public: - KMyMoneyCurrencySelector(QWidget *parent=0, const char *name=0); + KMyMoneyCurrencySelector(TQWidget *tqparent=0, const char *name=0); virtual ~KMyMoneyCurrencySelector() {} }; diff --git a/kmymoney2/widgets/kmymoneydateinput.cpp b/kmymoney2/widgets/kmymoneydateinput.cpp index e1b4be8..d0fd547 100644 --- a/kmymoney2/widgets/kmymoneydateinput.cpp +++ b/kmymoney2/widgets/kmymoneydateinput.cpp @@ -18,18 +18,18 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpainter.h> -#include <qdrawutil.h> -#include <qpoint.h> -#include <qvalidator.h> -#include <qtimer.h> -#include <qstyle.h> -#include <qlayout.h> -#include <qapplication.h> -#include <qdesktopwidget.h> -#include <qpixmap.h> -#include <qtimer.h> -#include <qlabel.h> +#include <tqpainter.h> +#include <tqdrawutil.h> +#include <tqpoint.h> +#include <tqvalidator.h> +#include <tqtimer.h> +#include <tqstyle.h> +#include <tqlayout.h> +#include <tqapplication.h> +#include <tqdesktopwidget.h> +#include <tqpixmap.h> +#include <tqtimer.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -50,47 +50,47 @@ namespace { const int DATE_POPUP_TIMEOUT = 1500; } -bool KMyMoneyDateEdit::event(QEvent* e) +bool KMyMoneyDateEdit::event(TQEvent* e) { // make sure that we keep the current date setting of a kMyMoneyDateInput object - // across the QDateEdit::event(FocusOutEvent) + // across the TQDateEdit::event(FocusOutEvent) bool rc; - kMyMoneyDateInput* p = dynamic_cast<kMyMoneyDateInput*>(parentWidget()); - if(e->type() == QEvent::FocusOut && p) { - QDate d = p->date(); - rc = QDateEdit::event(e); + kMyMoneyDateInput* p = dynamic_cast<kMyMoneyDateInput*>(tqparentWidget()); + if(e->type() == TQEvent::FocusOut && p) { + TQDate d = p->date(); + rc = TQDateEdit::event(e); if(d.isValid()) d = p->date(); p->loadDate(d); } else { - rc = QDateEdit::event(e); + rc = TQDateEdit::event(e); } return rc; } -kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::AlignmentFlags flags) - : QHBox(parent,name) +kMyMoneyDateInput::kMyMoneyDateInput(TQWidget *tqparent, const char *name, TQt::AlignmentFlags flags) + : TQHBox(tqparent,name) { - m_qtalignment = flags; - m_date = QDate::currentDate(); + m_qttqalignment = flags; + m_date = TQDate::tqcurrentDate(); dateEdit = new KMyMoneyDateEdit(m_date, this, "dateEdit"); setFocusProxy(dateEdit); - focusWidget()->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events + tqfocusWidget()->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events dateEdit->installEventFilter(this); // To get dateEdit's FocusIn/Out and some KeyPress events m_datePopup = new KPassivePopup(dateEdit, "datePopup"); m_datePopup->setTimeout(DATE_POPUP_TIMEOUT); - m_datePopup->setView(new QLabel(KGlobal::locale()->formatDate(m_date), m_datePopup, "datePopupLabel")); + m_datePopup->setView(new TQLabel(KGlobal::locale()->formatDate(m_date), m_datePopup, "datePopupLabel")); - m_dateFrame = new QVBox(this, 0, WType_Popup); - m_dateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); + m_dateFrame = new TQVBox(this, 0, WType_Popup); + m_dateFrame->setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised); m_dateFrame->setLineWidth(3); m_dateFrame->hide(); - QString dateFormat = KGlobal::locale()->dateFormatShort().lower(); - QString order, separator; + TQString dateFormat = KGlobal::locale()->dateFormatShort().lower(); + TQString order, separator; for(unsigned i = 0; i < dateFormat.length(); ++i) { // DD.MM.YYYY is %d.%m.%y // dD.mM.YYYY is %e.%n.%y @@ -110,16 +110,16 @@ kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::Alig // see if we find a known format. If it's unknown, then we use YMD (international) // set m_focusDatePart to the day position (0-2) if(order == "mdy") { - dateEdit->setOrder(QDateEdit::MDY); + dateEdit->setOrder(TQDateEdit::MDY); m_focusDatePart = 1; } else if(order == "dmy") { - dateEdit->setOrder(QDateEdit::DMY); + dateEdit->setOrder(TQDateEdit::DMY); m_focusDatePart = 0; } else if(order == "ydm") { - dateEdit->setOrder(QDateEdit::YDM); + dateEdit->setOrder(TQDateEdit::YDM); m_focusDatePart = 1; } else { - dateEdit->setOrder(QDateEdit::YMD); + dateEdit->setOrder(TQDateEdit::YMD); m_focusDatePart = 2; separator = '-'; } @@ -132,46 +132,46 @@ kMyMoneyDateInput::kMyMoneyDateInput(QWidget *parent, const char *name, Qt::Alig #endif // the next line is a try to add an icon to the button - m_dateButton = new KPushButton(QIconSet(QPixmap(KGlobal::iconLoader()->iconPath("date", -KIcon::SizeSmall))), QString(""), this); + m_dateButton = new KPushButton(TQIconSet(TQPixmap(KGlobal::iconLoader()->iconPath("date", -KIcon::SizeSmall))), TQString(""), this); m_dateButton->setMinimumWidth(30); - connect(m_dateButton,SIGNAL(clicked()),SLOT(toggleDatePicker())); - connect(dateEdit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotDateChosenRef(const QDate&))); - connect(m_datePicker, SIGNAL(dateSelected(QDate)), this, SLOT(slotDateChosen(QDate))); - connect(m_datePicker, SIGNAL(dateEntered(QDate)), this, SLOT(slotDateChosen(QDate))); - connect(m_datePicker, SIGNAL(dateSelected(QDate)), m_dateFrame, SLOT(hide())); + connect(m_dateButton,TQT_SIGNAL(clicked()),TQT_SLOT(toggleDatePicker())); + connect(dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotDateChosenRef(const TQDate&))); + connect(m_datePicker, TQT_SIGNAL(dateSelected(TQDate)), this, TQT_SLOT(slotDateChosen(TQDate))); + connect(m_datePicker, TQT_SIGNAL(dateEntered(TQDate)), this, TQT_SLOT(slotDateChosen(TQDate))); + connect(m_datePicker, TQT_SIGNAL(dateSelected(TQDate)), m_dateFrame, TQT_SLOT(hide())); } -void kMyMoneyDateInput::markAsBadDate(bool bad, const QColor& color) +void kMyMoneyDateInput::markAsBadDate(bool bad, const TQColor& color) { if(dateEdit->focusProxy()) { - dateEdit->focusProxy()->setPaletteForegroundColor(paletteForegroundColor()); + TQT_TQWIDGET(dateEdit->focusProxy())->setPaletteForegroundColor(paletteForegroundColor()); if(bad) - dateEdit->focusProxy()->setPaletteForegroundColor(color); + TQT_TQWIDGET(dateEdit->focusProxy())->setPaletteForegroundColor(color); } } void kMyMoneyDateInput::show(void) { // don't forget the standard behaviour ;-) - QHBox::show(); + TQHBox::show(); // If the widget is shown, the size must be fixed a little later // to be appropriate. I saw this in some other places and the only // way to solve this problem is to postpone the setup of the size // to the time when the widget is on the screen. - QTimer::singleShot(50, this, SLOT(fixSize())); + TQTimer::singleShot(50, this, TQT_SLOT(fixSize())); } void kMyMoneyDateInput::fixSize(void) { - // According to a hint in the documentation of KDatePicker::sizeHint() + // According to a hint in the documentation of KDatePicker::tqsizeHint() // 28 pixels should be added in each direction to obtain a better // display of the month button. I decided, (22,14) is good // enough and save some space on the screen (ipwizard) - m_dateFrame->setFixedSize(m_datePicker->sizeHint() + QSize(22, 14)); + m_dateFrame->setFixedSize(m_datePicker->tqsizeHint() + TQSize(22, 14)); - dateEdit->setMinimumWidth(dateEdit->minimumSizeHint().width() + 6); + dateEdit->setMinimumWidth(dateEdit->tqminimumSizeHint().width() + 6); } kMyMoneyDateInput::~kMyMoneyDateInput() @@ -191,16 +191,16 @@ void kMyMoneyDateInput::toggleDatePicker() } else { - QPoint tmpPoint = mapToGlobal(m_dateButton->geometry().bottomRight()); + TQPoint tmpPoint = mapToGlobal(m_dateButton->tqgeometry().bottomRight()); // usually, the datepicker widget is shown underneath the dateEdit widget // if it does not fit on the screen, we show it above this widget - if(tmpPoint.y() + h > QApplication::desktop()->height()) { + if(tmpPoint.y() + h > TQApplication::desktop()->height()) { tmpPoint.setY(tmpPoint.y() - h - m_dateButton->height()); } - if((m_qtalignment == Qt::AlignRight && tmpPoint.x()+w <= QApplication::desktop()->width()) + if((m_qttqalignment == TQt::AlignRight && tmpPoint.x()+w <= TQApplication::desktop()->width()) || (tmpPoint.x()-w < 0) ) { m_dateFrame->setGeometry(tmpPoint.x()-width(), tmpPoint.y(), w, h); @@ -217,14 +217,14 @@ void kMyMoneyDateInput::toggleDatePicker() } else { - m_datePicker->setDate(QDate::currentDate()); + m_datePicker->setDate(TQDate::tqcurrentDate()); } m_dateFrame->show(); } } -void kMyMoneyDateInput::resizeEvent(QResizeEvent* ev) +void kMyMoneyDateInput::resizeEvent(TQResizeEvent* ev) { m_dateButton->setMaximumHeight(ev->size().height()); m_dateButton->setMaximumWidth(ev->size().height()); @@ -234,12 +234,12 @@ void kMyMoneyDateInput::resizeEvent(QResizeEvent* ev) } -/** Overriding QWidget::keyPressEvent +/** Overriding TQWidget::keyPressEvent * * increments/decrements the date upon +/- or Up/Down key input * sets the date to current date when the 'T' key is pressed */ -void kMyMoneyDateInput::keyPressEvent(QKeyEvent * k) +void kMyMoneyDateInput::keyPressEvent(TQKeyEvent * k) { KShortcut today(i18n("Enter todays date into date input widget", "T")); @@ -255,31 +255,31 @@ void kMyMoneyDateInput::keyPressEvent(QKeyEvent * k) default: if(today.contains(KKey(k)) || k->key() == Key_T) { - slotDateChosen(QDate::currentDate()); + slotDateChosen(TQDate::tqcurrentDate()); } break; } } /** - * This function receives all events that are sent to focusWidget(). + * This function receives all events that are sent to tqfocusWidget(). * Some KeyPress events are intercepted and passed to keyPressEvent. - * Otherwise they would be consumed by QDateEdit. + * Otherwise they would be consumed by TQDateEdit. */ -bool kMyMoneyDateInput::eventFilter(QObject *, QEvent *e) +bool kMyMoneyDateInput::eventFilter(TQObject *, TQEvent *e) { - if (e->type() == QEvent::FocusIn) { + if (e->type() == TQEvent::FocusIn) { m_datePopup->show(); // The cast to the base class is needed since setFocusSection - // is protected in QDateEdit. This causes some logic in - // QDateEdit::setFocusSection not to be executed but this does + // is protected in TQDateEdit. This causes some logic in + // TQDateEdit::setFocusSection not to be executed but this does // not hurt here, because the widget just receives focus. - static_cast<QDateTimeEditBase *>(dateEdit)->setFocusSection(m_focusDatePart); + static_cast<TQDateTimeEditBase *>(dateEdit)->setFocusSection(m_focusDatePart); } - else if (e->type() == QEvent::FocusOut) + else if (e->type() == TQEvent::FocusOut) m_datePopup->hide(); - else if (e->type() == QEvent::KeyPress) { - if (QKeyEvent *k = dynamic_cast<QKeyEvent*>(e)) { + else if (e->type() == TQEvent::KeyPress) { + if (TQKeyEvent *k = dynamic_cast<TQKeyEvent*>(e)) { if (k->key() == Key_Minus) { keyPressEvent(k); return true; @@ -290,13 +290,13 @@ bool kMyMoneyDateInput::eventFilter(QObject *, QEvent *e) return false; // Don't filter the event } -void kMyMoneyDateInput::slotDateChosenRef(const QDate& date) +void kMyMoneyDateInput::slotDateChosenRef(const TQDate& date) { if(date.isValid()) { emit dateChanged(date); m_date = date; - QLabel *lbl = static_cast<QLabel*>(m_datePopup->view()); + TQLabel *lbl = static_cast<TQLabel*>(m_datePopup->view()); lbl->setText(KGlobal::locale()->formatDate(date)); lbl->adjustSize(); if(m_datePopup->isVisible() || hasFocus()) @@ -304,7 +304,7 @@ void kMyMoneyDateInput::slotDateChosenRef(const QDate& date) } } -void kMyMoneyDateInput::slotDateChosen(QDate date) +void kMyMoneyDateInput::slotDateChosen(TQDate date) { if(date.isValid()) { // the next line implies a call to slotDateChosenRef() above @@ -312,17 +312,17 @@ void kMyMoneyDateInput::slotDateChosen(QDate date) } } -QDate kMyMoneyDateInput::date(void) const +TQDate kMyMoneyDateInput::date(void) const { return dateEdit->date(); } -void kMyMoneyDateInput::setDate(QDate date) +void kMyMoneyDateInput::setDate(TQDate date) { slotDateChosen(date); } -void kMyMoneyDateInput::loadDate(const QDate& date) +void kMyMoneyDateInput::loadDate(const TQDate& date) { m_date = m_prevDate = date; @@ -337,11 +337,11 @@ void kMyMoneyDateInput::resetDate(void) setDate(m_prevDate); } -QWidget* kMyMoneyDateInput::focusWidget(void) const +TQWidget* kMyMoneyDateInput::tqfocusWidget(void) const { - QWidget* w = dateEdit; + TQWidget* w = dateEdit; while(w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); return w; } diff --git a/kmymoney2/widgets/kmymoneydateinput.h b/kmymoney2/widgets/kmymoneydateinput.h index 4561d63..0093a2d 100644 --- a/kmymoney2/widgets/kmymoneydateinput.h +++ b/kmymoney2/widgets/kmymoneydateinput.h @@ -20,11 +20,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qlineedit.h> -#include <qdatetime.h> -#include <qdatetimeedit.h> -#include <qvbox.h> +#include <tqwidget.h> +#include <tqlineedit.h> +#include <tqdatetime.h> +#include <tqdatetimeedit.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -43,47 +43,49 @@ class KPassivePopup; /** * Provided to be able to catch the focusOut events before the contents gets changed */ -class KMyMoneyDateEdit : public QDateEdit +class KMyMoneyDateEdit : public TQDateEdit { Q_OBJECT + TQ_OBJECT public: - KMyMoneyDateEdit(const QDate& date, QWidget *parent=0, const char *name=0) : QDateEdit(date, parent, name) {} + KMyMoneyDateEdit(const TQDate& date, TQWidget *tqparent=0, const char *name=0) : TQDateEdit(date, tqparent, name) {} protected: /** reimplemented for internal reasons */ - bool event(QEvent* e); + bool event(TQEvent* e); }; /** * This class provides the general widget used for date selection - * throughout the KMyMoney project. It provides an QDateEdit widget - * which is based on an edit field with spin boxes and adds a QPushButton + * throughout the KMyMoney project. It provides an TQDateEdit widget + * which is based on an edit field with spin boxes and adds a TQPushButton * to open a KDatePicker. */ -class kMyMoneyDateInput : public QHBox +class kMyMoneyDateInput : public TQHBox { Q_OBJECT + TQ_OBJECT public: - kMyMoneyDateInput(QWidget *parent=0, const char *name=0, Qt::AlignmentFlags flags=Qt::AlignLeft); + kMyMoneyDateInput(TQWidget *tqparent=0, const char *name=0, TQt::AlignmentFlags flags=TQt::AlignLeft); ~kMyMoneyDateInput(); // Replace calls to this with the new date() method - // QDate getQDate(void) KDE_DEPRECATED; + // TQDate getTQDate(void) KDE_DEPRECATED; - QDate date(void) const; - void setDate(QDate date); - void loadDate(const QDate& date); + TQDate date(void) const; + void setDate(TQDate date); + void loadDate(const TQDate& date); void resetDate(void); - QWidget* focusWidget(void) const; - virtual void setRange(const QDate & min, const QDate & max) { dateEdit->setRange(min, max); } - void markAsBadDate(bool bad = false, const QColor& = QColor()); + TQWidget* tqfocusWidget(void) const; + virtual void setRange(const TQDate & min, const TQDate & max) { dateEdit->setRange(min, max); } + void markAsBadDate(bool bad = false, const TQColor& = TQColor()); public slots: virtual void show(void); signals: - void dateChanged(const QDate& date); + void dateChanged(const TQDate& date); protected: /** @@ -93,27 +95,27 @@ protected: * The actual key for this to happen might be overridden through * an i18n package. The 'T'-key is always possible. */ - void keyPressEvent(QKeyEvent * k); - void resizeEvent(QResizeEvent*); + void keyPressEvent(TQKeyEvent * k); + void resizeEvent(TQResizeEvent*); - /** To intercept events sent to focusWidget() */ - bool eventFilter(QObject *o, QEvent *e); + /** To intercept events sent to tqfocusWidget() */ + bool eventFilter(TQObject *o, TQEvent *e); protected slots: - void slotDateChosen(QDate date); + void slotDateChosen(TQDate date); void toggleDatePicker(); private slots: - void slotDateChosenRef(const QDate& date); + void slotDateChosenRef(const TQDate& date); void fixSize(void); private: - QDateEdit *dateEdit; + TQDateEdit *dateEdit; KDatePicker *m_datePicker; - QDate m_date; // The date ! - QDate m_prevDate; - Qt::AlignmentFlags m_qtalignment; - QVBox *m_dateFrame; + TQDate m_date; // The date ! + TQDate m_prevDate; + TQt::AlignmentFlags m_qttqalignment; + TQVBox *m_dateFrame; KPushButton *m_dateButton; KPassivePopup *m_datePopup; int m_focusDatePart; diff --git a/kmymoney2/widgets/kmymoneydatetbl.cpp b/kmymoney2/widgets/kmymoneydatetbl.cpp index e48e01e..08a44e6 100644 --- a/kmymoney2/widgets/kmymoneydatetbl.cpp +++ b/kmymoney2/widgets/kmymoneydatetbl.cpp @@ -44,12 +44,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qglobal.h> -#include <qdatetime.h> -#include <qstring.h> -#include <qpen.h> -#include <qpainter.h> -#include <qdialog.h> +#include <tqglobal.h> +#include <tqdatetime.h> +#include <tqstring.h> +#include <tqpen.h> +#include <tqpainter.h> +#include <tqdialog.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -69,8 +69,8 @@ // Project Includes #include "kmymoneydatetbl.h" -kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name, WFlags f) - : QGridView(parent, name, f) +kMyMoneyDateTbl::kMyMoneyDateTbl(TQWidget *tqparent, TQDate date_, const char* name, WFlags f) + : TQGridView(tqparent, name, f) { // call this first to make sure that member variables are initialized setType(MONTHLY); @@ -80,9 +80,9 @@ kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name, if(!date_.isValid()) { kdDebug() << "kMyMoneyDateTbl ctor: WARNING: Given date is invalid, using current date." << endl; - date_=QDate::currentDate(); + date_=TQDate::tqcurrentDate(); } - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQ_StrongFocus ); viewport()->setEraseColor(KGlobalSettings::baseColor()); @@ -90,21 +90,21 @@ kMyMoneyDateTbl::kMyMoneyDateTbl(QWidget *parent, QDate date_, const char* name, setDate(date_); // this initializes firstday, numdays, numDaysPrevMonth // So we can emit hoverDate -// QApplication::setGlobalMouseTracking(true); +// TQApplication::setGlobalMouseTracking(true); viewport()->setMouseTracking(true); } void -kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) +kMyMoneyDateTbl::paintCell(TQPainter *painter, int row, int col) { - QRect rect; - QString text; - QPen pen; + TQRect rect; + TQString text; + TQPen pen; int w=cellWidth(); int h=cellHeight(); - QBrush brushBlue(KGlobalSettings::activeTitleColor()); - QBrush brushLightblue(KGlobalSettings::baseColor()); - QFont font=KGlobalSettings::generalFont(); + TQBrush brushBlue(KGlobalSettings::activeTitleColor()); + TQBrush brushLightblue(KGlobalSettings::baseColor()); + TQFont font=KGlobalSettings::generalFont(); // ----- font.setPointSize(fontsize); @@ -122,7 +122,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) font.setBold(true); painter->setFont(font); bool normalday = true; - QString daystr; + TQString daystr; if ( col+firstWeekDay < 8 ) daystr = WEEK_DAY_NAME(col+firstWeekDay, true); else @@ -163,22 +163,13 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) painter->setPen(KGlobalSettings::activeTextColor()); int year=date.year(); - QString headerText; -#if QT_VERSION > 0x030005 + TQString headerText; // FIXME: Shouldn't that be i18n()'ed as well - QString weekStr = QString::number(date.weekNumber(&year)); - QString yearStr = QString::number(year); + TQString weekStr = TQString::number(date.weekNumber(&year)); + TQString yearStr = TQString::number(year); headerText = i18n("Week %1 for year %2.") - .arg(weekStr) - .arg(yearStr); -#else - // FIXME: include code to display the same as for KDE >= 3.0.5 - QString weekStr = QString::number(weekNumber(date, &year)); - QString yearStr = QString::number(year); - headerText = i18n("Week %1 for year %2.") - .arg(weekStr) - .arg(yearStr); -#endif + .tqarg(weekStr) + .tqarg(yearStr); painter->drawText(0, 0, w, h-1, AlignCenter, headerText, -1, &rect); @@ -187,7 +178,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) if(rect.height()>maxCell.height()) maxCell.setHeight(rect.height()); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { int athird = width()/3; @@ -212,7 +203,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) { int pos; - QDate drawDate(date); + TQDate drawDate(date); if (m_type == MONTHLY) { @@ -245,7 +236,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) else if (m_type == WEEKLY) { // TODO: Handle other start weekdays than Monday - text = QDate::shortDayName(row); + text = TQDate::shortDayName(row); text += " "; int dayOfWeek = date.dayOfWeek(); @@ -262,7 +253,7 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) drawDate = date.addDays(diff); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { } @@ -271,52 +262,52 @@ kMyMoneyDateTbl::paintCell(QPainter *painter, int row, int col) } void -kMyMoneyDateTbl::keyPressEvent( QKeyEvent *e ) +kMyMoneyDateTbl::keyPressEvent( TQKeyEvent *e ) { - if ( e->key() == Qt::Key_Prior ) { + if ( e->key() == TQt::Key_Prior ) { setDate(date.addMonths(-1)); return; } - if ( e->key() == Qt::Key_Next ) { + if ( e->key() == TQt::Key_Next ) { setDate(date.addMonths(1)); return; } - if ( e->key() == Qt::Key_Up ) { + if ( e->key() == TQt::Key_Up ) { if ( date.day() > 7 ) { setDate(date.addDays(-7)); return; } } - if ( e->key() == Qt::Key_Down ) { + if ( e->key() == TQt::Key_Down ) { if ( date.day() <= date.daysInMonth()-7 ) { setDate(date.addDays(7)); return; } } - if ( e->key() == Qt::Key_Left ) { + if ( e->key() == TQt::Key_Left ) { if ( date.day() > 1 ) { setDate(date.addDays(-1)); return; } } - if ( e->key() == Qt::Key_Right ) { + if ( e->key() == TQt::Key_Right ) { if ( date.day() < date.daysInMonth() ) { setDate(date.addDays(1)); return; } } - if ( e->key() == Qt::Key_Minus ) { + if ( e->key() == TQt::Key_Minus ) { setDate(date.addDays(-1)); return; } - if ( e->key() == Qt::Key_Plus ) { + if ( e->key() == TQt::Key_Plus ) { setDate(date.addDays(1)); return; } - if ( e->key() == Qt::Key_N ) { - setDate(QDate::currentDate()); + if ( e->key() == TQt::Key_N ) { + setDate(TQDate::tqcurrentDate()); return; } @@ -324,10 +315,10 @@ kMyMoneyDateTbl::keyPressEvent( QKeyEvent *e ) } void -kMyMoneyDateTbl::viewportResizeEvent(QResizeEvent * e) +kMyMoneyDateTbl::viewportResizeEvent(TQResizeEvent * e) { if (e) - QGridView::viewportResizeEvent(e); + TQGridView::viewportResizeEvent(e); setCellWidth(viewport()->width()/m_colCount); setCellHeight(viewport()->height()/m_rowCount); @@ -337,8 +328,8 @@ void kMyMoneyDateTbl::setFontSize(int size) { int count; - QFontMetrics metrics(fontMetrics()); - QRect rect; + TQFontMetrics metrics(fontMetrics()); + TQRect rect; // ----- store rectangles: fontsize=size; @@ -350,8 +341,8 @@ kMyMoneyDateTbl::setFontSize(int size) for(count=0; count<m_colCount; ++count) { rect=metrics.boundingRect(WEEK_DAY_NAME(count+1, true)); - maxCell.setWidth(QMAX(maxCell.width(), rect.width())); - maxCell.setHeight(QMAX(maxCell.height(), rect.height())); + maxCell.setWidth(TQMAX(maxCell.width(), rect.width())); + maxCell.setHeight(TQMAX(maxCell.height(), rect.height())); } if (m_type == WEEKLY) @@ -361,22 +352,22 @@ kMyMoneyDateTbl::setFontSize(int size) } // ----- compare with a real wide number and add some space: - rect=metrics.boundingRect(QString::fromLatin1("88")); - maxCell.setWidth(QMAX(maxCell.width()+2, rect.width())); - maxCell.setHeight(QMAX(maxCell.height()+4, rect.height())); + rect=metrics.boundingRect(TQString::tqfromLatin1("88")); + maxCell.setWidth(TQMAX(maxCell.width()+2, rect.width())); + maxCell.setHeight(TQMAX(maxCell.height()+4, rect.height())); } void -kMyMoneyDateTbl::wheelEvent ( QWheelEvent * e ) +kMyMoneyDateTbl::wheelEvent ( TQWheelEvent * e ) { setDate(date.addMonths( -(int)(e->delta()/120)) ); e->accept(); } void -kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e) +kMyMoneyDateTbl::contentsMouseReleaseEvent(TQMouseEvent *e) { - if (e->type()!=QEvent::MouseButtonRelease) + if (e->type()!=TQEvent::MouseButtonRelease) { // the KDatePicker only reacts on mouse press events: return; } @@ -395,7 +386,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e) // ----- int row, col, pos, temp; - QPoint mouseCoord; + TQPoint mouseCoord; // ----- mouseCoord = e->pos(); @@ -432,7 +423,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e) } temp = firstday + date.day() - dayoff % 7 - 1; - setDate(QDate(date.year(), date.month(), pos - firstday + dayoff % 7)); + setDate(TQDate(date.year(), date.month(), pos - firstday + dayoff % 7)); updateCell(temp/7+1, temp%7); // Update the previously selected cell } @@ -453,7 +444,7 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e) setDate(date.addDays(diff)); updateCell(dayOfWeek, 0); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { } @@ -463,10 +454,10 @@ kMyMoneyDateTbl::contentsMouseReleaseEvent(QMouseEvent *e) } bool -kMyMoneyDateTbl::setDate(const QDate& date_) +kMyMoneyDateTbl::setDate(const TQDate& date_) { bool changed=false; - QDate temp; + TQDate temp; // ----- if(!date_.isValid()) { @@ -499,42 +490,42 @@ kMyMoneyDateTbl::setDate(const QDate& date_) if (changed) { - repaintContents(false); + tqrepaintContents(false); } emit(dateChanged(date)); return true; } -const QDate& +const TQDate& kMyMoneyDateTbl::getDate() const { return date; } -// what are those repaintContents() good for? (pfeiffer) -void kMyMoneyDateTbl::focusInEvent( QFocusEvent *e ) +// what are those tqrepaintContents() good for? (pfeiffer) +void kMyMoneyDateTbl::focusInEvent( TQFocusEvent *e ) { -// repaintContents(false); - QGridView::focusInEvent( e ); +// tqrepaintContents(false); + TQGridView::focusInEvent( e ); } -void kMyMoneyDateTbl::focusOutEvent( QFocusEvent *e ) +void kMyMoneyDateTbl::focusOutEvent( TQFocusEvent *e ) { -// repaintContents(false); - QGridView::focusOutEvent( e ); +// tqrepaintContents(false); + TQGridView::focusOutEvent( e ); } -QSize -kMyMoneyDateTbl::sizeHint() const +TQSize +kMyMoneyDateTbl::tqsizeHint() const { if (maxCell.height()>0 && maxCell.width()>0) { - return QSize(maxCell.width()*numCols()+2*frameWidth(), + return TQSize(maxCell.width()*numCols()+2*frameWidth(), (maxCell.height()+2)*numRows()+2*frameWidth()); } else { - kdDebug() << "kMyMoneyDateTbl::sizeHint: obscure failure - " << endl; - return QSize(-1, -1); + kdDebug() << "kMyMoneyDateTbl::tqsizeHint: obscure failure - " << endl; + return TQSize(-1, -1); } } @@ -547,11 +538,11 @@ void kMyMoneyDateTbl::setType(calendarType type) m_colCount = 1; m_type = WEEKLY; } - else if (type == QUARTERLY) + else if (type == TQUARTERLY) { m_rowCount = 7; m_colCount = 21; - m_type = QUARTERLY; + m_type = TQUARTERLY; } else // default to monthly { @@ -567,10 +558,10 @@ void kMyMoneyDateTbl::setType(calendarType type) viewportResizeEvent(NULL); } -void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e) +void kMyMoneyDateTbl::contentsMouseMoveEvent(TQMouseEvent* e) { int row, col, pos; - QPoint mouseCoord; + TQPoint mouseCoord; mouseCoord = e->pos(); row = rowAt(mouseCoord.y()); @@ -586,8 +577,8 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e) int firstWeekDay = KGlobal::locale()->weekStartDay(); #endif - QDate drawDate(date); - QString text; + TQDate drawDate(date); + TQString text; if (m_type == MONTHLY) { @@ -620,7 +611,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e) else if (m_type == WEEKLY) { // TODO: Handle other start weekdays than Monday - text = QDate::shortDayName(row); + text = TQDate::shortDayName(row); text += " "; int dayOfWeek = date.dayOfWeek(); @@ -637,7 +628,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e) drawDate = date.addDays(diff); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { } @@ -647,52 +638,7 @@ void kMyMoneyDateTbl::contentsMouseMoveEvent(QMouseEvent* e) emit hoverDate(drawDate); } - QGridView::contentsMouseMoveEvent(e); -} - -#if QT_VERSION <= 0x030005 -// The following code is borrowed from QT 3.2 QDate::weekNumber() -// and slightly modified -int kMyMoneyDateTbl::weekNumber(const QDate& date, int *yearNumber) const -{ - if ( !date.isValid() ) - return 0; - - int dow = date.dayOfWeek(); - int doy = date.dayOfYear(); - int currYear = date.year(); - int jan1WeekDay = QDate( currYear, 1, 1 ).dayOfWeek(); - int yearNum; - int weekNum; - - if ( doy <= (8 - jan1WeekDay) && jan1WeekDay > 4 ) { - yearNum = currYear - 1; - weekNum = 52; - if ( jan1WeekDay == 5 || - (jan1WeekDay == 6 && QDate::leapYear(yearNum)) ) - weekNum++; - } else { - int totalDays = 365; - if ( QDate::leapYear(currYear) ) - totalDays++; - - if ( (totalDays - doy < 4 - dow) - || (jan1WeekDay == 7 && totalDays - doy < 3) ) { - yearNum = currYear + 1; - weekNum = 1; - } else { - int j = doy + ( 7 - dow ) + ( jan1WeekDay - 1 ); - yearNum = currYear; - weekNum = j / 7; - if ( jan1WeekDay > 4 ) - weekNum--; - } - } - if ( yearNumber ) - *yearNumber = yearNum; - return weekNum; - + TQGridView::contentsMouseMoveEvent(e); } -#endif #include "kmymoneydatetbl.moc" diff --git a/kmymoney2/widgets/kmymoneydatetbl.h b/kmymoney2/widgets/kmymoneydatetbl.h index 7ff6610..f46d661 100644 --- a/kmymoney2/widgets/kmymoneydatetbl.h +++ b/kmymoney2/widgets/kmymoneydatetbl.h @@ -46,8 +46,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qgridview.h> -#include <qdatetime.h> +#include <tqgridview.h> +#include <tqdatetime.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,28 +62,29 @@ /** * @author Michael Edwardes */ -class kMyMoneyDateTbl : public QGridView { +class kMyMoneyDateTbl : public TQGridView { Q_OBJECT + TQ_OBJECT public: enum calendarType { WEEKLY, MONTHLY, - QUARTERLY }; + TQUARTERLY }; public: /** * The constructor. */ - kMyMoneyDateTbl(QWidget *parent=0, - QDate date=QDate::currentDate(), + kMyMoneyDateTbl(TQWidget *tqparent=0, + TQDate date=TQDate::tqcurrentDate(), const char* name=0, WFlags f=0); /** * Returns a recommended size for the widget. * To save some time, the size of the largest used cell content is * calculated in each paintCell() call, since all calculations have * to be done there anyway. The size is stored in maxCell. The - * sizeHint() simply returns a multiple of maxCell. + * tqsizeHint() simply returns a multiple of maxCell. */ - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; /** * Set the font size of the date table. */ @@ -91,8 +92,8 @@ public: /** * Select and display this date. */ - virtual bool setDate(const QDate&); - virtual const QDate& getDate() const; + virtual bool setDate(const TQDate&); + virtual const TQDate& getDate() const; virtual void setType(calendarType type); virtual calendarType type(void) const { return m_type; } @@ -101,7 +102,7 @@ signals: /** * The selected date changed. */ - void dateChanged(QDate); + void dateChanged(TQDate); /** * A date has been selected by clicking on the table. */ @@ -110,29 +111,29 @@ signals: /** * **/ - virtual void hoverDate(QDate); + virtual void hoverDate(TQDate); protected: /** * Paint a cell. */ - virtual void paintCell(QPainter*, int, int); + virtual void paintCell(TQPainter*, int, int); /** * Handle the resize events. */ - virtual void viewportResizeEvent(QResizeEvent *); + virtual void viewportResizeEvent(TQResizeEvent *); /** * React on mouse clicks that select a date. */ - virtual void contentsMouseReleaseEvent(QMouseEvent *); - virtual void wheelEvent( QWheelEvent * e ); - virtual void keyPressEvent( QKeyEvent *e ); - virtual void focusInEvent( QFocusEvent *e ); - virtual void focusOutEvent( QFocusEvent *e ); + virtual void contentsMouseReleaseEvent(TQMouseEvent *); + virtual void wheelEvent( TQWheelEvent * e ); + virtual void keyPressEvent( TQKeyEvent *e ); + virtual void focusInEvent( TQFocusEvent *e ); + virtual void focusOutEvent( TQFocusEvent *e ); - virtual void drawCellContents(QPainter *painter, int row, int col, const QDate& theDate) = 0; + virtual void drawCellContents(TQPainter *painter, int row, int col, const TQDate& theDate) = 0; - virtual void contentsMouseMoveEvent(QMouseEvent* e); + virtual void contentsMouseMoveEvent(TQMouseEvent* e); /** * The font size of the displayed text. @@ -141,7 +142,7 @@ protected: /** * The currently selected date. */ - QDate date; + TQDate date; /** * The day of the first day in the month [1..7]. */ @@ -162,7 +163,7 @@ protected: /** * Save the size of the largest used cell content. */ - QRect maxCell; + TQRect maxCell; /** * Type related variables @@ -172,12 +173,9 @@ protected: int m_rowCount; /// - QDate m_drawDateOrig; + TQDate m_drawDateOrig; private: -#if QT_VERSION <= 0x030005 - int weekNumber(const QDate&, int *yr) const; -#endif #if KDE_IS_VERSION(3,2,0) #define WEEK_DAY_NAME(a,b) KGlobal::locale()->calendar()->weekDayName(a,b) diff --git a/kmymoney2/widgets/kmymoneyedit.cpp b/kmymoney2/widgets/kmymoneyedit.cpp index 87be674..2e59e32 100644 --- a/kmymoney2/widgets/kmymoneyedit.cpp +++ b/kmymoney2/widgets/kmymoneyedit.cpp @@ -19,10 +19,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> -#include <qdesktopwidget.h> -#include <qwidget.h> -#include <qvbox.h> +#include <tqapplication.h> +#include <tqdesktopwidget.h> +#include <tqwidget.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,14 +42,14 @@ #include "kmymoneycalculator.h" #include "../mymoney/mymoneymoney.h" -kMyMoneyMoneyValidator::kMyMoneyMoneyValidator(QObject * parent, const char * name) : - QDoubleValidator(parent, name) +kMyMoneyMoneyValidator::kMyMoneyMoneyValidator(TQObject * tqparent, const char * name) : + TQDoubleValidator(tqparent, name) { } kMyMoneyMoneyValidator::kMyMoneyMoneyValidator( double bottom, double top, int decimals, - QObject * parent, const char * name ) : - QDoubleValidator(bottom, top, decimals, parent, name) + TQObject * tqparent, const char * name ) : + TQDoubleValidator(bottom, top, decimals, tqparent, name) { } @@ -57,9 +57,9 @@ kMyMoneyMoneyValidator::kMyMoneyMoneyValidator( double bottom, double top, int d * The code of the following function is taken from kdeui/knumvalidator.cpp * and adjusted to always use the monetary symbols defined in the KDE control center */ -QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) const +TQValidator::State kMyMoneyMoneyValidator::validate( TQString & input, int & _p ) const { - QString s = input; + TQString s = input; KLocale * l = KGlobal::locale(); // ok, we have to re-format the number to have: // 1. decimalSymbol == '.' @@ -67,62 +67,62 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) // 3. positiveSign == <empty> // 4. thousandsSeparator() == <empty> (we don't check that there // are exactly three decimals between each separator): - QString d = l->monetaryDecimalSymbol(), + TQString d = l->monetaryDecimalSymbol(), n = l->negativeSign(), p = l->positiveSign(), t = l->monetaryThousandsSeparator(); // first, delete p's and t's: if ( !p.isEmpty() ) - for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) ) + for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) ) s.remove( idx, p.length() ); if ( !t.isEmpty() ) - for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) ) + for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) ) s.remove( idx, t.length() ); // then, replace the d's and n's - if ( ( !n.isEmpty() && n.find('.') != -1 ) || - ( !d.isEmpty() && d.find('-') != -1 ) ) { + if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) || + ( !d.isEmpty() && d.tqfind('-') != -1 ) ) { // make sure we don't replace something twice: - kdWarning() << "KDoubleValidator: decimal symbol contains '-' or " - "negative sign contains '.' -> improve algorithm" << endl; + kdWarning() << "KDoubleValidator: decimal symbol tqcontains '-' or " + "negative sign tqcontains '.' -> improve algorithm" << endl; return Invalid; } if ( !d.isEmpty() && d != "." ) - for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) ) - s.replace( idx, d.length(), "."); + for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) ) + s.tqreplace( idx, d.length(), "."); if ( !n.isEmpty() && n != "-" ) - for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) ) - s.replace( idx, n.length(), "-" ); + for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) ) + s.tqreplace( idx, n.length(), "-" ); // Take care of monetary parens around the value if selected via // the locale settings. // If the lead-in or lead-out paren is present, remove it - // before passing the string to the QDoubleValidator + // before passing the string to the TQDoubleValidator if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { - QRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$"); - if(s.find(regExp) != -1) { + TQRegExp regExp("^(\\()?([\\d-\\.]*)(\\))?$"); + if(s.tqfind(regExp) != -1) { s = regExp.cap(2); } } - // check for non numeric values (QDoubleValidator allows an 'e', we don't) - QRegExp nonNumeric("[^\\d-\\.]+"); - if(s.find(nonNumeric) != -1) + // check for non numeric values (TQDoubleValidator allows an 'e', we don't) + TQRegExp nonNumeric("[^\\d-\\.]+"); + if(s.tqfind(nonNumeric) != -1) return Invalid; // check for minus sign trailing the number - QRegExp trailingMinus("^([^-]*)\\w*-$"); - if(s.find(trailingMinus) != -1) { - s = QString("-%1").arg(trailingMinus.cap(1)); + TQRegExp trailingMinus("^([^-]*)\\w*-$"); + if(s.tqfind(trailingMinus) != -1) { + s = TQString("-%1").tqarg(trailingMinus.cap(1)); } // check for the maximum allowed number of decimal places - int decPos = s.find('.'); + int decPos = s.tqfind('.'); if(decPos != -1) { if(decimals() == 0) return Invalid; @@ -131,10 +131,10 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) } // If we have just a single minus sign, we are done - if(s == QString("-")) + if(s == TQString("-")) return Acceptable; - QValidator::State rc = QDoubleValidator::validate( s, _p ); + TQValidator::State rc = TQDoubleValidator::validate( s, _p ); if(rc == Acceptable) { // If the numeric value is acceptable, we check if the parens @@ -144,7 +144,7 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) // only, if the locale settings have it enabled. if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { - int tmp = input.contains('(') - input.contains(')'); + int tmp = input.tqcontains('(') - input.tqcontains(')'); if(tmp > 0) rc = Intermediate; else if(tmp < 0) @@ -154,8 +154,8 @@ QValidator::State kMyMoneyMoneyValidator::validate( QString & input, int & _p ) return rc; } -kMyMoneyEdit::kMyMoneyEdit(QWidget *parent, const char *name, const int prec) - : QHBox(parent, name) +kMyMoneyEdit::kMyMoneyEdit(TQWidget *tqparent, const char *name, const int prec) + : TQHBox(tqparent, name) { m_prec = prec; if(prec < -1 || prec > 20) @@ -163,8 +163,8 @@ kMyMoneyEdit::kMyMoneyEdit(QWidget *parent, const char *name, const int prec) init(); } -kMyMoneyEdit::kMyMoneyEdit(const MyMoneySecurity& sec, QWidget *parent, const char *name) - : QHBox(parent, name) +kMyMoneyEdit::kMyMoneyEdit(const MyMoneySecurity& sec, TQWidget *tqparent, const char *name) + : TQHBox(tqparent, name) { m_prec = MyMoneyMoney::denomToPrec(sec.smallestAccountFraction()); init(); @@ -209,29 +209,29 @@ void kMyMoneyEdit::init(void) setFocusProxy(m_edit); // Yes, just a simple double validator ! - kMyMoneyMoneyValidator *validator = new kMyMoneyMoneyValidator(this); + kMyMoneyMoneyValidator *validator = new kMyMoneyMoneyValidator(TQT_TQOBJECT(this)); m_edit->setValidator(validator); - m_edit->setAlignment(AlignRight | AlignVCenter); + m_edit->tqsetAlignment(AlignRight | AlignVCenter); - m_calculatorFrame = new QVBox(this, 0, WType_Popup); + m_calculatorFrame = new TQVBox(this, 0, WType_Popup); - m_calculatorFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); + m_calculatorFrame->setFrameStyle(TQFrame::PopupPanel | TQFrame::Raised); m_calculatorFrame->setLineWidth(3); m_calculator = new kMyMoneyCalculator(m_calculatorFrame); m_calculatorFrame->setFixedSize(m_calculator->width()+3, m_calculator->height()+3); m_calculatorFrame->hide(); - m_calcButton = new KPushButton(QIconSet(QPixmap(KGlobal::iconLoader()->iconPath("kcalc", -KIcon::SizeSmall))), QString(""), this); - m_calcButton->setFixedWidth( m_calcButton->sizeHint().width() ); - m_calcButton->setFixedHeight(m_edit->sizeHint().height()); + m_calcButton = new KPushButton(TQIconSet(TQPixmap(KGlobal::iconLoader()->iconPath("kcalc", -KIcon::SizeSmall))), TQString(""), this); + m_calcButton->setFixedWidth( m_calcButton->tqsizeHint().width() ); + m_calcButton->setFixedHeight(m_edit->tqsizeHint().height()); m_calcButton->setFocusProxy(m_edit); - QPixmap pixmap; + TQPixmap pixmap; pixmap.loadFromData(resetButtonImage, sizeof(resetButtonImage), "PNG", 0); - m_resetButton = new KPushButton(QIconSet(pixmap), QString(""), this); - m_resetButton->setFixedWidth( m_resetButton->sizeHint().width() ); - m_resetButton->setFixedHeight(m_edit->sizeHint().height()); + m_resetButton = new KPushButton(TQIconSet(pixmap), TQString(""), this); + m_resetButton->setFixedWidth( m_resetButton->tqsizeHint().width() ); + m_resetButton->setFixedHeight(m_edit->tqsizeHint().height()); m_resetButton->setEnabled(false); m_resetButton->setFocusProxy(m_edit); @@ -242,13 +242,13 @@ void kMyMoneyEdit::init(void) setSpacing(0); - connect(m_edit, SIGNAL(textChanged(const QString&)), this, SLOT(theTextChanged(const QString&))); - connect(m_calculator, SIGNAL(signalResultAvailable()), this, SLOT(slotCalculatorResult())); - connect(m_calcButton, SIGNAL(clicked()), this, SLOT(slotCalculatorOpen())); - connect(m_resetButton, SIGNAL(clicked()), this, SLOT(resetText())); + connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(theTextChanged(const TQString&))); + connect(m_calculator, TQT_SIGNAL(signalResultAvailable()), this, TQT_SLOT(slotCalculatorResult())); + connect(m_calcButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCalculatorOpen())); + connect(m_resetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetText())); } -void kMyMoneyEdit::setValidator(const QValidator* v) +void kMyMoneyEdit::setValidator(const TQValidator* v) { m_edit->setValidator(v); } @@ -281,7 +281,7 @@ bool kMyMoneyEdit::isValid(void) const MyMoneyMoney kMyMoneyEdit::value(void) const { - QString txt = m_edit->text(); + TQString txt = m_edit->text(); ensureFractionalPart(txt); MyMoneyMoney money(txt); if(m_prec != -1) @@ -292,11 +292,11 @@ MyMoneyMoney kMyMoneyEdit::value(void) const void kMyMoneyEdit::setValue(const MyMoneyMoney& value) { // load the value into the widget but don't use thousandsSeparators - QString txt = value.formatMoney("", m_prec, false); + TQString txt = value.formatMoney("", m_prec, false); loadText(txt); } -void kMyMoneyEdit::loadText(const QString& txt) +void kMyMoneyEdit::loadText(const TQString& txt) { m_edit->setText(txt); if(isEnabled() && !txt.isEmpty()) @@ -307,7 +307,7 @@ void kMyMoneyEdit::loadText(const QString& txt) void kMyMoneyEdit::clearText(void) { - m_text = QString(); + m_text = TQString(); m_edit->setText(m_text); } @@ -317,12 +317,12 @@ void kMyMoneyEdit::resetText(void) m_resetButton->setEnabled(false); } -void kMyMoneyEdit::theTextChanged(const QString & theText) +void kMyMoneyEdit::theTextChanged(const TQString & theText) { KLocale * l = KGlobal::locale(); - QString d = l->monetaryDecimalSymbol(); - QString l_text = theText; - QString nsign, psign; + TQString d = l->monetaryDecimalSymbol(); + TQString l_text = theText; + TQString nsign, psign; if(l->negativeMonetarySignPosition() == KLocale::ParensAround || l->positiveMonetarySignPosition() == KLocale::ParensAround) { nsign = psign = "("; @@ -333,14 +333,14 @@ void kMyMoneyEdit::theTextChanged(const QString & theText) int i = 0; if(isEnabled()) { - QValidator::State state = m_edit->validator()->validate( l_text, i); - if(state == QValidator::Intermediate) { + TQValidator::State state = m_edit->validator()->validate( l_text, i); + if(state == TQValidator::Intermediate) { if(l_text.length() == 1) { if(l_text != d && l_text != nsign && l_text != psign && l_text != "-") - state = QValidator::Invalid; + state = TQValidator::Invalid; } } - if (state==QValidator::Invalid) + if (state==TQValidator::Invalid) m_edit->setText(previousText); else { previousText = l_text; @@ -352,16 +352,16 @@ void kMyMoneyEdit::theTextChanged(const QString & theText) void kMyMoneyEdit::ensureFractionalPart(void) { - QString s(m_edit->text()); + TQString s(m_edit->text()); ensureFractionalPart(s); m_edit->setText(s); } -void kMyMoneyEdit::ensureFractionalPart(QString& s) const +void kMyMoneyEdit::ensureFractionalPart(TQString& s) const { KLocale* locale = KGlobal::locale(); - QString decimalSymbol = locale->monetaryDecimalSymbol(); + TQString decimalSymbol = locale->monetaryDecimalSymbol(); if(decimalSymbol.isEmpty()) decimalSymbol = "."; @@ -369,19 +369,19 @@ void kMyMoneyEdit::ensureFractionalPart(QString& s) const // followed by the required number of 0s if (!s.isEmpty()) { if(m_prec > 0) { - if (!s.contains(decimalSymbol)) { + if (!s.tqcontains(decimalSymbol)) { s += decimalSymbol; for (int i=0; i < m_prec; i++) s += "0"; } } else if(m_prec == 0) { - while(s.contains(decimalSymbol)) { - int pos = s.findRev(decimalSymbol); + while(s.tqcontains(decimalSymbol)) { + int pos = s.tqfindRev(decimalSymbol); if(pos != -1) { s.truncate(pos); } } - } else if(s.contains(decimalSymbol)) { // m_prec == -1 && fraction + } else if(s.tqcontains(decimalSymbol)) { // m_prec == -1 && fraction // no trailing zeroes while(s.endsWith("0")) { s.truncate(s.length()-1); @@ -393,19 +393,19 @@ void kMyMoneyEdit::ensureFractionalPart(QString& s) const } } -bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e ) +bool kMyMoneyEdit::eventFilter(TQObject * /* o */ , TQEvent *e ) { bool rc = false; // we want to catch some keys that are usually handled by // the base class (e.g. '+', '-', etc.) - if(e->type() == QEvent::KeyPress) { - QKeyEvent *k = static_cast<QKeyEvent *> (e); + if(e->type() == TQEvent::KeyPress) { + TQKeyEvent *k = TQT_TQKEYEVENT (e); rc = true; switch(k->key()) { - case Qt::Key_Plus: - case Qt::Key_Minus: + case TQt::Key_Plus: + case TQt::Key_Minus: if(m_edit->hasSelectedText()) { m_edit->cut(); } @@ -416,7 +416,7 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e ) // in case of '-' we do not enter the calculator when // the current position is the beginning and there is // no '-' sign at the first position. - if(k->key() == Qt::Key_Minus) { + if(k->key() == TQt::Key_Minus) { if(m_edit->cursorPosition() == 0 && m_edit->text()[0] != '-') { rc = false; break; @@ -424,9 +424,9 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e ) } // otherwise, tricky fall through here! - case Qt::Key_Slash: - case Qt::Key_Asterisk: - case Qt::Key_Percent: + case TQt::Key_Slash: + case TQt::Key_Asterisk: + case TQt::Key_Percent: if(m_edit->hasSelectedText()) { // remove the selected text m_edit->cut(); @@ -439,7 +439,7 @@ bool kMyMoneyEdit::eventFilter(QObject * /* o */ , QEvent *e ) break; } - } else if(e->type() == QEvent::FocusOut) { + } else if(e->type() == TQEvent::FocusOut) { if(!m_edit->text().isEmpty() || !allowEmpty) ensureFractionalPart(); @@ -457,7 +457,7 @@ void kMyMoneyEdit::slotCalculatorOpen(void) calculatorOpen(0); } -void kMyMoneyEdit::calculatorOpen(QKeyEvent* k) +void kMyMoneyEdit::calculatorOpen(TQKeyEvent* k) { m_calculator->setInitialValues(m_edit->text(), k); @@ -466,18 +466,18 @@ void kMyMoneyEdit::calculatorOpen(QKeyEvent* k) // usually, the calculator widget is shown underneath the MoneyEdit widget // if it does not fit on the screen, we show it above this widget - QPoint p = mapToGlobal(QPoint(0,0)); - if(p.y() + height() + h > QApplication::desktop()->height()) + TQPoint p = mapToGlobal(TQPoint(0,0)); + if(p.y() + height() + h > TQApplication::desktop()->height()) p.setY(p.y() - h); else p.setY(p.y() + height()); // usually, it is shown left aligned. If it does not fit, we align it // to the right edge of the widget - if(p.x() + w > QApplication::desktop()->width()) + if(p.x() + w > TQApplication::desktop()->width()) p.setX(p.x() + width() - w); - QRect r = m_calculator->geometry(); + TQRect r = m_calculator->tqgeometry(); r.moveTopLeft(p); m_calculatorFrame->setGeometry(r); m_calculatorFrame->show(); @@ -486,7 +486,7 @@ void kMyMoneyEdit::calculatorOpen(QKeyEvent* k) void kMyMoneyEdit::slotCalculatorResult(void) { - QString result; + TQString result; if(m_calculator != 0) { m_calculatorFrame->hide(); m_edit->setText(m_calculator->result()); @@ -496,11 +496,11 @@ void kMyMoneyEdit::slotCalculatorResult(void) } } -QWidget* kMyMoneyEdit::focusWidget(void) const +TQWidget* kMyMoneyEdit::tqfocusWidget(void) const { - QWidget* w = m_edit; + TQWidget* w = m_edit; while(w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); return w; } @@ -534,7 +534,7 @@ bool kMyMoneyEdit::isEmptyAllowed(void) const return allowEmpty; } -void kMyMoneyEdit::setHint(const QString& hint) const +void kMyMoneyEdit::setHint(const TQString& hint) const { if(m_edit) m_edit->setHint(hint); @@ -549,11 +549,11 @@ bool kMyMoneyEdit::isReadOnly(void) const void kMyMoneyEdit::setReadOnly(bool readOnly) { - // we use the QLineEdit::setReadOnly() method directly to avoid + // we use the TQLineEdit::setReadOnly() method directly to avoid // changing the background between readonly and read/write mode // as it is done by the KLineEdit code. if(m_edit) - m_edit->QLineEdit::setReadOnly(readOnly); + m_edit->TQLineEdit::setReadOnly(readOnly); } #include "kmymoneyedit.moc" diff --git a/kmymoney2/widgets/kmymoneyedit.h b/kmymoney2/widgets/kmymoneyedit.h index 6415a0c..6df557d 100644 --- a/kmymoney2/widgets/kmymoneyedit.h +++ b/kmymoney2/widgets/kmymoneyedit.h @@ -22,11 +22,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qhbox.h> -#include <qvalidator.h> +#include <tqhbox.h> +#include <tqvalidator.h> -class QVBox; -class QWidget; +class TQVBox; +class TQWidget; // ---------------------------------------------------------------------------- // KDE Includes @@ -43,7 +43,7 @@ class MyMoneyMoney; class kMyMoneyCalculator; #if KDE_VERSION <= KDE_MAKE_VERSION(3,1,0) - #define KDoubleValidator QDoubleValidator + #define KDoubleValidator TQDoubleValidator #endif /** @@ -53,31 +53,32 @@ class kMyMoneyCalculator; * * @author Thomas Baumgart */ -class kMyMoneyMoneyValidator : public QDoubleValidator +class kMyMoneyMoneyValidator : public TQDoubleValidator { Q_OBJECT + TQ_OBJECT public: /** * Constuct a locale-aware KDoubleValidator with default range - * (whatever QDoubleValidator uses for that) and parent @p - * parent + * (whatever TQDoubleValidator uses for that) and tqparent @p + * tqparent */ - kMyMoneyMoneyValidator( QObject * parent, const char * name=0 ); + kMyMoneyMoneyValidator( TQObject * tqparent, const char * name=0 ); /** * Constuct a locale-aware KDoubleValidator for range [@p bottom,@p * top] and a precision of @p decimals decimals after the decimal * point. */ kMyMoneyMoneyValidator( double bottom, double top, int decimals, - QObject * parent, const char * name=0 ); + TQObject * tqparent, const char * name=0 ); /** * Destructs the validator. */ virtual ~kMyMoneyMoneyValidator() {} /** Overloaded for internal reasons. The API is not affected. */ - virtual QValidator::State validate( QString & input, int & pos ) const; + virtual TQValidator::State validate( TQString & input, int & pos ) const; }; /** @@ -88,19 +89,20 @@ public: * * @author Michael Edwardes, Thomas Baumgart */ -class kMyMoneyEdit : public QHBox +class kMyMoneyEdit : public TQHBox { Q_OBJECT - Q_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible); - Q_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible); - Q_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty); - Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly ) + TQ_OBJECT + TQ_PROPERTY(bool calculatorButtonVisibility READ isCalculatorButtonVisible WRITE setCalculatorButtonVisible); + TQ_PROPERTY(bool resetButtonVisibility READ isResetButtonVisible WRITE setResetButtonVisible); + TQ_PROPERTY(bool allowEmpty READ isEmptyAllowed WRITE setAllowEmpty); + TQ_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly ) private: - QString previousText; // keep track of what has been typed - QString m_text; // keep track of what was the original value + TQString previousText; // keep track of what has been typed + TQString m_text; // keep track of what was the original value kMyMoneyCalculator* m_calculator; - QVBox* m_calculatorFrame; + TQVBox* m_calculatorFrame; kMyMoneyLineEdit* m_edit; KPushButton* m_calcButton; KPushButton* m_resetButton; @@ -112,7 +114,7 @@ private: /** * Internal helper function for value() and ensureFractionalPart(void). */ - void ensureFractionalPart(QString& txt) const; + void ensureFractionalPart(TQString& txt) const; protected: /** @@ -126,9 +128,9 @@ protected: * event pointed to by @p ev. If @p ev is 0, then no key * event is replayed. * - * @param ev pointer to QKeyEvent that started the calculator. + * @param ev pointer to TQKeyEvent that started the calculator. */ - void calculatorOpen(QKeyEvent* ev); + void calculatorOpen(TQKeyEvent* ev); /** * Helper method for constructors. @@ -136,13 +138,13 @@ protected: void init(void); protected slots: - void theTextChanged(const QString & text); + void theTextChanged(const TQString & text); void slotCalculatorResult(void); void slotCalculatorOpen(void); public: - kMyMoneyEdit(QWidget *parent=0, const char *name=0, const int prec = -2); - kMyMoneyEdit(const MyMoneySecurity& eq, QWidget *parent=0, const char *name=0); + kMyMoneyEdit(TQWidget *tqparent=0, const char *name=0, const int prec = -2); + kMyMoneyEdit(const MyMoneySecurity& eq, TQWidget *tqparent=0, const char *name=0); ~kMyMoneyEdit(); /** @@ -156,13 +158,13 @@ public: bool isValid(void) const; - virtual bool eventFilter(QObject * , QEvent * ); + virtual bool eventFilter(TQObject * , TQEvent * ); /** * This method returns the value of the edit field in "numerator/denominator" format. * If you want to get the text of the edit field, use lineedit()->text() instead. */ - QString text(void) const { return value().toString(); }; + TQString text(void) const { return value().toString(); }; void setMinimumWidth(int w) { m_edit->setMinimumWidth(w); }; @@ -182,7 +184,7 @@ public: */ int precision(void) { return m_prec; }; - QWidget* focusWidget(void) const; + TQWidget* tqfocusWidget(void) const; /** * This method allows to modify the behavior of the widget @@ -196,7 +198,7 @@ public: void setAllowEmpty(bool allowed = true); /** Overloaded for internal reasons. The API is not affected. */ - void setValidator(const QValidator* v); + void setValidator(const TQValidator* v); bool isCalculatorButtonVisible(void) const; @@ -206,16 +208,16 @@ public: KLineEdit* lineedit(void) const; - void setHint(const QString& hint) const; + void setHint(const TQString& hint) const; bool isReadOnly(void) const; public slots: - void loadText(const QString& text); + void loadText(const TQString& text); void resetText(void); void clearText(void); - void setText(const QString& txt) { setValue(MyMoneyMoney(txt)); }; + void setText(const TQString& txt) { setValue(MyMoneyMoney(txt)); }; /** * This method allows to show/hide the calculator button of the widget. @@ -235,9 +237,9 @@ signals: // Signals * This signal is sent, when the focus leaves this widget and * the amount has been changed by user during this session. */ - void valueChanged(const QString& text); + void valueChanged(const TQString& text); - void textChanged(const QString& text); + void textChanged(const TQString& text); }; #endif diff --git a/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp b/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp index 684997e..6bfd1c2 100644 --- a/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp +++ b/kmymoney2/widgets/kmymoneyforecastlistviewitem.cpp @@ -18,10 +18,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpalette.h> -#include <qpen.h> -#include <qcolor.h> -#include <qpainter.h> +#include <tqpalette.h> +#include <tqpen.h> +#include <tqcolor.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -33,8 +33,8 @@ #include <kmymoney/kmymoneyglobalsettings.h> -KMyMoneyForecastListViewItem::KMyMoneyForecastListViewItem (QListView* parent, QListViewItem* after, bool isNegative) : - KListViewItem(parent, after), +KMyMoneyForecastListViewItem::KMyMoneyForecastListViewItem (TQListView* tqparent, TQListViewItem* after, bool isNegative) : + KListViewItem(tqparent, after), m_negative(isNegative) { } @@ -43,18 +43,18 @@ KMyMoneyForecastListViewItem::~KMyMoneyForecastListViewItem() { } -void KMyMoneyForecastListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KMyMoneyForecastListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg = cg; - QColor textColour; + TQColorGroup _cg = cg; + TQColor textColour; if(m_negative == true) { textColour = KMyMoneyGlobalSettings::listNegativeValueColor(); //if the item is marked is marked as negative, all columns will be painted negative } else { textColour = m_columnsColor[column]; //otherwise, respect the color for each column } - _cg.setColor(QColorGroup::Text, textColour); + _cg.setColor(TQColorGroup::Text, textColour); - KListViewItem::paintCell(p, _cg, column, width, alignment); + KListViewItem::paintCell(p, _cg, column, width, tqalignment); } void KMyMoneyForecastListViewItem::setNegative(bool isNegative) @@ -62,13 +62,13 @@ void KMyMoneyForecastListViewItem::setNegative(bool isNegative) m_negative = isNegative; } -void KMyMoneyForecastListViewItem::setText( int column, const QString &text, const bool &negative) +void KMyMoneyForecastListViewItem::setText( int column, const TQString &text, const bool &negative) { //if negative set the map to negative color according to KMyMoneySettings if(negative) { m_columnsColor[column] = KMyMoneyGlobalSettings::listNegativeValueColor(); } else { - m_columnsColor[column] = QColorGroup::Text; + m_columnsColor[column] = TQColorGroup::Text; } KListViewItem::setText(column, text); diff --git a/kmymoney2/widgets/kmymoneyforecastlistviewitem.h b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h index 7e48945..9c4b568 100644 --- a/kmymoney2/widgets/kmymoneyforecastlistviewitem.h +++ b/kmymoney2/widgets/kmymoneyforecastlistviewitem.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> +#include <tqobject.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,25 +41,25 @@ class KMyMoneyForecastListViewItem : public KListViewItem { public: - KMyMoneyForecastListViewItem(QListView* parent, QListViewItem* after, bool isNegative); + KMyMoneyForecastListViewItem(TQListView* tqparent, TQListViewItem* after, bool isNegative); ~KMyMoneyForecastListViewItem(); void setNegative(bool isNegative); - void setText( int column, const QString &text, const bool &negative = false ); + void setText( int column, const TQString &text, const bool &negative = false ); /** * use my own paint method */ - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); private: bool m_negative; - QMap<int, QColor> m_columnsColor; + TQMap<int, TQColor> m_columnsColor; }; #endif diff --git a/kmymoney2/widgets/kmymoneygpgconfig.cpp b/kmymoney2/widgets/kmymoneygpgconfig.cpp index f168e69..a64e709 100644 --- a/kmymoney2/widgets/kmymoneygpgconfig.cpp +++ b/kmymoney2/widgets/kmymoneygpgconfig.cpp @@ -18,8 +18,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,8 +38,8 @@ #define RECOVER_KEY_ID "0xD2B08440" -kMyMoneyGPGConfig::kMyMoneyGPGConfig(QWidget *parent, const char *name ) - : kMyMoneyGPGConfigDecl(parent, name), +kMyMoneyGPGConfig::kMyMoneyGPGConfig(TQWidget *tqparent, const char *name ) + : kMyMoneyGPGConfigDecl(tqparent, name), m_checkCount(0) { m_idGroup->setEnabled(KGPGFile::GPGAvailable()); @@ -48,8 +48,8 @@ kMyMoneyGPGConfig::kMyMoneyGPGConfig(QWidget *parent, const char *name ) m_userKeyFound->off(); m_recoverKeyFound->off(); - connect(m_useEncryption, SIGNAL(toggled(bool)), this, SLOT(slotStatusChanged(bool))); - connect(m_userId, SIGNAL(textChanged(const QString&)), this, SLOT(slotIdChanged(const QString&))); + connect(m_useEncryption, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotStatusChanged(bool))); + connect(m_userId, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotIdChanged(const TQString&))); } void kMyMoneyGPGConfig::resetConfig(void) @@ -81,7 +81,7 @@ void kMyMoneyGPGConfig::writeConfig(void) config->writeEntry("GPG-Recipient", m_userId->text()); } -void kMyMoneyGPGConfig::slotIdChanged(const QString& /*txt*/) +void kMyMoneyGPGConfig::slotIdChanged(const TQString& /*txt*/) { // this looks a bit awkward. Here's why: KGPGFile::keyAvailable() starts // an external task and processes UI events while it waits for the external diff --git a/kmymoney2/widgets/kmymoneygpgconfig.h b/kmymoney2/widgets/kmymoneygpgconfig.h index 9d2bdc7..b66c941 100644 --- a/kmymoney2/widgets/kmymoneygpgconfig.h +++ b/kmymoney2/widgets/kmymoneygpgconfig.h @@ -40,8 +40,9 @@ class kMyMoneyGPGConfig : public kMyMoneyGPGConfigDecl { Q_OBJECT + TQ_OBJECT public: - kMyMoneyGPGConfig(QWidget* parent, const char *name); + kMyMoneyGPGConfig(TQWidget* tqparent, const char *name); virtual ~kMyMoneyGPGConfig() {} void writeConfig(void); @@ -49,11 +50,11 @@ public: void resetConfig(void); protected slots: - void slotIdChanged(const QString& txt); + void slotIdChanged(const TQString& txt); void slotStatusChanged(bool); private: - QString m_resetUserId; + TQString m_resetUserId; bool m_resetUseEncryption; bool m_resetRecover; int m_checkCount; diff --git a/kmymoney2/widgets/kmymoneygpgconfigdecl.ui b/kmymoney2/widgets/kmymoneygpgconfigdecl.ui index 4aa12eb..aeb9224 100644 --- a/kmymoney2/widgets/kmymoneygpgconfigdecl.ui +++ b/kmymoney2/widgets/kmymoneygpgconfigdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kMyMoneyGPGConfigDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyGPGConfigDecl</cstring> </property> @@ -24,7 +24,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_useEncryption</cstring> </property> @@ -32,7 +32,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <string>Use GPG encryption</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_idGroup</cstring> </property> @@ -43,7 +43,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -53,19 +53,19 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -96,7 +96,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece </widget> </vbox> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_recoveryGroup</cstring> </property> @@ -107,15 +107,15 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_recover</cstring> </property> @@ -133,7 +133,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> @@ -156,7 +156,7 @@ The <i>Recovery encryption</i> group is only accessible, if the nece </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -168,7 +168,7 @@ This mechanism is provided for the case that you have lost your key and cannot a <property name="textFormat"> <enum>RichText</enum> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> @@ -184,7 +184,7 @@ This mechanism is provided for the case that you have lost your key and cannot a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>16</height> @@ -193,5 +193,5 @@ This mechanism is provided for the case that you have lost your key and cannot a </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneylineedit.cpp b/kmymoney2/widgets/kmymoneylineedit.cpp index 18e2e31..2250c30 100644 --- a/kmymoney2/widgets/kmymoneylineedit.cpp +++ b/kmymoney2/widgets/kmymoneylineedit.cpp @@ -20,9 +20,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qrect.h> -#include <qpainter.h> -#include <qpalette.h> +#include <tqrect.h> +#include <tqpainter.h> +#include <tqpalette.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -35,11 +35,11 @@ #include "kmymoneylineedit.h" -kMyMoneyLineEdit::kMyMoneyLineEdit(QWidget *w, const char* name, bool forceMonetaryDecimalSymbol, int alignment) : +kMyMoneyLineEdit::kMyMoneyLineEdit(TQWidget *w, const char* name, bool forceMonetaryDecimalSymbol, int tqalignment) : KLineEdit(w, name), m_forceMonetaryDecimalSymbol(forceMonetaryDecimalSymbol) { - setAlignment(alignment); + tqsetAlignment(tqalignment); } kMyMoneyLineEdit::~kMyMoneyLineEdit() @@ -51,13 +51,13 @@ void kMyMoneyLineEdit::resetText(void) setText(m_text); } -void kMyMoneyLineEdit::loadText(const QString& text) +void kMyMoneyLineEdit::loadText(const TQString& text) { m_text = text; setText(text); } -void kMyMoneyLineEdit::focusOutEvent(QFocusEvent *ev) +void kMyMoneyLineEdit::focusOutEvent(TQFocusEvent *ev) { // if the current text is not in the list of // possible completions, we have a new payee @@ -69,24 +69,24 @@ void kMyMoneyLineEdit::focusOutEvent(QFocusEvent *ev) // force update of hint if(text().isEmpty()) - repaint(); + tqrepaint(); } -void kMyMoneyLineEdit::keyReleaseEvent(QKeyEvent* k) +void kMyMoneyLineEdit::keyReleaseEvent(TQKeyEvent* k) { if(m_forceMonetaryDecimalSymbol) { - if(k->state() & Qt::Keypad) { - if(k->key() == Qt::Key_Comma - || k->key() == Qt::Key_Period) { + if(k->state() & TQt::Keypad) { + if(k->key() == TQt::Key_Comma + || k->key() == TQt::Key_Period) { if(KGlobal::locale()->monetaryDecimalSymbol() == ",") { - QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count()); + TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count()); KLineEdit::keyReleaseEvent(&newk); k->ignore(); return; } if(KGlobal::locale()->monetaryDecimalSymbol() == ".") { - QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ".", k->isAutoRepeat(), k->count()); + TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ".", k->isAutoRepeat(), k->count()); KLineEdit::keyReleaseEvent(&newk); k->ignore(); return; @@ -97,21 +97,21 @@ void kMyMoneyLineEdit::keyReleaseEvent(QKeyEvent* k) KLineEdit::keyReleaseEvent(k); } -void kMyMoneyLineEdit::keyPressEvent(QKeyEvent* k) +void kMyMoneyLineEdit::keyPressEvent(TQKeyEvent* k) { if(m_forceMonetaryDecimalSymbol) { - if(k->state() & Qt::Keypad) { - if(k->key() == Qt::Key_Comma - || k->key() == Qt::Key_Period) { + if(k->state() & TQt::Keypad) { + if(k->key() == TQt::Key_Comma + || k->key() == TQt::Key_Period) { if(KGlobal::locale()->monetaryDecimalSymbol() == ",") { - QKeyEvent newk(k->type(), Qt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count()); + TQKeyEvent newk(k->type(), TQt::Key_Comma, ',', k->state(), ",", k->isAutoRepeat(), k->count()); KLineEdit::keyPressEvent(&newk); k->ignore(); return; } if(KGlobal::locale()->monetaryDecimalSymbol() == ".") { - QKeyEvent newk(k->type(), Qt::Key_Period, '.', k->state(), ".", k->isAutoRepeat(), k->count()); + TQKeyEvent newk(k->type(), TQt::Key_Period, '.', k->state(), ".", k->isAutoRepeat(), k->count()); KLineEdit::keyPressEvent(&newk); k->ignore(); return; @@ -122,26 +122,26 @@ void kMyMoneyLineEdit::keyPressEvent(QKeyEvent* k) KLineEdit::keyPressEvent(k); } -void kMyMoneyLineEdit::drawContents( QPainter *p) +void kMyMoneyLineEdit::drawContents( TQPainter *p) { KLineEdit::drawContents(p); if(text().isEmpty() && !m_hint.isEmpty() && !hasFocus()) { const int innerMargin = 1; - // the following 5 lines are taken from QLineEdit::drawContents() - QRect cr = contentsRect(); - QFontMetrics fm = fontMetrics(); - QRect lineRect( cr.x() + innerMargin, cr.y() + (cr.height() - fm.height() + 1) / 2, + // the following 5 lines are taken from TQLineEdit::drawContents() + TQRect cr = contentsRect(); + TQFontMetrics fm = fontMetrics(); + TQRect lineRect( cr.x() + innerMargin, cr.y() + (cr.height() - fm.height() + 1) / 2, cr.width() - 2*innerMargin, fm.height() ); - QPoint topLeft = lineRect.topLeft() - QPoint(0, -fm.ascent()); + TQPoint topLeft = lineRect.topLeft() - TQPoint(0, -fm.ascent()); p->save(); - QFont f = p->font(); + TQFont f = p->font(); f.setItalic(true); - f.setWeight(QFont::Light); + f.setWeight(TQFont::Light); p->setFont(f); - p->setPen(palette().disabled().text()); + p->setPen(tqpalette().disabled().text()); p->drawText(topLeft, m_hint); diff --git a/kmymoney2/widgets/kmymoneylineedit.h b/kmymoney2/widgets/kmymoneylineedit.h index 2351082..f92bd08 100644 --- a/kmymoney2/widgets/kmymoneylineedit.h +++ b/kmymoney2/widgets/kmymoneylineedit.h @@ -45,16 +45,17 @@ class kMyMoneyLineEdit : public KLineEdit { Q_OBJECT + TQ_OBJECT public: /** - * @param w pointer to parent + * @param w pointer to tqparent * @param name pointer to name of object * @param forceMonetaryDecimalSymbol if @a true, the numeric keypad comma key will have a fixed - * value and does not follow the keyboard layout (default: @p false) - * @param alignment Controls the alignment of the text. Default is Qt::AlignLeft | Qt::AlignVCenter. - * See Qt::AlignmentFlags for other possible values. + * value and does not follow the keyboard tqlayout (default: @p false) + * @param tqalignment Controls the tqalignment of the text. Default is TQt::AlignLeft | TQt::AlignVCenter. + * See TQt::AlignmentFlags for other possible values. */ - kMyMoneyLineEdit(QWidget *w = 0, const char* name = 0, bool forceMonetaryDecimalSymbol = false, int alignment = (AlignLeft | AlignVCenter)); + kMyMoneyLineEdit(TQWidget *w = 0, const char* name = 0, bool forceMonetaryDecimalSymbol = false, int tqalignment = (AlignLeft | AlignVCenter)); ~kMyMoneyLineEdit(); /** @@ -66,50 +67,50 @@ public: /** * This method is used to turn on/off the hint display */ - void setHint(const QString& hint) { m_hint = hint; }; + void setHint(const TQString& hint) { m_hint = hint; }; public slots: - void loadText(const QString& text); + void loadText(const TQString& text); signals: /** * This signal is emitted when the focus leaves the object and the text * has been changed. The new text is passed as @a str. */ - void lineChanged(const QString& str); + void lineChanged(const TQString& str); protected: - void focusOutEvent(QFocusEvent *ev); + void focusOutEvent(TQFocusEvent *ev); /** reimplemented to support the hint display */ - void drawContents( QPainter *); + void drawContents( TQPainter *); /** * Overridden so that the period key on the numeric keypad always sends * out the currently selected monetary decimal symbol instead of the * key defined by the keymap. * - * Example: If you have set the keymap (keyboard layout) as English, then + * Example: If you have set the keymap (keyboard tqlayout) as English, then * the numeric keypad will send a period but if you have set the keymap to * be German, the same key will send a comma. * - * @param ev pointer to current QKeyEvent + * @param ev pointer to current TQKeyEvent */ - void keyPressEvent(QKeyEvent* ev); + void keyPressEvent(TQKeyEvent* ev); /** * Overridden so that the period key on the numeric keypad always sends * out the currently selected monetary decimal symbol instead of the * key defined by the keymap. * - * Example: If you have set the keymap (keyboard layout) as English, then + * Example: If you have set the keymap (keyboard tqlayout) as English, then * the numeric keypad will send a period but if you have set the keymap to * be German, the same key will send a comma. * - * @param ev pointer to current QKeyEvent + * @param ev pointer to current TQKeyEvent */ - void keyReleaseEvent(QKeyEvent* ev); + void keyReleaseEvent(TQKeyEvent* ev); private: /** @@ -118,12 +119,12 @@ private: * and as comparison during focusOutEvent() to emit the lineChanged * signal if the current text is different. */ - QString m_text; + TQString m_text; /** * This member tells what to display as hint as long as the field is empty */ - QString m_hint; + TQString m_hint; /** * This member keeps the status if overriding the numeric keypad comma key diff --git a/kmymoney2/widgets/kmymoneylistviewitem.cpp b/kmymoney2/widgets/kmymoneylistviewitem.cpp index 26367ad..d85fe77 100644 --- a/kmymoney2/widgets/kmymoneylistviewitem.cpp +++ b/kmymoney2/widgets/kmymoneylistviewitem.cpp @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpalette.h> +#include <tqpalette.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -35,8 +35,8 @@ #include "kmymoneychecklistitem.h" #include "../kmymoneyglobalsettings.h" -KMyMoneyListViewItem::KMyMoneyListViewItem(QListView* parent, const QString& txt, const QString& key, const QString& id) : - KListViewItem(parent, txt), +KMyMoneyListViewItem::KMyMoneyListViewItem(TQListView* tqparent, const TQString& txt, const TQString& key, const TQString& id) : + KListViewItem(tqparent, txt), m_key(key), m_id(id), m_isOdd(0), @@ -46,8 +46,8 @@ KMyMoneyListViewItem::KMyMoneyListViewItem(QListView* parent, const QString& txt m_key = txt; } -KMyMoneyListViewItem::KMyMoneyListViewItem(QListViewItem* parent, const QString& txt, const QString& key, const QString& id) : - KListViewItem(parent, txt), +KMyMoneyListViewItem::KMyMoneyListViewItem(TQListViewItem* tqparent, const TQString& txt, const TQString& key, const TQString& id) : + KListViewItem(tqparent, txt), m_key(key), m_id(id), m_isOdd(0), @@ -61,7 +61,7 @@ KMyMoneyListViewItem::~KMyMoneyListViewItem() { } -QString KMyMoneyListViewItem::key(int column, bool ascending) const +TQString KMyMoneyListViewItem::key(int column, bool ascending) const { Q_UNUSED(ascending); @@ -71,18 +71,18 @@ QString KMyMoneyListViewItem::key(int column, bool ascending) const } -void KMyMoneyListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KMyMoneyListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg = cg; - _cg.setColor(QColorGroup::Base, backgroundColor()); + TQColorGroup _cg = cg; + _cg.setColor(TQColorGroup::Base, backgroundColor()); // make sure to bypass KListViewItem::paintCell() as // we don't like it's logic - that's why we do this // here ;-) (ipwizard) - QListViewItem::paintCell(p, _cg, column, width, alignment); + TQListViewItem::paintCell(p, _cg, column, width, tqalignment); } -const QColor KMyMoneyListViewItem::backgroundColor() +const TQColor KMyMoneyListViewItem::backgroundColor() { return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor(); } @@ -102,15 +102,15 @@ bool KMyMoneyListViewItem::isAlternate(void) KMyMoneyCheckListItem* clItem; KMyMoneyListViewItem* liItem; bool previous = true; - if(QListViewItem::parent()) { - clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()); - liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()); + if(TQListViewItem::tqparent()) { + clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()); + liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()); if(clItem) previous = clItem->m_isOdd; else previous = liItem->m_isOdd; - clItem = dynamic_cast<KMyMoneyCheckListItem *>(QListViewItem::parent()->firstChild()); - liItem = dynamic_cast<KMyMoneyListViewItem*>(QListViewItem::parent()->firstChild()); + clItem = dynamic_cast<KMyMoneyCheckListItem *>(TQListViewItem::tqparent()->firstChild()); + liItem = dynamic_cast<KMyMoneyListViewItem*>(TQListViewItem::tqparent()->firstChild()); } else { clItem = dynamic_cast<KMyMoneyCheckListItem *>(listView()->firstChild()); liItem = dynamic_cast<KMyMoneyListViewItem*>(listView()->firstChild()); diff --git a/kmymoney2/widgets/kmymoneylistviewitem.h b/kmymoney2/widgets/kmymoneylistviewitem.h index 64f7562..4009aef 100644 --- a/kmymoney2/widgets/kmymoneylistviewitem.h +++ b/kmymoney2/widgets/kmymoneylistviewitem.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> +#include <tqobject.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -34,32 +34,33 @@ class KMyMoneyCheckListItem; /** - * This class implements a derived version of a QListViewItem that + * This class implements a derived version of a TQListViewItem that * allows the storage of an engine object id with the object * * @author Thomas Baumgart */ -class KMyMoneyListViewItem : public QObject, public KListViewItem +class KMyMoneyListViewItem : public TQObject, public KListViewItem { friend class KMyMoneyCheckListItem; Q_OBJECT + TQ_OBJECT public: - KMyMoneyListViewItem(QListView *parent, const QString& txt, const QString& key, const QString& id); - KMyMoneyListViewItem(QListViewItem *parent, const QString& txt, const QString& key, const QString& id); + KMyMoneyListViewItem(TQListView *tqparent, const TQString& txt, const TQString& key, const TQString& id); + KMyMoneyListViewItem(TQListViewItem *tqparent, const TQString& txt, const TQString& key, const TQString& id); ~KMyMoneyListViewItem(); - const QString& id(void) const { return m_id; }; + const TQString& id(void) const { return m_id; }; /** * use my own paint method */ - void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment); + void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment); /** * use my own backgroundColor method */ - const QColor backgroundColor(); + const TQColor backgroundColor(); /** * This method returns a const reference to the key passed to the constructor. The column @@ -67,7 +68,7 @@ public: * the constructor concatenated with the value returned by text(0) is returned. For @a column * equals to 1, the @a key as passed to the constructor except the first character is returned. */ - QString key(int column, bool ascending) const; + TQString key(int column, bool ascending) const; /** @@ -76,8 +77,8 @@ public: bool isAlternate(void); private: - QString m_key; - QString m_id; + TQString m_key; + TQString m_id; // copied from KListViewItem() unsigned int m_isOdd : 1; unsigned int m_isKnown : 1; diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp index 125cc13..6704c9c 100644 --- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp +++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregexp.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -38,11 +38,11 @@ #include "kmymoneyonlinequoteconfig.h" #include "../converter/webpricequote.h" -kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char *name ) - : kMyMoneyOnlineQuoteConfigDecl(parent, name) +kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(TQWidget *tqparent, const char *name ) + : kMyMoneyOnlineQuoteConfigDecl(tqparent, name) { #if 1 - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList groups = WebPriceQuote::quoteSources(); loadList(true /*updateResetList*/); @@ -50,35 +50,35 @@ kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char KIconLoader* il = KGlobal::iconLoader(); KGuiItem updateButtenItem( i18n("&Update" ), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it"), i18n("Use this to accept the modified data.")); m_updateButton->setGuiItem(updateButtenItem); KGuiItem deleteButtenItem( i18n( "&Delete" ), - QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete the selected source entry"), i18n("Use this to delete the selected online source entry")); m_deleteButton->setGuiItem(deleteButtenItem); KGuiItem newButtenItem( i18n( "&New..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new source entry for online quotes"), i18n("Use this to create a new entry for online quotes")); m_newButton->setGuiItem(newButtenItem); - connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdateEntry())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewEntry())); + connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdateEntry())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewEntry())); - connect(m_quoteSourceList, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*))); - connect(m_quoteSourceList, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotLoadWidgets(QListViewItem*))); - connect(m_quoteSourceList, SIGNAL(itemRenamed(QListViewItem*,const QString&,int)), this, SLOT(slotEntryRenamed(QListViewItem*,const QString&,int))); + connect(m_quoteSourceList, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*))); + connect(m_quoteSourceList, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotLoadWidgets(TQListViewItem*))); + connect(m_quoteSourceList, TQT_SIGNAL(itemRenamed(TQListViewItem*,const TQString&,int)), this, TQT_SLOT(slotEntryRenamed(TQListViewItem*,const TQString&,int))); - connect(m_editURL, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editSymbol, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editDate, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editDateFormat, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); - connect(m_editPrice, SIGNAL(textChanged(const QString&)), this, SLOT(slotEntryChanged())); + connect(m_editURL, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editSymbol, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editDate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editDateFormat, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); + connect(m_editPrice, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotEntryChanged())); // FIXME deleting a source is not yet implemented m_deleteButton->setEnabled(false); @@ -87,30 +87,30 @@ kMyMoneyOnlineQuoteConfig::kMyMoneyOnlineQuoteConfig(QWidget *parent, const char void kMyMoneyOnlineQuoteConfig::loadList(const bool updateResetList) { - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList groups = WebPriceQuote::quoteSources(); if(updateResetList) m_resetList.clear(); m_quoteSourceList->clear(); - QStringList::Iterator it; + TQStringList::Iterator it; for(it = groups.begin(); it != groups.end(); ++it) { - new QListViewItem(m_quoteSourceList, *it); + new TQListViewItem(m_quoteSourceList, *it); if(updateResetList) m_resetList += WebPriceQuoteSource(*it); } - QListViewItem* first = m_quoteSourceList->firstChild(); + TQListViewItem* first = m_quoteSourceList->firstChild(); if(first) m_quoteSourceList->setSelected(first, true); slotLoadWidgets(first); - m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); } void kMyMoneyOnlineQuoteConfig::resetConfig(void) { - QStringList::ConstIterator it; - QStringList groups = WebPriceQuote::quoteSources(); + TQStringList::ConstIterator it; + TQStringList groups = WebPriceQuote::quoteSources(); // delete all currently defined entries for(it = groups.begin(); it != groups.end(); ++it) { @@ -118,7 +118,7 @@ void kMyMoneyOnlineQuoteConfig::resetConfig(void) } // and write back the one's from the reset list - QValueList<WebPriceQuoteSource>::ConstIterator itr; + TQValueList<WebPriceQuoteSource>::ConstIterator itr; for(itr = m_resetList.begin(); itr != m_resetList.end(); ++itr) { (*itr).write(); } @@ -126,17 +126,17 @@ void kMyMoneyOnlineQuoteConfig::resetConfig(void) loadList(); } -void kMyMoneyOnlineQuoteConfig::slotLoadWidgets(QListViewItem* item) +void kMyMoneyOnlineQuoteConfig::slotLoadWidgets(TQListViewItem* item) { m_editURL->setEnabled(true); m_editSymbol->setEnabled(true); m_editPrice->setEnabled(true); m_editDate->setEnabled(true); - m_editURL->setText(QString()); - m_editSymbol->setText(QString()); - m_editPrice->setText(QString()); - m_editDate->setText(QString()); - m_editDateFormat->setText(QString()); + m_editURL->setText(TQString()); + m_editSymbol->setText(TQString()); + m_editPrice->setText(TQString()); + m_editDate->setText(TQString()); + m_editDateFormat->setText(TQString()); if(item) { m_currentItem = WebPriceQuoteSource(item->text(0)); @@ -185,17 +185,17 @@ void kMyMoneyOnlineQuoteConfig::slotNewEntry(void) WebPriceQuoteSource newSource(i18n("New Quote Source")); newSource.write(); loadList(); - QListViewItem* item = m_quoteSourceList->findItem(i18n("New Quote Source"), 0); + TQListViewItem* item = m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0); if(item) { m_quoteSourceList->setSelected(item, true); slotLoadWidgets(item); } } -void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(QListViewItem* item, const QString& text, int /* col */) +void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(TQListViewItem* item, const TQString& text, int /* col */) { int nameCount = 0; - QListViewItemIterator it(m_quoteSourceList); + TQListViewItemIterator it(m_quoteSourceList); while(it.current()) { if(it.current()->text(0) == text) ++nameCount; @@ -208,7 +208,7 @@ void kMyMoneyOnlineQuoteConfig::slotEntryRenamed(QListViewItem* item, const QStr } else { item->setText(0, m_currentItem.m_name); } - m_newButton->setEnabled(m_quoteSourceList->findItem(i18n("New Quote Source"), 0) == 0); + m_newButton->setEnabled(m_quoteSourceList->tqfindItem(i18n("New Quote Source"), 0) == 0); } #include "kmymoneyonlinequoteconfig.moc" diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfig.h b/kmymoney2/widgets/kmymoneyonlinequoteconfig.h index f00cbdb..6a7a02c 100644 --- a/kmymoney2/widgets/kmymoneyonlinequoteconfig.h +++ b/kmymoney2/widgets/kmymoneyonlinequoteconfig.h @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#ifndef KMYMONEYONLINEQUOTECONFIG_H -#define KMYMONEYONLINEQUOTECONFIG_H +#ifndef KMYMONEYONLINETQUOTECONFIG_H +#define KMYMONEYONLINETQUOTECONFIG_H // ---------------------------------------------------------------------------- // QT Includes @@ -33,8 +33,9 @@ class kMyMoneyOnlineQuoteConfig : public kMyMoneyOnlineQuoteConfigDecl { Q_OBJECT + TQ_OBJECT public: - kMyMoneyOnlineQuoteConfig(QWidget* parent, const char *name); + kMyMoneyOnlineQuoteConfig(TQWidget* tqparent, const char *name); virtual ~kMyMoneyOnlineQuoteConfig() {} void writeConfig(void) {} @@ -43,16 +44,16 @@ public: protected slots: void slotUpdateEntry(void); - void slotLoadWidgets(QListViewItem* item); + void slotLoadWidgets(TQListViewItem* item); void slotEntryChanged(void); void slotNewEntry(void); - void slotEntryRenamed(QListViewItem* item, const QString& text, int col); + void slotEntryRenamed(TQListViewItem* item, const TQString& text, int col); protected: void loadList(const bool updateResetList = false); private: - QValueList<WebPriceQuoteSource> m_resetList; + TQValueList<WebPriceQuoteSource> m_resetList; WebPriceQuoteSource m_currentItem; }; diff --git a/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui b/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui index 0131edd..fcd6250 100644 --- a/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui +++ b/kmymoney2/widgets/kmymoneyonlinequoteconfigdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kMyMoneyOnlineQuoteConfigDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyOnlineQuoteConfigDecl</cstring> </property> @@ -12,7 +12,7 @@ <height>487</height> </rect> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -58,7 +58,7 @@ <bool>true</bool> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>groupParsing</cstring> </property> @@ -69,15 +69,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -85,7 +85,7 @@ <string>Date</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -128,7 +128,7 @@ <string>Enter the URL from which stock quotes will be fetched. <b>%1</b> will be replaced with the symbol for the security being quoted. For currency conversions, <b>%2</b> will be replaced with the currency to be quoted and <b>%1</b> with the currency the quote is based on.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -144,7 +144,7 @@ <string>Regular Expression to extract the date from the downloaded data</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -152,7 +152,7 @@ <string>Date Format</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -162,7 +162,7 @@ </widget> </grid> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -172,9 +172,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout15</cstring> + <cstring>tqlayout15</cstring> </property> <hbox> <property name="name"> @@ -206,7 +206,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>240</width> <height>20</height> @@ -227,5 +227,5 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneypriceview.cpp b/kmymoney2/widgets/kmymoneypriceview.cpp index 1b884d2..d1b5c85 100644 --- a/kmymoney2/widgets/kmymoneypriceview.cpp +++ b/kmymoney2/widgets/kmymoneypriceview.cpp @@ -23,11 +23,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qheader.h> -#include <qcursor.h> -#include <qtimer.h> -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <tqheader.h> +#include <tqcursor.h> +#include <tqtimer.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,7 +62,7 @@ #define SOURCE_COL 4 KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) : - KMyMoneyListViewItem(view, QString(), QString(), QString()), + KMyMoneyListViewItem(view, TQString(), TQString(), TQString()), m_pr(pr) { MyMoneySecurity from, to; @@ -74,7 +74,7 @@ KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) : m_pr = MyMoneyFile::instance()->price(m_pr.from(), m_pr.to(), m_pr.date()); if(m_pr.isValid()) { - QString priceBase = m_pr.to(); + TQString priceBase = m_pr.to(); from = MyMoneyFile::instance()->security(m_pr.from()); to = MyMoneyFile::instance()->security(m_pr.to()); if(!to.isCurrency()) { @@ -91,7 +91,7 @@ KMyMoneyPriceItem::KMyMoneyPriceItem(KListView *view, const MyMoneyPrice& pr) : } } -int KMyMoneyPriceItem::compare(QListViewItem* i, int col, bool ascending) const +int KMyMoneyPriceItem::compare(TQListViewItem* i, int col, bool ascending) const { KMyMoneyPriceItem* item = static_cast<KMyMoneyPriceItem*>(i); int rc = 0; @@ -105,21 +105,21 @@ int KMyMoneyPriceItem::compare(QListViewItem* i, int col, bool ascending) const break; case PRICE_COL: // value - if(m_pr.rate(QString()) > item->m_pr.rate(QString())) + if(m_pr.rate(TQString()) > item->m_pr.rate(TQString())) rc = 1; - else if(m_pr.rate(QString()) < item->m_pr.rate(QString())) + else if(m_pr.rate(TQString()) < item->m_pr.rate(TQString())) rc = -1; break; default: - rc = QListViewItem::compare(i, col, ascending); + rc = TQListViewItem::compare(i, col, ascending); break; } return rc; } -KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) : - KListView(parent,name), +KMyMoneyPriceView::KMyMoneyPriceView(TQWidget *tqparent, const char *name ) : + KListView(tqparent,name), m_contextMenu(0), m_showAll(false) { @@ -130,8 +130,8 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) : addColumn(i18n("Source")); setAllColumnsShowFocus(true); setMultiSelection(false); - setColumnWidthMode(0, QListView::Maximum); - setColumnWidthMode(1, QListView::Maximum); + setColumnWidthMode(0, TQListView::Maximum); + setColumnWidthMode(1, TQListView::Maximum); setShowSortIndicator(true); setSorting(COMMODITY_COL); @@ -143,24 +143,24 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) : m_contextMenu->insertTitle(i18n("Price Options")); m_contextMenu->insertItem(kiconloader->loadIcon("filenew", KIcon::Small), i18n("New..."), - this, SIGNAL(newPrice())); + this, TQT_SIGNAL(newPrice())); m_contextMenu->insertItem(kiconloader->loadIcon("edit", KIcon::Small), i18n("Edit..."), - this, SIGNAL(editPrice())); + this, TQT_SIGNAL(editPrice())); m_contextMenu->insertItem(kiconloader->loadIcon("connect_creating", KIcon::Small), i18n("Online Price Update..."), - this, SIGNAL(onlinePriceUpdate())); + this, TQT_SIGNAL(onlinePriceUpdate())); m_contextMenu->insertItem(kiconloader->loadIcon("delete", KIcon::Small), i18n("Delete..."), - this, SIGNAL(deletePrice())); + this, TQT_SIGNAL(deletePrice())); - connect(this, SIGNAL(rightButtonClicked(QListViewItem* , const QPoint&, int)), - this, SLOT(slotListClicked(QListViewItem*, const QPoint&, int))); + connect(this, TQT_SIGNAL(rightButtonClicked(TQListViewItem* , const TQPoint&, int)), + this, TQT_SLOT(slotListClicked(TQListViewItem*, const TQPoint&, int))); - // connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotReloadWidget())); + // connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotReloadWidget())); // slotReloadWidget(); @@ -169,7 +169,7 @@ KMyMoneyPriceView::KMyMoneyPriceView(QWidget *parent, const char *name ) : // way to solve this problem is to postpone the setup of the size // to the time when the widget is on the screen. resize(width()-1, height()-1); - QTimer::singleShot(50, this, SLOT(slotTimerDone())); + TQTimer::singleShot(50, this, TQT_SLOT(slotTimerDone())); } KMyMoneyPriceView::~KMyMoneyPriceView() @@ -209,7 +209,7 @@ void KMyMoneyPriceView::slotReloadWidget(void) } #endif -void KMyMoneyPriceView::resizeEvent(QResizeEvent* e) +void KMyMoneyPriceView::resizeEvent(TQResizeEvent* e) { int w = visibleWidth()/5; @@ -223,7 +223,7 @@ void KMyMoneyPriceView::resizeEvent(QResizeEvent* e) KListView::resizeEvent(e); } -void KMyMoneyPriceView::slotListClicked(QListViewItem* item, const QPoint&, int) +void KMyMoneyPriceView::slotListClicked(TQListViewItem* item, const TQPoint&, int) { int editId = m_contextMenu->idAt(2); int updateId = m_contextMenu->idAt(3); @@ -248,7 +248,7 @@ void KMyMoneyPriceView::slotListClicked(QListViewItem* item, const QPoint&, int) else m_contextMenu->setItemEnabled(updateId, false ); - m_contextMenu->exec(QCursor::pos()); + m_contextMenu->exec(TQCursor::pos()); } #if 0 @@ -269,7 +269,7 @@ void KMyMoneyPriceView::slotNewPrice(void) m_priceHistory->setSelected(p, true); // If the user cancels the following operation, we delete the new item // and re-select any previously selected one - if(slotEditPrice() == QDialog::Rejected) { + if(slotEditPrice() == TQDialog::Rejected) { delete p; if(item) m_priceHistory->setSelected(item, true); @@ -279,7 +279,7 @@ void KMyMoneyPriceView::slotNewPrice(void) int KMyMoneyPriceView::slotEditPrice(void) { - int rc = QDialog::Rejected; + int rc = TQDialog::Rejected; kMyMoneyPriceItem* item = dynamic_cast<kMyMoneyPriceItem*>(m_priceHistory->selectedItem()); if(item) { MyMoneySecurity from(MyMoneyFile::instance()->security(item->price().from())); @@ -333,7 +333,7 @@ void KMyMoneyPriceView::slotOnlinePriceUpdate(void) if(item) { KEquityPriceUpdateDlg dlg(this, (item->text(COMMODITY_COL)+" "+item->text(CURRENCY_COL)).utf8()); - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) dlg.storePrices(); } } diff --git a/kmymoney2/widgets/kmymoneypriceview.h b/kmymoney2/widgets/kmymoneypriceview.h index 56907ac..0de47ef 100644 --- a/kmymoney2/widgets/kmymoneypriceview.h +++ b/kmymoney2/widgets/kmymoneypriceview.h @@ -21,8 +21,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -// class QListViewItem; +#include <tqwidget.h> +// class TQListViewItem; // ---------------------------------------------------------------------------- // KDE Includes @@ -47,7 +47,7 @@ public: KMyMoneyPriceItem(KListView *, const MyMoneyPrice& pr); ~KMyMoneyPriceItem() {} - int compare(QListViewItem *p, int col, bool ascending) const; + int compare(TQListViewItem *p, int col, bool ascending) const; const MyMoneyPrice& price(void) const { return m_pr; }; @@ -59,16 +59,17 @@ private: class KMyMoneyPriceView : public KListView { Q_OBJECT + TQ_OBJECT public: - KMyMoneyPriceView(QWidget *parent=0, const char *name=0); + KMyMoneyPriceView(TQWidget *tqparent=0, const char *name=0); ~KMyMoneyPriceView(); protected: /// the resize event - virtual void resizeEvent(QResizeEvent*); + virtual void resizeEvent(TQResizeEvent*); protected slots: - void slotListClicked(QListViewItem* item, const QPoint&, int); + void slotListClicked(TQListViewItem* item, const TQPoint&, int); private slots: void slotTimerDone(void); diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui index 0d94537..a744590 100644 --- a/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui +++ b/kmymoney2/widgets/kmymoneyreportconfigtab1decl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kMyMoneyReportConfigTab1Decl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyReportConfigTab1Decl</cstring> </property> @@ -25,15 +25,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout35</cstring> + <cstring>tqlayout35</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -41,7 +41,7 @@ <string>Report Name</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_editName</cstring> </property> @@ -51,15 +51,15 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout36</cstring> + <cstring>tqlayout36</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -67,7 +67,7 @@ <string>Comment</string> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>m_editComment</cstring> </property> @@ -77,7 +77,7 @@ </widget> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkCurrency</cstring> </property> @@ -89,7 +89,7 @@ <comment>Convert 'em!!</comment> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkFavorite</cstring> </property> @@ -110,7 +110,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -119,5 +119,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui index 1ad7cf0..ac0c5f3 100644 --- a/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui +++ b/kmymoney2/widgets/kmymoneyreportconfigtab2decl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>kMyMoneyReportConfigTab2Decl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyReportConfigTab2Decl</cstring> </property> @@ -25,23 +25,23 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -49,7 +49,7 @@ <string>Detail</string> </property> </widget> - <widget class="QComboBox" row="3" column="1"> + <widget class="TQComboBox" row="3" column="1"> <item> <property name="text"> <string>All</string> @@ -77,7 +77,7 @@ <string><p>Choose what kind of accounts to display as the rows of this report.</p></string> </property> </widget> - <widget class="QFrame" row="0" column="2"> + <widget class="TQFrame" row="0" column="2"> <property name="name"> <cstring>m_budgetFrame</cstring> </property> @@ -97,7 +97,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -112,7 +112,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -120,7 +120,7 @@ <string>Columns</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <item> <property name="text"> <string>Daily</string> @@ -158,7 +158,7 @@ <string><p>Choose how large of a time period each column should encompass</p></string> </property> </widget> - <widget class="QComboBox" row="2" column="1"> + <widget class="TQComboBox" row="2" column="1"> <item> <property name="text"> <string>Income & Expenses</string> @@ -176,7 +176,7 @@ <string><p>Choose what kind of accounts to display as the rows of this report.</p></string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -184,7 +184,7 @@ <string>Rows</string> </property> </widget> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>m_checkTotalColumn</cstring> </property> @@ -195,7 +195,7 @@ <string>Show totals column</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -203,7 +203,7 @@ <string>Average days</string> </property> </widget> - <widget class="QSpinBox" row="4" column="1"> + <widget class="TQSpinBox" row="4" column="1"> <property name="name"> <cstring>m_movingAverageDays</cstring> </property> @@ -226,7 +226,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>94</width> <height>21</height> @@ -235,7 +235,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkScheduled</cstring> </property> @@ -243,7 +243,7 @@ <string>Include scheduled transactions</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkTransfers</cstring> </property> @@ -251,7 +251,7 @@ <string>Include transfers</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkUnused</cstring> </property> @@ -269,7 +269,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -278,5 +278,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui b/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui index 2284c1f..3a29c6e 100644 --- a/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui +++ b/kmymoney2/widgets/kmymoneyreportconfigtab3decl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>kMyMoneyReportConfigTab3Decl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyReportConfigTab3Decl</cstring> </property> @@ -33,15 +33,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -61,7 +61,7 @@ <string>Organize by:</string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Categories</string> @@ -125,7 +125,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>358</width> <height>16</height> @@ -134,15 +134,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QButtonGroup"> + <widget class="TQButtonGroup"> <property name="name"> <cstring>buttonGroup1</cstring> </property> @@ -170,11 +170,11 @@ <property name="spacing"> <number>2</number> </property> - <widget class="QCheckBox" row="1" column="1"> + <widget class="TQCheckBox" row="1" column="1"> <property name="name"> <cstring>m_checkMemo</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -187,7 +187,7 @@ <string><p>Select this option to show the Memo column</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="3"> + <widget class="TQCheckBox" row="0" column="3"> <property name="name"> <cstring>m_checkShares</cstring> </property> @@ -198,7 +198,7 @@ <string><p>Select this option to show the Shares column for investments</p></string> </property> </widget> - <widget class="QCheckBox" row="1" column="3"> + <widget class="TQCheckBox" row="1" column="3"> <property name="name"> <cstring>m_checkPrice</cstring> </property> @@ -209,7 +209,7 @@ <string><p>Select this option to show the Price column for investments</p></string> </property> </widget> - <widget class="QCheckBox" row="1" column="2"> + <widget class="TQCheckBox" row="1" column="2"> <property name="name"> <cstring>m_checkReconciled</cstring> </property> @@ -220,7 +220,7 @@ <string><p>Select this option to show the Reconciled column</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="2"> + <widget class="TQCheckBox" row="0" column="2"> <property name="name"> <cstring>m_checkAccount</cstring> </property> @@ -231,11 +231,11 @@ <string><p>Select this option to show the Account column</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_checkNumber</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -248,11 +248,11 @@ <string><p>Select this option to show the Number column</p></string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_checkPayee</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -265,11 +265,11 @@ <string><p>Select this option to show the Payee column</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>m_checkCategory</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -282,7 +282,7 @@ <string><p>Select this option to show the Category column</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="4"> + <widget class="TQCheckBox" row="0" column="4"> <property name="name"> <cstring>m_checkAction</cstring> </property> @@ -293,7 +293,7 @@ <string><p>Select this option to show the Action column</p></string> </property> </widget> - <widget class="QCheckBox" row="1" column="4"> + <widget class="TQCheckBox" row="1" column="4"> <property name="name"> <cstring>m_checkBalance</cstring> </property> @@ -316,7 +316,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>205</width> <height>20</height> @@ -325,15 +325,15 @@ </spacer> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox" row="2" column="0"> + <widget class="TQCheckBox" row="2" column="0"> <property name="name"> <cstring>m_checkLoans</cstring> </property> @@ -341,7 +341,7 @@ <string>Include only Loan accounts</string> </property> </widget> - <widget class="QCheckBox" row="1" column="0"> + <widget class="TQCheckBox" row="1" column="0"> <property name="name"> <cstring>m_checkInvestments</cstring> </property> @@ -352,7 +352,7 @@ <string><p>Check this box to include only those categories which have been marked to "Include on Tax Reports"</p></string> </property> </widget> - <widget class="QCheckBox" row="0" column="1"> + <widget class="TQCheckBox" row="0" column="1"> <property name="name"> <cstring>m_checkHideSplitDetails</cstring> </property> @@ -363,7 +363,7 @@ <string>Do not display the individual transactions that make up a split transaction</string> </property> </widget> - <widget class="QCheckBox" row="0" column="0"> + <widget class="TQCheckBox" row="0" column="0"> <property name="name"> <cstring>m_checkTax</cstring> </property> @@ -386,7 +386,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -433,5 +433,5 @@ <slot>setDisabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui b/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui index 2aa9126..07415f9 100644 --- a/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui +++ b/kmymoney2/widgets/kmymoneyreportconfigtabchartdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0"> <class>kMyMoneyReportConfigTabChartDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyReportConfigTabChartDecl</cstring> </property> @@ -25,15 +25,15 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -52,7 +52,7 @@ <string><p>Select what form you would like the chart to be drawn as.</p></string> </property> </widget> - <widget class="QComboBox"> + <widget class="TQComboBox"> <item> <property name="text"> <string>Line</string> @@ -92,7 +92,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>20</height> @@ -101,7 +101,7 @@ </spacer> </hbox> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkGridLines</cstring> </property> @@ -112,7 +112,7 @@ <string><p>Select this option to show horizontal and vertical grid lines on the chart.</p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkValues</cstring> </property> @@ -123,7 +123,7 @@ <string><p>Select this option to draw the numeric values for data points next to their plot location.</p></string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_checkShowChart</cstring> </property> @@ -134,15 +134,15 @@ <string><p>Select this option to cause the report to be shown as a chart when you first open the report. Otherwise, it will come up as a text report.</p></string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel6</cstring> </property> @@ -161,7 +161,7 @@ <string><p>Select what width should be used to draw the line on the chart</p></string> </property> </widget> - <widget class="QSpinBox"> + <widget class="TQSpinBox"> <property name="name"> <cstring>m_lineWidth</cstring> </property> @@ -182,7 +182,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>121</width> <height>20</height> @@ -201,7 +201,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -210,5 +210,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneyreportcontroldecl.ui b/kmymoney2/widgets/kmymoneyreportcontroldecl.ui index 2d0e0e3..697d0a8 100644 --- a/kmymoney2/widgets/kmymoneyreportcontroldecl.ui +++ b/kmymoney2/widgets/kmymoneyreportcontroldecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.0" stdsetdef="1"> <class>kMyMoneyReportControlDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kMyMoneyReportControlDecl</cstring> </property> @@ -25,11 +25,11 @@ <property name="spacing"> <number>1</number> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonChart</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -42,11 +42,11 @@ <string>Show the chart version of this report</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonConfigure</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -59,11 +59,11 @@ <string>Configure this report</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonNew</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -76,11 +76,11 @@ <string>Create a new report based on this one</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonCopy</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -93,11 +93,11 @@ <string>Copy this report to the clipboard</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonExport</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -110,11 +110,11 @@ <string>Export this report as an HTML or CSV file</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonDelete</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -127,11 +127,11 @@ <string>Permanently delete this report</string> </property> </widget> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>buttonClose</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>75</width> <height>0</height> @@ -146,5 +146,5 @@ </widget> </hbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp b/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp index 6c17a33..0e203cc 100644 --- a/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp +++ b/kmymoney2/widgets/kmymoneyscheduledcalendar.cpp @@ -22,8 +22,8 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qkeysequence.h> +#include <tqpushbutton.h> +#include <tqkeysequence.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,19 +36,19 @@ #include "../widgets/kmymoneyscheduledcalendar.h" #include "../mymoney/mymoneyfile.h" -kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(QWidget *parent, const char *name ) - : kMyMoneyCalendar(parent,name) +kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(TQWidget *tqparent, const char *name ) + : kMyMoneyCalendar(tqparent,name) { - QPushButton *pb1 = new QPushButton(i18n("Select Schedules"), this); + TQPushButton *pb1 = new TQPushButton(i18n("Select Schedules"), this); kpopupmenu = new KPopupMenu(this); kpopupmenu->setCheckable(true); kpopupmenu->insertItem(i18n("Bills"), 0); kpopupmenu->insertItem(i18n("Deposits"), 1); kpopupmenu->insertItem(i18n("Transfers"), 2); - kpopupmenu->connectItem(0, this, SLOT(slotSetViewBills())); - kpopupmenu->connectItem(1, this, SLOT(slotSetViewDeposits())); - kpopupmenu->connectItem(2, this, SLOT(slotSetViewTransfers())); + kpopupmenu->connectItem(0, this, TQT_SLOT(slotSetViewBills())); + kpopupmenu->connectItem(1, this, TQT_SLOT(slotSetViewDeposits())); + kpopupmenu->connectItem(2, this, TQT_SLOT(slotSetViewTransfers())); kpopupmenu->setItemChecked(0, true); kpopupmenu->setItemChecked(1, true); kpopupmenu->setItemChecked(2, true); @@ -59,12 +59,12 @@ kMyMoneyScheduledCalendar::kMyMoneyScheduledCalendar(QWidget *parent, const char setUserButton1(true, pb1); - init( QDate::currentDate() ); + init( TQDate::tqcurrentDate() ); - connect(m_scheduledDateTable, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)), - this, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&))); - connect(m_scheduledDateTable, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)), - this, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&))); + connect(m_scheduledDateTable, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)), + this, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&))); + connect(m_scheduledDateTable, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)), + this, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&))); } kMyMoneyScheduledCalendar::~kMyMoneyScheduledCalendar() diff --git a/kmymoney2/widgets/kmymoneyscheduledcalendar.h b/kmymoney2/widgets/kmymoneyscheduledcalendar.h index 1543b5a..b8e9096 100644 --- a/kmymoney2/widgets/kmymoneyscheduledcalendar.h +++ b/kmymoney2/widgets/kmymoneyscheduledcalendar.h @@ -49,12 +49,13 @@ class kMyMoneyDateTbl; **/ class kMyMoneyScheduledCalendar : public kMyMoneyCalendar { Q_OBJECT + TQ_OBJECT public: /** * Standard constructor. **/ - kMyMoneyScheduledCalendar(QWidget *parent=0, const char *name=0); + kMyMoneyScheduledCalendar(TQWidget *tqparent=0, const char *name=0); /** * Standard destructor. @@ -68,11 +69,11 @@ public: void refresh() { m_scheduledDateTable->refresh(); } - void setFilterAccounts(const QStringList& list) { m_scheduledDateTable->setFilterAccounts(list); } + void setFilterAccounts(const TQStringList& list) { m_scheduledDateTable->setFilterAccounts(list); } signals: - void enterClicked(const MyMoneySchedule&, const QDate&); - void skipClicked(const MyMoneySchedule&, const QDate&); + void enterClicked(const MyMoneySchedule&, const TQDate&); + void skipClicked(const MyMoneySchedule&, const TQDate&); protected slots: void slotSetViewBills(); diff --git a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp index 870abd5..6490b7f 100644 --- a/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp +++ b/kmymoney2/widgets/kmymoneyscheduleddatetbl.cpp @@ -42,13 +42,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qpen.h> -#include <qpainter.h> -#include <qdialog.h> -#include <qdrawutil.h> -#include <qcursor.h> -#include <qapplication.h> +#include <tqstring.h> +#include <tqpen.h> +#include <tqpainter.h> +#include <tqdialog.h> +#include <tqdrawutil.h> +#include <tqcursor.h> +#include <tqapplication.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,34 +62,34 @@ #include "kmymoneyscheduleddatetbl.h" #include "../mymoney/mymoneyfile.h" -kMyMoneyScheduledDateTbl::kMyMoneyScheduledDateTbl(QWidget *parent, QDate date_, const char* name, WFlags f ) - : kMyMoneyDateTbl(parent, date_, name, f), +kMyMoneyScheduledDateTbl::kMyMoneyScheduledDateTbl(TQWidget *tqparent, TQDate date_, const char* name, WFlags f ) + : kMyMoneyDateTbl(tqparent, date_, name, f), m_filterBills(false), m_filterDeposits(false), m_filterTransfers(false) { - connect(&briefWidget, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&)), this, SIGNAL(enterClicked(const MyMoneySchedule&, const QDate&))); - connect(&briefWidget, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&)), this, SIGNAL(skipClicked(const MyMoneySchedule&, const QDate&))); + connect(&briefWidget, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SIGNAL(enterClicked(const MyMoneySchedule&, const TQDate&))); + connect(&briefWidget, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&)), this, TQT_SIGNAL(skipClicked(const MyMoneySchedule&, const TQDate&))); } kMyMoneyScheduledDateTbl::~kMyMoneyScheduledDateTbl() { } -void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, int /*col*/, const QDate& theDate) +void kMyMoneyScheduledDateTbl::drawCellContents(TQPainter *painter, int /*row*/, int /*col*/, const TQDate& theDate) { - QRect rect; - QString text; + TQRect rect; + TQString text; int w=cellWidth(); int h=cellHeight(); - QPen pen; - QBrush brushBlue(KGlobalSettings::activeTitleColor()); - QBrush brushLightblue(KGlobalSettings::baseColor()); - QFont font=KGlobalSettings::generalFont(); + TQPen pen; + TQBrush brushBlue(KGlobalSettings::activeTitleColor()); + TQBrush brushLightblue(KGlobalSettings::baseColor()); + TQFont font=KGlobalSettings::generalFont(); MyMoneyFile *file = MyMoneyFile::instance(); // ----- font.setPointSize(fontsize); - QFont fontLarge(font); - QFont fontSmall(font); + TQFont fontLarge(font); + TQFont fontSmall(font); fontLarge.setPointSize(fontsize*2); fontSmall.setPointSize(fontsize-1); @@ -101,11 +101,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, if (theDate.month() != date.month()) { painter->setFont(fontSmall); - pen = lightGray; + pen = TQPen(lightGray); } else { - pen = gray; + pen = TQPen(gray); } if (theDate == date) @@ -114,11 +114,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, { // draw the currently selected date painter->setPen(KGlobalSettings::highlightColor()); painter->setBrush(KGlobalSettings::highlightColor()); - pen=white; + pen=TQPen(white); } else { painter->setPen(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor())); painter->setBrush(KGlobalSettings::calculateAlternateBackgroundColor(KGlobalSettings::highlightColor())); - pen=white; + pen=TQPen(white); } } else { painter->setBrush(KGlobalSettings::baseColor()); @@ -126,12 +126,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, } painter->drawRect(0, 0, w, h); painter->setPen(pen); - text = QString::number(theDate.day()); + text = TQString::number(theDate.day()); addDayPostfix(text); painter->drawText(0, 0, w-2, h, AlignRight, text, -1, &rect); MyMoneyFile *file = MyMoneyFile::instance(); - QValueList<MyMoneySchedule> schedules; + TQValueList<MyMoneySchedule> schedules; try { @@ -171,12 +171,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, if (schedules.count() >= 1) { - QValueList<MyMoneySchedule>::Iterator iter; + TQValueList<MyMoneySchedule>::Iterator iter; bool anyOverdue=false; for (iter=schedules.begin(); iter!=schedules.end(); ++iter) { MyMoneySchedule schedule = *iter; - if (theDate < QDate::currentDate()) + if (theDate < TQDate::tqcurrentDate()) { if (schedule.isOverdue()) { @@ -192,12 +192,12 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, painter->setPen(darkGray); painter->setFont(fontLarge); - painter->drawText(0, 0, w, h, AlignCenter, QString::number(schedules.count()), + painter->drawText(0, 0, w, h, AlignCenter, TQString::number(schedules.count()), -1, &rect); } painter->setPen(lightGray); - painter->setBrush(Qt::NoBrush); + painter->setBrush(TQt::NoBrush); painter->drawRect(0, 0, w, h); } else if (m_type == WEEKLY) @@ -216,17 +216,17 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, painter->setPen(lightGray); painter->drawRect(0, 0, w, h); - text = QString::number(theDate.day()); + text = TQString::number(theDate.day()); addDayPostfix(text); - painter->drawText(0, 0, w-2, h, AlignRight, QDate::shortDayName(theDate.dayOfWeek()) + " " + text, -1, &rect); + painter->drawText(0, 0, w-2, h, AlignRight, TQDate::shortDayName(theDate.dayOfWeek()) + " " + text, -1, &rect); - QValueList<MyMoneySchedule> billSchedules; - QValueList<MyMoneySchedule> depositSchedules; - QValueList<MyMoneySchedule> transferSchedules; + TQValueList<MyMoneySchedule> billSchedules; + TQValueList<MyMoneySchedule> depositSchedules; + TQValueList<MyMoneySchedule> transferSchedules; try { - text = QString(); + text = TQString(); if (!m_filterBills) { @@ -238,7 +238,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, if (billSchedules.count() >= 1) { - text += i18n("%1 Bills.").arg(QString::number(billSchedules.count())); + text += i18n("%1 Bills.").tqarg(TQString::number(billSchedules.count())); } } @@ -254,7 +254,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, { if(!text.isEmpty()) text += " "; - text += i18n("%1 Deposits.").arg(QString::number(depositSchedules.count())); + text += i18n("%1 Deposits.").tqarg(TQString::number(depositSchedules.count())); } } @@ -270,7 +270,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, { if(!text.isEmpty()) text += " "; - text += i18n("%1 Transfers.").arg(QString::number(transferSchedules.count())); + text += i18n("%1 Transfers.").tqarg(TQString::number(transferSchedules.count())); } } } @@ -282,11 +282,11 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, } bool anyOverdue=false; - QValueList<MyMoneySchedule>::Iterator iter; + TQValueList<MyMoneySchedule>::Iterator iter; for (iter=transferSchedules.begin(); iter!=transferSchedules.end(); ++iter) { MyMoneySchedule schedule = *iter; - if (theDate < QDate::currentDate()) + if (theDate < TQDate::tqcurrentDate()) { if (schedule.isOverdue()) { @@ -301,7 +301,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, for (iter=depositSchedules.begin(); iter!=depositSchedules.end(); ++iter) { MyMoneySchedule schedule = *iter; - if (theDate < QDate::currentDate()) + if (theDate < TQDate::tqcurrentDate()) { if (schedule.isOverdue()) { @@ -316,7 +316,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, for (iter=billSchedules.begin(); iter!=billSchedules.end(); ++iter) { MyMoneySchedule schedule = *iter; - if (theDate < QDate::currentDate()) + if (theDate < TQDate::tqcurrentDate()) { if (schedule.isOverdue()) { @@ -337,7 +337,7 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, painter->drawText(0, 0, w, h, AlignCenter, text, -1, &rect); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { painter->setBrush(KGlobalSettings::baseColor()); @@ -346,26 +346,26 @@ void kMyMoneyScheduledDateTbl::drawCellContents(QPainter *painter, int /*row*/, } } -void kMyMoneyScheduledDateTbl::addDayPostfix(QString& text) +void kMyMoneyScheduledDateTbl::addDayPostfix(TQString& text) { int d = text.toInt(); if (d >= 1 && d <= 31) { - QStringList postfixList = QStringList::split("-", i18n("st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st"), true); + TQStringList postfixList = TQStringList::split("-", i18n("st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-th-th-th-th-th-st"), true); text += postfixList[d-1]; } } void kMyMoneyScheduledDateTbl::refresh() { - repaintContents(false); + tqrepaintContents(false); } -void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) +void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(TQMouseEvent* e) { int row, col, pos; - QPoint mouseCoord; + TQPoint mouseCoord; if (isActiveWindow() || briefWidget.isVisible()) { @@ -383,8 +383,8 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) int firstWeekDay = KGlobal::locale()->weekStartDay(); #endif - QDate drawDate(date); - QString text; + TQDate drawDate(date); + TQString text; if (m_type == MONTHLY) { @@ -417,7 +417,7 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) else if (m_type == WEEKLY) { // TODO: Handle other start weekdays than Monday - text = QDate::shortDayName(row); + text = TQDate::shortDayName(row); text += " "; int dayOfWeek = date.dayOfWeek(); @@ -434,13 +434,13 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) drawDate = date.addDays(diff); } - else if (m_type == QUARTERLY) + else if (m_type == TQUARTERLY) { } m_drawDateOrig = drawDate; MyMoneyFile *file = MyMoneyFile::instance(); - QValueList<MyMoneySchedule> schedules; + TQValueList<MyMoneySchedule> schedules; try { @@ -484,15 +484,15 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) // Take off five pixels so the mouse cursor // will be over the widget - QPoint p = QCursor::pos(); - if (p.y() + h > QApplication::desktop()->height()) + TQPoint p = TQCursor::pos(); + if (p.y() + h > TQApplication::desktop()->height()) { p.setY(p.y() - (h-5)); } else p.setY(p.y() - 5); - if (p.x() + w > QApplication::desktop()->width()) + if (p.x() + w > TQApplication::desktop()->width()) { p.setX(p.x() - (w-5)); } @@ -512,19 +512,19 @@ void kMyMoneyScheduledDateTbl::contentsMouseMoveEvent(QMouseEvent* e) void kMyMoneyScheduledDateTbl::filterBills(bool enable) { m_filterBills = enable; - repaintContents(false); + tqrepaintContents(false); } void kMyMoneyScheduledDateTbl::filterDeposits(bool enable) { m_filterDeposits = enable; - repaintContents(false); + tqrepaintContents(false); } void kMyMoneyScheduledDateTbl::filterTransfers(bool enable) { m_filterTransfers = enable; - repaintContents(false); + tqrepaintContents(false); } #include "kmymoneyscheduleddatetbl.moc" diff --git a/kmymoney2/widgets/kmymoneyscheduleddatetbl.h b/kmymoney2/widgets/kmymoneyscheduleddatetbl.h index 5985a6b..e04097a 100644 --- a/kmymoney2/widgets/kmymoneyscheduleddatetbl.h +++ b/kmymoney2/widgets/kmymoneyscheduleddatetbl.h @@ -43,9 +43,10 @@ class kMyMoneyScheduledDateTbl : public kMyMoneyDateTbl { Q_OBJECT + TQ_OBJECT public: - kMyMoneyScheduledDateTbl(QWidget *parent=0, - QDate date=QDate::currentDate(), + kMyMoneyScheduledDateTbl(TQWidget *tqparent=0, + TQDate date=TQDate::tqcurrentDate(), const char* name=0, WFlags f=0); ~kMyMoneyScheduledDateTbl(); @@ -53,20 +54,20 @@ public: void filterBills(bool enable); void filterDeposits(bool enable); void filterTransfers(bool enable); - void setFilterAccounts(const QStringList& list) { m_filterAccounts = list; repaintContents(false); } + void setFilterAccounts(const TQStringList& list) { m_filterAccounts = list; tqrepaintContents(false); } signals: - void enterClicked(const MyMoneySchedule&, const QDate&); - void skipClicked(const MyMoneySchedule&, const QDate&); + void enterClicked(const MyMoneySchedule&, const TQDate&); + void skipClicked(const MyMoneySchedule&, const TQDate&); protected: - void drawCellContents(QPainter *painter, int row, int col, const QDate& theDate); - void addDayPostfix(QString& text); - void contentsMouseMoveEvent(QMouseEvent* e); + void drawCellContents(TQPainter *painter, int row, int col, const TQDate& theDate); + void addDayPostfix(TQString& text); + void contentsMouseMoveEvent(TQMouseEvent* e); private: bool m_filterBills, m_filterDeposits, m_filterTransfers; - QStringList m_filterAccounts; + TQStringList m_filterAccounts; KMyMoneyBriefSchedule briefWidget; }; diff --git a/kmymoney2/widgets/kmymoneyselector.cpp b/kmymoney2/widgets/kmymoneyselector.cpp index 6ae07ca..5e16bf1 100644 --- a/kmymoney2/widgets/kmymoneyselector.cpp +++ b/kmymoney2/widgets/kmymoneyselector.cpp @@ -18,11 +18,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qheader.h> -#include <qtimer.h> -#include <qstyle.h> -#include <qregexp.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqtimer.h> +#include <tqstyle.h> +#include <tqregexp.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,25 +36,25 @@ #include "../kmymoneyglobalsettings.h" -KMyMoneySelector::KMyMoneySelector(QWidget *parent, const char *name, QWidget::WFlags flags) : - QWidget(parent, name, flags) +KMyMoneySelector::KMyMoneySelector(TQWidget *tqparent, const char *name, TQWidget::WFlags flags) : + TQWidget(tqparent, name, flags) { - m_selMode = QListView::Single; + m_selMode = TQListView::Single; m_listView = new KListView(this); // don't show horizontal scroll bar - m_listView->setHScrollBarMode(QScrollView::AlwaysOff); + m_listView->setHScrollBarMode(TQScrollView::AlwaysOff); m_listView->setSorting(-1); - if(parent) { - setFocusProxy(parent->focusProxy()); - m_listView->setFocusProxy(parent->focusProxy()); + if(tqparent) { + setFocusProxy(tqparent->focusProxy()); + m_listView->setFocusProxy(tqparent->focusProxy()); } m_listView->setAllColumnsShowFocus(true); - m_layout = new QHBoxLayout( this, 0, 6); + m_layout = new TQHBoxLayout( this, 0, 6); m_listView->addColumn( "Hidden" ); m_listView->header()->hide(); @@ -64,10 +64,10 @@ KMyMoneySelector::KMyMoneySelector(QWidget *parent, const char *name, QWidget::W m_layout->addWidget( m_listView ); // force init - m_selMode = QListView::Multi; - setSelectionMode(QListView::Single); + m_selMode = TQListView::Multi; + setSelectionMode(TQListView::Single); - connect(m_listView, SIGNAL(rightButtonPressed(QListViewItem* , const QPoint&, int)), this, SLOT(slotListRightMouse(QListViewItem*, const QPoint&, int))); + connect(m_listView, TQT_SIGNAL(rightButtonPressed(TQListViewItem* , const TQPoint&, int)), this, TQT_SLOT(slotListRightMouse(TQListViewItem*, const TQPoint&, int))); } KMyMoneySelector::~KMyMoneySelector() @@ -80,28 +80,28 @@ void KMyMoneySelector::clear(void) m_visibleItem = 0; } -void KMyMoneySelector::setSelectionMode(const QListView::SelectionMode mode) +void KMyMoneySelector::setSelectionMode(const TQListView::SelectionMode mode) { if(m_selMode != mode) { m_selMode = mode; clear(); // make sure, it's either Multi or Single - if(mode != QListView::Multi) { - m_selMode = QListView::Single; - connect(m_listView, SIGNAL(selectionChanged(void)), this, SIGNAL(stateChanged(void))); - connect(m_listView, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*))); + if(mode != TQListView::Multi) { + m_selMode = TQListView::Single; + connect(m_listView, TQT_SIGNAL(selectionChanged(void)), this, TQT_SIGNAL(stateChanged(void))); + connect(m_listView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemSelected(TQListViewItem*))); } else { - disconnect(m_listView, SIGNAL(selectionChanged(void)), this, SIGNAL(stateChanged(void))); - disconnect(m_listView, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemSelected(QListViewItem*))); + disconnect(m_listView, TQT_SIGNAL(selectionChanged(void)), this, TQT_SIGNAL(stateChanged(void))); + disconnect(m_listView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotItemSelected(TQListViewItem*))); } } - QWidget::update(); + TQWidget::update(); } -void KMyMoneySelector::slotItemSelected(QListViewItem *item) +void KMyMoneySelector::slotItemSelected(TQListViewItem *item) { - if(m_selMode == QListView::Single) { + if(m_selMode == TQListView::Single) { KMyMoneyListViewItem* l_item = dynamic_cast<KMyMoneyListViewItem*>(item); if(l_item && l_item->isSelectable()) { emit itemSelected(l_item->id()); @@ -109,9 +109,9 @@ void KMyMoneySelector::slotItemSelected(QListViewItem *item) } } -QListViewItem* KMyMoneySelector::newItem(const QString& name, QListViewItem* after, const QString& key, const QString& id, QCheckListItem::Type type) +TQListViewItem* KMyMoneySelector::newItem(const TQString& name, TQListViewItem* after, const TQString& key, const TQString& id, TQCheckListItem::Type type) { - QListViewItem* item; + TQListViewItem* item; if(after) item = new KMyMoneyCheckListItem(m_listView, after, name, key, id, type); else @@ -122,49 +122,49 @@ QListViewItem* KMyMoneySelector::newItem(const QString& name, QListViewItem* aft return item; } -QListViewItem* KMyMoneySelector::newItem(const QString& name, const QString& key, const QString& id, QCheckListItem::Type type) +TQListViewItem* KMyMoneySelector::newItem(const TQString& name, const TQString& key, const TQString& id, TQCheckListItem::Type type) { return newItem(name, 0, key, id, type); } -QListViewItem* KMyMoneySelector::newTopItem(const QString& name, const QString& key, const QString& id) +TQListViewItem* KMyMoneySelector::newTopItem(const TQString& name, const TQString& key, const TQString& id) { - QListViewItem* p; + TQListViewItem* p; - if(m_selMode == QListView::Multi) { + if(m_selMode == TQListView::Multi) { KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(m_listView, name, key, id); - connect(q, SIGNAL(stateChanged(bool)), this, SIGNAL(stateChanged(void))); - p = static_cast<QListViewItem*> (q); + connect(q, TQT_SIGNAL(stateChanged(bool)), this, TQT_SIGNAL(stateChanged(void))); + p = static_cast<TQListViewItem*> (q); } else { KMyMoneyListViewItem* q = new KMyMoneyListViewItem(m_listView, name, key, id); - p = static_cast<QListViewItem*> (q); + p = static_cast<TQListViewItem*> (q); } return p; } -QListViewItem* KMyMoneySelector::newItem(QListViewItem* parent, const QString& name, const QString& key, const QString& id) +TQListViewItem* KMyMoneySelector::newItem(TQListViewItem* tqparent, const TQString& name, const TQString& key, const TQString& id) { - QListViewItem* p; + TQListViewItem* p; - if(m_selMode == QListView::Multi) { - KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(parent, name, key, id); - connect(q, SIGNAL(stateChanged(bool)), this, SIGNAL(stateChanged(void))); - p = static_cast<QListViewItem*> (q); + if(m_selMode == TQListView::Multi) { + KMyMoneyCheckListItem* q = new KMyMoneyCheckListItem(tqparent, name, key, id); + connect(q, TQT_SIGNAL(stateChanged(bool)), this, TQT_SIGNAL(stateChanged(void))); + p = static_cast<TQListViewItem*> (q); } else { - KMyMoneyListViewItem* q = new KMyMoneyListViewItem(parent, name, key, id); - p = static_cast<QListViewItem*> (q); + KMyMoneyListViewItem* q = new KMyMoneyListViewItem(tqparent, name, key, id); + p = static_cast<TQListViewItem*> (q); } return p; } -void KMyMoneySelector::protectItem(const QString& itemId, const bool protect) +void KMyMoneySelector::protectItem(const TQString& itemId, const bool protect) { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); + TQListViewItem* it_v; KMyMoneyListViewItem* it_l; KMyMoneyCheckListItem* it_c; @@ -189,10 +189,10 @@ void KMyMoneySelector::protectItem(const QString& itemId, const bool protect) } } -QListViewItem* KMyMoneySelector::item(const QString& id) const +TQListViewItem* KMyMoneySelector::item(const TQString& id) const { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); + TQListViewItem* it_v; KMyMoneyListViewItem* it_l; KMyMoneyCheckListItem* it_c; @@ -213,17 +213,17 @@ QListViewItem* KMyMoneySelector::item(const QString& id) const int KMyMoneySelector::optimizedWidth(void) const { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); + TQListViewItem* it_v; KMyMoneyListViewItem* it_l; KMyMoneyCheckListItem* it_c; // scan items int w = 0; #ifndef KMM_DESIGNER - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont()); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont()); #else - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); #endif while((it_v = it.current()) != 0) { it_l = dynamic_cast<KMyMoneyListViewItem*>(it_v); @@ -254,15 +254,15 @@ void KMyMoneySelector::setOptimizedWidth(void) bool KMyMoneySelector::allItemsSelected(void) const { - QListViewItem* it_v; + TQListViewItem* it_v; - if(m_selMode == QListView::Single) + if(m_selMode == TQListView::Single) return false; for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v); + if(it_c->type() == TQCheckListItem::CheckBox) { if(!(it_c->isOn() && allItemsSelected(it_v))) return false; } else { @@ -274,13 +274,13 @@ bool KMyMoneySelector::allItemsSelected(void) const return true; } -bool KMyMoneySelector::allItemsSelected(const QListViewItem *item) const +bool KMyMoneySelector::allItemsSelected(const TQListViewItem *item) const { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = static_cast<QCheckListItem*>(it_v); + TQCheckListItem* it_c = static_cast<TQCheckListItem*>(it_v); if(!(it_c->isOn() && allItemsSelected(it_v))) return false; } @@ -288,16 +288,16 @@ bool KMyMoneySelector::allItemsSelected(const QListViewItem *item) const return true; } -void KMyMoneySelector::removeItem(const QString& id) +void KMyMoneySelector::removeItem(const TQString& id) { - QListViewItem* it_v; - QListViewItemIterator it; + TQListViewItem* it_v; + TQListViewItemIterator it; - it = QListViewItemIterator(m_listView); + it = TQListViewItemIterator(m_listView); while((it_v = it.current()) != 0) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(id == it_c->id()) { if(it_c->firstChild()) { it_c->setSelectable(false); @@ -319,8 +319,8 @@ void KMyMoneySelector::removeItem(const QString& id) it++; } - // get rid of top items that just lost the last children (e.g. Favorites) - it = QListViewItemIterator(m_listView, QListViewItemIterator::NotSelectable); + // get rid of top items that just lost the last tqchildren (e.g. Favorites) + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::NotSelectable); while((it_v = it.current()) != 0) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); @@ -336,12 +336,12 @@ void KMyMoneySelector::removeItem(const QString& id) void KMyMoneySelector::selectAllItems(const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v); + if(it_c->type() == TQCheckListItem::CheckBox) { it_c->setOn(state); } selectAllSubItems(it_v, state); @@ -350,14 +350,14 @@ void KMyMoneySelector::selectAllItems(const bool state) emit stateChanged(); } -void KMyMoneySelector::selectItems(const QStringList& itemList, const bool state) +void KMyMoneySelector::selectItems(const TQStringList& itemList, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox && itemList.contains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -366,14 +366,14 @@ void KMyMoneySelector::selectItems(const QStringList& itemList, const bool state emit stateChanged(); } -void KMyMoneySelector::selectSubItems(QListViewItem* item, const QStringList& itemList, const bool state) +void KMyMoneySelector::selectSubItems(TQListViewItem* item, const TQStringList& itemList, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox && itemList.contains(it_c->id())) { + if(it_c->type() == TQCheckListItem::CheckBox && itemList.tqcontains(it_c->id())) { it_c->setOn(state); } selectSubItems(it_v, itemList, state); @@ -381,14 +381,14 @@ void KMyMoneySelector::selectSubItems(QListViewItem* item, const QStringList& it } } -void KMyMoneySelector::selectAllSubItems(QListViewItem* item, const bool state) +void KMyMoneySelector::selectAllSubItems(TQListViewItem* item, const bool state) { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { - QCheckListItem* it_c = dynamic_cast<QCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + TQCheckListItem* it_c = dynamic_cast<TQCheckListItem*>(it_v); + if(it_c->type() == TQCheckListItem::CheckBox) { it_c->setOn(state); } selectAllSubItems(it_v, state); @@ -396,12 +396,12 @@ void KMyMoneySelector::selectAllSubItems(QListViewItem* item, const bool state) } } -void KMyMoneySelector::selectedItems(QStringList& list) const +void KMyMoneySelector::selectedItems(TQStringList& list) const { - QListViewItem* it_v; + TQListViewItem* it_v; list.clear(); - if(m_selMode == QListView::Single) { + if(m_selMode == TQListView::Single) { KMyMoneyListViewItem* it_c = dynamic_cast<KMyMoneyListViewItem*>(m_listView->selectedItem()); if(it_c != 0) list << it_c->id(); @@ -410,7 +410,7 @@ void KMyMoneySelector::selectedItems(QStringList& list) const for(it_v = m_listView->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(it_c->isOn()) list << (*it_c).id(); } @@ -420,14 +420,14 @@ void KMyMoneySelector::selectedItems(QStringList& list) const } } -void KMyMoneySelector::selectedItems(QStringList& list, QListViewItem* item) const +void KMyMoneySelector::selectedItems(TQStringList& list, TQListViewItem* item) const { - QListViewItem* it_v; + TQListViewItem* it_v; for(it_v = item->firstChild(); it_v != 0; it_v = it_v->nextSibling()) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(it_c->isOn()) list << (*it_c).id(); selectedItems(list, it_v); @@ -436,17 +436,17 @@ void KMyMoneySelector::selectedItems(QStringList& list, QListViewItem* item) con } } -void KMyMoneySelector::itemList(QStringList& list) const +void KMyMoneySelector::itemList(TQStringList& list) const { - QListViewItemIterator it; - QListViewItem* it_v; + TQListViewItemIterator it; + TQListViewItem* it_v; - it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable); + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable); while((it_v = it.current()) != 0) { { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { list << it_c->id(); } } else if(it_v->rtti() == 0) { @@ -458,18 +458,18 @@ void KMyMoneySelector::itemList(QStringList& list) const } } -void KMyMoneySelector::setSelected(const QString& id, const bool state) +void KMyMoneySelector::setSelected(const TQString& id, const bool state) { - QListViewItemIterator it; - QListViewItem* it_v; - QListViewItem* it_visible = 0; + TQListViewItemIterator it; + TQListViewItem* it_v; + TQListViewItem* it_visible = 0; - it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable); + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable); while((it_v = it.current()) != 0) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); Q_CHECK_PTR(it_c); - if(it_c->type() == QCheckListItem::CheckBox) { + if(it_c->type() == TQCheckListItem::CheckBox) { if(it_c->id() == id) { it_c->setOn(state); m_listView->setSelected(it_v, true); @@ -496,18 +496,18 @@ void KMyMoneySelector::setSelected(const QString& id, const bool state) ensureItemVisible(it_visible); } -void KMyMoneySelector::ensureItemVisible(const QListViewItem *it_v) +void KMyMoneySelector::ensureItemVisible(const TQListViewItem *it_v) { // for some reason, I could only use the ensureItemVisible() method - // of QListView successfully, after the widget was drawn on the screen. + // of TQListView successfully, after the widget was drawn on the screen. // If called before it had no effect (if the item was not visible). // // The solution was to store the item we wanted to see in a local var - // and call QListView::ensureItemVisible() about 10ms later in + // and call TQListView::ensureItemVisible() about 10ms later in // the slot slotShowSelected. (ipwizard, 12/29/2003) m_visibleItem = it_v; - QTimer::singleShot(100, this, SLOT(slotShowSelected())); + TQTimer::singleShot(100, this, TQT_SLOT(slotShowSelected())); } void KMyMoneySelector::slotShowSelected(void) @@ -516,61 +516,61 @@ void KMyMoneySelector::slotShowSelected(void) m_listView->ensureItemVisible(m_visibleItem); } -int KMyMoneySelector::slotMakeCompletion(const QString& _txt) +int KMyMoneySelector::slotMakeCompletion(const TQString& _txt) { - QString txt(QRegExp::escape(_txt)); + TQString txt(TQRegExp::escape(_txt)); if(KMyMoneyGlobalSettings::stringMatchFromStart() && this->isA("KMyMoneySelector") ) txt.prepend('^'); - return slotMakeCompletion(QRegExp(txt, false)); + return slotMakeCompletion(TQRegExp(txt, false)); } -bool KMyMoneySelector::match(const QRegExp& exp, QListViewItem* item) const +bool KMyMoneySelector::match(const TQRegExp& exp, TQListViewItem* item) const { return exp.search(item->text(0)) != -1; } -int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) +int KMyMoneySelector::slotMakeCompletion(const TQRegExp& exp) { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItem* it_v; // The logic used here seems to be awkward. The problem is, that - // QListViewItem::setVisible works recursively on all it's children - // and grand-children. + // TQListViewItem::setVisible works recursively on all it's tqchildren + // and grand-tqchildren. // // The way out of this is as follows: Make all items visible. // Then go through the list again and perform the checks. - // If an item does not have any children (last leaf in the tree view) - // perform the check. Then check recursively on the parent of this - // leaf that it has no visible children. If that is the case, make the - // parent invisible and continue this check with it's parent. + // If an item does not have any tqchildren (last leaf in the tree view) + // perform the check. Then check recursively on the tqparent of this + // leaf that it has no visible tqchildren. If that is the case, make the + // tqparent invisible and continue this check with it's tqparent. while((it_v = it.current()) != 0) { it_v->setVisible(true); ++it; } - QListViewItem* firstMatch = 0; + TQListViewItem* firstMatch = 0; if(!exp.pattern().isEmpty()) { - it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable); + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable); while((it_v = it.current()) != 0) { if(it_v->firstChild() == 0) { if(!match(exp, it_v)) { // this is a node which does not contain the - // text and does not have children. So we can - // safely hide it. Then we check, if the parent - // has more children which are still visible. If - // none are found, the parent node is hidden also. We + // text and does not have tqchildren. So we can + // safely hide it. Then we check, if the tqparent + // has more tqchildren which are still visible. If + // none are found, the tqparent node is hidden also. We // continue until the top of the tree or until we - // find a node that still has visible children. + // find a node that still has visible tqchildren. bool hide = true; while(hide) { it_v->setVisible(false); - it_v = it_v->parent(); + it_v = it_v->tqparent(); if(it_v && it_v->isSelectable()) { hide = !match(exp, it_v); - QListViewItem* child = it_v->firstChild(); + TQListViewItem* child = it_v->firstChild(); for(; child && hide; child = child->nextSibling()) { if(child->isVisible()) hide = false; @@ -587,15 +587,15 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) if(!firstMatch) { firstMatch = it_v; } - // a node with children contains the text. We want + // a node with tqchildren contains the text. We want // to display all child nodes in this case, so we need // to advance the iterator to the next sibling of the // current node. This could well be the sibling of a - // parent or grandparent node. - QListViewItem* curr = it_v; - QListViewItem* item; + // tqparent or grandtqparent node. + TQListViewItem* curr = it_v; + TQListViewItem* item; while((item = curr->nextSibling()) == 0) { - curr = curr->parent(); + curr = curr->tqparent(); if(curr == 0) break; if(match(exp, curr)) @@ -606,7 +606,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) } while(it.current() && it.current() != item); } else { - // It's a node with children that does not match. We don't + // It's a node with tqchildren that does not match. We don't // change it's status here. ++it; } @@ -615,7 +615,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) // make the first match the one that is selected // if we have no match, make sure none is selected - if(m_selMode == QListView::Single) { + if(m_selMode == TQListView::Single) { if(firstMatch) { m_listView->setSelected(firstMatch, true); ensureItemVisible(firstMatch); @@ -626,7 +626,7 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) // Get the number of visible nodes for the return code int cnt = 0; - it = QListViewItemIterator(m_listView, QListViewItemIterator::Selectable | QListViewItemIterator::Visible); + it = TQListViewItemIterator(m_listView, TQListViewItemIterator::Selectable | TQListViewItemIterator::Visible); while((it_v = it.current()) != 0) { cnt++; it++; @@ -634,10 +634,10 @@ int KMyMoneySelector::slotMakeCompletion(const QRegExp& exp) return cnt; } -bool KMyMoneySelector::contains(const QString& txt) const +bool KMyMoneySelector::tqcontains(const TQString& txt) const { - QListViewItemIterator it(m_listView, QListViewItemIterator::Selectable); - QListViewItem* it_v; + TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selectable); + TQListViewItem* it_v; while((it_v = it.current()) != 0) { if(it_v->rtti() == 1) { KMyMoneyCheckListItem* it_c = dynamic_cast<KMyMoneyCheckListItem*>(it_v); @@ -655,13 +655,13 @@ bool KMyMoneySelector::contains(const QString& txt) const return false; } -void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos, int /* col */) +void KMyMoneySelector::slotListRightMouse(TQListViewItem* it_v, const TQPoint& pos, int /* col */) { if(it_v && (it_v->rtti() == 1)) { KMyMoneyCheckListItem* it_c = static_cast<KMyMoneyCheckListItem*>(it_v); - if(it_c->type() == QCheckListItem::CheckBox) { - // the following is copied from QCheckListItem::activate() et al - int boxsize = m_listView->style().pixelMetric(QStyle::PM_CheckListButtonSize, m_listView); + if(it_c->type() == TQCheckListItem::CheckBox) { + // the following is copied from TQCheckListItem::activate() et al + int boxsize = m_listView->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, m_listView); int align = m_listView->columnAlignment( 0 ); int marg = m_listView->itemMargin(); int y = 0; @@ -671,12 +671,12 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos else y = (m_listView->fontMetrics().height() + 2 + marg - boxsize) / 2; - QRect r( 0, y, boxsize-3, boxsize-3 ); + TQRect r( 0, y, boxsize-3, boxsize-3 ); // columns might have been swapped r.moveBy( m_listView->header()->sectionPos( 0 ), 0 ); - QPoint topLeft = m_listView->itemRect(it_v).topLeft(); //### inefficient? - QPoint p = m_listView->mapFromGlobal( pos ) - topLeft; + TQPoint topLeft = m_listView->tqitemRect(it_v).topLeft(); //### inefficient? + TQPoint p = m_listView->mapFromGlobal( pos ) - topLeft; int xdepth = m_listView->treeStepSize() * (it_v->depth() + (m_listView->rootIsDecorated() ? 1 : 0)) + m_listView->itemMargin(); @@ -684,7 +684,7 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos p.rx() -= xdepth; // copy ends around here - if ( r.contains( p ) ) { + if ( r.tqcontains( p ) ) { // we get down here, if we have a right click onto the checkbox selectAllSubItems(it_c, it_c->isOn()); } @@ -692,16 +692,16 @@ void KMyMoneySelector::slotListRightMouse(QListViewItem* it_v, const QPoint& pos } } -QStringList KMyMoneySelector::selectedItems(void) const +TQStringList KMyMoneySelector::selectedItems(void) const { - QStringList list; + TQStringList list; selectedItems(list); return list; } -QStringList KMyMoneySelector::itemList(void) const +TQStringList KMyMoneySelector::itemList(void) const { - QStringList list; + TQStringList list; itemList(list); return list; } diff --git a/kmymoney2/widgets/kmymoneyselector.h b/kmymoney2/widgets/kmymoneyselector.h index 2b389d6..c55ac47 100644 --- a/kmymoney2/widgets/kmymoneyselector.h +++ b/kmymoney2/widgets/kmymoneyselector.h @@ -21,9 +21,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qwidget.h> -#include <qlistview.h> -class QHBoxLayout; +#include <tqwidget.h> +#include <tqlistview.h> +class TQHBoxLayout; // ---------------------------------------------------------------------------- // KDE Includes @@ -50,34 +50,35 @@ class KListView; * out of the set of displayed items. Selection is performed * by marking the item in the view. */ -class KMyMoneySelector : public QWidget +class KMyMoneySelector : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMyMoneySelector(QWidget *parent=0, const char *name=0, QWidget::WFlags flags = 0); + KMyMoneySelector(TQWidget *tqparent=0, const char *name=0, TQWidget::WFlags flags = 0); virtual ~KMyMoneySelector(); /** * This method sets the mode of operation of this widget. - * Supported values are @p QListView::Single and @p QListView::Multi. + * Supported values are @p TQListView::Single and @p TQListView::Multi. * - * @param mode @p QListView::Single selects single selection mode and - * @p QListView::Multi selects multi selection mode + * @param mode @p TQListView::Single selects single selection mode and + * @p TQListView::Multi selects multi selection mode * - * @note When the widget is created, it defaults to QListView::Single. + * @note When the widget is created, it defaults to TQListView::Single. * Any items loaded into the widget will be cleared if the mode changes. * Changing the selection mode also changes the type of the items * created through newItem(). You should therefor set the selection mode * before you create items. */ - void setSelectionMode(const QListView::SelectionMode mode); + void setSelectionMode(const TQListView::SelectionMode mode); /** * returns the selection mode of the widget. * * @sa setSelectionMode() */ - QListView::SelectionMode selectionMode(void) const { return m_selMode; } + TQListView::SelectionMode selectionMode(void) const { return m_selMode; } /** * This method returns the list of selected item ids. If @@ -86,7 +87,7 @@ public: * * @param list reference to id list */ - void selectedItems(QStringList& list) const; + void selectedItems(TQStringList& list) const; /** * Convenience method for above method. Requires more resources. @@ -94,7 +95,7 @@ public: * * @todo Deprecated after 1.0 */ - QStringList selectedItems(void) const; + TQStringList selectedItems(void) const; /** * This method returns the list of all item ids. @@ -102,7 +103,7 @@ public: * * @param list reference to id list */ - void itemList(QStringList& list) const; + void itemList(TQStringList& list) const; /** * Convenience method for above method. Requires more resources. @@ -110,7 +111,7 @@ public: * * @todo Deprecated after 1.0 */ - QStringList itemList(void) const; + TQStringList itemList(void) const; /** * This method returns an information if all items @@ -133,7 +134,7 @@ public: * @p true checked * @p false not checked (default) */ - void setSelected(const QString& id, const bool state = false); + void setSelected(const TQString& id, const bool state = false); /** * Return a pointer to the KListView object @@ -157,7 +158,7 @@ public: * @param itemList of item ids to apply @p state to * @param state select items if @p true, deselect otherwise */ - void selectItems(const QStringList& itemList, const bool state); + void selectItems(const TQStringList& itemList, const bool state); /** * Protect an entry from selection. Protection is controlled by @@ -167,7 +168,7 @@ public: * @param protect if true, the entry specified by @p accId cannot be * selected. If false, it can be selected. Defaults to @p true. */ - void protectItem(const QString& itemId, const bool protect = true); + void protectItem(const TQString& itemId, const bool protect = true); /** * This method modifies the width of the widget to match its optimal size @@ -178,25 +179,25 @@ public: /** * This method removes an item with a given id from the list. * - * @param id QString containing id of item to be removed + * @param id TQString containing id of item to be removed */ - void removeItem(const QString& id); + void removeItem(const TQString& id); /** * This method creates a new top level KMyMoneyCheckListItem object in the list view. * The type can be influenced with the @a type argument. It defaults - * to QCheckListItem::RadioButtonController. If @a id is empty, the item is not - * selectable. It will be shown 'opened' (see QListViewItem::setOpen()) + * to TQCheckListItem::RadioButtonController. If @a id is empty, the item is not + * selectable. It will be shown 'opened' (see TQListViewItem::setOpen()) * * @return pointer to newly created object */ - QListViewItem* newItem(const QString& name, const QString& key = QString(), const QString& id = QString(), QCheckListItem::Type type = QCheckListItem::RadioButtonController); + TQListViewItem* newItem(const TQString& name, const TQString& key = TQString(), const TQString& id = TQString(), TQCheckListItem::Type type = TQCheckListItem::RadioButtonController); /** * Same as above, but create the item following the item pointed to by @c after. * If @c after is 0, then behave as previous method */ - QListViewItem* newItem(const QString& name, QListViewItem* after, const QString& key = QString(), const QString& id = QString(), QCheckListItem::Type type = QCheckListItem::RadioButtonController); + TQListViewItem* newItem(const TQString& name, TQListViewItem* after, const TQString& key = TQString(), const TQString& id = TQString(), TQCheckListItem::Type type = TQCheckListItem::RadioButtonController); /** * This method creates a new selectable object depending on the @@ -205,20 +206,20 @@ public: * * @note The new item will be the first one in the selection * - * @param parent pointer to parent item + * @param tqparent pointer to tqparent item * @param name the displayed name * @param key String to be used for completion. If empty defaults to @a name * @param id the id used to identify the objects * * @return pointer to newly created object */ - QListViewItem* newItem(QListViewItem* parent, const QString& name, const QString& key, const QString& id); + TQListViewItem* newItem(TQListViewItem* tqparent, const TQString& name, const TQString& key, const TQString& id); /** * This method creates a new selectable object depending on the * selection mode. This is either a KListViewItem for single * selection mode or a KMyMoneyCheckListItem for multi selection mode. - * In contrast to the above method, the parent is always the view. + * In contrast to the above method, the tqparent is always the view. * * @note The new item will be the first one in the selection * @@ -228,47 +229,47 @@ public: * * @return pointer to newly created object */ - QListViewItem* newTopItem(const QString& name, const QString& key, const QString& id); + TQListViewItem* newTopItem(const TQString& name, const TQString& key, const TQString& id); /** * This method checks if a given @a item matches the given regular expression @a exp. * * @param exp const reference to a regular expression object - * @param item pointer to QListViewItem + * @param item pointer to TQListViewItem * * @retval true item matches * @retval false item does not match */ - virtual bool match(const QRegExp& exp, QListViewItem* item) const; + virtual bool match(const TQRegExp& exp, TQListViewItem* item) const; /** * This method delays the call for m_listView->ensureItemVisible(item) * for about 10ms. This seems to be necessary when the widget is not (yet) * visible on the screen after creation. * - * @param item pointer to QListViewItem that should be made visible + * @param item pointer to TQListViewItem that should be made visible * * @sa slotShowSelected() */ - void ensureItemVisible(const QListViewItem *item); + void ensureItemVisible(const TQListViewItem *item); /** - * This method returns a pointer to the QListViewItem with the id @a id. + * This method returns a pointer to the TQListViewItem with the id @a id. * If such an item is not contained in the list, @a 0 will be returned. * - * @param id id to be used to find a QListViewItem pointer for + * @param id id to be used to find a TQListViewItem pointer for */ - QListViewItem* item(const QString& id) const; + TQListViewItem* item(const TQString& id) const; /** - * This method returns, if any of the items in the selector contains + * This method returns, if any of the items in the selector tqcontains * the text @a txt. * * @param txt const reference to string to be looked for * @retval true exact match found * @retval false no match found */ - virtual bool contains(const QString& txt) const; + virtual bool tqcontains(const TQString& txt) const; /** * Clears all items of the selector and the associated listview. @@ -296,7 +297,7 @@ public slots: signals: void stateChanged(void); - void itemSelected(const QString& id); + void itemSelected(const TQString& id); protected: /** @@ -305,14 +306,14 @@ protected: * @param list list of selected ids * @param item pointer to item to start with */ - void selectedItems(QStringList& list, QListViewItem* item) const; + void selectedItems(TQStringList& list, TQListViewItem* item) const; /** * Helper method for allItemsSelected() to traverse the tree. * * @param item pointer to item to start with */ - bool allItemsSelected(const QListViewItem *item) const; + bool allItemsSelected(const TQListViewItem *item) const; /** * This is a helper method for selectAllItems(). @@ -320,7 +321,7 @@ protected: * @param item pointer to item to start with * @param state selection state (@a true = selected, @a false = not selected) */ - void selectAllSubItems(QListViewItem* item, const bool state); + void selectAllSubItems(TQListViewItem* item, const bool state); /** * This is a helper method for selectItems(). @@ -329,25 +330,25 @@ protected: * @param itemList list of ids to be selected * @param state selection state (@a true = selected, @a false = not selected) */ - void selectSubItems(QListViewItem* item, const QStringList& itemList, const bool state); + void selectSubItems(TQListViewItem* item, const TQStringList& itemList, const bool state); public slots: /** * Hide all listview items that do not match the regular expression @a exp. * This method returns the number of visible items * - * @param exp const reference to QRegExp that an item must match to stay visible + * @param exp const reference to TQRegExp that an item must match to stay visible * * @return number of visible items */ - int slotMakeCompletion(const QRegExp& exp); + int slotMakeCompletion(const TQRegExp& exp); /** * This is an overloaded member function, provided for convenience. It behaves essentially like the above function. * - * @param txt contains the pattern for a QRegExp + * @param txt contains the pattern for a TQRegExp */ - int slotMakeCompletion(const QString& txt); + int slotMakeCompletion(const TQString& txt); protected slots: @@ -356,14 +357,14 @@ protected slots: * calls m_listView->ensureItemVisible() for the last selected item * in this widget. * - * @sa ensureItemVisible(), setSelected(const QString&) + * @sa ensureItemVisible(), setSelected(const TQString&) */ void slotShowSelected(void); /** * This slot is connected to the KListView executed signal */ - void slotItemSelected(QListViewItem *it_v); + void slotItemSelected(TQListViewItem *it_v); /** * This slot processes the right mouse button press on a list view item. @@ -371,17 +372,17 @@ protected slots: * @param it_v pointer to list view item that was pressed * @param p the position where the mouse was pressed */ - void slotListRightMouse(QListViewItem* it_v, const QPoint& p, int /* col */); + void slotListRightMouse(TQListViewItem* it_v, const TQPoint& p, int /* col */); protected: KListView* m_listView; - QStringList m_itemList; - QString m_baseName; - QListView::SelectionMode m_selMode; - QHBoxLayout* m_layout; + TQStringList m_itemList; + TQString m_baseName; + TQListView::SelectionMode m_selMode; + TQHBoxLayout* m_layout; private: - const QListViewItem* m_visibleItem; + const TQListViewItem* m_visibleItem; }; #endif diff --git a/kmymoney2/widgets/kmymoneytitlelabel.cpp b/kmymoney2/widgets/kmymoneytitlelabel.cpp index 9dc5140..bad8a77 100644 --- a/kmymoney2/widgets/kmymoneytitlelabel.cpp +++ b/kmymoney2/widgets/kmymoneytitlelabel.cpp @@ -18,10 +18,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qvariant.h> -#include <qstyle.h> -#include <qpainter.h> +#include <tqpixmap.h> +#include <tqvariant.h> +#include <tqstyle.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,8 +36,8 @@ #include "kmymoneytitlelabel.h" -KMyMoneyTitleLabel::KMyMoneyTitleLabel(QWidget *parent, const char *name) : - QLabel(parent, name), +KMyMoneyTitleLabel::KMyMoneyTitleLabel(TQWidget *tqparent, const char *name) : + TQLabel(tqparent, name), m_bgColor( KGlobalSettings::highlightColor() ), m_textColor( KGlobalSettings::highlightedTextColor() ) { @@ -48,18 +48,18 @@ KMyMoneyTitleLabel::~KMyMoneyTitleLabel() { } -void KMyMoneyTitleLabel::setLeftImageFile(const QString& _file) +void KMyMoneyTitleLabel::setLeftImageFile(const TQString& _file) { m_leftImageFile = _file; - QString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile); + TQString lfullpath = KGlobal::dirs()->findResource("appdata", m_leftImageFile); m_leftImage.load(lfullpath); m_leftImage.setAlphaBuffer(true); } -void KMyMoneyTitleLabel::setRightImageFile(const QString& _file) +void KMyMoneyTitleLabel::setRightImageFile(const TQString& _file) { m_rightImageFile = _file; - QString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile); + TQString rfullpath = KGlobal::dirs()->findResource("appdata", m_rightImageFile); m_rightImage.load(rfullpath); m_rightImage.setAlphaBuffer(true); if(m_rightImage.height() < 30) @@ -70,32 +70,32 @@ void KMyMoneyTitleLabel::setRightImageFile(const QString& _file) } } -void KMyMoneyTitleLabel::resizeEvent ( QResizeEvent * ) +void KMyMoneyTitleLabel::resizeEvent ( TQResizeEvent * ) { - QRect cr = contentsRect(); - QImage output( cr.width(), cr.height(), 32 ); + TQRect cr = contentsRect(); + TQImage output( cr.width(), cr.height(), 32 ); output.fill( m_bgColor.rgb() ); bitBlt ( &output, cr.width() - m_rightImage.width(), 0, &m_rightImage, 0, 0, m_rightImage.width(), m_rightImage.height(), 0 ); bitBlt ( &output, 0, 0, &m_leftImage, 0, 0, m_leftImage.width(), m_leftImage.height(), 0 ); - QPixmap pix; + TQPixmap pix; pix.convertFromImage(output); setPixmap(pix); setMinimumWidth( m_rightImage.width() ); } -void KMyMoneyTitleLabel::drawContents(QPainter *p) +void KMyMoneyTitleLabel::drawContents(TQPainter *p) { // first draw pixmap - QLabel::drawContents(p); + TQLabel::drawContents(p); // then draw text on top - style().drawItem( p, contentsRect(), alignment(), colorGroup(), isEnabled(), - 0, QString(" ")+m_text, -1, &m_textColor ); + tqstyle().drawItem( p, contentsRect(), tqalignment(), tqcolorGroup(), isEnabled(), + 0, TQString(" ")+m_text, -1, &m_textColor ); } -void KMyMoneyTitleLabel::setText(const QString& txt) +void KMyMoneyTitleLabel::setText(const TQString& txt) { m_text = txt; update(); diff --git a/kmymoney2/widgets/kmymoneytitlelabel.h b/kmymoney2/widgets/kmymoneytitlelabel.h index 08f9302..2990205 100644 --- a/kmymoney2/widgets/kmymoneytitlelabel.h +++ b/kmymoney2/widgets/kmymoneytitlelabel.h @@ -21,10 +21,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qimage.h> -#include <qcolor.h> -class QPixmap; +#include <tqlabel.h> +#include <tqimage.h> +#include <tqcolor.h> +class TQPixmap; // ---------------------------------------------------------------------------- // KDE Includes @@ -35,44 +35,45 @@ class QPixmap; /** * @author ace jones */ -class KMyMoneyTitleLabel : public QLabel +class KMyMoneyTitleLabel : public TQLabel { Q_OBJECT - Q_PROPERTY( QString leftImageFile READ leftImageFile WRITE setLeftImageFile DESIGNABLE true ) - Q_PROPERTY( QString rightImageFile READ rightImageFile WRITE setRightImageFile DESIGNABLE true ) - Q_PROPERTY( QColor bgColor READ bgColor WRITE setBgColor DESIGNABLE true ) - Q_PROPERTY( QString text READ text WRITE setText DESIGNABLE true ) + TQ_OBJECT + TQ_PROPERTY( TQString leftImageFile READ leftImageFile WRITE setLeftImageFile DESIGNABLE true ) + TQ_PROPERTY( TQString rightImageFile READ rightImageFile WRITE setRightImageFile DESIGNABLE true ) + TQ_PROPERTY( TQColor bgColor READ bgColor WRITE setBgColor DESIGNABLE true ) + TQ_PROPERTY( TQString text READ text WRITE setText DESIGNABLE true ) public: - KMyMoneyTitleLabel(QWidget *parent = 0, const char *name = 0); + KMyMoneyTitleLabel(TQWidget *tqparent = 0, const char *name = 0); ~KMyMoneyTitleLabel(); - void setBgColor(const QColor& _color) { m_bgColor = _color; } - void setLeftImageFile(const QString& _file); - void setRightImageFile(const QString& _file); + void setBgColor(const TQColor& _color) { m_bgColor = _color; } + void setLeftImageFile(const TQString& _file); + void setRightImageFile(const TQString& _file); - const QString& leftImageFile(void) const { return m_leftImageFile; } - const QString& rightImageFile(void) const { return m_rightImageFile; } - QColor bgColor(void) const { return m_bgColor; } - QString text(void) const { return m_text; } + const TQString& leftImageFile(void) const { return m_leftImageFile; } + const TQString& rightImageFile(void) const { return m_rightImageFile; } + TQColor bgColor(void) const { return m_bgColor; } + TQString text(void) const { return m_text; } public slots: - virtual void setText(const QString& txt); + virtual void setText(const TQString& txt); protected: void updatePixmap(void); - virtual void resizeEvent ( QResizeEvent * ); - void drawContents(QPainter *); + virtual void resizeEvent ( TQResizeEvent * ); + void drawContents(TQPainter *); private: - QImage m_leftImage; - QImage m_rightImage; - QColor m_bgColor; - QColor m_textColor; - QString m_text; + TQImage m_leftImage; + TQImage m_rightImage; + TQColor m_bgColor; + TQColor m_textColor; + TQString m_text; - QString m_leftImageFile; - QString m_rightImageFile; + TQString m_leftImageFile; + TQString m_rightImageFile; }; #endif diff --git a/kmymoney2/widgets/kmymoneywizard.cpp b/kmymoney2/widgets/kmymoneywizard.cpp index d7fcfdb..68eaf02 100644 --- a/kmymoney2/widgets/kmymoneywizard.cpp +++ b/kmymoney2/widgets/kmymoneywizard.cpp @@ -17,12 +17,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qlabel.h> -#include <qpoint.h> -#include <qfont.h> -#include <qframe.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpoint.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqtooltip.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -42,8 +42,8 @@ #include <kmymoney/kmymoneytitlelabel.h> #include <kmymoney/kguiutils.h> -KMyMoneyWizardPagePrivate::KMyMoneyWizardPagePrivate(QObject* parent, const char* name) : - QObject(parent, name) +KMyMoneyWizardPagePrivate::KMyMoneyWizardPagePrivate(TQObject* tqparent, const char* name) : + TQObject(tqparent, name) { } @@ -53,17 +53,17 @@ void KMyMoneyWizardPagePrivate::emitCompleteStateChanged(void) } -KMyMoneyWizardPage::KMyMoneyWizardPage(unsigned int step, QWidget* widget, const char* name) : +KMyMoneyWizardPage::KMyMoneyWizardPage(unsigned int step, TQWidget* widget, const char* name) : m_step(step), m_widget(widget), - d(new KMyMoneyWizardPagePrivate(widget, name)) + d(new KMyMoneyWizardPagePrivate(TQT_TQOBJECT(widget), name)) { - m_mandatoryGroup = new kMandatoryFieldGroup(widget); - QObject::connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); + m_mandatoryGroup = new kMandatoryFieldGroup(TQT_TQOBJECT(widget)); + TQObject::connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); widget->hide(); } -QObject* KMyMoneyWizardPage::object(void) const +TQObject* KMyMoneyWizardPage::object(void) const { return d; } @@ -98,19 +98,19 @@ bool KMyMoneyWizardPage::isLastPage(void) const bool KMyMoneyWizardPage::isComplete(void) const { if(!isLastPage()) - QToolTip::add(wizard()->m_nextButton, i18n("Continue with next page")); + TQToolTip::add(wizard()->m_nextButton, i18n("Continue with next page")); else - QToolTip::add(wizard()->m_finishButton, i18n("Finish wizard")); + TQToolTip::add(wizard()->m_finishButton, i18n("Finish wizard")); return m_mandatoryGroup->isEnabled(); } -const QString& KMyMoneyWizardPage::helpContext(void) const +const TQString& KMyMoneyWizardPage::helpContext(void) const { - return QString::null; + return TQString(); } -KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WFlags f) : - QDialog(parent, name, modal, f), +KMyMoneyWizard::KMyMoneyWizard(TQWidget *tqparent, const char *name, bool modal, WFlags f) : + TQDialog(tqparent, name, modal, f), m_step(0) { // enable the little grip in the right corner @@ -132,8 +132,8 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF m_helpButton->setIconSet( SmallIconSet( "help" ) ); } - // create button layout - m_buttonLayout = new QHBoxLayout; + // create button tqlayout + m_buttonLayout = new TQHBoxLayout; m_buttonLayout->addWidget(m_helpButton); m_buttonLayout->addStretch(1); m_buttonLayout->addWidget(m_backButton); @@ -141,41 +141,41 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF m_buttonLayout->addWidget(m_finishButton); m_buttonLayout->addWidget(m_cancelButton); - // create wizard layout - m_wizardLayout = new QVBoxLayout(this, 6, 0, "wizardLayout"); + // create wizard tqlayout + m_wizardLayout = new TQVBoxLayout(this, 6, 0, "wizardLayout"); m_titleLabel = new KMyMoneyTitleLabel(this, "titleLabel"); m_wizardLayout->addWidget(m_titleLabel); - QHBoxLayout* hboxLayout = new QHBoxLayout(0, 0, 6, "hboxLayout"); + TQHBoxLayout* hboxLayout = new TQHBoxLayout(0, 0, 6, "hboxLayout"); - // create stage layout and frame - m_stepFrame = new QFrame(this, "stepFrame"); + // create stage tqlayout and frame + m_stepFrame = new TQFrame(this, "stepFrame"); m_stepFrame->setPaletteBackgroundColor(KGlobalSettings::highlightColor()); - m_stepLayout = new QVBoxLayout(m_stepFrame, 11, 6, "stepLayout"); - m_stepLayout->addWidget(new QLabel("", m_stepFrame)); - m_stepLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding)); - m_stepLabel = new QLabel(m_stepFrame, "stepLabel"); - m_stepLabel->setAlignment(Qt::AlignHCenter); + m_stepLayout = new TQVBoxLayout(m_stepFrame, 11, 6, "stepLayout"); + m_stepLayout->addWidget(new TQLabel("", m_stepFrame)); + m_stepLayout->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding)); + m_stepLabel = new TQLabel(m_stepFrame, "stepLabel"); + m_stepLabel->tqsetAlignment(TQt::AlignHCenter); m_stepLayout->addWidget(m_stepLabel); hboxLayout->addWidget(m_stepFrame); - // FIXME use the protected virtual method QWidget::paletteChange() to update the palette + // FIXME use the protected virtual method TQWidget::paletteChange() to update the palette // information when the user selected a different color set using the KConfigCenter m_stepPalette = m_stepLabel->palette(); - QColorGroup::ColorRole role = QColorGroup::Foreground; - QColor color = KGlobalSettings::highlightedTextColor(); - m_stepPalette.setColor( QPalette::Active, role, color ); - m_stepPalette.setColor( QPalette::Inactive, role, color ); - m_stepPalette.setColor( QPalette::Disabled, role, color ); + TQColorGroup::ColorRole role = TQColorGroup::Foreground; + TQColor color = KGlobalSettings::highlightedTextColor(); + m_stepPalette.setColor( TQPalette::Active, role, color ); + m_stepPalette.setColor( TQPalette::Inactive, role, color ); + m_stepPalette.setColor( TQPalette::Disabled, role, color ); m_stepLabel->setPalette(m_stepPalette); - // create page layout - m_pageLayout = new QVBoxLayout(0, 0, 6, "pageLayout"); + // create page tqlayout + m_pageLayout = new TQVBoxLayout(0, 0, 6, "pageLayout"); // the page will be inserted later dynamically above this line - QFrame* line = new QFrame( this, "line" ); - line->setFrameShadow( QFrame::Sunken ); - line->setFrameShape( QFrame::HLine ); + TQFrame* line = new TQFrame( this, "line" ); + line->setFrameShadow( TQFrame::Sunken ); + line->setFrameShape( TQFrame::HLine ); m_pageLayout->addWidget( line ); m_pageLayout->addLayout(m_buttonLayout); @@ -183,7 +183,7 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF hboxLayout->addLayout(m_pageLayout); m_wizardLayout->addLayout(hboxLayout); - resize(QSize(770, 520).expandedTo(minimumSizeHint())); + resize(TQSize(770, 520).expandedTo(tqminimumSizeHint())); clearWState(WState_Polished); m_titleLabel->setText("No Title specified"); @@ -191,33 +191,33 @@ KMyMoneyWizard::KMyMoneyWizard(QWidget *parent, const char *name, bool modal, WF m_finishButton->hide(); - connect(m_backButton, SIGNAL(clicked()), this, SLOT(backButtonClicked())); - connect(m_nextButton, SIGNAL(clicked()), this, SLOT(nextButtonClicked())); - connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject())); - connect(m_finishButton, SIGNAL(clicked()), this, SLOT(accept())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(helpButtonClicked())); + connect(m_backButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(backButtonClicked())); + connect(m_nextButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextButtonClicked())); + connect(m_cancelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); + connect(m_finishButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(helpButtonClicked())); } -void KMyMoneyWizard::setTitle(const QString& txt) +void KMyMoneyWizard::setTitle(const TQString& txt) { m_titleLabel->setText(txt); } -void KMyMoneyWizard::addStep(const QString& text) +void KMyMoneyWizard::addStep(const TQString& text) { - QLabel* step = new QLabel(text, m_stepFrame); - step->setFrameStyle(QFrame::Panel | QFrame::Raised); - step->setAlignment(Qt::AlignHCenter); - step->setFrameStyle(QFrame::Box | QFrame::Sunken); + TQLabel* step = new TQLabel(text, m_stepFrame); + step->setFrameStyle(TQFrame::Panel | TQFrame::Raised); + step->tqsetAlignment(TQt::AlignHCenter); + step->setFrameStyle(TQFrame::Box | TQFrame::Sunken); step->setMargin(2); step->setPalette( m_stepPalette ); m_steps.append(step); m_stepLayout->insertWidget(m_steps.count(), step); - QFont font(step->font()); + TQFont font(step->font()); font.setBold(true); - QFontMetrics fm(font); + TQFontMetrics fm(font); int w = fm.width(text)+30; if(m_stepFrame->minimumWidth() < w) { m_stepFrame->setMinimumWidth(w); @@ -239,14 +239,14 @@ void KMyMoneyWizard::selectStep(unsigned int step) return; m_step = step; - QValueList<QLabel*>::iterator it_l; - QFont f = m_steps[0]->font(); + TQValueList<TQLabel*>::iterator it_l; + TQFont f = m_steps[0]->font(); for(it_l = m_steps.begin(); it_l != m_steps.end(); ++it_l) { f.setBold(false); - (*it_l)->setFrameStyle(QFrame::NoFrame); + (*it_l)->setFrameStyle(TQFrame::NoFrame); if(--step == 0) { f.setBold(true); - (*it_l)->setFrameStyle(QFrame::Box | QFrame::Sunken); + (*it_l)->setFrameStyle(TQFrame::Box | TQFrame::Sunken); } (*it_l)->setFont(f); } @@ -260,7 +260,7 @@ void KMyMoneyWizard::reselectStep(void) void KMyMoneyWizard::updateStepCount(void) { - QValueList<QLabel*>::iterator it_l; + TQValueList<TQLabel*>::iterator it_l; int stepCount = 0; int hiddenAdjust = 0; int step = 0; @@ -271,7 +271,7 @@ void KMyMoneyWizard::updateStepCount(void) hiddenAdjust++; ++step; } - m_stepLabel->setText(i18n("Step %1 of %2").arg(m_step - hiddenAdjust).arg(stepCount)); + m_stepLabel->setText(i18n("Step %1 of %2").tqarg(m_step - hiddenAdjust).tqarg(stepCount)); } void KMyMoneyWizard::setFirstPage(KMyMoneyWizardPage* page) @@ -287,12 +287,12 @@ void KMyMoneyWizard::switchPage(KMyMoneyWizardPage* oldPage) if(oldPage) { oldPage->widget()->hide(); m_pageLayout->remove(oldPage->widget()); - disconnect(oldPage->object(), SIGNAL(completeStateChanged()), this, SLOT(completeStateChanged())); + disconnect(oldPage->object(), TQT_SIGNAL(completeStateChanged()), this, TQT_SLOT(completeStateChanged())); } KMyMoneyWizardPage* newPage = m_history.back(); if(newPage) { m_pageLayout->insertWidget(0, newPage->widget()); - connect(newPage->object(), SIGNAL(completeStateChanged()), this, SLOT(completeStateChanged())); + connect(newPage->object(), TQT_SIGNAL(completeStateChanged()), this, TQT_SLOT(completeStateChanged())); newPage->widget()->show(); selectStep(newPage->step()); if(newPage->isLastPage()) { @@ -302,7 +302,7 @@ void KMyMoneyWizard::switchPage(KMyMoneyWizardPage* oldPage) m_finishButton->setDefault(false); m_nextButton->setDefault(true); } - QWidget* w = newPage->initialFocusWidget(); + TQWidget* w = newPage->initialFocusWidget(); if(w) w->setFocus(); } @@ -337,7 +337,7 @@ void KMyMoneyWizard::nextButtonClicked(void) void KMyMoneyWizard::helpButtonClicked(void) { KMyMoneyWizardPage* currentPage = m_history.back(); - QString ctx = currentPage->helpContext(); + TQString ctx = currentPage->helpContext(); if(ctx.isEmpty()) ctx = m_helpContext; kapp->invokeHelp(ctx); @@ -369,7 +369,7 @@ void KMyMoneyWizard::accept(void) m_finishButton->setFocus(); KMyMoneyWizardPage* page = m_history.back(); if(page->isComplete()) - QDialog::accept(); + TQDialog::accept(); } #include "kmymoneywizard.moc" diff --git a/kmymoney2/widgets/kmymoneywizard.h b/kmymoney2/widgets/kmymoneywizard.h index 21b57b4..d46563e 100644 --- a/kmymoney2/widgets/kmymoneywizard.h +++ b/kmymoney2/widgets/kmymoneywizard.h @@ -20,13 +20,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qdialog.h> -#include <qvaluelist.h> -#include <qpalette.h> -class QVBoxLayout; -class QHBoxLayout; -class QLabel; -class QFrame; +#include <tqdialog.h> +#include <tqvaluelist.h> +#include <tqpalette.h> +class TQVBoxLayout; +class TQHBoxLayout; +class TQLabel; +class TQFrame; // ---------------------------------------------------------------------------- // KDE Includes @@ -56,7 +56,7 @@ class kMandatoryFieldGroup; * necessary functionality to work in concert with KMyMoneyWizard. * * Therefore, few steps are necessary to use this class. They seem to - * be awkward at some stage, but I wanted to be able to use Qt designer + * be awkward at some stage, but I wanted to be able to use TQt designer * to actually design the widget for the page. That's why some things * aren't implemented in a more straight fashion than one would * normally do this. @@ -70,7 +70,7 @@ class kMandatoryFieldGroup; * class KNewUserPage : public KMyMoneyWizardPage * { * public: - * KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name); + * KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name); * * protected: * KNewUserWizard* m_wizard; @@ -80,15 +80,15 @@ class kMandatoryFieldGroup; * The implementation of this class is rather straight-forward: * * @code - * KNewUserPage::KNewUserPage(unsigned int step, QWidget* widget, KNewUserWizard* parent, const char* name) : + * KNewUserPage::KNewUserPage(unsigned int step, TQWidget* widget, KNewUserWizard* tqparent, const char* name) : * KMyMoneyWizardPage(step, widget, name), - * m_wizard(parent) + * m_wizard(tqparent) * { * } * @endcode * * For each page of the wizard, you will have to create a @p ui file with - * Qt designer. + * TQt designer. * Let's assume we call the first page of the wizard 'General' and go * from there. * We also assume, that the wizard has more than one page. @@ -100,8 +100,9 @@ class kMandatoryFieldGroup; * class KNewUserGeneral : public KNewUserGeneralDecl, public KNewUserPage * { * Q_OBJECT + TQ_OBJECT * public: - * KNewUserGeneral(KNewUserWizard* parent, const char* name = 0); + * KNewUserGeneral(KNewUserWizard* tqparent, const char* name = 0); * KMyMoneyWizardPage* nextPage(void); * bool isLastPage(void) { return false; } * @@ -114,13 +115,13 @@ class kMandatoryFieldGroup; * fill some widgets, it could be as simple as: * * @code - * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* parent, const char* name) : - * KNewUserGeneralDecl(parent), - * KNewUserPage(1, this, parent, name) + * KNewUserGeneral::KNewUserGeneral(KNewUserWizard* tqparent, const char* name) : + * KNewUserGeneralDecl(tqparent), + * KNewUserPage(1, this, tqparent, name) * { * kMandatoryFieldGroup* mandatoryGroup = new kMandatoryFieldGroup(this); * mandatoryGroup->add(m_userName); - * connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); + * connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); * } * * KMyMoneyWizardPage* KNewUserGeneral::nextPage(void) @@ -205,16 +206,16 @@ public: * * @return pointer to widget of page */ - QWidget* widget(void) const { return m_widget; } + TQWidget* widget(void) const { return m_widget; } /** - * This method returns a pointer to the QObject used for + * This method returns a pointer to the TQObject used for * the signal/slot mechanism. * It is required by the KMyMoneyWizard and can be used * by application code for signal/slot connections as well. * Other use is not foreseen. */ - QObject* object(void) const; + TQObject* object(void) const; /** * This method returns a pointer to the widget which should @@ -223,7 +224,7 @@ public: * @return pointer to widget or 0 if none is to be selected * The default implementation returns 0 */ - virtual QWidget* initialFocusWidget(void) const { return 0; } + virtual TQWidget* initialFocusWidget(void) const { return 0; } virtual KMyMoneyWizard* wizard(void) const = 0; @@ -231,14 +232,14 @@ public: * This method returns a specific help context for the page shown * The default returns an empty string. */ - virtual const QString& helpContext(void) const; + virtual const TQString& helpContext(void) const; virtual ~KMyMoneyWizardPage() {} protected: /** * Constructor (kept protected, so that one cannot create such an object directly) */ - KMyMoneyWizardPage(unsigned int step, QWidget* widget, const char* name = 0); + KMyMoneyWizardPage(unsigned int step, TQWidget* widget, const char* name = 0); /** * This method must be called by the implementation when the @@ -255,7 +256,7 @@ protected: private: unsigned int m_step; - QWidget* m_widget; + TQWidget* m_widget; KMyMoneyWizardPagePrivate* const d; }; @@ -269,10 +270,10 @@ template <class T> class WizardPage : public KMyMoneyWizardPage { public: - WizardPage(unsigned int step, QWidget* widget, T* parent, const char* name) : + WizardPage(unsigned int step, TQWidget* widget, T* tqparent, const char* name) : KMyMoneyWizardPage(step, widget, name), - m_wizard(parent), - m_wizardBase(parent) + m_wizard(tqparent), + m_wizardBase(tqparent) { } virtual ~WizardPage() {} @@ -288,7 +289,7 @@ protected: * @author Thomas Baumgart (C) 2006 * * This is a base class for implementation of the KMyMoneyWizard. It provides - * the following layout of a wizard: + * the following tqlayout of a wizard: * * @code * +-wizardLayout-----------------------------------------------+ @@ -334,8 +335,9 @@ protected: * class KNewUserWizard : public KMyMoneyWizard * { * Q_OBJECT + TQ_OBJECT * public: - * KNewUserWizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); + * KNewUserWizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); * * private: * KNewUserGeneral* m_generalPage; @@ -353,8 +355,8 @@ protected: * The implementation is also easy and looks like this: * * @code - * KNewUserWizard::KNewUserWizard(QWidget* parent, const char* name, bool modal, WFlags flags) : - * KMyMoneyWizard(parent, name, modal, flags) + * KNewUserWizard::KNewUserWizard(TQWidget* tqparent, const char* name, bool modal, WFlags flags) : + * KMyMoneyWizard(tqparent, name, modal, flags) * { * setTitle("KMyMoney New User Setup"); * addStep("General Data"); @@ -378,33 +380,34 @@ protected: * int rc = wizard->exec(); * @endcode * - * The return code of exec() is either @p QDialog::Accepted or - * @p QDialog::Rejected. + * The return code of exec() is either @p TQDialog::Accepted or + * @p TQDialog::Rejected. * * @note The implementation of this class is heavily based on ideas found at * http://doc.trolltech.com/4.1/dialogs-complexwizard.html */ -class KMyMoneyWizard : public QDialog +class KMyMoneyWizard : public TQDialog { friend class KMyMoneyWizardPage; Q_OBJECT + TQ_OBJECT public: /** * Modify the title of the wizard to be @p txt. * * @param txt The text that should be used as title */ - void setTitle(const QString& txt); + void setTitle(const TQString& txt); /** * Add step @p text to the wizard * * @param text Text to be shown for this step */ - void addStep(const QString& text); + void addStep(const TQString& text); - QValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; } + TQValueList<KMyMoneyWizardPage*> historyPages(void) const { return m_history; } /** * This method repeats selection of the current step in the @@ -420,7 +423,7 @@ public: * * @sa KMyMoneyWizardPage::helpContext() */ - void setHelpContext(const QString& ctx) { m_helpContext = ctx; } + void setHelpContext(const TQString& ctx) { m_helpContext = ctx; } virtual ~KMyMoneyWizard(){} @@ -432,7 +435,7 @@ signals: * @param txt The name of the payee to be created * @param id A connected slot should store the id of the created object in this variable */ - void createPayee(const QString& txt, QString& id); + void createPayee(const TQString& txt, TQString& id); /** * This signal is sent out, when a new category needs to be created @@ -441,13 +444,13 @@ signals: * @param txt The name of the category to be created * @param id A connected slot should store the id of the created object in this variable */ - void createCategory(const QString& txt, QString& id); + void createCategory(const TQString& txt, TQString& id); protected: /** * Constructor (kept protected, so that one cannot create such an object directly) */ - KMyMoneyWizard(QWidget *parent = 0, const char *name = 0, bool modal = false, WFlags f = 0); + KMyMoneyWizard(TQWidget *tqparent = 0, const char *name = 0, bool modal = false, WFlags f = 0); /** * This method sets up the first page after creation of the object @@ -504,21 +507,21 @@ private: void selectStep(unsigned int step); /* - * The layouts + * The tqlayouts */ - QVBoxLayout* m_wizardLayout; - QVBoxLayout* m_stepLayout; - QVBoxLayout* m_pageLayout; - QHBoxLayout* m_buttonLayout; + TQVBoxLayout* m_wizardLayout; + TQVBoxLayout* m_stepLayout; + TQVBoxLayout* m_pageLayout; + TQHBoxLayout* m_buttonLayout; /* * Some misc. widgets required */ - QFrame* m_stepFrame; - QLabel* m_stepLabel; - QPalette m_stepPalette; + TQFrame* m_stepFrame; + TQLabel* m_stepLabel; + TQPalette m_stepPalette; - QValueList<QLabel*> m_steps; // the list of step labels + TQValueList<TQLabel*> m_steps; // the list of step labels int m_step; // the currently selected step /* @@ -529,9 +532,9 @@ private: /* * The history stack */ - QValueList<KMyMoneyWizardPage*> m_history; + TQValueList<KMyMoneyWizardPage*> m_history; - QString m_helpContext; + TQString m_helpContext; }; diff --git a/kmymoney2/widgets/kmymoneywizard_p.h b/kmymoney2/widgets/kmymoneywizard_p.h index 92d1152..853cb46 100644 --- a/kmymoney2/widgets/kmymoneywizard_p.h +++ b/kmymoney2/widgets/kmymoneywizard_p.h @@ -20,7 +20,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qobject.h> +#include <tqobject.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -32,18 +32,19 @@ * @author Thomas Baumgart (C) 2006 * * This class represents a helper object required - * to be able to use Qt's signal/slot mechanism within + * to be able to use TQt's signal/slot mechanism within * the KMyMoneyWizardPage object which cannot be - * derived from QObject directly. + * derived from TQObject directly. */ -class KMyMoneyWizardPagePrivate : public QObject +class KMyMoneyWizardPagePrivate : public TQObject { Q_OBJECT + TQ_OBJECT public: /** * Constructor */ - KMyMoneyWizardPagePrivate(QObject* parent, const char* name = 0); + KMyMoneyWizardPagePrivate(TQObject* tqparent, const char* name = 0); void emitCompleteStateChanged(void); diff --git a/kmymoney2/widgets/kschedulebriefwidget.ui b/kmymoney2/widgets/kschedulebriefwidget.ui index 7dc523d..609dcd2 100644 --- a/kmymoney2/widgets/kschedulebriefwidget.ui +++ b/kmymoney2/widgets/kschedulebriefwidget.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>kScheduleBriefWidget</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>kScheduleBriefWidget</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame3</cstring> </property> @@ -54,9 +54,9 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -68,7 +68,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_prevButton</cstring> </property> @@ -86,14 +86,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>0</height> </size> </property> </spacer> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_indexLabel</cstring> </property> @@ -111,14 +111,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>0</height> </size> </property> </spacer> - <widget class="QToolButton"> + <widget class="TQToolButton"> <property name="name"> <cstring>m_nextButton</cstring> </property> @@ -128,25 +128,25 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>60</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>60</width> <height>32767</height> @@ -156,17 +156,17 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>60</width> <height>0</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>60</width> <height>32767</height> @@ -176,7 +176,7 @@ <string>Type:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_name</cstring> </property> @@ -187,7 +187,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_account</cstring> </property> @@ -198,7 +198,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>m_type</cstring> </property> @@ -209,7 +209,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -221,7 +221,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>60</width> <height>0</height> @@ -233,7 +233,7 @@ </widget> </grid> </widget> - <widget class="QTextEdit"> + <widget class="TQTextEdit"> <property name="name"> <cstring>m_details</cstring> </property> @@ -250,7 +250,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout6</cstring> </property> @@ -274,14 +274,14 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>35</width> <height>0</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>Layout5</cstring> </property> @@ -334,7 +334,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>43</width> <height>0</height> @@ -347,5 +347,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/register.cpp b/kmymoney2/widgets/register.cpp index 974ae23..0494d51 100644 --- a/kmymoney2/widgets/register.cpp +++ b/kmymoney2/widgets/register.cpp @@ -20,12 +20,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qtimer.h> -#include <qapplication.h> -#include <qeventloop.h> -#include <qtooltip.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqapplication.h> +#include <tqeventloop.h> +#include <tqtooltip.h> +#include <tqimage.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -50,7 +50,7 @@ const int LinesPerMemo = 3; -static QString sortOrderText[] = { +static TQString sortOrderText[] = { I18N_NOOP("Unknown"), I18N_NOOP("Post date"), I18N_NOOP("Date entered"), @@ -100,7 +100,7 @@ static unsigned char fancymarker_bg_image[] = { 0x4E,0x44,0xAE,0x42,0x60,0x82 }; -QPixmap* GroupMarker::m_bg = 0; +TQPixmap* GroupMarker::m_bg = 0; int GroupMarker::m_bgRefCnt = 0; void ItemPtrVector::sort(void) @@ -124,11 +124,11 @@ void ItemPtrVector::sort(void) bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) { - const QValueList<TransactionSortField>& sortOrder = i1->parent()->sortOrder(); - QValueList<TransactionSortField>::const_iterator it; + const TQValueList<TransactionSortField>& sortOrder = i1->tqparent()->sortOrder(); + TQValueList<TransactionSortField>::const_iterator it; int rc = 0; bool ok1, ok2; - Q_ULLONG n1, n2; + TQ_ULLONG n1, n2; MyMoneyMoney tmp; @@ -147,7 +147,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) break; case PayeeSort: - rc = QString::localeAwareCompare(i1->sortPayee(), i2->sortPayee()); + rc = TQString::localeAwareCompare(i1->sortPayee(), i2->sortPayee()); break; case ValueSort: @@ -180,7 +180,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) } else if(!ok1 && ok2) { rc = 1; } else - rc = QString::localeAwareCompare(i1->sortNumber(), i2->sortNumber()); + rc = TQString::localeAwareCompare(i1->sortNumber(), i2->sortNumber()); break; case EntryOrderSort: @@ -192,7 +192,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) break; case CategorySort: - rc = QString::localeAwareCompare(i1->sortCategory(), i2->sortCategory()); + rc = TQString::localeAwareCompare(i1->sortCategory(), i2->sortCategory()); break; case ReconcileStateSort: @@ -200,7 +200,7 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) break; case SecuritySort: - rc = QString::localeAwareCompare(i1->sortSecurity(), i2->sortSecurity()); + rc = TQString::localeAwareCompare(i1->sortSecurity(), i2->sortSecurity()); break; default: @@ -220,17 +220,17 @@ bool ItemPtrVector::item_cmp(RegisterItem* i1, RegisterItem* i2) return rc < 0; } -GroupMarker::GroupMarker(Register *parent, const QString& txt) : - RegisterItem(parent), +GroupMarker::GroupMarker(Register *tqparent, const TQString& txt) : + RegisterItem(tqparent), m_txt(txt), - m_drawCounter(parent->drawCounter()-1), // make sure we get painted the first time around + m_drawCounter(tqparent->drawCounter()-1), // make sure we get painted the first time around m_showDate(false) { int h; if(m_parent) { h = m_parent->rowHeightHint(); } else { - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); h = fm.lineSpacing()+6; } @@ -241,14 +241,14 @@ GroupMarker::GroupMarker(Register *parent, const QString& txt) : // convert the backgroud once if(m_bg == 0) { - m_bg = new QPixmap; + m_bg = new TQPixmap; m_bg->loadFromData(fancymarker_bg_image, sizeof(fancymarker_bg_image)); - // for now, we can't simply resize the m_bg member as Qt does not support - // alpha resizing. So we take the (slow) detour through a QImage object + // for now, we can't simply resize the m_bg member as TQt does not support + // alpha resizing. So we take the (slow) detour through a TQImage object // which is ok, since we do this only once. // m_bg->resize(m_bg->width(), h); - QImage img(m_bg->convertToImage()); + TQImage img(m_bg->convertToImage()); img = img.smoothScale(img.width(), h); m_bg->convertFromImage(img); } @@ -265,7 +265,7 @@ GroupMarker::~GroupMarker() } } -void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, const QRect& _r, bool /*selected*/, const QColorGroup& _cg) +void GroupMarker::paintRegisterCell(TQPainter* painter, int row, int /* col */, const TQRect& _r, bool /*selected*/, const TQColorGroup& _cg) { // avoid painting the marker twice for the same update round unsigned int drawCounter = m_parent->drawCounter(); @@ -274,7 +274,7 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c } m_drawCounter = drawCounter; - QRect r(_r); + TQRect r(_r); painter->save(); painter->translate(-r.x(), -r.y()); @@ -283,35 +283,35 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c r.setWidth(m_parent->visibleWidth()); painter->translate(r.x(), r.y()); - QRect cellRect; + TQRect cellRect; cellRect.setX(0); cellRect.setY(0); cellRect.setWidth(m_parent->visibleWidth()); cellRect.setHeight(m_parent->rowHeight(row + m_startRow)); // clear out cell rectangle - QColorGroup cg(_cg); + TQColorGroup cg(_cg); setupColors(cg); - QBrush backgroundBrush(cg.base()); + TQBrush backgroundBrush(cg.base()); painter->fillRect(cellRect, backgroundBrush); painter->setPen(KMyMoneyGlobalSettings::listGridColor()); painter->drawLine(cellRect.x(), cellRect.height()-1, cellRect.width(), cellRect.height()-1); // now write the text painter->setPen(cg.text()); - QFont font = painter->font(); + TQFont font = painter->font(); font.setBold(true); painter->setFont(font); - painter->drawText(cellRect, Qt::AlignVCenter | Qt::AlignCenter, m_txt); + painter->drawText(cellRect, TQt::AlignVCenter | TQt::AlignCenter, m_txt); cellRect.setHeight(m_bg->height()); int curWidth = m_bg->width(); // if the background image is too small (not wide enough) we need to increase its width. if(curWidth < cellRect.width()) { - QPixmap* newPic = new QPixmap(cellRect.width(), cellRect.height()); + TQPixmap* newPic = new TQPixmap(cellRect.width(), cellRect.height()); int x = 0; while(x < cellRect.width()) { copyBlt(newPic, x, 0, m_bg, 0, 0, curWidth, m_bg->height()); @@ -340,15 +340,15 @@ void GroupMarker::paintRegisterCell(QPainter* painter, int row, int /* col */, c font.setBold(false); painter->setFont(font); - painter->drawText(cellRect, Qt::AlignVCenter | Qt::AlignCenter, KGlobal::locale()->formatDate(sortPostDate(), true)); + painter->drawText(cellRect, TQt::AlignVCenter | TQt::AlignCenter, KGlobal::locale()->formatDate(sortPostDate(), true)); } painter->restore(); } -void GroupMarker::setupColors(QColorGroup& cg) +void GroupMarker::setupColors(TQColorGroup& cg) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor()); } int GroupMarker::rowHeightHint(void) const @@ -359,32 +359,32 @@ int GroupMarker::rowHeightHint(void) const return m_bg->height(); } -StatementGroupMarker::StatementGroupMarker(Register* parent, CashFlowDirection dir, const QDate& date, const QString& txt) : - FancyDateGroupMarker(parent, date, txt), +StatementGroupMarker::StatementGroupMarker(Register* tqparent, CashFlowDirection dir, const TQDate& date, const TQString& txt) : + FancyDateGroupMarker(tqparent, date, txt), m_dir(dir) { m_showDate = true; } -FancyDateGroupMarker::FancyDateGroupMarker(Register* parent, const QDate& date, const QString& txt) : - GroupMarker(parent, txt), +FancyDateGroupMarker::FancyDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) : + GroupMarker(tqparent, txt), m_date(date) { } -FiscalYearGroupMarker::FiscalYearGroupMarker(Register* parent, const QDate& date, const QString& txt) : - FancyDateGroupMarker(parent, date, txt) +FiscalYearGroupMarker::FiscalYearGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) : + FancyDateGroupMarker(tqparent, date, txt) { } -void FiscalYearGroupMarker::setupColors(QColorGroup& cg) +void FiscalYearGroupMarker::setupColors(TQColorGroup& cg) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::groupMarkerColor()); } -SimpleDateGroupMarker::SimpleDateGroupMarker(Register* parent, const QDate& date, const QString& txt) : - FancyDateGroupMarker(parent, date, txt) +SimpleDateGroupMarker::SimpleDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt) : + FancyDateGroupMarker(tqparent, date, txt) { } @@ -396,9 +396,9 @@ int SimpleDateGroupMarker::rowHeightHint(void) const return RegisterItem::rowHeightHint() / 2; } -void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /*col*/, const QRect& _r, bool /*selected*/, const QColorGroup& _cg) +void SimpleDateGroupMarker::paintRegisterCell(TQPainter* painter, int row, int /*col*/, const TQRect& _r, bool /*selected*/, const TQColorGroup& _cg) { - QRect r(_r); + TQRect r(_r); painter->save(); painter->translate(-r.x(), -r.y()); @@ -407,20 +407,20 @@ void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /* r.setWidth(m_parent->visibleWidth()); painter->translate(r.x(), r.y()); - QRect cellRect; + TQRect cellRect; cellRect.setX(0); cellRect.setY(0); cellRect.setWidth(m_parent->visibleWidth()); cellRect.setHeight(m_parent->rowHeight(row + m_startRow)); // clear out cell rectangle - QColorGroup cg(_cg); + TQColorGroup cg(_cg); if(m_alternate) - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); - QBrush backgroundBrush(cg.base()); - // backgroundBrush.setStyle(Qt::DiagCrossPattern); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + TQBrush backgroundBrush(cg.base()); + // backgroundBrush.setStyle(TQt::DiagCrossPattern); backgroundBrush.setStyle(Qt::Dense5Pattern); backgroundBrush.setColor(KMyMoneyGlobalSettings::listGridColor()); painter->eraseRect(cellRect); @@ -431,8 +431,8 @@ void SimpleDateGroupMarker::paintRegisterCell(QPainter* painter, int row, int /* painter->restore(); } -TypeGroupMarker::TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType) : - GroupMarker(parent), +TypeGroupMarker::TypeGroupMarker(Register* tqparent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType) : + GroupMarker(tqparent), m_dir(dir) { switch(dir) { @@ -454,18 +454,18 @@ TypeGroupMarker::TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMone } } -PayeeGroupMarker::PayeeGroupMarker(Register* parent, const QString& name) : - GroupMarker(parent, name) +PayeeGroupMarker::PayeeGroupMarker(Register* tqparent, const TQString& name) : + GroupMarker(tqparent, name) { } -CategoryGroupMarker::CategoryGroupMarker(Register* parent, const QString& category) : - GroupMarker(parent, category) +CategoryGroupMarker::CategoryGroupMarker(Register* tqparent, const TQString& category) : + GroupMarker(tqparent, category) { } -ReconcileGroupMarker::ReconcileGroupMarker(Register* parent, MyMoneySplit::reconcileFlagE state) : - GroupMarker(parent), +ReconcileGroupMarker::ReconcileGroupMarker(Register* tqparent, MyMoneySplit::reconcileFlagE state) : + GroupMarker(tqparent), m_state(state) { switch(state) { @@ -487,30 +487,30 @@ ReconcileGroupMarker::ReconcileGroupMarker(Register* parent, MyMoneySplit::recon } } -class RegisterToolTip : public QToolTip +class RegisterToolTip : public TQToolTip { public: - RegisterToolTip(QWidget* parent, Register* reg); - void maybeTip(const QPoint& pos); + RegisterToolTip(TQWidget* tqparent, Register* reg); + void maybeTip(const TQPoint& pos); virtual ~RegisterToolTip() {} private: Register* m_register; }; -RegisterToolTip::RegisterToolTip(QWidget* parent, Register * reg) : - QToolTip(parent), +RegisterToolTip::RegisterToolTip(TQWidget* tqparent, Register * reg) : + TQToolTip(tqparent), m_register(reg) { } -void RegisterToolTip::maybeTip(const QPoint& pos) +void RegisterToolTip::maybeTip(const TQPoint& pos) { // if we update the register, there's no need to show tooltips if(!m_register->isUpdatesEnabled()) return; - QPoint cpos = m_register->viewportToContents(pos); + TQPoint cpos = m_register->viewportToContents(pos); // qDebug("RegisterToolTip::mayBeTip(%d,%d)", cpos.x(), cpos.y()); int row = m_register->rowAt(cpos.y()); int col = m_register->columnAt(cpos.x()); @@ -518,25 +518,25 @@ void RegisterToolTip::maybeTip(const QPoint& pos) if(!item) return; - QPoint relPos(cpos.x() - m_register->columnPos(0), cpos.y() - m_register->rowPos(item->startRow())); + TQPoint relPos(cpos.x() - m_register->columnPos(0), cpos.y() - m_register->rowPos(item->startRow())); row = row - item->startRow(); // qDebug("row = %d, col = %d", row, col); // qDebug("relpos = %d,%d", relPos.x(), relPos.y()); - QString msg; - QRect rect; + TQString msg; + TQRect rect; if(!item->maybeTip(cpos, row, col, rect, msg)) return; - QPoint tl(rect.topLeft()); - QPoint br(rect.bottomRight()); - QRect r = QRect(m_register->contentsToViewport(tl), m_register->contentsToViewport(br)); + TQPoint tl(rect.topLeft()); + TQPoint br(rect.bottomRight()); + TQRect r = TQRect(m_register->contentsToViewport(tl), m_register->contentsToViewport(br)); tip(r, msg); return; } -Register::Register(QWidget *parent, const char *name ) : - TransactionEditorContainer(parent, name), +Register::Register(TQWidget *tqparent, const char *name ) : + TransactionEditorContainer(tqparent, name), m_selectAnchor(0), m_focusItem(0), m_firstItem(0), @@ -550,7 +550,7 @@ Register::Register(QWidget *parent, const char *name ) : m_listsDirty(false), m_ignoreNextButtonRelease(false), m_needInitialColumnResize(false), - m_buttonState(Qt::ButtonState(0)), + m_buttonState(TQt::ButtonState(0)), m_drawCounter(0) { m_tooltip = new RegisterToolTip(viewport(), this); @@ -587,32 +587,32 @@ Register::Register(QWidget *parent, const char *name ) : horizontalHeader()->installEventFilter(this); // never show horizontal scroll bars - setHScrollBarMode(QScrollView::AlwaysOff); + setHScrollBarMode(TQScrollView::AlwaysOff); - connect(this, SIGNAL(clicked(int, int, int, const QPoint&)), this, SLOT(selectItem(int, int, int, const QPoint&))); - connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)), this, SLOT(slotDoubleClicked(int, int, int, const QPoint&))); + connect(this, TQT_SIGNAL(clicked(int, int, int, const TQPoint&)), this, TQT_SLOT(selectItem(int, int, int, const TQPoint&))); + connect(this, TQT_SIGNAL(doubleClicked(int, int, int, const TQPoint&)), this, TQT_SLOT(slotDoubleClicked(int, int, int, const TQPoint&))); // double clicking the header turns on auto column sizing - connect(horizontalHeader(), SIGNAL(sectionSizeChanged(int)), this, SLOT(slotAutoColumnSizing(int))); + connect(horizontalHeader(), TQT_SIGNAL(sectionSizeChanged(int)), this, TQT_SLOT(slotAutoColumnSizing(int))); //DND setAcceptDrops(true); } // DND -Transaction* Register::dropTransaction(QPoint cPos) const +Transaction* Register::dropTransaction(TQPoint cPos) const { Transaction* t = 0; - cPos -= QPoint( verticalHeader()->width(), horizontalHeader()->height() ); + cPos -= TQPoint( verticalHeader()->width(), horizontalHeader()->height() ); if(cPos.y() >= 0) { - cPos += QPoint(contentsX(), contentsY()); + cPos += TQPoint(contentsX(), contentsY()); int row = rowAt(cPos.y()); t = dynamic_cast<Transaction*>(itemAtRow(row)); } return t; } -void Register::dragMoveEvent(QDragMoveEvent* event) +void Register::dragMoveEvent(TQDragMoveEvent* event) { if ( KURLDrag::canDecode(event) ) { event->ignore(); @@ -623,7 +623,7 @@ void Register::dragMoveEvent(QDragMoveEvent* event) } } -void Register::dropEvent(QDropEvent* event) +void Register::dropEvent(TQDropEvent* event) { qDebug("Register::dropEvent"); if ( KURLDrag::canDecode(event) ) { @@ -657,7 +657,7 @@ void Register::slotAutoColumnSizing(int section) // but no account? (ipwizard 2007-11-06) if(isUpdatesEnabled()) { int w = visibleWidth(); - QString size; + TQString size; for(int i=0; i < numCols(); ++i) { if(i) size += ","; @@ -665,7 +665,7 @@ void Register::slotAutoColumnSizing(int section) size += "0"; continue; } - size += QString("%1").arg((columnWidth(i) * 100) / w); + size += TQString("%1").tqarg((columnWidth(i) * 100) / w); } qDebug("size = %s", size.data()); m_account.setValue("kmm-ledger-column-width", size); @@ -673,34 +673,34 @@ void Register::slotAutoColumnSizing(int section) #endif } -bool Register::eventFilter(QObject* o, QEvent* e) +bool Register::eventFilter(TQObject* o, TQEvent* e) { - if(o == horizontalHeader() && e->type() == QEvent::MouseButtonPress) { - QMouseEvent *me = dynamic_cast<QMouseEvent*>(e); + if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(horizontalHeader()) && e->type() == TQEvent::MouseButtonPress) { + TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e); if(me->button() == Qt::RightButton) { emit headerClicked(); } // eat up left mouse button press for now return true; - } else if(o == horizontalHeader() && e->type() == QEvent::Paint) { + } else if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(horizontalHeader()) && e->type() == TQEvent::Paint) { // always show the header in bold (to suppress cell selection) - QFont f(horizontalHeader()->font()); + TQFont f(horizontalHeader()->font()); f.setBold(true); horizontalHeader()->setFont(f); - } else if(o == this && e->type() == QEvent::KeyPress) { - QKeyEvent* ke = dynamic_cast<QKeyEvent*>(e); - if(ke->key() == Qt::Key_Menu) { + } else if(TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::KeyPress) { + TQKeyEvent* ke = dynamic_cast<TQKeyEvent*>(e); + if(ke->key() == TQt::Key_Menu) { emit openContextMenu(); return true; } } - return QTable::eventFilter(o, e); + return TQTable::eventFilter(o, e); } -void Register::setupRegister(const MyMoneyAccount& account, const QValueList<Column>& cols) +void Register::setupRegister(const MyMoneyAccount& account, const TQValueList<Column>& cols) { m_account = account; bool enabled = isUpdatesEnabled(); @@ -712,7 +712,7 @@ void Register::setupRegister(const MyMoneyAccount& account, const QValueList<Col m_needInitialColumnResize = true; m_lastCol = static_cast<Column>(0); - QValueList<Column>::const_iterator it_c; + TQValueList<Column>::const_iterator it_c; for(it_c = cols.begin(); it_c != cols.end(); ++it_c) { if((*it_c) > MaxColumns) continue; @@ -844,13 +844,13 @@ void Register::setupRegister(const MyMoneyAccount& account, bool showAccountColu bool Register::focusNextPrevChild(bool next) { - return QFrame::focusNextPrevChild(next); + return TQFrame::focusNextPrevChild(next); } -void Register::setSortOrder(const QString& order) +void Register::setSortOrder(const TQString& order) { - QStringList orderList = QStringList::split(",", order); - QStringList::const_iterator it; + TQStringList orderList = TQStringList::split(",", order); + TQStringList::const_iterator it; m_sortOrder.clear(); for(it = orderList.begin(); it != orderList.end(); ++it) { m_sortOrder << static_cast<TransactionSortField>((*it).toInt()); @@ -869,7 +869,7 @@ void Register::sortItems(void) RegisterItem* prev = 0; RegisterItem* item; m_firstItem = m_lastItem = 0; - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { item = m_items[i]; if(!item) continue; @@ -929,7 +929,7 @@ void Register::clear(void) #ifndef KMM_DESIGNER // recalculate row height hint - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); m_rowHeightHint = fm.lineSpacing()+6; #endif @@ -998,7 +998,7 @@ void Register::removeItem(RegisterItem* p) p->setPrevItem(0); // remove it from the m_items array - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { RegisterItem* item = m_items[i]; if(!item) continue; @@ -1030,7 +1030,7 @@ void Register::setupItemIndex(int rowCount) rowCount = 0; RegisterItem* prev = 0; m_firstItem = m_lastItem = 0; - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { RegisterItem* item = m_items[i]; if(!item) continue; @@ -1048,11 +1048,11 @@ void Register::setupItemIndex(int rowCount) } } -void Register::drawContents( QPainter *p, int cx, int cy, int cw, int ch ) +void Register::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) { - // the QTable::drawContents() method does not honor the block update flag + // the TQTable::drawContents() method does not honor the block update flag // so we take care of it here - if ( testWState(WState_Visible|WState_BlockUpdates) != WState_Visible ) + if ( testWState((TQt::WidgetState)(WState_Visible|WState_BlockUpdates)) != WState_Visible ) return; if(m_listsDirty) { @@ -1060,13 +1060,13 @@ void Register::drawContents( QPainter *p, int cx, int cy, int cw, int ch ) } ++m_drawCounter; - QTable::drawContents(p, cx, cy, cw, ch); + TQTable::drawContents(p, cx, cy, cw, ch); } void Register::updateAlternate(void) const { bool alternate = false; - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { RegisterItem* item = m_items[i]; if(!item) continue; @@ -1110,7 +1110,7 @@ void Register::updateRegister(bool forceUpdateRowHeight) int rowCount = 0; // determine the number of rows we need to display all items // while going through the list, check for erronous transactions - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { RegisterItem* item = m_items[i]; if(!item) continue; @@ -1132,7 +1132,7 @@ void Register::updateRegister(bool forceUpdateRowHeight) bool needUpdateHeaders = (numRows() != rowCount) | forceUpdateRowHeight; - // setup QTable. Make sure to suppress screen updates for now + // setup TQTable. Make sure to suppress screen updates for now bool updatesEnabled = isUpdatesEnabled(); setUpdatesEnabled(false); setNumRows(rowCount); @@ -1163,7 +1163,7 @@ void Register::updateRegister(bool forceUpdateRowHeight) // force resizeing of the columns if necessary if(m_needInitialColumnResize) { - QTimer::singleShot(0, this, SLOT(resize())); + TQTimer::singleShot(0, this, TQT_SLOT(resize())); m_needInitialColumnResize = false; } else { updateContents(); @@ -1171,7 +1171,7 @@ void Register::updateRegister(bool forceUpdateRowHeight) // if the number of rows changed, we might need to resize the register // to make sure we reflect the current visibility of the scrollbars. if(needUpdateHeaders) - QTimer::singleShot(0, this, SLOT(resize())); + TQTimer::singleShot(0, this, TQT_SLOT(resize())); } } ::timetrace("Done updateing register"); @@ -1185,7 +1185,7 @@ int Register::rowHeightHint(void) const return m_rowHeightHint; } -void Register::paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg) +void Register::paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg) { // determine the item that we need to paint in the row and call it's paintRegisterCell() method if((row < 0) || ((unsigned)row > m_itemIndex.size())) { @@ -1198,22 +1198,22 @@ void Register::paintCell(QPainter* painter, int row, int col, const QRect& r, bo item->paintRegisterCell(painter, row - item->startRow(), col, r, selected, cg); } -void Register::focusInEvent(QFocusEvent* ev) +void Register::focusInEvent(TQFocusEvent* ev) { - QTable::focusInEvent(ev); + TQTable::focusInEvent(ev); if(m_focusItem) { m_focusItem->setFocus(true, false); - repaintItems(m_focusItem); + tqrepaintItems(m_focusItem); } } -void Register::focusOutEvent(QFocusEvent* ev) +void Register::focusOutEvent(TQFocusEvent* ev) { if(m_focusItem) { m_focusItem->setFocus(false, false); - repaintItems(m_focusItem); + tqrepaintItems(m_focusItem); } - QTable::focusOutEvent(ev); + TQTable::focusOutEvent(ev); } void Register::resize(void) @@ -1292,9 +1292,9 @@ void Register::resize(int col) kMyMoneyEdit* valField = new kMyMoneyEdit; dateField->setFont(KMyMoneyGlobalSettings::listCellFont()); - setColumnWidth(DateColumn, dateField->minimumSizeHint().width()); + setColumnWidth(DateColumn, dateField->tqminimumSizeHint().width()); valField->setMinimumWidth(ewidth); - ewidth = valField->minimumSizeHint().width(); + ewidth = valField->tqminimumSizeHint().width(); if(swidth > 0) { swidth = columnWidth(SecurityColumn) + 40; @@ -1325,7 +1325,7 @@ void Register::resize(int col) #if 0 // see comment above } else { - QStringList colSizes = QStringList::split(",", m_account.value("kmm-ledger-column-width"), true); + TQStringList colSizes = TQStringList::split(",", m_account.value("kmm-ledger-column-width"), true); for(int i; i < colSizes.count(); ++i) { int colWidth = colSizes[i].toInt(); if(colWidth == 0) @@ -1353,15 +1353,15 @@ void Register::adjustColumn(int col) #ifdef KMM_DESIGNER Q_UNUSED(col) #else - QString msg = "%1 adjusting column %2"; - ::timetrace((msg.arg("Start").arg(col)).data()); - QHeader *topHeader = horizontalHeader(); - QFontMetrics cellFontMetrics(KMyMoneyGlobalSettings::listCellFont()); + TQString msg = "%1 adjusting column %2"; + ::timetrace((msg.tqarg("Start").tqarg(col)).ascii()); + TQHeader *topHeader = horizontalHeader(); + TQFontMetrics cellFontMetrics(KMyMoneyGlobalSettings::listCellFont()); int w = topHeader->fontMetrics().width( topHeader->label( col ) ) + 10; if ( topHeader->iconSet( col ) ) w += topHeader->iconSet( col )->pixmap().width(); - w = QMAX( w, 20 ); + w = TQMAX( w, 20 ); int maxWidth = 0; switch(col) { @@ -1374,9 +1374,9 @@ void Register::adjustColumn(int col) // check for date column if(col == DateColumn) { - QString txt = KGlobal::locale()->formatDate(QDate(6999,12,29), true); + TQString txt = KGlobal::locale()->formatDate(TQDate(6999,12,29), true); int nw = cellFontMetrics.width(txt+" "); - w = QMAX( w, nw ); + w = TQMAX( w, nw ); } else { // scan through the transactions @@ -1387,7 +1387,7 @@ void Register::adjustColumn(int col) Transaction* t = dynamic_cast<Transaction*>(item); if(t) { int nw = t->registerColWidth(col, cellFontMetrics); - w = QMAX( w, nw ); + w = TQMAX( w, nw ); if(maxWidth) { if(w > maxWidth) { w = maxWidth; @@ -1402,7 +1402,7 @@ void Register::adjustColumn(int col) #endif } -void Register::repaintItems(RegisterItem* first, RegisterItem* last) +void Register::tqrepaintItems(RegisterItem* first, RegisterItem* last) { if(first == 0 && last == 0) { first = firstItem(); @@ -1415,26 +1415,26 @@ void Register::repaintItems(RegisterItem* first, RegisterItem* last) if(last == 0) last = first; - // qDebug("repaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1); + // qDebug("tqrepaintItems from row %d to row %d", first->startRow(), last->startRow()+last->numRowsRegister()-1); // the following code is based on code I found in - // QTable::cellGeometry() and QTable::updateCell() (ipwizard) - QRect cg(0, + // TQTable::cellGeometry() and TQTable::updateCell() (ipwizard) + TQRect cg(0, rowPos(first->startRow()), visibleWidth(), rowPos(last->startRow()+last->numRowsRegister()-1) - rowPos(first->startRow()) + rowHeight(last->startRow()+last->numRowsRegister()-1)); - QRect r(contentsToViewport(QPoint (cg.x() - 2, cg.y() - 2 )), QSize(cg.width() + 4, cg.height() + 4 )); + TQRect r(contentsToViewport(TQPoint (cg.x() - 2, cg.y() - 2 )), TQSize(cg.width() + 4, cg.height() + 4 )); - QRect tmp = m_lastRepaintRect | r; + TQRect tmp = m_lastRepaintRect | r; if(abs(tmp.height()) > 3000) { - // make sure that the previously triggered repaint has been done before we + // make sure that the previously triggered tqrepaint has been done before we // trigger the next. Not having this used to cause some trouble when changing // the focus within a 2000 item ledger from the last to the first item. - QApplication::eventLoop()->processEvents(QEventLoop::ExcludeUserInput, 10); + TQApplication::eventLoop()->processEvents(TQEventLoop::ExcludeUserInput, 10); } m_lastRepaintRect = r; - QApplication::postEvent( viewport(), new QPaintEvent( r, FALSE ) ); + TQApplication::postEvent( viewport(), new TQPaintEvent( r, FALSE ) ); } @@ -1477,7 +1477,7 @@ void Register::doSelectItems(int from, int to, bool selected) // anything changed? if(firstItem || lastItem) - repaintItems(firstItem, lastItem); + tqrepaintItems(firstItem, lastItem); } RegisterItem* Register::itemAtRow(int row) const @@ -1505,7 +1505,7 @@ void Register::selectedTransactions(SelectedTransactions& list) const if(m_focusItem && m_focusItem->isSelected() && m_focusItem->isVisible()) { Transaction* t = dynamic_cast<Transaction*>(m_focusItem); if(t) { - QString id; + TQString id; if(t->isScheduled()) id = t->transaction().id(); SelectedTransaction s(t->transaction(), t->split(), id); @@ -1521,7 +1521,7 @@ void Register::selectedTransactions(SelectedTransactions& list) const if(item && item->isSelected() && item->isVisible()) { Transaction* t = dynamic_cast<Transaction*>(item); if(t) { - QString id; + TQString id; if(t->isScheduled()) id = t->transaction().id(); SelectedTransaction s(t->transaction(), t->split(), id); @@ -1531,9 +1531,9 @@ void Register::selectedTransactions(SelectedTransactions& list) const } } -QValueList<RegisterItem*> Register::selectedItems(void) const +TQValueList<RegisterItem*> Register::selectedItems(void) const { - QValueList<RegisterItem*> list; + TQValueList<RegisterItem*> list; RegisterItem* item = m_firstItem; while(item) { @@ -1557,7 +1557,7 @@ int Register::selectedItemsCount(void) const return cnt; } -void Register::contentsMouseReleaseEvent( QMouseEvent *e ) +void Register::contentsMouseReleaseEvent( TQMouseEvent *e ) { if(m_ignoreNextButtonRelease) { m_ignoreNextButtonRelease = false; @@ -1565,10 +1565,10 @@ void Register::contentsMouseReleaseEvent( QMouseEvent *e ) } m_buttonState = e->state(); - QTable::contentsMouseReleaseEvent(e); + TQTable::contentsMouseReleaseEvent(e); } -void Register::selectItem(int row, int col, int button, const QPoint& /* mousePos */) +void Register::selectItem(int row, int col, int button, const TQPoint& /* mousePos */) { if(row >= 0 && (unsigned)row < m_itemIndex.size()) { RegisterItem* item = m_itemIndex[row]; @@ -1578,7 +1578,7 @@ void Register::selectItem(int row, int col, int button, const QPoint& /* mousePo if(item->hasEditorOpen() || !item->isSelectable()) return; - QString id = item->id(); + TQString id = item->id(); selectItem(item); // selectItem() might have changed the pointers, so we // need to reconstruct it here @@ -1616,9 +1616,9 @@ bool Register::setFocusItem(RegisterItem* focusItem) if(focusItem && focusItem->canHaveFocus()) { if(m_focusItem) { m_focusItem->setFocus(false); - // issue a repaint here only if we move the focus + // issue a tqrepaint here only if we move the focus if(m_focusItem != focusItem) - repaintItems(m_focusItem); + tqrepaintItems(m_focusItem); } Transaction* item = dynamic_cast<Transaction*>(focusItem); if(m_focusItem != focusItem && item) { @@ -1630,7 +1630,7 @@ bool Register::setFocusItem(RegisterItem* focusItem) if(m_listsDirty) updateRegister(KMyMoneyGlobalSettings::ledgerLens() | !KMyMoneyGlobalSettings::transactionForm()); ensureItemVisible(m_focusItem); - repaintItems(m_focusItem); + tqrepaintItems(m_focusItem); return true; } else return false; @@ -1654,15 +1654,15 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections) // kdDebug(2) << "Register::selectItem(" << item << "): type is " << typeid(*item).name() << endl; - Qt::ButtonState buttonState = m_buttonState; + TQt::ButtonState buttonState = m_buttonState; m_buttonState = Qt::NoButton; if(m_selectionMode == NoSelection) return; if(item->isSelectable()) { - QString id = item->id(); - QValueList<RegisterItem*> itemList = selectedItems(); + TQString id = item->id(); + TQValueList<RegisterItem*> itemList = selectedItems(); bool okToSelect = true; int cnt = itemList.count(); bool sameEntryType = true; @@ -1672,7 +1672,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections) } if(buttonState & Qt::LeftButton) { - if(!(buttonState & (Qt::ShiftButton | Qt::ControlButton))) { + if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) { if((cnt != 1) || ((cnt == 1) && !item->isSelected())) { emit aboutToSelectItem(item, okToSelect); if(okToSelect) { @@ -1688,8 +1688,8 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections) } if(m_selectionMode == Multi) { - switch(buttonState & (Qt::ShiftButton | Qt::ControlButton)) { - case Qt::ControlButton: + switch(buttonState & (TQt::ShiftButton | TQt::ControlButton)) { + case TQt::ControlButton: okToSelect = sameEntryType; if(typeid(*item) == typeid(StdTransactionScheduled)) okToSelect = false; @@ -1703,7 +1703,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections) } break; - case Qt::ShiftButton: + case TQt::ShiftButton: okToSelect = sameEntryType; if(typeid(*item) == typeid(StdTransactionScheduled)) okToSelect = false; @@ -1725,7 +1725,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections) // // a) single transaction is selected // b) multiple transactions are selected and the one to be selected is not - if(!(buttonState & (Qt::ShiftButton | Qt::ControlButton))) { + if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) { if((cnt > 0) && (!item->isSelected())) { okToSelect = sameEntryType; emit aboutToSelectItem(item, okToSelect); @@ -1766,10 +1766,10 @@ void Register::ensureItemVisible(RegisterItem* item) return; m_ensureVisibleItem = item; - QTimer::singleShot(0, this, SLOT(slotEnsureItemVisible())); + TQTimer::singleShot(0, this, TQT_SLOT(slotEnsureItemVisible())); } -void Register::slotDoubleClicked(int row, int, int, const QPoint&) +void Register::slotDoubleClicked(int row, int, int, const TQPoint&) { if(row >= 0 && (unsigned)row < m_itemIndex.size()) { RegisterItem* p = m_itemIndex[row]; @@ -1785,8 +1785,8 @@ void Register::slotDoubleClicked(int row, int, int, const QPoint&) if(m_focusItem->isSelected()) { // don't emit the signal right away but wait until - // we come back to the Qt main loop - QTimer::singleShot(0, this, SIGNAL(editTransaction())); + // we come back to the TQt main loop + TQTimer::singleShot(0, this, TQT_SIGNAL(editTransaction())); } } } @@ -1846,7 +1846,7 @@ void Register::slotEnsureItemVisible(void) } } -TransactionSortField KMyMoneyRegister::textToSortOrder(const QString& text) +TransactionSortField KMyMoneyRegister::textToSortOrder(const TQString& text) { for(int idx = 1; idx < static_cast<int>(MaxSortFields); ++idx) { if(text == i18n(sortOrderText[idx])) { @@ -1856,22 +1856,22 @@ TransactionSortField KMyMoneyRegister::textToSortOrder(const QString& text) return UnknownSort; } -const QString KMyMoneyRegister::sortOrderToText(TransactionSortField idx) +const TQString KMyMoneyRegister::sortOrderToText(TransactionSortField idx) { if(idx < PostDateSort || idx >= MaxSortFields) idx = UnknownSort; return i18n(sortOrderText[idx]); } -QString Register::text(int /*row*/, int /*col*/) const +TQString Register::text(int /*row*/, int /*col*/) const { - return QString("a"); + return TQString("a"); } -QWidget* Register::cellWidget(int row, int col) const +TQWidget* Register::cellWidget(int row, int col) const { // separeted here in two if()s, because this method is called for each - // event from QTable::eventFilter and in the most cases it is -1, -1 + // event from TQTable::eventFilter and in the most cases it is -1, -1 if(row < 0 || col < 0) return 0; @@ -1884,24 +1884,24 @@ QWidget* Register::cellWidget(int row, int col) const if(!m_cellWidgets.count()) return 0; - QWidget* w = 0; - QPair<int, int> idx = qMakePair(row, col); - QMap<QPair<int, int>, QWidget*>::const_iterator it_w; + TQWidget* w = 0; + TQPair<int, int> idx = tqMakePair(row, col); + TQMap<TQPair<int, int>, TQWidget*>::const_iterator it_w; - it_w = m_cellWidgets.find(idx); + it_w = m_cellWidgets.tqfind(idx); if(it_w != m_cellWidgets.end()) w = *it_w; return w; } -void Register::insertWidget(int row, int col, QWidget* w) +void Register::insertWidget(int row, int col, TQWidget* w) { if(row < 0 || col < 0 || row > numRows() - 1 || col > numCols() - 1) { qWarning("Register::insertWidget(%d,%d) out of bounds", row, col); return; } - QPair<int, int> idx = qMakePair(row, col); + TQPair<int, int> idx = tqMakePair(row, col); m_cellWidgets[idx] = w; } @@ -1912,17 +1912,17 @@ void Register::clearCellWidget(int row, int col) return; } - QPair<int, int> idx = qMakePair(row, col); - QMap<QPair<int, int>, QWidget*>::iterator it_w; + TQPair<int, int> idx = tqMakePair(row, col); + TQMap<TQPair<int, int>, TQWidget*>::iterator it_w; - it_w = m_cellWidgets.find(idx); + it_w = m_cellWidgets.tqfind(idx); if(it_w != m_cellWidgets.end()) { (*it_w)->deleteLater(); m_cellWidgets.remove(it_w); } } -QWidget* Register::createEditor(int /*row*/, int /*col*/, bool /*initFromCell*/) const +TQWidget* Register::createEditor(int /*row*/, int /*col*/, bool /*initFromCell*/) const { return 0; } @@ -1931,28 +1931,28 @@ void Register::setCellContentFromEditor(int /*row*/, int /*col*/) { } -void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*replace*/) +void Register::endEdit(int /*row*/, int /*col*/, bool /*accept*/, bool /*tqreplace*/) { } -void Register::arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) +void Register::arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) { t->arrangeWidgetsInRegister(editWidgets); ensureItemVisible(t); // updateContents(); } -void Register::tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const +void Register::tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const { t->tabOrderInRegister(tabOrderWidgets); } -void Register::removeEditWidgets(QMap<QString, QWidget*>& editWidgets) +void Register::removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets) { // remove pointers from map - QMap<QString, QWidget*>::iterator it; + TQMap<TQString, TQWidget*>::iterator it; for(it = editWidgets.begin(); it != editWidgets.end(); ) { - if((*it)->parentWidget() == this) { + if((*it)->tqparentWidget() == this) { editWidgets.remove(it); it = editWidgets.begin(); } else @@ -1980,20 +1980,20 @@ void Register::slotToggleErronousTransactions(void) KMyMoneyRegister::RegisterItem* p = m_firstErronous; while(p && p->prevItem() != m_lastErronous) { if(p->isErronous()) - repaintItems(p); + tqrepaintItems(p); p = p->nextItem(); } // restart timer - QTimer::singleShot(500, this, SLOT(slotToggleErronousTransactions())); + TQTimer::singleShot(500, this, TQT_SLOT(slotToggleErronousTransactions())); } -RegisterItem* Register::itemById(const QString& id) const +RegisterItem* Register::itemById(const TQString& id) const { if(id.isEmpty()) return m_lastItem; - for(QValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { + for(TQValueVector<RegisterItem*>::size_type i = 0; i < m_items.size(); ++i) { RegisterItem* item = m_items[i]; if(!item) continue; @@ -2097,7 +2097,7 @@ void Register::scrollPage(int key, ButtonState state) int height = 0; switch(key) { - case Qt::Key_PageUp: + case TQt::Key_PageUp: while(height < visibleHeight() && item->prevItem()) { do { item = item->prevItem(); @@ -2106,7 +2106,7 @@ void Register::scrollPage(int key, ButtonState state) } while((!item->isSelectable() || !item->isVisible()) && item->prevItem()); } break; - case Qt::Key_PageDown: + case TQt::Key_PageDown: while(height < visibleHeight() && item->nextItem()) { do { if(item->isVisible()) @@ -2116,7 +2116,7 @@ void Register::scrollPage(int key, ButtonState state) } break; - case Qt::Key_Up: + case TQt::Key_Up: if(item->prevItem()) { do { item = item->prevItem(); @@ -2124,7 +2124,7 @@ void Register::scrollPage(int key, ButtonState state) } break; - case Qt::Key_Down: + case TQt::Key_Down: if(item->nextItem()) { do { item = item->nextItem(); @@ -2132,13 +2132,13 @@ void Register::scrollPage(int key, ButtonState state) } break; - case Qt::Key_Home: + case TQt::Key_Home: item = m_firstItem; while((!item->isSelectable() || !item->isVisible()) && item->nextItem()) item = item->nextItem(); break; - case Qt::Key_End: + case TQt::Key_End: item = m_lastItem; while((!item->isSelectable() || !item->isVisible()) && item->prevItem()) item = item->prevItem(); @@ -2159,7 +2159,7 @@ void Register::scrollPage(int key, ButtonState state) setFocusItem(item); if(item->isSelectable()) { - handleItemChange(oldFocusItem, state & Qt::ShiftButton, state & Qt::ControlButton); + handleItemChange(oldFocusItem, state & TQt::ShiftButton, state & TQt::ControlButton); // tell the world about the changes in selection SelectedTransactions list(this); emit selectionChanged(list); @@ -2169,45 +2169,45 @@ void Register::scrollPage(int key, ButtonState state) selectItem(item); } -void Register::keyPressEvent(QKeyEvent* ev) +void Register::keyPressEvent(TQKeyEvent* ev) { switch(ev->key()) { - case Qt::Key_Space: + case TQt::Key_Space: if(m_selectionMode != NoSelection) { // get the state out of the event ... m_buttonState = ev->state(); // ... and pretend that we have pressed the left mouse button ;) - m_buttonState = static_cast<Qt::ButtonState>(m_buttonState | Qt::LeftButton); + m_buttonState = static_cast<TQt::ButtonState>(m_buttonState | Qt::LeftButton); selectItem(m_focusItem); } break; - case Qt::Key_PageUp: - case Qt::Key_PageDown: - case Qt::Key_Home: - case Qt::Key_End: - case Qt::Key_Down: - case Qt::Key_Up: + case TQt::Key_PageUp: + case TQt::Key_PageDown: + case TQt::Key_Home: + case TQt::Key_End: + case TQt::Key_Down: + case TQt::Key_Up: scrollPage(ev->key(), ev->state()); break; default: - QTable::keyPressEvent(ev); + TQTable::keyPressEvent(ev); break; } } -Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) +Transaction* Register::transactionFactory(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) { Transaction* t = 0; MyMoneySplit s = split; - if(parent->account() == MyMoneyAccount()) { - t = new KMyMoneyRegister::StdTransaction(parent, transaction, s, uniqueId); + if(tqparent->account() == MyMoneyAccount()) { + t = new KMyMoneyRegister::StdTransaction(tqparent, transaction, s, uniqueId); return t; } - switch(parent->account().accountType()) { + switch(tqparent->account().accountType()) { case MyMoneyAccount::Checkings: case MyMoneyAccount::Savings: case MyMoneyAccount::Cash: @@ -2221,29 +2221,29 @@ Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransac case MyMoneyAccount::AssetLoan: case MyMoneyAccount::Equity: if(s.accountId().isEmpty()) - s.setAccountId(parent->account().id()); + s.setAccountId(tqparent->account().id()); if(s.isMatched()) - t = new KMyMoneyRegister::StdTransactionMatched(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::StdTransactionMatched(tqparent, transaction, s, uniqueId); else if(transaction.isImported()) - t = new KMyMoneyRegister::StdTransactionDownloaded(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::StdTransactionDownloaded(tqparent, transaction, s, uniqueId); else - t = new KMyMoneyRegister::StdTransaction(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::StdTransaction(tqparent, transaction, s, uniqueId); break; case MyMoneyAccount::Investment: if(s.isMatched()) - t = new KMyMoneyRegister::InvestTransaction/* Matched */(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::InvestTransaction/* Matched */(tqparent, transaction, s, uniqueId); else if(transaction.isImported()) - t = new KMyMoneyRegister::InvestTransactionDownloaded(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::InvestTransactionDownloaded(tqparent, transaction, s, uniqueId); else - t = new KMyMoneyRegister::InvestTransaction(parent, transaction, s, uniqueId); + t = new KMyMoneyRegister::InvestTransaction(tqparent, transaction, s, uniqueId); break; case MyMoneyAccount::CertificateDep: case MyMoneyAccount::MoneyMarket: case MyMoneyAccount::Stock: default: - qDebug("Register::transactionFactory: invalid accountTypeE %d", parent->account().accountType()); + qDebug("Register::transactionFactory: invalid accountTypeE %d", tqparent->account().accountType()); break; } return t; @@ -2251,25 +2251,25 @@ Transaction* Register::transactionFactory(Register *parent, const MyMoneyTransac void Register::addGroupMarkers(void) { - QMap<QString, int> list; - QMap<QString, int>::const_iterator it; + TQMap<TQString, int> list; + TQMap<TQString, int>::const_iterator it; KMyMoneyRegister::RegisterItem* p = firstItem(); KMyMoneyRegister::Transaction* t; - QString name; - QDate today; - QDate yesterday, thisWeek, lastWeek; - QDate thisMonth, lastMonth; - QDate thisYear; + TQString name; + TQDate today; + TQDate yesterday, thisWeek, lastWeek; + TQDate thisMonth, lastMonth; + TQDate thisYear; int weekStartOfs; switch(primarySortKey()) { case KMyMoneyRegister::PostDateSort: case KMyMoneyRegister::EntryDateSort: - today = QDate::currentDate(); + today = TQDate::tqcurrentDate(); thisMonth.setYMD(today.year(), today.month(), 1); lastMonth = thisMonth.addMonths(-1); yesterday = today.addDays(-1); - // a = QDate::dayOfWeek() todays weekday (1 = Monday, 7 = Sunday) + // a = TQDate::dayOfWeek() todays weekday (1 = Monday, 7 = Sunday) // b = KLocale::weekStartDay() first day of week (1 = Monday, 7 = Sunday) weekStartOfs = today.dayOfWeek() - KGlobal::locale()->weekStartDay(); if(weekStartOfs < 0) { @@ -2278,7 +2278,7 @@ void Register::addGroupMarkers(void) thisWeek = today.addDays(-weekStartOfs); lastWeek = thisWeek.addDays(-7); thisYear.setYMD(today.year(), 1, 1); - if(KMyMoneyGlobalSettings::startDate().date() != QDate(1900,1,1)) + if(KMyMoneyGlobalSettings::startDate().date() != TQDate(1900,1,1)) new KMyMoneyRegister::FancyDateGroupMarker(this, KMyMoneyGlobalSettings::startDate().date(), i18n("Prior transactions possibly filtered")); if(KMyMoneyGlobalSettings::showFancyMarker()) { @@ -2290,8 +2290,8 @@ void Register::addGroupMarkers(void) MyMoneyMoney balance(m_account.value("lastStatementBalance")); if(m_account.accountGroup() == MyMoneyAccount::Liability) balance = -balance; - QString txt = i18n("Online Statement Balance: %1").arg(balance.formatMoney(m_account.fraction())); - new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, QDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate), txt); + TQString txt = i18n("Online Statement Balance: %1").tqarg(balance.formatMoney(m_account.fraction())); + new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate), txt); } new KMyMoneyRegister::FancyDateGroupMarker(this, thisYear, i18n("This year")); @@ -2309,11 +2309,11 @@ void Register::addGroupMarkers(void) new KMyMoneyRegister::SimpleDateGroupMarker(this, today.addDays(1), i18n("Future transactions")); } if(KMyMoneyGlobalSettings::showFiscalMarker()) { - QDate currentFiscalYear(QDate::currentDate().year(), KMyMoneyGlobalSettings::firstFiscalMonth(), KMyMoneyGlobalSettings::firstFiscalDay()); + TQDate currentFiscalYear(TQDate::tqcurrentDate().year(), KMyMoneyGlobalSettings::firstFiscalMonth(), KMyMoneyGlobalSettings::firstFiscalDay()); - if(QDate::currentDate() < currentFiscalYear) + if(TQDate::tqcurrentDate() < currentFiscalYear) currentFiscalYear = currentFiscalYear.addYears(-1); - QDate previousFiscalYear = currentFiscalYear.addYears(-1); + TQDate previousFiscalYear = currentFiscalYear.addYears(-1); new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear, i18n("Current fiscal year")); new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear.addYears(-1), i18n("Previous fiscal year")); new KMyMoneyRegister::FiscalYearGroupMarker(this, currentFiscalYear.addYears(1), i18n("Next fiscal year")); diff --git a/kmymoney2/widgets/register.h b/kmymoney2/widgets/register.h index d9d2627..bc59ff6 100644 --- a/kmymoney2/widgets/register.h +++ b/kmymoney2/widgets/register.h @@ -28,13 +28,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtable.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qwidgetlist.h> -#include <qmap.h> -#include <qpair.h> -#include <qevent.h> +#include <tqtable.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqwidgetlist.h> +#include <tqmap.h> +#include <tqpair.h> +#include <tqevent.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -81,27 +81,27 @@ class Register; class RegisterItem; class ItemPtrVector; -const QString sortOrderToText(TransactionSortField idx); -TransactionSortField textToSortOrder(const QString& text); +const TQString sortOrderToText(TransactionSortField idx); +TransactionSortField textToSortOrder(const TQString& text); -class QWidgetContainer : public QMap<QString, QWidget*> +class TQWidgetContainer : public TQMap<TQString, TQWidget*> { public: - QWidgetContainer() {} + TQWidgetContainer() {} - QWidget* haveWidget(const QString& name) const { - QWidgetContainer::const_iterator it_w; - it_w = find(name); + TQWidget* haveWidget(const TQString& name) const { + TQWidgetContainer::const_iterator it_w; + it_w = tqfind(name); if(it_w != end()) return *it_w; return 0; } void removeOrphans(void) { - QWidgetContainer::iterator it_w; + TQWidgetContainer::iterator it_w; for(it_w = begin(); it_w != end(); ) { - if((*it_w) && (*it_w)->parent()) + if((*it_w) && (*it_w)->tqparent()) ++it_w; else { delete (*it_w); @@ -116,10 +116,10 @@ public: class GroupMarker : public RegisterItem { public: - GroupMarker(Register* parent, const QString& txt = QString()); + GroupMarker(Register* tqparent, const TQString& txt = TQString()); ~GroupMarker(); - void setText(const QString& txt) { m_txt = txt; } - const QString& text(void) const { return m_txt; } + void setText(const TQString& txt) { m_txt = txt; } + const TQString& text(void) const { return m_txt; } bool isSelectable(void) const { return false; } bool canHaveFocus(void) const { return false; } int numRows(void) const { return 1; } @@ -128,23 +128,23 @@ public: bool isErronous(void) const { return false; } - void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); - void paintFormCell(QPainter* /* painter */, int /* row */, int /* col */, const QRect& /* r */, bool /* selected */, const QColorGroup& /* cg */) {} + void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); + void paintFormCell(TQPainter* /* painter */, int /* row */, int /* col */, const TQRect& /* r */, bool /* selected */, const TQColorGroup& /* cg */) {} int rowHeightHint(void) const; - bool matches(const QString&) const { return true; } + bool matches(const TQString&) const { return true; } virtual int sortSamePostDate(void) const { return 0; } protected: - void setupColors(QColorGroup& cg); + void setupColors(TQColorGroup& cg); protected: - QString m_txt; + TQString m_txt; unsigned int m_drawCounter; bool m_showDate; - static QPixmap* m_bg; + static TQPixmap* m_bg; static int m_bgRefCnt; }; @@ -152,19 +152,19 @@ protected: class FancyDateGroupMarker : public GroupMarker { public: - FancyDateGroupMarker(Register* parent, const QDate& date, const QString& txt); + FancyDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt); - virtual const QDate& sortPostDate(void) const { return m_date; } - virtual const QDate& sortEntryDate(void) const { return m_date; } + virtual const TQDate& sortPostDate(void) const { return m_date; } + virtual const TQDate& sortEntryDate(void) const { return m_date; } virtual const char* className(void) { return "FancyDateGroupMarker"; } private: - QDate m_date; + TQDate m_date; }; class StatementGroupMarker : public FancyDateGroupMarker { public: - StatementGroupMarker(Register* parent, CashFlowDirection dir, const QDate& date, const QString& txt ); + StatementGroupMarker(Register* tqparent, CashFlowDirection dir, const TQDate& date, const TQString& txt ); CashFlowDirection sortType(void) const { return m_dir; } virtual int sortSamePostDate(void) const { return 3; } private: @@ -174,8 +174,8 @@ private: class SimpleDateGroupMarker : public FancyDateGroupMarker { public: - SimpleDateGroupMarker(Register* parent, const QDate& date, const QString& txt); - void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + SimpleDateGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt); + void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); int rowHeightHint(void) const; virtual const char* className(void) { return "SimpleDateGroupMarker"; } }; @@ -183,7 +183,7 @@ public: class TypeGroupMarker : public GroupMarker { public: - TypeGroupMarker(Register* parent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType); + TypeGroupMarker(Register* tqparent, CashFlowDirection dir, MyMoneyAccount::accountTypeE accType); CashFlowDirection sortType(void) const { return m_dir; } private: CashFlowDirection m_dir; @@ -192,27 +192,27 @@ private: class FiscalYearGroupMarker : public FancyDateGroupMarker { public: - FiscalYearGroupMarker(Register* parent, const QDate& date, const QString& txt); + FiscalYearGroupMarker(Register* tqparent, const TQDate& date, const TQString& txt); virtual const char* className(void) { return "FiscalYearGroupMarker"; } virtual int sortSamePostDate(void) const { return 1; } protected: - void setupColors(QColorGroup& cg); + void setupColors(TQColorGroup& cg); }; class PayeeGroupMarker : public GroupMarker { public: - PayeeGroupMarker(Register* parent, const QString& name); - const QString& sortPayee(void) const { return m_txt; } + PayeeGroupMarker(Register* tqparent, const TQString& name); + const TQString& sortPayee(void) const { return m_txt; } }; class CategoryGroupMarker : public GroupMarker { public: - CategoryGroupMarker(Register* parent, const QString& category); - const QString& sortCategory(void) const { return m_txt; } - const QString& sortSecurity(void) const { return m_txt; } + CategoryGroupMarker(Register* tqparent, const TQString& category); + const TQString& sortCategory(void) const { return m_txt; } + const TQString& sortSecurity(void) const { return m_txt; } virtual const char* className(void) { return "CategoryGroupMarker"; } }; @@ -220,14 +220,14 @@ public: class ReconcileGroupMarker : public GroupMarker { public: - ReconcileGroupMarker(Register* parent, MyMoneySplit::reconcileFlagE state); + ReconcileGroupMarker(Register* tqparent, MyMoneySplit::reconcileFlagE state); virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return m_state; } private: MyMoneySplit::reconcileFlagE m_state; }; -class ItemPtrVector : public QValueVector<RegisterItem *> +class ItemPtrVector : public TQValueVector<RegisterItem *> { public: ItemPtrVector() {} @@ -245,16 +245,17 @@ protected: class Register : public TransactionEditorContainer { Q_OBJECT + TQ_OBJECT - // friend class QHeader; - // friend class QTableHeader; + // friend class TQHeader; + // friend class TQTableHeader; // friend class RegisterItem; friend class Transaction; friend class StdTransaction; friend class InvestTransaction; public: - Register(QWidget *parent = 0, const char *name = 0); + Register(TQWidget *tqparent = 0, const char *name = 0); virtual ~Register(); /** @@ -276,39 +277,39 @@ public: * This method returns a list of pointers to all selected items * in the register * - * @retval QValueList<RegisterItem*> + * @retval TQValueList<RegisterItem*> */ - QValueList<RegisterItem*> selectedItems(void) const; + TQValueList<RegisterItem*> selectedItems(void) const; /** * Construct a list of all currently selected transactions in the register. * If the current item carrying the focus (see focusItem() ) is selected * it will be the first one contained in the list. * - * @param list reference to QValueList receiving the SelectedTransaction()'s + * @param list reference to TQValueList receiving the SelectedTransaction()'s */ void selectedTransactions(SelectedTransactions& list) const; - QString text(int row, int col) const; - QWidget* createEditor(int row, int col, bool initFromCell) const; + TQString text(int row, int col) const; + TQWidget* createEditor(int row, int col, bool initFromCell) const; void setCellContentFromEditor(int row, int col); - QWidget* cellWidget(int row, int col) const; - void endEdit(int row, int col, bool accept, bool replace); - void paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + TQWidget* cellWidget(int row, int col) const; + void endEdit(int row, int col, bool accept, bool tqreplace); + void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); void resizeData(int) {} - QTableItem* item(int, int) { return 0; } - void setItem(int, int, QTableItem*) {} + TQTableItem* item(int, int) { return 0; } + void setItem(int, int, TQTableItem*) {} void clearCell(int, int) {} void clearCellWidget(int, int); /** - * Override the QTable member function to avoid display of focus + * Override the TQTable member function to avoid display of focus */ - void paintFocus(QPainter*, const QRect& ) {} + void paintFocus(TQPainter*, const TQRect& ) {} /** - * Override the QTable member function to avoid functionality + * Override the TQTable member function to avoid functionality */ void updateCell(int /* row */, int /* col */) {} @@ -374,10 +375,10 @@ public: * Show the columns contained in @a cols for @a account. @a account * can be left empty ( MyMoneyAccount() ) e.g. for the search dialog. */ - void setupRegister(const MyMoneyAccount& account, const QValueList<Column>& cols); + void setupRegister(const MyMoneyAccount& account, const TQValueList<Column>& cols); - void setSortOrder(const QString& order); - const QValueList<TransactionSortField>& sortOrder(void) const { return m_sortOrder; } + void setSortOrder(const TQString& order); + const TQValueList<TransactionSortField>& sortOrder(void) const { return m_sortOrder; } TransactionSortField primarySortKey(void) const; void sortItems(void); @@ -403,9 +404,9 @@ public: void ensureItemVisible(RegisterItem* item); - void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, Transaction* t); - void removeEditWidgets(QMap<QString, QWidget*>& editWidgets); - void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const; + void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, Transaction* t); + void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const; int rowHeightHint(void) const; @@ -417,18 +418,18 @@ public: * This method creates a specifc transaction according to the * transaction passed in @a transaction. * - * @param parent pointer to register where the created object should be added + * @param tqparent pointer to register where the created object should be added * @param transaction the transaction which should be used to create the object * @param split the split of the transaction which should be used to create the object * @param uniqueId an int that will be used to construct the id of the item * * @return pointer to created object (0 upon failure) */ - static Transaction* transactionFactory(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + static Transaction* transactionFactory(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); const MyMoneyAccount& account(void) const { return m_account; } - void repaintItems(RegisterItem* first = 0, RegisterItem* last = 0); + void tqrepaintItems(RegisterItem* first = 0, RegisterItem* last = 0); unsigned int drawCounter(void) const { return m_drawCounter; } @@ -447,25 +448,25 @@ public: void setLedgerLensForced(bool forced=true) { m_ledgerLensForced = forced; } /** - * Sets the selection mode to @a mode. Supported modes are QTable::Single and - * QTable::Multi. QTable::Multi is the default when the object is created. + * Sets the selection mode to @a mode. Supported modes are TQTable::Single and + * TQTable::Multi. TQTable::Multi is the default when the object is created. */ void setSelectionMode(SelectionMode mode) { m_selectionMode = mode; } protected: - void drawContents(QPainter *p, int cx, int cy, int cw, int ch); + void drawContents(TQPainter *p, int cx, int cy, int cw, int ch); - void contentsMouseReleaseEvent( QMouseEvent *e ); + void contentsMouseReleaseEvent( TQMouseEvent *e ); void unselectItems(int from = -1, int to = -1) { doSelectItems(from, to, false); } void selectItems(int from, int to) { doSelectItems(from, to, true); } void doSelectItems(int from, int to, bool selected); int selectedItemsCount(void) const; - void focusOutEvent(QFocusEvent*); - void focusInEvent(QFocusEvent*); - void keyPressEvent(QKeyEvent*); + void focusOutEvent(TQFocusEvent*); + void focusInEvent(TQFocusEvent*); + void keyPressEvent(TQKeyEvent*); int rowToIndex(int row) const; void setupItemIndex(int rowCount); @@ -475,9 +476,9 @@ protected: * further down or up in the ledger from the previous focus item. * The height to scroll is determined by visibleHeight() * - * @param key Qt::Page_Up or Qt::Page_Down depending on the direction to scroll - * @param state state of Qt::ShiftButton, Qt::ControlButton, Qt::AltButton and - * Qt::MetaButton. + * @param key TQt::Page_Up or TQt::Page_Down depending on the direction to scroll + * @param state state of TQt::ShiftButton, TQt::ControlButton, TQt::AltButton and + * TQt::MetaButton. */ void scrollPage(int key, ButtonState state); @@ -489,32 +490,32 @@ protected: * @param id id of the item to be searched * @return pointer to RegisterItem or 0 if not found */ - RegisterItem* itemById(const QString& id) const; + RegisterItem* itemById(const TQString& id) const; - void insertWidget(int row, int col, QWidget* w); + void insertWidget(int row, int col, TQWidget* w); /** - * Override logic and use standard QFrame behaviour + * Override logic and use standard TQFrame behaviour */ bool focusNextPrevChild(bool next); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); void handleItemChange(RegisterItem* old, bool shift, bool control); void selectRange(RegisterItem* from, RegisterItem* to, bool invert, bool includeFirst, bool clearSel); // DND - void dragMoveEvent(QDragMoveEvent* event); - void dropEvent(QDropEvent* event); - Transaction* dropTransaction(QPoint cPos) const; + void dragMoveEvent(TQDragMoveEvent* event); + void dropEvent(TQDropEvent* event); + Transaction* dropTransaction(TQPoint cPos) const; protected slots: void resize(void); - void selectItem(int row, int col, int button, const QPoint & mousePos ); + void selectItem(int row, int col, int button, const TQPoint & mousePos ); void slotEnsureItemVisible(void); - void slotDoubleClicked(int, int, int, const QPoint&); + void slotDoubleClicked(int, int, int, const TQPoint&); void slotToggleErronousTransactions(void); void slotAutoColumnSizing(int section); @@ -569,7 +570,7 @@ signals: protected: ItemPtrVector m_items; - QValueVector<RegisterItem*> m_itemIndex; + TQValueVector<RegisterItem*> m_itemIndex; RegisterItem* m_selectAnchor; RegisterItem* m_focusItem; RegisterItem* m_ensureVisibleItem; @@ -590,12 +591,12 @@ private: bool m_listsDirty; bool m_ignoreNextButtonRelease; bool m_needInitialColumnResize; - Qt::ButtonState m_buttonState; + TQt::ButtonState m_buttonState; Column m_lastCol; - QValueList<TransactionSortField> m_sortOrder; - QMap<QPair<int, int>, QWidget*> m_cellWidgets; + TQValueList<TransactionSortField> m_sortOrder; + TQMap<TQPair<int, int>, TQWidget*> m_cellWidgets; RegisterToolTip* m_tooltip; - QRect m_lastRepaintRect; + TQRect m_lastRepaintRect; unsigned int m_drawCounter; }; diff --git a/kmymoney2/widgets/registeritem.cpp b/kmymoney2/widgets/registeritem.cpp index 6ef082f..0a67fe2 100644 --- a/kmymoney2/widgets/registeritem.cpp +++ b/kmymoney2/widgets/registeritem.cpp @@ -31,7 +31,7 @@ using namespace KMyMoneyRegister; -QDate RegisterItem::nullDate; +TQDate RegisterItem::nullDate; MyMoneyMoney RegisterItem::nullValue; RegisterItem::RegisterItem() : @@ -42,13 +42,13 @@ RegisterItem::RegisterItem() : init(); } -RegisterItem::RegisterItem(Register* parent) : - m_parent(parent), +RegisterItem::RegisterItem(Register* tqparent) : + m_parent(tqparent), m_prev(0), m_next(0) { init(); - parent->addItem(this); + tqparent->addItem(this); } void RegisterItem::init(void) @@ -64,9 +64,9 @@ RegisterItem::~RegisterItem() m_parent->removeItem(this); } -void RegisterItem::setParent(Register* parent) +void RegisterItem::setParent(Register* tqparent) { - m_parent = parent; + m_parent = tqparent; } void RegisterItem::setNumRowsRegister(int rows) @@ -111,6 +111,6 @@ int RegisterItem::rowHeightHint(void) const return m_parent->rowHeightHint(); } - QFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listCellFont() ); return fm.lineSpacing()+6; } diff --git a/kmymoney2/widgets/registeritem.h b/kmymoney2/widgets/registeritem.h index 84afa84..b75de1b 100644 --- a/kmymoney2/widgets/registeritem.h +++ b/kmymoney2/widgets/registeritem.h @@ -21,9 +21,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qdatetime.h> -#include <qpainter.h> +#include <tqstring.h> +#include <tqdatetime.h> +#include <tqpainter.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,7 +46,7 @@ typedef enum { typedef enum { ActionNone = -1, ActionCheck = 0, - /* these should be values which qt 3.3 never uses for QTab: + /* these should be values which qt 3.3 never uses for TQTab: * qt starts upwards from 0 */ ActionDeposit = 12201, @@ -67,7 +67,7 @@ class RegisterItem { public: RegisterItem(); - RegisterItem(Register* parent); + RegisterItem(Register* tqparent); virtual ~RegisterItem(); virtual const char* className(void) = 0; @@ -85,17 +85,17 @@ public: virtual bool isErronous(void) const = 0; // helper functions used for sorting - virtual const QDate& sortPostDate(void) const { return nullDate; } + virtual const TQDate& sortPostDate(void) const { return nullDate; } virtual int sortSamePostDate(void) const = 0; - virtual const QDate& sortEntryDate(void) const { return nullDate; } - virtual const QString& sortPayee(void) const { return QString::null; } + virtual const TQDate& sortEntryDate(void) const { return nullDate; } + virtual const TQString& sortPayee(void) const { return TQString(); } virtual const MyMoneyMoney& sortValue(void) const { return nullValue; } - virtual const QString& sortNumber(void) const { return QString::null; } - virtual const QString& sortEntryOrder(void) const { return QString::null; } + virtual const TQString& sortNumber(void) const { return TQString(); } + virtual const TQString& sortEntryOrder(void) const { return TQString(); } virtual CashFlowDirection sortType(void) const { return Deposit; } - virtual const QString& sortCategory(void) const { return QString::null; } + virtual const TQString& sortCategory(void) const { return TQString(); } virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return MyMoneySplit::MaxReconcileState; } - virtual const QString& sortSecurity(void) const { return QString::null; } + virtual const TQString& sortSecurity(void) const { return TQString(); } /** * This method sets the row offset of the item in the register @@ -103,7 +103,7 @@ public: * * @param row row offset * - * @note The row offset is based on QTable rows, not register + * @note The row offset is based on TQTable rows, not register * items. */ virtual void setStartRow(int row) { m_startRow = row; } @@ -144,24 +144,24 @@ public: */ virtual void setAlternate(bool alternate) { m_alternate = alternate; } - virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg) = 0; - virtual void paintFormCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg) = 0; + virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg) = 0; + virtual void paintFormCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg) = 0; - virtual const QString& id(void) const { return MyMoneyObject::emptyId(); } + virtual const TQString& id(void) const { return MyMoneyObject::emptyId(); } /** - * Sets the parent of this item to be the register @p parent + * Sets the tqparent of this item to be the register @p tqparent * - * @param parent pointer to register + * @param tqparent pointer to register */ - void setParent(Register* parent); + void setParent(Register* tqparent); /** - * This member returns a pointer to the parent object + * This member returns a pointer to the tqparent object * * @retval pointer to Register */ - Register* parent(void) const { return m_parent; } + Register* tqparent(void) const { return m_parent; } void setNeedResize(void) { m_needResize = true; } @@ -185,7 +185,7 @@ public: RegisterItem* nextItem(void) const { return m_next; } RegisterItem* prevItem(void) const { return m_prev; } - virtual bool matches(const QString&) const = 0; + virtual bool matches(const TQString&) const = 0; /** * Checks if the mouse hovered over an area that has a tooltip associated with it. @@ -194,11 +194,11 @@ public: * * If a tooltip shall be shown, this method presets the rectangle @a r with the * area in register coordinates and @a msg with the string that will be passed - * to QToolTip::tip. @a true is returned in this case. + * to TQToolTip::tip. @a true is returned in this case. * * If no tooltip is available, @a false will be returned. */ - virtual bool maybeTip(const QPoint& /* relpos */, int /* row */, int /* col */, QRect& /* r */, QString& /* msg */) { return false; } + virtual bool maybeTip(const TQPoint& /* relpos */, int /* row */, int /* col */, TQRect& /* r */, TQString& /* msg */) { return false; } protected: /// This method serves as helper for all constructors @@ -216,7 +216,7 @@ protected: bool m_visible; private: - static QDate nullDate; + static TQDate nullDate; static MyMoneyMoney nullValue; }; diff --git a/kmymoney2/widgets/registersearchline.cpp b/kmymoney2/widgets/registersearchline.cpp index f0ef6e9..6acace3 100644 --- a/kmymoney2/widgets/registersearchline.cpp +++ b/kmymoney2/widgets/registersearchline.cpp @@ -17,10 +17,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qapplication.h> -#include <qlabel.h> -#include <qtoolbutton.h> -#include <qtimer.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqtoolbutton.h> +#include <tqtimer.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,21 +47,21 @@ public: status(0) {} Register* reg; - QComboBox* combo; - QString search; + TQComboBox* combo; + TQString search; int queuedSearches; int status; }; -RegisterSearchLine::RegisterSearchLine(QWidget* parent, Register* reg, const char* name) : - KLineEdit(parent, name), +RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, Register* reg, const char* name) : + KLineEdit(tqparent, name), d(new RegisterSearchLinePrivate) { init(reg); } -RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) : - KLineEdit(parent, name), +RegisterSearchLine::RegisterSearchLine(TQWidget* tqparent, const char* name) : + KLineEdit(tqparent, name), d(new RegisterSearchLinePrivate) { init(0); @@ -70,10 +70,10 @@ RegisterSearchLine::RegisterSearchLine(QWidget* parent, const char* name) : void RegisterSearchLine::init(Register *reg) { d->reg = reg; - connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(queueSearch(const QString&))); + connect(this, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(queueSearch(const TQString&))); - QLabel* label = new QLabel(i18n("label for status combo", "Stat&us"), parentWidget()); - d->combo = new QComboBox(parentWidget()); + TQLabel* label = new TQLabel(i18n("label for status combo", "Stat&us"), tqparentWidget()); + d->combo = new TQComboBox(tqparentWidget()); // don't change the order of the following lines unless updating // the case labels in RegisterSearchLine::itemMatches() at the same time d->combo->insertItem(SmallIcon("run"), i18n("Any status")); @@ -84,13 +84,13 @@ void RegisterSearchLine::init(Register *reg) d->combo->insertItem(i18n("Not reconciled")); d->combo->insertItem(i18n("Cleared")); d->combo->setCurrentItem(0); - connect(d->combo, SIGNAL(activated(int)), this, SLOT(slotStatusChanged(int))); + connect(d->combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStatusChanged(int))); label->setBuddy(d->combo); if(reg) { - connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed())); - connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*))); + connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed())); + connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*))); } else { setEnabled(false); } @@ -104,15 +104,15 @@ RegisterSearchLine::~RegisterSearchLine() void RegisterSearchLine::setRegister(Register* reg) { if(d->reg) { - disconnect(d->reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed())); - disconnect(d->reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*))); + disconnect(d->reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed())); + disconnect(d->reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*))); } d->reg = reg; if(reg) { - connect(reg, SIGNAL(destroyed()), this, SLOT(registerDestroyed())); - connect(reg, SIGNAL(itemAdded(RegisterItem*)), this, SLOT(itemAdded(RegisterItem*))); + connect(reg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(registerDestroyed())); + connect(reg, TQT_SIGNAL(itemAdded(RegisterItem*)), this, TQT_SLOT(itemAdded(RegisterItem*))); } setEnabled(reg != 0); @@ -124,11 +124,11 @@ void RegisterSearchLine::slotStatusChanged(int status) updateSearch(); } -void RegisterSearchLine::queueSearch(const QString& search) +void RegisterSearchLine::queueSearch(const TQString& search) { d->queuedSearches++; d->search = search; - QTimer::singleShot(200, this, SLOT(activateSearch())); + TQTimer::singleShot(200, this, TQT_SLOT(activateSearch())); } void RegisterSearchLine::activateSearch(void) @@ -138,7 +138,7 @@ void RegisterSearchLine::activateSearch(void) updateSearch(d->search); } -void RegisterSearchLine::updateSearch(const QString& s) +void RegisterSearchLine::updateSearch(const TQString& s) { if(!d->reg) return; @@ -167,7 +167,7 @@ void RegisterSearchLine::updateSearch(const QString& s) d->reg->updateContents(); d->reg->ensureItemVisible(focusItem); } else - d->reg->repaintContents(); + d->reg->tqrepaintContents(); d->reg->updateScrollBars(); @@ -177,7 +177,7 @@ void RegisterSearchLine::updateSearch(const QString& s) } } -bool RegisterSearchLine::itemMatches(const RegisterItem* item, const QString& s) const +bool RegisterSearchLine::itemMatches(const RegisterItem* item, const TQString& s) const { const Transaction* t = dynamic_cast<const Transaction*>(item); if(t && !t->transaction().id().isEmpty()) { @@ -247,17 +247,17 @@ class RegisterSearchLineWidget::RegisterSearchLineWidgetPrivate Register* reg; RegisterSearchLine* searchLine; - QToolButton* clearButton; + TQToolButton* clearButton; }; -RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, QWidget* parent, const char* name) : - QHBox(parent, name), +RegisterSearchLineWidget::RegisterSearchLineWidget(Register* reg, TQWidget* tqparent, const char* name) : + TQHBox(tqparent, name), d(new RegisterSearchLineWidgetPrivate) { d->reg = reg; setSpacing(5); - QTimer::singleShot(0, this, SLOT(createWidgets())); + TQTimer::singleShot(0, this, TQT_SLOT(createWidgets())); } RegisterSearchLineWidget::~RegisterSearchLineWidget() @@ -275,14 +275,14 @@ RegisterSearchLine* RegisterSearchLineWidget::createSearchLine(Register* reg) void RegisterSearchLineWidget::createWidgets(void) { if(!d->clearButton) { - d->clearButton = new QToolButton(this); - QIconSet icon = SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"); + d->clearButton = new TQToolButton(this); + TQIconSet icon = SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"); d->clearButton->setIconSet(icon); } d->clearButton->show(); - QLabel *label = new QLabel(i18n("S&earch:"), this, "kde toolbar widget"); + TQLabel *label = new TQLabel(i18n("S&earch:"), this, "kde toolbar widget"); d->searchLine = createSearchLine(d->reg); d->searchLine->show(); @@ -290,7 +290,7 @@ void RegisterSearchLineWidget::createWidgets(void) label->setBuddy(d->searchLine); label->show(); - connect(d->clearButton, SIGNAL(clicked()), d->searchLine, SLOT(reset())); + connect(d->clearButton, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(reset())); } RegisterSearchLine* RegisterSearchLineWidget::searchLine(void) const diff --git a/kmymoney2/widgets/registersearchline.h b/kmymoney2/widgets/registersearchline.h index d495ab1..e9fcb39 100644 --- a/kmymoney2/widgets/registersearchline.h +++ b/kmymoney2/widgets/registersearchline.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qhbox.h> +#include <tqhbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -46,6 +46,7 @@ namespace KMyMoneyRegister { class KMYMONEY_EXPORT RegisterSearchLine : public KLineEdit { Q_OBJECT + TQ_OBJECT public: /** * Constructs a RegisterSearchLine with @a reg being the register to be @@ -54,14 +55,14 @@ public: * If @a reg is null then the widget will be disabled until a register * is set with setRegister(). */ - RegisterSearchLine(QWidget* parent = 0, Register* reg = 0, const char* name = 0); + RegisterSearchLine(TQWidget* tqparent = 0, Register* reg = 0, const char* name = 0); /** * Constructs a RegisterSearchLine * * The widget will be disabled until a register is set with setRegister(). */ - RegisterSearchLine(QWidget* parent = 0, const char* name = 0); + RegisterSearchLine(TQWidget* tqparent = 0, const char* name = 0); /** * Destroys the object @@ -77,14 +78,14 @@ public: void setRegister(Register* reg); protected: - virtual bool itemMatches(const RegisterItem* item, const QString& s) const; + virtual bool itemMatches(const RegisterItem* item, const TQString& s) const; public slots: - virtual void updateSearch(const QString& s = QString::null); + virtual void updateSearch(const TQString& s = TQString()); virtual void reset(void); protected slots: - void queueSearch(const QString& search); + void queueSearch(const TQString& search); void activateSearch(void); void slotStatusChanged(int); @@ -106,15 +107,16 @@ private: * * @author Thomas Baumgart */ -class KMYMONEY_EXPORT RegisterSearchLineWidget : public QHBox +class KMYMONEY_EXPORT RegisterSearchLineWidget : public TQHBox { Q_OBJECT + TQ_OBJECT public: /** - * Creates a RegisterSearchLineWidget for @a reg with @a parent as the - * parent and with @a name. + * Creates a RegisterSearchLineWidget for @a reg with @a tqparent as the + * tqparent and with @a name. */ - RegisterSearchLineWidget(Register* reg = 0, QWidget* parent = 0, const char* name = 0); + RegisterSearchLineWidget(Register* reg = 0, TQWidget* tqparent = 0, const char* name = 0); /** * Destroys the object diff --git a/kmymoney2/widgets/scheduledtransaction.cpp b/kmymoney2/widgets/scheduledtransaction.cpp index 98d6787..5842247 100644 --- a/kmymoney2/widgets/scheduledtransaction.cpp +++ b/kmymoney2/widgets/scheduledtransaction.cpp @@ -33,18 +33,18 @@ using namespace KMyMoneyRegister; using namespace KMyMoneyTransactionForm; -StdTransactionScheduled::StdTransactionScheduled(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - StdTransaction(parent, transaction, split, uniqueId), - m_drawCounter(parent->drawCounter()-1) +StdTransactionScheduled::StdTransactionScheduled(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + StdTransaction(tqparent, transaction, split, uniqueId), + m_drawCounter(tqparent->drawCounter()-1) { // setup initial size setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed())); } -bool StdTransactionScheduled::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool StdTransactionScheduled::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { - QRect r(cellRect); - cg = m_parent->palette().disabled(); + TQRect r(cellRect); + cg = m_parent->tqpalette().disabled(); bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush); return rc; diff --git a/kmymoney2/widgets/scheduledtransaction.h b/kmymoney2/widgets/scheduledtransaction.h index 836ceee..a1530ec 100644 --- a/kmymoney2/widgets/scheduledtransaction.h +++ b/kmymoney2/widgets/scheduledtransaction.h @@ -38,7 +38,7 @@ namespace KMyMoneyRegister { class StdTransactionScheduled : public StdTransaction { public: - StdTransactionScheduled(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + StdTransactionScheduled(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~StdTransactionScheduled() {} virtual const char* className(void) { return "StdTransactionScheduled"; } @@ -55,15 +55,15 @@ public: * - textRect (area covering the text) * - color of the pen to do the painting of text and lines * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register - * @param cellRect ref to QRect object receiving the area information for the cell - * @param textRect ref to QRect object receiving the area information for the text - * @param cg ref to QColorGroup object receiving the color information to be used - * @param brush ref to QBrush object receiveing the brush information to be used + * @param cellRect ref to TQRect object receiving the area information for the cell + * @param textRect ref to TQRect object receiving the area information for the text + * @param cg ref to TQColorGroup object receiving the color information to be used + * @param brush ref to TQBrush object receiveing the brush information to be used */ - virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush); + virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush); bool isSelectable(void) const { return true; } bool canHaveFocus(void) const { return true; } @@ -71,9 +71,9 @@ public: virtual int sortSamePostDate(void) const { return 4; } -// virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const; +// virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const; -// void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); +// void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); private: unsigned int m_drawCounter; diff --git a/kmymoney2/widgets/selectedtransaction.cpp b/kmymoney2/widgets/selectedtransaction.cpp index 055dc3d..102477b 100644 --- a/kmymoney2/widgets/selectedtransaction.cpp +++ b/kmymoney2/widgets/selectedtransaction.cpp @@ -26,7 +26,7 @@ namespace KMyMoneyRegister { int SelectedTransaction::warnLevel() const { int warnLevel = 0; - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = transaction().splits().begin(); warnLevel < 2 && it_s != transaction().splits().end(); ++it_s) { const MyMoneyAccount& acc = MyMoneyFile::instance()->account((*it_s).accountId()); if(acc.isClosed()) diff --git a/kmymoney2/widgets/selectedtransaction.h b/kmymoney2/widgets/selectedtransaction.h index 0b82020..172824f 100644 --- a/kmymoney2/widgets/selectedtransaction.h +++ b/kmymoney2/widgets/selectedtransaction.h @@ -37,7 +37,7 @@ class SelectedTransaction { public: SelectedTransaction() {} - SelectedTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s, const QString& scheduleId = QString()) : + SelectedTransaction(const MyMoneyTransaction& t, const MyMoneySplit& s, const TQString& scheduleId = TQString()) : m_transaction(t), m_split(s), m_scheduleId(scheduleId) {} MyMoneyTransaction& transaction(void) { return m_transaction; } @@ -46,7 +46,7 @@ public: const MyMoneySplit& split(void) const { return m_split; } bool isScheduled(void) const { return !m_scheduleId.isEmpty(); } - const QString& scheduleId(void) const { return m_scheduleId; } + const TQString& scheduleId(void) const { return m_scheduleId; } /** * checks the transaction for specific reasons which would @@ -61,12 +61,12 @@ public: private: MyMoneyTransaction m_transaction; MyMoneySplit m_split; - QString m_scheduleId; + TQString m_scheduleId; }; class Register; -class SelectedTransactions:public QValueList<SelectedTransaction> +class SelectedTransactions:public TQValueList<SelectedTransaction> { public: SelectedTransactions() {} diff --git a/kmymoney2/widgets/sortoptionlistitem.h b/kmymoney2/widgets/sortoptionlistitem.h index 8f2cdb0..84504c0 100644 --- a/kmymoney2/widgets/sortoptionlistitem.h +++ b/kmymoney2/widgets/sortoptionlistitem.h @@ -349,7 +349,7 @@ static const char * sortDescendingXpm[] = { class SortOptionListItem : public KListViewItem { public: - SortOptionListItem(QListView* parent, QListViewItem* after, const QString& txt, int direction); + SortOptionListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, int direction); int direction(void) const; public slots: @@ -362,8 +362,8 @@ private: int m_direction; }; -SortOptionListItem::SortOptionListItem(QListView* parent, QListViewItem* after, const QString& txt, int direction) : - KListViewItem(parent, after, txt) +SortOptionListItem::SortOptionListItem(TQListView* tqparent, TQListViewItem* after, const TQString& txt, int direction) : + KListViewItem(tqparent, after, txt) { m_direction = (direction >= 0) ? 1 : -1; setPixmap(); @@ -372,9 +372,9 @@ SortOptionListItem::SortOptionListItem(QListView* parent, QListViewItem* after, void SortOptionListItem::setPixmap(void) { if(m_direction > 0) - KListViewItem::setPixmap(0, QPixmap(&sortAscendingXpm[0])); + KListViewItem::setPixmap(0, TQPixmap(&sortAscendingXpm[0])); else - KListViewItem::setPixmap(0, QPixmap(&sortDescendingXpm[0])); + KListViewItem::setPixmap(0, TQPixmap(&sortDescendingXpm[0])); } void SortOptionListItem::toggleDirection(void) diff --git a/kmymoney2/widgets/stdtransactiondownloaded.cpp b/kmymoney2/widgets/stdtransactiondownloaded.cpp index 1305252..503ab15 100644 --- a/kmymoney2/widgets/stdtransactiondownloaded.cpp +++ b/kmymoney2/widgets/stdtransactiondownloaded.cpp @@ -34,36 +34,36 @@ using namespace KMyMoneyRegister; using namespace KMyMoneyTransactionForm; -StdTransactionDownloaded::StdTransactionDownloaded(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - StdTransaction(parent, transaction, split, uniqueId) +StdTransactionDownloaded::StdTransactionDownloaded(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + StdTransaction(tqparent, transaction, split, uniqueId) { } -bool StdTransactionDownloaded::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool StdTransactionDownloaded::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush); // if not selected paint in selected background color if(!isSelected()) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor()); - brush = QBrush(cg.base()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor()); + brush = TQBrush(cg.base()); } return rc; } -InvestTransactionDownloaded::InvestTransactionDownloaded(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - InvestTransaction(parent, transaction, split, uniqueId) +InvestTransactionDownloaded::InvestTransactionDownloaded(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + InvestTransaction(tqparent, transaction, split, uniqueId) { } -bool InvestTransactionDownloaded::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool InvestTransactionDownloaded::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush); // if not selected paint in selected background color if(!isSelected()) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor()); - brush = QBrush(cg.base()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::importedTransactionColor()); + brush = TQBrush(cg.base()); } return rc; } diff --git a/kmymoney2/widgets/stdtransactiondownloaded.h b/kmymoney2/widgets/stdtransactiondownloaded.h index 705fb04..0320882 100644 --- a/kmymoney2/widgets/stdtransactiondownloaded.h +++ b/kmymoney2/widgets/stdtransactiondownloaded.h @@ -38,7 +38,7 @@ namespace KMyMoneyRegister { class StdTransactionDownloaded : public StdTransaction { public: - StdTransactionDownloaded(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + StdTransactionDownloaded(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~StdTransactionDownloaded() {} virtual const char* className(void) { return "StdTransactionDownloaded"; } @@ -55,28 +55,28 @@ public: * - textRect (area covering the text) * - color of the pen to do the painting of text and lines * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register - * @param cellRect ref to QRect object receiving the area information for the cell - * @param textRect ref to QRect object receiving the area information for the text - * @param cg ref to QColorGroup object receiving the color information to be used - * @param brush ref to QBrush object receiveing the brush information to be used + * @param cellRect ref to TQRect object receiving the area information for the cell + * @param textRect ref to TQRect object receiving the area information for the text + * @param cg ref to TQColorGroup object receiving the color information to be used + * @param brush ref to TQBrush object receiveing the brush information to be used */ - virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush); + virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush); #if 0 - virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); - bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); - void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); + bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); + void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); int numColsForm(void) const { return 4; } - void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets); - void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets); - void tabOrderInForm(QWidgetList& tabOrderWidgets) const; - void tabOrderInRegister(QWidgetList& tabOrderWidgets) const; + void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets); + void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrderInForm(TQWidgetList& tabOrderWidgets) const; + void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const; int numRowsRegister(bool expanded) const; #endif @@ -90,7 +90,7 @@ public: class InvestTransactionDownloaded : public InvestTransaction { public: - InvestTransactionDownloaded(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + InvestTransactionDownloaded(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~InvestTransactionDownloaded() {} virtual const char* className(void) { return "InvestTransactionDownloaded"; } @@ -107,15 +107,15 @@ class InvestTransactionDownloaded : public InvestTransaction * - textRect (area covering the text) * - color of the pen to do the painting of text and lines * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register - * @param cellRect ref to QRect object receiving the area information for the cell - * @param textRect ref to QRect object receiving the area information for the text - * @param cg ref to QColorGroup object receiving the color information to be used - * @param brush ref to QBrush object receiveing the brush information to be used + * @param cellRect ref to TQRect object receiving the area information for the cell + * @param textRect ref to TQRect object receiving the area information for the text + * @param cg ref to TQColorGroup object receiving the color information to be used + * @param brush ref to TQBrush object receiveing the brush information to be used */ - virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush); + virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush); /** * Provided for internal reasons. No API change. See RegisterItem::numRowsRegister() */ diff --git a/kmymoney2/widgets/stdtransactionmatched.cpp b/kmymoney2/widgets/stdtransactionmatched.cpp index 9bc191b..b24ed88 100644 --- a/kmymoney2/widgets/stdtransactionmatched.cpp +++ b/kmymoney2/widgets/stdtransactionmatched.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregion.h> +#include <tqregion.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,24 +36,24 @@ using namespace KMyMoneyRegister; using namespace KMyMoneyTransactionForm; -StdTransactionMatched::StdTransactionMatched(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - StdTransaction(parent, transaction, split, uniqueId), - m_drawCounter(parent->drawCounter()-1) +StdTransactionMatched::StdTransactionMatched(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + StdTransaction(tqparent, transaction, split, uniqueId), + m_drawCounter(tqparent->drawCounter()-1) { // setup initial size setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed())); } -bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool StdTransactionMatched::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { - QRect r(cellRect); + TQRect r(cellRect); bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush); // if not selected paint in matched background color if(!isSelected()) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor()); - brush = QBrush(cg.base()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor()); + brush = TQBrush(cg.base()); } // the first line needs to be painted across all columns @@ -85,7 +85,7 @@ bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row, return rc; } -void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, int col, QPainter* painter) +void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter) { // run through the standard StdTransaction::registerCellText(txt, align, row, col, painter); @@ -100,7 +100,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, // and we draw this information in italics if(painter) { - QFont font = painter->font(); + TQFont font = painter->font(); font.setItalic(true); painter->setFont(font); } @@ -113,8 +113,8 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, delete e; } - QValueList<MyMoneySplit>::const_iterator it_s; - const QValueList<MyMoneySplit>& list = matchedTransaction.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& list = matchedTransaction.splits(); MyMoneyMoney importedValue; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { @@ -122,36 +122,36 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, } } - QDate postDate; - QString memo; + TQDate postDate; + TQString memo; switch(row) { case 0: if(painter) - txt = QString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)"); + txt = TQString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)"); // return true for the first visible column only break; case 1: switch(col) { case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Bank entry:"); break; case DetailColumn: - align |= Qt::AlignLeft; - txt = QString("%1 %2").arg(matchedTransaction.postDate().toString(Qt::ISODate)).arg(matchedTransaction.memo()); + align |= TQt::AlignLeft; + txt = TQString("%1 %2").tqarg(matchedTransaction.postDate().toString(Qt::ISODate)).tqarg(matchedTransaction.memo()); break; case PaymentColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(importedValue.isNegative()) { txt = (-importedValue).formatMoney(m_account.fraction()); } break; case DepositColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(!importedValue.isNegative()) { txt = importedValue.formatMoney(m_account.fraction()); } @@ -162,37 +162,37 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, case 2: switch(col) { case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Your entry:"); break; case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; postDate = m_transaction.postDate(); if(!m_split.value("kmm-orig-postdate").isEmpty()) { - postDate = QDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate); + postDate = TQDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate); } memo = m_split.memo(); if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) { - int pos = memo.findRev(matchedSplit.memo()); + int pos = memo.tqfindRev(matchedSplit.memo()); if(pos != -1) { memo = memo.left(pos); if(memo.endsWith("\n")) memo = memo.left(pos-1); } } - txt = QString("%1 %2").arg(postDate.toString(Qt::ISODate)).arg(memo); + txt = TQString("%1 %2").tqarg(postDate.toString(Qt::ISODate)).tqarg(memo); break; case PaymentColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_split.value().isNegative()) { txt = (-m_split.value(m_transaction.commodity(), m_splitCurrencyId)).formatMoney(m_account.fraction()); } break; case DepositColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(!m_split.value().isNegative()) { txt = m_split.value(m_transaction.commodity(), m_splitCurrencyId).formatMoney(m_account.fraction()); } @@ -204,7 +204,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, } } -void StdTransactionMatched::paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg) const +void StdTransactionMatched::paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg) const { // the last 3 rows should not show a grid if(row < m_rowsRegister - m_additionalRows) { diff --git a/kmymoney2/widgets/stdtransactionmatched.h b/kmymoney2/widgets/stdtransactionmatched.h index 599e6e0..e8959a9 100644 --- a/kmymoney2/widgets/stdtransactionmatched.h +++ b/kmymoney2/widgets/stdtransactionmatched.h @@ -20,7 +20,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qbrush.h> +#include <tqbrush.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -41,7 +41,7 @@ class StdTransactionMatched : public StdTransaction static const int m_additionalRows = 3; public: - StdTransactionMatched(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + StdTransactionMatched(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~StdTransactionMatched() {} virtual const char* className(void) { return "StdTransactionMatched"; } @@ -58,34 +58,34 @@ public: * - textRect (area covering the text) * - color of the pen to do the painting of text and lines * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register - * @param cellRect ref to QRect object receiving the area information for the cell - * @param textRect ref to QRect object receiving the area information for the text - * @param cg ref to QColorGroup object receiving the color information to be used - * @param brush ref to QBrush object receiveing the brush information to be used + * @param cellRect ref to TQRect object receiving the area information for the cell + * @param textRect ref to TQRect object receiving the area information for the text + * @param cg ref to TQColorGroup object receiving the color information to be used + * @param brush ref to TQBrush object receiveing the brush information to be used */ - virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush); + virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush); - virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const; + virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const; #if 0 - virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); - bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); + bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); int numColsForm(void) const { return 4; } - void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets); - void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets); - void tabOrderInForm(QWidgetList& tabOrderWidgets) const; - void tabOrderInRegister(QWidgetList& tabOrderWidgets) const; + void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets); + void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrderInForm(TQWidgetList& tabOrderWidgets) const; + void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const; int numRowsRegister(bool expanded) const; #endif - void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); + void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); /** * Provided for internal reasons. No API change. See RegisterItem::numRowsRegister(bool) diff --git a/kmymoney2/widgets/transaction.cpp b/kmymoney2/widgets/transaction.cpp index 4c8a23b..b45abd2 100644 --- a/kmymoney2/widgets/transaction.cpp +++ b/kmymoney2/widgets/transaction.cpp @@ -18,9 +18,9 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qpainter.h> -#include <qwidgetlist.h> +#include <tqstring.h> +#include <tqpainter.h> +#include <tqwidgetlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -135,8 +135,8 @@ static unsigned char attentionSign[] = { 0x42,0x60,0x82 }; -Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - RegisterItem(parent), +Transaction::Transaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + RegisterItem(tqparent), m_transaction(transaction), m_split(split), m_form(0), @@ -160,7 +160,7 @@ Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction if(!m_split.payeeId().isEmpty()) { m_payee = file->payee(m_split.payeeId()).name(); } - if(parent->account().isIncomeExpense()) { + if(tqparent->account().isIncomeExpense()) { m_payeeHeader = m_split.shares().isNegative() ? i18n("From") : i18n("Pay to"); } else { m_payeeHeader = m_split.shares().isNegative() ? i18n("Pay to") : i18n("From"); @@ -175,7 +175,7 @@ Transaction::Transaction(Register *parent, const MyMoneyTransaction& transaction if(!m_uniqueId.isEmpty()) { m_uniqueId += "-"; - QString id; + TQString id; id.setNum(uniqueId); m_uniqueId += id.rightJustify(3, '0'); } @@ -199,16 +199,16 @@ void Transaction::setFocus(bool focus, bool updateLens) } } -void Transaction::markAttachment(QPainter* painter, int /* row */, int /* col */, const QRect& r) +void Transaction::markAttachment(TQPainter* painter, int /* row */, int /* col */, const TQRect& r) { - static QPixmap clip; + static TQPixmap clip; const int m = 2; // margin int h = m_parent->rowHeightHint() - (2*m); int lx = r.topRight().x() - h; if(isErronous()) lx -= h; - QRect cr(QPoint(lx - m, m), QSize(h, h)); + TQRect cr(TQPoint(lx - m, m), TQSize(h, h)); painter->save(); if(clip.isNull()) { @@ -218,37 +218,37 @@ void Transaction::markAttachment(QPainter* painter, int /* row */, int /* col */ } } - painter->drawPixmap(QPoint(lx - m, m + (h - clip.height())/2 ), clip); + painter->drawPixmap(TQPoint(lx - m, m + (h - clip.height())/2 ), clip); painter->restore(); } -void Transaction::markAsErronous(QPainter* painter, int /* row */, int /* col */, const QRect& r) +void Transaction::markAsErronous(TQPainter* painter, int /* row */, int /* col */, const TQRect& r) { const int m = 2; // margin int h = m_parent->rowHeightHint() - (2*m); - QRect cr(QPoint(r.topRight().x() - h - m, m), QSize(h, h)); + TQRect cr(TQPoint(r.topRight().x() - h - m, m), TQSize(h, h)); painter->save(); - QPixmap attention; + TQPixmap attention; attention.loadFromData(attentionSign, sizeof(attentionSign), 0, 0); if(attention.height() > h) { attention.resize(h, h); } - painter->drawPixmap(QPoint(r.topRight().x() - h - m, m + (h - attention.height())/2 ), attention); + painter->drawPixmap(TQPoint(r.topRight().x() - h - m, m + (h - attention.height())/2 ), attention); painter->restore(); } -bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool Transaction::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { if(m_reducedIntensity) - cg = m_parent->palette().disabled(); + cg = m_parent->tqpalette().disabled(); if(m_alternate) - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); cellRect.setX(0); cellRect.setY(0); @@ -260,10 +260,10 @@ bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col, textRect.setWidth(textRect.width()-4); if(m_selected) { - brush = QBrush(cg.highlight()); + brush = TQBrush(cg.highlight()); painter->setPen(cg.highlightedText()); } else { - brush = QBrush(cg.base()); + brush = TQBrush(cg.base()); painter->setPen(cg.text()); } @@ -283,139 +283,139 @@ bool Transaction::paintRegisterCellSetup(QPainter* painter, int& row, int& col, return true; } -void Transaction::paintRegisterCellFocus(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) +void Transaction::paintRegisterCellFocus(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) { if(m_focus) { - QPen oldPen = painter->pen(); - QPen newPen = oldPen; + TQPen oldPen = painter->pen(); + TQPen newPen = oldPen; newPen.setWidth(0); painter->setFont(KMyMoneyGlobalSettings::listCellFont()); painter->setPen(newPen); painter->setPen(cg.foreground()); - painter->setPen(Qt::DotLine); + painter->setPen(TQt::DotLine); // for the first Row, we need to paint the top - QPoint start, end; + TQPoint start, end; #if 0 if(row == 0) { - start = QPoint(r.x(), r.y() + 1); - end = QPoint(r.x() + r.width(), r.y() + 1); + start = TQPoint(r.x(), r.y() + 1); + end = TQPoint(r.x() + r.width(), r.y() + 1); if(col == 0) { start.rx()++; } else if(col == m_parent->lastCol()) { end.rx()--; } // painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the last Row, we need to paint the bottom if(row == numRows() - 1) { - start = QPoint(r.x(), r.y() + r.height() - 1); - end = QPoint(r.x() + r.width(), r.y() + r.height() - 1); + start = TQPoint(r.x(), r.y() + r.height() - 1); + end = TQPoint(r.x() + r.width(), r.y() + r.height() - 1); if(col == 0) { start.rx()++; } else if(col == m_parent->lastCol()) { end.rx()--; } // painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the first col, we need to paint the left if(col == 0) { - start = QPoint(r.x() + 1, r.y()); - end = QPoint(r.x() + 1, r.y() + r.height()); + start = TQPoint(r.x() + 1, r.y()); + end = TQPoint(r.x() + 1, r.y() + r.height()); if(row == 0) { start.ry()++; } else if(row == numRows()-1) { end.ry()--; } //painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the last col, we need to paint the left if(col == m_parent->lastCol()) { - start = QPoint(r.x() + r.width() - 1, r.y()); - end = QPoint(r.x() + r.width() - 1, r.y() + r.height()); + start = TQPoint(r.x() + r.width() - 1, r.y()); + end = TQPoint(r.x() + r.width() - 1, r.y() + r.height()); if(row == 0) { start.ry()++; } else if(row == numRows()-1) { end.ry()--; } //painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } #endif if(row == 0) { - start = QPoint(r.x(), r.y()); - end = QPoint(r.x() + r.width(), r.y() + 1); + start = TQPoint(r.x(), r.y()); + end = TQPoint(r.x() + r.width(), r.y() + 1); if(col == 0) { start.rx()++; } else if(col == m_parent->lastCol()) { end.rx()--; } // painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the last Row, we need to paint the bottom if(row == numRowsRegister() - 1) { - start = QPoint(r.x(), r.y() + r.height() - 2); - end = QPoint(r.x() + r.width(), r.y() + r.height() - 2); + start = TQPoint(r.x(), r.y() + r.height() - 2); + end = TQPoint(r.x() + r.width(), r.y() + r.height() - 2); if(col == 0) { start.rx()++; } else if(col == m_parent->lastCol()) { end.rx()--; } // painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the first col, we need to paint the left if(col == 0) { - start = QPoint(r.x() + 1, r.y()); - end = QPoint(r.x() + 1, r.y() + r.height()); + start = TQPoint(r.x() + 1, r.y()); + end = TQPoint(r.x() + 1, r.y() + r.height()); if(row == 0) { start.ry()++; } else if(row == numRowsRegister()-1) { end.ry()--; } //painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } // for the last col, we need to paint the left if(col == m_parent->lastCol()) { - start = QPoint(r.x() + r.width() - 1, r.y()); - end = QPoint(r.x() + r.width() - 1, r.y() + r.height()); + start = TQPoint(r.x() + r.width() - 1, r.y()); + end = TQPoint(r.x() + r.width() - 1, r.y() + r.height()); if(row == 0) { start.ry()++; } else if(row == numRowsRegister()-1) { end.ry()--; } //painter->drawLine(start, end); - painter->drawWinFocusRect(QRect(start, end)); + painter->drawWinFocusRect(TQRect(start, end)); } painter->setPen(oldPen); } } -void Transaction::registerCellText(QString& txt, int row, int col) +void Transaction::registerCellText(TQString& txt, int row, int col) { int align = 0; registerCellText(txt, align, row, col, 0); } -void Transaction::paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool /* selected */, const QColorGroup& _cg) +void Transaction::paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool /* selected */, const TQColorGroup& _cg) { - QColorGroup cg(_cg); - QRect cellRect(r); - QRect textRect; - QBrush backgroundBrush; + TQColorGroup cg(_cg); + TQRect cellRect(r); + TQRect textRect; + TQBrush backgroundBrush; painter->save(); if(paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, backgroundBrush)) { // construct the text for the cell - int align = Qt::AlignVCenter; - QString txt; + int align = TQt::AlignVCenter; + TQString txt; if(m_transaction != MyMoneyTransaction() && !m_inRegisterEdit) { registerCellText(txt, align, row, col, painter); } @@ -438,11 +438,11 @@ void Transaction::paintRegisterCell(QPainter* painter, int row, int col, const Q painter->restore(); } -void Transaction::paintRegisterIcons(QPainter* painter, int row, int col, const QRect& /*r*/, const QColorGroup& /*cg*/) +void Transaction::paintRegisterIcons(TQPainter* painter, int row, int col, const TQRect& /*r*/, const TQColorGroup& /*cg*/) { if(row == 0 && col == DetailColumn && painter) { if(m_erronous || !m_transaction.value("kmm-attachment").isEmpty()) { - QRect cellRect; + TQRect cellRect; cellRect.setX(0); cellRect.setY(0); cellRect.setWidth(m_parent->columnWidth(col)); @@ -456,7 +456,7 @@ void Transaction::paintRegisterIcons(QPainter* painter, int row, int col, const } } } -void Transaction::paintRegisterCellBackground(QPainter* painter, int row, int col, const QRect& r, const QBrush& backgroundBrush) +void Transaction::paintRegisterCellBackground(TQPainter* painter, int row, int col, const TQRect& r, const TQBrush& backgroundBrush) { Q_UNUSED(row); Q_UNUSED(col); @@ -465,7 +465,7 @@ void Transaction::paintRegisterCellBackground(QPainter* painter, int row, int co painter->fillRect(r, backgroundBrush); } -void Transaction::paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg) const +void Transaction::paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg) const { Q_UNUSED(_cg); @@ -479,7 +479,7 @@ void Transaction::paintRegisterGrid(QPainter* painter, int row, int col, const Q } } -void Transaction::paintRegisterCellText(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg, int align, const QString& txt) +void Transaction::paintRegisterCellText(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg, int align, const TQString& txt) { Q_UNUSED(row); Q_UNUSED(col); @@ -508,7 +508,7 @@ int Transaction::formRowHeight(void) const kMyMoneyDateInput dateInput; KMyMoneyCategory category(0,0,true); - return QMAX(dateInput.sizeHint().height(), category.sizeHint().height()); + return TQMAX(dateInput.tqsizeHint().height(), category.tqsizeHint().height()); } return m_formRowHeight; } @@ -537,14 +537,14 @@ void Transaction::setupForm(TransactionForm* form) loadTab(form); } -void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect& /*r*/, bool /*selected*/, const QColorGroup& _cg) +void Transaction::paintFormCell(TQPainter* painter, int row, int col, const TQRect& /*r*/, bool /*selected*/, const TQColorGroup& _cg) { if(!m_form) return; - QRect cellRect = m_form->cellRect(row, col); + TQRect cellRect = m_form->cellRect(row, col); - QRect textRect(cellRect); + TQRect textRect(cellRect); textRect.setX(1); textRect.setY(1); textRect.setWidth(textRect.width()-2); @@ -553,8 +553,8 @@ void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect painter->fillRect(cellRect, _cg.background()); painter->setPen(_cg.text()); - QString txt; - int align = Qt::AlignVCenter; + TQString txt; + int align = TQt::AlignVCenter; bool editField = formCellText(txt, align, row, col, painter); // if we have an editable field and don't currently edit the transaction @@ -572,9 +572,9 @@ void Transaction::paintFormCell(QPainter* painter, int row, int col, const QRect } -void Transaction::setupPalette(const QPalette& palette, QMap<QString, QWidget*>& editWidgets) +void Transaction::setupPalette(const TQPalette& palette, TQMap<TQString, TQWidget*>& editWidgets) { - QMap<QString, QWidget*>::iterator it_w; + TQMap<TQString, TQWidget*>::iterator it_w; for(it_w = editWidgets.begin(); it_w != editWidgets.end(); ++it_w) { if(*it_w) { (*it_w)->setPalette(palette); @@ -582,36 +582,36 @@ void Transaction::setupPalette(const QPalette& palette, QMap<QString, QWidget*>& } } -void Transaction::setupFormPalette(QMap<QString, QWidget*>& editWidgets) +void Transaction::setupFormPalette(TQMap<TQString, TQWidget*>& editWidgets) { setupPalette(m_parent->palette(), editWidgets); } -void Transaction::setupRegisterPalette(QMap<QString, QWidget*>& editWidgets) +void Transaction::setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets) { // make sure, we're using the right palette - QPalette palette = m_parent->palette(); + TQPalette palette = m_parent->palette(); // use the highlight color as background - palette.setColor(QPalette::Active, QColorGroup::Background, palette.color(QPalette::Active, QColorGroup::Highlight)); + palette.setColor(TQPalette::Active, TQColorGroup::Background, palette.color(TQPalette::Active, TQColorGroup::Highlight)); setupPalette(palette, editWidgets); } -QWidget* Transaction::focusWidget(QWidget* w) const +TQWidget* Transaction::tqfocusWidget(TQWidget* w) const { if(w) { while(w->focusProxy()) - w = w->focusProxy(); + w = TQT_TQWIDGET(w->focusProxy()); } return w; } -void Transaction::arrangeWidget(QTable* tbl, int row, int col, QWidget* w) const +void Transaction::arrangeWidget(TQTable* tbl, int row, int col, TQWidget* w) const { if(w) { tbl->setCellWidget(row, col, w); - // remove the widget from the QTable's eventFilter so that all + // remove the widget from the TQTable's eventFilter so that all // events will be directed to the edit widget w->removeEventFilter(tbl); } else @@ -646,7 +646,7 @@ bool Transaction::haveNumberField(void) const return rc; } -bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QString& msg) +bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQString& msg) { if(col != DetailColumn) return false; @@ -659,25 +659,25 @@ bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QStri // check for detail column in row 0 of the transaction for a possible exclamation mark r = m_parent->cellGeometry(m_startRow + 0, col); // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); - r.setBottomLeft(QPoint(r.x() + (r.width() - h), r.y() + h)); + r.setBottomLeft(TQPoint(r.x() + (r.width() - h), r.y() + h)); // qDebug("r is %d,%d,%d,%d", r.x(), r.y(), r.width(), r.height()); - // qDebug("p is in r = %d", r.contains(cpos)); - if(r.contains(cpos) && m_erronous) { + // qDebug("p is in r = %d", r.tqcontains(cpos)); + if(r.tqcontains(cpos) && m_erronous) { if(m_transaction.splits().count() < 2) { - msg = QString("<qt>%1</qt>").arg(i18n("Transaction is missing a category assignment.")); + msg = TQString("<qt>%1</qt>").tqarg(i18n("Transaction is missing a category assignment.")); } else { const MyMoneySecurity& sec = MyMoneyFile::instance()->security(m_account.currencyId()); - msg = QString("<qt>%1</qt>").arg(i18n("The transaction has a missing assignment of <b>%1</b>.").arg(m_transaction.splitSum().abs().formatMoney(m_account, sec))); + msg = TQString("<qt>%1</qt>").tqarg(i18n("The transaction has a missing assignment of <b>%1</b>.").tqarg(m_transaction.splitSum().abs().formatMoney(m_account, sec))); } return true; } // check for detail column in row 1 of the transaction for a possible exclamation mark r = m_parent->cellGeometry(m_startRow + 1, col); - if(row == 1 && r.contains(cpos) && m_transaction.splitCount() > 2) { + if(row == 1 && r.tqcontains(cpos) && m_transaction.splitCount() > 2) { MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneySplit>::const_iterator it_s; - QString txt; + TQValueList<MyMoneySplit>::const_iterator it_s; + TQString txt; const MyMoneySecurity& sec = file->security(m_transaction.commodity()); MyMoneyMoney factor(1, 1); if(!m_split.value().isNegative()) @@ -687,26 +687,26 @@ bool Transaction::maybeTip(const QPoint& cpos, int row, int col, QRect& r, QStri if(*it_s == m_split) continue; const MyMoneyAccount& acc = file->account((*it_s).accountId()); - QString category = file->accountToCategory(acc.id()); - QString amount = ((*it_s).value() * factor).formatMoney(acc, sec); + TQString category = file->accountToCategory(acc.id()); + TQString amount = ((*it_s).value() * factor).formatMoney(acc, sec); - txt += QString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").arg(category, amount); + txt += TQString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").tqarg(category, amount); } - msg = QString("<table>%1</table>").arg(txt); + msg = TQString("<table>%1</table>").tqarg(txt); return true; } return false; } -QString Transaction::reconcileState(bool text) const +TQString Transaction::reconcileState(bool text) const { - QString txt = KMyMoneyUtils::reconcileStateToString(m_split.reconcileFlag(), text); + TQString txt = KMyMoneyUtils::reconcileStateToString(m_split.reconcileFlag(), text); if((text == true) && (txt == i18n("Unknown")) && (m_transaction == MyMoneyTransaction())) - txt = QString(); + txt = TQString(); return txt; } @@ -725,13 +725,13 @@ void Transaction::leaveEditMode(void) setFocus(hasFocus(), true); } -void Transaction::singleLineMemo(QString& txt, const MyMoneySplit& split) const +void Transaction::singleLineMemo(TQString& txt, const MyMoneySplit& split) const { txt = split.memo(); // remove empty lines - txt.replace("\n\n", "\n"); - // replace '\n' with ", " - txt.replace('\n', ", "); + txt.tqreplace("\n\n", "\n"); + // tqreplace '\n' with ", " + txt.tqreplace('\n', ", "); } int Transaction::rowHeightHint(void) const @@ -740,41 +740,41 @@ int Transaction::rowHeightHint(void) const } -bool Transaction::matches(const QString& txt) const +bool Transaction::matches(const TQString& txt) const { if(txt.isEmpty() || m_transaction.splitCount() == 0) return true; MyMoneyFile* file = MyMoneyFile::instance(); - QString s(txt); - s.replace(MyMoneyMoney::thousandSeparator(), QString()); + TQString s(txt); + s.tqreplace(MyMoneyMoney::thousandSeparator(), TQString()); - const QValueList<MyMoneySplit>&list = m_transaction.splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>&list = m_transaction.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = list.begin(); it_s != list.end(); ++it_s) { // check if the text is contained in one of the fields // memo, number, payee, account - if((*it_s).memo().contains(txt, false) - || (*it_s).number().contains(txt, false)) + if((*it_s).memo().tqcontains(txt, false) + || (*it_s).number().tqcontains(txt, false)) return true; if(!(*it_s).payeeId().isEmpty()) { const MyMoneyPayee& payee = file->payee((*it_s).payeeId()); - if(payee.name().contains(txt, false)) + if(payee.name().tqcontains(txt, false)) return true; } const MyMoneyAccount& acc = file->account((*it_s).accountId()); - if(acc.name().contains(txt, false)) + if(acc.name().tqcontains(txt, false)) return true; if(!s.isEmpty()) { // check if any of the value field matches if a value has been entered - QString r = (*it_s).value().formatMoney(m_account.fraction(), false); - if(r.contains(s, false)) + TQString r = (*it_s).value().formatMoney(m_account.fraction(), false); + if(r.tqcontains(s, false)) return true; const MyMoneyAccount& acc = file->account((*it_s).accountId()); r = (*it_s).shares().formatMoney(acc.fraction(), false); - if(r.contains(s, false)) + if(r.tqcontains(s, false)) return true; } } @@ -839,8 +839,8 @@ void Transaction::setSelected(bool selected) m_selected = selected; } -StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - Transaction(parent, transaction, split, uniqueId), +StdTransaction::StdTransaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + Transaction(tqparent, transaction, split, uniqueId), m_showAccountRow(false) { try { @@ -867,7 +867,7 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans if(KMyMoneyUtils::transactionType(m_transaction) == KMyMoneyUtils::InvestmentTransaction) { MyMoneySplit split = KMyMoneyUtils::stockSplit(m_transaction); m_payee = MyMoneyFile::instance()->account(split.accountId()).name(); - QString addon; + TQString addon; if(split.action() == MyMoneySplit::ActionBuyShares) { if(split.value().isNegative()) { addon = i18n("Sell"); @@ -880,7 +880,7 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans addon = i18n("Yield"); } if(!addon.isEmpty()) { - m_payee += QString(" (%1)").arg(addon); + m_payee += TQString(" (%1)").tqarg(addon); } m_payeeHeader = i18n("Activity"); m_category = i18n("Investment transaction"); @@ -889,10 +889,10 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans // setup initial size setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed())); - emit parent->itemAdded(this); + emit tqparent->itemAdded(this); } -void StdTransaction::setupFormHeader(const QString& id) +void StdTransaction::setupFormHeader(const TQString& id) { m_category = MyMoneyFile::instance()->accountToCategory(id); switch(MyMoneyFile::instance()->account(id).accountGroup()) { @@ -913,7 +913,7 @@ KMyMoneyRegister::Action StdTransaction::actionType(void) const // if at least one split is referencing an income or // expense account, we will not call it a transfer - QValueList<MyMoneySplit>::const_iterator it_s; + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = m_transaction.splits().begin(); it_s != m_transaction.splits().end(); ++it_s) { if((*it_s).accountId() == m_split.accountId()) @@ -951,7 +951,7 @@ void StdTransaction::setupForm(TransactionForm* form) { Transaction::setupForm(form); - QTableItem* memo = form->item(3, ValueColumn1); + TQTableItem* memo = form->item(3, ValueColumn1); memo->setSpan(3, 1); } @@ -966,14 +966,14 @@ void StdTransaction::setShowRowInForm(int row, bool show) m_showAccountRow = show; } -bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */) +bool StdTransaction::formCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */) { // if(m_transaction != MyMoneyTransaction()) { switch(row) { case 0: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Account"); break; } @@ -982,23 +982,23 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP case 1: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_payeeHeader; break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_payee; break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveNumberField()) txt = i18n("Number"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveNumberField()) txt = m_split.number(); break; @@ -1008,12 +1008,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP case 2: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_categoryHeader; break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_category; if(m_transaction != MyMoneyTransaction()) { if(txt.isEmpty() && !m_split.value().isZero()) @@ -1022,12 +1022,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Date"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_transaction != MyMoneyTransaction()) txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true); break; @@ -1037,25 +1037,25 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP case 3: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Memo"); break; case ValueColumn1: - align &= ~Qt::AlignVCenter; - align |= Qt::AlignTop; - align |= Qt::AlignLeft; + align &= ~TQt::AlignVCenter; + align |= TQt::AlignTop; + align |= TQt::AlignLeft; if(m_transaction != MyMoneyTransaction()) txt = m_split.memo().section('\n', 0, 2); break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Amount"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_transaction != MyMoneyTransaction()) { txt = (m_split.value(m_transaction.commodity(), m_splitCurrencyId).abs()).formatMoney(m_account.fraction()); } @@ -1066,12 +1066,12 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP case 5: switch(col) { case LabelColumn2: - align |= Qt::AlignLeft; - txt = i18n("Status"); + align |= TQt::AlignLeft; + txt = i18n("tqStatus"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; txt = reconcileState(); break; } @@ -1083,24 +1083,24 @@ bool StdTransaction::formCellText(QString& txt, int& align, int row, int col, QP return (col == ValueColumn1 && row < 4) || (col == ValueColumn2 && row > 0 && row != 4); } -void StdTransaction::registerCellText(QString& txt, int& align, int row, int col, QPainter* painter) +void StdTransaction::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter) { switch(row) { case 0: switch(col) { case NumberColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveNumberField()) txt = m_split.number(); break; case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true); break; case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_payee; if(txt.isEmpty() && m_rowsRegister < 3) { singleLineMemo(txt, m_split); @@ -1119,26 +1119,26 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col break; case ReconcileFlagColumn: - align |= Qt::AlignHCenter; + align |= TQt::AlignHCenter; txt = reconcileState(false); break; case PaymentColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_split.value().isNegative()) { txt = (-m_split.value(m_transaction.commodity(), m_splitCurrencyId)).formatMoney(m_account.fraction()); } break; case DepositColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(!m_split.value().isNegative()) { txt = m_split.value(m_transaction.commodity(), m_splitCurrencyId).formatMoney(m_account.fraction()); } break; case BalanceColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_showBalance) txt = m_balance.formatMoney(m_account.fraction()); else @@ -1158,7 +1158,7 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col case 1: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = m_category; if(txt.isEmpty() && !m_split.value().isZero()) { txt = i18n("*** UNASSIGNED ***"); @@ -1175,7 +1175,7 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col case 2: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; singleLineMemo(txt, m_split); break; @@ -1186,9 +1186,9 @@ void StdTransaction::registerCellText(QString& txt, int& align, int row, int col } } -int StdTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetrics) +int StdTransaction::registerColWidth(int col, const TQFontMetrics& cellFontMetrics) { - QString txt; + TQString txt; int firstRow = 0, lastRow = 0; int nw = 0; @@ -1202,7 +1202,7 @@ int StdTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetric return nw; } -void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) +void StdTransaction::arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets) { if(!m_form || !m_parent) return; @@ -1212,7 +1212,7 @@ void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) arrangeWidget(m_form, 0, ValueColumn1, editWidgets["account"]); arrangeWidget(m_form, 1, LabelColumn1, editWidgets["cashflow"]); arrangeWidget(m_form, 1, ValueColumn1, editWidgets["payee"]); - arrangeWidget(m_form, 2, ValueColumn1, editWidgets["category"]->parentWidget()); + arrangeWidget(m_form, 2, ValueColumn1, editWidgets["category"]->tqparentWidget()); arrangeWidget(m_form, 3, ValueColumn1, editWidgets["memo"]); if(haveNumberField()) { arrangeWidget(m_form, 1, LabelColumn2, editWidgets["number-label"]); @@ -1225,68 +1225,68 @@ void StdTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) arrangeWidget(m_form, 2, LabelColumn1, editWidgets["category-label"]); // get rid of the hints. we don't need them for the form - QMap<QString, QWidget*>::iterator it; + TQMap<TQString, TQWidget*>::iterator it; for(it = editWidgets.begin(); it != editWidgets.end(); ++it) { KMyMoneyCombo* combo = dynamic_cast<KMyMoneyCombo*>(*it); kMyMoneyLineEdit* edit = dynamic_cast<kMyMoneyLineEdit*>(*it); KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(*it); if(combo) - combo->setHint(QString()); + combo->setHint(TQString()); if(edit) - edit->setHint(QString()); + edit->setHint(TQString()); if(payee) - payee->setHint(QString()); + payee->setHint(TQString()); } // drop the tabbar on top of the original KMyMoneyTransactionForm::TransactionForm* form = dynamic_cast<KMyMoneyTransactionForm::TransactionForm*>(m_form); TabBar* w = dynamic_cast<TabBar*>(editWidgets["tabbar"]); if(w) { - w->reparent(form->tabBar(), QPoint(0, 0), true); + w->reparent(form->tabBar(), TQPoint(0, 0), true); } } -void StdTransaction::tabOrderInForm(QWidgetList& tabOrderWidgets) const +void StdTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const { - QStringList taborder = QStringList::split(",", KMyMoneyGlobalSettings::stdTransactionFormTabOrder()); - QStringList::const_iterator it_s = taborder.constBegin(); - QWidget* w; + TQStringList taborder = TQStringList::split(",", KMyMoneyGlobalSettings::stdTransactionFormTabOrder()); + TQStringList::const_iterator it_s = taborder.constBegin(); + TQWidget* w; while(it_s != taborder.constEnd()) { if(*it_s == "account") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1))); } else if(*it_s == "cashflow") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, LabelColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, LabelColumn1))); } else if(*it_s == "payee") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1))); } else if(*it_s == "category") { // make sure to have the category field and the split button as seperate tab order widgets // ok, we have to have some internal knowledge about the KMyMoneyCategory object, but // it's one of our own widgets, so we actually don't care. Just make sure, that we don't // go haywire when someone changes the KMyMoneyCategory object ... w = m_form->cellWidget(2, ValueColumn1); - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); } else if(*it_s == "memo") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn1))); } else if(*it_s == "number") { if(haveNumberField()) { - if((w = focusWidget(m_form->cellWidget(1, ValueColumn2)))) + if((w = tqfocusWidget(m_form->cellWidget(1, ValueColumn2)))) tabOrderWidgets.append(w); } } else if(*it_s == "date") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2))); } else if(*it_s == "amount") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2))); } else if(*it_s == "state") { - tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2))); } ++it_s; } } -void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets) +void StdTransaction::arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets) { if(!m_parent) return; @@ -1298,7 +1298,7 @@ void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidge arrangeWidget(m_parent, m_startRow + 0, DateColumn, editWidgets["postdate"]); arrangeWidget(m_parent, m_startRow + 1, DateColumn, editWidgets["status"]); arrangeWidget(m_parent, m_startRow + 0, DetailColumn, editWidgets["payee"]); - arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["category"]->parentWidget()); + arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["category"]->tqparentWidget()); arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["memo"]); arrangeWidget(m_parent, m_startRow + 0, PaymentColumn, editWidgets["payment"]); arrangeWidget(m_parent, m_startRow + 0, DepositColumn, editWidgets["deposit"]); @@ -1307,39 +1307,39 @@ void StdTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidge m_parent->setRowHeight(m_startRow+2, m_parent->rowHeightHint() * 3); } -void StdTransaction::tabOrderInRegister(QWidgetList& tabOrderWidgets) const +void StdTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const { - QStringList taborder = QStringList::split(",", KMyMoneyGlobalSettings::stdTransactionRegisterTabOrder()); - QStringList::const_iterator it_s = taborder.constBegin(); - QWidget* w; + TQStringList taborder = TQStringList::split(",", KMyMoneyGlobalSettings::stdTransactionRegisterTabOrder()); + TQStringList::const_iterator it_s = taborder.constBegin(); + TQWidget* w; while(it_s != taborder.constEnd()) { if(*it_s == "number") { if(haveNumberField()) { - if((w = focusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn)))) + if((w = tqfocusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn)))) tabOrderWidgets.append(w); } } else if(*it_s == "date") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn))); } else if(*it_s == "payee") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn))); } else if(*it_s == "category") { // make sure to have the category field and the split button as seperate tab order widgets // ok, we have to have some internal knowledge about the KMyMoneyCategory object, but // it's one of our own widgets, so we actually don't care. Just make sure, that we don't // go haywire when someone changes the KMyMoneyCategory object ... w = m_parent->cellWidget(m_startRow + 1, DetailColumn); - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); } else if(*it_s == "memo") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn))); } else if(*it_s == "payment") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn))); } else if(*it_s == "deposit") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn))); } else if(*it_s == "state") { - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn))); } ++it_s; } @@ -1370,14 +1370,14 @@ int StdTransaction::numRowsRegister(bool expanded) const return numRows; } -TransactionEditor* StdTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) +TransactionEditor* StdTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) { m_inRegisterEdit = regForm == m_parent; return new StdTransactionEditor(regForm, this, list, lastPostDate); } -InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - Transaction(parent, transaction, split, uniqueId) +InvestTransaction::InvestTransaction(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + Transaction(tqparent, transaction, split, uniqueId) { // dissect the transaction into its type, splits, currency, security etc. InvestTransactionEditor::dissectTransaction(m_transaction, m_split, @@ -1388,7 +1388,7 @@ InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction& m_currency, m_transactionType); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = m_feeSplits.begin(); it_s != m_feeSplits.end(); ++it_s) { m_feeAmount += (*it_s).value(); } @@ -1429,18 +1429,18 @@ InvestTransaction::InvestTransaction(Register *parent, const MyMoneyTransaction& // setup initial size setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed())); - emit parent->itemAdded(this); + emit tqparent->itemAdded(this); } void InvestTransaction::setupForm(TransactionForm* form) { Transaction::setupForm(form); - QTableItem* memo = form->item(5, 1); + TQTableItem* memo = form->item(5, 1); memo->setSpan(2, 1); } -void InvestTransaction::activity(QString& txt, MyMoneySplit::investTransactionTypeE type) const +void InvestTransaction::activity(TQString& txt, MyMoneySplit::investTransactionTypeE type) const { switch(type) { case MyMoneySplit::AddShares: @@ -1473,7 +1473,7 @@ void InvestTransaction::activity(QString& txt, MyMoneySplit::investTransactionTy } } -bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */) +bool InvestTransaction::formCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */) { bool fieldEditable = false; @@ -1481,23 +1481,23 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 0: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Activity"); break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; fieldEditable = true; activity(txt, m_transactionType); break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Date"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; fieldEditable = true; if(m_transaction != MyMoneyTransaction()) txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true); @@ -1508,19 +1508,19 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 1: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Security"); break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; fieldEditable = true; if(m_account.isInvest()) txt = m_security.name(); break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveShares()) { txt = i18n("Shares"); } else if(haveSplitRatio()) { @@ -1529,11 +1529,11 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if((fieldEditable = haveShares()) == true) { txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction())); } else if(haveSplitRatio()) { - txt = QString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1)); + txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1)); } break; } @@ -1542,26 +1542,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 2: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveAssetAccount()) txt = i18n("Account"); break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if((fieldEditable = haveAssetAccount()) == true) { txt = MyMoneyFile::instance()->accountToCategory(m_assetAccountSplit.accountId()); } break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(havePrice()) txt = i18n("Price/share"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if((fieldEditable = havePrice()) == true && !m_split.shares().isZero()) { txt = m_split.price().formatMoney("", KMyMoneyGlobalSettings::pricePrecision()); } @@ -1572,26 +1572,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 3: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveFees()) txt = i18n("Fees"); break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if((fieldEditable = haveFees()) == true) { txt = m_feeCategory; } break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveFees() && !m_feeCategory.isEmpty()) txt = i18n("Amount"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveFees()) { if((fieldEditable = !m_feeCategory.isEmpty()) == true) { txt = m_feeAmount.formatMoney(m_currency); @@ -1604,26 +1604,26 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 4: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveInterest()) txt = i18n("Interest"); break; case ValueColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if((fieldEditable = haveInterest()) == true) { txt = m_interestCategory; } break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveInterest() && !m_interestCategory.isEmpty()) txt = i18n("Amount"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveInterest()) { if((fieldEditable = !m_interestCategory.isEmpty()) == true) { txt = (-m_interestAmount).formatMoney(m_currency); @@ -1636,27 +1636,27 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 5: switch(col) { case LabelColumn1: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Memo"); break; case ValueColumn1: - align &= ~Qt::AlignVCenter; - align |= Qt::AlignTop; - align |= Qt::AlignLeft; + align &= ~TQt::AlignVCenter; + align |= TQt::AlignTop; + align |= TQt::AlignLeft; fieldEditable = true; if(m_transaction != MyMoneyTransaction()) txt = m_split.memo().section('\n', 0, 2); break; case LabelColumn2: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveAmount()) txt = i18n("Total"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if((fieldEditable = haveAmount()) == true) { txt = m_assetAccountSplit.value().abs().formatMoney(m_currency); } @@ -1666,12 +1666,12 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, case 6: switch(col) { case LabelColumn2: - align |= Qt::AlignLeft; - txt = i18n("Status"); + align |= TQt::AlignLeft; + txt = i18n("tqStatus"); break; case ValueColumn2: - align |= Qt::AlignRight; + align |= TQt::AlignRight; fieldEditable = true; txt = reconcileState(); break; @@ -1681,50 +1681,50 @@ bool InvestTransaction::formCellText(QString& txt, int& align, int row, int col, return fieldEditable; } -void InvestTransaction::registerCellText(QString& txt, int& align, int row, int col, QPainter* /* painter */) +void InvestTransaction::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* /* painter */) { switch(row) { case 0: switch(col) { case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = KGlobal::locale()->formatDate(m_transaction.postDate(), true); break; case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; activity(txt, m_transactionType); break; case SecurityColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(m_account.isInvest()) txt = m_security.name(); break; case ReconcileFlagColumn: - align |= Qt::AlignHCenter; + align |= TQt::AlignHCenter; txt = reconcileState(false); break; case QuantityColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveShares()) txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction())); else if(haveSplitRatio()) { - txt = QString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1)); + txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1)); } break; case PriceColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(havePrice() && !m_split.shares().isZero()) { txt = m_split.price().formatMoney(m_currency.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision()); } break; case ValueColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveAmount()) { txt = m_assetAccountSplit.value().abs().formatMoney(m_currency); @@ -1734,7 +1734,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int break; case BalanceColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_showBalance) txt = m_balance.formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction())); else @@ -1749,7 +1749,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int case 1: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()) { txt = MyMoneyFile::instance()->accountToCategory(m_assetAccountSplit.accountId()); } else if(haveInterest() && m_interestSplits.count()) { @@ -1761,7 +1761,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int break; case QuantityColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty()) { // txt = m_interestAmount.abs().formatMoney(m_currency); } else if(haveInterest() && m_interestSplits.count()) { @@ -1779,7 +1779,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int case 2: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty() && haveInterest() && m_interestSplits.count()) { txt = m_interestCategory; @@ -1790,7 +1790,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int break; case QuantityColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty() && haveInterest() && m_interestSplits.count()) { txt = (-m_interestAmount).formatMoney(m_currency); @@ -1807,7 +1807,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int case 3: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty() && haveInterest() && m_interestSplits.count() && haveFees() && m_feeSplits.count()) { @@ -1817,7 +1817,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int break; case QuantityColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(haveAssetAccount() && !m_assetAccountSplit.accountId().isEmpty() && haveInterest() && m_interestSplits.count() && haveFees() && m_feeSplits.count()) { @@ -1833,7 +1833,7 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int case 4: switch(col) { case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; singleLineMemo(txt, m_split); break; @@ -1844,9 +1844,9 @@ void InvestTransaction::registerCellText(QString& txt, int& align, int row, int } } -int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMetrics) +int InvestTransaction::registerColWidth(int col, const TQFontMetrics& cellFontMetrics) { - QString txt; + TQString txt; MyMoneyMoney amount; int nw = 0; @@ -1855,7 +1855,7 @@ int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMet int w; Transaction::registerCellText(txt, row, col); w = cellFontMetrics.width(txt+" "); - nw = QMAX(nw, w); + nw = TQMAX(nw, w); } // TODO the optimized way would be to base the size on the contents of a single row @@ -1876,7 +1876,7 @@ int InvestTransaction::registerColWidth(int col, const QFontMetrics& cellFontMet return nw; } -void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) +void InvestTransaction::arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets) { if(!m_form || !m_parent) return; @@ -1890,9 +1890,9 @@ void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidget arrangeWidget(m_form, 1, ValueColumn2, editWidgets["shares"]); arrangeWidget(m_form, 2, ValueColumn1, editWidgets["asset-account"]); arrangeWidget(m_form, 2, ValueColumn2, editWidgets["price"]); - arrangeWidget(m_form, 3, ValueColumn1, editWidgets["fee-account"]->parentWidget()); + arrangeWidget(m_form, 3, ValueColumn1, editWidgets["fee-account"]->tqparentWidget()); arrangeWidget(m_form, 3, ValueColumn2, editWidgets["fee-amount"]); - arrangeWidget(m_form, 4, ValueColumn1, editWidgets["interest-account"]->parentWidget()); + arrangeWidget(m_form, 4, ValueColumn1, editWidgets["interest-account"]->tqparentWidget()); arrangeWidget(m_form, 4, ValueColumn2, editWidgets["interest-amount"]); arrangeWidget(m_form, 5, ValueColumn1, editWidgets["memo"]); arrangeWidget(m_form, 5, ValueColumn2, editWidgets["total"]); @@ -1909,77 +1909,77 @@ void InvestTransaction::arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidget arrangeWidget(m_form, 5, LabelColumn2, editWidgets["total-label"]); // get rid of the hints. we don't need them for the form - QMap<QString, QWidget*>::iterator it; + TQMap<TQString, TQWidget*>::iterator it; for(it = editWidgets.begin(); it != editWidgets.end(); ++it) { KMyMoneyCombo* combo = dynamic_cast<KMyMoneyCombo*>(*it); kMyMoneyLineEdit* lineedit = dynamic_cast<kMyMoneyLineEdit*>(*it); kMyMoneyEdit* edit = dynamic_cast<kMyMoneyEdit*>(*it); KMyMoneyPayeeCombo* payee = dynamic_cast<KMyMoneyPayeeCombo*>(*it); if(combo) - combo->setHint(QString()); + combo->setHint(TQString()); if(edit) - edit->setHint(QString()); + edit->setHint(TQString()); if(lineedit) - lineedit->setHint(QString()); + lineedit->setHint(TQString()); if(payee) - payee->setHint(QString()); + payee->setHint(TQString()); } } -void InvestTransaction::tabOrderInForm(QWidgetList& tabOrderWidgets) const +void InvestTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const { // activity - tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1))); // date - tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn2))); // security - tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1))); // shares - tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn2))); // account - tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn1))); // price - tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2))); // make sure to have the fee category field and the split button as seperate tab order widgets // ok, we have to have some internal knowledge about the KMyMoneyCategory object, but // it's one of our own widgets, so we actually don't care. Just make sure, that we don't // go haywire when someone changes the KMyMoneyCategory object ... - QWidget* w = m_form->cellWidget(3, ValueColumn1); - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + TQWidget* w = m_form->cellWidget(3, ValueColumn1); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); // fee amount - tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2))); // the same applies for the interest categories w = m_form->cellWidget(4, ValueColumn1); - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); // interest amount - tabOrderWidgets.append(focusWidget(m_form->cellWidget(4, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(4, ValueColumn2))); // memo - tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn1))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn1))); // total - tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2))); // state - tabOrderWidgets.append(focusWidget(m_form->cellWidget(6, ValueColumn2))); + tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(6, ValueColumn2))); } -void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets) +void InvestTransaction::arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets) { if(!m_parent) return; @@ -1990,8 +1990,8 @@ void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWi arrangeWidget(m_parent, m_startRow + 0, SecurityColumn, editWidgets["security"]); arrangeWidget(m_parent, m_startRow + 0, DetailColumn, editWidgets["activity"]); arrangeWidget(m_parent, m_startRow + 1, DetailColumn, editWidgets["asset-account"]); - arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["interest-account"]->parentWidget()); - arrangeWidget(m_parent, m_startRow + 3, DetailColumn, editWidgets["fee-account"]->parentWidget()); + arrangeWidget(m_parent, m_startRow + 2, DetailColumn, editWidgets["interest-account"]->tqparentWidget()); + arrangeWidget(m_parent, m_startRow + 3, DetailColumn, editWidgets["fee-account"]->tqparentWidget()); arrangeWidget(m_parent, m_startRow + 4, DetailColumn, editWidgets["memo"]); arrangeWidget(m_parent, m_startRow + 0, QuantityColumn, editWidgets["shares"]); arrangeWidget(m_parent, m_startRow + 0, PriceColumn, editWidgets["price"]); @@ -2004,50 +2004,50 @@ void InvestTransaction::arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWi m_parent->setRowHeight(m_startRow+4, m_parent->rowHeightHint() * 3); } -void InvestTransaction::tabOrderInRegister(QWidgetList& tabOrderWidgets) const +void InvestTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const { - QWidget* w; + TQWidget* w; // date - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn))); // security - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn))); // activity - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn))); // shares - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn))); // price - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn))); // asset account - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn))); // make sure to have the category fields and the split button as seperate tab order widgets // ok, we have to have some internal knowledge about the KMyMoneyCategory object, but // it's one of our own widgets, so we actually don't care. Just make sure, that we don't // go haywire when someone changes the KMyMoneyCategory object ... w = m_parent->cellWidget(m_startRow + 2, DetailColumn); // interest account - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); // interest amount - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn))); w = m_parent->cellWidget(m_startRow + 3, DetailColumn); // fee account - tabOrderWidgets.append(focusWidget(w)); - w = dynamic_cast<QWidget*>(w->child("splitButton")); + tabOrderWidgets.append(tqfocusWidget(w)); + w = dynamic_cast<TQWidget*>(w->child("splitButton")); if(w) tabOrderWidgets.append(w); // fee amount - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn))); // memo - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn))); // status - tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn))); + tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn))); } int InvestTransaction::numRowsRegister(bool expanded) const @@ -2174,14 +2174,14 @@ bool InvestTransaction::haveSplitRatio(void) const return m_transactionType == MyMoneySplit::SplitShares; } -void InvestTransaction::splits(MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& feeSplits) const +void InvestTransaction::splits(MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& feeSplits) const { assetAccountSplit = m_assetAccountSplit; interestSplits = m_interestSplits; feeSplits = m_feeSplits; } -TransactionEditor* InvestTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) +TransactionEditor* InvestTransaction::createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) { m_inRegisterEdit = regForm == m_parent; return new InvestTransactionEditor(regForm, this, list, lastPostDate); diff --git a/kmymoney2/widgets/transaction.h b/kmymoney2/widgets/transaction.h index 060d025..f74bb60 100644 --- a/kmymoney2/widgets/transaction.h +++ b/kmymoney2/widgets/transaction.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpalette.h> +#include <tqpalette.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,7 +36,7 @@ #include <kmymoney/selectedtransaction.h> #include <kmymoney/mymoneyaccount.h> -class QTable; +class TQTable; class TransactionEditor; class TransactionEditorContainer; @@ -68,7 +68,7 @@ typedef enum { class Transaction : public RegisterItem { public: - Transaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + Transaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~Transaction() {} virtual const char* className(void) { return "Transaction"; } @@ -87,18 +87,18 @@ public: bool isErronous(void) const { return m_erronous; } - virtual const QDate& sortPostDate(void) const { return m_transaction.postDate(); } + virtual const TQDate& sortPostDate(void) const { return m_transaction.postDate(); } virtual int sortSamePostDate(void) const { return 2; } - virtual const QDate& sortEntryDate(void) const { return m_transaction.entryDate(); } - virtual const QString& sortPayee(void) const { return m_payee; } + virtual const TQDate& sortEntryDate(void) const { return m_transaction.entryDate(); } + virtual const TQString& sortPayee(void) const { return m_payee; } virtual const MyMoneyMoney& sortValue(void) const { return m_split.shares(); } - virtual const QString& sortNumber(void) const { return m_split.number(); } - virtual const QString& sortEntryOrder(void) const { return m_uniqueId; } + virtual const TQString& sortNumber(void) const { return m_split.number(); } + virtual const TQString& sortEntryOrder(void) const { return m_uniqueId; } virtual CashFlowDirection sortType(void) const { return m_split.shares().isNegative() ? Payment : Deposit; } - virtual const QString& sortCategory(void) const { return m_category; } + virtual const TQString& sortCategory(void) const { return m_category; } virtual MyMoneySplit::reconcileFlagE sortReconcileState(void) const { return m_split.reconcileFlag(); } - virtual const QString& id(void) const { return m_uniqueId; } + virtual const TQString& id(void) const { return m_uniqueId; } const MyMoneyTransaction& transaction(void) const { return m_transaction; } const MyMoneySplit& split(void) const { return m_split; } @@ -119,31 +119,31 @@ public: * - textRect (area covering the text) * - color of the pen to do the painting of text and lines * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register - * @param cellRect ref to QRect object receiving the area information for the cell - * @param textRect ref to QRect object receiving the area information for the text - * @param cg ref to QColorGroup object receiving the color information to be used + * @param cellRect ref to TQRect object receiving the area information for the cell + * @param textRect ref to TQRect object receiving the area information for the text + * @param cg ref to TQColorGroup object receiving the color information to be used */ - virtual bool paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush); + virtual bool paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush); /** * paints the focus if the current cell defined by (@a row, @a col) has the focus. * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register * @param r area covering the cell * @param cg the color definitions to be used */ - void paintRegisterCellFocus(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg); + void paintRegisterCellFocus(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg); /** * paints a cell of the register for the transaction. Uses paintRegisterCellSetup(), paintRegisterCellText() * paintRegisterGrid(), paintRegisterIcons() and paintRegisterCellFocus() to actually do the job. * - * @param painter pointer to the QPainter object + * @param painter pointer to the TQPainter object * @param row vertical index of cell in register * @param col horizontal index of cell in register * @param r area covering the cell @@ -151,44 +151,44 @@ public: * @param cg the color definitions to be used * */ - virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); - virtual void paintRegisterCellText(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg, int align, const QString& txt); - virtual void paintRegisterCellBackground(QPainter* painter, int row, int col, const QRect& r, const QBrush& backgroundBrush); - virtual void paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg) const; - virtual void paintRegisterIcons(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& cg); + virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); + virtual void paintRegisterCellText(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg, int align, const TQString& txt); + virtual void paintRegisterCellBackground(TQPainter* painter, int row, int col, const TQRect& r, const TQBrush& backgroundBrush); + virtual void paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg) const; + virtual void paintRegisterIcons(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& cg); - virtual void paintFormCell(QPainter* /* painter */, int /* row */, int /* col */, const QRect& /* r */, bool /* selected */, const QColorGroup& /* cg */); + virtual void paintFormCell(TQPainter* /* painter */, int /* row */, int /* col */, const TQRect& /* r */, bool /* selected */, const TQColorGroup& /* cg */); - virtual bool formCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) { return false; } - virtual void registerCellText(QString& /* txt */, int& /* align */, int /* row */, int /* col */, QPainter* /* painter */) {} - virtual int registerColWidth(int /* col */, const QFontMetrics& /* cellFontMetrics */) { return 0; } + virtual bool formCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) { return false; } + virtual void registerCellText(TQString& /* txt */, int& /* align */, int /* row */, int /* col */, TQPainter* /* painter */) {} + virtual int registerColWidth(int /* col */, const TQFontMetrics& /* cellFontMetrics */) { return 0; } /** * Helper method for the above method. */ - void registerCellText(QString& txt, int row, int col); + void registerCellText(TQString& txt, int row, int col); virtual int formRowHeight(int row); virtual int formRowHeight(void) const; virtual void setupForm(KMyMoneyTransactionForm::TransactionForm* form); - virtual void setupFormPalette(QMap<QString, QWidget*>& editWidgets); - virtual void setupRegisterPalette(QMap<QString, QWidget*>& editWidgets); + virtual void setupFormPalette(TQMap<TQString, TQWidget*>& editWidgets); + virtual void setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets); virtual void loadTab(KMyMoneyTransactionForm::TransactionForm* form) = 0; - virtual void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets) = 0; - virtual void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets) = 0; - virtual void tabOrderInForm(QWidgetList& tabOrderWidgets) const = 0; - virtual void tabOrderInRegister(QWidgetList& tabOrderWidgets) const = 0; + virtual void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets) = 0; + virtual void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets) = 0; + virtual void tabOrderInForm(TQWidgetList& tabOrderWidgets) const = 0; + virtual void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const = 0; virtual KMyMoneyRegister::Action actionType(void) const = 0; - QWidget* focusWidget(QWidget*) const; - void arrangeWidget(QTable* tbl, int row, int col, QWidget* w) const; + TQWidget* tqfocusWidget(TQWidget*) const; + void arrangeWidget(TQTable* tbl, int row, int col, TQWidget* w) const; bool haveNumberField(void) const; - bool matches(const QString&) const; + bool matches(const TQString&) const; /** * Checks if the mouse hovered over an area that has a tooltip associated with it. @@ -197,11 +197,11 @@ public: * * If a tooltip shall be shown, this method presets the rectangle @a r with the * area in register coordinates and @a msg with the string that will be passed - * to QToolTip::tip. @a true is returned in this case. + * to TQToolTip::tip. @a true is returned in this case. * * If no tooltip is available, @a false will be returned. */ - virtual bool maybeTip(const QPoint& relpos, int row, int col, QRect& r, QString& msg); + virtual bool maybeTip(const TQPoint& relpos, int row, int col, TQRect& r, TQString& msg); /** * This method returns the number of register rows required for a certain @@ -223,7 +223,7 @@ public: /** * This method creates an editor for the transaction */ - virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate) = 0; + virtual TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate) = 0; virtual void setVisible(bool visible); @@ -244,8 +244,8 @@ public: virtual void setReducedIntensity(bool reduced) { m_reducedIntensity = reduced; } protected: - virtual void markAsErronous(QPainter* p, int row, int col, const QRect& r); - virtual void markAttachment(QPainter* painter, int row, int col, const QRect& r); + virtual void markAsErronous(TQPainter* p, int row, int col, const TQRect& r); + virtual void markAttachment(TQPainter* painter, int row, int col, const TQRect& r); /** * This method converts m_split.reconcileFlag() into a readable string @@ -255,30 +255,30 @@ protected: * @return Textual representation or flag as selected via @p text of the * reconciliation state of the split */ - QString reconcileState(bool text = true) const; + TQString reconcileState(bool text = true) const; /** * Helper method to reduce a multi line memo text into a single line. * - * @param txt QString that will receive the single line memo text + * @param txt TQString that will receive the single line memo text * @param split const reference to the split to take the memo from */ - void singleLineMemo(QString& txt, const MyMoneySplit& split) const; + void singleLineMemo(TQString& txt, const MyMoneySplit& split) const; - virtual void setupPalette(const QPalette& palette, QMap<QString, QWidget*>& editWidgets); + virtual void setupPalette(const TQPalette& palette, TQMap<TQString, TQWidget*>& editWidgets); protected: MyMoneyTransaction m_transaction; MyMoneySplit m_split; MyMoneyAccount m_account; MyMoneyMoney m_balance; - QTable* m_form; - QString m_category; - QString m_payee; - QString m_payeeHeader; - QString m_categoryHeader; - QString m_splitCurrencyId; - QString m_uniqueId; + TQTable* m_form; + TQString m_category; + TQString m_payee; + TQString m_payeeHeader; + TQString m_categoryHeader; + TQString m_splitCurrencyId; + TQString m_uniqueId; int m_formRowHeight; bool m_selected; bool m_focus; @@ -292,24 +292,24 @@ protected: class StdTransaction : public Transaction { public: - StdTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + StdTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~StdTransaction() {} virtual const char* className(void) { return "StdTransaction"; } - bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); - void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); + bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); + void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); - int registerColWidth(int col, const QFontMetrics& cellFontMetrics); + int registerColWidth(int col, const TQFontMetrics& cellFontMetrics); void setupForm(KMyMoneyTransactionForm::TransactionForm* form); void loadTab(KMyMoneyTransactionForm::TransactionForm* form); int numColsForm(void) const { return 4; } - void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets); - void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets); - void tabOrderInForm(QWidgetList& tabOrderWidgets) const; - void tabOrderInRegister(QWidgetList& tabOrderWidgets) const; + void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets); + void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrderInForm(TQWidgetList& tabOrderWidgets) const; + void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const; KMyMoneyRegister::Action actionType(void) const; int numRowsRegister(bool expanded) const; @@ -319,7 +319,7 @@ public: */ int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); } - TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate); + TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate); /** * Return information if @a row should be shown (@a true ) @@ -334,7 +334,7 @@ public: virtual void setShowRowInForm(int row, bool show); protected: - void setupFormHeader(const QString& id); + void setupFormHeader(const TQString& id); private: bool m_showAccountRow; @@ -343,18 +343,18 @@ private: class InvestTransaction : public Transaction { public: - InvestTransaction(Register* parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); + InvestTransaction(Register* tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId); virtual ~InvestTransaction() {} - virtual const QString& sortSecurity(void) const { return m_security.name(); } + virtual const TQString& sortSecurity(void) const { return m_security.name(); } virtual const char* className(void) { return "InvestTransaction"; } - // virtual void paintRegisterCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + // virtual void paintRegisterCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); - bool formCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); - void registerCellText(QString& txt, int& align, int row, int col, QPainter* painter = 0); + bool formCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); + void registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter = 0); - int registerColWidth(int col, const QFontMetrics& cellFontMetrics); + int registerColWidth(int col, const TQFontMetrics& cellFontMetrics); void setupForm(KMyMoneyTransactionForm::TransactionForm* form); /** @@ -364,10 +364,10 @@ public: int numColsForm(void) const { return 4; } - void arrangeWidgetsInForm(QMap<QString, QWidget*>& editWidgets); - void arrangeWidgetsInRegister(QMap<QString, QWidget*>& editWidgets); - void tabOrderInForm(QWidgetList& tabOrderWidgets) const; - void tabOrderInRegister(QWidgetList& tabOrderWidgets) const; + void arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWidgets); + void arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrderInForm(TQWidgetList& tabOrderWidgets) const; + void tabOrderInRegister(TQWidgetList& tabOrderWidgets) const; KMyMoneyRegister::Action actionType(void) const { return KMyMoneyRegister::ActionNone; } int numRowsRegister(bool expanded) const; @@ -377,9 +377,9 @@ public: */ int numRowsRegister(void) const { return RegisterItem::numRowsRegister(); } - TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const QDate& lastPostDate); + TransactionEditor* createEditor(TransactionEditorContainer* regForm, const KMyMoneyRegister::SelectedTransactions& list, const TQDate& lastPostDate); - void splits(MyMoneySplit& assetAccountSplit, QValueList<MyMoneySplit>& interestSplits, QValueList<MyMoneySplit>& feeSplits) const; + void splits(MyMoneySplit& assetAccountSplit, TQValueList<MyMoneySplit>& interestSplits, TQValueList<MyMoneySplit>& feeSplits) const; protected: bool haveShares(void) const; @@ -394,20 +394,20 @@ protected: * Returns textual representation of the activity identified * by @p type. * - * @param txt reference to QString where to store the result + * @param txt reference to TQString where to store the result * @param type activity represented as investTransactionTypeE */ - void activity(QString& txt, MyMoneySplit::investTransactionTypeE type) const; + void activity(TQString& txt, MyMoneySplit::investTransactionTypeE type) const; private: - QValueList<MyMoneySplit> m_feeSplits; - QValueList<MyMoneySplit> m_interestSplits; + TQValueList<MyMoneySplit> m_feeSplits; + TQValueList<MyMoneySplit> m_interestSplits; MyMoneySplit m_assetAccountSplit; MyMoneySecurity m_security; MyMoneySecurity m_currency; MyMoneySplit::investTransactionTypeE m_transactionType; - QString m_feeCategory; - QString m_interestCategory; + TQString m_feeCategory; + TQString m_interestCategory; MyMoneyMoney m_feeAmount; MyMoneyMoney m_interestAmount; MyMoneyMoney m_totalAmount; diff --git a/kmymoney2/widgets/transactioneditorcontainer.h b/kmymoney2/widgets/transactioneditorcontainer.h index 01474ee..6cf82cf 100644 --- a/kmymoney2/widgets/transactioneditorcontainer.h +++ b/kmymoney2/widgets/transactioneditorcontainer.h @@ -21,10 +21,10 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qmap.h> -#include <qstring.h> -#include <qtable.h> -class QWidget; +#include <tqmap.h> +#include <tqstring.h> +#include <tqtable.h> +class TQWidget; // ---------------------------------------------------------------------------- // KDE Includes @@ -42,17 +42,17 @@ typedef enum { ProtectAll } ProtectedAction; -class TransactionEditorContainer : public QTable +class TransactionEditorContainer : public TQTable { public: - TransactionEditorContainer(QWidget* parent, const char* name) : QTable(parent, name) {} + TransactionEditorContainer(TQWidget* tqparent, const char* name) : TQTable(tqparent, name) {} - virtual void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) = 0; - virtual void removeEditWidgets(QMap<QString, QWidget*>& editWidgets) = 0; - virtual void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const = 0; + virtual void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) = 0; + virtual void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets) = 0; + virtual void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const = 0; // FIXME remove tabbar - // virtual int action(QMap<QString, QWidget*>& editWidgets) const = 0; - // virtual void setProtectedAction(QMap<QString, QWidget*>& editWidgets, ProtectedAction action) = 0; + // virtual int action(TQMap<TQString, TQWidget*>& editWidgets) const = 0; + // virtual void setProtectedAction(TQMap<TQString, TQWidget*>& editWidgets, ProtectedAction action) = 0; }; #endif diff --git a/kmymoney2/widgets/transactionform.cpp b/kmymoney2/widgets/transactionform.cpp index 7097b6d..8686371 100644 --- a/kmymoney2/widgets/transactionform.cpp +++ b/kmymoney2/widgets/transactionform.cpp @@ -18,13 +18,13 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qstring.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qapplication.h> -#include <qlayout.h> -#include <qtabbar.h> -#include <qpalette.h> +#include <tqstring.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqtabbar.h> +#include <tqpalette.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,11 +47,11 @@ using namespace KMyMoneyTransactionForm; -TabBar::TabBar(QWidget* parent, const char* name) : - QTabBar(parent, name), +TabBar::TabBar(TQWidget* tqparent, const char* name) : + TQTabBar(tqparent, name), m_signalType(SignalNormal) { - connect(this, SIGNAL(selected(int)), this, SLOT(slotTabSelected(int))); + connect(this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(slotTabSelected(int))); } TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type) @@ -63,8 +63,8 @@ TabBar::SignalEmissionE TabBar::setSignalEmission(TabBar::SignalEmissionE type) int TabBar::currentTab(void) const { - QMap<int, int>::const_iterator it; - it = m_idMap.find(QTabBar::currentTab()); + TQMap<int, int>::const_iterator it; + it = m_idMap.tqfind(TQTabBar::currentTab()); if(it != m_idMap.end()) return *it; return -1; @@ -77,30 +77,30 @@ void TabBar::setCurrentTab(int id) setCurrentTab(tab(id)); } -QTab* TabBar::tab(int id) const +TQTab* TabBar::tab(int id) const { - /* if a QAccel calls setCurrentTab, id will be as set by qt. + /* if a TQAccel calls setCurrentTab, id will be as set by qt. * however if we call it programmatically, id will - * be our own id. We do tell QTab about our id but + * be our own id. We do tell TQTab about our id but * in qt3.3 I (woro) am not able to make sure that - * QAccel also gets it. See registeritem.h: We defined + * TQAccel also gets it. See registeritem.h: We defined * new values for our own ids which should lie way * outside of the range that qt uses */ - QTab *result=QTabBar::tab(id); - QMap<int, int>::const_iterator it; + TQTab *result=TQTabBar::tab(id); + TQMap<int, int>::const_iterator it; for(it = m_idMap.begin(); it != m_idMap.end(); ++it) if(*it == id) - result=QTabBar::tab(it.key()); + result=TQTabBar::tab(it.key()); return result; } -void TabBar::setCurrentTab(QTab* tab) +void TabBar::setCurrentTab(TQTab* tab) { if(m_signalType != SignalNormal) blockSignals(true); - QTabBar::setCurrentTab(tab); + TQTabBar::setCurrentTab(tab); if(m_signalType != SignalNormal) blockSignals(false); @@ -109,13 +109,13 @@ void TabBar::setCurrentTab(QTab* tab) emit selected(tab->identifier()); } -void TabBar::addTab(QTab* tab, int id) +void TabBar::addTab(TQTab* tab, int id) { - QTabBar::addTab(tab); + TQTabBar::addTab(tab); setIdentifier(tab, id); } -void TabBar::setIdentifier(QTab* tab, int newId) +void TabBar::setIdentifier(TQTab* tab, int newId) { m_idMap[tab->identifier()] = newId; } @@ -127,8 +127,8 @@ void TransactionForm::enableTabBar(bool b) void TabBar::slotTabSelected(int id) { - QMap<int, int>::const_iterator it; - it = m_idMap.find(id); + TQMap<int, int>::const_iterator it; + it = m_idMap.tqfind(id); if(it != m_idMap.end()) emit tabSelected(*it); else @@ -141,7 +141,7 @@ void TabBar::show(void) if(m_signalType != SignalNormal) blockSignals(true); - QTabBar::show(); + TQTabBar::show(); if(m_signalType != SignalNormal) blockSignals(false); @@ -155,9 +155,9 @@ void TabBar::copyTabs(const TabBar* otabbar) } // now create new ones. copy text, icon and identifier for(int i=0; i < otabbar->count(); ++i) { - QTab* otab = otabbar->tabAt(i); - QTab* ntab = new QTab(otab->text()); - int nid = QTabBar::addTab(ntab); + TQTab* otab = otabbar->tabAt(i); + TQTab* ntab = new TQTab(otab->text()); + int nid = TQTabBar::addTab(ntab); m_idMap[nid] = otabbar->m_idMap[otab->identifier()]; ntab->setEnabled(otab->isEnabled()); if(otab->identifier() == otabbar->currentTab()) @@ -165,15 +165,15 @@ void TabBar::copyTabs(const TabBar* otabbar) } } -TransactionForm::TransactionForm(QWidget *parent, const char *name) : - TransactionEditorContainer(parent, name), +TransactionForm::TransactionForm(TQWidget *tqparent, const char *name) : + TransactionEditorContainer(tqparent, name), m_transaction(0), m_tabBar(0) { - setBackgroundOrigin(QTable::WindowOrigin); - setFrameShape( QTable::NoFrame); + setBackgroundOrigin(TQTable::WindowOrigin); + setFrameShape( TQTable::NoFrame); setShowGrid( false ); - setSelectionMode( QTable::NoSelection ); + setSelectionMode( TQTable::NoSelection ); verticalHeader()->hide(); horizontalHeader()->hide(); setLeftMargin(0); @@ -182,34 +182,34 @@ TransactionForm::TransactionForm(QWidget *parent, const char *name) : // make sure, that the table is 'invisible' by setting up the right background // keep the original color group for painting the cells though - QPalette p = palette(); - QColorGroup cg = p.active(); + TQPalette p = palette(); + TQColorGroup cg = p.active(); m_cellColorGroup = cg; - cg.setBrush(QColorGroup::Base, cg.brush(QColorGroup::Background)); + cg.setBrush(TQColorGroup::Base, cg.brush(TQColorGroup::Background)); p.setActive(cg); p.setInactive(cg); p.setDisabled(cg); setPalette(p); // never show vertical scroll bars - setVScrollBarMode(QScrollView::AlwaysOff); + setVScrollBarMode(TQScrollView::AlwaysOff); slotSetTransaction(0); } -void TransactionForm::drawContents( QPainter *p, int cx, int cy, int cw, int ch ) +void TransactionForm::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) { - // the QTable::drawContents() method does not honor the block update flag + // the TQTable::drawContents() method does not honor the block update flag // so we take care of it here - if ( testWState(WState_Visible|WState_BlockUpdates) != WState_Visible ) + if ( testWState((TQt::WidgetState)(WState_Visible|WState_BlockUpdates)) != WState_Visible ) return; - QTable::drawContents(p, cx, cy, cw, ch); + TQTable::drawContents(p, cx, cy, cw, ch); } bool TransactionForm::focusNextPrevChild(bool next) { - return QFrame::focusNextPrevChild(next); + return TQFrame::focusNextPrevChild(next); } void TransactionForm::clear(void) @@ -237,13 +237,13 @@ void TransactionForm::slotSetTransaction(KMyMoneyRegister::Transaction* transact kMyMoneyDateInput dateInput(0, "editDate"); KMyMoneyCategory category(0, "category", true); - // extract the maximal sizeHint height - int height = QMAX(dateInput.sizeHint().height(), category.sizeHint().height()); + // extract the maximal tqsizeHint height + int height = TQMAX(dateInput.tqsizeHint().height(), category.tqsizeHint().height()); for(int row = 0; row < numRows(); ++row) { if(!transaction || transaction->showRowInForm(row)) { showRow(row); - QTable::setRowHeight(row, height); + TQTable::setRowHeight(row, height); } else hideRow(row); } @@ -256,25 +256,25 @@ void TransactionForm::slotSetTransaction(KMyMoneyRegister::Transaction* transact setUpdatesEnabled(enabled); // force resizeing of the columns - QTimer::singleShot(0, this, SLOT(resize())); + TQTimer::singleShot(0, this, TQT_SLOT(resize())); } -void TransactionForm::paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& /* cg */) +void TransactionForm::paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& /* cg */) { if(m_transaction) { m_transaction->paintFormCell(painter, row, col, r, selected, m_cellColorGroup); } } -TabBar* TransactionForm::tabBar(QWidget* parent) +TabBar* TransactionForm::tabBar(TQWidget* tqparent) { - if(!m_tabBar && parent) { + if(!m_tabBar && tqparent) { // determine the height of the objects in the table // create the tab bar - m_tabBar = new TabBar( parent ); + m_tabBar = new TabBar( tqparent ); m_tabBar->setSignalEmission(TabBar::SignalAlways); - m_tabBar->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, m_tabBar->sizePolicy().hasHeightForWidth() ) ); - connect(m_tabBar, SIGNAL(tabSelected(int)), this, SLOT(slotActionSelected(int))); + m_tabBar->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, m_tabBar->sizePolicy().hasHeightForWidth() ) ); + connect(m_tabBar, TQT_SIGNAL(tabSelected(int)), this, TQT_SLOT(slotActionSelected(int))); } return m_tabBar; } @@ -287,7 +287,7 @@ void TransactionForm::slotActionSelected(int id) void TransactionForm::setupForm(const MyMoneyAccount& acc) { // remove all tabs from the tabbar - QTab* tab; + TQTab* tab; for(tab = m_tabBar->tabAt(0); tab; tab = m_tabBar->tabAt(0)) { m_tabBar->removeTab(tab); } @@ -299,40 +299,40 @@ void TransactionForm::setupForm(const MyMoneyAccount& acc) // a different value switch(acc.accountType()) { default: - tab = new QTab(i18n("&Deposit")); + tab = new TQTab(i18n("&Deposit")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit); - tab = new QTab(i18n("&Transfer")); + tab = new TQTab(i18n("&Transfer")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer); - tab = new QTab(i18n("&Withdrawal")); + tab = new TQTab(i18n("&Withdrawal")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal); break; case MyMoneyAccount::CreditCard: - tab = new QTab(i18n("&Payment")); + tab = new TQTab(i18n("&Payment")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit); - tab = new QTab(i18n("&Transfer")); + tab = new TQTab(i18n("&Transfer")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer); - tab = new QTab(i18n("&Charge")); + tab = new TQTab(i18n("&Charge")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal); break; case MyMoneyAccount::Liability: case MyMoneyAccount::Loan: - tab = new QTab(i18n("&Decrease")); + tab = new TQTab(i18n("&Decrease")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit); - tab = new QTab(i18n("&Transfer")); + tab = new TQTab(i18n("&Transfer")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer); - tab = new QTab(i18n("&Increase")); + tab = new TQTab(i18n("&Increase")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal); break; case MyMoneyAccount::Asset: case MyMoneyAccount::AssetLoan: - tab = new QTab(i18n("&Increase")); + tab = new TQTab(i18n("&Increase")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionDeposit); - tab = new QTab(i18n("&Transfer")); + tab = new TQTab(i18n("&Transfer")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionTransfer); - tab = new QTab(i18n("&Decrease")); + tab = new TQTab(i18n("&Decrease")); m_tabBar->addTab(tab, KMyMoneyRegister::ActionWithdrawal); break; @@ -380,18 +380,18 @@ void TransactionForm::resize(int col) updateContents(); } -// needed to duplicate this here, as the QTable::tableSize method is private :-( -QSize TransactionForm::tableSize(void) const +// needed to duplicate this here, as the TQTable::tableSize method is private :-( +TQSize TransactionForm::tableSize(void) const { - return QSize(columnPos(numCols()-1) + columnWidth(numCols()-1) + 10, + return TQSize(columnPos(numCols()-1) + columnWidth(numCols()-1) + 10, rowPos(numRows()-1) + rowHeight(numRows()-1) + 10); } -QSize TransactionForm::sizeHint(void) const +TQSize TransactionForm::tqsizeHint(void) const { - // I've taken this from qtable.cpp, QTable::sizeHint() - int vmargin = QApplication::reverseLayout() ? rightMargin() : leftMargin(); - return QSize(tableSize().width() + vmargin + 5, tableSize().height() + topMargin() + 10); + // I've taken this from qtable.cpp, TQTable::tqsizeHint() + int vmargin = TQApplication::reverseLayout() ? rightMargin() : leftMargin(); + return TQSize(tableSize().width() + vmargin + 5, tableSize().height() + topMargin() + 10); } void TransactionForm::adjustColumn(Column col) @@ -403,22 +403,22 @@ void TransactionForm::adjustColumn(Column col) if(col == ValueColumn2) { kMyMoneyDateInput dateInput; kMyMoneyEdit valInput; - w = QMAX(dateInput.sizeHint().width(), valInput.sizeHint().width()); + w = TQMAX(dateInput.tqsizeHint().width(), valInput.tqsizeHint().width()); } if(m_transaction) { - QString txt; - QFontMetrics fontMetrics(KMyMoneyGlobalSettings::listCellFont()); + TQString txt; + TQFontMetrics fontMetrics(KMyMoneyGlobalSettings::listCellFont()); // scan through the rows for ( int i = numRows()-1; i >= 0; --i ) { int align; m_transaction->formCellText(txt, align, i, static_cast<int>(col), 0); - QWidget* cw = cellWidget(i, col); + TQWidget* cw = cellWidget(i, col); if(cw) { - w = QMAX(w, cw->sizeHint().width()+10); + w = TQMAX(w, cw->tqsizeHint().width()+10); } - w = QMAX(w, fontMetrics.width(txt)+10); + w = TQMAX(w, fontMetrics.width(txt)+10); } } @@ -426,22 +426,22 @@ void TransactionForm::adjustColumn(Column col) setColumnWidth( col, w ); } -void TransactionForm::arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) +void TransactionForm::arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t) { t->arrangeWidgetsInForm(editWidgets); resize(ValueColumn1); } -void TransactionForm::tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const +void TransactionForm::tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const { t->tabOrderInForm(tabOrderWidgets); } -void TransactionForm::removeEditWidgets(QMap<QString, QWidget*>& editWidgets) +void TransactionForm::removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets) { - QMap<QString, QWidget*>::iterator it; + TQMap<TQString, TQWidget*>::iterator it; for(it = editWidgets.begin(); it != editWidgets.end(); ) { - if((*it)->parentWidget() == this) { + if((*it)->tqparentWidget() == this) { editWidgets.remove(it); it = editWidgets.begin(); } else diff --git a/kmymoney2/widgets/transactionform.h b/kmymoney2/widgets/transactionform.h index 13116da..5c50248 100644 --- a/kmymoney2/widgets/transactionform.h +++ b/kmymoney2/widgets/transactionform.h @@ -21,12 +21,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qtable.h> -#include <qvaluelist.h> -#include <qvaluevector.h> -#include <qpalette.h> -#include <qwidgetlist.h> -#include <qtabbar.h> +#include <tqtable.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> +#include <tqpalette.h> +#include <tqwidgetlist.h> +#include <tqtabbar.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -47,9 +47,10 @@ namespace KMyMoneyTransactionForm { /** * @author Thomas Baumgart */ -class TabBar : public QTabBar +class TabBar : public TQTabBar { Q_OBJECT + TQ_OBJECT public: typedef enum { SignalNormal = 0, // standard signal behaviour @@ -57,18 +58,18 @@ public: SignalAlways // always signal selection of a tab } SignalEmissionE; - TabBar(QWidget* parent = 0, const char* name = 0); + TabBar(TQWidget* tqparent = 0, const char* name = 0); virtual ~TabBar() {} SignalEmissionE setSignalEmission(SignalEmissionE type); void copyTabs(const TabBar* otabbar); - void addTab(QTab* tab, int id); + void addTab(TQTab* tab, int id); - void setIdentifier(QTab* tab, int newId); + void setIdentifier(TQTab* tab, int newId); - QTab* tab(int id) const; + TQTab* tab(int id) const; int currentTab(void) const; @@ -81,7 +82,7 @@ public slots: /** * overridden for internal reasons, API not changed */ - virtual void setCurrentTab( QTab * ); + virtual void setCurrentTab( TQTab * ); /** * overridden for internal reasons, API not changed @@ -100,10 +101,10 @@ private: /** * maps our internal action ids to those used by * qt3. Since it does not seem possible to tell - * qt3 to use our ids everywhere (in QAccel) we + * qt3 to use our ids everywhere (in TQAccel) we * need to know which is which */ - QMap<int, int> m_idMap; + TQMap<int, int> m_idMap; }; @@ -123,34 +124,35 @@ typedef enum { class TransactionForm : public TransactionEditorContainer { Q_OBJECT + TQ_OBJECT public: - TransactionForm(QWidget *parent = 0, const char *name = 0); + TransactionForm(TQWidget *tqparent = 0, const char *name = 0); virtual ~TransactionForm() {} /** - * Override the QTable member function to avoid display of focus + * Override the TQTable member function to avoid display of focus */ - void paintFocus(QPainter* /*p*/, const QRect& /*cr*/ ) {} + void paintFocus(TQPainter* /*p*/, const TQRect& /*cr*/ ) {} - QSize tableSize(void) const; - QSize sizeHint(void) const; + TQSize tableSize(void) const; + TQSize tqsizeHint(void) const; void adjustColumn(Column col); void clear(void); - void paintCell(QPainter* painter, int row, int col, const QRect& r, bool selected, const QColorGroup& cg); + void paintCell(TQPainter* painter, int row, int col, const TQRect& r, bool selected, const TQColorGroup& cg); void resize(int col); - void arrangeEditWidgets(QMap<QString, QWidget*>& editWidgets, KMyMoneyRegister::Transaction* t); - void removeEditWidgets(QMap<QString, QWidget*>& editWidgets); - void tabOrder(QWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const; + void arrangeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets, KMyMoneyRegister::Transaction* t); + void removeEditWidgets(TQMap<TQString, TQWidget*>& editWidgets); + void tabOrder(TQWidgetList& tabOrderWidgets, KMyMoneyRegister::Transaction* t) const; /** * reimplemented to prevent normal cell selection behavior */ void setCurrentCell(int, int) {} - TabBar* tabBar(QWidget* parent = 0); + TabBar* tabBar(TQWidget* tqparent = 0); void setupForm(const MyMoneyAccount& acc); @@ -158,37 +160,37 @@ public: protected: /** - * reimplemented to support QWidget::WState_BlockUpdates + * reimplemented to support TQWidget::WState_BlockUpdates */ - void drawContents(QPainter *p, int cx, int cy, int cw, int ch); + void drawContents(TQPainter *p, int cx, int cy, int cw, int ch); /** * reimplemented to prevent normal mouse press behavior */ - void contentsMousePressEvent(QMouseEvent* ev) { ev->ignore(); } + void contentsMousePressEvent(TQMouseEvent* ev) { ev->ignore(); } /** * reimplemented to prevent normal mouse move behavior */ - void contentsMouseMoveEvent(QMouseEvent* ev) { ev->ignore(); } + void contentsMouseMoveEvent(TQMouseEvent* ev) { ev->ignore(); } /** * reimplemented to prevent normal mouse release behavior */ - void contentsMouseReleaseEvent(QMouseEvent* ev) { ev->ignore(); } + void contentsMouseReleaseEvent(TQMouseEvent* ev) { ev->ignore(); } /** * reimplemented to prevent normal mouse double click behavior */ - void contentsMouseDoubleClickEvent(QMouseEvent* ev) { ev->ignore(); } + void contentsMouseDoubleClickEvent(TQMouseEvent* ev) { ev->ignore(); } /** * reimplemented to prevent normal keyboard behavior */ - void keyPressEvent(QKeyEvent* ev) { ev->ignore(); } + void keyPressEvent(TQKeyEvent* ev) { ev->ignore(); } /** - * Override logic and use standard QFrame behaviour + * Override logic and use standard TQFrame behaviour */ bool focusNextPrevChild(bool next); @@ -212,7 +214,7 @@ signals: protected: KMyMoneyRegister::Transaction* m_transaction; - QColorGroup m_cellColorGroup; + TQColorGroup m_cellColorGroup; TabBar* m_tabBar; }; diff --git a/kmymoney2/widgets/transactionsortoption.ui b/kmymoney2/widgets/transactionsortoption.ui index 23de01b..887be10 100644 --- a/kmymoney2/widgets/transactionsortoption.ui +++ b/kmymoney2/widgets/transactionsortoption.ui @@ -1,7 +1,7 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>TransactionSortOption</class> <author>Thomas Baumgart <ipwizard@users.sourceforge.net></author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TransactionSortOption</cstring> </property> @@ -20,9 +20,9 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> @@ -55,9 +55,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -73,7 +73,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>67</height> @@ -106,7 +106,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>67</height> @@ -115,9 +115,9 @@ </spacer> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> @@ -150,9 +150,9 @@ </widget> </vbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout6</cstring> + <cstring>tqlayout6</cstring> </property> <vbox> <property name="name"> @@ -168,7 +168,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>67</height> @@ -201,7 +201,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>67</height> @@ -221,9 +221,9 @@ </connection> <connection> <sender>m_availableList</sender> - <signal>selectionChanged(QListViewItem*)</signal> + <signal>selectionChanged(TQListViewItem*)</signal> <receiver>TransactionSortOption</receiver> - <slot>slotAvailableSelected(QListViewItem*)</slot> + <slot>slotAvailableSelected(TQListViewItem*)</slot> </connection> <connection> <sender>m_downButton</sender> @@ -239,9 +239,9 @@ </connection> <connection> <sender>m_selectedList</sender> - <signal>selectionChanged(QListViewItem*)</signal> + <signal>selectionChanged(TQListViewItem*)</signal> <receiver>TransactionSortOption</receiver> - <slot>slotSelectedSelected(QListViewItem*)</slot> + <slot>slotSelectedSelected(TQListViewItem*)</slot> </connection> <connection> <sender>m_upButton</sender> @@ -251,37 +251,37 @@ </connection> <connection> <sender>m_selectedList</sender> - <signal>doubleClicked(QListViewItem*)</signal> + <signal>doubleClicked(TQListViewItem*)</signal> <receiver>TransactionSortOption</receiver> - <slot>toggleDirection(QListViewItem*)</slot> + <slot>toggleDirection(TQListViewItem*)</slot> </connection> <connection> <sender>m_selectedList</sender> - <signal>spacePressed(QListViewItem*)</signal> + <signal>spacePressed(TQListViewItem*)</signal> <receiver>TransactionSortOption</receiver> - <slot>toggleDirection(QListViewItem*)</slot> + <slot>toggleDirection(TQListViewItem*)</slot> </connection> </connections> <includes> <include location="local" impldecl="in implementation">transactionsortoption.ui.h</include> </includes> -<signals> - <signal>settingsChanged(const QString&)</signal> -</signals> -<slots> - <slot>setSettings( const QString & settings )</slot> - <slot>toggleDirection( QListViewItem * item )</slot> - <slot access="protected" specifier="non virtual">slotAvailableSelected( QListViewItem * item )</slot> - <slot access="protected" specifier="non virtual">slotSelectedSelected( QListViewItem * item )</slot> +<Q_SIGNALS> + <signal>settingsChanged(const TQString&)</signal> +</Q_SIGNALS> +<Q_SLOTS> + <slot>setSettings( const TQString & settings )</slot> + <slot>toggleDirection( TQListViewItem * item )</slot> + <slot access="protected" specifier="non virtual">slotAvailableSelected( TQListViewItem * item )</slot> + <slot access="protected" specifier="non virtual">slotSelectedSelected( TQListViewItem * item )</slot> <slot access="protected" specifier="non virtual">slotAddItem( void )</slot> <slot access="protected" specifier="non virtual">slotRemoveItem( void )</slot> <slot access="protected" specifier="non virtual">slotUpItem( void )</slot> <slot access="protected" specifier="non virtual">slotDownItem( void )</slot> -</slots> +</Q_SLOTS> <functions> <function specifier="non virtual">init()</function> - <function access="protected" specifier="non virtual" returnType="QListViewItem *">addEntry( KListView * p, QListViewItem * after, int idx )</function> - <function specifier="non virtual" returnType="QString">settings( void ) const</function> + <function access="protected" specifier="non virtual" returnType="TQListViewItem *">addEntry( KListView * p, TQListViewItem * after, int idx )</function> + <function specifier="non virtual" returnType="TQString">settings( void ) const</function> </functions> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/widgets/transactionsortoption.ui.h b/kmymoney2/widgets/transactionsortoption.ui.h index 3784e0b..fe01eb2 100644 --- a/kmymoney2/widgets/transactionsortoption.ui.h +++ b/kmymoney2/widgets/transactionsortoption.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -27,19 +27,19 @@ void TransactionSortOption::init() { KIconLoader* il = KGlobal::iconLoader(); - m_addButton->setIconSet(QIconSet(il->loadIcon("1rightarrow", KIcon::Small, KIcon::SizeSmall))); - m_removeButton->setIconSet(QIconSet(il->loadIcon("1leftarrow", KIcon::Small, KIcon::SizeSmall))); - m_upButton->setIconSet(QIconSet(il->loadIcon("1uparrow", KIcon::Small, KIcon::SizeSmall))); - m_downButton->setIconSet(QIconSet(il->loadIcon("1downarrow", KIcon::Small, KIcon::SizeSmall))); + m_addButton->setIconSet(TQIconSet(il->loadIcon("1rightarrow", KIcon::Small, KIcon::SizeSmall))); + m_removeButton->setIconSet(TQIconSet(il->loadIcon("1leftarrow", KIcon::Small, KIcon::SizeSmall))); + m_upButton->setIconSet(TQIconSet(il->loadIcon("1uparrow", KIcon::Small, KIcon::SizeSmall))); + m_downButton->setIconSet(TQIconSet(il->loadIcon("1downarrow", KIcon::Small, KIcon::SizeSmall))); // don't allow sorting of the selected entries m_selectedList->setSortColumn(-1); // defaults to "post date, value" sorting - // setSettings(QString("1,4")); - setSettings(QString()); + // setSettings(TQString("1,4")); + setSettings(TQString()); - QListViewItem* p; + TQListViewItem* p; if((p = m_availableList->firstChild()) != 0) { m_availableList->setSelected(p, true); } @@ -58,17 +58,17 @@ void TransactionSortOption::init() * it exists in @p settings without @a EntryOrderSort being present, it * will add @a EntryOrderSort. */ -void TransactionSortOption::setSettings(const QString& settings) +void TransactionSortOption::setSettings(const TQString& settings) { m_availableList->clear(); m_selectedList->clear(); - QStringList list = QStringList::split(',', settings); - QMap<int, bool> selectedMap; + TQStringList list = TQStringList::split(',', settings); + TQMap<int, bool> selectedMap; // fill selected list - QStringList::const_iterator it_s; - QListViewItem* last = 0; + TQStringList::const_iterator it_s; + TQListViewItem* last = 0; int dateSign = 1; for(it_s = list.begin(); it_s != list.end(); ++it_s) { int val = (*it_s).toInt(); @@ -82,22 +82,22 @@ void TransactionSortOption::setSettings(const QString& settings) } // make sure to create EntryOrderSort if missing but required - if(selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() - && selectedMap.find(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { + if(selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryDateSort)) != selectedMap.end() + && selectedMap.tqfind(static_cast<int>(KMyMoneyRegister::EntryOrderSort)) == selectedMap.end()) { int val = dateSign * static_cast<int>(KMyMoneyRegister::EntryOrderSort); selectedMap[static_cast<int>(KMyMoneyRegister::EntryOrderSort)] = true; last = addEntry(m_selectedList, last, val); } // fill available list - QMap<int, bool>::const_iterator it_m; + TQMap<int, bool>::const_iterator it_m; for(int i = static_cast<int>(KMyMoneyRegister::PostDateSort); i < static_cast<int>(KMyMoneyRegister::MaxSortFields); ++i) { // Never add EntryDateSort if(i == static_cast<int>(KMyMoneyRegister::EntryDateSort)) continue; // Only add those, that are not present in the list of selected items - if(selectedMap.find(i) == selectedMap.end()) { + if(selectedMap.tqfind(i) == selectedMap.end()) { int val = i; if(i == static_cast<int>(KMyMoneyRegister::ValueSort)) val = -val; @@ -106,16 +106,16 @@ void TransactionSortOption::setSettings(const QString& settings) } } -QListViewItem* TransactionSortOption::addEntry( KListView * p, QListViewItem* after, int idx ) +TQListViewItem* TransactionSortOption::addEntry( KListView * p, TQListViewItem* after, int idx ) { - QString txt = KMyMoneyRegister::sortOrderToText(static_cast<KMyMoneyRegister::TransactionSortField>(abs(idx))); + TQString txt = KMyMoneyRegister::sortOrderToText(static_cast<KMyMoneyRegister::TransactionSortField>(abs(idx))); if(txt.isEmpty()) txt = "Unknown"; // i18n should be handled in sortOptionToText() return new SortOptionListItem(p, after, txt, idx); } -void TransactionSortOption::toggleDirection(QListViewItem* item) +void TransactionSortOption::toggleDirection(TQListViewItem* item) { SortOptionListItem* p = dynamic_cast<SortOptionListItem*>(item); if(p) { @@ -124,18 +124,18 @@ void TransactionSortOption::toggleDirection(QListViewItem* item) } } -QString TransactionSortOption::settings( void ) const +TQString TransactionSortOption::settings( void ) const { - QString rc; + TQString rc; SortOptionListItem* item = dynamic_cast<SortOptionListItem*>(m_selectedList->firstChild()); while(item) { int option = KMyMoneyRegister::textToSortOrder(item->text(0)); // if we look at the EntryOrderSort option, we have to make // sure, that the EntryDateSort is prepended if(option == KMyMoneyRegister::EntryOrderSort) { - rc += QString::number(static_cast<int>(KMyMoneyRegister::EntryDateSort)*item->direction())+","; + rc += TQString::number(static_cast<int>(KMyMoneyRegister::EntryDateSort)*item->direction())+","; } - rc += QString::number(KMyMoneyRegister::textToSortOrder(item->text(0))*item->direction()); + rc += TQString::number(KMyMoneyRegister::textToSortOrder(item->text(0))*item->direction()); item = dynamic_cast<SortOptionListItem*>(item->itemBelow()); if(item != 0) rc += ","; @@ -143,20 +143,20 @@ QString TransactionSortOption::settings( void ) const return rc; } -void TransactionSortOption::slotAvailableSelected( QListViewItem * item ) +void TransactionSortOption::slotAvailableSelected( TQListViewItem * item ) { m_addButton->setEnabled(item != 0); m_removeButton->setDisabled(true); m_upButton->setDisabled(true); m_downButton->setDisabled(true); - QListViewItem* p = m_selectedList->currentItem(); + TQListViewItem* p = m_selectedList->currentItem(); if(p) { m_selectedList->setSelected(p, false); } } -void TransactionSortOption::slotSelectedSelected( QListViewItem * item ) +void TransactionSortOption::slotSelectedSelected( TQListViewItem * item ) { m_addButton->setDisabled(true); m_removeButton->setEnabled(item != 0); @@ -168,7 +168,7 @@ void TransactionSortOption::slotSelectedSelected( QListViewItem * item ) m_downButton->setEnabled(false); } - QListViewItem* p = m_availableList->currentItem(); + TQListViewItem* p = m_availableList->currentItem(); if(p) { m_availableList->setSelected(p, false); } @@ -176,9 +176,9 @@ void TransactionSortOption::slotSelectedSelected( QListViewItem * item ) void TransactionSortOption::slotAddItem( void ) { - QListViewItem* item; + TQListViewItem* item; if((item = m_availableList->currentItem()) != 0) { - QListViewItem* next = item->itemBelow(); + TQListViewItem* next = item->itemBelow(); if(!next) next = item->itemAbove(); m_availableList->takeItem(item); @@ -194,9 +194,9 @@ void TransactionSortOption::slotAddItem( void ) void TransactionSortOption::slotRemoveItem( void ) { - QListViewItem* item; + TQListViewItem* item; if((item = m_selectedList->currentItem()) != 0) { - QListViewItem* next = item->itemBelow(); + TQListViewItem* next = item->itemBelow(); if(!next) next = item->itemAbove(); m_selectedList->takeItem(item); @@ -212,9 +212,9 @@ void TransactionSortOption::slotRemoveItem( void ) void TransactionSortOption::slotUpItem( void ) { - QListViewItem* item; + TQListViewItem* item; if((item = m_selectedList->currentItem()) != 0) { - QListViewItem* prev = item->itemAbove(); + TQListViewItem* prev = item->itemAbove(); if(prev) { prev->moveItem(item); m_selectedList->setCurrentItem(item); @@ -228,9 +228,9 @@ void TransactionSortOption::slotUpItem( void ) void TransactionSortOption::slotDownItem( void ) { - QListViewItem* item; + TQListViewItem* item; if((item = m_selectedList->currentItem()) != 0) { - QListViewItem* next = item->itemBelow(); + TQListViewItem* next = item->itemBelow(); if(next) { item->moveItem(next); m_selectedList->setCurrentItem(item); diff --git a/kmymoney2/wizards/newaccountwizard/kaccountsummarypagedecl.ui b/kmymoney2/wizards/newaccountwizard/kaccountsummarypagedecl.ui index d68bc4b..400f810 100644 --- a/kmymoney2/wizards/newaccountwizard/kaccountsummarypagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kaccountsummarypagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountSummaryPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KAccountSummaryPageDecl</cstring> </property> @@ -76,5 +76,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kaccounttypepagedecl.ui b/kmymoney2/wizards/newaccountwizard/kaccounttypepagedecl.ui index bb6c5b7..8c1c8c1 100644 --- a/kmymoney2/wizards/newaccountwizard/kaccounttypepagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kaccounttypepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountTypePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KAccountTypePageDecl</cstring> </property> @@ -29,9 +29,9 @@ Select the type for the new account. Use the <b>What's this?</b> fea Enter the date the account was opened and its currency.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> @@ -53,7 +53,7 @@ Enter the date the account was opened and its currency.</string> <string>Select the currency in which this account is denominated.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -61,7 +61,7 @@ Enter the date the account was opened and its currency.</string> <string>Currency</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -73,7 +73,7 @@ Enter the date the account was opened and its currency.</string> <property name="name"> <cstring>m_openingBalance</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>150</width> <height>0</height> @@ -89,7 +89,7 @@ Enter the date the account was opened and its currency.</string> <string>The opening balance is the balance of the account when you start using it with KMyMoney. For new accounts this is usually 0 but for existing accounts this may well differ. Please consult the account statements to figure out this value. The opening balance is to be provided in the currency of the account as selected with the currency button.</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>m_conversionLabel</cstring> </property> @@ -110,7 +110,7 @@ Enter the date the account was opened and its currency.</string> <i>Note</i>: If you do not know the exact amount of the opening balance, enter an estimate. You can change this value later before you reconcile this account for the first time.</string> </property> </widget> - <widget class="QLabel" row="6" column="1"> + <widget class="TQLabel" row="6" column="1"> <property name="name"> <cstring>m_conversionExample</cstring> </property> @@ -118,7 +118,7 @@ Enter the date the account was opened and its currency.</string> <string>xxx</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -137,7 +137,7 @@ Enter the date the account was opened and its currency.</string> <string>For foreign currencies an initial conversion rate needs to be provided. This should be the price of the foreign currency in the base currency on the opening date of the account.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -145,7 +145,7 @@ Enter the date the account was opened and its currency.</string> <string>Account name</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -192,7 +192,7 @@ Use the asset account type to manage assets (e.g. your house, car or art collect Use the liability account type to manage any type of liability except amortization loans. Use it for taxes you owe or money you borrowed from friends. For amortization loans like mortgages you should create a loan account.</p></string> </property> </widget> - <widget class="QCheckBox" row="7" column="0" rowspan="1" colspan="2"> + <widget class="TQCheckBox" row="7" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>m_preferredAccount</cstring> </property> @@ -216,7 +216,7 @@ Use the liability account type to manage any type of liability except amortizati <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>231</width> <height>20</height> @@ -257,7 +257,7 @@ Use the liability account type to manage any type of liability except amortizati <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -276,7 +276,7 @@ Use the liability account type to manage any type of liability except amortizati <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -285,5 +285,9 @@ Use the liability account type to manage any type of liability except amortizati </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kbrokeragepagedecl.ui b/kmymoney2/wizards/newaccountwizard/kbrokeragepagedecl.ui index bc388a8..ab4d614 100644 --- a/kmymoney2/wizards/newaccountwizard/kbrokeragepagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kbrokeragepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KBrokeragePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KBrokeragePageDecl</cstring> </property> @@ -31,7 +31,7 @@ <b>Uncheck</b> it if you don't use this account for active stock brokerage. You should also uncheck it if this account is not maintained by a bank or broker.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_createBrokerageButton</cstring> </property> @@ -39,7 +39,7 @@ <string>Create brokerage account</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_currencyFrame</cstring> </property> @@ -59,15 +59,15 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -88,7 +88,7 @@ </sizepolicy> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>m_accountNumberLabel</cstring> </property> @@ -101,7 +101,7 @@ <cstring>m_accountNumber</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>m_ibanLabel</cstring> </property> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>30</width> <height>20</height> @@ -145,7 +145,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>30</height> @@ -168,5 +168,8 @@ <tabstop>m_accountNumber</tabstop> <tabstop>m_iban</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycurrencyselector.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kgeneralloaninfopagedecl.ui b/kmymoney2/wizards/newaccountwizard/kgeneralloaninfopagedecl.ui index db13917..495e47b 100644 --- a/kmymoney2/wizards/newaccountwizard/kgeneralloaninfopagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kgeneralloaninfopagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KGeneralLoanInfoPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KGeneralLoanInfoPageDecl</cstring> </property> @@ -27,23 +27,23 @@ <string>Please select the required options. Please use the <b>What's this?</b> feature to see more information about the items.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -66,7 +66,7 @@ <cstring>m_loanDirection</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -84,7 +84,7 @@ If the name does not exist within KMyMoney's database, you are asked if you want to create it.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -112,7 +112,7 @@ If the name does not exist within KMyMoney's database, you are asked if you want Note: Payments made to obtain the loan (e.g. Disagio) are not considered as payments in this context.</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -143,7 +143,7 @@ The option to <b>start from the beginning of the current year</b> is </qt></string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -162,7 +162,7 @@ The option to <b>start from the beginning of the current year</b> is <string>You have selected to record only payments from the beginning of this year. Since prior transactions will not be recorded, you need to supply the balance of the loan on January 1st of this year.</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -178,7 +178,7 @@ The option to <b>start from the beginning of the current year</b> is <enum>TabFocus</enum> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel1_4</cstring> </property> @@ -194,7 +194,7 @@ The option to <b>start from the beginning of the current year</b> is <string>Select the frequency with which the interest is compounded. If uncertain, select the same as the payment frequency. Consult your loan contract for details.</string> </property> </widget> - <widget class="QLabel" row="7" column="0"> + <widget class="TQLabel" row="7" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -219,7 +219,7 @@ Enter the due date of the very first payment<p> Enter the due date of the first payment in the current year</string> </property> </widget> - <widget class="QLabel" row="8" column="0"> + <widget class="TQLabel" row="8" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -242,7 +242,7 @@ Enter the due date of the first payment in the current year</string> <cstring>m_interestType</cstring> </property> </widget> - <widget class="QLabel" row="9" column="0"> + <widget class="TQLabel" row="9" column="0"> <property name="name"> <cstring>textLabel3_2</cstring> </property> @@ -250,9 +250,9 @@ Enter the due date of the first payment in the current year</string> <string>Time between interest changes</string> </property> </widget> - <widget class="QLayoutWidget" row="9" column="1"> + <widget class="TQLayoutWidget" row="9" column="1"> <property name="name"> - <cstring>layout48</cstring> + <cstring>tqlayout48</cstring> </property> <hbox> <property name="name"> @@ -296,7 +296,7 @@ Enter the due date of the first payment in the current year</string> </widget> </hbox> </widget> - <widget class="QLabel" row="10" column="0"> + <widget class="TQLabel" row="10" column="0"> <property name="name"> <cstring>textLabel4_2</cstring> </property> @@ -324,7 +324,7 @@ Enter the due date of the first payment in the current year</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>29</width> <height>20</height> @@ -343,7 +343,7 @@ Enter the due date of the first payment in the current year</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -354,5 +354,10 @@ Enter the due date of the first payment in the current year</string> </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/khierarchypagedecl.ui b/kmymoney2/wizards/newaccountwizard/khierarchypagedecl.ui index 00602e4..ad74cb1 100644 --- a/kmymoney2/wizards/newaccountwizard/khierarchypagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/khierarchypagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KHierarchyPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KHierarchyPageDecl</cstring> </property> @@ -32,10 +32,10 @@ <enum>NoFocus</enum> </property> <property name="text"> - <string>This page allows you to select the parent account.</string> + <string>This page allows you to select the tqparent account.</string> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_subAccountLabel</cstring> </property> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -78,5 +78,5 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kinstitutionpagedecl.ui b/kmymoney2/wizards/newaccountwizard/kinstitutionpagedecl.ui index ee38d48..fc2591f 100644 --- a/kmymoney2/wizards/newaccountwizard/kinstitutionpagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kinstitutionpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KInstitutionPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KInstitutionPageDecl</cstring> </property> @@ -31,23 +31,23 @@ Enter the account number used by the institution to identify the account.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -71,7 +71,7 @@ Enter the account number used by the institution to identify the account.</strin <string>New Institution</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -89,7 +89,7 @@ Enter the account number used by the institution to identify the account.</strin KMyMoney currently uses this number only for some online banking functions.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -124,7 +124,7 @@ KMyMoney keeps this field only for documentation purposes and does not use it ot <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>132</width> <height>20</height> @@ -143,7 +143,7 @@ KMyMoney keeps this field only for documentation purposes and does not use it ot <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>40</height> @@ -152,5 +152,5 @@ KMyMoney keeps this field only for documentation purposes and does not use it ot </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kloandetailspagedecl.ui b/kmymoney2/wizards/newaccountwizard/kloandetailspagedecl.ui index eebb158..4229f78 100644 --- a/kmymoney2/wizards/newaccountwizard/kloandetailspagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kloandetailspagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLoanDetailsPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KLoanDetailsPageDecl</cstring> </property> @@ -37,30 +37,30 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>70</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -83,7 +83,7 @@ <cstring>m_paymentDue</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -102,7 +102,7 @@ <string>Enter the amount of the loan in this field. If you want to calculate this field out of the other parameters, please leave it empty. If the field is marked as required (colored background) you have informed KMyMoney about the fact that there were already some payments towards the loan. In this case, please enter the ending balance of your last statement.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel9</cstring> </property> @@ -118,7 +118,7 @@ <string>Please enter the interest rate in percent or leave the field empty to calculate it.</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel10</cstring> </property> @@ -126,9 +126,9 @@ <string>Term</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> + <widget class="TQLayoutWidget" row="3" column="1" rowspan="1" colspan="3"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -152,7 +152,7 @@ </widget> </hbox> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel11</cstring> </property> @@ -168,7 +168,7 @@ <string>Please enter the amount you pay for principal and interest or leave the field empty to calculate it.</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel12</cstring> </property> @@ -184,9 +184,9 @@ <string>Please enter the amount of a final amortization payment or leave the field empty to calculate it.</string> </property> </widget> - <widget class="QLayoutWidget" row="6" column="1"> + <widget class="TQLayoutWidget" row="6" column="1"> <property name="name"> - <cstring>layout53</cstring> + <cstring>tqlayout53</cstring> </property> <hbox> <property name="name"> @@ -202,7 +202,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>71</width> <height>20</height> @@ -235,7 +235,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -254,7 +254,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>27</width> <height>21</height> @@ -273,7 +273,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -284,5 +284,10 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kloanpaymentpagedecl.ui b/kmymoney2/wizards/newaccountwizard/kloanpaymentpagedecl.ui index 51ac286..360d5b0 100644 --- a/kmymoney2/wizards/newaccountwizard/kloanpaymentpagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kloanpaymentpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLoanPaymentPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KLoanPaymentPageDecl</cstring> </property> @@ -27,9 +27,9 @@ <string>Now enter the information required for the periodic loan payments. If your regular payments contains any additional fees, click on the <b>Additional fees</b> button to enter them.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -45,22 +45,22 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>63</width> <height>21</height> </size> </property> </spacer> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -68,7 +68,7 @@ <string>Principal + Interest</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>m_basePayment</cstring> </property> @@ -80,11 +80,11 @@ <property name="text"> <string>xxx</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -100,7 +100,7 @@ <string>Additional fees</string> </property> </widget> - <widget class="QLabel" row="1" column="2"> + <widget class="TQLabel" row="1" column="2"> <property name="name"> <cstring>m_additionalFees</cstring> </property> @@ -112,11 +112,11 @@ <property name="text"> <string>xxx</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> - <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>textLabel5</cstring> </property> @@ -124,7 +124,7 @@ <string>= periodical payments</string> </property> </widget> - <widget class="QLabel" row="2" column="2"> + <widget class="TQLabel" row="2" column="2"> <property name="name"> <cstring>m_totalPayment</cstring> </property> @@ -136,7 +136,7 @@ <property name="text"> <string>xxx</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> </property> </widget> @@ -152,7 +152,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>62</width> <height>21</height> @@ -171,7 +171,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -180,5 +180,10 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kloanpayoutpagedecl.ui b/kmymoney2/wizards/newaccountwizard/kloanpayoutpagedecl.ui index 1270efe..b7f0c06 100644 --- a/kmymoney2/wizards/newaccountwizard/kloanpayoutpagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kloanpayoutpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLoanPayoutPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KLoanPayoutPageDecl</cstring> </property> @@ -28,7 +28,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a checking account instead.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_noPayoutTransaction</cstring> </property> @@ -36,7 +36,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <string>Don't create payout transaction</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_payoutDetailFrame</cstring> </property> @@ -53,7 +53,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="margin"> <number>0</number> </property> - <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>m_refinanceLoan</cstring> </property> @@ -64,7 +64,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <string>Check this if you are refinancing a loan that already exists in KMyMoney</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -93,7 +93,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <string>Create</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -117,7 +117,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a </sizepolicy> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -135,7 +135,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> @@ -159,7 +159,7 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -194,5 +194,10 @@ If this loan is a 'consumer loan' (money to use however you want), you can use a <slot>setDisabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/kloanschedulepagedecl.ui b/kmymoney2/wizards/newaccountwizard/kloanschedulepagedecl.ui index bead410..b4f55a7 100644 --- a/kmymoney2/wizards/newaccountwizard/kloanschedulepagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kloanschedulepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KLoanSchedulePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KLoanSchedulePageDecl</cstring> </property> @@ -28,23 +28,23 @@ If you selected to record all payments this date has already been supplied. If you selected to record only this years payments, then the <b>First payment due date</b> is the date of the first payment made in this year.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout54</cstring> + <cstring>tqlayout54</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout53</cstring> + <cstring>tqlayout53</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel7</cstring> </property> @@ -60,7 +60,7 @@ If you selected to record all payments this date has already been supplied. If y <string>The category the interest part of the payment will be assigned to. If you borrow money you usually have to pay interest, so this should be an expense category. If you lend the money, you receive the interest. In this case, select an income category here.</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel8</cstring> </property> @@ -76,7 +76,7 @@ If you selected to record all payments this date has already been supplied. If y <string>Select the account from which you make your periodical payments or where you receive regular payments in case you lend the money. In most cases, this is a checking account.</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -84,9 +84,9 @@ If you selected to record all payments this date has already been supplied. If y <string>First payment due on</string> </property> </widget> - <widget class="QLayoutWidget" row="2" column="1"> + <widget class="TQLayoutWidget" row="2" column="1"> <property name="name"> - <cstring>layout52</cstring> + <cstring>tqlayout52</cstring> </property> <hbox> <property name="name"> @@ -102,7 +102,7 @@ If you selected to record all payments this date has already been supplied. If y <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -128,7 +128,7 @@ If you selected to record all payments this date has already been supplied. If y <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -147,7 +147,7 @@ If you selected to record all payments this date has already been supplied. If y <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -156,5 +156,10 @@ If you selected to record all payments this date has already been supplied. If y </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp index 1bfae86..3a42120 100644 --- a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp +++ b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp @@ -20,11 +20,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> -#include <qfocusdata.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqfocusdata.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -76,8 +76,8 @@ namespace NewAccountWizard { StepFinish }; }; -NewAccountWizard::Wizard::Wizard(QWidget *parent, const char *name, bool modal, WFlags flags) - : KMyMoneyWizard(parent, name, modal, flags) +NewAccountWizard::Wizard::Wizard(TQWidget *tqparent, const char *name, bool modal, WFlags flags) + : KMyMoneyWizard(tqparent, name, modal, flags) { setTitle(i18n("KMyMoney New Account Setup")); addStep(i18n("Institution")); @@ -195,20 +195,20 @@ MyMoneyTransaction NewAccountWizard::Wizard::payoutTransaction(void) s.setValue(-s.value()); s.setAccountId(m_loanPayoutPage->payoutAccountId()); MyMoneyMoney shares; - KCurrencyCalculator::setupSplitPrice(shares, t, s, QMap<QString, MyMoneyMoney>(), this); + KCurrencyCalculator::setupSplitPrice(shares, t, s, TQMap<TQString, MyMoneyMoney>(), this); s.setShares(shares); t.addSplit(s); } return t; } -const MyMoneyAccount& NewAccountWizard::Wizard::parentAccount(void) +const MyMoneyAccount& NewAccountWizard::Wizard::tqparentAccount(void) { return m_accountTypePage->allowsParentAccount() - ? m_hierarchyPage->parentAccount() + ? m_hierarchyPage->tqparentAccount() : ( m_accountTypePage->accountType() == MyMoneyAccount::Loan - ? m_generalLoanInfoPage->parentAccount() - : m_accountTypePage->parentAccount() ); + ? m_generalLoanInfoPage->tqparentAccount() + : m_accountTypePage->tqparentAccount() ); } MyMoneyAccount NewAccountWizard::Wizard::brokerageAccount(void) const @@ -261,7 +261,7 @@ const MyMoneySchedule& NewAccountWizard::Wizard::schedule(void) m_schedule.setTransaction(t); } else if(m_account.isLoan()) { - m_schedule.setName(i18n("Loan payment for %1").arg(m_accountTypePage->m_accountName->text())); + m_schedule.setName(i18n("Loan payment for %1").tqarg(m_accountTypePage->m_accountName->text())); m_schedule.setType(MyMoneySchedule::TYPE_LOANPAYMENT); if(moneyBorrowed()) m_schedule.setPaymentType(MyMoneySchedule::STYPE_DIRECTDEBIT); @@ -304,9 +304,9 @@ const MyMoneySchedule& NewAccountWizard::Wizard::schedule(void) t.addSplit(s); // additional fee splits - QValueList<MyMoneySplit> additionalSplits; + TQValueList<MyMoneySplit> additionalSplits; m_loanPaymentPage->additionalFeesSplits(additionalSplits); - QValueList<MyMoneySplit>::const_iterator it; + TQValueList<MyMoneySplit>::const_iterator it; MyMoneyMoney factor(moneyBorrowed() ? 1 : -1, 1); for(it = additionalSplits.begin(); it != additionalSplits.end(); ++it) { @@ -364,7 +364,7 @@ bool NewAccountWizard::Wizard::moneyBorrowed(void) const class NewAccountWizard::InstitutionPage::Private { public: - QValueList<MyMoneyInstitution> m_list; + TQValueList<MyMoneyInstitution> m_list; }; InstitutionPage::InstitutionPage(Wizard* wizard, const char* name) : @@ -372,9 +372,9 @@ InstitutionPage::InstitutionPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepInstitution, this, wizard, name), d(new Private()) { - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); - connect(m_newInstitutionButton, SIGNAL(clicked()), this, SLOT(slotNewInstitution())); - connect(m_institutionComboBox, SIGNAL(activated(int)), this, SLOT(slotSelectInstitution(int))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); + connect(m_newInstitutionButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewInstitution())); + connect(m_institutionComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelectInstitution(int))); slotLoadWidgets(); m_institutionComboBox->setCurrentItem(0); @@ -394,7 +394,7 @@ void InstitutionPage::slotLoadWidgets(void) MyMoneyFile::instance()->institutionList(d->m_list); qHeapSort(d->m_list); - QValueList<MyMoneyInstitution>::const_iterator it_l; + TQValueList<MyMoneyInstitution>::const_iterator it_l; m_institutionComboBox->insertItem(""); for(it_l = d->m_list.begin(); it_l != d->m_list.end(); ++it_l) { m_institutionComboBox->insertItem((*it_l).name()); @@ -408,7 +408,7 @@ void InstitutionPage::slotNewInstitution(void) emit m_wizard->createInstitution(institution); if(!institution.id().isEmpty()) { - QValueList<MyMoneyInstitution>::const_iterator it_l; + TQValueList<MyMoneyInstitution>::const_iterator it_l; int i = 0; for(it_l = d->m_list.begin(); it_l != d->m_list.end(); ++it_l) { if((*it_l).id() == institution.id()) { @@ -471,12 +471,12 @@ AccountTypePage::AccountTypePage(Wizard* wizard, const char* name) : m_conversionRate->setValue(MyMoneyMoney(1,1)); slotUpdateCurrency(); - connect(m_typeSelection, SIGNAL(itemSelected(int)), this, SLOT(slotUpdateType(int))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); - connect(m_currencyComboBox, SIGNAL(activated(int)), this, SLOT(slotUpdateCurrency())); - connect(m_conversionRate, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateConversionRate(const QString&))); - connect(m_conversionRate, SIGNAL(valueChanged(const QString&)), this, SLOT(slotPriceWarning())); - connect(m_onlineQuote, SIGNAL(clicked()), this, SLOT(slotGetOnlineQuote())); + connect(m_typeSelection, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotUpdateType(int))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); + connect(m_currencyComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateCurrency())); + connect(m_conversionRate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateConversionRate(const TQString&))); + connect(m_conversionRate, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotPriceWarning())); + connect(m_onlineQuote, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetOnlineQuote())); } void AccountTypePage::slotUpdateType(int i) @@ -531,9 +531,9 @@ void AccountTypePage::slotUpdateCurrency(void) void AccountTypePage::slotGetOnlineQuote(void) { - QString id = MyMoneyFile::instance()->baseCurrency().id()+" "+m_currencyComboBox->security().id(); + TQString id = MyMoneyFile::instance()->baseCurrency().id()+" "+m_currencyComboBox->security().id(); KEquityPriceUpdateDlg dlg(this, id); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { MyMoneyPrice price = dlg.price(id); if(price.isValid()) { m_conversionRate->setValue(price.rate(m_currencyComboBox->security().id())); @@ -557,7 +557,7 @@ void AccountTypePage::priceWarning(bool always) m_showPriceWarning = false; } -void AccountTypePage::slotUpdateConversionRate(const QString& txt) +void AccountTypePage::slotUpdateConversionRate(const TQString& txt) { m_conversionExample->setText(i18n("1 %1 equals %2"). arg(MyMoneyFile::instance()->baseCurrency().tradingSymbol()). @@ -566,7 +566,7 @@ void AccountTypePage::slotUpdateConversionRate(const QString& txt) void AccountTypePage::slotLoadWidgets(void) { - m_currencyComboBox->update(QString("x")); + m_currencyComboBox->update(TQString("x")); } bool AccountTypePage::isComplete(void) const @@ -574,13 +574,13 @@ bool AccountTypePage::isComplete(void) const // check that the conversion rate is positive if enabled bool rc = !m_conversionRate->isVisible() || (!m_conversionRate->value().isZero() && !m_conversionRate->value().isNegative()); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("Conversion rate is not positive")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Conversion rate is not positive")); } else { rc = KMyMoneyWizardPage::isComplete(); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("No account name supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No account name supplied")); } } hideShowPages(accountType()); @@ -604,7 +604,7 @@ void AccountTypePage::setAccount(const MyMoneyAccount& acc) m_accountName->setText(acc.name()); } -const MyMoneyAccount& AccountTypePage::parentAccount(void) +const MyMoneyAccount& AccountTypePage::tqparentAccount(void) { switch(accountType()) { case MyMoneyAccount::CreditCard: @@ -629,12 +629,12 @@ BrokeragePage::BrokeragePage(Wizard* wizard, const char* name) : KBrokeragePageDecl(wizard), WizardPage<Wizard>(StepBroker, this, wizard, name) { - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } void BrokeragePage::slotLoadWidgets(void) { - m_brokerageCurrency->update(QString("x")); + m_brokerageCurrency->update(TQString("x")); } void BrokeragePage::enterPage(void) @@ -666,18 +666,18 @@ CreditCardSchedulePage::CreditCardSchedulePage(Wizard* wizard, const char* name) m_mandatoryGroup->add(m_payee); m_mandatoryGroup->add(m_amount->lineedit()); m_mandatoryGroup->add(m_paymentAccount); - connect(m_paymentAccount, SIGNAL(itemSelected(const QString&)), object(), SIGNAL(completeStateChanged())); - connect(m_payee, SIGNAL(itemSelected(const QString&)), object(), SIGNAL(completeStateChanged())); - connect(m_date, SIGNAL(dateChanged(const QDate&)), object(), SIGNAL(completeStateChanged())); + connect(m_paymentAccount, TQT_SIGNAL(itemSelected(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_payee, TQT_SIGNAL(itemSelected(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_date, TQT_SIGNAL(dateChanged(const TQDate&)), object(), TQT_SIGNAL(completeStateChanged())); - connect(m_payee, SIGNAL(createItem(const QString&, QString&)), wizard, SIGNAL(createPayee(const QString&, QString&))); + connect(m_payee, TQT_SIGNAL(createItem(const TQString&, TQString&)), wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&))); m_reminderCheckBox->setChecked(true); - connect(m_reminderCheckBox, SIGNAL(toggled(bool)), object(), SIGNAL(completeStateChanged())); + connect(m_reminderCheckBox, TQT_SIGNAL(toggled(bool)), object(), TQT_SIGNAL(completeStateChanged())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); - m_method->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHEQUE); + m_method->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHETQUE); #if 0 m_method->insertItem(i18n("Direct debit"), MyMoneySchedule::STYPE_DIRECTDEBIT); m_method->insertItem(i18n("Bank transfer"), MyMoneySchedule::STYPE_BANKTRANSFER); @@ -694,13 +694,13 @@ CreditCardSchedulePage::CreditCardSchedulePage(Wizard* wizard, const char* name) void CreditCardSchedulePage::enterPage(void) { if(m_name->text().isEmpty()) - m_name->setText(i18n("CreditCard %1 monthly payment").arg(m_wizard->m_accountTypePage->m_accountName->text())); + m_name->setText(i18n("CreditCard %1 monthly payment").tqarg(m_wizard->m_accountTypePage->m_accountName->text())); } bool CreditCardSchedulePage::isComplete(void) const { bool rc = true; - QString msg = i18n("Finish entry and create account"); + TQString msg = i18n("Finish entry and create account"); if(m_reminderCheckBox->isChecked()) { msg = i18n("Finish entry and create account and schedule"); if(m_date->date() < m_wizard->m_accountTypePage->m_openingDate->date()) { @@ -724,7 +724,7 @@ bool CreditCardSchedulePage::isComplete(void) const msg = i18n("No name assigned for schedule"); } } - QToolTip::add(m_wizard->m_finishButton, msg); + TQToolTip::add(m_wizard->m_finishButton, msg); return rc; } @@ -760,15 +760,15 @@ GeneralLoanInfoPage::GeneralLoanInfoPage(Wizard* wizard, const char* name) : slotLoadWidgets(); - connect(m_payee, SIGNAL(createItem(const QString&, QString&)), wizard, SIGNAL(createPayee(const QString&, QString&))); - connect(m_anyPayments, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); - connect(m_recordings, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); + connect(m_payee, TQT_SIGNAL(createItem(const TQString&, TQString&)), wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&))); + connect(m_anyPayments, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_recordings, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); - connect(m_interestType, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); - connect(m_interestChangeDateEdit, SIGNAL(dateChanged(const QDate&)), object(), SIGNAL(completeStateChanged())); - connect(m_openingBalance, SIGNAL(textChanged(const QString&)), object(), SIGNAL(completeStateChanged())); + connect(m_interestType, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_interestChangeDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_openingBalance, TQT_SIGNAL(textChanged(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } KMyMoneyWizardPage* GeneralLoanInfoPage::nextPage(void) const @@ -790,7 +790,7 @@ void GeneralLoanInfoPage::enterPage(void) { if(m_firstTime) { // setup default dates to last of this month and one year on top - QDate firstDay(QDate::currentDate().year(), QDate::currentDate().month(), 1); + TQDate firstDay(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), 1); m_firstPaymentDate->setDate(firstDay.addMonths(1).addDays(-1)); m_interestChangeDateEdit->setDate(m_firstPaymentDate->date().addYears(1));; m_firstTime = false; @@ -802,7 +802,7 @@ bool GeneralLoanInfoPage::isComplete(void) const m_wizard->setStepHidden(StepPayout, !m_wizard->openingBalance().isZero()); bool rc = KMyMoneyWizardPage::isComplete(); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("No payee supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No payee supplied")); } // fixup availability of items on this page @@ -816,19 +816,19 @@ bool GeneralLoanInfoPage::isComplete(void) const if(m_openingBalance->isEnabled() && m_openingBalance->lineedit()->text().length() == 0) { rc = false; - QToolTip::add(m_wizard->m_nextButton, i18n("No opening balance supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No opening balance supplied")); } if(rc && (m_interestType->currentItem() != 0) && (m_interestChangeDateEdit->date() <= m_firstPaymentDate->date())) { rc = false; - QToolTip::add(m_wizard->m_nextButton, i18n("An interest change can only happen after the first payment")); + TQToolTip::add(m_wizard->m_nextButton, i18n("An interest change can only happen after the first payment")); } return rc; } -const MyMoneyAccount& GeneralLoanInfoPage::parentAccount(void) +const MyMoneyAccount& GeneralLoanInfoPage::tqparentAccount(void) { return ( m_loanDirection->currentItem() == 0 ) ? MyMoneyFile::instance()->liability() @@ -850,16 +850,16 @@ LoanDetailsPage::LoanDetailsPage(Wizard* wizard, const char* name) : // allow any precision for the interest rate m_interestRate->setPrecision(-1); - connect(m_paymentDue, SIGNAL(activated(int)), this, SLOT(slotValuesChanged())); + connect(m_paymentDue, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValuesChanged())); - connect(m_termAmount, SIGNAL(valueChanged(int)), this, SLOT(slotValuesChanged())); - connect(m_termUnit, SIGNAL(highlighted(int)), this, SLOT(slotValuesChanged())); - connect(m_loanAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_interestRate, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_paymentAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_balloonAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); + connect(m_termAmount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValuesChanged())); + connect(m_termUnit, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotValuesChanged())); + connect(m_loanAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_interestRate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_paymentAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_balloonAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); - connect(m_calculateButton, SIGNAL(clicked()), this, SLOT(slotCalculate())); + connect(m_calculateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCalculate())); } void LoanDetailsPage::enterPage(void) @@ -903,7 +903,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyFinancialCalculator calc; long double val; int PF, CF; - QString result; + TQString result; bool moneyBorrowed = m_wizard->moneyBorrowed(); bool moneyLend = !moneyBorrowed; @@ -959,14 +959,14 @@ void LoanDetailsPage::slotCalculate(void) val = calc.presentValue(); m_loanAmount->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney("", m_wizard->precision())); result = i18n("KMyMoney has calculated the amount of the loan as %1.") - .arg(m_loanAmount->lineedit()->text()); + .tqarg(m_loanAmount->lineedit()->text()); } else if(m_interestRate->lineedit()->text().isEmpty()) { // calculate the interest rate out of the other information val = calc.interestRate(); m_interestRate->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney("", 3)); result = i18n("KMyMoney has calculated the interest rate to %1%.") - .arg(m_interestRate->lineedit()->text()); + .tqarg(m_interestRate->lineedit()->text()); } else if(m_paymentAmount->lineedit()->text().isEmpty()) { // calculate the periodical amount of the payment out of the other information @@ -979,7 +979,7 @@ void LoanDetailsPage::slotCalculate(void) calc.setPmt(val); result = i18n("KMyMoney has calculated a periodic payment of %1 to cover principal and interest.") - .arg(m_paymentAmount->lineedit()->text()); + .tqarg(m_paymentAmount->lineedit()->text()); val = calc.futureValue(); if((moneyBorrowed && val < 0 && fabsl(val) >= fabsl(calc.payment())) @@ -989,9 +989,9 @@ void LoanDetailsPage::slotCalculate(void) val = calc.futureValue(); MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); - result += QString(" "); + result += TQString(" "); result += i18n("The number of payments has been decremented and the balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } else if((moneyBorrowed && val < 0 && fabsl(val) < fabsl(calc.payment())) || (moneyLend && val > 0 && fabs(val) < fabs(calc.payment()))) { m_balloonAmount->loadText(MyMoneyMoney(0,1).formatMoney("", m_wizard->precision())); @@ -999,7 +999,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); result += i18n("The balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } } else if(m_termAmount->value() == 0) { @@ -1011,7 +1011,7 @@ void LoanDetailsPage::slotCalculate(void) // if the number of payments has a fractional part, then we // round it to the smallest integer and calculate the balloon payment result = i18n("KMyMoney has calculated the term of your loan as %1. ") - .arg(updateTermWidgets(floorl(val))); + .tqarg(updateTermWidgets(floorl(val))); if(val != floorl(val)) { calc.setNpp(floorl(val)); @@ -1019,7 +1019,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); result += i18n("The balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } } else { @@ -1050,7 +1050,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); result = i18n("KMyMoney has calculated a balloon payment of %1 for this loan.") - .arg(refVal.abs().formatMoney("", m_wizard->precision())); + .tqarg(refVal.abs().formatMoney("", m_wizard->precision())); if(!m_balloonAmount->lineedit()->text().isEmpty()) { if((m_balloonAmount->value().abs() - refVal.abs()).abs().toDouble() > 1) { @@ -1111,11 +1111,11 @@ int LoanDetailsPage::term(void) const return factor; } -QString LoanDetailsPage::updateTermWidgets(const long double val) +TQString LoanDetailsPage::updateTermWidgets(const long double val) { long long vl = static_cast<long long>(floorl(val)); - QString valString; + TQString valString; MyMoneySchedule::occurenceE unit = m_termUnit->currentItem(); if((unit == MyMoneySchedule::OCCUR_MONTHLY) @@ -1147,7 +1147,7 @@ bool LoanDetailsPage::isComplete(void) const // bool rc = KMyMoneyWizardPage::isComplete(); int fieldCnt = 0; - QWidget* calculatedField = 0; + TQWidget* calculatedField = 0; if(m_loanAmount->lineedit()->text().length() > 0) { fieldCnt++; @@ -1187,11 +1187,11 @@ bool LoanDetailsPage::isComplete(void) const m_calculateButton->setAutoDefault(false); m_calculateButton->setDefault(false); if(m_needCalculate && fieldCnt == 4) { - QToolTip::add(m_wizard->m_nextButton, i18n("Press Calculate to verify the values")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Press Calculate to verify the values")); m_calculateButton->setAutoDefault(true); m_calculateButton->setDefault(true); } else if(fieldCnt != 5) { - QToolTip::add(m_wizard->m_nextButton, i18n("Not all details supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Not all details supplied")); m_calculateButton->setAutoDefault(true); m_calculateButton->setDefault(true); } @@ -1221,7 +1221,7 @@ LoanPaymentPage::LoanPaymentPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepFees, this, wizard, name), d(new Private) { - d->phonyAccount = MyMoneyAccount(QString("Phony-ID"), MyMoneyAccount()); + d->phonyAccount = MyMoneyAccount(TQString("Phony-ID"), MyMoneyAccount()); d->phonySplit.setAccountId(d->phonyAccount.id()); d->phonySplit.setValue(0); @@ -1229,7 +1229,7 @@ LoanPaymentPage::LoanPaymentPage(Wizard* wizard, const char* name) : d->additionalFeesTransaction.addSplit(d->phonySplit); - connect(m_additionalFeesButton, SIGNAL(clicked()), this, SLOT(slotAdditionalFees())); + connect(m_additionalFeesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdditionalFees())); } LoanPaymentPage::~LoanPaymentPage() @@ -1247,11 +1247,11 @@ MyMoneyMoney LoanPaymentPage::additionalFees(void) const return d->additionalFees; } -void LoanPaymentPage::additionalFeesSplits(QValueList<MyMoneySplit>& list) +void LoanPaymentPage::additionalFeesSplits(TQValueList<MyMoneySplit>& list) { list.clear(); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = d->additionalFeesTransaction.splits().begin(); it != d->additionalFeesTransaction.splits().end(); ++it) { if((*it).accountId() != d->phonyAccount.id()) { list << (*it); @@ -1278,15 +1278,15 @@ void LoanPaymentPage::enterPage(void) void LoanPaymentPage::slotAdditionalFees(void) { - QMap<QString, MyMoneyMoney> priceInfo; + TQMap<TQString, MyMoneyMoney> priceInfo; KSplitTransactionDlg* dlg = new KSplitTransactionDlg(d->additionalFeesTransaction, d->phonySplit, d->phonyAccount, false, !m_wizard->moneyBorrowed(), MyMoneyMoney(0), priceInfo); - // connect(dlg, SIGNAL(newCategory(MyMoneyAccount&)), this, SIGNAL(newCategory(MyMoneyAccount&))); + // connect(dlg, TQT_SIGNAL(newCategory(MyMoneyAccount&)), this, TQT_SIGNAL(newCategory(MyMoneyAccount&))); - if(dlg->exec() == QDialog::Accepted) { + if(dlg->exec() == TQDialog::Accepted) { d->additionalFeesTransaction = dlg->transaction(); // sum up the additional fees - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; d->additionalFees = MyMoneyMoney(0); for(it = d->additionalFeesTransaction.splits().begin(); it != d->additionalFeesTransaction.splits().end(); ++it) { @@ -1312,27 +1312,27 @@ LoanSchedulePage::LoanSchedulePage(Wizard* wizard, const char* name) : { m_mandatoryGroup->add(m_interestCategory->lineEdit()); m_mandatoryGroup->add(m_paymentAccount->lineEdit()); - connect(m_interestCategory, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateCategory(const QString&, QString&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(m_interestCategory, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateCategory(const TQString&, TQString&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } -void LoanSchedulePage::slotCreateCategory(const QString& name, QString& id) +void LoanSchedulePage::slotCreateCategory(const TQString& name, TQString& id) { - MyMoneyAccount acc, parent; + MyMoneyAccount acc, tqparent; acc.setName(name); if(m_wizard->moneyBorrowed()) - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); else - parent = MyMoneyFile::instance()->income(); + tqparent = MyMoneyFile::instance()->income(); - emit m_wizard->createCategory(acc, parent); + emit m_wizard->createCategory(acc, tqparent); // return id id = acc.id(); } -QDate LoanSchedulePage::firstPaymentDueDate(void) const +TQDate LoanSchedulePage::firstPaymentDueDate(void) const { if(m_firstPaymentDueDate->isEnabled()) return m_firstPaymentDueDate->date(); @@ -1379,18 +1379,18 @@ LoanPayoutPage::LoanPayoutPage(Wizard* wizard, const char* name) : KIconLoader* il = KGlobal::iconLoader(); KGuiItem createAssetButtenItem( i18n( "&Create..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new asset account"), i18n("If the asset account does not yet exist, press this button to create it.")); m_createAssetButton->setGuiItem(createAssetButtenItem); - QToolTip::add(m_createAssetButton, createAssetButtenItem.toolTip()); - QWhatsThis::add(m_createAssetButton, createAssetButtenItem.whatsThis()); - connect(m_createAssetButton, SIGNAL(clicked()), this, SLOT(slotCreateAssetAccount())); + TQToolTip::add(m_createAssetButton, createAssetButtenItem.toolTip()); + TQWhatsThis::add(m_createAssetButton, createAssetButtenItem.whatsThis()); + connect(m_createAssetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateAssetAccount())); - connect(m_noPayoutTransaction, SIGNAL(toggled(bool)), this, SLOT(slotButtonsToggled())); - connect(m_refinanceLoan, SIGNAL(toggled(bool)), this, SLOT(slotButtonsToggled())); + connect(m_noPayoutTransaction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsToggled())); + connect(m_refinanceLoan, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsToggled())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); slotLoadWidgets(); } @@ -1400,7 +1400,7 @@ void LoanPayoutPage::slotButtonsToggled(void) // not defined. Using a single shot timer postpones the call of m_mandatoryGroup::changed() // until the next round of the main loop so we can be sure to see all relevant changes // that happened in the meantime (eg. widgets are enabled and disabled) - QTimer::singleShot(0, m_mandatoryGroup, SLOT(changed())); + TQTimer::singleShot(0, m_mandatoryGroup, TQT_SLOT(changed())); } void LoanPayoutPage::slotCreateAssetAccount(void) @@ -1448,7 +1448,7 @@ bool LoanPayoutPage::isComplete(void) const return KMyMoneyWizardPage::isComplete() | m_noPayoutTransaction->isChecked(); } -const QString& LoanPayoutPage::payoutAccountId(void) const +const TQString& LoanPayoutPage::payoutAccountId(void) const { if(m_refinanceLoan->isChecked()) { return m_loanAccount->selectedItem(); @@ -1472,9 +1472,9 @@ HierarchyPage::HierarchyPage(Wizard* wizard, const char* name) : m_qlistviewParentAccounts->addColumn("Accounts"); m_qlistviewParentAccounts->setMultiSelection(false); m_qlistviewParentAccounts->header()->setResizeEnabled(true); - m_qlistviewParentAccounts->setColumnWidthMode(0, QListView::Maximum); + m_qlistviewParentAccounts->setColumnWidthMode(0, TQListView::Maximum); // never show the horizontal scroll bar - // m_qlistviewParentAccounts->setHScrollBarMode(QScrollView::AlwaysOff); + // m_qlistviewParentAccounts->setHScrollBarMode(TQScrollView::AlwaysOff); } void HierarchyPage::enterPage(void) @@ -1483,7 +1483,7 @@ void HierarchyPage::enterPage(void) // - if the type has changed // - - clear the list // - - populate the account list (also occurs first time we come here) - MyMoneyAccount topAccount = m_wizard->m_accountTypePage->parentAccount(); + MyMoneyAccount topAccount = m_wizard->m_accountTypePage->tqparentAccount(); // If the list was not populated with this top account we populate it now if ( &m_topAccount == NULL || m_topAccount.id() != topAccount.id()) @@ -1504,17 +1504,17 @@ void HierarchyPage::enterPage(void) } KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree - ( KMyMoneyAccountTreeBase* parent + ( KMyMoneyAccountTreeBase* tqparent , const MyMoneyAccount& account , bool open ) const { // Recursively add child accounts to the list if ( account.accountType() == MyMoneyAccount::Investment) return NULL; - KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( parent, account ); + KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( tqparent, account ); if ( open ) childItem->setOpen(true); - for ( QStringList::ConstIterator it = account.accountList().begin(); + for ( TQStringList::ConstIterator it = account.accountList().begin(); it != account.accountList().end(); ++it ) { @@ -1529,17 +1529,17 @@ KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree } KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree - ( KMyMoneyAccountTreeItem* parent + ( KMyMoneyAccountTreeItem* tqparent , const MyMoneyAccount& account , bool open ) const { // Recursively add child accounts to the list if ( account.accountType() == MyMoneyAccount::Investment) return NULL; - KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( parent, account ); + KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( tqparent, account ); if ( open ) childItem->setOpen(true); - for ( QStringList::ConstIterator it = account.accountList().begin(); + for ( TQStringList::ConstIterator it = account.accountList().begin(); it != account.accountList().end(); ++it ) { @@ -1558,7 +1558,7 @@ KMyMoneyWizardPage* HierarchyPage::nextPage(void) const return m_wizard->m_accountSummaryPage; } -const MyMoneyAccount& HierarchyPage::parentAccount(void) +const MyMoneyAccount& HierarchyPage::tqparentAccount(void) { // TODO // Instead of returning the Parent Account we can simply @@ -1573,8 +1573,8 @@ AccountSummaryPage::AccountSummaryPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepFinish, this, wizard, name) { m_dataList->setSorting(-1); - m_dataList->setColumnWidthMode(1, QListView::Maximum); - m_dataList->setResizeMode(QListView::LastColumn); + m_dataList->setColumnWidthMode(1, TQListView::Maximum); + m_dataList->setResizeMode(TQListView::LastColumn); } void AccountSummaryPage::enterPage(void) @@ -1585,7 +1585,7 @@ void AccountSummaryPage::enterPage(void) // assign an id to the account inside the wizard which is required for a schedule // get the schedule and clear the id again in the wizards object. - MyMoneyAccount tmp(QString("Phony-ID"), acc); + MyMoneyAccount tmp(TQString("Phony-ID"), acc); m_wizard->setAccount(tmp); MyMoneySchedule sch = m_wizard->schedule(); m_wizard->setAccount(acc); @@ -1593,13 +1593,13 @@ void AccountSummaryPage::enterPage(void) m_dataList->clear(); // Account data - QListViewItem* group = new KMyMoneyCheckListItem(m_dataList, i18n("Account information"), QString(), QString(), QCheckListItem::RadioButtonController); + TQListViewItem* group = new KMyMoneyCheckListItem(m_dataList, i18n("Account information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); - QListViewItem* p; + TQListViewItem* p; p = new KListViewItem(group, i18n("Name"), acc.name()); if(!acc.isLoan()) p = new KListViewItem(group, p, i18n("Subaccount of"), - m_wizard->parentAccount().name()); + m_wizard->tqparentAccount().name()); if(acc.accountType() == MyMoneyAccount::AssetLoan) p = new KListViewItem(group, p, i18n("Type"), i18n("Loan")); else @@ -1607,7 +1607,7 @@ void AccountSummaryPage::enterPage(void) p = new KListViewItem(group, p, i18n("Currency"), m_wizard->currency().name()); p = new KListViewItem(group, p, i18n("Opening date"), KGlobal::locale()->formatDate(acc.openingDate())); if(m_wizard->currency().id() != MyMoneyFile::instance()->baseCurrency().id()) { - p = new KListViewItem(group, p, i18n("Conversion rate"), m_wizard->conversionRate().rate(QString()).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())); + p = new KListViewItem(group, p, i18n("Conversion rate"), m_wizard->conversionRate().rate(TQString()).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())); } if(!acc.isLoan() || !m_wizard->openingBalance().isZero()) p = new KListViewItem(group, p, i18n("Opening balance"), m_wizard->openingBalance().formatMoney(acc, sec)); @@ -1624,9 +1624,9 @@ void AccountSummaryPage::enterPage(void) if(acc.accountType() == MyMoneyAccount::Investment) { if(m_wizard->m_brokeragepage->m_createBrokerageButton->isChecked()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Brokerage Account"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Brokerage Account"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); - p = new KListViewItem(group, p, i18n("Name"), QString("%1 (Brokerage)").arg(acc.name())); + p = new KListViewItem(group, p, i18n("Name"), TQString("%1 (Brokerage)").tqarg(acc.name())); p = new KListViewItem(group, p, i18n("Currency"), m_wizard->m_brokeragepage->m_brokerageCurrency->security().name()); if(m_wizard->m_brokeragepage->m_accountNumber->isEnabled() && !m_wizard->m_brokeragepage->m_accountNumber->text().isEmpty()) p = new KListViewItem(group, p, i18n("Number"), m_wizard->m_brokeragepage->m_accountNumber->text()); @@ -1637,14 +1637,14 @@ void AccountSummaryPage::enterPage(void) // Loan if(acc.isLoan()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Loan information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Loan information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); if(m_wizard->moneyBorrowed()) { p = new KListViewItem(group, p, i18n("Amount borrowed"), m_wizard->m_loanDetailsPage->m_loanAmount->value().formatMoney(m_wizard->currency().tradingSymbol(), m_wizard->precision())); } else { p = new KListViewItem(group, p, i18n("Amount lent"), m_wizard->m_loanDetailsPage->m_loanAmount->value().formatMoney(m_wizard->currency().tradingSymbol(), m_wizard->precision())); } - p = new KListViewItem(group, p, i18n("Interest rate"), QString("%1 %").arg(m_wizard->m_loanDetailsPage->m_interestRate->value().formatMoney("", -1))); + p = new KListViewItem(group, p, i18n("Interest rate"), TQString("%1 %").tqarg(m_wizard->m_loanDetailsPage->m_interestRate->value().formatMoney("", -1))); p = new KListViewItem(group, p, i18n("Interest rate is"), m_wizard->m_generalLoanInfoPage->m_interestType->currentText()); p = new KListViewItem(group, p, i18n("Principal and interest"), m_wizard->m_loanDetailsPage->m_paymentAmount->value().formatMoney(acc, sec)); p = new KListViewItem(group, p, i18n("Additional fees"), m_wizard->m_loanPaymentPage->additionalFees().formatMoney(acc, sec)); @@ -1652,7 +1652,7 @@ void AccountSummaryPage::enterPage(void) p = new KListViewItem(group, p, i18n("Payment account"), m_wizard->m_loanSchedulePage->m_paymentAccount->currentText()); if(!m_wizard->m_loanPayoutPage->m_noPayoutTransaction->isChecked() && m_wizard->openingBalance().isZero()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Payout information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Payout information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); if(m_wizard->m_loanPayoutPage->m_refinanceLoan->isChecked()) { p = new KListViewItem(group, p, i18n("Refinance"), m_wizard->m_loanPayoutPage->m_loanAccount->currentText()); @@ -1668,7 +1668,7 @@ void AccountSummaryPage::enterPage(void) // Schedule if(!(sch == MyMoneySchedule())) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Schedule information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Schedule information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); p = new KListViewItem(group, i18n("Name"), sch.name()); if(acc.accountType() == MyMoneyAccount::CreditCard) { diff --git a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.h b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.h index c8a149c..69e8aa7 100644 --- a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.h +++ b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QString; +class TQString; // ---------------------------------------------------------------------------- // Project Includes @@ -67,8 +67,9 @@ class Wizard : public KMyMoneyWizard friend class AccountSummaryPage; Q_OBJECT + TQ_OBJECT public: - Wizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); + Wizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); /** * Returns the information about the account as entered by @@ -82,12 +83,12 @@ public: void setAccount(const MyMoneyAccount& acc); /** - * Returns the information about the parent account as entered by + * Returns the information about the tqparent account as entered by * the user. * @note For now it's either fixed as Asset or Liability. We will provide - * user selected parent accounts later. + * user selected tqparent accounts later. */ - const MyMoneyAccount& parentAccount(void); + const MyMoneyAccount& tqparentAccount(void); /** * Returns information about the schedule. If the returned value diff --git a/kmymoney2/wizards/newaccountwizard/knewaccountwizard_p.h b/kmymoney2/wizards/newaccountwizard/knewaccountwizard_p.h index b8a7cb1..18af5f2 100644 --- a/kmymoney2/wizards/newaccountwizard/knewaccountwizard_p.h +++ b/kmymoney2/wizards/newaccountwizard/knewaccountwizard_p.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> +#include <tqcheckbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -62,12 +62,13 @@ namespace NewAccountWizard { class InstitutionPage : public KInstitutionPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - InstitutionPage(Wizard* parent, const char* name = 0); + InstitutionPage(Wizard* tqparent, const char* name = 0); ~InstitutionPage(); KMyMoneyWizardPage* nextPage(void) const; - QWidget* initialFocusWidget(void) const { return m_institutionComboBox; } + TQWidget* initialFocusWidget(void) const { return m_institutionComboBox; } /** * Returns the information about an institution if entered by @@ -91,15 +92,16 @@ private: class AccountTypePage : public KAccountTypePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - AccountTypePage(Wizard* parent, const char* name = 0); + AccountTypePage(Wizard* tqparent, const char* name = 0); virtual bool isComplete(void) const; KMyMoneyWizardPage* nextPage(void) const; - QWidget* initialFocusWidget(void) const { return m_accountName; } + TQWidget* initialFocusWidget(void) const { return m_accountName; } MyMoneyAccount::accountTypeE accountType(void) const; - const MyMoneyAccount& parentAccount(void); + const MyMoneyAccount& tqparentAccount(void); bool allowsParentAccount(void) const; const MyMoneySecurity& currency(void) const; @@ -113,7 +115,7 @@ private slots: void slotLoadWidgets(void); void slotUpdateType(int i); void slotUpdateCurrency(void); - void slotUpdateConversionRate(const QString&); + void slotUpdateConversionRate(const TQString&); void slotGetOnlineQuote(void); void slotPriceWarning(void); @@ -124,12 +126,13 @@ private: class BrokeragePage : public KBrokeragePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - BrokeragePage(Wizard* parent, const char* name = 0); + BrokeragePage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; void enterPage(void); - QWidget* initialFocusWidget(void) const { return m_createBrokerageButton; } + TQWidget* initialFocusWidget(void) const { return m_createBrokerageButton; } private slots: void slotLoadWidgets(void); @@ -138,13 +141,14 @@ private slots: class CreditCardSchedulePage : public KSchedulePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - CreditCardSchedulePage(Wizard* parent, const char* name = 0); + CreditCardSchedulePage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; virtual bool isComplete(void) const; void enterPage(void); - QWidget* initialFocusWidget(void) const { return m_reminderCheckBox; } + TQWidget* initialFocusWidget(void) const { return m_reminderCheckBox; } private slots: void slotLoadWidgets(void); @@ -153,14 +157,15 @@ private slots: class GeneralLoanInfoPage : public KGeneralLoanInfoPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - GeneralLoanInfoPage(Wizard* parent, const char* name = 0); + GeneralLoanInfoPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; virtual bool isComplete(void) const; void enterPage(void); - const MyMoneyAccount& parentAccount(void); + const MyMoneyAccount& tqparentAccount(void); - QWidget* initialFocusWidget(void) const { return m_loanDirection; } + TQWidget* initialFocusWidget(void) const { return m_loanDirection; } /** * Returns @p true if the user decided to record all payments, @p false otherwise. @@ -177,13 +182,14 @@ private: class LoanDetailsPage : public KLoanDetailsPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - LoanDetailsPage(Wizard* parent, const char* name = 0); + LoanDetailsPage(Wizard* tqparent, const char* name = 0); void enterPage(void); KMyMoneyWizardPage* nextPage(void) const; virtual bool isComplete(void) const; - QWidget* initialFocusWidget(void) const { return m_paymentDue; } + TQWidget* initialFocusWidget(void) const { return m_paymentDue; } /** * This method returns the number of payments depending on @@ -197,7 +203,7 @@ private: * according to the length of the given @a term. * The term is also converted into a string and returned. */ - QString updateTermWidgets(const long double term); + TQString updateTermWidgets(const long double term); private: bool m_needCalculate; @@ -210,8 +216,9 @@ private slots: class LoanPaymentPage : public KLoanPaymentPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - LoanPaymentPage(Wizard* parent, const char* name = 0); + LoanPaymentPage(Wizard* tqparent, const char* name = 0); ~LoanPaymentPage(); KMyMoneyWizardPage* nextPage(void) const; @@ -233,7 +240,7 @@ public: * @note The splits may contain assigned ids which the caller must remove before * adding the splits to a MyMoneyTransaction object. */ - void additionalFeesSplits(QValueList<MyMoneySplit>& list); + void additionalFeesSplits(TQValueList<MyMoneySplit>& list); protected slots: void slotAdditionalFees(void); @@ -251,8 +258,9 @@ private: class LoanSchedulePage : public KLoanSchedulePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - LoanSchedulePage(Wizard* parent, const char* name = 0); + LoanSchedulePage(Wizard* tqparent, const char* name = 0); void enterPage(void); KMyMoneyWizardPage* nextPage(void) const; @@ -260,29 +268,30 @@ public: /** * This method returns the due date of the first payment to be recorded. */ - QDate firstPaymentDueDate(void) const; + TQDate firstPaymentDueDate(void) const; - QWidget* initialFocusWidget(void) const { return m_interestCategory; } + TQWidget* initialFocusWidget(void) const { return m_interestCategory; } private slots: void slotLoadWidgets(void); - void slotCreateCategory(const QString& name, QString& id); + void slotCreateCategory(const TQString& name, TQString& id); }; class LoanPayoutPage : public KLoanPayoutPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - LoanPayoutPage(Wizard* parent, const char* name = 0); + LoanPayoutPage(Wizard* tqparent, const char* name = 0); void enterPage(void); virtual bool isComplete(void) const; KMyMoneyWizardPage* nextPage(void) const; - QWidget* initialFocusWidget(void) const { return m_noPayoutTransaction; } + TQWidget* initialFocusWidget(void) const { return m_noPayoutTransaction; } - const QString& payoutAccountId(void) const; + const TQString& payoutAccountId(void) const; private slots: void slotLoadWidgets(void); @@ -293,20 +302,21 @@ private slots: class HierarchyPage : public KHierarchyPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - HierarchyPage(Wizard* parent, const char* name = 0); + HierarchyPage(Wizard* tqparent, const char* name = 0); void enterPage(void); KMyMoneyWizardPage* nextPage(void) const; - QWidget* initialFocusWidget(void) const { return m_qlistviewParentAccounts; } - const MyMoneyAccount& parentAccount(void); + TQWidget* initialFocusWidget(void) const { return m_qlistviewParentAccounts; } + const MyMoneyAccount& tqparentAccount(void); private: KMyMoneyAccountTreeItem* buildAccountTree - ( KMyMoneyAccountTreeBase* parent + ( KMyMoneyAccountTreeBase* tqparent , const MyMoneyAccount& account , bool open = false ) const; KMyMoneyAccountTreeItem* buildAccountTree - ( KMyMoneyAccountTreeItem* parent + ( KMyMoneyAccountTreeItem* tqparent , const MyMoneyAccount& account , bool open = false ) const; MyMoneyAccount m_topAccount; // Last populated top account @@ -316,10 +326,11 @@ private: class AccountSummaryPage : public KAccountSummaryPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - AccountSummaryPage(Wizard* parent, const char* name = 0); + AccountSummaryPage(Wizard* tqparent, const char* name = 0); void enterPage(void); - QWidget* initialFocusWidget(void) const { return m_dataList; } + TQWidget* initialFocusWidget(void) const { return m_dataList; } }; } // namespace diff --git a/kmymoney2/wizards/newaccountwizard/kschedulepagedecl.ui b/kmymoney2/wizards/newaccountwizard/kschedulepagedecl.ui index fd4f886..180daca 100644 --- a/kmymoney2/wizards/newaccountwizard/kschedulepagedecl.ui +++ b/kmymoney2/wizards/newaccountwizard/kschedulepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KSchedulePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KSchedulePageDecl</cstring> </property> @@ -24,7 +24,7 @@ <string>For credit card accounts you can create a monthly schedule which will automatically remind you about the payment. Please fill in the details about this payment here.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_reminderCheckBox</cstring> </property> @@ -35,7 +35,7 @@ <string>Yes, remind me when the payment is due</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_paymentFrame</cstring> </property> @@ -52,7 +52,7 @@ <property name="margin"> <number>0</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -64,7 +64,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>180</width> <height>0</height> @@ -74,12 +74,12 @@ <string>Name of schedule</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_name</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -92,7 +92,7 @@ <cstring>m_payee</cstring> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -108,7 +108,7 @@ <enum>StrongFocus</enum> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel4_3</cstring> </property> @@ -124,7 +124,7 @@ <enum>StrongFocus</enum> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel3_3</cstring> </property> @@ -132,7 +132,7 @@ <string>Payment should be made from account</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -141,7 +141,7 @@ from account</string> <cstring>m_paymentAccount</cstring> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -166,7 +166,7 @@ from account</string> <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -183,5 +183,10 @@ from account</string> <slot>setEnabled(bool)</slot> </connection> </connections> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneycategory.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui b/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui index e0e3620..9d76f0d 100644 --- a/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kaccountpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KAccountPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KAccountPageDecl</cstring> </property> @@ -27,7 +27,7 @@ <string>A typical KMyMoney user maintains a checking a account with some institution and uses it to receive money or pay bills. If this is not the case, please deselect the checkbox below and continue on the next page.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_haveCheckingAccountButton</cstring> </property> @@ -35,7 +35,7 @@ <string>I have a checking account that I want to manage with KMyMoney</string> </property> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>m_accountDataFrame</cstring> </property> @@ -68,7 +68,7 @@ <string>Each institution has a routing number. Enter it here. If uncertain, leave the field blank. You can modify it later.</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>textLabel3</cstring> </property> @@ -76,7 +76,7 @@ <string>Name of the institution</string> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>textLabel4</cstring> </property> @@ -100,7 +100,7 @@ <string>Enter a descriptive name that will be used by KMyMoney to identify your checking account.</string> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -108,9 +108,9 @@ <string>Opening date</string> </property> </widget> - <widget class="QLayoutWidget" row="3" column="1"> + <widget class="TQLayoutWidget" row="3" column="1"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <hbox> <property name="name"> @@ -134,7 +134,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>81</width> <height>20</height> @@ -143,7 +143,7 @@ </spacer> </hbox> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>textLabel2</cstring> </property> @@ -151,7 +151,7 @@ <string>Number of the account</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -159,7 +159,7 @@ <string>Name of the account</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>textLabel2_2</cstring> </property> @@ -167,15 +167,15 @@ <string>Opening balance</string> </property> </widget> - <widget class="QLayoutWidget" row="4" column="1"> + <widget class="TQLayoutWidget" row="4" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>m_accountCurrencyLabel</cstring> </property> @@ -204,7 +204,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>200</width> <height>20</height> @@ -236,7 +236,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -264,5 +264,9 @@ <tabstop>kActiveLabel2</tabstop> <tabstop>kActiveLabel1</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kmymoneydateinput.h</include> + <include location="global" impldecl="in implementation">kmymoney/kmymoneyedit.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui b/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui index 579bf1e..8705796 100644 --- a/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kcurrencypagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KCurrencyPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCurrencyPageDecl</cstring> </property> @@ -27,9 +27,9 @@ <string>KMyMoney supports multiple currencies. Your reports will be based on a default curreny which you can select here. The default for new accounts is also the currency you select here.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout19</cstring> + <cstring>tqlayout19</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>21</height> @@ -67,7 +67,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>21</height> @@ -78,5 +78,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui b/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui index dcae784..527c6eb 100644 --- a/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kfilepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KFilePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KFilePageDecl</cstring> </property> @@ -42,7 +42,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>30</height> @@ -82,5 +82,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui b/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui index 916493d..d1aa51d 100644 --- a/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kgeneralpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KGeneralPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KGeneralPageDecl</cstring> </property> @@ -26,19 +26,19 @@ This information will be seen and used only by you. The information is used to personalize KMyMoney, to encrypt your file, etc.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout18</cstring> + <cstring>tqlayout18</cstring> </property> <hbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame8</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>25</width> <height>0</height> @@ -51,27 +51,27 @@ This information will be seen and used only by you. The information is used to p <enum>Plain</enum> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout17</cstring> + <cstring>tqlayout17</cstring> </property> <vbox> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout20</cstring> + <cstring>tqlayout20</cstring> </property> <grid> <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -81,26 +81,26 @@ This information will be seen and used only by you. The information is used to p <string>County/State:</string> </property> </widget> - <widget class="QLineEdit" row="0" column="1"> + <widget class="TQLineEdit" row="0" column="1"> <property name="name"> <cstring>m_userNameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="3" column="1"> + <widget class="TQLineEdit" row="3" column="1"> <property name="name"> <cstring>m_countyEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="2" column="1"> + <widget class="TQLineEdit" row="2" column="1"> <property name="name"> <cstring>m_townEdit</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -110,16 +110,16 @@ This information will be seen and used only by you. The information is used to p <string>Street:</string> </property> </widget> - <widget class="QLineEdit" row="1" column="1"> + <widget class="TQLineEdit" row="1" column="1"> <property name="name"> <cstring>m_streetEdit</cstring> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -129,7 +129,7 @@ This information will be seen and used only by you. The information is used to p <string>Email:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -137,11 +137,11 @@ This information will be seen and used only by you. The information is used to p <string>Your name:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -151,11 +151,11 @@ This information will be seen and used only by you. The information is used to p <string>Telephone:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -165,16 +165,16 @@ This information will be seen and used only by you. The information is used to p <string>Town:</string> </property> </widget> - <widget class="QLineEdit" row="6" column="1"> + <widget class="TQLineEdit" row="6" column="1"> <property name="name"> <cstring>m_emailEdit</cstring> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -184,21 +184,21 @@ This information will be seen and used only by you. The information is used to p <string>Zip code</string> </property> </widget> - <widget class="QLineEdit" row="5" column="1"> + <widget class="TQLineEdit" row="5" column="1"> <property name="name"> <cstring>m_telephoneEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="4" column="1"> + <widget class="TQLineEdit" row="4" column="1"> <property name="name"> <cstring>m_zipcodeEdit</cstring> </property> </widget> </grid> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout12</cstring> + <cstring>tqlayout12</cstring> </property> <hbox> <property name="name"> @@ -222,7 +222,7 @@ This information will be seen and used only by you. The information is used to p <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -233,11 +233,11 @@ This information will be seen and used only by you. The information is used to p </widget> </vbox> </widget> - <widget class="QFrame"> + <widget class="TQFrame"> <property name="name"> <cstring>frame8_2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>25</width> <height>0</height> @@ -254,5 +254,5 @@ This information will be seen and used only by you. The information is used to p </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kintropagedecl.ui b/kmymoney2/wizards/newuserwizard/kintropagedecl.ui index d9dd326..b0bed68 100644 --- a/kmymoney2/wizards/newuserwizard/kintropagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kintropagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KIntroPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KIntroPageDecl</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -29,7 +29,7 @@ <property name="text"> <string>Welcome to KMyMoney!</string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -53,7 +53,7 @@ On the next few pages you will be guided through the steps necessary to setup th <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> @@ -62,5 +62,5 @@ On the next few pages you will be guided through the steps necessary to setup th </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp b/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp index 608afb6..d8607fc 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard.cpp @@ -20,12 +20,12 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpixmap.h> -#include <qbitmap.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qdir.h> -#include <qlabel.h> +#include <tqpixmap.h> +#include <tqbitmap.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqdir.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -68,8 +68,8 @@ using namespace NewUserWizard; static int stepCount; -NewUserWizard::Wizard::Wizard(QWidget *parent, const char *name, bool modal, WFlags flags) : - KMyMoneyWizard(parent, name, modal, flags), +NewUserWizard::Wizard::Wizard(TQWidget *tqparent, const char *name, bool modal, WFlags flags) : + KMyMoneyWizard(tqparent, name, modal, flags), m_introPage(0) { bool isFirstTime = KMyMoneyGlobalSettings::firstTimeRun(); @@ -108,7 +108,7 @@ MyMoneyPayee NewUserWizard::Wizard::user(void) const return m_generalPage->user(); } -QString NewUserWizard::Wizard::url(void) const +TQString NewUserWizard::Wizard::url(void) const { return m_filePage->m_dataFileEdit->url(); } @@ -150,7 +150,7 @@ MyMoneySecurity NewUserWizard::Wizard::baseCurrency(void) const return m_baseCurrency; } -QValueList<MyMoneyTemplate> NewUserWizard::Wizard::templates(void) const +TQValueList<MyMoneyTemplate> NewUserWizard::Wizard::templates(void) const { return m_categoriesPage->selectedTemplates(); } @@ -172,8 +172,8 @@ GeneralPage::GeneralPage(Wizard* wizard, const char* name) : { m_userNameEdit->setFocus(); KABC::StdAddressBook *ab = KABC::StdAddressBook::self(true); - connect(ab, SIGNAL(addressBookChanged(AddressBook*)), this, SLOT(slotAddressBookLoaded())); - connect(m_loadAddressButton, SIGNAL(clicked()), this, SLOT(slotLoadFromKABC())); + connect(ab, TQT_SIGNAL(addressBookChanged(AddressBook*)), this, TQT_SLOT(slotAddressBookLoaded())); + connect(m_loadAddressButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotLoadFromKABC())); m_loadAddressButton->setEnabled(false); } @@ -205,10 +205,10 @@ void GeneralPage::slotLoadFromKABC(void) m_telephoneEdit->setText( phone.number() ); KABC::Address a = addr.address( KABC::Address::Home ); - QString sep; + TQString sep; if(!a.country().isEmpty() && !a.region().isEmpty()) sep = " / "; - m_countyEdit->setText(QString("%1%2%3").arg(a.country(), sep, a.region())); + m_countyEdit->setText(TQString("%1%2%3").tqarg(a.country(), sep, a.region())); m_postcodeEdit->setText( a.postalCode() ); m_townEdit->setText( a.locality() ); m_streetEdit->setText( a.street() ); @@ -223,25 +223,25 @@ CurrencyPage::CurrencyPage(Wizard* wizard, const char* name) : Currency(wizard), WizardPage<Wizard>(stepCount++, this, wizard, name) { - QListViewItem *first = 0; - QValueList<MyMoneySecurity> list = MyMoneyFile::instance()->currencyList(); - QValueList<MyMoneySecurity>::const_iterator it; + TQListViewItem *first = 0; + TQValueList<MyMoneySecurity> list = MyMoneyFile::instance()->currencyList(); + TQValueList<MyMoneySecurity>::const_iterator it; - QString localCurrency(localeconv()->int_curr_symbol); + TQString localCurrency(localeconv()->int_curr_symbol); localCurrency.truncate(3); - QString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); + TQString baseCurrency = MyMoneyFile::instance()->baseCurrency().id(); // construct a transparent 16x16 pixmap - QPixmap empty(16, 16); - empty.setMask(QBitmap(16, 16, true)); + TQPixmap empty(16, 16); + empty.setMask(TQBitmap(16, 16, true)); m_currencyList->clear(); for(it = list.begin(); it != list.end(); ++it) { - QListViewItem* p = insertCurrency(*it); + TQListViewItem* p = insertCurrency(*it); if((*it).id() == baseCurrency) { first = p; - p->setPixmap(0, QPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); + p->setPixmap(0, TQPixmap( locate("icon","hicolor/16x16/apps/kmymoney2.png"))); } else { p->setPixmap(0, empty); } @@ -276,10 +276,10 @@ AccountPage::AccountPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(stepCount, this, wizard, name) // don't inc. the step count here { m_mandatoryGroup->add(m_accountNameEdit); - connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); - connect(m_haveCheckingAccountButton, SIGNAL(toggled(bool)), object(), SIGNAL(completeStateChanged())); + connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_haveCheckingAccountButton, TQT_SIGNAL(toggled(bool)), object(), TQT_SIGNAL(completeStateChanged())); m_accountNameEdit->setFocus(); - m_openingDateEdit->setDate(QDate(QDate::currentDate().year(),1,1)); + m_openingDateEdit->setDate(TQDate(TQDate::tqcurrentDate().year(),1,1)); } KMyMoneyWizardPage* AccountPage::nextPage(void) const @@ -303,7 +303,7 @@ KMyMoneyWizardPage* CategoriesPage::nextPage(void) const return m_wizard->m_preferencePage; } -QValueList<MyMoneyTemplate> CategoriesPage::selectedTemplates(void) const +TQValueList<MyMoneyTemplate> CategoriesPage::selectedTemplates(void) const { return m_templateSelector->selectedTemplates(); } @@ -312,7 +312,7 @@ PreferencePage::PreferencePage(Wizard* wizard, const char* name) : KPreferencePageDecl(wizard), WizardPage<Wizard>(stepCount++, this, wizard, name) { - connect(m_openConfigButton, SIGNAL(clicked()), kmymoney2, SLOT(slotSettings())); + connect(m_openConfigButton, TQT_SIGNAL(clicked()), kmymoney2, TQT_SLOT(slotSettings())); } KMyMoneyWizardPage* PreferencePage::nextPage(void) const @@ -325,11 +325,11 @@ FilePage::FilePage(Wizard* wizard, const char* name) : WizardPage<Wizard>(stepCount++, this, wizard, name) { m_mandatoryGroup->add(m_dataFileEdit->lineEdit()); - connect(m_mandatoryGroup, SIGNAL(stateChanged()), object(), SIGNAL(completeStateChanged())); + connect(m_mandatoryGroup, TQT_SIGNAL(stateChanged()), object(), TQT_SIGNAL(completeStateChanged())); KUser user; m_dataFileEdit->setShowLocalProtocol(false); - m_dataFileEdit->setURL(QString("%1/%2.kmy").arg(QDir::homeDirPath(), user.loginName())); + m_dataFileEdit->setURL(TQString("%1/%2.kmy").tqarg(TQDir::homeDirPath(), user.loginName())); // allow selection of non-existing files m_dataFileEdit->setMode(KFile::File); @@ -346,7 +346,7 @@ bool FilePage::isComplete(void) const // b) the directory does exist rc = !KIO::NetAccess::exists(m_dataFileEdit->url(), false, m_wizard); if(rc) { - QRegExp exp("(.*)/(.*)"); + TQRegExp exp("(.*)/(.*)"); rc = false; if(exp.search(m_dataFileEdit->url()) != -1) { if(exp.cap(2).length() > 0) { diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard.h b/kmymoney2/wizards/newuserwizard/knewuserwizard.h index a8cd8d5..25e010f 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard.h +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------------------- // QT Includes -class QString; +class TQString; // ---------------------------------------------------------------------------- // Project Includes @@ -65,8 +65,9 @@ class Wizard : public KMyMoneyWizard friend class FilePage; Q_OBJECT + TQ_OBJECT public: - Wizard(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); + Wizard(TQWidget* tqparent = 0, const char* name = 0, bool modal = false, WFlags flags = 0); /** * Returns the personal information of the user (e.g. name, address, etc.) */ @@ -75,7 +76,7 @@ public: /** * Returns the URL that the user has chosen to store the file */ - QString url(void) const; + TQString url(void) const; /** * Returns the information about an institution if entered by @@ -104,7 +105,7 @@ public: /** * Returns a list of templates including accounts to be created */ - QValueList<MyMoneyTemplate> templates(void) const; + TQValueList<MyMoneyTemplate> templates(void) const; private: MyMoneySecurity m_baseCurrency; diff --git a/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h b/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h index aa62725..ea1910a 100644 --- a/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h +++ b/kmymoney2/wizards/newuserwizard/knewuserwizard_p.h @@ -44,8 +44,9 @@ namespace NewUserWizard { class IntroPage : public KIntroPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - IntroPage(Wizard* parent, const char* name = 0); + IntroPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; }; @@ -57,8 +58,9 @@ public: class GeneralPage : public UserInfo, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - GeneralPage(Wizard* parent, const char* name = 0); + GeneralPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; protected slots: @@ -75,8 +77,9 @@ protected slots: class CurrencyPage : public Currency, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - CurrencyPage(Wizard* parent, const char* name = 0); + CurrencyPage(Wizard* tqparent, const char* name = 0); void enterPage(void); KMyMoneyWizardPage* nextPage(void) const; }; @@ -87,8 +90,9 @@ public: class AccountPage : public KAccountPageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - AccountPage(Wizard* parent, const char* name = 0); + AccountPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; virtual bool isComplete(void) const; @@ -102,10 +106,11 @@ public: class CategoriesPage : public Accounts, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - CategoriesPage(Wizard* parent, const char* name = 0); + CategoriesPage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; - QValueList<MyMoneyTemplate> selectedTemplates(void) const; + TQValueList<MyMoneyTemplate> selectedTemplates(void) const; }; /** @@ -116,8 +121,9 @@ public: class PreferencePage : public KPreferencePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - PreferencePage(Wizard* parent, const char* name = 0); + PreferencePage(Wizard* tqparent, const char* name = 0); KMyMoneyWizardPage* nextPage(void) const; }; @@ -129,8 +135,9 @@ public: class FilePage : public KFilePageDecl, public WizardPage<Wizard> { Q_OBJECT + TQ_OBJECT public: - FilePage(Wizard* parent, const char* name = 0); + FilePage(Wizard* tqparent, const char* name = 0); virtual bool isComplete(void) const; }; diff --git a/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui b/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui index 3d3c062..95002a3 100644 --- a/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kpasswordpagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KPasswordPageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KPasswordPageDecl</cstring> </property> @@ -29,5 +29,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui b/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui index bfe6446..95838b7 100644 --- a/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui +++ b/kmymoney2/wizards/newuserwizard/kpreferencepagedecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>KPreferencePageDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KPreferencePageDecl</cstring> </property> @@ -27,9 +27,9 @@ <string>If you would like to review or change any preference settings for KMyMoney at this time, you can do so here. If not just click <b>Next</b>.</string> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>51</width> <height>20</height> @@ -72,7 +72,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -92,5 +92,5 @@ </widget> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/wizardpages/accounts.cpp b/kmymoney2/wizards/wizardpages/accounts.cpp index 0a6c82b..21c80ad 100644 --- a/kmymoney2/wizards/wizardpages/accounts.cpp +++ b/kmymoney2/wizards/wizardpages/accounts.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qheader.h> +#include <tqheader.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -31,8 +31,8 @@ #include "accounts.h" -Accounts::Accounts(QWidget* parent, const char* name) : - AccountsDecl(parent, name) +Accounts::Accounts(TQWidget* tqparent, const char* name) : + AccountsDecl(tqparent, name) { } diff --git a/kmymoney2/wizards/wizardpages/accounts.h b/kmymoney2/wizards/wizardpages/accounts.h index d1f3175..0c36c31 100644 --- a/kmymoney2/wizards/wizardpages/accounts.h +++ b/kmymoney2/wizards/wizardpages/accounts.h @@ -32,8 +32,9 @@ class Accounts : public AccountsDecl { Q_OBJECT + TQ_OBJECT public: - Accounts(QWidget* parent = 0, const char* name = 0); + Accounts(TQWidget* tqparent = 0, const char* name = 0); private: }; diff --git a/kmymoney2/wizards/wizardpages/accountsdecl.ui b/kmymoney2/wizards/wizardpages/accountsdecl.ui index 9e7b7c9..c04d1b4 100644 --- a/kmymoney2/wizards/wizardpages/accountsdecl.ui +++ b/kmymoney2/wizards/wizardpages/accountsdecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>AccountsDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>AccountsDecl</cstring> </property> @@ -39,7 +39,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -50,5 +50,8 @@ </widget> <customwidgets> </customwidgets> -<layoutdefaults spacing="6" margin="11"/> +<includes> + <include location="global" impldecl="in implementation">kmymoney/kaccounttemplateselector.h</include> +</includes> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/wizardpages/currency.cpp b/kmymoney2/wizards/wizardpages/currency.cpp index 8693089..d824f01 100644 --- a/kmymoney2/wizards/wizardpages/currency.cpp +++ b/kmymoney2/wizards/wizardpages/currency.cpp @@ -29,24 +29,24 @@ #include "currency.h" -Currency::Currency(QWidget* parent, const char* name) : - CurrencyDecl(parent, name) +Currency::Currency(TQWidget* tqparent, const char* name) : + CurrencyDecl(tqparent, name) { m_currencyList->setAllColumnsShowFocus(true); m_currencyList->setMultiSelection(false); } -QListViewItem* Currency::insertCurrency(const MyMoneySecurity& sec) +TQListViewItem* Currency::insertCurrency(const MyMoneySecurity& sec) { - return new KListViewItem(m_currencyList, sec.name(), QString(sec.id()), sec.tradingSymbol()); + return new KListViewItem(m_currencyList, sec.name(), TQString(sec.id()), sec.tradingSymbol()); } void Currency::selectCurrency(const MyMoneySecurity& sec) { - QListViewItem* it_v; - QListViewItemIterator it(m_currencyList); + TQListViewItem* it_v; + TQListViewItemIterator it(m_currencyList); while((it_v = it.current()) != 0) { - if(it_v->text(1) == QString(sec.id())) { + if(it_v->text(1) == TQString(sec.id())) { m_currencyList->setSelected(it_v, true); m_currencyList->ensureItemVisible(it_v); break; @@ -54,9 +54,9 @@ void Currency::selectCurrency(const MyMoneySecurity& sec) } } -QString Currency::selectedCurrency(void) const +TQString Currency::selectedCurrency(void) const { - QString id; + TQString id; if(m_currencyList->selectedItem()) { id = m_currencyList->selectedItem()->text(1); } diff --git a/kmymoney2/wizards/wizardpages/currency.h b/kmymoney2/wizards/wizardpages/currency.h index 1ce2649..d202f35 100644 --- a/kmymoney2/wizards/wizardpages/currency.h +++ b/kmymoney2/wizards/wizardpages/currency.h @@ -35,11 +35,12 @@ class KListViewItem; class Currency : public CurrencyDecl { Q_OBJECT + TQ_OBJECT public: - Currency(QWidget* parent = 0, const char* name = 0); - QListViewItem* insertCurrency(const MyMoneySecurity& sec); + Currency(TQWidget* tqparent = 0, const char* name = 0); + TQListViewItem* insertCurrency(const MyMoneySecurity& sec); void selectCurrency(const MyMoneySecurity& sec); - QString selectedCurrency(void) const; + TQString selectedCurrency(void) const; }; #endif diff --git a/kmymoney2/wizards/wizardpages/currencydecl.ui b/kmymoney2/wizards/wizardpages/currencydecl.ui index f2b857a..354dfc3 100644 --- a/kmymoney2/wizards/wizardpages/currencydecl.ui +++ b/kmymoney2/wizards/wizardpages/currencydecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CurrencyDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>CurrencyDecl</cstring> </property> @@ -83,7 +83,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -92,5 +92,5 @@ </spacer> </vbox> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kmymoney2/wizards/wizardpages/userinfo.cpp b/kmymoney2/wizards/wizardpages/userinfo.cpp index 412c5a1..01d5e69 100644 --- a/kmymoney2/wizards/wizardpages/userinfo.cpp +++ b/kmymoney2/wizards/wizardpages/userinfo.cpp @@ -30,8 +30,8 @@ #include "userinfo.h" #include <kmymoney/mymoneypayee.h> -UserInfo::UserInfo(QWidget* parent, const char* name) : - UserInfoDecl(parent, name) +UserInfo::UserInfo(TQWidget* tqparent, const char* name) : + UserInfoDecl(tqparent, name) { m_userNameEdit->setFocus(); } diff --git a/kmymoney2/wizards/wizardpages/userinfo.h b/kmymoney2/wizards/wizardpages/userinfo.h index 9242868..9168bf9 100644 --- a/kmymoney2/wizards/wizardpages/userinfo.h +++ b/kmymoney2/wizards/wizardpages/userinfo.h @@ -33,8 +33,9 @@ class MyMoneyPayee; class UserInfo : public UserInfoDecl { Q_OBJECT + TQ_OBJECT public: - UserInfo(QWidget* parent = 0, const char* name = 0); + UserInfo(TQWidget* tqparent = 0, const char* name = 0); MyMoneyPayee user(void) const; private: diff --git a/kmymoney2/wizards/wizardpages/userinfodecl.ui b/kmymoney2/wizards/wizardpages/userinfodecl.ui index 4240d49..205e6d2 100644 --- a/kmymoney2/wizards/wizardpages/userinfodecl.ui +++ b/kmymoney2/wizards/wizardpages/userinfodecl.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>UserInfoDecl</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>UserInfoDecl</cstring> </property> @@ -34,11 +34,11 @@ <cstring>m_userNameEdit</cstring> </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -48,11 +48,11 @@ <string>Town:</string> </property> </widget> - <widget class="QLabel" row="4" column="0"> + <widget class="TQLabel" row="4" column="0"> <property name="name"> <cstring>TextLabel4</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -62,11 +62,11 @@ <string>County/State:</string> </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -96,11 +96,11 @@ <cstring>m_telephoneEdit</cstring> </property> </widget> - <widget class="QLabel" row="6" column="0"> + <widget class="TQLabel" row="6" column="0"> <property name="name"> <cstring>TextLabel7</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -110,11 +110,11 @@ <string>Email:</string> </property> </widget> - <widget class="QLabel" row="5" column="0"> + <widget class="TQLabel" row="5" column="0"> <property name="name"> <cstring>TextLabel6</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -124,7 +124,7 @@ <string>Telephone:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -132,9 +132,9 @@ <string>Your name:</string> </property> </widget> - <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="4"> + <widget class="TQLayoutWidget" row="7" column="0" rowspan="1" colspan="4"> <property name="name"> - <cstring>layout22</cstring> + <cstring>tqlayout22</cstring> </property> <hbox> <property name="name"> @@ -158,7 +158,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>305</width> <height>21</height> @@ -177,7 +177,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> @@ -189,11 +189,11 @@ <cstring>m_countyEdit</cstring> </property> </widget> - <widget class="QLabel" row="4" column="2"> + <widget class="TQLabel" row="4" column="2"> <property name="name"> <cstring>TextLabel5</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>100</width> <height>0</height> @@ -221,5 +221,5 @@ <tabstop>m_loadAddressButton</tabstop> <tabstop>kActiveLabel1</tabstop> </tabstops> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> |