summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/kendingbalancedlg.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/dialogs/kendingbalancedlg.cpp
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-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/dialogs/kendingbalancedlg.cpp')
-rw-r--r--kmymoney2/dialogs/kendingbalancedlg.cpp108
1 files changed, 54 insertions, 54 deletions
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);
}