diff options
Diffstat (limited to 'kmymoney2/mymoney/storage/mymoneystorageanon.cpp')
-rw-r--r-- | kmymoney2/mymoney/storage/mymoneystorageanon.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
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; |