DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::navigation::Navigator Class Referencefinal

#include <Navigator.h>

Inheritance diagram for drn::navigation::Navigator:
Collaboration diagram for drn::navigation::Navigator:

Public Slots

bool onAdded (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetedMoney &item, const std::optional< drn::banking::BankAccount > &ba)
 Adds a new budget item to the system based on its type, registers it with the appropriate ledger, marks the state as modified, and emits success or failure signals in response to the operation.
 
void onAddedAct (const drn::accounting::Account &act)
 
std::optional< drn::accounting::AccountCodeonAddedBankAccount (const QString &name, const drn::banking::BankAccountTypes &type, const pecunia::Money &openingBalance)
 
void onAddedTransaction (const drn::accounting::Transaction &txn)
 
void onBankAdded (const drn::banking::Bank &b)
 Adds a new bank to the system.
 
void onBankClosed (const drn::banking::BankName &bn)
 
void onBankOpened (const drn::banking::BankName &bn)
 
void onBankRemoved (const drn::banking::BankName &bn)
 
void onBankRenamed (const drn::banking::BankName &original, const drn::banking::BankName &change)
 
void onBankUpdated (const drn::banking::Bank &b)
 Updates the provided bank’s details in the system.
 
void onCheckIsBudgetFileDirty ()
 
void onClosed (const drn::accounting::AccountCode &code)
 
void onCompletedNewBudgetFirstTimeWizard (const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usable, const drn::navigation::CurrencyDisplayOptions &displayAs, const drn::banking::BankName &primary, const drn::banking::BankAccountTypes &kind, const QString &accountName, const pecunia::Money &initialBalance, const drn::navigation::BudgetWizardTemplates &selectedTemplate)
 
void onCompletedSurvey (const QDate &completedOn, const drn::banking::BankAccount &ba, const pecunia::Money &balance, const std::set< drn::accounting::TransactionNumber > &allReconciled, const drn::surveying::IndexedIncreaseDecreases< drn::budgeting::BudgetItemIdentifier > &allAdded, const drn::surveying::IndexedIncreaseDecreases< drn::accounting::AccountNumber > &allExtra, const std::map< drn::budgeting::BudgetItemIdentifier, drn::surveying::DistributedAmount > &distributed, const pecunia::Money &nonDistributed)
 
void onConfigureUpdated (const std::chrono::hours &workHrInWeek, const std::chrono::days &workdayInWeek, const std::chrono::days &notifyDueWithin, const pecunia::Currency &preferred, const drn::navigation::CurrencyDisplayOptions &displayAs, const std::set< pecunia::Currency > &usable, const drn::foundation::Percentage &balanceWindow)
 Updates user configuration preferences and validates the provided input. Emits signals indicating success or failure of the operation.
 
void onConfirmedLoadBudgetFile (const QString &filePathName, const bool isReloaded)
 
void onConfirmedNewBudgetEmpty ()
 Clears existing budget values and resets the system to prepare for displaying a new empty budget, then emits a signal to update the user interface.
 
void onConfirmedNewBudgetFirstTimeWizard ()
 Processes the confirmation from the user to display the first-time wizard.
 
void onFetchExchangeRates (const std::set< pecunia::Currency > &currencies)
 
void onFetchReleaseNotes ()
 
void onGenerateMappingSurvey (const drn::banking::BankName &bn, const drn::accounting::AccountNumber &an, const QDate &surveyingOn)
 
void onLoadBudgetFile (const QString &filePathName)
 
void onLookUpBankAccounts (const drn::banking::BankName &bn, const drn::navigation::AllowSubAccounts &shouldAllow)
 
void onLookUpBudgetItemSources (const drn::budgeting::BudgetItemDueIdentifier &requestedBy)
 Handles a lookup for sources associated with a specific budget item and emits the result. This method is used to retrieve all associated sources for a given budget item, categorized by its type. Once the lookup is completed, the results are emitted as a signal to notify other components.
 
void onLookUpLastReconciliation (const drn::accounting::AccountNumber &an)
 Looks up the last reconciliation data for a given account and emits a signal with the associated details.
 
void onLookUpRefundableTransactions (const drn::budgeting::BudgetItemIdentifier &bii)
 Handles a lookup for non-reconciled refundable transactions associated with a specific budget item and emits the result. It is used to retrieve transactions categorized as refundable for a specific budget item. Once the lookup is completed, the result is emitted as a signal to notify other components.
 
void onMarkCleared (const std::set< drn::accounting::TransactionNumber > &tns)
 
void onMarkReconciled (const drn::accounting::TransactionNumber &tn)
 
void onMarkUnreconciled (const std::set< drn::accounting::TransactionNumber > &tns)
 
void onOpened (const drn::accounting::AccountCode &code)
 
void onPostBudgetItemPosted (const drn::budgeting::BudgetItemAmountDue &bid, const drn::accounting::AccountCode &ac, const QDate &postOn)
 Posts a budget item to the budget bank ledger and emits the result as a signal. This function is used to update the financial ledger with a budget item due, associating it with a specific account and post date. Successful operation triggers a signal containing the posted item's ID and assigned transaction number. In case of failure, an error signal is emitted to notify the failure details.
 
void onPostBudgetItemPostedUnexpected (const drn::budgeting::BudgetItemDueIdentifier &bidi, const pecunia::Money &amount, const drn::accounting::AccountCode &ac, const QDate &postOn)
 
void onPostBudgetItemSkipped (const drn::budgeting::BudgetItemDueIdentifier &bidi)
 
