summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/keditloanwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/keditloanwizard.cpp')
-rw-r--r--kmymoney2/dialogs/keditloanwizard.cpp66
1 files changed, 33 insertions, 33 deletions
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);