diff options
Diffstat (limited to 'kmymoney2/views/kmymoneyview.cpp')
-rw-r--r-- | kmymoney2/views/kmymoneyview.cpp | 564 |
1 files changed, 282 insertions, 282 deletions
diff --git a/kmymoney2/views/kmymoneyview.cpp b/kmymoney2/views/kmymoneyview.cpp index 8719d79..bf1b5cc 100644 --- a/kmymoney2/views/kmymoneyview.cpp +++ b/kmymoney2/views/kmymoneyview.cpp @@ -25,17 +25,17 @@ // ---------------------------------------------------------------------------- // QT Includes -#include <qlabel.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qprogressdialog.h> -#include <qtextcodec.h> -#include <qstatusbar.h> - -#include <qcursor.h> -#include <qregexp.h> -#include <qlayout.h> -#include <qobjectlist.h> +#include <tqlabel.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqprogressdialog.h> +#include <tqtextcodec.h> +#include <tqstatusbar.h> + +#include <tqcursor.h> +#include <tqregexp.h> +#include <tqlayout.h> +#include <tqobjectlist.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -120,15 +120,15 @@ #define RECOVER_KEY_ID "0xD2B08440" -KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) - : KJanusWidget(parent, name, KJanusWidget::IconList), +KMyMoneyView::KMyMoneyView(TQWidget *tqparent, const char *name) + : KJanusWidget(tqparent, name, KJanusWidget::IconList), // m_bankRightClick(false), m_inConstructor(true), m_fileOpen(false), m_fmode(0600) { // the global variable kmymoney2 is not yet assigned. So we construct it here - QObject* kmymoney2 = parent->parent(); + TQObject* kmymoney2 = tqparent->tqparent(); const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16; newStorage(); @@ -137,100 +137,100 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) DesktopIcon("home", iconSize)); m_homeView = new KHomeView(m_homeViewFrame, "HomeView"); - connect(m_homeView, SIGNAL(ledgerSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); - connect(m_homeView, SIGNAL(scheduleSelected(const QString&)), - this, SLOT(slotScheduleSelected(const QString&))); - connect(m_homeView, SIGNAL(reportSelected(const QString&)), - this, SLOT(slotShowReport(const QString&))); + connect(m_homeView, TQT_SIGNAL(ledgerSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); + connect(m_homeView, TQT_SIGNAL(scheduleSelected(const TQString&)), + this, TQT_SLOT(slotScheduleSelected(const TQString&))); + connect(m_homeView, TQT_SIGNAL(reportSelected(const TQString&)), + this, TQT_SLOT(slotShowReport(const TQString&))); // Page 1 m_institutionsViewFrame = addVBoxPage( i18n("Institutions"), i18n("Institutions"), DesktopIcon("institutions", iconSize)); addTitleBar(m_institutionsViewFrame, i18n("Institutions")); m_institutionsView = new KInstitutionsView(m_institutionsViewFrame, "InstitutionsView"); - connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotInstitutionEdit(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_institutionsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&))); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_institutionsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); + connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowInstitutionContextMenu(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotInstitutionEdit(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_institutionsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyInstitution&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyInstitution&))); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_institutionsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); // Page 2 m_accountsViewFrame = addVBoxPage( i18n("Accounts"), i18n("Accounts"), DesktopIcon("accounts", iconSize)); addTitleBar(m_accountsViewFrame, i18n("Accounts")); m_accountsView = new KAccountsView(m_accountsViewFrame, "AccountsView"); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInvestment(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_accountsView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); - connect(this, SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, SLOT(slotUpdateIconPos(unsigned int))); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_accountsView, SLOT(slotReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInvestment(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_accountsView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(this, TQT_SIGNAL(kmmFilePlugin(unsigned int)), m_accountsView, TQT_SLOT(slotUpdateIconPos(unsigned int))); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_accountsView, TQT_SLOT(slotReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); // Page 3 m_scheduleViewFrame = addVBoxPage( i18n("Scheduled\ntransactions"), i18n("Bills & Reminders"), DesktopIcon("schedule", iconSize)); addTitleBar(m_scheduleViewFrame, i18n("Scheduled transactions")); m_scheduledView = new KScheduledView(m_scheduleViewFrame, "ScheduledView"); - connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_scheduledView, SLOT(slotReloadView())); - connect(m_scheduledView, SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, SLOT(slotSelectSchedule(const MyMoneySchedule&))); - connect(m_scheduledView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowScheduleContextMenu())); - connect(m_scheduledView, SIGNAL(enterSchedule()), kmymoney2, SLOT(slotScheduleEnter())); - connect(m_scheduledView, SIGNAL(skipSchedule()), kmymoney2, SLOT(slotScheduleSkip())); - connect(m_scheduledView, SIGNAL(editSchedule()), kmymoney2, SLOT(slotScheduleEdit())); + connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_scheduledView, TQT_SLOT(slotReloadView())); + connect(m_scheduledView, TQT_SIGNAL(scheduleSelected(const MyMoneySchedule&)), kmymoney2, TQT_SLOT(slotSelectSchedule(const MyMoneySchedule&))); + connect(m_scheduledView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowScheduleContextMenu())); + connect(m_scheduledView, TQT_SIGNAL(enterSchedule()), kmymoney2, TQT_SLOT(slotScheduleEnter())); + connect(m_scheduledView, TQT_SIGNAL(skipSchedule()), kmymoney2, TQT_SLOT(slotScheduleSkip())); + connect(m_scheduledView, TQT_SIGNAL(editSchedule()), kmymoney2, TQT_SLOT(slotScheduleEdit())); // Page 4 m_categoriesViewFrame = addVBoxPage( i18n("Categories"), i18n("Categories"), DesktopIcon("categories", iconSize)); addTitleBar(m_categoriesViewFrame, i18n("Categories")); m_categoriesView = new KCategoriesView(m_categoriesViewFrame, "CategoriesView"); - connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectInstitution(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, SLOT(slotAccountOpen(const MyMoneyObject&))); - connect(m_categoriesView, SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, SLOT(slotReparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); + connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(selectObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectInstitution(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowAccountContextMenu(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(openObject(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotAccountOpen(const MyMoneyObject&))); + connect(m_categoriesView, TQT_SIGNAL(reparent(const MyMoneyAccount&, const MyMoneyAccount&)), kmymoney2, TQT_SLOT(slotRetqparentAccount(const MyMoneyAccount&, const MyMoneyAccount&))); // Page 5 m_payeesViewFrame = addVBoxPage( i18n("Payees"), i18n("Payees"), DesktopIcon("payee", iconSize)); addTitleBar(m_payeesViewFrame, i18n("Payees")); m_payeesView = new KPayeesView(m_payeesViewFrame, "PayeesView"); - connect(kmymoney2, SIGNAL(payeeCreated(const QString&)), m_payeesView, SLOT(slotSelectPayeeAndTransaction(const QString&))); - connect(kmymoney2, SIGNAL(payeeRename()), m_payeesView, SLOT(slotStartRename())); - connect(m_payeesView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowPayeeContextMenu())); - connect(m_payeesView, SIGNAL(selectObjects(const QValueList<MyMoneyPayee>&)), kmymoney2, SLOT(slotSelectPayees(const QValueList<MyMoneyPayee>&))); - connect(m_payeesView, SIGNAL(transactionSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); + connect(kmymoney2, TQT_SIGNAL(payeeCreated(const TQString&)), m_payeesView, TQT_SLOT(slotSelectPayeeAndTransaction(const TQString&))); + connect(kmymoney2, TQT_SIGNAL(payeeRename()), m_payeesView, TQT_SLOT(slotStartRename())); + connect(m_payeesView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowPayeeContextMenu())); + connect(m_payeesView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyPayee>&)), kmymoney2, TQT_SLOT(slotSelectPayees(const TQValueList<MyMoneyPayee>&))); + connect(m_payeesView, TQT_SIGNAL(transactionSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); // Page 6 m_ledgerViewFrame = addVBoxPage( i18n("Ledgers"), i18n("Ledgers"), DesktopIcon("ledger", iconSize)); m_ledgerView = new KGlobalLedgerView(m_ledgerViewFrame, "GlobalLedgerView"); - connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_ledgerView, SIGNAL(openContextMenu()), kmymoney2, SLOT(slotShowTransactionContextMenu())); - connect(m_ledgerView, SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&))); - connect(m_ledgerView, SIGNAL(newTransaction()), kmymoney2, SLOT(slotTransactionsNew())); - connect(m_ledgerView, SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, SLOT(slotTransactionsCancelOrEnter(bool&))); - connect(m_ledgerView, SIGNAL(startEdit()), kmymoney2, SLOT(slotTransactionsEdit())); - connect(m_ledgerView, SIGNAL(endEdit()), kmymoney2, SLOT(slotTransactionsEnter())); - connect(m_ledgerView, SIGNAL(toggleReconciliationFlag()), kmymoney2, SLOT(slotToggleReconciliationFlag())); - connect(this, SIGNAL(reconciliationStarts(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&)), m_ledgerView, SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const QDate&, const MyMoneyMoney&))); - connect(kmymoney2, SIGNAL(selectAllTransactions()), m_ledgerView, SLOT(slotSelectAllTransactions())); + connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_ledgerView, TQT_SIGNAL(openContextMenu()), kmymoney2, TQT_SLOT(slotShowTransactionContextMenu())); + connect(m_ledgerView, TQT_SIGNAL(transactionsSelected(const KMyMoneyRegister::SelectedTransactions&)), kmymoney2, TQT_SLOT(slotSelectTransactions(const KMyMoneyRegister::SelectedTransactions&))); + connect(m_ledgerView, TQT_SIGNAL(newTransaction()), kmymoney2, TQT_SLOT(slotTransactionsNew())); + connect(m_ledgerView, TQT_SIGNAL(cancelOrEndEdit(bool&)), kmymoney2, TQT_SLOT(slotTransactionsCancelOrEnter(bool&))); + connect(m_ledgerView, TQT_SIGNAL(startEdit()), kmymoney2, TQT_SLOT(slotTransactionsEdit())); + connect(m_ledgerView, TQT_SIGNAL(endEdit()), kmymoney2, TQT_SLOT(slotTransactionsEnter())); + connect(m_ledgerView, TQT_SIGNAL(toggleReconciliationFlag()), kmymoney2, TQT_SLOT(slotToggleReconciliationFlag())); + connect(this, TQT_SIGNAL(reconciliationStarts(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&)), m_ledgerView, TQT_SLOT(slotSetReconcileAccount(const MyMoneyAccount&, const TQDate&, const MyMoneyMoney&))); + connect(kmymoney2, TQT_SIGNAL(selectAllTransactions()), m_ledgerView, TQT_SLOT(slotSelectAllTransactions())); // Page 7 m_investmentViewFrame = addVBoxPage( i18n("Investments"), i18n("Investments"), DesktopIcon("investments", iconSize)); addTitleBar(m_investmentViewFrame, i18n("Investments")); m_investmentView = new KInvestmentView(m_investmentViewFrame, "InvestmentView"); - connect(m_investmentView, SIGNAL(accountSelected(const QString&, const QString&)), - this, SLOT(slotLedgerSelected(const QString&, const QString&))); - connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_investmentView, SIGNAL(investmentRightMouseClick()), kmymoney2, SLOT(slotShowInvestmentContextMenu())); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const TQString&, const TQString&)), + this, TQT_SLOT(slotLedgerSelected(const TQString&, const TQString&))); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_investmentView, TQT_SIGNAL(investmentRightMouseClick()), kmymoney2, TQT_SLOT(slotShowInvestmentContextMenu())); // Page 8 m_reportsViewFrame = addVBoxPage(i18n("Reports"), i18n("Reports"), @@ -242,10 +242,10 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) DesktopIcon("budget", iconSize)); addTitleBar(m_budgetViewFrame, i18n("Budgets")); m_budgetView = new KBudgetView(m_budgetViewFrame, "BudgetView"); - connect(kmymoney2, SIGNAL(fileLoaded(const KURL&)), m_budgetView, SLOT(slotRefreshView())); - connect(m_budgetView, SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, SLOT(slotShowBudgetContextMenu())); - connect(m_budgetView, SIGNAL(selectObjects(const QValueList<MyMoneyBudget>&)), kmymoney2, SLOT(slotSelectBudget(const QValueList<MyMoneyBudget>&))); - connect(kmymoney2, SIGNAL(budgetRename()), m_budgetView, SLOT(slotStartRename())); + connect(kmymoney2, TQT_SIGNAL(fileLoaded(const KURL&)), m_budgetView, TQT_SLOT(slotRefreshView())); + connect(m_budgetView, TQT_SIGNAL(openContextMenu(const MyMoneyObject&)), kmymoney2, TQT_SLOT(slotShowBudgetContextMenu())); + connect(m_budgetView, TQT_SIGNAL(selectObjects(const TQValueList<MyMoneyBudget>&)), kmymoney2, TQT_SLOT(slotSelectBudget(const TQValueList<MyMoneyBudget>&))); + connect(kmymoney2, TQT_SIGNAL(budgetRename()), m_budgetView, TQT_SLOT(slotStartRename())); // Page 10 m_forecastViewFrame = addVBoxPage( i18n("Forecast"), i18n("Forecast"), @@ -254,19 +254,19 @@ KMyMoneyView::KMyMoneyView(QWidget *parent, const char *name) m_forecastView = new KForecastView(m_forecastViewFrame, "ForecastView"); // get rid of the title text - QWidget* widget = dynamic_cast<QWidget*>(child("KJanusWidgetTitleLabel", "QLabel")); + TQWidget* widget = dynamic_cast<TQWidget*>(child("KJanusWidgetTitleLabel", TQLABEL_OBJECT_NAME_STRING)); if(widget) widget->hide(); // and the separator below it - widget = dynamic_cast<QWidget*>(child(0, "KSeparator")); + widget = dynamic_cast<TQWidget*>(child(0, "KSeparator")); if(widget) widget->hide(); // select the page first, before connecting the aboutToShow signal // because we don't want to override the information stored in the config file showPage(0); - connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotRememberPage(QWidget*))); + connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotRememberPage(TQWidget*))); m_inConstructor = false; } @@ -276,24 +276,24 @@ KMyMoneyView::~KMyMoneyView() removeStorage(); } -void KMyMoneyView::addTitleBar(QWidget* parent, const QString& title) +void KMyMoneyView::addTitleBar(TQWidget* tqparent, const TQString& title) { - KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( parent, "titleLabel" ); - label->setMinimumSize( QSize( 100, 30 ) ); + KMyMoneyTitleLabel* label = new KMyMoneyTitleLabel( tqparent, "titleLabel" ); + label->setMinimumSize( TQSize( 100, 30 ) ); label->setRightImageFile("pics/titlelabel_background.png" ); label->setText(title); } void KMyMoneyView::showTitleBar(bool show) { - QObjectList *l = queryList( 0, "titleLabel" ); - QObjectListIterator it( *l ); // iterate over the labels - QObject *obj; + TQObjectList *l = queryList( 0, "titleLabel" ); + TQObjectListIterator it( *l ); // iterate over the labels + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... ++it; - ((QWidget*)obj)->setShown( show ); + ((TQWidget*)obj)->setShown( show ); } delete l; // delete the list, not the objects } @@ -337,7 +337,7 @@ bool KMyMoneyView::canPrint(void) return rc; } -bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, QString& tooltip) const +bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransactions& /* list */, TQString& tooltip) const { // we can only create transactions in the ledger view so // we check that this is the active page @@ -350,7 +350,7 @@ bool KMyMoneyView::canCreateTransactions(const KMyMoneyRegister::SelectedTransac return rc; } -bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { // we can only modify transactions in the ledger view so // we check that this is the active page @@ -365,7 +365,7 @@ bool KMyMoneyView::canModifyTransactions(const KMyMoneyRegister::SelectedTransac return rc; } -bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { // we can only duplicate transactions in the ledger view so // we check that this is the active page @@ -380,7 +380,7 @@ bool KMyMoneyView::canDuplicateTransactions(const KMyMoneyRegister::SelectedTran return rc; } -bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, QString& tooltip) const +bool KMyMoneyView::canEditTransactions(const KMyMoneyRegister::SelectedTransactions& list, TQString& tooltip) const { bool rc; // we can only edit transactions in the ledger view so @@ -397,7 +397,7 @@ bool KMyMoneyView::createNewTransaction(void) { bool rc = false; KMyMoneyRegister::SelectedTransactions list; - QString txt; + TQString txt; if(canCreateTransactions(list, txt)) { rc = m_ledgerView->selectEmptyTransaction(); } @@ -407,7 +407,7 @@ bool KMyMoneyView::createNewTransaction(void) TransactionEditor* KMyMoneyView::startEdit(const KMyMoneyRegister::SelectedTransactions& list) { TransactionEditor* editor = 0; - QString txt; + TQString txt; if(canEditTransactions(list, txt) || canCreateTransactions(list, txt)) { editor = m_ledgerView->startEdit(list); } @@ -451,16 +451,16 @@ void KMyMoneyView::enableViews(int state) emit viewStateChanged(state != 0); } -void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& transaction) +void KMyMoneyView::slotLedgerSelected(const TQString& _accId, const TQString& transaction) { MyMoneyAccount acc = MyMoneyFile::instance()->account(_accId); - QString accId(_accId); + TQString accId(_accId); switch(acc.accountType()) { case MyMoneyAccount::Stock: // if a stock account is selected, we show the - // the corresponding parent (investment) account - acc = MyMoneyFile::instance()->account(acc.parentAccountId()); + // the corresponding tqparent (investment) account + acc = MyMoneyFile::instance()->account(acc.tqparentAccountId()); accId = acc.id(); // tricky fall through here @@ -492,19 +492,19 @@ void KMyMoneyView::slotLedgerSelected(const QString& _accId, const QString& tran } } -void KMyMoneyView::slotPayeeSelected(const QString& payee, const QString& account, const QString& transaction) +void KMyMoneyView::slotPayeeSelected(const TQString& payee, const TQString& account, const TQString& transaction) { showPage(pageIndex(m_payeesViewFrame)); m_payeesView->slotSelectPayeeAndTransaction(payee, account, transaction); } -void KMyMoneyView::slotScheduleSelected(const QString& scheduleId) +void KMyMoneyView::slotScheduleSelected(const TQString& scheduleId) { MyMoneySchedule sched = MyMoneyFile::instance()->schedule(scheduleId); kmymoney2->slotSelectSchedule(sched); } -void KMyMoneyView::slotShowReport(const QString& reportid) +void KMyMoneyView::slotShowReport(const TQString& reportid) { showPage(pageIndex(m_reportsViewFrame)); m_reportsView->slotOpenReport(reportid); @@ -536,7 +536,7 @@ void KMyMoneyView::closeFile(void) m_fileOpen = false; } -void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len) +void KMyMoneyView::ungetString(TQIODevice *qfile, char *buf, int len) { buf = &buf[len-1]; while(len--) { @@ -546,7 +546,7 @@ void KMyMoneyView::ungetString(QIODevice *qfile, char *buf, int len) bool KMyMoneyView::readFile(const KURL& url) { - QString filename; + TQString filename; // newStorage(); m_fileOpen = false; @@ -583,7 +583,7 @@ bool KMyMoneyView::readFile(const KURL& url) } else { if(!KIO::NetAccess::download(url, filename, NULL)) { KMessageBox::detailedError(this, - i18n("Error while loading file '%1'!").arg(url.url()), + i18n("Error while loading file '%1'!").tqarg(url.url()), KIO::NetAccess::lastErrorString(), i18n("File access error")); return false; @@ -592,26 +592,26 @@ bool KMyMoneyView::readFile(const KURL& url) // let's glimps into the file to figure out, if it's one // of the old (uncompressed) or new (compressed) files. - QFile file(filename); - QFileInfo info(file); + TQFile file(filename); + TQFileInfo info(file); if(!info.isFile()) { - QString msg=i18n("<b>%1</b> is not a KMyMoney file.").arg(filename); - KMessageBox::error(this, QString("<p>")+msg, i18n("Filetype Error")); + TQString msg=i18n("<b>%1</b> is not a KMyMoney file.").tqarg(filename); + KMessageBox::error(this, TQString("<p>")+msg, i18n("Filetype Error")); return false; } m_fmode = 0600; - m_fmode |= info.permission(QFileInfo::ReadGroup) ? 040 : 0; - m_fmode |= info.permission(QFileInfo::WriteGroup) ? 020 : 0; - m_fmode |= info.permission(QFileInfo::ReadOther) ? 004 : 0; - m_fmode |= info.permission(QFileInfo::WriteOther) ? 002 : 0; + m_fmode |= info.permission(TQFileInfo::ReadGroup) ? 040 : 0; + m_fmode |= info.permission(TQFileInfo::WriteGroup) ? 020 : 0; + m_fmode |= info.permission(TQFileInfo::ReadOther) ? 004 : 0; + m_fmode |= info.permission(TQFileInfo::WriteOther) ? 002 : 0; - QIODevice *qfile = 0; + TQIODevice *qfile = 0; bool rc = true; // There's a problem with the KFilterDev and KGPGFile classes: // One supports the at(n) member but not ungetch() together with // readBlock() and the other does not provide an at(n) method but - // supports readBlock() that considers the ungetch() buffer. QFile + // supports readBlock() that considers the ungetch() buffer. TQFile // supports everything so this is not a problem. We solve the problem // for now by keeping track of which method can be used. bool haveAt = true; @@ -619,29 +619,29 @@ bool KMyMoneyView::readFile(const KURL& url) emit kmmFilePlugin (preOpen); ::timetrace("start reading file"); if(file.open(IO_ReadOnly)) { - QByteArray hdr(2); + TQByteArray hdr(2); int cnt; cnt = file.readBlock(hdr.data(), 2); file.close(); if(cnt == 2) { - if(QString(hdr) == QString("\037\213")) { // gzipped? + if(TQString(hdr) == TQString("\037\213")) { // gzipped? ::timetrace("detected GZIP"); qfile = KFilterDev::deviceForFile(filename, COMPRESSION_MIME_TYPE); - } else if(QString(hdr) == QString("--")){ // PGP ASCII armored? + } else if(TQString(hdr) == TQString("--")){ // PGP ASCII armored? ::timetrace("detected GPG"); if(KGPGFile::GPGAvailable()) { ::timetrace("have GPG"); - qfile = new KGPGFile(filename); + qfile = TQT_TQIODEVICE(new KGPGFile(filename)); haveAt = false; isEncrypted = true; } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").arg(filename))); - qfile = new QFile(file.name()); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("GPG is not available for decryption of file <b>%1</b>").tqarg(filename))); + qfile = TQT_TQIODEVICE(new TQFile(file.name())); } } else { // we can't use file directly, as we delete qfile later on - qfile = new QFile(file.name()); + qfile = TQT_TQIODEVICE(new TQFile(file.name())); } ::timetrace("open file"); @@ -656,9 +656,9 @@ bool KMyMoneyView::readFile(const KURL& url) // Ok, we got the first block of 8 bytes. Read in the two // unsigned long int's by preserving endianess. This is - // achieved by reading them through a QDataStream object - Q_INT32 magic0, magic1; - QDataStream s(hdr, IO_ReadOnly); + // achieved by reading them through a TQDataStream object + TQ_INT32 magic0, magic1; + TQDataStream s(hdr, IO_ReadOnly); s >> magic0; s >> magic1; @@ -689,9 +689,9 @@ bool KMyMoneyView::readFile(const KURL& url) qfile->at(0); else ungetString(qfile, hdr.data(), 70); - QRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>"); - QRegExp gncexp("<gnc-v(\\d+)"); - QCString txt(hdr, 70); + TQRegExp kmyexp("<!DOCTYPE KMYMONEY-FILE>"); + TQRegExp gncexp("<gnc-v(\\d+)"); + TQCString txt(hdr, 70); if(kmyexp.search(txt) != -1) { ::timetrace("is XML format"); pReader = new MyMoneyStorageXML; @@ -714,18 +714,18 @@ bool KMyMoneyView::readFile(const KURL& url) ::timetrace("done reading to memory"); } else { if(m_fileType == KmmBinary) { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains the old binary format used by KMyMoney. Please use an older version of KMyMoney (0.8.x) that still supports this format to convert it to the new XML based format.").tqarg(filename))); } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> contains an unknown file format!").tqarg(filename))); } rc = false; } } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot read from file <b>%1</b>!").tqarg(filename))); rc = false; } } catch (MyMoneyException *e) { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").arg(filename, e->what()))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("Cannot load file <b>%1</b>. Reason: %2").tqarg(filename, e->what()))); delete e; rc = false; } @@ -735,13 +735,13 @@ bool KMyMoneyView::readFile(const KURL& url) } qfile->close(); } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); rc = false; } delete qfile; } } else { - KMessageBox::sorry(this, QString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").arg(filename))); + KMessageBox::sorry(this, TQString("<qt>%1</qt>"). arg(i18n("File <b>%1</b> not found!").tqarg(filename))); rc = false; } @@ -775,7 +775,7 @@ bool KMyMoneyView::readFile(const KURL& url) return initializeStorage(); } -void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const QString& name) const +void KMyMoneyView::checkAccountName(const MyMoneyAccount& _acc, const TQString& name) const { MyMoneyFile* file = MyMoneyFile::instance(); if(_acc.name() != name) { @@ -805,7 +805,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { retry = false; break; case 1: // permanent error - KMessageBox::detailedError (this, i18n("Can't open database %1\n").arg(dbURL.prettyURL()), reader->lastError()); + KMessageBox::detailedError (this, i18n("Can't open database %1\n").tqarg(dbURL.prettyURL()), reader->lastError()); if (pDBMgr) { removeStorage(); delete pDBMgr; @@ -819,7 +819,7 @@ bool KMyMoneyView::openDatabase (const KURL& url) { } return false; } else { - QString options = dbURL.queryItem("options") + ",override"; + TQString options = dbURL.queryItem("options") + ",override"; dbURL.removeQueryItem("mode"); // now redundant dbURL.removeQueryItem("options"); dbURL.addQueryItem("options", options); @@ -911,7 +911,7 @@ bool KMyMoneyView::initializeStorage() // Check if we have to modify the file before we allow to work with it IMyMoneyStorage* s = MyMoneyFile::instance()->storage(); while (s->fileFixVersion() < s->currentFixVersion()) { - qDebug("%s", (QString("testing fileFixVersion %1 < %2").arg(s->fileFixVersion()).arg(s->currentFixVersion())).data()); + qDebug("%s", (TQString("testing fileFixVersion %1 < %2").tqarg(s->fileFixVersion()).tqarg(s->currentFixVersion())).data()); switch (s->fileFixVersion()) { case 0: fixFile_0(); @@ -967,11 +967,11 @@ bool KMyMoneyView::initializeStorage() return true; } -void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const QString& keyList) +void KMyMoneyView::saveToLocalFile(TQFile* qfile, IMyMoneyStorageFormat* pWriter, bool plaintext, const TQString& keyList) { - QIODevice *dev = qfile; + TQIODevice *dev = TQT_TQIODEVICE(qfile); KFilterBase *base = 0; - QIODevice *statusDevice = dev; + TQIODevice *statusDevice = dev; bool encryptedOk = true; bool encryptRecover = false; @@ -983,23 +983,23 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, if(KMyMoneyGlobalSettings::encryptRecover()) { encryptRecover = true; - if(!KGPGFile::keyAvailable(QString(RECOVER_KEY_ID))) { - KMessageBox::sorry(this, QString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").arg(RECOVER_KEY_ID), i18n("GPG-Key not found")); + if(!KGPGFile::keyAvailable(TQString(RECOVER_KEY_ID))) { + KMessageBox::sorry(this, TQString("<p>")+i18n("You have selected to encrypt your data also with the KMyMoney recover key, but the key with id</p><p><center><b>%1</b></center></p>has not been found in your keyring at this time. Please make sure to import this key into your keyring. You can find it on the <a href=\"http://kmymoney2.sourceforge.net/\">KMyMoney web-site</a>. This time your data will not be encrypted with the KMyMoney recover key.").tqarg(RECOVER_KEY_ID), i18n("GPG-Key not found")); encryptRecover = false; } } - QStringList keys = QStringList::split(",", keyList); - QStringList::const_iterator it_s; + TQStringList keys = TQStringList::split(",", keyList); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.begin(); ++it_s) { if(!KGPGFile::keyAvailable(*it_s)) { - KMessageBox::sorry(this, QString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").arg(*it_s), i18n("GPG-Key not found")); + KMessageBox::sorry(this, TQString("<p>")+i18n("You have specified to encrypt your data for the user-id</p><p><center><b>%1</b>.</center></p>Unfortunately, a valid key for this user-id was not found in your keyring. Please make sure to import a valid key for this user-id. This time, encryption is disabled.").tqarg(*it_s), i18n("GPG-Key not found")); encryptedOk = false; } } if(encryptedOk == true) { - QString msg = QString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>."); + TQString msg = TQString("<p>") + i18n("You have configured to save your data in encrypted form using GPG. Please be aware, that this is a brand new feature which is yet untested. Make sure, you have the necessary understanding that you might loose all your data if you store it encrypted and cannot decrypt it later on! If unsure, answer <b>No</b>."); if(KMessageBox::questionYesNo(this, msg, i18n("Store GPG encrypted"), KStdGuiItem::yes(), KStdGuiItem::no(), "StoreEncrypted") == KMessageBox::No) { encryptedOk = false; @@ -1007,7 +1007,7 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, } } - int mask = umask((~m_fmode) & 0777); + int tqmask = umask((~m_fmode) & 0777); bool blocked = MyMoneyFile::instance()->signalsBlocked(); MyMoneyFile::instance()->blockSignals(true); MyMoneyFileTransaction ft; @@ -1017,8 +1017,8 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, base++; KGPGFile *kgpg = new KGPGFile(qfile->name()); if(kgpg) { - QStringList keys = QStringList::split(",", keyList); - QStringList::const_iterator it_s; + TQStringList keys = TQStringList::split(",", keyList); + TQStringList::const_iterator it_s; for(it_s = keys.begin(); it_s != keys.end(); ++it_s) { kgpg->addRecipient((*it_s).latin1()); } @@ -1027,11 +1027,11 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, } MyMoneyFile::instance()->setValue("kmm-encryption-key", keyList); } - statusDevice = dev = kgpg; + statusDevice = dev = TQT_TQIODEVICE(kgpg); if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); } } else if(!plaintext) { @@ -1039,26 +1039,26 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, base = KFilterBase::findFilterByMimeType( COMPRESSION_MIME_TYPE ); if(base) { qfile->close(); - base->setDevice(qfile, false); + base->setDevice(TQT_TQIODEVICE(qfile), false); // we need to reopen the file to set the mode inside the filter stuff dev = new KFilterDev(base, true); if(!dev || !dev->open(IO_WriteOnly)) { MyMoneyFile::instance()->blockSignals(blocked); delete dev; - throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Unable to open file '%1' for writing.").tqarg(qfile->name())); } statusDevice = base->device(); } } - umask(mask); + umask(tqmask); ft.commit(); pWriter->setProgressCallback(&KMyMoneyView::progressCallback); - dev->resetStatus(); + dev->resetqStatus(); pWriter->writeFile(dev, dynamic_cast<IMyMoneySerialize*> (MyMoneyFile::instance()->storage())); MyMoneyFile::instance()->blockSignals(blocked); if(statusDevice->status() != IO_Ok) { - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); } pWriter->setProgressCallback(0); @@ -1067,16 +1067,16 @@ void KMyMoneyView::saveToLocalFile(QFile* qfile, IMyMoneyStorageFormat* pWriter, dev->close(); if(statusDevice->status() != IO_Ok) { delete dev; - throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").arg(qfile->name())); + throw new MYMONEYEXCEPTION(i18n("Failure while writing to '%1'").tqarg(qfile->name())); } delete dev; } else qfile->close(); } -bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) +bool KMyMoneyView::saveFile(const KURL& url, const TQString& keyList) { - QString filename = url.path(); + TQString filename = url.path(); if (!fileOpen()) { KMessageBox::error(this, i18n("Tried to access a file when it's not open")); @@ -1090,7 +1090,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) "If you still want to use older versions of KMyMoney with your data files, " "please make sure you keep a backup-file of your finance data. " "If you want to abort this operation, please press Cancel now"), - QString::null, KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel) + TQString(), KStdGuiItem::cont(), "WarningNewFileVersion0.5") == KMessageBox::Cancel) return false; #endif @@ -1115,19 +1115,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) bool rc = true; try { if(! url.isValid()) { - throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").arg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Malformed URL '%1'").tqarg(url.url())); } if(url.isLocalFile()) { filename = url.path(); int fmode = 0600; gid_t gid = static_cast<gid_t>(-1); // don't change the group id (see "man 2 chown") - QFileInfo fi(filename); + TQFileInfo fi(filename); if(fi.exists()) { - fmode |= fi.permission(QFileInfo::ReadGroup) ? 040 : 0; - fmode |= fi.permission(QFileInfo::WriteGroup) ? 020 : 0; - fmode |= fi.permission(QFileInfo::ReadOther) ? 004 : 0; - fmode |= fi.permission(QFileInfo::WriteOther) ? 002 : 0; + fmode |= fi.permission(TQFileInfo::ReadGroup) ? 040 : 0; + fmode |= fi.permission(TQFileInfo::WriteGroup) ? 020 : 0; + fmode |= fi.permission(TQFileInfo::ReadOther) ? 004 : 0; + fmode |= fi.permission(TQFileInfo::WriteOther) ? 002 : 0; if(fi.groupId() != static_cast<uint>(-2)) gid = fi.groupId(); } @@ -1135,19 +1135,19 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) // create a new basic block here, so that the object qfile gets // deleted, before we reach the chown() call { - int mask = umask((~fmode) & 0777); + int tqmask = umask((~fmode) & 0777); KSaveFile qfile(filename, fmode); - umask(mask); + umask(tqmask); if(qfile.status() == 0) { try { saveToLocalFile(qfile.file(), pWriter, plaintext, keyList); } catch (MyMoneyException* e) { qfile.abort(); delete e; - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } else { - throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").arg(filename)); + throw new MYMONEYEXCEPTION(i18n("Unable to write changes to '%1'").tqarg(filename)); } } chown(filename, static_cast<uid_t>(-1), gid); @@ -1155,7 +1155,7 @@ bool KMyMoneyView::saveFile(const KURL& url, const QString& keyList) KTempFile tmpfile; saveToLocalFile(tmpfile.file(), pWriter, plaintext, keyList); if(!KIO::NetAccess::upload(tmpfile.name(), url, NULL)) - throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").arg(url.url())); + throw new MYMONEYEXCEPTION(i18n("Unable to upload to '%1'").tqarg(url.url())); tmpfile.unlink(); } m_fileType = KmmXML; @@ -1210,7 +1210,7 @@ bool KMyMoneyView::saveAsDatabase(const KURL& url) KMessageBox::detailedError (this, i18n("Can't open or create database %1\n" "Retry SaveAsDatabase and click Help" - " for further info").arg(url.prettyURL()), writer->lastError()); + " for further info").tqarg(url.prettyURL()), writer->lastError()); } delete writer; return (rc); @@ -1224,7 +1224,7 @@ bool KMyMoneyView::dirty(void) return MyMoneyFile::instance()->dirty(); } -bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDate& reconciliationDate, const MyMoneyMoney& endingBalance) +bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const TQDate& reconciliationDate, const MyMoneyMoney& endingBalance) { bool ok = true; @@ -1249,7 +1249,7 @@ bool KMyMoneyView::startReconciliation(const MyMoneyAccount& account, const QDat void KMyMoneyView::finishReconciliation(const MyMoneyAccount& /* account */) { - emit reconciliationStarts(MyMoneyAccount(), QDate(), MyMoneyMoney()); + emit reconciliationStarts(MyMoneyAccount(), TQDate(), MyMoneyMoney()); } void KMyMoneyView::newFile(void) @@ -1268,7 +1268,7 @@ void KMyMoneyView::slotSetBaseCurrency(const MyMoneySecurity& baseCurrency) MyMoneyFile::instance()->setBaseCurrency(baseCurrency); ft.commit(); } catch(MyMoneyException *e) { - KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").arg(baseCurrency.name()).arg(e->what()), i18n("Set base currency")); + KMessageBox::sorry(this, i18n("Cannot set %1 as base currency: %2").tqarg(baseCurrency.name()).tqarg(e->what()), i18n("Set base currency")); delete e; } } @@ -1282,15 +1282,15 @@ void KMyMoneyView::selectBaseCurrency(void) // check if we have a base currency. If not, we need to select one if(file->baseCurrency().id().isEmpty()) { KCurrencyEditDlg dlg(this, "CurrencyEditDlg"); - connect(&dlg, SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, SLOT(slotSetBaseCurrency(const MyMoneySecurity&))); + connect(&dlg, TQT_SIGNAL(selectBaseCurrency(const MyMoneySecurity&)), this, TQT_SLOT(slotSetBaseCurrency(const MyMoneySecurity&))); dlg.exec(); } if(!file->baseCurrency().id().isEmpty()) { // check that all accounts have a currency - QValueList<MyMoneyAccount> list; + TQValueList<MyMoneyAccount> list; file->accountList(list); - QValueList<MyMoneyAccount>::Iterator it; + TQValueList<MyMoneyAccount>::Iterator it; // don't forget those standard accounts list << file->asset(); @@ -1370,7 +1370,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("BAM", i18n("Bosnian Convertible Mark")), create); loadDefaultCurrency(MyMoneySecurity("BWP", i18n("Botswana Pula")), create); loadDefaultCurrency(MyMoneySecurity("BRL", i18n("Brazilian Real"), "R$"), create); - loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("GBP", i18n("British Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("BND", i18n("Brunei Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("BGL", i18n("Bulgarian Lev")), create); loadDefaultCurrency(MyMoneySecurity("BIF", i18n("Burundi Franc")), create); @@ -1385,7 +1385,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("CNY", i18n("Chinese Yuan Renminbi")), create); loadDefaultCurrency(MyMoneySecurity("COP", i18n("Colombian Peso")), create); loadDefaultCurrency(MyMoneySecurity("KMF", i18n("Comoros Franc")), create); - loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), QChar(0x20A1)), create); + loadDefaultCurrency(MyMoneySecurity("CRC", i18n("Costa Rican Colon"), TQChar(0x20A1)), create); loadDefaultCurrency(MyMoneySecurity("HRK", i18n("Croatian Kuna")), create); loadDefaultCurrency(MyMoneySecurity("CUP", i18n("Cuban Peso")), create); loadDefaultCurrency(MyMoneySecurity("CZK", i18n("Czech Koruna")), create); @@ -1393,18 +1393,18 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("DJF", i18n("Djibouti Franc")), create); loadDefaultCurrency(MyMoneySecurity("DOP", i18n("Dominican Peso")), create); loadDefaultCurrency(MyMoneySecurity("XCD", i18n("East Caribbean Dollar"), "$"), create); - loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("EGP", i18n("Egyptian Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("SVC", i18n("El Salvador Colon")), create); loadDefaultCurrency(MyMoneySecurity("ERN", i18n("Eritrean Nakfa")), create); loadDefaultCurrency(MyMoneySecurity("EEK", i18n("Estonian Kroon")), create); loadDefaultCurrency(MyMoneySecurity("ETB", i18n("Ethiopian Birr")), create); - loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), QChar(0x20ac)), true); - loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("EUR", i18n("Euro"), TQChar(0x20ac)), true); + loadDefaultCurrency(MyMoneySecurity("FKP", i18n("Falkland Islands Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("FJD", i18n("Fiji Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("GMD", i18n("Gambian Dalasi")), create); loadDefaultCurrency(MyMoneySecurity("GEL", i18n("Georgian Lari")), create); loadDefaultCurrency(MyMoneySecurity("GHC", i18n("Ghanaian Cedi")), create); - loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("GIP", i18n("Gibraltar Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("GTQ", i18n("Guatemalan Quetzal")), create); loadDefaultCurrency(MyMoneySecurity("GWP", i18n("Guinea-Bissau Peso")), create); loadDefaultCurrency(MyMoneySecurity("GYD", i18n("Guyanan Dollar"), "$"), create); @@ -1413,21 +1413,21 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("HKD", i18n("Hong Kong Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("HUF", i18n("Hungarian Forint"), "HUF", 1, 1, 100), create); loadDefaultCurrency(MyMoneySecurity("ISK", i18n("Iceland Krona")), create); - loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), QChar(0x20A8)), create); + loadDefaultCurrency(MyMoneySecurity("INR", i18n("Indian Rupee"), TQChar(0x20A8)), create); loadDefaultCurrency(MyMoneySecurity("IDR", i18n("Indonesian Rupiah"), "IDR", 100, 1), create); loadDefaultCurrency(MyMoneySecurity("IRR", i18n("Iranian Rial"), "IRR", 1, 1), create); loadDefaultCurrency(MyMoneySecurity("IQD", i18n("Iraqi Dinar"), "IQD", 1000, 1000), create); - loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), QChar(0x20AA)), create); + loadDefaultCurrency(MyMoneySecurity("ILS", i18n("Israeli New Shekel"), TQChar(0x20AA)), create); loadDefaultCurrency(MyMoneySecurity("JMD", i18n("Jamaican Dollar"), "$"), create); - loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), QChar(0x00A5), 100, 1), create); + loadDefaultCurrency(MyMoneySecurity("JPY", i18n("Japanese Yen"), TQChar(0x00A5), 100, 1), create); loadDefaultCurrency(MyMoneySecurity("JOD", i18n("Jordanian Dinar"), "JOD", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("KZT", i18n("Kazakhstan Tenge")), create); loadDefaultCurrency(MyMoneySecurity("KES", i18n("Kenyan Shilling")), create); loadDefaultCurrency(MyMoneySecurity("KWD", i18n("Kuwaiti Dinar"), "KWD", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("KGS", i18n("Kyrgyzstan Som")), create); - loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), QChar(0x20AD)), create); + loadDefaultCurrency(MyMoneySecurity("LAK", i18n("Laos Kip"), TQChar(0x20AD)), create); loadDefaultCurrency(MyMoneySecurity("LVL", i18n("Latvian Lats")), create); - loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("LBP", i18n("Lebanese Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("LSL", i18n("Lesotho Loti")), create); loadDefaultCurrency(MyMoneySecurity("LRD", i18n("Liberian Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("LYD", i18n("Libyan Dinar"), "LYD", 1000, 1000), create); @@ -1443,7 +1443,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("MUR", i18n("Mauritius Rupee")), create); loadDefaultCurrency(MyMoneySecurity("MXN", i18n("Mexican Peso"), "$"), create); loadDefaultCurrency(MyMoneySecurity("MDL", i18n("Moldavian Leu")), create); - loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), QChar(0x20AE)), create); + loadDefaultCurrency(MyMoneySecurity("MNT", i18n("Mongolian Tugrik"), TQChar(0x20AE)), create); loadDefaultCurrency(MyMoneySecurity("MAD", i18n("Moroccan Dirham")), create); loadDefaultCurrency(MyMoneySecurity("MZM", i18n("Mozambique Metical")), create); loadDefaultCurrency(MyMoneySecurity("MMK", i18n("Myanmar Kyat")), create); @@ -1451,8 +1451,8 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("NPR", i18n("Nepalese Rupee")), create); loadDefaultCurrency(MyMoneySecurity("NZD", i18n("New Zealand Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("NIC", i18n("Nicaraguan Cordoba Oro")), create); - loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), QChar(0x20A6)), create); - loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), QChar(0x20A9)), create); + loadDefaultCurrency(MyMoneySecurity("NGN", i18n("Nigerian Naira"), TQChar(0x20A6)), create); + loadDefaultCurrency(MyMoneySecurity("KPW", i18n("North Korean Won"), TQChar(0x20A9)), create); loadDefaultCurrency(MyMoneySecurity("NOK", i18n("Norwegian Kroner"), "kr"), create); loadDefaultCurrency(MyMoneySecurity("OMR", i18n("Omani Rial"), "OMR", 1000, 1000), create); loadDefaultCurrency(MyMoneySecurity("PKR", i18n("Pakistan Rupee")), create); @@ -1460,9 +1460,9 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("PGK", i18n("Papua New Guinea Kina")), create); loadDefaultCurrency(MyMoneySecurity("PYG", i18n("Paraguay Guarani")), create); loadDefaultCurrency(MyMoneySecurity("PEN", i18n("Peruvian Nuevo Sol")), create); - loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), QChar(0x20B1)), create); + loadDefaultCurrency(MyMoneySecurity("PHP", i18n("Philippine Peso"), TQChar(0x20B1)), create); loadDefaultCurrency(MyMoneySecurity("PLN", i18n("Polish Zloty")), create); - loadDefaultCurrency(MyMoneySecurity("QAR", i18n("Qatari Rial")), create); + loadDefaultCurrency(MyMoneySecurity("TQAR", i18n("Qatari Rial")), create); loadDefaultCurrency(MyMoneySecurity("RON", i18n("Romanian Leu (new)")), true); loadDefaultCurrency(MyMoneySecurity("RUB", i18n("Russian Ruble")), true); loadDefaultCurrency(MyMoneySecurity("RWF", i18n("Rwanda Franc")), create); @@ -1477,19 +1477,19 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("SBD", i18n("Solomon Islands Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("SOS", i18n("Somali Shilling")), create); loadDefaultCurrency(MyMoneySecurity("ZAR", i18n("South African Rand")), create); - loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), QChar(0x20A9)), create); + loadDefaultCurrency(MyMoneySecurity("KRW", i18n("South Korean Won"), TQChar(0x20A9)), create); loadDefaultCurrency(MyMoneySecurity("LKR", i18n("Sri Lanka Rupee")), create); - loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("SHP", i18n("St. Helena Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("SDD", i18n("Sudanese Dinar")), create); loadDefaultCurrency(MyMoneySecurity("SRG", i18n("Suriname Guilder")), create); loadDefaultCurrency(MyMoneySecurity("SZL", i18n("Swaziland Lilangeni")), create); loadDefaultCurrency(MyMoneySecurity("SEK", i18n("Swedish Krona")), create); loadDefaultCurrency(MyMoneySecurity("CHF", i18n("Swiss Franc"), "SFr"), create); - loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), QChar(0x00A3)), create); + loadDefaultCurrency(MyMoneySecurity("SYP", i18n("Syrian Pound"), TQChar(0x00A3)), create); loadDefaultCurrency(MyMoneySecurity("TWD", i18n("Taiwan Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("TJS", i18n("Tajikistan Somani")), create); loadDefaultCurrency(MyMoneySecurity("TZS", i18n("Tanzanian Shilling")), create); - loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), QChar(0x0E3F)), create); + loadDefaultCurrency(MyMoneySecurity("THB", i18n("Thai Baht"), TQChar(0x0E3F)), create); loadDefaultCurrency(MyMoneySecurity("TOP", i18n("Tongan Pa'anga")), create); loadDefaultCurrency(MyMoneySecurity("TTD", i18n("Trinidad and Tobago Dollar"), "$"), create); loadDefaultCurrency(MyMoneySecurity("TND", i18n("Tunisian Dinar"), "TND", 1000, 1000), create); @@ -1503,7 +1503,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("UZS", i18n("Uzbekistani Sum")), create); loadDefaultCurrency(MyMoneySecurity("VUV", i18n("Vanuatu Vatu")), create); loadDefaultCurrency(MyMoneySecurity("VEB", i18n("Venezuelan Bolivar")), create); - loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), QChar(0x20AB)), create); + loadDefaultCurrency(MyMoneySecurity("VND", i18n("Vietnamese Dong"), TQChar(0x20AB)), create); loadDefaultCurrency(MyMoneySecurity("YUM", i18n("Yugoslav Dinar")), create); loadDefaultCurrency(MyMoneySecurity("ZMK", i18n("Zambian Kwacha")), create); loadDefaultCurrency(MyMoneySecurity("ZWD", i18n("Zimbabwe Dollar"), "$"), create); @@ -1514,7 +1514,7 @@ void KMyMoneyView::loadDefaultCurrencies(void) loadDefaultCurrency(MyMoneySecurity("XAG", i18n("Silver"), "XAG", 1, 1000000), create); } -void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, const QString& sym, const QDate& date, const MyMoneyMoney& rate, const QString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) +void KMyMoneyView::loadAncientCurrency(const TQString& id, const TQString& name, const TQString& sym, const TQDate& date, const MyMoneyMoney& rate, const TQString& newId, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) { MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyPrice price(id, newId, date, rate, "KMyMoney"); @@ -1544,34 +1544,34 @@ void KMyMoneyView::loadAncientCurrency(const QString& id, const QString& name, c void KMyMoneyView::loadAncientCurrencies(void) { - loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", QDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR"); - loadAncientCurrency("DEM", i18n("German Mark"), "DM", QDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR"); - loadAncientCurrency("FRF", i18n("French Franc"), "FF", QDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR"); - loadAncientCurrency("ITL", i18n("Italian Lira"), QChar(0x20A4), QDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR"); - loadAncientCurrency("ESP", i18n("Spanish Peseta"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR"); - loadAncientCurrency("NLG", i18n("Dutch Guilder"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR"); - loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); - loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", QDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); - loadAncientCurrency("PTE", i18n("Portuguese Escudo"), QString(), QDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR"); - loadAncientCurrency("IEP", i18n("Irish Pound"), QChar(0x00A3), QDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR"); - loadAncientCurrency("FIM", i18n("Finnish Markka"), QString(), QDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR"); - loadAncientCurrency("GRD", i18n("Greek Drachma"), QChar(0x20AF), QDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR"); + loadAncientCurrency("ATS", i18n("Austrian Schilling"), "ÖS", TQDate(1998,12,31), MyMoneyMoney(10000, 137603), "EUR"); + loadAncientCurrency("DEM", i18n("German Mark"), "DM", TQDate(1998,12,31), MyMoneyMoney(100000, 195583), "EUR"); + loadAncientCurrency("FRF", i18n("French Franc"), "FF", TQDate(1998,12,31), MyMoneyMoney(100000, 655957), "EUR"); + loadAncientCurrency("ITL", i18n("Italian Lira"), TQChar(0x20A4), TQDate(1998,12,31), MyMoneyMoney(100, 193627), "EUR"); + loadAncientCurrency("ESP", i18n("Spanish Peseta"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 166386), "EUR"); + loadAncientCurrency("NLG", i18n("Dutch Guilder"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 220371), "EUR"); + loadAncientCurrency("BEF", i18n("Belgian Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); + loadAncientCurrency("LUF", i18n("Luxembourg Franc"), "Fr", TQDate(1998,12,31), MyMoneyMoney(10000, 403399), "EUR"); + loadAncientCurrency("PTE", i18n("Portuguese Escudo"), TQString(), TQDate(1998,12,31), MyMoneyMoney(1000, 200482), "EUR"); + loadAncientCurrency("IEP", i18n("Irish Pound"), TQChar(0x00A3), TQDate(1998,12,31), MyMoneyMoney(1000000, 787564), "EUR"); + loadAncientCurrency("FIM", i18n("Finnish Markka"), TQString(), TQDate(1998,12,31), MyMoneyMoney(100000, 594573), "EUR"); + loadAncientCurrency("GRD", i18n("Greek Drachma"), TQChar(0x20AF), TQDate(1998,12,31), MyMoneyMoney(100, 34075), "EUR"); - loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", QDate(2005,6,30), MyMoneyMoney(1, 10000), "RON"); + loadAncientCurrency("ROL", i18n("Romanian Leu"), "ROL", TQDate(2005,6,30), MyMoneyMoney(1, 10000), "RON"); - loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", QDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB"); + loadAncientCurrency("RUR", i18n("Russian Ruble (old)"), "RUR", TQDate(1998, 1, 1), MyMoneyMoney(1, 1000), "RUB"); - loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", QDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR"); + loadAncientCurrency("SIT", i18n("Slovenian Tolar"), "SIT", TQDate(2006,12,31), MyMoneyMoney(100, 23964), "EUR"); // Source: http://www.tf-portfoliosolutions.net/products/turkishlira.aspx - loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", QDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY"); + loadAncientCurrency("TRL", i18n("Turkish Lira"), "TL", TQDate(2004,12,31), MyMoneyMoney(1,1000000), "TRY"); // Source: http://www.focus.de/finanzen/news/malta-und-zypern_aid_66058.html - loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", QDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); - loadAncientCurrency("CYP", i18n("Cyprus Pound"), QString("C%1").arg(QChar(0x00A3)), QDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); + loadAncientCurrency("MTL", i18n("Maltese Lira"), "MTL", TQDate(2008,1,1), MyMoneyMoney(429300,1000000), "EUR"); + loadAncientCurrency("CYP", i18n("Cyprus Pound"), TQString("C%1").tqarg(TQChar(0x00A3)), TQDate(2008,1,1), MyMoneyMoney(585274,1000000), "EUR"); // Source: http://www.focus.de/finanzen/news/waehrungszone-slowakei-ist-neuer-euro-staat_aid_359025.html - loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", QDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); + loadAncientCurrency("SKK", i18n("Slovak Koruna"), "SKK", TQDate(2008,12,31), MyMoneyMoney(1000,30126), "EUR"); } void KMyMoneyView::viewUp(void) @@ -1580,7 +1580,7 @@ void KMyMoneyView::viewUp(void) return; } -void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/) +void KMyMoneyView::viewAccountList(const TQString& /*selectAccount*/) { if(pageIndex(m_accountsViewFrame) != activePageIndex()) showPage(1); @@ -1591,13 +1591,13 @@ void KMyMoneyView::viewAccountList(const QString& /*selectAccount*/) void KMyMoneyView::slotRefreshViews() { // turn off sync between ledger and investment view - disconnect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&))); - disconnect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&))); + disconnect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + disconnect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); // TODO turn sync between ledger and investment view if selected by user if(KMyMoneyGlobalSettings::syncLedgerInvestment()) { - connect(m_investmentView, SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, SLOT(slotSelectAccount(const MyMoneyObject&))); - connect(m_ledgerView, SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_investmentView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_ledgerView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); + connect(m_ledgerView, TQT_SIGNAL(accountSelected(const MyMoneyObject&)), m_investmentView, TQT_SLOT(slotSelectAccount(const MyMoneyObject&))); } showTitleBar(KMyMoneyGlobalSettings::showTitleBar()); @@ -1623,12 +1623,12 @@ void KMyMoneyView::slotShowTransactionDetail(bool detailed) } -void KMyMoneyView::progressCallback(int current, int total, const QString& msg) +void KMyMoneyView::progressCallback(int current, int total, const TQString& msg) { kmymoney2->progressCallback(current, total, msg); } -void KMyMoneyView::slotRememberPage(QWidget* w) +void KMyMoneyView::slotRememberPage(TQWidget* w) { KConfig *config = KGlobal::config(); config->setGroup("Last Use Settings"); @@ -1645,22 +1645,22 @@ void KMyMoneyView::fixFile_2(void) MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyTransactionFilter filter; filter.setReportAllSplits( false ); - QValueList<MyMoneyTransaction> transactionList; + TQValueList<MyMoneyTransaction> transactionList; file->transactionList(transactionList, filter); // scan the transactions and modify transactions with two splits // which reference an account and a category to have the memo text // of the account. - QValueList<MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneyTransaction>::Iterator it_t; int count = 0; for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) { if((*it_t).splitCount() == 2) { - QString accountId; - QString categoryId; - QString accountMemo; - QString categoryMemo; - const QValueList<MyMoneySplit>& splits = (*it_t).splits(); - QValueList<MyMoneySplit>::const_iterator it_s; + TQString accountId; + TQString categoryId; + TQString accountMemo; + TQString categoryMemo; + const TQValueList<MyMoneySplit>& splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::const_iterator it_s; for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyAccount acc = file->account((*it_s).accountId()); if(acc.isIncomeExpense()) { @@ -1688,23 +1688,23 @@ void KMyMoneyView::fixFile_2(void) void KMyMoneyView::fixFile_1(void) { - // we need to fix reports. If the account filter list contains + // we need to fix reports. If the account filter list tqcontains // investment accounts, we need to add the stock accounts to the list // as well if we don't have the expert mode enabled if(!KMyMoneyGlobalSettings::expertMode()) { try { - QValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); - QValueList<MyMoneyReport>::iterator it_r; + TQValueList<MyMoneyReport> reports = MyMoneyFile::instance()->reportList(); + TQValueList<MyMoneyReport>::iterator it_r; for(it_r = reports.begin(); it_r != reports.end(); ++it_r) { - QStringList list; + TQStringList list; (*it_r).accounts(list); - QStringList missing; - QStringList::const_iterator it_a, it_b; + TQStringList missing; + TQStringList::const_iterator it_a, it_b; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.contains(*it_b)) { + if(!list.tqcontains(*it_b)) { missing.append(*it_b); } } @@ -1724,20 +1724,20 @@ void KMyMoneyView::fixFile_1(void) #if 0 if(!m_accountsView->allItemsSelected()) { // retrieve a list of selected accounts - QStringList list; + TQStringList list; m_accountsView->selectedItems(list); // if we're not in expert mode, we need to make sure // that all stock accounts for the selected investment // account are also selected if(!KMyMoneyGlobalSettings::expertMode()) { - QStringList missing; - QStringList::const_iterator it_a, it_b; + TQStringList missing; + TQStringList::const_iterator it_a, it_b; for(it_a = list.begin(); it_a != list.end(); ++it_a) { MyMoneyAccount acc = MyMoneyFile::instance()->account(*it_a); if(acc.accountType() == MyMoneyAccount::Investment) { for(it_b = acc.accountList().begin(); it_b != acc.accountList().end(); ++it_b) { - if(!list.contains(*it_b)) { + if(!list.tqcontains(*it_b)) { missing.append(*it_b); } } @@ -1764,13 +1764,13 @@ void KMyMoneyView::fixFile_0(void) */ MyMoneyFile* file = MyMoneyFile::instance(); - QValueList<MyMoneyAccount> accountList; + TQValueList<MyMoneyAccount> accountList; file->accountList(accountList); ::timetrace("Have account list"); - QValueList<MyMoneyAccount>::Iterator it_a; - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneyAccount>::Iterator it_a; + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); ::timetrace("Have schedule list"); - QValueList<MyMoneySchedule>::Iterator it_s; + TQValueList<MyMoneySchedule>::Iterator it_s; MyMoneyAccount equity = file->equity(); MyMoneyAccount asset = file->asset(); @@ -1784,15 +1784,15 @@ void KMyMoneyView::fixFile_0(void) } // until early before 0.8 release, the equity account was not saved to // the file. If we have an equity account with no sub-accounts but - // find and equity account that has equity() as it's parent, we reparent + // find and equity account that has equity() as it's tqparent, we reparent // this account. Need to move it to asset() first, because otherwise // MyMoneyFile::reparent would act as NOP. if(equityListEmpty && (*it_a).accountType() == MyMoneyAccount::Equity) { - if((*it_a).parentAccountId() == equity.id()) { + if((*it_a).tqparentAccountId() == equity.id()) { MyMoneyAccount acc = *it_a; - // tricky, force parent account to be empty so that we really - // can re-parent it - acc.setParentAccountId(QString()); + // tricky, force tqparent account to be empty so that we really + // can re-tqparent it + acc.setParentAccountId(TQString()); file->reparentAccount(acc, equity); kdDebug(2) << __func__ << " fixed account " << acc.id() << " reparented to " << equity.id() << endl; } @@ -1812,8 +1812,8 @@ void KMyMoneyView::fixFile_0(void) void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched) { MyMoneyTransaction t = sched.transaction(); - QValueList<MyMoneySplit> splitList = t.splits(); - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit> splitList = t.splits(); + TQValueList<MyMoneySplit>::ConstIterator it_s; bool updated = false; try { @@ -1844,7 +1844,7 @@ void KMyMoneyView::fixSchedule_0(MyMoneySchedule sched) if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) { kdDebug(2) << __func__ << " " << sched.id() << " " << (*it_s).id() << " should be 'not reconciled'" << endl; MyMoneySplit split = *it_s; - split.setReconcileDate(QDate()); + split.setReconcileDate(TQDate()); split.setReconcileFlag(MyMoneySplit::NotReconciled); t.modifySplit(split); updated = true; @@ -1884,7 +1884,7 @@ void KMyMoneyView::fixLoanAccount_0(MyMoneyAccount acc) i18n("The account \"%1\" was previously created as loan account but some information " "is missing. The new loan wizard will be started to collect all relevant " "information. Please use a KMyMoney version >= 0.8.7 and < 0.9 to correct the problem." - ).arg(acc.name()), + ).tqarg(acc.name()), i18n("Account problem")); throw new MYMONEYEXCEPTION("Fix LoanAccount0 not supported anymore"); @@ -1911,7 +1911,7 @@ void KMyMoneyView::createSchedule(MyMoneySchedule newSchedule, MyMoneyAccount& n // to the account pool. Note: the schedule code used to leave // this always the first split, but the loan code leaves it as // the second one. So I thought, searching is a good alternative .... - QValueList<MyMoneySplit>::ConstIterator it_s; + TQValueList<MyMoneySplit>::ConstIterator it_s; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { if((*it_s).accountId().isEmpty()) { MyMoneySplit s = (*it_s); @@ -1952,16 +1952,16 @@ void KMyMoneyView::fixTransactions_0(void) #endif ::timetrace("fixTransactions: get schedule list"); - QValueList<MyMoneySchedule> scheduleList = file->scheduleList(); + TQValueList<MyMoneySchedule> scheduleList = file->scheduleList(); ::timetrace("fixTransactions: get transaction list"); MyMoneyTransactionFilter filter; filter.setReportAllSplits( false ); - QValueList<MyMoneyTransaction> transactionList; + TQValueList<MyMoneyTransaction> transactionList; file->transactionList(transactionList, filter); ::timetrace("fixTransactions: have list"); - QValueList<MyMoneySchedule>::Iterator it_x; - QStringList interestAccounts; + TQValueList<MyMoneySchedule>::Iterator it_x; + TQStringList interestAccounts; KMSTATUS(i18n("Fix transactions")); kmymoney2->slotStatusProgressBar(0, scheduleList.count() + transactionList.count()); @@ -1970,12 +1970,12 @@ void KMyMoneyView::fixTransactions_0(void) // scan the schedules to find interest accounts for(it_x = scheduleList.begin(); it_x != scheduleList.end(); ++it_x) { MyMoneyTransaction t = (*it_x).transaction(); - QValueList<MyMoneySplit>::ConstIterator it_s; - QStringList accounts; + TQValueList<MyMoneySplit>::ConstIterator it_s; + TQStringList accounts; bool hasDuplicateAccounts = false; for(it_s = t.splits().begin(); it_s != t.splits().end(); ++it_s) { - if(accounts.contains((*it_s).accountId())) { + if(accounts.tqcontains((*it_s).accountId())) { hasDuplicateAccounts = true; kdDebug(2) << __func__ << " " << t.id() << " has multiple splits with account " << (*it_s).accountId() << endl; } else { @@ -1983,7 +1983,7 @@ void KMyMoneyView::fixTransactions_0(void) } if((*it_s).action() == MyMoneySplit::ActionInterest) { - if(interestAccounts.contains((*it_s).accountId()) == 0) { + if(interestAccounts.tqcontains((*it_s).accountId()) == 0) { interestAccounts << (*it_s).accountId(); } } @@ -1998,12 +1998,12 @@ void KMyMoneyView::fixTransactions_0(void) ::timetrace("fixTransactions: start loop"); // scan the transactions and modify loan transactions - QValueList<MyMoneyTransaction>::Iterator it_t; + TQValueList<MyMoneyTransaction>::Iterator it_t; for(it_t = transactionList.begin(); it_t != transactionList.end(); ++it_t) { const char *defaultAction = 0; - QValueList<MyMoneySplit> splits = (*it_t).splits(); - QValueList<MyMoneySplit>::Iterator it_s; - QStringList accounts; + TQValueList<MyMoneySplit> splits = (*it_t).splits(); + TQValueList<MyMoneySplit>::Iterator it_s; + TQStringList accounts; // check if base commodity is set. if not, set baseCurrency if((*it_t).commodity().isEmpty()) { @@ -2091,14 +2091,14 @@ void KMyMoneyView::fixTransactions_0(void) // and check if there are any duplicates in this transactions for(it_s = splits.begin(); it_s != splits.end(); ++it_s) { MyMoneyAccount splitAccount = file->account((*it_s).accountId()); - if(accounts.contains((*it_s).accountId())) { + if(accounts.tqcontains((*it_s).accountId())) { hasDuplicateAccounts = true; } else { accounts << (*it_s).accountId(); } // if this split references an interest account, the action // must be of type ActionInterest - if(interestAccounts.contains((*it_s).accountId())) { + if(interestAccounts.tqcontains((*it_s).accountId())) { if((*it_s).action() != MyMoneySplit::ActionInterest) { kdDebug(2) << __func__ << " " << (*it_t).id() << " contains an interest account (" << (*it_s).accountId() << ") but does not have ActionInterest" << endl; (*it_s).setAction(MyMoneySplit::ActionInterest); @@ -2175,10 +2175,10 @@ void KMyMoneyView::slotPrintView(void) m_homeView->slotPrintView(); } -KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& icon) +KMyMoneyViewBase* KMyMoneyView::addPage(const TQString& title, const TQString& icon) { const int iconSize = (KMyMoneyGlobalSettings::iconSize()+1)*16; - QFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize)); + TQFrame* frm = KJanusWidget::addVBoxPage(title, title, DesktopIcon(icon, iconSize)); return new KMyMoneyViewBase(frm, title.latin1(), title); } @@ -2189,8 +2189,8 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico // ---------------------------------------------------------------------------- // QT Includes -#include <qlayout.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqvbox.h> // ---------------------------------------------------------------------------- // KDE Includes @@ -2202,30 +2202,30 @@ KMyMoneyViewBase* KMyMoneyView::addPage(const QString& title, const QString& ico class KMyMoneyViewBase::Private { public: - QFrame* m_titleLine; + TQFrame* m_titleLine; KMyMoneyTitleLabel* m_titleLabel; - QVBoxLayout* m_viewLayout; + TQVBoxLayout* m_viewLayout; }; -KMyMoneyViewBase::KMyMoneyViewBase(QWidget* parent, const char* name, const QString& title) : - QWidget(parent, name), +KMyMoneyViewBase::KMyMoneyViewBase(TQWidget* tqparent, const char* name, const TQString& title) : + TQWidget(tqparent, name), d(new Private) { - d->m_viewLayout = new QVBoxLayout(this); + d->m_viewLayout = new TQVBoxLayout(this); d->m_viewLayout->setSpacing( 6 ); d->m_viewLayout->setMargin( 0 ); d->m_titleLabel = new KMyMoneyTitleLabel( this, "titleLabel" ); - d->m_titleLabel->setMinimumSize( QSize( 100, 30 ) ); + d->m_titleLabel->setMinimumSize( TQSize( 100, 30 ) ); d->m_titleLabel->setRightImageFile("pics/titlelabel_background.png" ); d->m_titleLabel->setText(title); d->m_viewLayout->addWidget( d->m_titleLabel ); #if 0 - d->m_titleLine = new QFrame( this, "titleLine" ); - d->m_titleLine->setFrameShape( QFrame::HLine ); - d->m_titleLine->setFrameShadow( QFrame::Sunken ); - d->m_titleLine->setFrameShape( QFrame::HLine ); + d->m_titleLine = new TQFrame( this, "titleLine" ); + d->m_titleLine->setFrameShape( TQFrame::HLine ); + d->m_titleLine->setFrameShadow( TQFrame::Sunken ); + d->m_titleLine->setFrameShape( TQFrame::HLine ); d->m_viewLayout->addWidget( d->m_titleLine ); #endif } @@ -2235,12 +2235,12 @@ KMyMoneyViewBase::~KMyMoneyViewBase() delete d; } -void KMyMoneyViewBase::addWidget(QWidget* w) +void KMyMoneyViewBase::addWidget(TQWidget* w) { d->m_viewLayout->addWidget(w); } -QVBoxLayout* KMyMoneyViewBase::layout(void) const +TQVBoxLayout* KMyMoneyViewBase::tqlayout(void) const { return d->m_viewLayout; } |