diff options
Diffstat (limited to 'kmymoney2/widgets/stdtransactionmatched.cpp')
-rw-r--r-- | kmymoney2/widgets/stdtransactionmatched.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kmymoney2/widgets/stdtransactionmatched.cpp b/kmymoney2/widgets/stdtransactionmatched.cpp index 9bc191b..b24ed88 100644 --- a/kmymoney2/widgets/stdtransactionmatched.cpp +++ b/kmymoney2/widgets/stdtransactionmatched.cpp @@ -18,7 +18,7 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qregion.h> +#include <tqregion.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -36,24 +36,24 @@ using namespace KMyMoneyRegister; using namespace KMyMoneyTransactionForm; -StdTransactionMatched::StdTransactionMatched(Register *parent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : - StdTransaction(parent, transaction, split, uniqueId), - m_drawCounter(parent->drawCounter()-1) +StdTransactionMatched::StdTransactionMatched(Register *tqparent, const MyMoneyTransaction& transaction, const MyMoneySplit& split, int uniqueId) : + StdTransaction(tqparent, transaction, split, uniqueId), + m_drawCounter(tqparent->drawCounter()-1) { // setup initial size setNumRowsRegister(numRowsRegister(KMyMoneyGlobalSettings::showRegisterDetailed())); } -bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row, int& col, QRect& cellRect, QRect& textRect, QColorGroup& cg, QBrush& brush) +bool StdTransactionMatched::paintRegisterCellSetup(TQPainter* painter, int& row, int& col, TQRect& cellRect, TQRect& textRect, TQColorGroup& cg, TQBrush& brush) { - QRect r(cellRect); + TQRect r(cellRect); bool rc = Transaction::paintRegisterCellSetup(painter, row, col, cellRect, textRect, cg, brush); // if not selected paint in matched background color if(!isSelected()) { - cg.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor()); - brush = QBrush(cg.base()); + cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::matchedTransactionColor()); + brush = TQBrush(cg.base()); } // the first line needs to be painted across all columns @@ -85,7 +85,7 @@ bool StdTransactionMatched::paintRegisterCellSetup(QPainter* painter, int& row, return rc; } -void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, int col, QPainter* painter) +void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row, int col, TQPainter* painter) { // run through the standard StdTransaction::registerCellText(txt, align, row, col, painter); @@ -100,7 +100,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, // and we draw this information in italics if(painter) { - QFont font = painter->font(); + TQFont font = painter->font(); font.setItalic(true); painter->setFont(font); } @@ -113,8 +113,8 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, delete e; } - QValueList<MyMoneySplit>::const_iterator it_s; - const QValueList<MyMoneySplit>& list = matchedTransaction.splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; + const TQValueList<MyMoneySplit>& list = matchedTransaction.splits(); MyMoneyMoney importedValue; for(it_s = list.begin(); it_s != list.end(); ++it_s) { if((*it_s).accountId() == m_account.id()) { @@ -122,36 +122,36 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, } } - QDate postDate; - QString memo; + TQDate postDate; + TQString memo; switch(row) { case 0: if(painter) - txt = QString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)"); + txt = TQString(" ")+i18n("KMyMoney has matched a downloaded transaction with a manually entered one (result above)"); // return true for the first visible column only break; case 1: switch(col) { case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Bank entry:"); break; case DetailColumn: - align |= Qt::AlignLeft; - txt = QString("%1 %2").arg(matchedTransaction.postDate().toString(Qt::ISODate)).arg(matchedTransaction.memo()); + align |= TQt::AlignLeft; + txt = TQString("%1 %2").tqarg(matchedTransaction.postDate().toString(Qt::ISODate)).tqarg(matchedTransaction.memo()); break; case PaymentColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(importedValue.isNegative()) { txt = (-importedValue).formatMoney(m_account.fraction()); } break; case DepositColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(!importedValue.isNegative()) { txt = importedValue.formatMoney(m_account.fraction()); } @@ -162,37 +162,37 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, case 2: switch(col) { case DateColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; txt = i18n("Your entry:"); break; case DetailColumn: - align |= Qt::AlignLeft; + align |= TQt::AlignLeft; postDate = m_transaction.postDate(); if(!m_split.value("kmm-orig-postdate").isEmpty()) { - postDate = QDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate); + postDate = TQDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate); } memo = m_split.memo(); if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) { - int pos = memo.findRev(matchedSplit.memo()); + int pos = memo.tqfindRev(matchedSplit.memo()); if(pos != -1) { memo = memo.left(pos); if(memo.endsWith("\n")) memo = memo.left(pos-1); } } - txt = QString("%1 %2").arg(postDate.toString(Qt::ISODate)).arg(memo); + txt = TQString("%1 %2").tqarg(postDate.toString(Qt::ISODate)).tqarg(memo); break; case PaymentColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(m_split.value().isNegative()) { txt = (-m_split.value(m_transaction.commodity(), m_splitCurrencyId)).formatMoney(m_account.fraction()); } break; case DepositColumn: - align |= Qt::AlignRight; + align |= TQt::AlignRight; if(!m_split.value().isNegative()) { txt = m_split.value(m_transaction.commodity(), m_splitCurrencyId).formatMoney(m_account.fraction()); } @@ -204,7 +204,7 @@ void StdTransactionMatched::registerCellText(QString& txt, int& align, int row, } } -void StdTransactionMatched::paintRegisterGrid(QPainter* painter, int row, int col, const QRect& r, const QColorGroup& _cg) const +void StdTransactionMatched::paintRegisterGrid(TQPainter* painter, int row, int col, const TQRect& r, const TQColorGroup& _cg) const { // the last 3 rows should not show a grid if(row < m_rowsRegister - m_additionalRows) { |