void onPostRefund (const drn::accounting::TransactionNumber &txnNum, const pecunia::Money &refund)
 Handles the user request to post a refund to the budget ledgers.
 
void onPrepareNewBudgetEmpty ()
 Prepares the system to start a new, empty budget and emits a confirmation signal if the current budget or state poses potential data overwrite risks.
 
void onPrepareNewBudgetFirstTimeWizard ()
 Prepares and emits the signal to show the first-time wizard with the user's preferred settings. This method is used to initialize and indicate that the application should display the first-time wizard in the graphical interface.
 
void onPrepareShowAccounts ()
 
void onPrepareShowBanks ()
 
void onPrepareShowBills ()
 
void onPrepareShowBudgetItemRefund ()
 
void onPrepareShowConfigure ()
 
void onPrepareShowDashboard ()
 
void onPrepareShowDebts ()
 
void onPrepareShowExchangeRates ()
 
void onPrepareShowGoals ()
 
void onPrepareShowLedgers ()
 
void onPrepareShowMoneyTransfer ()
 
void onPrepareShowNontracks ()
 
void onPrepareShowProcessBudgetItems ()
 
void onPrepareShowSurvey ()
 
void onPrepareShowWages ()
 
void onRecoded (const drn::accounting::AccountCode &current, const drn::accounting::AccountCode &changed)
 
void onReloadBudgetFile ()
 
void onRemoved (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetSource &source)
 
void onRemovedAct (const drn::accounting::AccountCode &code)
 
void onRemovedBankAccount (const drn::accounting::AccountCode &ac)
 
void onRemovedTransaction (const drn::accounting::TransactionNumber &tn)
 
void onRenamed (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetSource &original, const drn::budgeting::BudgetSource &changed)
 
void onRenamedBankAccount (const drn::accounting::AccountCode &original, const drn::accounting::AccountCode &changed)
 
void onSaveAsBudgetFile (const QString &filePathName)
 
void onSaveBudgetFile ()
 
void onSelectedLedger (const drn::accounting::AccountCode &code)
 
void onStoreExchangeRates (const drn::conversion::ConversionMap &conversions)
 
void onTransferRequested (const drn::accounting::AccountNumber &from, const drn::accounting::AccountNumber &to, const pecunia::Money &amount, const QString &reason)
 
void onUpdated (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetedMoney &item, const std::optional< drn::banking::BankAccount > &ba)
 
void onUpdatedTransaction (const drn::accounting::TransactionNumber &tn, const drn::accounting::Transaction &txn)
 

Signals

void accountSaveFailed (const std::optional< drn::accounting::AccountCode > &original, const QString &errorMessage, const std::optional< drn::accounting::AccountCode > &displayed)
 
void accountSaveSucceeded (const drn::accounting::AccountCode &code)
 
void bankAccountSaveFailed (const std::optional< drn::accounting::AccountCode > &original, const QString &errorMessage, const std::optional< drn::accounting::AccountCode > &displayed)
 
void bankAccountSaveSucceeded (const drn::accounting::AccountCode &ac)
 
void bankSaveFailed (const std::optional< drn::banking::BankName > &original, const QString &errorMessage, const std::optional< drn::banking::BankName > &displayed)
 
void bankSaveSucceeded (const drn::banking::BankName &bn)
 
void checkedIsBudgetFileDirty (const bool isDirty)
 
void completedSurveyFailed (const QString &errorMessage)
 
void completedSurveySucceeded ()
 
void configureSaveFailed (const QString &errorMessage)
 
void configureSaveSucceeded ()
 
void fetchedExchangeRates (const std::set< pecunia::Currency > &currencies, const drn::conversion::ConversionMap &conversions)
 
void fetchedReleaseNotes (const std::set< drn::updating::ReleaseInformation > &versions)
 
void generatedMappingSurvey (const drn::surveying::MappingSurvey &survey)
 
void loadedBudgetFile (const QString &filePathName, const bool isReloaded)
 
void lookedUpBankAccounts (const drn::banking::BankName &bn, const std::set< drn::banking::AccountNumberBankType > &accountTypes)
 
void lookedUpBudgetItemSources (const drn::budgeting::BudgetItemDueIdentifier &requestedBy, const std::set< drn::budgeting::BudgetSource > &sources)
 Emits the result of a lookup for budget item sources associated with a specific budget item. This method is used to notify other components about the sources identified for a particular budget item.
 
void lookedUpLastReconciliation (const pecunia::Currency &code, const std::optional< drn::banking::ReconciledBalance > &reconciliation)
 Triggered when the most recent reconciliation record for a previously requested bank account is available. This is a signal indicating the completion of the lookup.
 
void lookedUpRefundableTransactions (const drn::budgeting::BudgetItemIdentifier &bii, const drn::accounting::AccountCode &ac, const std::set< drn::accounting::Transaction > &txns)
 Triggered when the result of a refundable transactions lookup for a specific budget item is completed.
 
void processBudgetItemSaveFailed (const drn::budgeting::BudgetItemDueIdentifier &bidi, const QString &errorMessage)
 
void processBudgetItemSaveSucceeded (const drn::budgeting::BudgetItemDueIdentifier &bidi, const std::optional< drn::accounting::TransactionNumber > &txnNum)
 
void savedBudgetFile (const QString &filePathName)
 
void saveFailed (const std::optional< drn::budgeting::BudgetSource > &original, const QString &errorMessage, const std::optional< drn::budgeting::BudgetSource > &displayed)
 
void saveSucceeded (const drn::budgeting::BudgetSource &source)
 
