diff options
Diffstat (limited to 'kmymoney2/views/kbudgetview.cpp')
-rw-r--r-- | kmymoney2/views/kbudgetview.cpp | 222 |
1 files changed, 111 insertions, 111 deletions
diff --git a/kmymoney2/views/kbudgetview.cpp b/kmymoney2/views/kbudgetview.cpp index a8d5bc1..c2bf5dc 100644 --- a/kmymoney2/views/kbudgetview.cpp +++ b/kmymoney2/views/kbudgetview.cpp @@ -19,17 +19,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qpushbutton.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qmultilineedit.h> -#include <qpixmap.h> -#include <qtabwidget.h> -#include <qlistbox.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qtooltip.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> +#include <tqpixmap.h> +#include <tqtabwidget.h> +#include <tqlistbox.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqtooltip.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -61,12 +61,12 @@ #include "../kmymoney2.h" // *** KBudgetListItem Implementation *** -KBudgetListItem::KBudgetListItem(KListView *parent, const MyMoneyBudget& budget) : - KListViewItem(parent), +KBudgetListItem::KBudgetListItem(KListView *tqparent, const MyMoneyBudget& budget) : + KListViewItem(tqparent), m_budget(budget) { setText(0, budget.name()); - setText(1, QString("%1").arg(budget.budgetStart().year())); + setText(1, TQString("%1").tqarg(budget.budgetStart().year())); // allow in column rename setRenameEnabled(0, true); @@ -76,18 +76,18 @@ KBudgetListItem::~KBudgetListItem() { } -void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align) +void KBudgetListItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align) { p->setFont(KMyMoneyGlobalSettings::listCellFont()); - 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()); - QListViewItem::paintCell(p, cg2, column, width, align); + TQListViewItem::paintCell(p, cg2, column, width, align); } @@ -95,8 +95,8 @@ void KBudgetListItem::paintCell(QPainter *p, const QColorGroup & cg, int column, const int KBudgetView::m_iBudgetYearsAhead = 5; const int KBudgetView::m_iBudgetYearsBack = 3; -KBudgetView::KBudgetView(QWidget *parent, const char *name ) : - KBudgetViewDecl(parent,name), +KBudgetView::KBudgetView(TQWidget *tqparent, const char *name ) : + KBudgetViewDecl(tqparent,name), m_needReload(false), m_inSelection(false) { @@ -104,73 +104,73 @@ KBudgetView::KBudgetView(QWidget *parent, const char *name ) : m_budgetList->setSorting(0); KIconLoader* il = KGlobal::iconLoader(); - KGuiItem newButtenItem( QString(""), - QIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), + KGuiItem newButtenItem( TQString(""), + TQIconSet(il->loadIcon("file_new", KIcon::Small, KIcon::SizeSmall)), i18n("Creates a new budget"), i18n("Use this to create a new empty budget.")); m_newButton->setGuiItem(newButtenItem); - QToolTip::add(m_newButton, newButtenItem.toolTip()); + TQToolTip::add(m_newButton, newButtenItem.toolTip()); - KGuiItem renameButtenItem( QString(""), - QIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)), + KGuiItem renameButtenItem( TQString(""), + TQIconSet(il->loadIcon("editpaste", KIcon::Small, KIcon::SizeSmall)), i18n("Rename the current selected budget"), i18n("Use this to start renaming the selected budget.")); m_renameButton->setGuiItem(renameButtenItem); - QToolTip::add(m_renameButton, renameButtenItem.toolTip()); + TQToolTip::add(m_renameButton, renameButtenItem.toolTip()); - KGuiItem deleteButtenItem( QString(""), - QIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), + KGuiItem deleteButtenItem( TQString(""), + TQIconSet(il->loadIcon("editdelete", KIcon::Small, KIcon::SizeSmall)), i18n("Delete the current selected budget"), i18n("Use this to delete the selected budget.")); m_deleteButton->setGuiItem(deleteButtenItem); - QToolTip::add(m_deleteButton, deleteButtenItem.toolTip()); + TQToolTip::add(m_deleteButton, deleteButtenItem.toolTip()); - KGuiItem updateButtenItem( QString(""), - QIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), + KGuiItem updateButtenItem( TQString(""), + TQIconSet(il->loadIcon("button_ok", KIcon::Small, KIcon::SizeSmall)), i18n("Accepts the entered values and stores the budget"), i18n("Use this to store the modified data.")); m_updateButton->setGuiItem(updateButtenItem); - QToolTip::add(m_updateButton, updateButtenItem.toolTip()); + TQToolTip::add(m_updateButton, updateButtenItem.toolTip()); - KGuiItem resetButtenItem( QString(""), - QIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)), + KGuiItem resetButtenItem( TQString(""), + TQIconSet(il->loadIcon("undo", KIcon::Small, KIcon::SizeSmall)), i18n("Revert budget to last saved state"), i18n("Use this to discard the modified data.")); m_resetButton->setGuiItem(resetButtenItem); - QToolTip::add(m_resetButton, resetButtenItem.toolTip()); + TQToolTip::add(m_resetButton, resetButtenItem.toolTip()); - connect(m_budgetList, SIGNAL(contextMenu(KListView*, QListViewItem* , const QPoint&)), - this, SLOT(slotOpenContextMenu(KListView*, QListViewItem*, const QPoint&))); - connect(m_budgetList, SIGNAL(itemRenamed(QListViewItem*,int,const QString&)), this, SLOT(slotRenameBudget(QListViewItem*,int,const QString&))); - connect(m_budgetList, SIGNAL(selectionChanged()), this, SLOT(slotSelectBudget())); + connect(m_budgetList, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem* , const TQPoint&)), + this, TQT_SLOT(slotOpenContextMenu(KListView*, TQListViewItem*, const TQPoint&))); + connect(m_budgetList, TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)), this, TQT_SLOT(slotRenameBudget(TQListViewItem*,int,const TQString&))); + connect(m_budgetList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectBudget())); - connect(m_cbBudgetSubaccounts, SIGNAL(clicked()), this, SLOT(cb_includesSubaccounts_clicked())); + connect(m_cbBudgetSubaccounts, TQT_SIGNAL(clicked()), this, TQT_SLOT(cb_includesSubaccounts_clicked())); - connect(m_accountTree, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(slotSelectAccount(QListViewItem*))); - connect(m_accountTree, SIGNAL(valueChanged()), this, SLOT(slotRefreshHideUnusedButton())); + connect(m_accountTree, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotSelectAccount(TQListViewItem*))); + connect(m_accountTree, TQT_SIGNAL(valueChanged()), this, TQT_SLOT(slotRefreshHideUnusedButton())); // connect the buttons to the actions. Make sure the enabled state // of the actions is reflected by the buttons - connect(kmymoney2->action("budget_new"), SIGNAL(enabled(bool)), m_newButton, SLOT(setEnabled(bool))); - connect(m_renameButton, SIGNAL(clicked()), kmymoney2->action("budget_rename"), SLOT(activate())); - connect(kmymoney2->action("budget_rename"), SIGNAL(enabled(bool)), m_renameButton, SLOT(setEnabled(bool))); - connect(m_deleteButton, SIGNAL(clicked()), kmymoney2->action("budget_delete"), SLOT(activate())); - connect(kmymoney2->action("budget_delete"), SIGNAL(enabled(bool)), m_deleteButton, SLOT(setEnabled(bool))); + connect(kmymoney2->action("budget_new"), TQT_SIGNAL(enabled(bool)), m_newButton, TQT_SLOT(setEnabled(bool))); + connect(m_renameButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_rename"), TQT_SLOT(activate())); + connect(kmymoney2->action("budget_rename"), TQT_SIGNAL(enabled(bool)), m_renameButton, TQT_SLOT(setEnabled(bool))); + connect(m_deleteButton, TQT_SIGNAL(clicked()), kmymoney2->action("budget_delete"), TQT_SLOT(activate())); + connect(kmymoney2->action("budget_delete"), TQT_SIGNAL(enabled(bool)), m_deleteButton, TQT_SLOT(setEnabled(bool))); - connect(m_budgetValue, SIGNAL(valuesChanged()), this, SLOT(slotBudgetedAmountChanged())); + connect(m_budgetValue, TQT_SIGNAL(valuesChanged()), this, TQT_SLOT(slotBudgetedAmountChanged())); - connect(m_newButton, SIGNAL(clicked()), this, SLOT(slotNewBudget())); - connect(m_updateButton, SIGNAL(pressed()), this, SLOT(slotUpdateBudget())); - connect(m_resetButton, SIGNAL(pressed()), this, SLOT(slotResetBudget())); + connect(m_newButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotNewBudget())); + connect(m_updateButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotUpdateBudget())); + connect(m_resetButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotResetBudget())); - connect(m_hideUnusedButton, SIGNAL(toggled(bool)), this, SLOT(slotHideUnused(bool))); + connect(m_hideUnusedButton, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotHideUnused(bool))); // setup initial state m_newButton->setEnabled(kmymoney2->action("budget_new")->isEnabled()); m_renameButton->setEnabled(kmymoney2->action("budget_rename")->isEnabled()); m_deleteButton->setEnabled(kmymoney2->action("budget_delete")->isEnabled()); - connect(MyMoneyFile::instance(), SIGNAL(dataChanged()), this, SLOT(slotRefreshView())); + connect(MyMoneyFile::instance(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotRefreshView())); } KBudgetView::~KBudgetView() @@ -179,8 +179,8 @@ KBudgetView::~KBudgetView() void KBudgetView::show() { - QTimer::singleShot(50, this, SLOT(slotRearrange())); - QWidget::show(); + TQTimer::singleShot(50, this, TQT_SLOT(slotRearrange())); + TQWidget::show(); if(m_needReload) { slotRefreshView(); } @@ -197,7 +197,7 @@ void KBudgetView::slotRearrange(void) resizeEvent(0); } -void KBudgetView::resizeEvent(QResizeEvent* ev) +void KBudgetView::resizeEvent(TQResizeEvent* ev) { // resize the register KBudgetViewDecl::resizeEvent(ev); @@ -212,7 +212,7 @@ void KBudgetView::slotReloadView(void) void KBudgetView::loadBudgets(void) { - QString id; + TQString id; ::timetrace("Start KBudgetView::loadBudgets"); @@ -220,7 +220,7 @@ void KBudgetView::loadBudgets(void) id = m_budget.id(); // remember the upper left corner of the viewport - QPoint startPoint = m_budgetList->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_budgetList->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_budgetList->setUpdatesEnabled(false); @@ -230,24 +230,24 @@ void KBudgetView::loadBudgets(void) m_budgetValue->clear(); // add the correct years to the drop down list - QDate date = QDate::currentDate(Qt::LocalTime); + TQDate date = TQDate::tqcurrentDate(Qt::LocalTime); int iStartYear = date.year() - m_iBudgetYearsBack; m_yearList.clear(); for (int i=0; i<m_iBudgetYearsAhead + m_iBudgetYearsBack; i++) - m_yearList += QString::number(iStartYear+i); + m_yearList += TQString::number(iStartYear+i); KBudgetListItem* currentItem = 0; - QValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); - QValueList<MyMoneyBudget>::ConstIterator it; + TQValueList<MyMoneyBudget> list = MyMoneyFile::instance()->budgetList(); + TQValueList<MyMoneyBudget>::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { KBudgetListItem* item = new KBudgetListItem(m_budgetList, *it); // create a list of unique years - if (m_yearList.findIndex(QString::number((*it).budgetStart().year())) == -1) - m_yearList += QString::number((*it).budgetStart().year()); + if (m_yearList.tqfindIndex(TQString::number((*it).budgetStart().year())) == -1) + m_yearList += TQString::number((*it).budgetStart().year()); if(item->budget().id() == id) { m_budget = (*it); @@ -266,7 +266,7 @@ void KBudgetView::loadBudgets(void) // turn updates back on m_budgetList->setUpdatesEnabled(true); - m_budgetList->repaintContents(); + m_budgetList->tqrepaintContents(); // reset the status of the buttons m_updateButton->setEnabled(false); @@ -278,9 +278,9 @@ void KBudgetView::loadBudgets(void) ::timetrace("End KBudgetView::loadBudgets"); } -void KBudgetView::ensureBudgetVisible(const QString& id) +void KBudgetView::ensureBudgetVisible(const TQString& id) { - for (QListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) { + for (TQListViewItem * item = m_budgetList->firstChild(); item; item = item->itemBelow()) { KBudgetListItem* p = dynamic_cast<KBudgetListItem*>(item); if(p && p->budget().id() == id) { if(p->itemAbove()) @@ -300,7 +300,7 @@ void KBudgetView::slotRefreshView(void) { if(isVisible()) { if(m_inSelection) - QTimer::singleShot(0, this, SLOT(slotRefreshView())); + TQTimer::singleShot(0, this, TQT_SLOT(slotRefreshView())); else { loadBudgets(); m_needReload = false; @@ -312,7 +312,7 @@ void KBudgetView::slotRefreshView(void) void KBudgetView::loadAccounts(void) { - QMap<QString, bool> isOpen; + TQMap<TQString, bool> isOpen; ::timetrace("start load budget account view"); @@ -329,10 +329,10 @@ void KBudgetView::loadAccounts(void) // remember the id of the current selected item KMyMoneyAccountTreeBaseItem *item = m_accountTree->selectedItem(); - QString selectedItemId = (item) ? item->id() : QString(); + TQString selectedItemId = (item) ? item->id() : TQString(); // keep a map of all 'expanded' accounts - QListViewItemIterator it_lvi(m_accountTree); + TQListViewItemIterator it_lvi(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current()); if(item && item->isOpen()) { @@ -342,7 +342,7 @@ void KBudgetView::loadAccounts(void) } // remember the upper left corner of the viewport - QPoint startPoint = m_accountTree->viewportToContents(QPoint(0, 0)); + TQPoint startPoint = m_accountTree->viewportToContents(TQPoint(0, 0)); // turn off updates to avoid flickering during reload m_accountTree->setUpdatesEnabled(false); @@ -368,13 +368,13 @@ void KBudgetView::loadAccounts(void) m_accountTree->setBaseCurrency(security); const MyMoneyAccount& income = file->income(); - QStringList incSubAcctList = income.accountList(); + TQStringList incSubAcctList = income.accountList(); m_incomeItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, income, m_budget, security, i18n("Income")); haveUnusedBudgets |= loadSubAccounts(m_incomeItem, incSubAcctList, m_budget); m_incomeItem->setSelectable(false); const MyMoneyAccount& expense = file->expense(); - QStringList expSubAcctList = expense.accountList(); + TQStringList expSubAcctList = expense.accountList(); m_expenseItem = new KMyMoneyAccountTreeBudgetItem(m_accountTree, expense, m_budget, security, i18n("Expense")); haveUnusedBudgets |= loadSubAccounts(m_expenseItem, expSubAcctList, m_budget); m_expenseItem->setSelectable(false); @@ -386,13 +386,13 @@ void KBudgetView::loadAccounts(void) // scan through the list of accounts and re-expand those that were // expanded and re-select the one that was probably selected before - it_lvi = QListViewItemIterator(m_accountTree); + it_lvi = TQListViewItemIterator(m_accountTree); while(it_lvi.current()) { item = dynamic_cast<KMyMoneyAccountTreeBaseItem*>(it_lvi.current()); if(item) { if(item->id() == selectedItemId) m_accountTree->setSelected(item, true); - if(isOpen.find(item->id()) != isOpen.end()) + if(isOpen.tqfind(item->id()) != isOpen.end()) item->setOpen(true); } ++it_lvi; @@ -403,7 +403,7 @@ void KBudgetView::loadAccounts(void) // turn updates back on m_accountTree->setUpdatesEnabled(true); - m_accountTree->repaintContents(); + m_accountTree->tqrepaintContents(); m_updateButton->setEnabled(!(selectedBudget() == m_budget)); m_resetButton->setEnabled(!(selectedBudget() == m_budget)); @@ -412,7 +412,7 @@ void KBudgetView::loadAccounts(void) } -bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QStringList& accountList, const MyMoneyBudget& budget) +bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* tqparent, TQStringList& accountList, const MyMoneyBudget& budget) { MyMoneyFile* file = MyMoneyFile::instance(); @@ -421,24 +421,24 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString //sort the subaccount list //FIXME this is just a hack to order the accounts if ( !accountList.isEmpty() ) { - QMap<QString, MyMoneyAccount> accountMap; - QValueList<MyMoneyAccount> alist; + TQMap<TQString, MyMoneyAccount> accountMap; + TQValueList<MyMoneyAccount> alist; file->accountList ( alist, accountList ); accountList.clear(); - QValueList<MyMoneyAccount>::const_iterator it_ac; + TQValueList<MyMoneyAccount>::const_iterator it_ac; for ( it_ac = alist.begin(); it_ac != alist.end(); ++it_ac ) { accountMap[(*it_ac).name()] = *it_ac; } - QMap<QString, MyMoneyAccount>::const_iterator it_am; + TQMap<TQString, MyMoneyAccount>::const_iterator it_am; for ( it_am = accountMap.begin(); it_am != accountMap.end(); ++it_am ) { accountList.prepend((*it_am).id()); //use prepend instead of append otherwise account show up in ascending order } } - QStringList::const_iterator it_a; + TQStringList::const_iterator it_a; for(it_a = accountList.begin(); it_a != accountList.end(); ++it_a) { const MyMoneyAccount& acc = file->account(*it_a); - QValueList<MyMoneyPrice> prices; + TQValueList<MyMoneyPrice> prices; MyMoneySecurity security = file->baseCurrency(); try { if(acc.isInvest()) { @@ -460,12 +460,12 @@ bool KBudgetView::loadSubAccounts(KMyMoneyAccountTreeBudgetItem* parent, QString delete e; } - QStringList subAcctList = acc.accountList(); - KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(parent, acc, budget, prices, security); + TQStringList subAcctList = acc.accountList(); + KMyMoneyAccountTreeBudgetItem *item = new KMyMoneyAccountTreeBudgetItem(tqparent, acc, budget, prices, security); unused |= loadSubAccounts(item, subAcctList, budget); // no child accounts and no value assigned to this account - bool thisUnused = (!item->firstChild()) && (!budget.contains(acc.id())); + bool thisUnused = (!item->firstChild()) && (!budget.tqcontains(acc.id())); // In case of a budget which is unused and we are requested to suppress // the display of those, @@ -485,8 +485,8 @@ void KBudgetView::askSave(void) // check if the content of a currently selected budget 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_budget.name())), + if (KMessageBox::questionYesNo(this, TQString("<qt>%1</qt>").tqarg( + i18n("Do you want to save the changes for <b>%1</b>").tqarg(m_budget.name())), i18n("Save changes")) == KMessageBox::Yes) { m_inSelection = true; slotUpdateBudget(); @@ -517,7 +517,7 @@ void KBudgetView::slotSelectBudget(void) m_assignmentBox->setEnabled(false); m_budget = MyMoneyBudget(); - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); item = dynamic_cast<KBudgetListItem*>(it_l.current()); if(item) { m_budget = item->budget(); @@ -527,7 +527,7 @@ void KBudgetView::slotSelectBudget(void) slotRefreshHideUnusedButton(); loadAccounts(); - QValueList<MyMoneyBudget> budgetList; + TQValueList<MyMoneyBudget> budgetList; if(!m_budget.id().isEmpty()) budgetList << m_budget; emit selectObjects(budgetList); @@ -546,7 +546,7 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const { static MyMoneyBudget nullBudget; - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); KBudgetListItem* item = dynamic_cast<KBudgetListItem*>(it_l.current()); if(item) { return item->budget(); @@ -557,12 +557,12 @@ const MyMoneyBudget& KBudgetView::selectedBudget(void) const KMyMoneyAccountTreeBudgetItem* KBudgetView::selectedAccount(void) const { - QListViewItemIterator it_l(m_accountTree, QListViewItemIterator::Selected); + TQListViewItemIterator it_l(m_accountTree, TQListViewItemIterator::Selected); KMyMoneyAccountTreeBudgetItem* item = dynamic_cast<KMyMoneyAccountTreeBudgetItem*>(it_l.current()); return item; } -void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPoint& p) +void KBudgetView::slotOpenContextMenu(KListView* lv, TQListViewItem* i, const TQPoint& p) { Q_UNUSED(lv); Q_UNUSED(p); @@ -580,15 +580,15 @@ void KBudgetView::slotOpenContextMenu(KListView* lv, QListViewItem* i, const QPo void KBudgetView::slotStartRename(void) { - QListViewItemIterator it_l(m_budgetList, QListViewItemIterator::Selected); - QListViewItem* it_v; + TQListViewItemIterator it_l(m_budgetList, TQListViewItemIterator::Selected); + TQListViewItem* it_v; if((it_v = it_l.current()) != 0) { it_v->startRename(0); } } // This variant is only called when a single budget is selected and renamed. -void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString& txt) +void KBudgetView::slotRenameBudget(TQListViewItem* p , int /*col*/, const TQString& txt) { KBudgetListItem *pBudget = dynamic_cast<KBudgetListItem*> (p); if (!pBudget) @@ -596,7 +596,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString //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 (pBudget->budget().name() != new_name) { MyMoneyFileTransaction ft; try { @@ -609,7 +609,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString if (KMessageBox::questionYesNo(this, i18n("A budget with the name '%1' already exists. It is not advisable to have " "multiple budgets with the same identification name. Are you sure you would like " - "to rename the budget?").arg(new_name)) != KMessageBox::Yes) + "to rename the budget?").tqarg(new_name)) != KMessageBox::Yes) { p->setText(0,pBudget->budget().name()); return; @@ -633,7 +633,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -642,7 +642,7 @@ void KBudgetView::slotRenameBudget(QListViewItem* p , int /*col*/, const QString } } -void KBudgetView::slotSelectAccount(QListViewItem* item) +void KBudgetView::slotSelectAccount(TQListViewItem* item) { if(item->listView() == m_accountTree) { m_assignmentBox->setEnabled(false); @@ -653,7 +653,7 @@ void KBudgetView::slotSelectAccount(QListViewItem* item) if (m_budget.id().isEmpty() ) return; - QString id = account->id(); + TQString id = account->id(); m_leAccounts->setText(MyMoneyFile::instance()->accountToCategory(id)); m_cbBudgetSubaccounts->setChecked(m_budget.account(id).budgetSubaccounts()); m_accountTotal->setValue(m_budget.account(id).totalBalance()); @@ -709,7 +709,7 @@ void KBudgetView::cb_includesSubaccounts_clicked() return; if(selectedAccount() != 0) { - QString accountID = selectedAccount()->id(); + TQString accountID = selectedAccount()->id(); // now, we get a reference to the accountgroup, to mofify its atribute, // and then put the resulting account group instead of the original @@ -734,7 +734,7 @@ void KBudgetView::slotResetBudget(void) loadAccounts(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to reset budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -748,7 +748,7 @@ void KBudgetView::slotUpdateBudget(void) slotRefreshHideUnusedButton(); } catch(MyMoneyException *e) { KMessageBox::detailedSorry(0, i18n("Unable to modify budget"), - (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").arg(e->line())); + (e->what() + " " + i18n("thrown in") + " " + e->file()+ ":%1").tqarg(e->line())); delete e; } } @@ -757,11 +757,11 @@ void KBudgetView::languageChange(void) { KBudgetViewDecl::languageChange(); - m_newButton->setText(QString()); - m_renameButton->setText(QString()); - m_deleteButton->setText(QString()); - m_updateButton->setText(QString()); - m_resetButton->setText(QString()); + m_newButton->setText(TQString()); + m_renameButton->setText(TQString()); + m_deleteButton->setText(TQString()); + m_updateButton->setText(TQString()); + m_resetButton->setText(TQString()); } #include "kbudgetview.moc" |