Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/converter/mymoneystatementreader.cpp
Context not available. | |||||
55 | #include "mymoneystatement.h" | 55 | #include "mymoneystatement.h" | ||
---|---|---|---|---|---|
56 | #include "kmymoneyglobalsettings.h" | 56 | #include "kmymoneyglobalsettings.h" | ||
57 | #include "transactioneditor.h" | 57 | #include "transactioneditor.h" | ||
58 | #include "stdtransactioneditor.h" | ||||
58 | #include "kmymoneyedit.h" | 59 | #include "kmymoneyedit.h" | ||
59 | #include "kaccountselectdlg.h" | 60 | #include "kaccountselectdlg.h" | ||
60 | #include "transactionmatcher.h" | 61 | #include "transactionmatcher.h" | ||
Context not available. | |||||
65 | #include "models.h" | 66 | #include "models.h" | ||
66 | #include "existingtransactionmatchfinder.h" | 67 | #include "existingtransactionmatchfinder.h" | ||
67 | #include "scheduledtransactionmatchfinder.h" | 68 | #include "scheduledtransactionmatchfinder.h" | ||
69 | #include "dialogenums.h" | ||||
68 | 70 | | |||
69 | using namespace eMyMoney; | 71 | using namespace eMyMoney; | ||
70 | 72 | | |||
Context not available. | |||||
1343 | "create a new account by pressing the <b>Create</b> button."); | 1345 | "create a new account by pressing the <b>Create</b> button."); | ||
1344 | } | 1346 | } | ||
1345 | 1347 | | |||
1346 | KMyMoneyUtils::categoryTypeE type; | 1348 | eDialogs::Category type; | ||
1347 | if (account.accountType() == Account::Checkings) { | 1349 | if (account.accountType() == Account::Checkings) { | ||
1348 | type = static_cast<KMyMoneyUtils::categoryTypeE>(KMyMoneyUtils::checking); | 1350 | type = eDialogs::Category::checking; | ||
1349 | } else if (account.accountType() == Account::Savings) { | 1351 | } else if (account.accountType() == Account::Savings) { | ||
1350 | type = static_cast<KMyMoneyUtils::categoryTypeE>(KMyMoneyUtils::savings); | 1352 | type = eDialogs::Category::savings; | ||
1351 | } else if (account.accountType() == Account::Investment) { | 1353 | } else if (account.accountType() == Account::Investment) { | ||
1352 | type = static_cast<KMyMoneyUtils::categoryTypeE>(KMyMoneyUtils::investment); | 1354 | type = eDialogs::Category::investment; | ||
1353 | } else if (account.accountType() == Account::CreditCard) { | 1355 | } else if (account.accountType() == Account::CreditCard) { | ||
1354 | type = static_cast<KMyMoneyUtils::categoryTypeE>(KMyMoneyUtils::creditCard); | 1356 | type = eDialogs::Category::creditCard; | ||
1355 | } else { | 1357 | } else { | ||
1356 | type = static_cast<KMyMoneyUtils::categoryTypeE>(KMyMoneyUtils::asset | KMyMoneyUtils::liability); | 1358 | type = static_cast<eDialogs::Category>(eDialogs::Category::asset | eDialogs::Category::liability); | ||
1357 | } | 1359 | } | ||
1358 | 1360 | | |||
1359 | QPointer<KAccountSelectDlg> accountSelect = new KAccountSelectDlg(type, "StatementImport", kmymoney); | 1361 | QPointer<KAccountSelectDlg> accountSelect = new KAccountSelectDlg(type, "StatementImport", kmymoney); | ||
Context not available. | |||||
1362 | accountSelect->setAccount(account, accountId); | 1364 | accountSelect->setAccount(account, accountId); | ||
1363 | accountSelect->setMode(false); | 1365 | accountSelect->setMode(false); | ||
1364 | accountSelect->showAbortButton(true); | 1366 | accountSelect->showAbortButton(true); | ||
1365 | accountSelect->m_qifEntry->hide(); | 1367 | accountSelect->hideQifEntry(); | ||
1366 | QString accname; | 1368 | QString accname; | ||
1367 | bool done = false; | 1369 | bool done = false; | ||
1368 | while (!done) { | 1370 | while (!done) { | ||
Context not available. | |||||
1456 | // for now this only works with regular transactions and not | 1458 | // for now this only works with regular transactions and not | ||
1457 | // for investment transactions. As of this, we don't have | 1459 | // for investment transactions. As of this, we don't have | ||
1458 | // scheduled investment transactions anyway. | 1460 | // scheduled investment transactions anyway. | ||
1459 | StdTransactionEditor* se = dynamic_cast<StdTransactionEditor*>(editor.data()); | 1461 | auto se = dynamic_cast<StdTransactionEditor*>(editor.data()); | ||
1460 | if (se) { | 1462 | if (se) { | ||
1461 | // the following call will update the amount field in the | 1463 | // the following call will update the amount field in the | ||
1462 | // editor and also adjust a possible VAT assignment. Make | 1464 | // editor and also adjust a possible VAT assignment. Make | ||
Context not available. |