diff options
Diffstat (limited to 'kmymoney2/dialogs/kreconciledlg.cpp')
-rw-r--r-- | kmymoney2/dialogs/kreconciledlg.cpp | 100 |
1 files changed, 48 insertions, 52 deletions
diff --git a/kmymoney2/dialogs/kreconciledlg.cpp b/kmymoney2/dialogs/kreconciledlg.cpp index 75e7b48..f7911b2 100644 --- a/kmymoney2/dialogs/kreconciledlg.cpp +++ b/kmymoney2/dialogs/kreconciledlg.cpp @@ -17,24 +17,20 @@ #include <kmessagebox.h> #include <kglobal.h> #include <klocale.h> -#if QT_VERSION > 300 #include <kstandarddirs.h> -#else -#include <kstddirs.h> -#endif #include "kreconciledlg.h" KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, - const QDate /* endingDate */, MyMoneyAccount* /*accountIndex */, - const MyMoneyFile* /* file */, QWidget *parent, const char *name) - : KReconcileDlgDecl(parent,name,true) + const TQDate /* endingDate */, MyMoneyAccount* /*accountIndex */, + const MyMoneyFile* /* file */, TQWidget *tqparent, const char *name) + : KReconcileDlgDecl(tqparent,name,true) { /* m_balanced = false; - m_debitsQList.setAutoDelete(false); - m_creditsQList.setAutoDelete(false); + m_debitsTQList.setAutoDelete(false); + m_creditsTQList.setAutoDelete(false); m_reconciledTransactions.setAutoDelete(false); m_file = file; @@ -47,11 +43,11 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney m_endingDate = endingDate; - totalCreditsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - totalDebitsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - previousLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - endingLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - differenceLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + totalCreditsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + totalDebitsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + previousLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + endingLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + differenceLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); debitListView->setRootIsDecorated(false); @@ -63,7 +59,7 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney debitListView->setMultiSelection(true); debitListView->setAllColumnsShowFocus(true); // never show a horizontal scroll bar - debitListView->setHScrollBarMode(QScrollView::AlwaysOff); + debitListView->setHScrollBarMode(TQScrollView::AlwaysOff); creditListView->setRootIsDecorated(false); creditListView->addColumn(i18n("Date")); @@ -74,7 +70,7 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney creditListView->setMultiSelection(true); creditListView->setAllColumnsShowFocus(true); // never show a horizontal scroll bar - creditListView->setHScrollBarMode(QScrollView::AlwaysOff); + creditListView->setHScrollBarMode(TQScrollView::AlwaysOff); endingLabel->setText(KGlobal::locale()->formatMoney(m_clearedBalance.amount(),"")); @@ -90,11 +86,11 @@ KReconcileDlg::KReconcileDlg(const MyMoneyMoney /* previousBal */, const MyMoney loadLists(); insertTransactions(); - connect(debitListView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotDebitSelected(QListViewItem*, const QPoint&, int))); - connect(creditListView, SIGNAL(clicked(QListViewItem*, const QPoint&, int)), this, SLOT(slotCreditSelected(QListViewItem*, const QPoint&, int))); - connect(buttonCancel, SIGNAL(clicked()), this, SLOT(cancelClicked())); - connect(buttonOk, SIGNAL(clicked()), this, SLOT(finishClicked())); - connect(buttonEdit, SIGNAL(clicked()), this, SLOT(editClicked())); + connect(debitListView, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotDebitSelected(TQListViewItem*, const TQPoint&, int))); + connect(creditListView, TQT_SIGNAL(clicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotCreditSelected(TQListViewItem*, const TQPoint&, int))); + connect(buttonCancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(cancelClicked())); + connect(buttonOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(finishClicked())); + connect(buttonEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editClicked())); doDifference(); */ @@ -108,14 +104,14 @@ void KReconcileDlg::clearReconcile() { /* MyMoneyTransaction *temp_transaction; - for(temp_transaction = m_creditsQList.first();temp_transaction;temp_transaction = m_creditsQList.next()) + for(temp_transaction = m_creditsTQList.first();temp_transaction;temp_transaction = m_creditsTQList.next()) { if(temp_transaction->state() == MyMoneyTransaction::Reconciled) { temp_transaction->setState(MyMoneyTransaction::Unreconciled); } } - for(temp_transaction = m_debitsQList.first();temp_transaction;temp_transaction = m_debitsQList.next()) + for(temp_transaction = m_debitsTQList.first();temp_transaction;temp_transaction = m_debitsTQList.next()) { if(temp_transaction->state() == MyMoneyTransaction::Reconciled) { @@ -129,8 +125,8 @@ void KReconcileDlg::loadLists(void) { /* // Load the internal transaaction lists - m_creditsQList.clear(); - m_debitsQList.clear(); + m_creditsTQList.clear(); + m_debitsTQList.clear(); unsigned int i=0; MyMoneyTransaction *transaction; @@ -141,11 +137,11 @@ void KReconcileDlg::loadLists(void) if (transaction->state()!=MyMoneyTransaction::Reconciled) { if (transaction->type() == MyMoneyTransaction::Debit) { transaction->setIndex(i); - m_debitsQList.append(transaction); + m_debitsTQList.append(transaction); } else { transaction->setIndex(i); - m_creditsQList.append(transaction); + m_creditsTQList.append(transaction); } } } @@ -159,12 +155,12 @@ void KReconcileDlg::insertTransactions(void) creditListView->clear(); debitListView->clear(); - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { (void) new KReconcileListItem(debitListView, it.current()); } - QListIterator<MyMoneyTransaction> it2(m_creditsQList); + TQListIterator<MyMoneyTransaction> it2(m_creditsTQList); for ( ; it2.current(); ++it2) { (void) new KReconcileListItem(creditListView, it2.current()); } @@ -173,7 +169,7 @@ void KReconcileDlg::insertTransactions(void) */ } -void KReconcileDlg::slotDebitSelected(QListViewItem* /* item */, const QPoint&/*p*/, int/* col*/) +void KReconcileDlg::slotDebitSelected(TQListViewItem* /* item */, const TQPoint&/*p*/, int/* col*/) { /* KReconcileListItem *reconcileItem = (KReconcileListItem*)item; @@ -210,7 +206,7 @@ void KReconcileDlg::slotDebitSelected(QListViewItem* /* item */, const QPoint&/* */ } -void KReconcileDlg::slotCreditSelected(QListViewItem* /* item */, const QPoint&, int) +void KReconcileDlg::slotCreditSelected(TQListViewItem* /* item */, const TQPoint&, int) { /* KReconcileListItem *reconcileItem = (KReconcileListItem*)item; @@ -279,8 +275,8 @@ void KReconcileDlg::updateData(void) // Simply reload the list clearing the status. qDebug("In updateData"); m_reconciledTransactions.clear(); - m_debitsQList.clear(); - m_creditsQList.clear(); + m_debitsTQList.clear(); + m_creditsTQList.clear(); loadLists(); insertTransactions(); @@ -297,12 +293,12 @@ void KReconcileDlg::cancelClicked() */ } -void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, const QDate /* endingDate */, MyMoneyAccount* /* accountIndex */, const MyMoneyFile* /* file */) +void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMoneyMoney /* endingBal */, const TQDate /* endingDate */, MyMoneyAccount* /* accountIndex */, const MyMoneyFile* /* file */) { /* m_reconciledTransactions.clear(); - m_debitsQList.clear(); - m_creditsQList.clear(); + m_debitsTQList.clear(); + m_creditsTQList.clear(); m_balanced = false; @@ -317,11 +313,11 @@ void KReconcileDlg::resetData(const MyMoneyMoney /* previousBal */, const MyMone m_endingDate = endingDate; - //totalCreditsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //totalDebitsLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //previousLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //endingLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); - //differenceLabel->setAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //totalCreditsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //totalDebitsLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //previousLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //endingLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); + //differenceLabel->tqsetAlignment(AlignRight | AlignVCenter | ExpandTabs | SingleLine); endingLabel->setText(KGlobal::locale()->formatMoney(m_clearedBalance.amount(),"")); @@ -358,34 +354,34 @@ void KReconcileDlg::reloadLists() if (transaction->state()!=MyMoneyTransaction::Reconciled) { if (transaction->type() == MyMoneyTransaction::Debit) { transaction->setIndex(i); - if(m_debitsQList.find(transaction) < 0) + if(m_debitsTQList.tqfind(transaction) < 0) { - m_debitsQList.append(transaction); + m_debitsTQList.append(transaction); } } else { transaction->setIndex(i); - if(m_creditsQList.find(transaction) < 0) + if(m_creditsTQList.tqfind(transaction) < 0) { - m_creditsQList.append(transaction); + m_creditsTQList.append(transaction); } } } } - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { bool transactionFound = inTransactions(it.current()); if(transactionFound == false) - m_debitsQList.remove(it.current()); + m_debitsTQList.remove(it.current()); } - QListIterator<MyMoneyTransaction> it2(m_creditsQList); + TQListIterator<MyMoneyTransaction> it2(m_creditsTQList); for ( ; it2.current(); ++it2) { bool transactionFound = inTransactions(it2.current()); if(transactionFound == false) - m_creditsQList.remove(it2.current()); + m_creditsTQList.remove(it2.current()); } */ } @@ -408,7 +404,7 @@ bool KReconcileDlg::inTransactions(MyMoneyTransaction * /*credittrans */) /* Not used (yet?) bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) { - QListIterator<MyMoneyTransaction> it(m_creditsQList); + TQListIterator<MyMoneyTransaction> it(m_creditsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; @@ -422,7 +418,7 @@ bool KReconcileDlg::inCredits(MyMoneyTransaction *transaction) /* Not used (yet?) bool KReconcileDlg::inDebits(MyMoneyTransaction *transaction) { - QListIterator<MyMoneyTransaction> it(m_debitsQList); + TQListIterator<MyMoneyTransaction> it(m_debitsTQList); for ( ; it.current(); ++it) { if(transaction == it.current()) return true; @@ -440,7 +436,7 @@ void KReconcileDlg::editClicked() */ } -void KReconcileDlg::resizeEvent(QResizeEvent* /* e */) +void KReconcileDlg::resizeEvent(TQResizeEvent* /* e */) { /* debitListView->setColumnWidth( 2, debitListView->visibleWidth() |