diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-05 06:00:29 +0000 |
commit | fecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch) | |
tree | 6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp | |
parent | dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff) | |
download | kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip |
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp')
-rw-r--r-- | kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp | 258 |
1 files changed, 129 insertions, 129 deletions
diff --git a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp index 1bfae86..3a42120 100644 --- a/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp +++ b/kmymoney2/wizards/newaccountwizard/knewaccountwizard.cpp @@ -20,11 +20,11 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qcheckbox.h> -#include <qfocusdata.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqfocusdata.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqlabel.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -76,8 +76,8 @@ namespace NewAccountWizard { StepFinish }; }; -NewAccountWizard::Wizard::Wizard(QWidget *parent, const char *name, bool modal, WFlags flags) - : KMyMoneyWizard(parent, name, modal, flags) +NewAccountWizard::Wizard::Wizard(TQWidget *tqparent, const char *name, bool modal, WFlags flags) + : KMyMoneyWizard(tqparent, name, modal, flags) { setTitle(i18n("KMyMoney New Account Setup")); addStep(i18n("Institution")); @@ -195,20 +195,20 @@ MyMoneyTransaction NewAccountWizard::Wizard::payoutTransaction(void) s.setValue(-s.value()); s.setAccountId(m_loanPayoutPage->payoutAccountId()); MyMoneyMoney shares; - KCurrencyCalculator::setupSplitPrice(shares, t, s, QMap<QString, MyMoneyMoney>(), this); + KCurrencyCalculator::setupSplitPrice(shares, t, s, TQMap<TQString, MyMoneyMoney>(), this); s.setShares(shares); t.addSplit(s); } return t; } -const MyMoneyAccount& NewAccountWizard::Wizard::parentAccount(void) +const MyMoneyAccount& NewAccountWizard::Wizard::tqparentAccount(void) { return m_accountTypePage->allowsParentAccount() - ? m_hierarchyPage->parentAccount() + ? m_hierarchyPage->tqparentAccount() : ( m_accountTypePage->accountType() == MyMoneyAccount::Loan - ? m_generalLoanInfoPage->parentAccount() - : m_accountTypePage->parentAccount() ); + ? m_generalLoanInfoPage->tqparentAccount() + : m_accountTypePage->tqparentAccount() ); } MyMoneyAccount NewAccountWizard::Wizard::brokerageAccount(void) const @@ -261,7 +261,7 @@ const MyMoneySchedule& NewAccountWizard::Wizard::schedule(void) m_schedule.setTransaction(t); } else if(m_account.isLoan()) { - m_schedule.setName(i18n("Loan payment for %1").arg(m_accountTypePage->m_accountName->text())); + m_schedule.setName(i18n("Loan payment for %1").tqarg(m_accountTypePage->m_accountName->text())); m_schedule.setType(MyMoneySchedule::TYPE_LOANPAYMENT); if(moneyBorrowed()) m_schedule.setPaymentType(MyMoneySchedule::STYPE_DIRECTDEBIT); @@ -304,9 +304,9 @@ const MyMoneySchedule& NewAccountWizard::Wizard::schedule(void) t.addSplit(s); // additional fee splits - QValueList<MyMoneySplit> additionalSplits; + TQValueList<MyMoneySplit> additionalSplits; m_loanPaymentPage->additionalFeesSplits(additionalSplits); - QValueList<MyMoneySplit>::const_iterator it; + TQValueList<MyMoneySplit>::const_iterator it; MyMoneyMoney factor(moneyBorrowed() ? 1 : -1, 1); for(it = additionalSplits.begin(); it != additionalSplits.end(); ++it) { @@ -364,7 +364,7 @@ bool NewAccountWizard::Wizard::moneyBorrowed(void) const class NewAccountWizard::InstitutionPage::Private { public: - QValueList<MyMoneyInstitution> m_list; + TQValueList<MyMoneyInstitution> m_list; }; InstitutionPage::InstitutionPage(Wizard* wizard, const char* name) : @@ -372,9 +372,9 @@ InstitutionPage::InstitutionPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepInstitution, this, wizard, name), d(new Private()) { - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); - connect(m_newInstitutionButton, SIGNAL(clicked()), this, SLOT(slotNewInstitution())); - connect(m_institutionComboBox, SIGNAL(activated(int)), this, SLOT(slotSelectInstitution(int))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); + connect(m_newInstitutionButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewInstitution())); + connect(m_institutionComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelectInstitution(int))); slotLoadWidgets(); m_institutionComboBox->setCurrentItem(0); @@ -394,7 +394,7 @@ void InstitutionPage::slotLoadWidgets(void) MyMoneyFile::instance()->institutionList(d->m_list); qHeapSort(d->m_list); - QValueList<MyMoneyInstitution>::const_iterator it_l; + TQValueList<MyMoneyInstitution>::const_iterator it_l; m_institutionComboBox->insertItem(""); for(it_l = d->m_list.begin(); it_l != d->m_list.end(); ++it_l) { m_institutionComboBox->insertItem((*it_l).name()); @@ -408,7 +408,7 @@ void InstitutionPage::slotNewInstitution(void) emit m_wizard->createInstitution(institution); if(!institution.id().isEmpty()) { - QValueList<MyMoneyInstitution>::const_iterator it_l; + TQValueList<MyMoneyInstitution>::const_iterator it_l; int i = 0; for(it_l = d->m_list.begin(); it_l != d->m_list.end(); ++it_l) { if((*it_l).id() == institution.id()) { @@ -471,12 +471,12 @@ AccountTypePage::AccountTypePage(Wizard* wizard, const char* name) : m_conversionRate->setValue(MyMoneyMoney(1,1)); slotUpdateCurrency(); - connect(m_typeSelection, SIGNAL(itemSelected(int)), this, SLOT(slotUpdateType(int))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); - connect(m_currencyComboBox, SIGNAL(activated(int)), this, SLOT(slotUpdateCurrency())); - connect(m_conversionRate, SIGNAL(textChanged(const QString&)), this, SLOT(slotUpdateConversionRate(const QString&))); - connect(m_conversionRate, SIGNAL(valueChanged(const QString&)), this, SLOT(slotPriceWarning())); - connect(m_onlineQuote, SIGNAL(clicked()), this, SLOT(slotGetOnlineQuote())); + connect(m_typeSelection, TQT_SIGNAL(itemSelected(int)), this, TQT_SLOT(slotUpdateType(int))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); + connect(m_currencyComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotUpdateCurrency())); + connect(m_conversionRate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotUpdateConversionRate(const TQString&))); + connect(m_conversionRate, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(slotPriceWarning())); + connect(m_onlineQuote, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGetOnlineQuote())); } void AccountTypePage::slotUpdateType(int i) @@ -531,9 +531,9 @@ void AccountTypePage::slotUpdateCurrency(void) void AccountTypePage::slotGetOnlineQuote(void) { - QString id = MyMoneyFile::instance()->baseCurrency().id()+" "+m_currencyComboBox->security().id(); + TQString id = MyMoneyFile::instance()->baseCurrency().id()+" "+m_currencyComboBox->security().id(); KEquityPriceUpdateDlg dlg(this, id); - if(dlg.exec() == QDialog::Accepted) { + if(dlg.exec() == TQDialog::Accepted) { MyMoneyPrice price = dlg.price(id); if(price.isValid()) { m_conversionRate->setValue(price.rate(m_currencyComboBox->security().id())); @@ -557,7 +557,7 @@ void AccountTypePage::priceWarning(bool always) m_showPriceWarning = false; } -void AccountTypePage::slotUpdateConversionRate(const QString& txt) +void AccountTypePage::slotUpdateConversionRate(const TQString& txt) { m_conversionExample->setText(i18n("1 %1 equals %2"). arg(MyMoneyFile::instance()->baseCurrency().tradingSymbol()). @@ -566,7 +566,7 @@ void AccountTypePage::slotUpdateConversionRate(const QString& txt) void AccountTypePage::slotLoadWidgets(void) { - m_currencyComboBox->update(QString("x")); + m_currencyComboBox->update(TQString("x")); } bool AccountTypePage::isComplete(void) const @@ -574,13 +574,13 @@ bool AccountTypePage::isComplete(void) const // check that the conversion rate is positive if enabled bool rc = !m_conversionRate->isVisible() || (!m_conversionRate->value().isZero() && !m_conversionRate->value().isNegative()); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("Conversion rate is not positive")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Conversion rate is not positive")); } else { rc = KMyMoneyWizardPage::isComplete(); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("No account name supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No account name supplied")); } } hideShowPages(accountType()); @@ -604,7 +604,7 @@ void AccountTypePage::setAccount(const MyMoneyAccount& acc) m_accountName->setText(acc.name()); } -const MyMoneyAccount& AccountTypePage::parentAccount(void) +const MyMoneyAccount& AccountTypePage::tqparentAccount(void) { switch(accountType()) { case MyMoneyAccount::CreditCard: @@ -629,12 +629,12 @@ BrokeragePage::BrokeragePage(Wizard* wizard, const char* name) : KBrokeragePageDecl(wizard), WizardPage<Wizard>(StepBroker, this, wizard, name) { - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } void BrokeragePage::slotLoadWidgets(void) { - m_brokerageCurrency->update(QString("x")); + m_brokerageCurrency->update(TQString("x")); } void BrokeragePage::enterPage(void) @@ -666,18 +666,18 @@ CreditCardSchedulePage::CreditCardSchedulePage(Wizard* wizard, const char* name) m_mandatoryGroup->add(m_payee); m_mandatoryGroup->add(m_amount->lineedit()); m_mandatoryGroup->add(m_paymentAccount); - connect(m_paymentAccount, SIGNAL(itemSelected(const QString&)), object(), SIGNAL(completeStateChanged())); - connect(m_payee, SIGNAL(itemSelected(const QString&)), object(), SIGNAL(completeStateChanged())); - connect(m_date, SIGNAL(dateChanged(const QDate&)), object(), SIGNAL(completeStateChanged())); + connect(m_paymentAccount, TQT_SIGNAL(itemSelected(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_payee, TQT_SIGNAL(itemSelected(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_date, TQT_SIGNAL(dateChanged(const TQDate&)), object(), TQT_SIGNAL(completeStateChanged())); - connect(m_payee, SIGNAL(createItem(const QString&, QString&)), wizard, SIGNAL(createPayee(const QString&, QString&))); + connect(m_payee, TQT_SIGNAL(createItem(const TQString&, TQString&)), wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&))); m_reminderCheckBox->setChecked(true); - connect(m_reminderCheckBox, SIGNAL(toggled(bool)), object(), SIGNAL(completeStateChanged())); + connect(m_reminderCheckBox, TQT_SIGNAL(toggled(bool)), object(), TQT_SIGNAL(completeStateChanged())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); - m_method->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHEQUE); + m_method->insertItem(i18n("Write check"), MyMoneySchedule::STYPE_WRITECHETQUE); #if 0 m_method->insertItem(i18n("Direct debit"), MyMoneySchedule::STYPE_DIRECTDEBIT); m_method->insertItem(i18n("Bank transfer"), MyMoneySchedule::STYPE_BANKTRANSFER); @@ -694,13 +694,13 @@ CreditCardSchedulePage::CreditCardSchedulePage(Wizard* wizard, const char* name) void CreditCardSchedulePage::enterPage(void) { if(m_name->text().isEmpty()) - m_name->setText(i18n("CreditCard %1 monthly payment").arg(m_wizard->m_accountTypePage->m_accountName->text())); + m_name->setText(i18n("CreditCard %1 monthly payment").tqarg(m_wizard->m_accountTypePage->m_accountName->text())); } bool CreditCardSchedulePage::isComplete(void) const { bool rc = true; - QString msg = i18n("Finish entry and create account"); + TQString msg = i18n("Finish entry and create account"); if(m_reminderCheckBox->isChecked()) { msg = i18n("Finish entry and create account and schedule"); if(m_date->date() < m_wizard->m_accountTypePage->m_openingDate->date()) { @@ -724,7 +724,7 @@ bool CreditCardSchedulePage::isComplete(void) const msg = i18n("No name assigned for schedule"); } } - QToolTip::add(m_wizard->m_finishButton, msg); + TQToolTip::add(m_wizard->m_finishButton, msg); return rc; } @@ -760,15 +760,15 @@ GeneralLoanInfoPage::GeneralLoanInfoPage(Wizard* wizard, const char* name) : slotLoadWidgets(); - connect(m_payee, SIGNAL(createItem(const QString&, QString&)), wizard, SIGNAL(createPayee(const QString&, QString&))); - connect(m_anyPayments, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); - connect(m_recordings, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); + connect(m_payee, TQT_SIGNAL(createItem(const TQString&, TQString&)), wizard, TQT_SIGNAL(createPayee(const TQString&, TQString&))); + connect(m_anyPayments, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_recordings, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); - connect(m_interestType, SIGNAL(activated(int)), object(), SIGNAL(completeStateChanged())); - connect(m_interestChangeDateEdit, SIGNAL(dateChanged(const QDate&)), object(), SIGNAL(completeStateChanged())); - connect(m_openingBalance, SIGNAL(textChanged(const QString&)), object(), SIGNAL(completeStateChanged())); + connect(m_interestType, TQT_SIGNAL(activated(int)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_interestChangeDateEdit, TQT_SIGNAL(dateChanged(const TQDate&)), object(), TQT_SIGNAL(completeStateChanged())); + connect(m_openingBalance, TQT_SIGNAL(textChanged(const TQString&)), object(), TQT_SIGNAL(completeStateChanged())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } KMyMoneyWizardPage* GeneralLoanInfoPage::nextPage(void) const @@ -790,7 +790,7 @@ void GeneralLoanInfoPage::enterPage(void) { if(m_firstTime) { // setup default dates to last of this month and one year on top - QDate firstDay(QDate::currentDate().year(), QDate::currentDate().month(), 1); + TQDate firstDay(TQDate::tqcurrentDate().year(), TQDate::tqcurrentDate().month(), 1); m_firstPaymentDate->setDate(firstDay.addMonths(1).addDays(-1)); m_interestChangeDateEdit->setDate(m_firstPaymentDate->date().addYears(1));; m_firstTime = false; @@ -802,7 +802,7 @@ bool GeneralLoanInfoPage::isComplete(void) const m_wizard->setStepHidden(StepPayout, !m_wizard->openingBalance().isZero()); bool rc = KMyMoneyWizardPage::isComplete(); if(!rc) { - QToolTip::add(m_wizard->m_nextButton, i18n("No payee supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No payee supplied")); } // fixup availability of items on this page @@ -816,19 +816,19 @@ bool GeneralLoanInfoPage::isComplete(void) const if(m_openingBalance->isEnabled() && m_openingBalance->lineedit()->text().length() == 0) { rc = false; - QToolTip::add(m_wizard->m_nextButton, i18n("No opening balance supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("No opening balance supplied")); } if(rc && (m_interestType->currentItem() != 0) && (m_interestChangeDateEdit->date() <= m_firstPaymentDate->date())) { rc = false; - QToolTip::add(m_wizard->m_nextButton, i18n("An interest change can only happen after the first payment")); + TQToolTip::add(m_wizard->m_nextButton, i18n("An interest change can only happen after the first payment")); } return rc; } -const MyMoneyAccount& GeneralLoanInfoPage::parentAccount(void) +const MyMoneyAccount& GeneralLoanInfoPage::tqparentAccount(void) { return ( m_loanDirection->currentItem() == 0 ) ? MyMoneyFile::instance()->liability() @@ -850,16 +850,16 @@ LoanDetailsPage::LoanDetailsPage(Wizard* wizard, const char* name) : // allow any precision for the interest rate m_interestRate->setPrecision(-1); - connect(m_paymentDue, SIGNAL(activated(int)), this, SLOT(slotValuesChanged())); + connect(m_paymentDue, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValuesChanged())); - connect(m_termAmount, SIGNAL(valueChanged(int)), this, SLOT(slotValuesChanged())); - connect(m_termUnit, SIGNAL(highlighted(int)), this, SLOT(slotValuesChanged())); - connect(m_loanAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_interestRate, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_paymentAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); - connect(m_balloonAmount, SIGNAL(textChanged(const QString&)), this, SLOT(slotValuesChanged())); + connect(m_termAmount, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValuesChanged())); + connect(m_termUnit, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(slotValuesChanged())); + connect(m_loanAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_interestRate, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_paymentAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); + connect(m_balloonAmount, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValuesChanged())); - connect(m_calculateButton, SIGNAL(clicked()), this, SLOT(slotCalculate())); + connect(m_calculateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCalculate())); } void LoanDetailsPage::enterPage(void) @@ -903,7 +903,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyFinancialCalculator calc; long double val; int PF, CF; - QString result; + TQString result; bool moneyBorrowed = m_wizard->moneyBorrowed(); bool moneyLend = !moneyBorrowed; @@ -959,14 +959,14 @@ void LoanDetailsPage::slotCalculate(void) val = calc.presentValue(); m_loanAmount->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney("", m_wizard->precision())); result = i18n("KMyMoney has calculated the amount of the loan as %1.") - .arg(m_loanAmount->lineedit()->text()); + .tqarg(m_loanAmount->lineedit()->text()); } else if(m_interestRate->lineedit()->text().isEmpty()) { // calculate the interest rate out of the other information val = calc.interestRate(); m_interestRate->loadText(MyMoneyMoney(static_cast<double>(val)).abs().formatMoney("", 3)); result = i18n("KMyMoney has calculated the interest rate to %1%.") - .arg(m_interestRate->lineedit()->text()); + .tqarg(m_interestRate->lineedit()->text()); } else if(m_paymentAmount->lineedit()->text().isEmpty()) { // calculate the periodical amount of the payment out of the other information @@ -979,7 +979,7 @@ void LoanDetailsPage::slotCalculate(void) calc.setPmt(val); result = i18n("KMyMoney has calculated a periodic payment of %1 to cover principal and interest.") - .arg(m_paymentAmount->lineedit()->text()); + .tqarg(m_paymentAmount->lineedit()->text()); val = calc.futureValue(); if((moneyBorrowed && val < 0 && fabsl(val) >= fabsl(calc.payment())) @@ -989,9 +989,9 @@ void LoanDetailsPage::slotCalculate(void) val = calc.futureValue(); MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); - result += QString(" "); + result += TQString(" "); result += i18n("The number of payments has been decremented and the balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } else if((moneyBorrowed && val < 0 && fabsl(val) < fabsl(calc.payment())) || (moneyLend && val > 0 && fabs(val) < fabs(calc.payment()))) { m_balloonAmount->loadText(MyMoneyMoney(0,1).formatMoney("", m_wizard->precision())); @@ -999,7 +999,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); result += i18n("The balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } } else if(m_termAmount->value() == 0) { @@ -1011,7 +1011,7 @@ void LoanDetailsPage::slotCalculate(void) // if the number of payments has a fractional part, then we // round it to the smallest integer and calculate the balloon payment result = i18n("KMyMoney has calculated the term of your loan as %1. ") - .arg(updateTermWidgets(floorl(val))); + .tqarg(updateTermWidgets(floorl(val))); if(val != floorl(val)) { calc.setNpp(floorl(val)); @@ -1019,7 +1019,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); m_balloonAmount->loadText(refVal.abs().formatMoney("", m_wizard->precision())); result += i18n("The balloon payment has been modified to %1.") - .arg(m_balloonAmount->lineedit()->text()); + .tqarg(m_balloonAmount->lineedit()->text()); } } else { @@ -1050,7 +1050,7 @@ void LoanDetailsPage::slotCalculate(void) MyMoneyMoney refVal(static_cast<double>(val)); result = i18n("KMyMoney has calculated a balloon payment of %1 for this loan.") - .arg(refVal.abs().formatMoney("", m_wizard->precision())); + .tqarg(refVal.abs().formatMoney("", m_wizard->precision())); if(!m_balloonAmount->lineedit()->text().isEmpty()) { if((m_balloonAmount->value().abs() - refVal.abs()).abs().toDouble() > 1) { @@ -1111,11 +1111,11 @@ int LoanDetailsPage::term(void) const return factor; } -QString LoanDetailsPage::updateTermWidgets(const long double val) +TQString LoanDetailsPage::updateTermWidgets(const long double val) { long long vl = static_cast<long long>(floorl(val)); - QString valString; + TQString valString; MyMoneySchedule::occurenceE unit = m_termUnit->currentItem(); if((unit == MyMoneySchedule::OCCUR_MONTHLY) @@ -1147,7 +1147,7 @@ bool LoanDetailsPage::isComplete(void) const // bool rc = KMyMoneyWizardPage::isComplete(); int fieldCnt = 0; - QWidget* calculatedField = 0; + TQWidget* calculatedField = 0; if(m_loanAmount->lineedit()->text().length() > 0) { fieldCnt++; @@ -1187,11 +1187,11 @@ bool LoanDetailsPage::isComplete(void) const m_calculateButton->setAutoDefault(false); m_calculateButton->setDefault(false); if(m_needCalculate && fieldCnt == 4) { - QToolTip::add(m_wizard->m_nextButton, i18n("Press Calculate to verify the values")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Press Calculate to verify the values")); m_calculateButton->setAutoDefault(true); m_calculateButton->setDefault(true); } else if(fieldCnt != 5) { - QToolTip::add(m_wizard->m_nextButton, i18n("Not all details supplied")); + TQToolTip::add(m_wizard->m_nextButton, i18n("Not all details supplied")); m_calculateButton->setAutoDefault(true); m_calculateButton->setDefault(true); } @@ -1221,7 +1221,7 @@ LoanPaymentPage::LoanPaymentPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepFees, this, wizard, name), d(new Private) { - d->phonyAccount = MyMoneyAccount(QString("Phony-ID"), MyMoneyAccount()); + d->phonyAccount = MyMoneyAccount(TQString("Phony-ID"), MyMoneyAccount()); d->phonySplit.setAccountId(d->phonyAccount.id()); d->phonySplit.setValue(0); @@ -1229,7 +1229,7 @@ LoanPaymentPage::LoanPaymentPage(Wizard* wizard, const char* name) : d->additionalFeesTransaction.addSplit(d->phonySplit); - connect(m_additionalFeesButton, SIGNAL(clicked()), this, SLOT(slotAdditionalFees())); + connect(m_additionalFeesButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdditionalFees())); } LoanPaymentPage::~LoanPaymentPage() @@ -1247,11 +1247,11 @@ MyMoneyMoney LoanPaymentPage::additionalFees(void) const return d->additionalFees; } -void LoanPaymentPage::additionalFeesSplits(QValueList<MyMoneySplit>& list) +void LoanPaymentPage::additionalFeesSplits(TQValueList<MyMoneySplit>& list) { list.clear(); - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; for(it = d->additionalFeesTransaction.splits().begin(); it != d->additionalFeesTransaction.splits().end(); ++it) { if((*it).accountId() != d->phonyAccount.id()) { list << (*it); @@ -1278,15 +1278,15 @@ void LoanPaymentPage::enterPage(void) void LoanPaymentPage::slotAdditionalFees(void) { - QMap<QString, MyMoneyMoney> priceInfo; + TQMap<TQString, MyMoneyMoney> priceInfo; KSplitTransactionDlg* dlg = new KSplitTransactionDlg(d->additionalFeesTransaction, d->phonySplit, d->phonyAccount, false, !m_wizard->moneyBorrowed(), MyMoneyMoney(0), priceInfo); - // connect(dlg, SIGNAL(newCategory(MyMoneyAccount&)), this, SIGNAL(newCategory(MyMoneyAccount&))); + // connect(dlg, TQT_SIGNAL(newCategory(MyMoneyAccount&)), this, TQT_SIGNAL(newCategory(MyMoneyAccount&))); - if(dlg->exec() == QDialog::Accepted) { + if(dlg->exec() == TQDialog::Accepted) { d->additionalFeesTransaction = dlg->transaction(); // sum up the additional fees - QValueList<MyMoneySplit>::ConstIterator it; + TQValueList<MyMoneySplit>::ConstIterator it; d->additionalFees = MyMoneyMoney(0); for(it = d->additionalFeesTransaction.splits().begin(); it != d->additionalFeesTransaction.splits().end(); ++it) { @@ -1312,27 +1312,27 @@ LoanSchedulePage::LoanSchedulePage(Wizard* wizard, const char* name) : { m_mandatoryGroup->add(m_interestCategory->lineEdit()); m_mandatoryGroup->add(m_paymentAccount->lineEdit()); - connect(m_interestCategory, SIGNAL(createItem(const QString&, QString&)), this, SLOT(slotCreateCategory(const QString&, QString&))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(m_interestCategory, TQT_SIGNAL(createItem(const TQString&, TQString&)), this, TQT_SLOT(slotCreateCategory(const TQString&, TQString&))); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); } -void LoanSchedulePage::slotCreateCategory(const QString& name, QString& id) +void LoanSchedulePage::slotCreateCategory(const TQString& name, TQString& id) { - MyMoneyAccount acc, parent; + MyMoneyAccount acc, tqparent; acc.setName(name); if(m_wizard->moneyBorrowed()) - parent = MyMoneyFile::instance()->expense(); + tqparent = MyMoneyFile::instance()->expense(); else - parent = MyMoneyFile::instance()->income(); + tqparent = MyMoneyFile::instance()->income(); - emit m_wizard->createCategory(acc, parent); + emit m_wizard->createCategory(acc, tqparent); // return id id = acc.id(); } -QDate LoanSchedulePage::firstPaymentDueDate(void) const +TQDate LoanSchedulePage::firstPaymentDueDate(void) const { if(m_firstPaymentDueDate->isEnabled()) return m_firstPaymentDueDate->date(); @@ -1379,18 +1379,18 @@ LoanPayoutPage::LoanPayoutPage(Wizard* wizard, const char* name) : KIconLoader* il = KGlobal::iconLoader(); KGuiItem createAssetButtenItem( i18n( "&Create..." ), - QIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("filenew", KIcon::Small, KIcon::SizeSmall)), i18n("Create a new asset account"), i18n("If the asset account does not yet exist, press this button to create it.")); m_createAssetButton->setGuiItem(createAssetButtenItem); - QToolTip::add(m_createAssetButton, createAssetButtenItem.toolTip()); - QWhatsThis::add(m_createAssetButton, createAssetButtenItem.whatsThis()); - connect(m_createAssetButton, SIGNAL(clicked()), this, SLOT(slotCreateAssetAccount())); + TQToolTip::add(m_createAssetButton, createAssetButtenItem.toolTip()); + TQWhatsThis::add(m_createAssetButton, createAssetButtenItem.whatsThis()); + connect(m_createAssetButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreateAssetAccount())); - connect(m_noPayoutTransaction, SIGNAL(toggled(bool)), this, SLOT(slotButtonsToggled())); - connect(m_refinanceLoan, SIGNAL(toggled(bool)), this, SLOT(slotButtonsToggled())); + connect(m_noPayoutTransaction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsToggled())); + connect(m_refinanceLoan, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotButtonsToggled())); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadWidgets())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadWidgets())); slotLoadWidgets(); } @@ -1400,7 +1400,7 @@ void LoanPayoutPage::slotButtonsToggled(void) // not defined. Using a single shot timer postpones the call of m_mandatoryGroup::changed() // until the next round of the main loop so we can be sure to see all relevant changes // that happened in the meantime (eg. widgets are enabled and disabled) - QTimer::singleShot(0, m_mandatoryGroup, SLOT(changed())); + TQTimer::singleShot(0, m_mandatoryGroup, TQT_SLOT(changed())); } void LoanPayoutPage::slotCreateAssetAccount(void) @@ -1448,7 +1448,7 @@ bool LoanPayoutPage::isComplete(void) const return KMyMoneyWizardPage::isComplete() | m_noPayoutTransaction->isChecked(); } -const QString& LoanPayoutPage::payoutAccountId(void) const +const TQString& LoanPayoutPage::payoutAccountId(void) const { if(m_refinanceLoan->isChecked()) { return m_loanAccount->selectedItem(); @@ -1472,9 +1472,9 @@ HierarchyPage::HierarchyPage(Wizard* wizard, const char* name) : m_qlistviewParentAccounts->addColumn("Accounts"); m_qlistviewParentAccounts->setMultiSelection(false); m_qlistviewParentAccounts->header()->setResizeEnabled(true); - m_qlistviewParentAccounts->setColumnWidthMode(0, QListView::Maximum); + m_qlistviewParentAccounts->setColumnWidthMode(0, TQListView::Maximum); // never show the horizontal scroll bar - // m_qlistviewParentAccounts->setHScrollBarMode(QScrollView::AlwaysOff); + // m_qlistviewParentAccounts->setHScrollBarMode(TQScrollView::AlwaysOff); } void HierarchyPage::enterPage(void) @@ -1483,7 +1483,7 @@ void HierarchyPage::enterPage(void) // - if the type has changed // - - clear the list // - - populate the account list (also occurs first time we come here) - MyMoneyAccount topAccount = m_wizard->m_accountTypePage->parentAccount(); + MyMoneyAccount topAccount = m_wizard->m_accountTypePage->tqparentAccount(); // If the list was not populated with this top account we populate it now if ( &m_topAccount == NULL || m_topAccount.id() != topAccount.id()) @@ -1504,17 +1504,17 @@ void HierarchyPage::enterPage(void) } KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree - ( KMyMoneyAccountTreeBase* parent + ( KMyMoneyAccountTreeBase* tqparent , const MyMoneyAccount& account , bool open ) const { // Recursively add child accounts to the list if ( account.accountType() == MyMoneyAccount::Investment) return NULL; - KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( parent, account ); + KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( tqparent, account ); if ( open ) childItem->setOpen(true); - for ( QStringList::ConstIterator it = account.accountList().begin(); + for ( TQStringList::ConstIterator it = account.accountList().begin(); it != account.accountList().end(); ++it ) { @@ -1529,17 +1529,17 @@ KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree } KMyMoneyAccountTreeItem* HierarchyPage::buildAccountTree - ( KMyMoneyAccountTreeItem* parent + ( KMyMoneyAccountTreeItem* tqparent , const MyMoneyAccount& account , bool open ) const { // Recursively add child accounts to the list if ( account.accountType() == MyMoneyAccount::Investment) return NULL; - KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( parent, account ); + KMyMoneyAccountTreeItem* childItem = new KMyMoneyAccountTreeItem( tqparent, account ); if ( open ) childItem->setOpen(true); - for ( QStringList::ConstIterator it = account.accountList().begin(); + for ( TQStringList::ConstIterator it = account.accountList().begin(); it != account.accountList().end(); ++it ) { @@ -1558,7 +1558,7 @@ KMyMoneyWizardPage* HierarchyPage::nextPage(void) const return m_wizard->m_accountSummaryPage; } -const MyMoneyAccount& HierarchyPage::parentAccount(void) +const MyMoneyAccount& HierarchyPage::tqparentAccount(void) { // TODO // Instead of returning the Parent Account we can simply @@ -1573,8 +1573,8 @@ AccountSummaryPage::AccountSummaryPage(Wizard* wizard, const char* name) : WizardPage<Wizard>(StepFinish, this, wizard, name) { m_dataList->setSorting(-1); - m_dataList->setColumnWidthMode(1, QListView::Maximum); - m_dataList->setResizeMode(QListView::LastColumn); + m_dataList->setColumnWidthMode(1, TQListView::Maximum); + m_dataList->setResizeMode(TQListView::LastColumn); } void AccountSummaryPage::enterPage(void) @@ -1585,7 +1585,7 @@ void AccountSummaryPage::enterPage(void) // assign an id to the account inside the wizard which is required for a schedule // get the schedule and clear the id again in the wizards object. - MyMoneyAccount tmp(QString("Phony-ID"), acc); + MyMoneyAccount tmp(TQString("Phony-ID"), acc); m_wizard->setAccount(tmp); MyMoneySchedule sch = m_wizard->schedule(); m_wizard->setAccount(acc); @@ -1593,13 +1593,13 @@ void AccountSummaryPage::enterPage(void) m_dataList->clear(); // Account data - QListViewItem* group = new KMyMoneyCheckListItem(m_dataList, i18n("Account information"), QString(), QString(), QCheckListItem::RadioButtonController); + TQListViewItem* group = new KMyMoneyCheckListItem(m_dataList, i18n("Account information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); - QListViewItem* p; + TQListViewItem* p; p = new KListViewItem(group, i18n("Name"), acc.name()); if(!acc.isLoan()) p = new KListViewItem(group, p, i18n("Subaccount of"), - m_wizard->parentAccount().name()); + m_wizard->tqparentAccount().name()); if(acc.accountType() == MyMoneyAccount::AssetLoan) p = new KListViewItem(group, p, i18n("Type"), i18n("Loan")); else @@ -1607,7 +1607,7 @@ void AccountSummaryPage::enterPage(void) p = new KListViewItem(group, p, i18n("Currency"), m_wizard->currency().name()); p = new KListViewItem(group, p, i18n("Opening date"), KGlobal::locale()->formatDate(acc.openingDate())); if(m_wizard->currency().id() != MyMoneyFile::instance()->baseCurrency().id()) { - p = new KListViewItem(group, p, i18n("Conversion rate"), m_wizard->conversionRate().rate(QString()).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())); + p = new KListViewItem(group, p, i18n("Conversion rate"), m_wizard->conversionRate().rate(TQString()).formatMoney("", KMyMoneyGlobalSettings::pricePrecision())); } if(!acc.isLoan() || !m_wizard->openingBalance().isZero()) p = new KListViewItem(group, p, i18n("Opening balance"), m_wizard->openingBalance().formatMoney(acc, sec)); @@ -1624,9 +1624,9 @@ void AccountSummaryPage::enterPage(void) if(acc.accountType() == MyMoneyAccount::Investment) { if(m_wizard->m_brokeragepage->m_createBrokerageButton->isChecked()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Brokerage Account"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Brokerage Account"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); - p = new KListViewItem(group, p, i18n("Name"), QString("%1 (Brokerage)").arg(acc.name())); + p = new KListViewItem(group, p, i18n("Name"), TQString("%1 (Brokerage)").tqarg(acc.name())); p = new KListViewItem(group, p, i18n("Currency"), m_wizard->m_brokeragepage->m_brokerageCurrency->security().name()); if(m_wizard->m_brokeragepage->m_accountNumber->isEnabled() && !m_wizard->m_brokeragepage->m_accountNumber->text().isEmpty()) p = new KListViewItem(group, p, i18n("Number"), m_wizard->m_brokeragepage->m_accountNumber->text()); @@ -1637,14 +1637,14 @@ void AccountSummaryPage::enterPage(void) // Loan if(acc.isLoan()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Loan information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Loan information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); if(m_wizard->moneyBorrowed()) { p = new KListViewItem(group, p, i18n("Amount borrowed"), m_wizard->m_loanDetailsPage->m_loanAmount->value().formatMoney(m_wizard->currency().tradingSymbol(), m_wizard->precision())); } else { p = new KListViewItem(group, p, i18n("Amount lent"), m_wizard->m_loanDetailsPage->m_loanAmount->value().formatMoney(m_wizard->currency().tradingSymbol(), m_wizard->precision())); } - p = new KListViewItem(group, p, i18n("Interest rate"), QString("%1 %").arg(m_wizard->m_loanDetailsPage->m_interestRate->value().formatMoney("", -1))); + p = new KListViewItem(group, p, i18n("Interest rate"), TQString("%1 %").tqarg(m_wizard->m_loanDetailsPage->m_interestRate->value().formatMoney("", -1))); p = new KListViewItem(group, p, i18n("Interest rate is"), m_wizard->m_generalLoanInfoPage->m_interestType->currentText()); p = new KListViewItem(group, p, i18n("Principal and interest"), m_wizard->m_loanDetailsPage->m_paymentAmount->value().formatMoney(acc, sec)); p = new KListViewItem(group, p, i18n("Additional fees"), m_wizard->m_loanPaymentPage->additionalFees().formatMoney(acc, sec)); @@ -1652,7 +1652,7 @@ void AccountSummaryPage::enterPage(void) p = new KListViewItem(group, p, i18n("Payment account"), m_wizard->m_loanSchedulePage->m_paymentAccount->currentText()); if(!m_wizard->m_loanPayoutPage->m_noPayoutTransaction->isChecked() && m_wizard->openingBalance().isZero()) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Payout information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Payout information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); if(m_wizard->m_loanPayoutPage->m_refinanceLoan->isChecked()) { p = new KListViewItem(group, p, i18n("Refinance"), m_wizard->m_loanPayoutPage->m_loanAccount->currentText()); @@ -1668,7 +1668,7 @@ void AccountSummaryPage::enterPage(void) // Schedule if(!(sch == MyMoneySchedule())) { - group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Schedule information"), QString(), QString(), QCheckListItem::RadioButtonController); + group = new KMyMoneyCheckListItem(m_dataList, group, i18n("Schedule information"), TQString(), TQString(), TQCheckListItem::RadioButtonController); group->setOpen(true); p = new KListViewItem(group, i18n("Name"), sch.name()); if(acc.accountType() == MyMoneyAccount::CreditCard) { |