summaryrefslogtreecommitdiffstats
path: root/kmymoney2/widgets/transaction.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:31:01 -0600
commit252fce5a2a5384702fbcc1c9987284d7bd2e6943 (patch)
treed5768ff1e9065f29bec60c94d31880b38b4e82f2 /kmymoney2/widgets/transaction.cpp
parent69ef6c4beaa37474a2170d0bfe842de647f53102 (diff)
downloadkmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.tar.gz
kmymoney-252fce5a2a5384702fbcc1c9987284d7bd2e6943.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmymoney2/widgets/transaction.cpp')
-rw-r--r--kmymoney2/widgets/transaction.cpp104
1 files changed, 52 insertions, 52 deletions
diff --git a/kmymoney2/widgets/transaction.cpp b/kmymoney2/widgets/transaction.cpp
index 5811a8c..b4ac7cd 100644
--- a/kmymoney2/widgets/transaction.cpp
+++ b/kmymoney2/widgets/transaction.cpp
@@ -243,7 +243,7 @@ void Transaction::markAsErronous(TQPainter* painter, int /* row */, int /* col *
bool Transaction::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush)
{
if(m_reducedIntensity)
- cg = m_parent->tqpalette().disabled();
+ cg = m_parent->palette().disabled();
if(m_alternate)
cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor());
@@ -508,7 +508,7 @@ int Transaction::formRowHeight(void) const
kMyMoneyDateInput dateInput;
KMyMoneyCategory category(0,0,true);
- return TQMAX(dateInput.tqsizeHint().height(), category.tqsizeHint().height());
+ return TQMAX(dateInput.sizeHint().height(), category.sizeHint().height());
}
return m_formRowHeight;
}
@@ -598,7 +598,7 @@ void Transaction::setupRegisterPalette(TQMap<TQString, TQWidget*>& editWidgets)
setupPalette(palette, editWidgets);
}
-TQWidget* Transaction::tqfocusWidget(TQWidget* w) const
+TQWidget* Transaction::focusWidget(TQWidget* w) const
{
if(w) {
while(w->focusProxy())
@@ -664,10 +664,10 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS
// qDebug("p is in r = %d", r.contains(cpos));
if(r.contains(cpos) && m_erronous) {
if(m_transaction.splits().count() < 2) {
- msg = TQString("<qt>%1</qt>").tqarg(i18n("Transaction is missing a category assignment."));
+ msg = TQString("<qt>%1</qt>").arg(i18n("Transaction is missing a category assignment."));
} else {
const MyMoneySecurity& sec = MyMoneyFile::instance()->security(m_account.currencyId());
- msg = TQString("<qt>%1</qt>").tqarg(i18n("The transaction has a missing assignment of <b>%1</b>.").tqarg(m_transaction.splitSum().abs().formatMoney(m_account, sec)));
+ msg = TQString("<qt>%1</qt>").arg(i18n("The transaction has a missing assignment of <b>%1</b>.").arg(m_transaction.splitSum().abs().formatMoney(m_account, sec)));
}
return true;
}
@@ -690,9 +690,9 @@ bool Transaction::maybeTip(const TQPoint& cpos, int row, int col, TQRect& r, TQS
TQString category = file->accountToCategory(acc.id());
TQString amount = ((*it_s).value() * factor).formatMoney(acc, sec);
- txt += TQString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").tqarg(category, amount);
+ txt += TQString("<tr><td><nobr>%1</nobr></td><td align=right><nobr>%2</nobr></td></tr>").arg(category, amount);
}
- msg = TQString("<table>%1</table>").tqarg(txt);
+ msg = TQString("<table>%1</table>").arg(txt);
return true;
}
@@ -880,7 +880,7 @@ StdTransaction::StdTransaction(Register *parent, const MyMoneyTransaction& trans
addon = i18n("Yield");
}
if(!addon.isEmpty()) {
- m_payee += TQString(" (%1)").tqarg(addon);
+ m_payee += TQString(" (%1)").arg(addon);
}
m_payeeHeader = i18n("Activity");
m_category = i18n("Investment transaction");
@@ -1253,34 +1253,34 @@ void StdTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const
TQWidget* w;
while(it_s != taborder.constEnd()) {
if(*it_s == "account") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1)));
} else if(*it_s == "cashflow") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, LabelColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, LabelColumn1)));
} else if(*it_s == "payee") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1)));
} else if(*it_s == "category") {
// make sure to have the category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_form->cellWidget(2, ValueColumn1);
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
} else if(*it_s == "memo") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn1)));
} else if(*it_s == "number") {
if(haveNumberField()) {
- if((w = tqfocusWidget(m_form->cellWidget(1, ValueColumn2))))
+ if((w = focusWidget(m_form->cellWidget(1, ValueColumn2))))
tabOrderWidgets.append(w);
}
} else if(*it_s == "date") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2)));
} else if(*it_s == "amount") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2)));
} else if(*it_s == "state") {
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2)));
}
++it_s;
}
@@ -1315,31 +1315,31 @@ void StdTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const
while(it_s != taborder.constEnd()) {
if(*it_s == "number") {
if(haveNumberField()) {
- if((w = tqfocusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn))))
+ if((w = focusWidget(m_parent->cellWidget(m_startRow + 0, NumberColumn))))
tabOrderWidgets.append(w);
}
} else if(*it_s == "date") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
} else if(*it_s == "payee") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
} else if(*it_s == "category") {
// make sure to have the category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_parent->cellWidget(m_startRow + 1, DetailColumn);
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
} else if(*it_s == "memo") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, DetailColumn)));
} else if(*it_s == "payment") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PaymentColumn)));
} else if(*it_s == "deposit") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DepositColumn)));
} else if(*it_s == "state") {
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
}
++it_s;
}
@@ -1533,7 +1533,7 @@ bool InvestTransaction::formCellText(TQString& txt, int& align, int row, int col
if((fieldEditable = haveShares()) == true) {
txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction()));
} else if(haveSplitRatio()) {
- txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1));
+ txt = TQString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1));
}
break;
}
@@ -1712,7 +1712,7 @@ void InvestTransaction::registerCellText(TQString& txt, int& align, int row, int
if(haveShares())
txt = m_split.shares().abs().formatMoney("", MyMoneyMoney::denomToPrec(m_security.smallestAccountFraction()));
else if(haveSplitRatio()) {
- txt = TQString("1 / %1").tqarg(m_split.shares().abs().formatMoney("", -1));
+ txt = TQString("1 / %1").arg(m_split.shares().abs().formatMoney("", -1));
}
break;
@@ -1929,54 +1929,54 @@ void InvestTransaction::arrangeWidgetsInForm(TQMap<TQString, TQWidget*>& editWid
void InvestTransaction::tabOrderInForm(TQWidgetList& tabOrderWidgets) const
{
// activity
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn1)));
// date
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(0, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(0, ValueColumn2)));
// security
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn1)));
// shares
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(1, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(1, ValueColumn2)));
// account
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn1)));
// price
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(2, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(2, ValueColumn2)));
// make sure to have the fee category field and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
TQWidget* w = m_form->cellWidget(3, ValueColumn1);
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// fee amount
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(3, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(3, ValueColumn2)));
// the same applies for the interest categories
w = m_form->cellWidget(4, ValueColumn1);
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// interest amount
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(4, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(4, ValueColumn2)));
// memo
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn1)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn1)));
// total
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(5, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(5, ValueColumn2)));
// state
- tabOrderWidgets.append(tqfocusWidget(m_form->cellWidget(6, ValueColumn2)));
+ tabOrderWidgets.append(focusWidget(m_form->cellWidget(6, ValueColumn2)));
}
void InvestTransaction::arrangeWidgetsInRegister(TQMap<TQString, TQWidget*>& editWidgets)
@@ -2009,45 +2009,45 @@ void InvestTransaction::tabOrderInRegister(TQWidgetList& tabOrderWidgets) const
TQWidget* w;
// date
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DateColumn)));
// security
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, SecurityColumn)));
// activity
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, DetailColumn)));
// shares
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, QuantityColumn)));
// price
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 0, PriceColumn)));
// asset account
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DetailColumn)));
// make sure to have the category fields and the split button as seperate tab order widgets
// ok, we have to have some internal knowledge about the KMyMoneyCategory object, but
// it's one of our own widgets, so we actually don't care. Just make sure, that we don't
// go haywire when someone changes the KMyMoneyCategory object ...
w = m_parent->cellWidget(m_startRow + 2, DetailColumn); // interest account
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// interest amount
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 2, QuantityColumn)));
w = m_parent->cellWidget(m_startRow + 3, DetailColumn); // fee account
- tabOrderWidgets.append(tqfocusWidget(w));
+ tabOrderWidgets.append(focusWidget(w));
w = dynamic_cast<TQWidget*>(w->child("splitButton"));
if(w)
tabOrderWidgets.append(w);
// fee amount
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 3, QuantityColumn)));
// memo
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 4, DetailColumn)));
// status
- tabOrderWidgets.append(tqfocusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
+ tabOrderWidgets.append(focusWidget(m_parent->cellWidget(m_startRow + 1, DateColumn)));
}
int InvestTransaction::numRowsRegister(bool expanded) const