summaryrefslogtreecommitdiffstats
path: root/kmymoney2/dialogs/transactioneditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/dialogs/transactioneditor.cpp')
-rw-r--r--kmymoney2/dialogs/transactioneditor.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/kmymoney2/dialogs/transactioneditor.cpp b/kmymoney2/dialogs/transactioneditor.cpp
index 63ff168..cdc111a 100644
--- a/kmymoney2/dialogs/transactioneditor.cpp
+++ b/kmymoney2/dialogs/transactioneditor.cpp
@@ -220,7 +220,7 @@ void TransactionEditor::slotNumberChanged(const TQString& txt)
if(number) {
if(MyMoneyFile::instance()->checkNoUsed(m_account.id(), txt)) {
- if(KMessageBox::questionYesNo(m_regForm, TQString("<qt>")+i18n("The number <b>%1</b> has already been used in account <b>%2</b>. Do you want to replace it with the next available number?").tqarg(txt).tqarg(m_account.name())+TQString("</qt>"), i18n("Duplicate number")) == KMessageBox::Yes) {
+ if(KMessageBox::questionYesNo(m_regForm, TQString("<qt>")+i18n("The number <b>%1</b> has already been used in account <b>%2</b>. Do you want to replace it with the next available number?").arg(txt).arg(m_account.name())+TQString("</qt>"), i18n("Duplicate number")) == KMessageBox::Yes) {
number->loadText(KMyMoneyUtils::nextCheckNumber(m_account));
}
}
@@ -302,11 +302,11 @@ int TransactionEditor::slotEditSplits(void)
acc = MyMoneyAccount();
}
TQString msg;
- msg = TQString("<p>")+i18n("This transaction has more than two splits and is based on a different currency (%1). Using this account to modify the transaction is currently not very well supported by KMyMoney and may result in false results.").tqarg(sec.name())+TQString(" ");
+ msg = TQString("<p>")+i18n("This transaction has more than two splits and is based on a different currency (%1). Using this account to modify the transaction is currently not very well supported by KMyMoney and may result in false results.").arg(sec.name())+TQString(" ");
if(acc.id().isEmpty()) {
msg += i18n("KMyMoney was not able to find a more appropriate account to edit this transaction. Nevertheless, you are allowed to modify the transaction. If you don't want to edit this transaction, please cancel from editing next.");
} else {
- msg += i18n("Using e.g. <b>%1</b> to edit this transaction is a better choice. Nevertheless, you are allowed to modify the transaction. If you want to use the suggested account instead, please cancel from editing next and change the view to the suggested account.").tqarg(acc.name());
+ msg += i18n("Using e.g. <b>%1</b> to edit this transaction is a better choice. Nevertheless, you are allowed to modify the transaction. If you want to use the suggested account instead, please cancel from editing next and change the view to the suggested account.").arg(acc.name());
}
KMessageBox::information(0, msg);
}
@@ -409,12 +409,12 @@ bool TransactionEditor::fixTransactionCommodity(const MyMoneyAccount& account)
if(firstTimeMultiCurrency) {
firstTimeMultiCurrency = false;
if(!isMultiSelection()) {
- msg = i18n("This transaction has more than two splits and is originally based on a different currency (%1). Using this account to modify the transaction may result in rounding errors. Do you want to continue?").tqarg(osec.name());
+ msg = i18n("This transaction has more than two splits and is originally based on a different currency (%1). Using this account to modify the transaction may result in rounding errors. Do you want to continue?").arg(osec.name());
} else {
- msg = i18n("At least one of the selected transactions has more than two splits and is originally based on a different currency (%1). Using this account to modify the transactions may result in rounding errors. Do you want to continue?").tqarg(osec.name());
+ msg = i18n("At least one of the selected transactions has more than two splits and is originally based on a different currency (%1). Using this account to modify the transactions may result in rounding errors. Do you want to continue?").arg(osec.name());
}
- if(KMessageBox::warningContinueCancel(0, TQString("<qt>%1</qt>").tqarg(msg)) == KMessageBox::Cancel) {
+ if(KMessageBox::warningContinueCancel(0, TQString("<qt>%1</qt>").arg(msg)) == KMessageBox::Cancel) {
rc = false;
}
}
@@ -599,7 +599,7 @@ bool TransactionEditor::enterTransactions(TQString& newId, bool askForSchedule,
if((*it_ts).id().isEmpty()) {
bool enter = true;
- if(askForSchedule && (*it_ts).postDate() > TQDate::tqcurrentDate()) {
+ if(askForSchedule && (*it_ts).postDate() > TQDate::currentDate()) {
KGuiItem enterItem;
KIconLoader* il = KGlobal::iconLoader();
KGuiItem enterButton( i18n("&Enter" ),
@@ -611,7 +611,7 @@ bool TransactionEditor::enterTransactions(TQString& newId, bool askForSchedule,
i18n("Accepts the entered data and stores it as schedule"),
i18n("Use this to schedule the transaction for later entry into the ledger."));
- enter = KMessageBox::questionYesNo(m_regForm, TQString("<qt>%1</qt>").tqarg(i18n("The transaction you are about to enter has a post date in the future.<br/><br/>Do you want to enter it in the ledger or add it to the schedules?")), i18n("Dialog caption for 'Enter or schedule' dialog", "Enter or schedule?"), enterButton, scheduleButton, "EnterOrScheduleTransactionInFuture") == KMessageBox::Yes;
+ enter = KMessageBox::questionYesNo(m_regForm, TQString("<qt>%1</qt>").arg(i18n("The transaction you are about to enter has a post date in the future.<br/><br/>Do you want to enter it in the ledger or add it to the schedules?")), i18n("Dialog caption for 'Enter or schedule' dialog", "Enter or schedule?"), enterButton, scheduleButton, "EnterOrScheduleTransactionInFuture") == KMessageBox::Yes;
}
if(enter) {
// add new transaction
@@ -679,25 +679,25 @@ bool TransactionEditor::enterTransactions(TQString& newId, bool askForSchedule,
key = "minBalanceEarly";
if(!acc.value(key).isEmpty()) {
if(minBalanceEarly[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) {
- msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the warning balance of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
+ msg = TQString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the warning balance of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
}
}
key = "minBalanceAbsolute";
if(!acc.value(key).isEmpty()) {
if(minBalanceAbsolute[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) {
- msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the minimum balance of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
+ msg = TQString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the minimum balance of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
}
}
key = "maxCreditEarly";
if(!acc.value(key).isEmpty()) {
if(maxCreditEarly[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) {
- msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the maximum credit warning limit of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
+ msg = TQString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the maximum credit warning limit of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
}
}
key = "maxCreditAbsolute";
if(!acc.value(key).isEmpty()) {
if(maxCreditAbsolute[acc.id()] == false && balance < MyMoneyMoney(acc.value(key))) {
- msg = TQString("<qt>%1</qt>").tqarg(i18n("The balance of account <b>%1</b> dropped below the maximum credit limit of %2.").tqarg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
+ msg = TQString("<qt>%1</qt>").arg(i18n("The balance of account <b>%1</b> dropped below the maximum credit limit of %2.").arg(acc.name(), MyMoneyMoney(acc.value(key)).formatMoney(acc, sec)));
}
}
@@ -859,7 +859,7 @@ void StdTransactionEditor::createEditWidgets(void)
TQLabel* label;
m_editWidgets["category-label"] = label = new TQLabel(i18n("Category"), 0);
- label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip);
+ label->setAlignment(TQt::AlignVCenter | TQt::DontClip);
// create a copy of tabbar above the form (if we are created for a form)
KMyMoneyTransactionForm::TransactionForm* form = dynamic_cast<KMyMoneyTransactionForm::TransactionForm*>(m_regForm);
@@ -872,11 +872,11 @@ void StdTransactionEditor::createEditWidgets(void)
}
label = new TQLabel(i18n("Date"), 0);
- label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip);
+ label->setAlignment(TQt::AlignVCenter | TQt::DontClip);
m_editWidgets["date-label"] = label;
label = new TQLabel(i18n("Number"), 0);
- label->tqsetAlignment(TQt::AlignVCenter | TQt::DontClip);
+ label->setAlignment(TQt::AlignVCenter | TQt::DontClip);
m_editWidgets["number-label"] = label;
setupPrecision();
@@ -966,7 +966,7 @@ void StdTransactionEditor::loadEditWidgets(KMyMoneyRegister::Action action)
else if(m_lastPostDate.isValid())
dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(m_lastPostDate);
else
- dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(TQDate::tqcurrentDate());
+ dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"])->setDate(TQDate::currentDate());
if((w = haveWidget("number")) != 0) {
dynamic_cast<kMyMoneyLineEdit*>(w)->loadText(m_split.number());
@@ -1195,7 +1195,7 @@ void StdTransactionEditor::slotUpdatePayee(const TQString& payeeId)
// check if date has been altered by user
kMyMoneyDateInput* postDate = dynamic_cast<kMyMoneyDateInput*>(m_editWidgets["postdate"]);
if((m_lastPostDate.isValid() && (postDate->date() != m_lastPostDate))
- || (!m_lastPostDate.isValid() && (postDate->date() != TQDate::tqcurrentDate())))
+ || (!m_lastPostDate.isValid() && (postDate->date() != TQDate::currentDate())))
return;
#endif
@@ -1240,7 +1240,7 @@ void StdTransactionEditor::autoFill(const TQString& payeeId)
int cnt = 0;
TQMap<TQString, struct uniqTransaction>::iterator it_u;
do {
- TQString ukey = TQString("%1-%2").tqarg(key).tqarg(cnt);
+ TQString ukey = TQString("%1-%2").arg(key).arg(cnt);
it_u = uniqList.find(ukey);
if(it_u == uniqList.end()) {
uniqList[ukey].t = &((*it_t).first);
@@ -1615,7 +1615,7 @@ void StdTransactionEditor::updateVAT(bool amountChanged)
// if we made this a split transaction, then move the
// focus to the memo field
- if(tqApp->tqfocusWidget() == haveWidget("category")) {
+ if(tqApp->focusWidget() == haveWidget("category")) {
TQWidget* w = haveWidget("memo");
if(w)
w->setFocus();
@@ -2029,7 +2029,7 @@ bool StdTransactionEditor::createTransaction(MyMoneyTransaction& t, const MyMone
s0.setReconcileFlag(status->state());
if(s0.reconcileFlag() == MyMoneySplit::Reconciled && !s0.reconcileDate().isValid())
- s0.setReconcileDate(TQDate::tqcurrentDate());
+ s0.setReconcileDate(TQDate::currentDate());
checkPayeeInSplit(s0, payeeId);