void showAccounts (const std::set< drn::accounting::Account > &accounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showBanks (const drn::banking::BankMap &banks, const std::set< drn::accounting::Account > &allAccounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 Triggered when the GUI should display a list of banks in the system.
 
void showBills (const drn::budgeting::BillMap &bills, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showBudgetItemRefund (const std::set< pecunia::Currency > &codes, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showConfigure (const std::chrono::hours &hrInWeek, const std::chrono::days &dayInWeek, const std::chrono::days &notifyDueWithin, const pecunia::Currency &preferred, const drn::navigation::CurrencyDisplayOptions &displayAs, const std::set< pecunia::Currency > &usable, const std::set< pecunia::Currency > &used, const drn::foundation::Percentage &balanceWindow)
 
void showConfirmLoadBudgetFile (const QString &filePathName)
 
void showConfirmNewBudget ()
 Triggered when a user must confirm that a new budget should be created.
 
void showDashboard (const drn::budgeting::BudgetTotals &bt, const std::vector< drn::budgeting::BudgetItemAmountDue > &due, const drn::adviser::BudgetHealth &bh, const std::chrono::days &dueWithin, const pecunia::Currency &preferred, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showDebts (const drn::budgeting::DebtMap &debts, const std::set< drn::navigation::BudgetBankAccount > &accounts, const std::set< drn::accounting::AccountCode > &codes, const std::set< drn::banking::BankName > &banks, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showExchangeRates (const drn::conversion::ConversionMap &currentConversions, const std::set< pecunia::Currency > &currencies)
 
void showGoals (const drn::budgeting::GoalMap &goals, const std::set< drn::navigation::BudgetBankAccount > &accounts, const std::set< drn::accounting::AccountCode > &codes, const std::set< drn::banking::BankName > &banks, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs, const pecunia::Money &wagesTotal)
 
void showLedger (const drn::accounting::LedgerAccount &ledger)
 
void showLedgers (const std::set< drn::accounting::Account > &accounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showMoneyTransfer (const std::set< drn::navigation::BankAccountCode > &fromBanks, const std::set< drn::navigation::BankAccountCode > &toBanks, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showNewBudget ()
 Triggered when a new budget is created and should be displayed.
 
void showNewBudgetFirstTimeWizard (const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usable, const drn::navigation::CurrencyDisplayOptions &displayAs)
 Triggered when a first-time new budget wizard should be displayed.
 
void showNoBudgetFileOpened ()
 
void showNontracks (const drn::budgeting::NontrackMap &nontracks, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void showProcessBudgetItems (const std::chrono::days &dueWithin, const std::vector< drn::budgeting::BudgetItemAmountDue > &items, const std::set< drn::banking::BankName > &banks, const pecunia::Currency &preferredCurrency, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs, const std::set< drn::accounting::AccountCode > &codes)
 
void showSaveAsBudgetFile ()
 
void showSurvey (const std::set< drn::banking::BankName > &banks, const std::set< pecunia::Currency > &usable, const drn::navigation::CurrencyDisplayOptions &displayAs, const drn::foundation::Percentage &balanceWindow, const std::set< drn::accounting::AccountCode > &codes)
 
void showWages (const drn::budgeting::WageMap &wages, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void transactionSaveFailed (const std::optional< drn::accounting::TransactionNumber > &tn, const QString &errorMessage)
 
void transactionSaveSucceeded (const std::optional< drn::accounting::TransactionNumber > &displayed, const std::optional< drn::accounting::TransactionNumber > &posted)
 
void updateAvailableAcknowledged ()
 
void updateReleased (const drn::updating::SemanticVersion &latest)
 

Public Member Functions

 Navigator (foundation::UniqueQtPtr< networking::RequestSender > sender, std::unique_ptr< storage::BudgetStorage > budgetStore, std::unique_ptr< storage::ExchangeRatesStorage > exchangeRatesStore)
 
 ~Navigator () override
 

Constructor & Destructor Documentation

◆ Navigator()

drn::navigation::Navigator::Navigator ( foundation::UniqueQtPtr< networking::RequestSender > sender,
std::unique_ptr< storage::BudgetStorage > budgetStore,
std::unique_ptr< storage::ExchangeRatesStorage > exchangeRatesStore )

◆ ~Navigator()

drn::navigation::Navigator::~Navigator ( )
override

Member Function Documentation

◆ accountSaveFailed

void drn::navigation::Navigator::accountSaveFailed ( const std::optional< drn::accounting::AccountCode > & original,
const QString & errorMessage,
const std::optional< drn::accounting::AccountCode > & displayed )
signal

◆ accountSaveSucceeded

void drn::navigation::Navigator::accountSaveSucceeded ( const drn::accounting::AccountCode & code)
signal

◆ bankAccountSaveFailed

void drn::navigation::Navigator::bankAccountSaveFailed ( const std::optional< drn::accounting::AccountCode > & original,
const QString & errorMessage,
const std::optional< drn::accounting::AccountCode > & displayed )
signal

◆ bankAccountSaveSucceeded

void drn::navigation::Navigator::bankAccountSaveSucceeded ( const drn::accounting::AccountCode & ac)
signal

◆ bankSaveFailed

void drn::navigation::Navigator::bankSaveFailed ( const std::optional< drn::banking::BankName > & original,
const QString & errorMessage,
const std::optional< drn::banking::BankName > & displayed )
signal

◆ bankSaveSucceeded

void drn::navigation::Navigator::bankSaveSucceeded ( const drn::banking::BankName & bn)
signal

◆ checkedIsBudgetFileDirty

void drn::navigation::Navigator::checkedIsBudgetFileDirty ( const bool isDirty)
signal

◆ completedSurveyFailed

void drn::navigation::Navigator::completedSurveyFailed ( const QString & errorMessage)
signal

◆ completedSurveySucceeded

void drn::navigation::Navigator::completedSurveySucceeded ( )
signal

◆ configureSaveFailed

void drn::navigation::Navigator::configureSaveFailed ( const QString & errorMessage)
signal

◆ configureSaveSucceeded

void drn::navigation::Navigator::configureSaveSucceeded ( )
signal

◆ fetchedExchangeRates

void drn::navigation::Navigator::fetchedExchangeRates ( const std::set< pecunia::Currency > & currencies,
const drn::conversion::ConversionMap & conversions )
signal

◆ fetchedReleaseNotes

void drn::navigation::Navigator::fetchedReleaseNotes ( const std::set< drn::updating::ReleaseInformation > & versions)
signal

◆ generatedMappingSurvey

void drn::navigation::Navigator::generatedMappingSurvey ( const drn::surveying::MappingSurvey & survey)
signal

◆ loadedBudgetFile

void drn::navigation::Navigator::loadedBudgetFile ( const QString & filePathName,
const bool isReloaded )
signal

◆ lookedUpBankAccounts

void drn::navigation::Navigator::lookedUpBankAccounts ( const drn::banking::BankName & bn,
const std::set< drn::banking::AccountNumberBankType > & accountTypes )
signal

◆ lookedUpBudgetItemSources

void drn::navigation::Navigator::lookedUpBudgetItemSources ( const drn::budgeting::BudgetItemDueIdentifier & requestedBy,
const std::set< drn::budgeting::BudgetSource > & sources )
signal

Emits the result of a lookup for budget item sources associated with a specific budget item. This method is used to notify other components about the sources identified for a particular budget item.

Parameters
requestedByThe identifier of the budget item for which the sources were retrieved.
sourcesThe set of budget sources associated with the specified budget item.

◆ lookedUpLastReconciliation

void drn::navigation::Navigator::lookedUpLastReconciliation ( const pecunia::Currency & code,
const std::optional< drn::banking::ReconciledBalance > & reconciliation )
signal

Triggered when the most recent reconciliation record for a previously requested bank account is available. This is a signal indicating the completion of the lookup.

This method is used to access the last recorded reconciliation within the system.

Parameters
codeThe currency associated with the selected account reconciliation process.
reconciliationThe last reconciled balance, if available.

◆ lookedUpRefundableTransactions

void drn::navigation::Navigator::lookedUpRefundableTransactions ( const drn::budgeting::BudgetItemIdentifier & bii,
const drn::accounting::AccountCode & ac,
const std::set< drn::accounting::Transaction > & txns )
signal

Triggered when the result of a refundable transactions lookup for a specific budget item is completed.

Parameters
biiThe unique identifier specifying the budget item for which refundable transactions were retrieved. This ensures that the processing is scoped to the relevant budget item.
acThe identifier in the ledger books for the account of the budget item.
txnsA set of transactions identified as refundable for the specified budget item.

◆ onAdded

bool drn::navigation::Navigator::onAdded ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetedMoney & item,
const std::optional< drn::banking::BankAccount > & ba )
slot

Adds a new budget item to the system based on its type, registers it with the appropriate ledger, marks the state as modified, and emits success or failure signals in response to the operation.

This method handles the inclusion of a budget item into the system under various budget item categories. Each type of budget item requires specific logic to ensure proper handling and registry.

Exceptions
std::logic_errorThrown if the type of the budget item is unrecognized or invalid.
ErrorThrown if there is a failure in processing the addition of the budget item.
Parameters
typeThe category of the budget item to be added.
itemThe budget item object that is being added.
baAn optional parameter that represents the associated bank account for the budget item, e.g. the bank account that stores a debt item's car loan.
Postcondition
The budget item is processed and added to the appropriate ledger based on its type.
The internal state is marked as modified to reflect changes.
On success, the success signal saveSucceeded is emitted with the source of the added budget item.
On failure, the failure signal saveFailed is emitted with the error details and the item's source.
Returns
A boolean indicating whether the addition of the budget item was successful.

◆ onAddedAct

void drn::navigation::Navigator::onAddedAct ( const drn::accounting::Account & act)
slot

◆ onAddedBankAccount

std::optional< drn::accounting::AccountCode > drn::navigation::Navigator::onAddedBankAccount ( const QString & name,
const drn::banking::BankAccountTypes & type,
const pecunia::Money & openingBalance )
slot

◆ onAddedTransaction

void drn::navigation::Navigator::onAddedTransaction ( const drn::accounting::Transaction & txn)
slot

◆ onBankAdded

void drn::navigation::Navigator::onBankAdded ( const drn::banking::Bank & b)
slot

Adds a new bank to the system.

Parameters
bThe bank object that is to be added to the system.
Postcondition
The bank is registered within the system.
The internal state is marked as modified to reflect changes.
On success, the success signal bankSaveSucceeded is emitted with the name of the bank.
On failure, the failure signal bankSaveFailed is emitted with an empty original context, the error message, and the bank’s name.

◆ onBankClosed

void drn::navigation::Navigator::onBankClosed ( const drn::banking::BankName & bn)
slot

◆ onBankOpened

void drn::navigation::Navigator::onBankOpened ( const drn::banking::BankName & bn)
slot

◆ onBankRemoved

void drn::navigation::Navigator::onBankRemoved ( const drn::banking::BankName & bn)
slot

◆ onBankRenamed

void drn::navigation::Navigator::onBankRenamed ( const drn::banking::BankName & original,
const drn::banking::BankName & change )
slot

◆ onBankUpdated

void drn::navigation::Navigator::onBankUpdated ( const drn::banking::Bank & b)
slot

Updates the provided bank’s details in the system.

It integrates updated bank information into the system by modifying the associated ledger.

Parameters
bThe bank object containing the updated details to be processed.
Postcondition
The associated ledger is updated with the new details of the specified bank.
The internal state is marked as modified to reflect changes.
On success, the success signal bankSaveSucceeded is emitted with the name of the updated bank.
On failure, the failure signal bankSaveFailed is emitted with the original bank name, error message, and an empty optional placeholder.

◆ onCheckIsBudgetFileDirty

void drn::navigation::Navigator::onCheckIsBudgetFileDirty ( )
slot

◆ onClosed

void drn::navigation::Navigator::onClosed ( const drn::accounting::AccountCode & code)
slot

◆ onCompletedNewBudgetFirstTimeWizard

void drn::navigation::Navigator::onCompletedNewBudgetFirstTimeWizard ( const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usable,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const drn::banking::BankName & primary,
const drn::banking::BankAccountTypes & kind,
const QString & accountName,
const pecunia::Money & initialBalance,
const drn::navigation::BudgetWizardTemplates & selectedTemplate )
slot
Parameters
preferredThe user's preferred currency for displaying financial information.
usableA collection of currencies that are usable in the application.
displayAsSpecifies options for how the currencies will be displayed to the user.
primaryThe primary banking institution selected by the user.
kindSupported account type associated with the primary banking institution.
accountNameThe user-defined name for the account being set up.
initialBalanceThe initial monetary balance for the specified account.
selectedTemplateThe primary wizard template chosen by the user for setup guidance.

◆ onCompletedSurvey

void drn::navigation::Navigator::onCompletedSurvey ( const QDate & completedOn,
const drn::banking::BankAccount & ba,
const pecunia::Money & balance,
const std::set< drn::accounting::TransactionNumber > & allReconciled,
const drn::surveying::IndexedIncreaseDecreases< drn::budgeting::BudgetItemIdentifier > & allAdded,
const drn::surveying::IndexedIncreaseDecreases< drn::accounting::AccountNumber > & allExtra,
const std::map< drn::budgeting::BudgetItemIdentifier, drn::surveying::DistributedAmount > & distributed,
const pecunia::Money & nonDistributed )
slot

◆ onConfigureUpdated

void drn::navigation::Navigator::onConfigureUpdated ( const std::chrono::hours & workHrInWeek,
const std::chrono::days & workdayInWeek,
const std::chrono::days & notifyDueWithin,
const pecunia::Currency & preferred,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const std::set< pecunia::Currency > & usable,
const drn::foundation::Percentage & balanceWindow )
slot

Updates user configuration preferences and validates the provided input. Emits signals indicating success or failure of the operation.

This method is used to update various user preferences. It performs input validation to ensure the values conform to expected limits and modifies the internal preferences if valid.

Exceptions
ErrorThrown if the number of hours worked per week is outside the allowable range.
ErrorThrown if the number of workdays per week is outside the allowable range.
ErrorThrown if the notification range is outside the allowable limits.
ErrorThrown if the balance window percentage is not within the permitted range.
Parameters
workHrInWeekThe number of hours the user works in a week for scheduling purposes.
workdayInWeekThe number of workdays in a week the user intends to work.
notifyDueWithinHow many days within which users should be notified of approaching tasks.
preferredThe user's preferred currency for displaying budgets and financial data.
displayAsThe options for displaying the preferred currency (e.g. symbol, code).
usableThe set of currencies which are acceptable for use within the system.
balanceWindowThe user-defined percentage threshold for evaluating balance ranges.
Postcondition
The work hours are updated in user preferences if validation passes.
The workdays are updated in user preferences if validation passes.
The notification period is updated in user preferences if validation passes.
The preferred currency and currency display options are updated in user preferences if validation passes.
The set of usable currencies is updated in user preferences if validation passes.
The balance percentage range is updated in user preferences if validation passes.
On success, the configureSaveSucceeded signal is emitted to indicate configuration changes were saved successfully.
On failure, the configureSaveFailed signal is emitted with error details.

◆ onConfirmedLoadBudgetFile

void drn::navigation::Navigator::onConfirmedLoadBudgetFile ( const QString & filePathName,
const bool isReloaded )
slot

◆ onConfirmedNewBudgetEmpty

void drn::navigation::Navigator::onConfirmedNewBudgetEmpty ( )
slot

Clears existing budget values and resets the system to prepare for displaying a new empty budget, then emits a signal to update the user interface.

This method is used to reset all budget-related data and transition to a state where a completely new budget can be created. It ensures that any previous data is cleared and informs the system to display an empty budget interface through an emitted signal.

Postcondition
All stored budget data is cleared.
The showNewBudget signal is emitted to notify subscribed components of the transition.

◆ onConfirmedNewBudgetFirstTimeWizard

void drn::navigation::Navigator::onConfirmedNewBudgetFirstTimeWizard ( )
slot

Processes the confirmation from the user to display the first-time wizard.

This method is invoked to reset the internal state of the budget system and trigger the display of a first-time wizard GUI item, ensuring a guided setup experience for first-time users. It emits a signal to configure the wizard with user preferences.

Postcondition
All existing budget data is cleared from the internal system.
The state is updated to reflect an initial setup mode.
The signal showFirstTimeWizard is emitted with the current preferred values.

◆ onFetchExchangeRates

void drn::navigation::Navigator::onFetchExchangeRates ( const std::set< pecunia::Currency > & currencies)
slot

◆ onFetchReleaseNotes

void drn::navigation::Navigator::onFetchReleaseNotes ( )
slot

◆ onGenerateMappingSurvey

void drn::navigation::Navigator::onGenerateMappingSurvey ( const drn::banking::BankName & bn,
const drn::accounting::AccountNumber & an,
const QDate & surveyingOn )
slot

◆ onLoadBudgetFile

void drn::navigation::Navigator::onLoadBudgetFile ( const QString & filePathName)
slot

◆ onLookUpBankAccounts

void drn::navigation::Navigator::onLookUpBankAccounts ( const drn::banking::BankName & bn,
const drn::navigation::AllowSubAccounts & shouldAllow )
slot

◆ onLookUpBudgetItemSources

void drn::navigation::Navigator::onLookUpBudgetItemSources ( const drn::budgeting::BudgetItemDueIdentifier & requestedBy)
slot

Handles a lookup for sources associated with a specific budget item and emits the result. This method is used to retrieve all associated sources for a given budget item, categorized by its type. Once the lookup is completed, the results are emitted as a signal to notify other components.

Exceptions
std::logic_errorThrown if the type of the budget item is unrecognized or invalid.
Parameters
requestedByThe unique identifier for the budget item for which sources are being queried.

◆ onLookUpLastReconciliation

void drn::navigation::Navigator::onLookUpLastReconciliation ( const drn::accounting::AccountNumber & an)
slot

Looks up the last reconciliation data for a given account and emits a signal with the associated details.

This method retrieves the last reconciliation data from the system for a specified account. It is primarily used to enable users or systems to quickly access reconciliation information relevant to a particular account.

Parameters
anThe identifier of the account for which the last reconciliation data is being retrieved.

◆ onLookUpRefundableTransactions

void drn::navigation::Navigator::onLookUpRefundableTransactions ( const drn::budgeting::BudgetItemIdentifier & bii)
slot

Handles a lookup for non-reconciled refundable transactions associated with a specific budget item and emits the result. It is used to retrieve transactions categorized as refundable for a specific budget item. Once the lookup is completed, the result is emitted as a signal to notify other components.

Parameters
biiThe unique identifier for the budget item for which refundable transactions are being queried.

◆ onMarkCleared

void drn::navigation::Navigator::onMarkCleared ( const std::set< drn::accounting::TransactionNumber > & tns)
slot

◆ onMarkReconciled

void drn::navigation::Navigator::onMarkReconciled ( const drn::accounting::TransactionNumber & tn)
slot

◆ onMarkUnreconciled

void drn::navigation::Navigator::onMarkUnreconciled ( const std::set< drn::accounting::TransactionNumber > & tns)
slot

◆ onOpened

void drn::navigation::Navigator::onOpened ( const drn::accounting::AccountCode & code)
slot

◆ onPostBudgetItemPosted

void drn::navigation::Navigator::onPostBudgetItemPosted ( const drn::budgeting::BudgetItemAmountDue & bid,
const drn::accounting::AccountCode & ac,
const QDate & postOn )
slot

Posts a budget item to the budget bank ledger and emits the result as a signal. This function is used to update the financial ledger with a budget item due, associating it with a specific account and post date. Successful operation triggers a signal containing the posted item's ID and assigned transaction number. In case of failure, an error signal is emitted to notify the failure details.

Parameters
bidThe budget item amount due being posted to the financial ledger.
acA code representing the target account that is funding the posting.
postOnThe date on which the budget item is to be posted into the ledger.
Postcondition
The budget item is added to the financial ledger with a unique transaction number.
Internal states marking unsaved changes are toggled appropriately.

◆ onPostBudgetItemPostedUnexpected

void drn::navigation::Navigator::onPostBudgetItemPostedUnexpected ( const drn::budgeting::BudgetItemDueIdentifier & bidi,
const pecunia::Money & amount,
const drn::accounting::AccountCode & ac,
const QDate & postOn )
slot

◆ onPostBudgetItemSkipped

void drn::navigation::Navigator::onPostBudgetItemSkipped ( const drn::budgeting::BudgetItemDueIdentifier & bidi)
slot

◆ onPostRefund

void drn::navigation::Navigator::onPostRefund ( const drn::accounting::TransactionNumber & txnNum,
const pecunia::Money & refund )
slot

Handles the user request to post a refund to the budget ledgers.

Parameters
txnNumThe transaction number associated with the transaction that is being refunded.
refundThe amount to be refunded within the financial system.
Postcondition
When successful, the budget ledger contains a refund transaction, and the signal 'transactionSaveSucceeded' is emitted. In a failure, no changes to the ledger are made, and the signal 'transactionSaveFailed' is emitted.

◆ onPrepareNewBudgetEmpty

void drn::navigation::Navigator::onPrepareNewBudgetEmpty ( )
slot

Prepares the system to start a new, empty budget and emits a confirmation signal if the current budget or state poses potential data overwrite risks.

This method is used to transition the application to a new and empty budget state. It is critical in scenarios where user confirmation is essential to avoid unintentional data loss when overwriting an existing budget or unsaved changes.

Postcondition
If the current budget is not empty and there are unsaved changes, a confirmation signal is emitted to the user requiring validation before proceeding further.
If it is safe to proceed, the logic to initialize a confirmed new empty budget is executed.

◆ onPrepareNewBudgetFirstTimeWizard

void drn::navigation::Navigator::onPrepareNewBudgetFirstTimeWizard ( )
slot

Prepares and emits the signal to show the first-time wizard with the user's preferred settings. This method is used to initialize and indicate that the application should display the first-time wizard in the graphical interface.

Postcondition
A signal is emitted with the user's preferred settings for currency and its associated display format.

◆ onPrepareShowAccounts

void drn::navigation::Navigator::onPrepareShowAccounts ( )
slot

◆ onPrepareShowBanks

void drn::navigation::Navigator::onPrepareShowBanks ( )
slot

◆ onPrepareShowBills

void drn::navigation::Navigator::onPrepareShowBills ( )
slot

◆ onPrepareShowBudgetItemRefund

void drn::navigation::Navigator::onPrepareShowBudgetItemRefund ( )
slot

◆ onPrepareShowConfigure

void drn::navigation::Navigator::onPrepareShowConfigure ( )
slot

◆ onPrepareShowDashboard

void drn::navigation::Navigator::onPrepareShowDashboard ( )
slot

◆ onPrepareShowDebts

void drn::navigation::Navigator::onPrepareShowDebts ( )
slot

◆ onPrepareShowExchangeRates

void drn::navigation::Navigator::onPrepareShowExchangeRates ( )
slot

◆ onPrepareShowGoals

void drn::navigation::Navigator::onPrepareShowGoals ( )
slot

◆ onPrepareShowLedgers

void drn::navigation::Navigator::onPrepareShowLedgers ( )
slot

◆ onPrepareShowMoneyTransfer

void drn::navigation::Navigator::onPrepareShowMoneyTransfer ( )
slot

◆ onPrepareShowNontracks

void drn::navigation::Navigator::onPrepareShowNontracks ( )
slot

◆ onPrepareShowProcessBudgetItems

void drn::navigation::Navigator::onPrepareShowProcessBudgetItems ( )
slot

◆ onPrepareShowSurvey

void drn::navigation::Navigator::onPrepareShowSurvey ( )
slot

◆ onPrepareShowWages

void drn::navigation::Navigator::onPrepareShowWages ( )
slot

◆ onRecoded

void drn::navigation::Navigator::onRecoded ( const drn::accounting::AccountCode & current,
const drn::accounting::AccountCode & changed )
slot

◆ onReloadBudgetFile

void drn::navigation::Navigator::onReloadBudgetFile ( )
slot

◆ onRemoved

void drn::navigation::Navigator::onRemoved ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetSource & source )
slot

◆ onRemovedAct

void drn::navigation::Navigator::onRemovedAct ( const drn::accounting::AccountCode & code)
slot

◆ onRemovedBankAccount

void drn::navigation::Navigator::onRemovedBankAccount ( const drn::accounting::AccountCode & ac)
slot

◆ onRemovedTransaction

void drn::navigation::Navigator::onRemovedTransaction ( const drn::accounting::TransactionNumber & tn)
slot

◆ onRenamed

void drn::navigation::Navigator::onRenamed ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetSource & original,
const drn::budgeting::BudgetSource & changed )
slot

◆ onRenamedBankAccount

void drn::navigation::Navigator::onRenamedBankAccount ( const drn::accounting::AccountCode & original,
const drn::accounting::AccountCode & changed )
slot

◆ onSaveAsBudgetFile

void drn::navigation::Navigator::onSaveAsBudgetFile ( const QString & filePathName)
slot

◆ onSaveBudgetFile

void drn::navigation::Navigator::onSaveBudgetFile ( )
slot

◆ onSelectedLedger

void drn::navigation::Navigator::onSelectedLedger ( const drn::accounting::AccountCode & code)
slot

◆ onStoreExchangeRates

void drn::navigation::Navigator::onStoreExchangeRates ( const drn::conversion::ConversionMap & conversions)
slot

◆ onTransferRequested

void drn::navigation::Navigator::onTransferRequested ( const drn::accounting::AccountNumber & from,
const drn::accounting::AccountNumber & to,
const pecunia::Money & amount,
const QString & reason )
slot

◆ onUpdated

void drn::navigation::Navigator::onUpdated ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetedMoney & item,
const std::optional< drn::banking::BankAccount > & ba )
slot

◆ onUpdatedTransaction

void drn::navigation::Navigator::onUpdatedTransaction ( const drn::accounting::TransactionNumber & tn,
const drn::accounting::Transaction & txn )
slot

◆ processBudgetItemSaveFailed

void drn::navigation::Navigator::processBudgetItemSaveFailed ( const drn::budgeting::BudgetItemDueIdentifier & bidi,
const QString & errorMessage )
signal

◆ processBudgetItemSaveSucceeded

void drn::navigation::Navigator::processBudgetItemSaveSucceeded ( const drn::budgeting::BudgetItemDueIdentifier & bidi,
const std::optional< drn::accounting::TransactionNumber > & txnNum )
signal

◆ savedBudgetFile

void drn::navigation::Navigator::savedBudgetFile ( const QString & filePathName)
signal

◆ saveFailed

void drn::navigation::Navigator::saveFailed ( const std::optional< drn::budgeting::BudgetSource > & original,
const QString & errorMessage,
const std::optional< drn::budgeting::BudgetSource > & displayed )
signal

◆ saveSucceeded

void drn::navigation::Navigator::saveSucceeded ( const drn::budgeting::BudgetSource & source)
signal

◆ showAccounts

void drn::navigation::Navigator::showAccounts ( const std::set< drn::accounting::Account > & accounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showBanks

void drn::navigation::Navigator::showBanks ( const drn::banking::BankMap & banks,
const std::set< drn::accounting::Account > & allAccounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

Triggered when the GUI should display a list of banks in the system.

Parameters
banksThe financial institutions whose information should be displayed.
allAccountsThe current accounts in the accounting system.
usableCurrenciesThe collection of possible currencies a user can select from.
displayAsSpecifies options for how the currencies will be displayed to the user.

◆ showBills

void drn::navigation::Navigator::showBills ( const drn::budgeting::BillMap & bills,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showBudgetItemRefund

void drn::navigation::Navigator::showBudgetItemRefund ( const std::set< pecunia::Currency > & codes,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showConfigure

void drn::navigation::Navigator::showConfigure ( const std::chrono::hours & hrInWeek,
const std::chrono::days & dayInWeek,
const std::chrono::days & notifyDueWithin,
const pecunia::Currency & preferred,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const std::set< pecunia::Currency > & usable,
const std::set< pecunia::Currency > & used,
const drn::foundation::Percentage & balanceWindow )
signal

◆ showConfirmLoadBudgetFile

void drn::navigation::Navigator::showConfirmLoadBudgetFile ( const QString & filePathName)
signal

◆ showConfirmNewBudget

void drn::navigation::Navigator::showConfirmNewBudget ( )
signal

Triggered when a user must confirm that a new budget should be created.

◆ showDashboard

void drn::navigation::Navigator::showDashboard ( const drn::budgeting::BudgetTotals & bt,
const std::vector< drn::budgeting::BudgetItemAmountDue > & due,
const drn::adviser::BudgetHealth & bh,
const std::chrono::days & dueWithin,
const pecunia::Currency & preferred,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showDebts

void drn::navigation::Navigator::showDebts ( const drn::budgeting::DebtMap & debts,
const std::set< drn::navigation::BudgetBankAccount > & accounts,
const std::set< drn::accounting::AccountCode > & codes,
const std::set< drn::banking::BankName > & banks,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showExchangeRates

void drn::navigation::Navigator::showExchangeRates ( const drn::conversion::ConversionMap & currentConversions,
const std::set< pecunia::Currency > & currencies )
signal

◆ showGoals

void drn::navigation::Navigator::showGoals ( const drn::budgeting::GoalMap & goals,
const std::set< drn::navigation::BudgetBankAccount > & accounts,
const std::set< drn::accounting::AccountCode > & codes,
const std::set< drn::banking::BankName > & banks,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const pecunia::Money & wagesTotal )
signal

◆ showLedger

void drn::navigation::Navigator::showLedger ( const drn::accounting::LedgerAccount & ledger)
signal

◆ showLedgers

void drn::navigation::Navigator::showLedgers ( const std::set< drn::accounting::Account > & accounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showMoneyTransfer

void drn::navigation::Navigator::showMoneyTransfer ( const std::set< drn::navigation::BankAccountCode > & fromBanks,
const std::set< drn::navigation::BankAccountCode > & toBanks,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showNewBudget

void drn::navigation::Navigator::showNewBudget ( )
signal

Triggered when a new budget is created and should be displayed.

◆ showNewBudgetFirstTimeWizard

void drn::navigation::Navigator::showNewBudgetFirstTimeWizard ( const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usable,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

Triggered when a first-time new budget wizard should be displayed.

Parameters
preferredThe currency to be used as the user's preferred display currency.
usableThe set of currencies marked as usable, which will be reflected in the GUI list.
displayAsThe manner in which the currencies should be displayed.

◆ showNoBudgetFileOpened

void drn::navigation::Navigator::showNoBudgetFileOpened ( )
signal

◆ showNontracks

void drn::navigation::Navigator::showNontracks ( const drn::budgeting::NontrackMap & nontracks,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ showProcessBudgetItems

void drn::navigation::Navigator::showProcessBudgetItems ( const std::chrono::days & dueWithin,
const std::vector< drn::budgeting::BudgetItemAmountDue > & items,
const std::set< drn::banking::BankName > & banks,
const pecunia::Currency & preferredCurrency,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const std::set< drn::accounting::AccountCode > & codes )
signal

◆ showSaveAsBudgetFile

void drn::navigation::Navigator::showSaveAsBudgetFile ( )
signal

◆ showSurvey

void drn::navigation::Navigator::showSurvey ( const std::set< drn::banking::BankName > & banks,
const std::set< pecunia::Currency > & usable,
const drn::navigation::CurrencyDisplayOptions & displayAs,
const drn::foundation::Percentage & balanceWindow,
const std::set< drn::accounting::AccountCode > & codes )
signal

◆ showWages

void drn::navigation::Navigator::showWages ( const drn::budgeting::WageMap & wages,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
signal

◆ transactionSaveFailed

void drn::navigation::Navigator::transactionSaveFailed ( const std::optional< drn::accounting::TransactionNumber > & tn,
const QString & errorMessage )
signal

◆ transactionSaveSucceeded

void drn::navigation::Navigator::transactionSaveSucceeded ( const std::optional< drn::accounting::TransactionNumber > & displayed,
const std::optional< drn::accounting::TransactionNumber > & posted )
signal

◆ updateAvailableAcknowledged

void drn::navigation::Navigator::updateAvailableAcknowledged ( )
signal

◆ updateReleased

void drn::navigation::Navigator::updateReleased ( const drn::updating::SemanticVersion & latest)
signal