diff options
Diffstat (limited to 'kmymoney2/dialogs/knewaccountdlg.cpp')
-rw-r--r-- | kmymoney2/dialogs/knewaccountdlg.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/kmymoney2/dialogs/knewaccountdlg.cpp b/kmymoney2/dialogs/knewaccountdlg.cpp index d8b0cc7..529fbf8 100644 --- a/kmymoney2/dialogs/knewaccountdlg.cpp +++ b/kmymoney2/dialogs/knewaccountdlg.cpp @@ -349,7 +349,7 @@ KNewAccountDlg::KNewAccountDlg(const MyMoneyAccount& account, bool isEditing, bo delete e; } - initParentWidget(account.tqparentAccountId(), account.id()); + initParentWidget(account.parentAccountId(), account.id()); if(m_account.isInvest()) m_qlistviewParentAccounts->setEnabled(false); @@ -476,7 +476,7 @@ void KNewAccountDlg::okClicked() return; } - MyMoneyAccount tqparent = tqparentAccount(); + MyMoneyAccount tqparent = parentAccount(); if (tqparent.name().length() == 0) { KMessageBox::error(this, i18n("Please select a tqparent account.")); @@ -676,7 +676,7 @@ const MyMoneyAccount& KNewAccountDlg::account(void) return m_account; } -const MyMoneyAccount& KNewAccountDlg::tqparentAccount(void) +const MyMoneyAccount& KNewAccountDlg::parentAccount(void) { if (!m_bSelectedParentAccount) { @@ -710,7 +710,7 @@ const MyMoneyAccount& KNewAccountDlg::tqparentAccount(void) return m_parentAccount; } -void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accountId) +void KNewAccountDlg::initParentWidget(TQString parentId, const TQString& accountId) { MyMoneyFile *file = MyMoneyFile::instance(); @@ -726,15 +726,15 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou // Determine the tqparent account try { - m_parentAccount = file->account(tqparentId); + m_parentAccount = file->account(parentId); } catch (MyMoneyException *e) { m_bSelectedParentAccount = false; m_parentAccount = MyMoneyAccount(); if(m_account.accountType() != MyMoneyAccount::UnknownAccountType) { - tqparentAccount(); - tqparentId = m_parentAccount.id(); + parentAccount(); + parentId = m_parentAccount.id(); } delete e; } @@ -759,10 +759,10 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou if(m_parentAccount.id().isEmpty()) { m_parentAccount = assetAccount; - tqparentId = m_parentAccount.id(); + parentId = m_parentAccount.id(); } - if (tqparentId == assetAccount.id()) + if (parentId == assetAccount.id()) m_parentItem = assetTopLevelAccount; assetTopLevelAccount->setOpen(true); @@ -777,7 +777,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(assetTopLevelAccount, acc); - if(tqparentId == acc.id()) { + if(parentId == acc.id()) { m_parentItem = accountItem; } else if(accountId == acc.id()) { if(m_isEditing) @@ -788,7 +788,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou TQStringList subAccounts = acc.accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, tqparentId, acc.id()); + showSubAccounts(subAccounts, accountItem, parentId, acc.id()); } } } @@ -799,10 +799,10 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou if(m_parentAccount.id().isEmpty()) { m_parentAccount = liabilityAccount; - tqparentId = m_parentAccount.id(); + parentId = m_parentAccount.id(); } - if (tqparentId == liabilityAccount.id()) + if (parentId == liabilityAccount.id()) m_parentItem = liabilityTopLevelAccount; liabilityTopLevelAccount->setOpen(true); @@ -817,7 +817,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(liabilityTopLevelAccount, acc); - if(tqparentId == acc.id()) { + if(parentId == acc.id()) { m_parentItem = accountItem; } else if(accountId == acc.id()) { if(m_isEditing) @@ -828,7 +828,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou TQStringList subAccounts = acc.accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, tqparentId, acc.id()); + showSubAccounts(subAccounts, accountItem, parentId, acc.id()); } } } @@ -842,10 +842,10 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou if(m_parentAccount.id().isEmpty()) { m_parentAccount = incomeAccount; - tqparentId = m_parentAccount.id(); + parentId = m_parentAccount.id(); } - if (tqparentId == incomeAccount.id()) + if (parentId == incomeAccount.id()) m_parentItem = incomeTopLevelAccount; incomeTopLevelAccount->setOpen(true); @@ -858,7 +858,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou file->account(*it)); TQString id = file->account(*it).id(); - if(tqparentId == id) { + if(parentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -869,7 +869,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, tqparentId, accountId); + showSubAccounts(subAccounts, accountItem, parentId, accountId); } } } @@ -881,10 +881,10 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou if(m_parentAccount.id().isEmpty()) { m_parentAccount = expenseAccount; - tqparentId = m_parentAccount.id(); + parentId = m_parentAccount.id(); } - if (tqparentId == expenseAccount.id()) + if (parentId == expenseAccount.id()) m_parentItem = expenseTopLevelAccount; expenseTopLevelAccount->setOpen(true); @@ -897,7 +897,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou file->account(*it)); TQString id = file->account(*it).id(); - if(tqparentId == id) { + if(parentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -908,7 +908,7 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, tqparentId, accountId); + showSubAccounts(subAccounts, accountItem, parentId, accountId); } } } @@ -932,18 +932,18 @@ void KNewAccountDlg::initParentWidget(TQString tqparentId, const TQString& accou m_qlistviewParentAccounts->setEnabled(true); } -void KNewAccountDlg::showSubAccounts(TQStringList accounts, KMyMoneyAccountTreeBaseItem *tqparentItem, - const TQString& tqparentId, const TQString& accountId) +void KNewAccountDlg::showSubAccounts(TQStringList accounts, KMyMoneyAccountTreeBaseItem *parentItem, + const TQString& parentId, const TQString& accountId) { MyMoneyFile *file = MyMoneyFile::instance(); for ( TQStringList::ConstIterator it = accounts.begin(); it != accounts.end(); ++it ) { - KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(tqparentItem, + KMyMoneyAccountTreeBaseItem *accountItem = new KMyMoneyAccountTreeItem(parentItem, file->account(*it)); TQString id = file->account(*it).id(); - if(tqparentId == id) { + if(parentId == id) { m_parentItem = accountItem; } else if(accountId == id) { if(m_isEditing) @@ -954,7 +954,7 @@ void KNewAccountDlg::showSubAccounts(TQStringList accounts, KMyMoneyAccountTreeB TQStringList subAccounts = file->account(*it).accountList(); if (subAccounts.count() >= 1) { - showSubAccounts(subAccounts, accountItem, tqparentId, accountId); + showSubAccounts(subAccounts, accountItem, parentId, accountId); } } } @@ -1094,25 +1094,25 @@ void KNewAccountDlg::slotAccountTypeChanged(const TQString& typeStr) try { oldType = m_account.accountType(); if(oldType != type) { - TQString tqparentId; + TQString parentId; switch(MyMoneyAccount::accountGroup(type)) { case MyMoneyAccount::Asset: - tqparentId = file->asset().id(); + parentId = file->asset().id(); break; case MyMoneyAccount::Liability: - tqparentId = file->liability().id(); + parentId = file->liability().id(); break; case MyMoneyAccount::Expense: - tqparentId = file->expense().id(); + parentId = file->expense().id(); break; case MyMoneyAccount::Income: - tqparentId = file->income().id(); + parentId = file->income().id(); break; default: qWarning("Unknown account group in KNewAccountDlg::slotAccountTypeChanged()"); break; } - initParentWidget(tqparentId, TQString()); + initParentWidget(parentId, TQString()); m_account.setAccountType(type); } } catch(MyMoneyException *e) { |