summaryrefslogtreecommitdiffstats
path: root/kmymoney2/kmymoney2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmymoney2/kmymoney2.cpp')
-rw-r--r--kmymoney2/kmymoney2.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kmymoney2/kmymoney2.cpp b/kmymoney2/kmymoney2.cpp
index f9e3bf9..67c4984 100644
--- a/kmymoney2/kmymoney2.cpp
+++ b/kmymoney2/kmymoney2.cpp
@@ -175,7 +175,7 @@ public:
TQString m_lastPayeeEntered;
};
-KMyMoney2App::KMyMoney2App(TQWidget * /*tqparent*/ , const char* name) :
+KMyMoney2App::KMyMoney2App(TQWidget * /*parent*/ , const char* name) :
KMainWindow(0, name),
DCOPObject("kmymoney2app"),
d(new Private),
@@ -849,7 +849,7 @@ void KMyMoney2App::slotFileNew(void)
}
}
-KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, const TQString& tqmask, KFile::Mode mode)
+KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, const TQString& mask, KFile::Mode mode)
{
KURL url;
TQString path(_path);
@@ -857,7 +857,7 @@ KURL KMyMoney2App::selectFile(const TQString& title, const TQString& _path, cons
if(path.isEmpty())
path = KGlobalSettings::documentPath();
- KFileDialog* dialog = new KFileDialog(path, tqmask, this, title, true);
+ KFileDialog* dialog = new KFileDialog(path, mask, this, title, true);
dialog->setMode(mode);
if(dialog->exec() == TQDialog::Accepted) {
@@ -2230,7 +2230,7 @@ void KMyMoney2App::slotInstitutionDelete(void)
}
}
-const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& tqparent) const
+const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const MyMoneyAccount& parent) const
{
static MyMoneyAccount nullAccount;
@@ -2241,15 +2241,15 @@ const MyMoneyAccount& KMyMoney2App::findAccount(const MyMoneyAccount& acc, const
if(!acc.id().isEmpty()) {
return file->account(acc.id());
}
- // collect the parents. in case tqparent does not have an id, we scan the all top-level accounts
- if(tqparent.id().isEmpty()) {
+ // collect the parents. in case parent does not have an id, we scan the all top-level accounts
+ if(parent.id().isEmpty()) {
parents << file->asset();
parents << file->liability();
parents << file->income();
parents << file->expense();
parents << file->equity();
} else {
- parents << tqparent;
+ parents << parent;
}
TQValueList<MyMoneyAccount>::const_iterator it_p;
for(it_p = parents.begin(); it_p != parents.end(); ++it_p) {
@@ -2309,7 +2309,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par
} else {
parentAccount = existingAccount;
}
- newAccount.setParentAccountId(TQString()); // make sure, there's no tqparent
+ newAccount.setParentAccountId(TQString()); // make sure, there's no parent
newAccount.clearId(); // and no id set for adding
newAccount.removeAccountIds(); // and no sub-account ids
newAccount.setName(remainder);
@@ -2399,12 +2399,12 @@ void KMyMoney2App::slotCategoryNew(const TQString& name, TQString& id)
id = account.id();
}
-void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent)
+void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount& parent)
{
if(KMessageBox::questionYesNo(this,
- TQString("<qt>%1</qt>").tqarg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The tqparent account will default to <b>%2</b> but can be changed in the following dialog</i>.").tqarg(account.name()).tqarg(tqparent.name())), i18n("Create category"),
+ TQString("<qt>%1</qt>").tqarg(i18n("The category <b>%1</b> currently does not exist. Do you want to create it?<p><i>The parent account will default to <b>%2</b> but can be changed in the following dialog</i>.").tqarg(account.name()).tqarg(parent.name())), i18n("Create category"),
KStdGuiItem::yes(), KStdGuiItem::no(), "CreateNewCategories") == KMessageBox::Yes) {
- createCategory(account, tqparent);
+ createCategory(account, parent);
} else {
// we should not keep the 'no' setting because that can confuse people like
// I have seen in some usability tests. So we just delete it right away.
@@ -2418,30 +2418,30 @@ void KMyMoney2App::slotCategoryNew(MyMoneyAccount& account, const MyMoneyAccount
void KMyMoney2App::slotCategoryNew(void)
{
- MyMoneyAccount tqparent;
+ MyMoneyAccount parent;
MyMoneyAccount account;
- // Preselect the tqparent account by looking at the current selected account/category
+ // Preselect the parent account by looking at the current selected account/category
if(!m_selectedAccount.id().isEmpty() && m_selectedAccount.isIncomeExpense()) {
MyMoneyFile* file = MyMoneyFile::instance();
try {
- tqparent = file->account(m_selectedAccount.id());
+ parent = file->account(m_selectedAccount.id());
} catch(MyMoneyException *e) {
delete e;
}
}
- createCategory(account, tqparent);
+ createCategory(account, parent);
}
-void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& tqparent)
+void KMyMoney2App::createCategory(MyMoneyAccount& account, const MyMoneyAccount& parent)
{
- if(!tqparent.id().isEmpty()) {
+ if(!parent.id().isEmpty()) {
try {
- // make sure tqparent account exists
- MyMoneyFile::instance()->account(tqparent.id());
- account.setParentAccountId(tqparent.id());
- account.setAccountType( tqparent.accountType() );
+ // make sure parent account exists
+ MyMoneyFile::instance()->account(parent.id());
+ account.setParentAccountId(parent.id());
+ account.setAccountType( parent.accountType() );
} catch(MyMoneyException *e) {
delete e;
}
@@ -2483,8 +2483,8 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account)
MyMoneyFile* file = MyMoneyFile::instance();
try {
// create the account
- MyMoneyAccount tqparent = wizard->parentAccount();
- file->addAccount(acc, tqparent);
+ MyMoneyAccount parent = wizard->parentAccount();
+ file->addAccount(acc, parent);
// tell the wizard about the account id which it
// needs to create a possible schedule and transactions
@@ -2506,7 +2506,7 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account)
// create a brokerage account if selected
MyMoneyAccount brokerageAccount = wizard->brokerageAccount();
if(!(brokerageAccount == MyMoneyAccount())) {
- file->addAccount(brokerageAccount, tqparent);
+ file->addAccount(brokerageAccount, parent);
}
// create a possible schedule
@@ -2530,17 +2530,17 @@ void KMyMoney2App::slotAccountNew(MyMoneyAccount& account)
delete wizard;
}
-void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& tqparent)
+void KMyMoney2App::slotInvestmentNew(MyMoneyAccount& account, const MyMoneyAccount& parent)
{
TQString dontShowAgain = "CreateNewInvestments";
if(KMessageBox::questionYesNo(this,
TQString("<qt>")+i18n("The security <b>%1</b> currently does not exist as sub-account of <b>%2</b>. "
- "Do you want to create it?").tqarg(account.name()).tqarg(tqparent.name())+TQString("</qt>"), i18n("Create security"),
+ "Do you want to create it?").tqarg(account.name()).tqarg(parent.name())+TQString("</qt>"), i18n("Create security"),
KStdGuiItem::yes(), KStdGuiItem::no(), dontShowAgain) == KMessageBox::Yes) {
KNewInvestmentWizard dlg;
dlg.setName(account.name());
if(dlg.exec() == TQDialog::Accepted) {
- dlg.createObjects(tqparent.id());
+ dlg.createObjects(parent.id());
account = dlg.account();
}
} else {
@@ -2847,7 +2847,7 @@ void KMyMoney2App::slotAccountDelete(void)
// delete them all, but just the category itself?
MyMoneyAccount parentAccount = file->account(m_selectedAccount.parentAccountId());
- TQStringList accountsToRetqparent;
+ TQStringList accountsToReparent;
int result = KMessageBox::questionYesNoCancel(this, TQString("<qt>")+
i18n("Do you want to delete category <b>%1</b> with all its sub-categories or only "
"the category itself? If you only delete the category itself, all its sub-categories "
@@ -2861,7 +2861,7 @@ void KMyMoney2App::slotAccountDelete(void)
bool need_confirmation = false;
// case C - User only wants to delete the category itself
if (result == KMessageBox::No)
- accountsToRetqparent = m_selectedAccount.accountList();
+ accountsToReparent = m_selectedAccount.accountList();
else {
// case D - User wants to delete all subcategories, now check all subcats of
// m_selectedAccount and remember all that cannot be deleted and
@@ -2871,19 +2871,19 @@ void KMyMoney2App::slotAccountDelete(void)
{
// reparent account if a transaction is assigned
if (file->transactionCount(*it)!=0)
- accountsToRetqparent.push_back(*it);
+ accountsToReparent.push_back(*it);
else if (!file->account(*it).accountList().isEmpty()) {
// or if we have at least one sub-account that is used for transactions
if (!file->hasOnlyUnusedAccounts(file->account(*it).accountList())) {
- accountsToRetqparent.push_back(*it);
+ accountsToReparent.push_back(*it);
//kdDebug() << "subaccount not empty" << endl;
}
}
}
- if (!accountsToRetqparent.isEmpty())
+ if (!accountsToReparent.isEmpty())
need_confirmation = true;
}
- if (!accountsToRetqparent.isEmpty() && need_confirmation) {
+ if (!accountsToReparent.isEmpty() && need_confirmation) {
if (KMessageBox::questionYesNo(this, TQString("<p>")+i18n("Some sub-categories of category <b>%1</b> cannot "
"be deleted, because they are still used. They will be made sub-categories of <b>%2</b>. Proceed?").tqarg(m_selectedAccount.name()).tqarg(parentAccount.name())) != KMessageBox::Yes) {
return; // user gets wet feet...
@@ -2891,10 +2891,10 @@ void KMyMoney2App::slotAccountDelete(void)
}
// all good, now first reparent selected sub-categories
try {
- MyMoneyAccount tqparent = file->account(m_selectedAccount.parentAccountId());
- for (TQStringList::const_iterator it = accountsToRetqparent.begin(); it != accountsToRetqparent.end(); ++it) {
+ MyMoneyAccount parent = file->account(m_selectedAccount.parentAccountId());
+ for (TQStringList::const_iterator it = accountsToReparent.begin(); it != accountsToReparent.end(); ++it) {
MyMoneyAccount child = file->account(*it);
- file->reparentAccount(child, tqparent);
+ file->reparentAccount(child, parent);
}
// reload the account because the sub-account list might have changed
m_selectedAccount = file->account(m_selectedAccount.id());
@@ -2998,7 +2998,7 @@ void KMyMoney2App::slotAccountEdit(void)
MyMoneyFileTransaction ft;
MyMoneyAccount account = dlg.account();
- MyMoneyAccount tqparent = dlg.parentAccount();
+ MyMoneyAccount parent = dlg.parentAccount();
if(it_plugin != m_onlinePlugins.end()) {
account.setOnlineBankingSettings((*it_plugin)->onlineBankingSettings(account.onlineBankingSettings()));
}
@@ -3009,8 +3009,8 @@ void KMyMoney2App::slotAccountEdit(void)
// we need to modify first, as reparent would override all other changes
file->modifyAccount(account);
- if(account.parentAccountId() != tqparent.id()) {
- file->reparentAccount(account, tqparent);
+ if(account.parentAccountId() != parent.id()) {
+ file->reparentAccount(account, parent);
}
if(!tid.isEmpty() && dlg.openingBalance().isZero()) {
file->removeTransaction(t);