diff options
Diffstat (limited to 'kmymoney2/views/kpayeesview.cpp')
-rw-r--r-- | kmymoney2/views/kpayeesview.cpp | 288 |
1 files changed, 144 insertions, 144 deletions
diff --git a/kmymoney2/views/kpayeesview.cpp b/kmymoney2/views/kpayeesview.cpp index ad17ff4..83c7e8f 100644 --- a/kmymoney2/views/kpayeesview.cpp +++ b/kmymoney2/views/kpayeesview.cpp @@ -25,22 +25,22 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qtabwidget.h> -#include <qcursor.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qpainter.h> -#include <qheader.h> -#include <qbuttongroup.h> -#include <qsplitter.h> -#include <qmap.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqtabwidget.h> +#include <tqcursor.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqpainter.h> +#include <tqheader.h> +#include <tqbuttongroup.h> +#include <tqsplitter.h> +#include <tqmap.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -70,7 +70,7 @@ /* KTransactionPtrVector */ /* -------------------------------------------------------------------------------*/ -int KTransactionPtrVector::compareItems(const QString& s1, const QString& s2) const +int KTransactionPtrVector::compareItems(const TQString& s1, const TQString& s2) const { if(s1 == s2) return 0; @@ -99,7 +99,7 @@ int KTransactionPtrVector::compareItems(KTransactionPtrVector::Item d1, KTransac s2 = t2->splitByPayee(m_id); break; } - QString p1, p2; + TQString p1, p2; switch(m_sortType) { case SortValue: @@ -245,13 +245,13 @@ void KTransactionPtrVector::setSortType(const TransactionSortE type) sort(); } -void KTransactionPtrVector::setAccountId(const QString& id) +void KTransactionPtrVector::setAccountId(const TQString& id) { m_id = id; m_idMode = AccountMode; } -void KTransactionPtrVector::setPayeeId(const QString& id) +void KTransactionPtrVector::setPayeeId(const TQString& id) { m_id = id; m_idMode = PayeeMode; @@ -260,8 +260,8 @@ void KTransactionPtrVector::setPayeeId(const QString& id) // *** KPayeeListItem Implementation *** -KPayeeListItem::KPayeeListItem(KListView *parent, const MyMoneyPayee& payee) : - KListViewItem(parent), +KPayeeListItem::KPayeeListItem(KListView *tqparent, const MyMoneyPayee& payee) : + KListViewItem(tqparent), m_payee(payee) { setText(0, payee.name()); @@ -273,22 +273,22 @@ KPayeeListItem::~KPayeeListItem() { } -void KPayeeListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void KPayeeListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { - QColorGroup cg2(cg); + TQColorGroup cg2(cg); if(isAlternate()) - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listColor()); else - cg2.setColor(QColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); + cg2.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); p->setFont(KMyMoneyGlobalSettings::listCellFont()); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } -KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* parent, const QString& accountId, const QString& transactionId) : - KListViewItem(view, parent) +KTransactionListItem::KTransactionListItem(KListView* view, KTransactionListItem* tqparent, const TQString& accountId, const TQString& transactionId) : + KListViewItem(view, tqparent) { m_accountId = accountId; m_transactionId = transactionId; @@ -298,14 +298,14 @@ KTransactionListItem::~KTransactionListItem() { } -void KTransactionListItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) +void KTransactionListItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment) { - QColorGroup _cg = cg; - _cg.setColor(QColorGroup::Base, backgroundColor()); - QListViewItem::paintCell(p, _cg, column, width, alignment); + TQColorGroup _cg = cg; + _cg.setColor(TQColorGroup::Base, backgroundColor()); + TQListViewItem::paintCell(p, _cg, column, width, tqalignment); } -const QColor KTransactionListItem::backgroundColor(void) +const TQColor KTransactionListItem::backgroundColor(void) { return isAlternate() ? KMyMoneyGlobalSettings::listBGColor() : KMyMoneyGlobalSettings::listColor(); } @@ -315,30 +315,30 @@ const QColor KTransactionListItem::backgroundColor(void) // *** KPayeesView Implementation *** -KPayeesView::KPayeesView(QWidget *parent, const char *name ) : - KPayeesViewDecl(parent,name), +KPayeesView::KPayeesView(TQWidget *tqparent, const char *name ) : + KPayeesViewDecl(tqparent,name), m_needReload(false), m_needConnection(true), m_updatesQueued(0), m_inSelection(false) { // create the searchline widget - // and insert it into the existing layout + // and insert it into the existing tqlayout m_searchWidget = new KListViewSearchLineWidget(m_payeesList, this); - m_searchWidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed)); + m_searchWidget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed)); KPayeesViewDeclLayout->insertWidget(0, m_searchWidget); - m_splitter = new QSplitter(this); - m_payeesList->reparent(m_splitter, QPoint(0,0), true); - m_tabWidget->reparent(m_splitter, QPoint(0, 0), true); - m_splitter->setResizeMode(m_tabWidget, QSplitter::Stretch); + m_splitter = new TQSplitter(this); + m_payeesList->reparent(m_splitter, TQPoint(0,0), true); + m_tabWidget->reparent(m_splitter, TQPoint(0, 0), true); + m_splitter->setResizeMode(m_tabWidget, TQSplitter::Stretch); m_splitter->setOpaqueResize(); - layout10->addWidget(m_splitter); + tqlayout10->addWidget(m_splitter); // use the size settings of the last run (if any) KConfig *config = KGlobal::config(); config->setGroup("Last Use Settings"); - QValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize"); + TQValueList<int> sizes = config->readIntListEntry("KPayeesViewSplitterSize"); if(sizes.size() == 2) { if(!sizes[0] || !sizes[1]) { sizes[0] = 1; @@ -348,10 +348,10 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) : } m_transactionView->setSorting(-1); - m_transactionView->setColumnWidthMode(2, QListView::Manual); - m_transactionView->setColumnAlignment(3, Qt::AlignRight); + m_transactionView->setColumnWidthMode(2, TQListView::Manual); + m_transactionView->setColumnAlignment(3, TQt::AlignRight); // never show horizontal scroll bars - m_transactionView->setHScrollBarMode(QScrollView::AlwaysOff); + m_transactionView->setHScrollBarMode(TQScrollView::AlwaysOff); m_payeesList->addColumn(i18n("Name")); @@ -366,44 +366,44 @@ KPayeesView::KPayeesView(QWidget *parent, const char *name ) : KIconLoader* il = KGlobal::iconLoader(); KGuiItem updateButtenItem( i18n("Update"), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered data and stores it"), i18n("Use this to accept the modified data.")); m_updateButton->setGuiItem(updateButtenItem); - connect(m_payeesList, SIGNAL(selectionChanged()), this, SLOT(slotSelectPayee())); - connect(m_payeesList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenamePayee(QListViewItem*,int,const QString&))); + connect(m_payeesList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectPayee())); + connect(m_payeesList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenamePayee(TQListViewItem*,int,const TQString&))); - connect(addressEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged())); - connect(postcodeEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(telephoneEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(emailEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(notesEdit, SIGNAL(textChanged()), this, SLOT(slotPayeeDataChanged())); - connect(matchKeyEditList, SIGNAL(changed()), this, SLOT(slotKeyListChanged())); + connect(addressEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged())); + connect(postcodeEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(telephoneEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(emailEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(notesEdit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotPayeeDataChanged())); + connect(matchKeyEditList, TQT_SIGNAL(changed()), this, TQT_SLOT(slotKeyListChanged())); - connect(radioNoMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(radioNameMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(radioKeyMatch, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(checkMatchIgnoreCase, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); + connect(radioNoMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(radioNameMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(radioKeyMatch, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(checkMatchIgnoreCase, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); - connect(checkEnableDefaultAccount, SIGNAL(toggled(bool)), this, SLOT(slotPayeeDataChanged())); - connect(comboDefaultAccount, SIGNAL(accountSelected(const QString&)), this, SLOT(slotPayeeDataChanged())); - connect(buttonSelectMyAccount, SIGNAL(clicked()), this, SLOT(slotChooseDefaultAccount())); + connect(checkEnableDefaultAccount, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(comboDefaultAccount, TQT_SIGNAL(accountSelected(const TQString&)), this, TQT_SLOT(slotPayeeDataChanged())); + connect(buttonSelectMyAccount, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChooseDefaultAccount())); - connect(m_updateButton, SIGNAL(clicked()), this, SLOT(slotUpdatePayee())); - connect(m_helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); + connect(m_updateButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotUpdatePayee())); + connect(m_helpButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotHelp())); - connect(m_payeesList, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&))); + connect(m_payeesList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&))); -// connect(m_payeesList, SIGNAL(rightButtonClicked(QListViewItem* , const QPoint&, int)), -// this, SLOT(slotOpenContextMenu(QListViewItem*))); +// connect(m_payeesList, TQT_SIGNAL(rightButtonClicked(TQListViewItem* , const TQPoint&, int)), +// this, TQT_SLOT(slotOpenContextMenu(TQListViewItem*))); - connect(m_transactionView, SIGNAL(doubleClicked(QListViewItem*)), - this, SLOT(slotTransactionDoubleClicked(QListViewItem*))); + connect(m_transactionView, TQT_SIGNAL(doubleClicked(TQListViewItem*)), + this, TQT_SLOT(slotTransactionDoubleClicked(TQListViewItem*))); - connect(m_tabWidget, SIGNAL(currentChanged(QWidget*)), this, SLOT(rearrange(void))); + connect(m_tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), this, TQT_SLOT(rearrange(void))); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotLoadPayees())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotLoadPayees())); } KPayeesView::~KPayeesView() @@ -419,7 +419,7 @@ void KPayeesView::slotQueueUpdate(void) m_updatesQueued++; // The KListViewSearchLineWidget has an internal timer for update purposes // of 200 ms, so we should be safe with 250 ms here - QTimer::singleShot(250, this, SLOT(slotActivateUpdate())); + TQTimer::singleShot(250, this, TQT_SLOT(slotActivateUpdate())); } void KPayeesView::slotActivateUpdate(void) @@ -432,20 +432,20 @@ void KPayeesView::slotActivateUpdate(void) void KPayeesView::slotChooseDefaultAccount(void) { MyMoneyFile* file = MyMoneyFile::instance(); - QMap<QString,int> account_count; + TQMap<TQString,int> account_count; for (int i = 0; i < m_transactionPtrVector.size(); ++i) { KMyMoneyTransaction* t = m_transactionPtrVector[i]; MyMoneySplit s = t->splitById(t->splitId()); const MyMoneyAccount& acc = file->account(s.accountId()); - QString txt; + TQString txt; if (s.action() != MyMoneySplit::ActionAmortization && acc.accountType() != MyMoneyAccount::AssetLoan && !file->isTransfer(*t) && t->splitCount() == 2) { MyMoneySplit s0 = t->splitByAccount(s.accountId(), false); - if (account_count.contains(s0.accountId())) { + if (account_count.tqcontains(s0.accountId())) { account_count[s0.accountId()]++; } else { @@ -454,7 +454,7 @@ void KPayeesView::slotChooseDefaultAccount(void) } } - QMapIterator<QString,int> most_frequent, iter; + TQMapIterator<TQString,int> most_frequent, iter; most_frequent = account_count.end(); for (iter = account_count.begin(); iter != account_count.end(); iter++) { if (iter.data() > most_frequent.data()) { @@ -470,19 +470,19 @@ void KPayeesView::slotChooseDefaultAccount(void) void KPayeesView::slotStartRename(void) { - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; if((it_v = it_l.current()) != 0) { it_v->startRename(0); } } // This variant is only called when a single payee is selected and renamed. -void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QString& txt) +void KPayeesView::slotRenamePayee(TQListViewItem* p , int /* col */, const TQString& txt) { //kdDebug() << "[KPayeesView::slotRenamePayee]" << endl; // create a copy of the new name without appended whitespaces - QString new_name = txt.stripWhiteSpace(); + TQString new_name = txt.stripWhiteSpace(); if (m_payee.name() != new_name) { MyMoneyFileTransaction ft; try { @@ -495,7 +495,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin if (KMessageBox::questionYesNo(this, i18n("A payee with the name '%1' already exists. It is not advisable to have " "multiple payees with the same identification name. Are you sure you would like " - "to rename the payee?").arg(new_name)) != KMessageBox::Yes) + "to rename the payee?").tqarg(new_name)) != KMessageBox::Yes) { p->setText(0,m_payee.name()); return; @@ -521,7 +521,7 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -530,9 +530,9 @@ void KPayeesView::slotRenamePayee(QListViewItem* p , int /* col */, const QStrin } } -void KPayeesView::ensurePayeeVisible(const QString& id) +void KPayeesView::ensurePayeeVisible(const TQString& id) { - for (QListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) { + for (TQListViewItem * item = m_payeesList->firstChild(); item; item = item->itemBelow()) { KPayeeListItem* p = dynamic_cast<KPayeeListItem*>(item); if(p && p->payee().id() == id) { if(p->itemAbove()) @@ -548,10 +548,10 @@ void KPayeesView::ensurePayeeVisible(const QString& id) } } -void KPayeesView::selectedPayees(QValueList<MyMoneyPayee>& payeesList) const +void KPayeesView::selectedPayees(TQValueList<MyMoneyPayee>& payeesList) const { - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected | QListViewItemIterator::Visible); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected | TQListViewItemIterator::Visible); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -565,8 +565,8 @@ void KPayeesView::slotSelectPayee(void) // check if the content of a currently selected payee was modified // and ask to store the data if (m_updateButton->isEnabled()) { - if (KMessageBox::questionYesNo(this, QString("<qt>%1</qt>").arg( - i18n("Do you want to save the changes for <b>%1</b>?").arg(m_newName)), + if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg( + i18n("Do you want to save the changes for <b>%1</b>?").tqarg(m_newName)), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdatePayee(); @@ -576,7 +576,7 @@ void KPayeesView::slotSelectPayee(void) // loop over all payees and count the number of payees, also // optain last selected payee - QValueList<MyMoneyPayee> payeesList; + TQValueList<MyMoneyPayee> payeesList; selectedPayees(payeesList); emit selectObjects(payeesList); @@ -593,18 +593,18 @@ void KPayeesView::slotSelectPayee(void) m_tabWidget->setEnabled(false); // disable tab widget clearItemData(); // disable renaming in all listviewitem - for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) + for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) i->setRenameEnabled(0, false); return; } // otherwise we have just one selected, enable payee information widget m_tabWidget->setEnabled(true); // enable renaming in all listviewitem - for (QListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) + for (TQListViewItem * i = m_payeesList->firstChild(); i; i = i->itemBelow()) i->setRenameEnabled(0, true); // as of now we are updating only the last selected payee, and until - // selection mode of the QListView has been changed to Extended, this + // selection mode of the TQListView has been changed to Extended, this // will also be the only selection and behave exactly as before - Andreas try { m_payee = payeesList[0]; @@ -620,7 +620,7 @@ void KPayeesView::slotSelectPayee(void) emailEdit->setText(m_payee.email()); notesEdit->setText(m_payee.notes()); - QStringList keys; + TQStringList keys; bool ignorecase = false; MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); @@ -646,11 +646,11 @@ void KPayeesView::slotSelectPayee(void) void KPayeesView::clearItemData(void) { - addressEdit->setText(QString()); - postcodeEdit->setText(QString()); - telephoneEdit->setText(QString()); - emailEdit->setText(QString()); - notesEdit->setText(QString()); + addressEdit->setText(TQString()); + postcodeEdit->setText(TQString()); + telephoneEdit->setText(TQString()); + emailEdit->setText(TQString()); + notesEdit->setText(TQString()); showTransactions(); } @@ -664,16 +664,16 @@ void KPayeesView::showTransactions(void) m_transactionView->clear(); if(m_payee.id().isEmpty() || !m_tabWidget->isEnabled()) { - m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); return; } // setup the list and the pointer vector MyMoneyTransactionFilter filter; filter.addPayee(m_payee.id()); - filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), QDate()); + filter.setDateFilter(KMyMoneyGlobalSettings::startDate().date(), TQDate()); - QValueList<MyMoneyTransaction> list = file->transactionList(filter); + TQValueList<MyMoneyTransaction> list = file->transactionList(filter); m_transactionList.clear(); m_transactionPtrVector.clear(); @@ -681,8 +681,8 @@ void KPayeesView::showTransactions(void) m_transactionPtrVector.setPayeeId(m_payee.id()); m_transactionPtrVector.setSortType(KTransactionPtrVector::SortPostDate); - QValueList<MyMoneyTransaction>::ConstIterator it_t; - QString lastId; + TQValueList<MyMoneyTransaction>::ConstIterator it_t; + TQString lastId; int ofs = 0; for(i = 0, it_t = list.begin(); it_t != list.end(); ++it_t) { @@ -699,7 +699,7 @@ void KPayeesView::showTransactions(void) MyMoneyAccount acc = MyMoneyFile::instance()->account(filter.matchingSplits()[ofs].accountId()); if(acc.accountGroup() == MyMoneyAccount::Asset || acc.accountGroup() == MyMoneyAccount::Liability) { - QValueList<KMyMoneyTransaction>::ConstIterator it_k; + TQValueList<KMyMoneyTransaction>::ConstIterator it_k; it_k = m_transactionList.append(k); balance += k.splitById(k.splitId()).value(); m_transactionPtrVector.insert(i, &(*it_k)); @@ -723,28 +723,28 @@ void KPayeesView::showTransactions(void) item->setText(0, s.number()); item->setText(1, KGlobal::locale()->formatDate(t->postDate(), true)); - QString txt; + TQString txt; if(s.action() == MyMoneySplit::ActionAmortization) { if(acc.accountType() == MyMoneyAccount::Loan) { if(s.value().isPositive()) { - txt = i18n("Amortization of %1").arg(acc.name()); + txt = i18n("Amortization of %1").tqarg(acc.name()); } else { - txt = i18n("Payment to %1").arg(acc.name()); + txt = i18n("Payment to %1").tqarg(acc.name()); } } else if(acc.accountType() == MyMoneyAccount::AssetLoan) { if(s.value().isNegative()) { - txt = i18n("Amortization of %1").arg(acc.name()); + txt = i18n("Amortization of %1").tqarg(acc.name()); } else { - txt = i18n("Payment to %1").arg(acc.name()); + txt = i18n("Payment to %1").tqarg(acc.name()); } } else { - txt = i18n("Loan payment from %1").arg(acc.name()); + txt = i18n("Loan payment from %1").tqarg(acc.name()); } } else if (file->isTransfer(*t)) { if(!s.value().isNegative()) { - txt = i18n("Transfer to %1").arg(acc.name()); + txt = i18n("Transfer to %1").tqarg(acc.name()); } else { - txt = i18n("Transfer from %1").arg(acc.name()); + txt = i18n("Transfer from %1").tqarg(acc.name()); } } else if(t->splitCount() > 2) { txt = i18n("Split transaction (category replacement)", "Split transaction"); @@ -755,7 +755,7 @@ void KPayeesView::showTransactions(void) item->setText(2, txt); item->setText(3, s.value().formatMoney(acc.fraction())); } - m_balanceLabel->setText(i18n("Balance: %1").arg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); + m_balanceLabel->setText(i18n("Balance: %1").tqarg(balance.formatMoney(MyMoneyFile::instance()->baseCurrency().smallestAccountFraction()))); // Trick: it seems, that the initial sizing of the view does // not work correctly. At least, the columns do not get displayed @@ -763,14 +763,14 @@ void KPayeesView::showTransactions(void) // is incorrect. If the widget is visible, resizing works correctly. // So, we let the dialog show up and resize it then. It's not really // clean, but the only way I got the damned thing working. - QTimer::singleShot(50, this, SLOT(rearrange())); + TQTimer::singleShot(50, this, TQT_SLOT(rearrange())); } void KPayeesView::slotKeyListChanged(void) { bool rc = false; bool ignorecase = false; - QStringList keys; + TQStringList keys; // J.Rodehueser: delete unused variable 'type' // orig: MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); m_payee.matchData(ignorecase, keys); @@ -801,7 +801,7 @@ void KPayeesView::slotPayeeDataChanged(void) || (!notesEdit->text().isEmpty() && m_payee.notes() != notesEdit->text())); bool ignorecase = false; - QStringList keys; + TQStringList keys; MyMoneyPayee::payeeMatchType type = m_payee.matchData(ignorecase, keys); rc |= (static_cast<int>(type) != m_matchType->selectedId()); @@ -831,7 +831,7 @@ void KPayeesView::slotPayeeDataChanged(void) rc |= !m_payee.defaultAccountId().isEmpty(); } else { - QString temp = comboDefaultAccount->selectedAccounts().front(); + TQString temp = comboDefaultAccount->selectedAccounts().front(); rc |= ( temp.isEmpty() != m_payee.defaultAccountId().isEmpty()) || (!m_payee.defaultAccountId().isEmpty() && temp != m_payee.defaultAccountId()); } @@ -860,7 +860,7 @@ void KPayeesView::slotUpdatePayee(void) m_payee.setDefaultAccountId(); if (checkEnableDefaultAccount->isChecked()) { - QString temp; + TQString temp; if (!comboDefaultAccount->selectedAccounts().empty()) { temp = comboDefaultAccount->selectedAccounts().front(); m_payee.setDefaultAccountId(temp); @@ -872,7 +872,7 @@ void KPayeesView::slotUpdatePayee(void) } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify payee"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -882,7 +882,7 @@ void KPayeesView::readConfig(void) { m_transactionView->setFont(KMyMoneyGlobalSettings::listCellFont()); - QFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() ); + TQFontMetrics fm( KMyMoneyGlobalSettings::listHeaderFont() ); int height = fm.lineSpacing()+6; m_transactionView->header()->setMinimumHeight(height); @@ -890,7 +890,7 @@ void KPayeesView::readConfig(void) m_transactionView->header()->setFont(KMyMoneyGlobalSettings::listHeaderFont()); m_payeesList->setDefaultRenameAction( - KMyMoneyGlobalSettings::focusChangeIsEnter() ? QListView::Accept : QListView::Reject); + KMyMoneyGlobalSettings::focusChangeIsEnter() ? TQListView::Accept : TQListView::Reject); //initialize the account list? comboDefaultAccount->loadList((KMyMoneyUtils::categoryTypeE)(KMyMoneyUtils::asset | KMyMoneyUtils::liability | MyMoneyAccount::Income | MyMoneyAccount::Expense)); @@ -904,7 +904,7 @@ void KPayeesView::show(void) // If you want to learn about the details, see the source of KListViewSearchLineWidget's // constructor if(m_needConnection) { - connect(m_searchWidget->searchLine(), SIGNAL(textChanged(const QString&)), this, SLOT(slotQueueUpdate(void))); + connect(m_searchWidget->searchLine(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotQueueUpdate(void))); m_needConnection = false; } @@ -913,13 +913,13 @@ void KPayeesView::show(void) m_needReload = false; } - // fixup the layout - QTimer::singleShot(0, this, SLOT(rearrange())); + // fixup the tqlayout + TQTimer::singleShot(0, this, TQT_SLOT(rearrange())); // don't forget base class implementation KPayeesViewDecl::show(); - QValueList<MyMoneyPayee> list; + TQValueList<MyMoneyPayee> list; selectedPayees(list); emit selectObjects(list); } @@ -928,7 +928,7 @@ void KPayeesView::slotLoadPayees(void) { if(isVisible()) { if(m_inSelection) - QTimer::singleShot(0, this, SLOT(slotLoadPayees())); + TQTimer::singleShot(0, this, TQT_SLOT(slotLoadPayees())); else loadPayees(); } else { @@ -941,15 +941,15 @@ void KPayeesView::loadPayees(void) if(m_inSelection) return; - QMap<QString, bool> isSelected; - QString id; + TQMap<TQString, bool> isSelected; + TQString id; ::timetrace("Start KPayeesView::loadPayees"); readConfig(); // remember which items are selected in the list - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -963,7 +963,7 @@ void KPayeesView::loadPayees(void) id = currentItem->payee().id(); // remember the upper left corner of the viewport - QPoint startPoint = m_payeesList->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_payeesList->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_payeesList->setUpdatesEnabled(false); @@ -973,8 +973,8 @@ void KPayeesView::loadPayees(void) m_transactionView->clear(); currentItem = 0; - QValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList(); - QValueList<MyMoneyPayee>::ConstIterator it; + TQValueList<MyMoneyPayee>list = MyMoneyFile::instance()->payeeList(); + TQValueList<MyMoneyPayee>::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { KPayeeListItem* item = new KPayeeListItem(m_payeesList, *it); @@ -991,11 +991,11 @@ void KPayeesView::loadPayees(void) // reposition viewport m_payeesList->setContentsPos(startPoint.x(), startPoint.y()); - m_searchWidget->searchLine()->updateSearch(QString::null); + m_searchWidget->searchLine()->updateSearch(TQString()); // turn updates back on m_payeesList->setUpdatesEnabled(true); - m_payeesList->repaintContents(); + m_payeesList->tqrepaintContents(); slotSelectPayee(); @@ -1007,7 +1007,7 @@ void KPayeesView::rearrange(void) resizeEvent(0); } -void KPayeesView::resizeEvent(QResizeEvent* ev) +void KPayeesView::resizeEvent(TQResizeEvent* ev) { // resize the register int w = m_transactionView->visibleWidth(); @@ -1023,14 +1023,14 @@ void KPayeesView::resizeEvent(QResizeEvent* ev) KPayeesViewDecl::resizeEvent(ev); } -void KPayeesView::slotTransactionDoubleClicked(QListViewItem* i) +void KPayeesView::slotTransactionDoubleClicked(TQListViewItem* i) { KTransactionListItem* item = static_cast<KTransactionListItem *>(i); if (item) emit transactionSelected(item->accountId(), item->transactionId()); } -void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QString& accountId, const QString& transactionId) +void KPayeesView::slotSelectPayeeAndTransaction(const TQString& payeeId, const TQString& accountId, const TQString& transactionId) { if(!isVisible()) return; @@ -1041,8 +1041,8 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS m_searchWidget->searchLine()->updateSearch(); // deselect all other selected items - QListViewItemIterator it_l(m_payeesList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_payeesList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; while((it_v = it_l.current()) != 0) { KPayeeListItem* item = dynamic_cast<KPayeeListItem*>(it_v); if(item) @@ -1051,7 +1051,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS } // find the payee in the list - QListViewItem* it; + TQListViewItem* it; for(it = m_payeesList->firstChild(); it; it = it->itemBelow()) { KPayeeListItem* item = dynamic_cast<KPayeeListItem *>(it); if(item && item->payee().id() == payeeId) { @@ -1088,7 +1088,7 @@ void KPayeesView::slotSelectPayeeAndTransaction(const QString& payeeId, const QS } } -void KPayeesView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p) +void KPayeesView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p) { Q_UNUSED(p); if(lv == m_payeesList) { |