diff options
Diffstat (limited to 'kmymoney2/views/khomeview.cpp')
-rw-r--r-- | kmymoney2/views/khomeview.cpp | 558 |
1 files changed, 279 insertions, 279 deletions
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>"); |