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

#include <MainWindow.h>

Inheritance diagram for drn::desktop_ui::MainWindow:
Collaboration diagram for drn::desktop_ui::MainWindow:

Public Slots

void onCheckCleanExit (const bool isDirty)
 
void onFetchedReleaseNotes (const std::set< drn::updating::ReleaseInformation > &versions)
 
void onLoadedBudgetFile (const QString &filePathName, const bool isReloaded)
 
void onSavedBudgetFile (const QString &filePathName)
 
void onShowAccounts (const std::set< drn::accounting::Account > &accounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onShowBanks (const drn::banking::BankMap &banks, const std::set< drn::accounting::Account > &allAccounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onShowBills (const drn::budgeting::BillMap &bills, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onShowBudgetItemRefund (const std::set< pecunia::Currency > &codes, const drn::navigation::CurrencyDisplayOptions &displayAs)
 Sets up and displays a GUI element for budget item refunds, enabling interactions such as looking up sources, transactions, or posting refunds. Additionally, connects signals and slots for transaction save results and the widget's lifecycle events.
 
void onShowConfigure (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 onShowConfirmLoadBudgetFile (const QString &filePathName)
 
void onShowConfirmNewBudget ()
 Displays a confirmation dialog to verify the user's intent to create a new budget and emits appropriate signals based on the user's response.
 
void onShowDashboard (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 onShowDebts (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 onShowExchangeRates (const drn::conversion::ConversionMap &currentConversions, const std::set< pecunia::Currency > &currencies)
 
void onShowGoals (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 onShowLedgers (const std::set< drn::accounting::Account > &accounts, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onShowMoneyTransfer (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 onShowNewBudget ()
 Displays a status message about the creation of a new budget and emits a signal to prepare the display of the primary dashboard GUI element.
 
void onShowNewBudgetFirstTimeWizard (const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usable, const drn::navigation::CurrencyDisplayOptions &displayAs)
 Sets up and displays a GUI element for a first-time setup wizard, enabling users to configure settings such as preferred currency and display options.
 
void onShowNoBudgetFileOpened ()
 
void onShowNontracks (const drn::budgeting::NontrackMap &nontracks, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onShowOpenBudgetFile ()
 
void onShowProcessBudgetItems (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 onShowSaveAsBudgetFile ()
 
void onShowSurvey (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 onShowWages (const drn::budgeting::WageMap &wages, const pecunia::Currency &preferred, const std::set< pecunia::Currency > &usableCurrencies, const drn::navigation::CurrencyDisplayOptions &displayAs)
 
void onUpdateReleased (const drn::updating::SemanticVersion &latest)
 
void show ()
 

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 added (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetedMoney &item, const std::optional< drn::banking::BankAccount > &ba)
 
void addedAct (const drn::accounting::Account &a)
 
void addedBankAccount (const QString &name, const drn::banking::BankAccountTypes &type, const pecunia::Money &openingBalance)
 
void addedTransaction (const drn::accounting::Transaction &txn)
 
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 bankAdded (const drn::banking::Bank &b)
 Triggered when the user wishes to add a bank.
 
void bankClosed (const drn::banking::BankName &bn)
 
void bankOpened (const drn::banking::BankName &bn)
 
void bankRemoved (const drn::banking::BankName &bn)
 
void bankRenamed (const drn::banking::BankName &original, const drn::banking::BankName &change)
 
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 bankUpdated (const drn::banking::Bank &b)
 Triggered when there are updates to a bank.
 
void checkIsBudgetFileDirty ()
 
void closed (const drn::accounting::AccountCode &code)
 
void completedNewBudgetFirstTimeWizard (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)
 Triggered when the user completes the first-time setup process.
 
void completedSurvey (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 completedSurveyFailed (const QString &errorMessage)
 
void completedSurveySucceeded ()
 
void configureSaveFailed (const QString &errorMessage)
 
void configureSaveSucceeded ()
 
void configureUpdated (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 drn::foundation::Percentage &balanceWindow)
 
void confirmedLoadBudgetFile (const QString &filePathName, const bool isReloaded)
 
void confirmedNewBudgetEmpty ()
 Triggered when the user confirms that they wish to have a new budget via an empty one.
 
void confirmedNewBudgetFirstTimeWizard ()
 Triggered when the user confirms that they wish to display the first-time budget wizard.
 
void fetchedExchangeRates (const std::set< pecunia::Currency > &currencies, const drn::conversion::ConversionMap &conversions)
 
void fetchExchangeRates (const std::set< pecunia::Currency > &currencies)
 
void fetchReleaseNotes ()
 
void generatedMappingSurvey (const drn::surveying::MappingSurvey &survey)
 
void generateMappingSurvey (const drn::banking::BankName &bn, const drn::accounting::AccountNumber &an, const QDate &surveyingOn)
 
void loadBudgetFile (const QString &filePathName)
 
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)
 Emitted when the available sources for a specific budget item type are retrieved.
 
void lookedUpLastReconciliation (const pecunia::Currency &code, const std::optional< drn::banking::ReconciledBalance > &reconciliation)
 This is to be triggered when the details of the last reconciliation for the current financial account displayed is available.
 
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 lookUpBankAccounts (const drn::banking::BankName &bn, const drn::navigation::AllowSubAccounts &shouldAllow)
 
void lookUpBudgetItemSources (const drn::budgeting::BudgetItemDueIdentifier &requestedBy)
 Emitted when the user requests to look up all sources related to a specific budget item type.
 
void lookUpLastReconciliation (const drn::accounting::AccountNumber &an)
 Triggered when the user wishes to look up and processes the most recent reconciliation for a specified account.
 
void lookUpRefundableTransactions (const drn::budgeting::BudgetItemIdentifier &bii)
 Emitted when the users wishes to look up all refundable transactions for a specific budget item.
 
void markCleared (const std::set< drn::accounting::TransactionNumber > &numbers)
 
void markReconciled (const drn::accounting::TransactionNumber &number)
 
void markUnreconciled (const std::set< drn::accounting::TransactionNumber > &numbers)
 
void opened (const drn::accounting::AccountCode &code)
 
void postRefund (const drn::accounting::TransactionNumber &txnNum, const pecunia::Money &refund)
 Emitted when the users clicks to save a budget item refund.
 
void prepareNewBudgetEmpty ()
 Emitted when the user wishes to prepare a new budget item using an empty one.
 
void prepareNewBudgetFirstTimeWizard ()
 Emitted when the user wishes to prepare a new budget item using a first-time wizard.
 
void prepareShowAccounts ()
 
void prepareShowBanks ()
 
void prepareShowBills ()
 
void prepareShowBudgetItemRefund ()
 
void prepareShowConfigure ()
 
void prepareShowDashboard ()
 
void prepareShowDebts ()
 
void prepareShowExchangeRates ()
 
void prepareShowGoals ()
 
void prepareShowLedgers ()
 
void prepareShowMoneyTransfer ()
 
void prepareShowNontracks ()
 
void prepareShowProcessBudgetItems ()
 
void prepareShowSurvey ()
 
void prepareShowWages ()
 
void processBudgetItemPosted (const drn::budgeting::BudgetItemAmountDue &bid, const drn::accounting::AccountCode &ac, const QDate &postOn)
 
void processBudgetItemPostedUnexpected (const drn::budgeting::BudgetItemDueIdentifier &bidi, const pecunia::Money &amount, const drn::accounting::AccountCode &ac, const QDate &postOn)
 
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 processBudgetItemSkipped (const drn::budgeting::BudgetItemDueIdentifier &bidi)
 
void recoded (const drn::accounting::AccountCode &current, const drn::accounting::AccountCode &changed)
 
void reloadBudgetFile ()
 
void removed (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetSource &source)
 
void removedAct (const drn::accounting::AccountCode &code)
 
void removedBankAccount (const drn::accounting::AccountCode &ac)
 
void removedTransaction (const drn::accounting::TransactionNumber &number)
 
void renamed (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetSource &original, const drn::budgeting::BudgetSource &changed)
 
void renamedBankAccount (const drn::accounting::AccountCode &original, const drn::accounting::AccountCode &changed)
 
void saveAsBudgetFile (const QString &filePathName)
 
void saveBudgetFile ()
 
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 selectedLedger (const drn::accounting::AccountCode &code)
 
void showLedger (const drn::accounting::LedgerAccount &ledger)
 
void storeExchangeRates (const drn::conversion::ConversionMap &conversions)
 
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 transferRequested (const drn::accounting::AccountNumber &from, const drn::accounting::AccountNumber &to, const pecunia::Money &amount, const QString &reason)
 
void updateAvailableAcknowledged ()
 
void updated (const drn::budgeting::BudgetItemTypes &type, const drn::budgeting::BudgetedMoney &item, const std::optional< drn::banking::BankAccount > &ba)
 
void updatedTransaction (const drn::accounting::TransactionNumber &tn, const drn::accounting::Transaction &txn)
 

Public Member Functions

 MainWindow (const navigation::ConfigurationOptions &options)
 Constructs the main application window.
 
 ~MainWindow () override
 Destroys the instance and cleans up any allocated resources.
 

Protected Member Functions

void closeEvent (QCloseEvent *event) override
 

Constructor & Destructor Documentation

◆ MainWindow()

drn::desktop_ui::MainWindow::MainWindow ( const navigation::ConfigurationOptions & options)
explicit

Constructs the main application window.

Parameters
optionsConfiguration settings specifying application behaviour and UI elements.
Postcondition
Creates and displays the main application window as the central interface for users. The first widget to be displayed is the dashboard view.
Initialises key components such as toolbars based on the specified options.

◆ ~MainWindow()

drn::desktop_ui::MainWindow::~MainWindow ( )
override

Destroys the instance and cleans up any allocated resources.

Postcondition
Releases all allocated resources associated with the instance.
Ensures that any ongoing or pending operations relevant to the are finalised.

Member Function Documentation

◆ accountSaveFailed

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

◆ accountSaveSucceeded

void drn::desktop_ui::MainWindow::accountSaveSucceeded ( const drn::accounting::AccountCode & code)
signal

◆ added

void drn::desktop_ui::MainWindow::added ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetedMoney & item,
const std::optional< drn::banking::BankAccount > & ba )
signal

◆ addedAct

void drn::desktop_ui::MainWindow::addedAct ( const drn::accounting::Account & a)
signal

◆ addedBankAccount

void drn::desktop_ui::MainWindow::addedBankAccount ( const QString & name,
const drn::banking::BankAccountTypes & type,
const pecunia::Money & openingBalance )
signal

◆ addedTransaction

void drn::desktop_ui::MainWindow::addedTransaction ( const drn::accounting::Transaction & txn)
signal

◆ bankAccountSaveFailed

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

◆ bankAccountSaveSucceeded

void drn::desktop_ui::MainWindow::bankAccountSaveSucceeded ( const drn::accounting::AccountCode & ac)
signal

◆ bankAdded

void drn::desktop_ui::MainWindow::bankAdded ( const drn::banking::Bank & b)
signal

Triggered when the user wishes to add a bank.

Parameters
bThe bank object that is to be added to the system.

◆ bankClosed

void drn::desktop_ui::MainWindow::bankClosed ( const drn::banking::BankName & bn)
signal

◆ bankOpened

void drn::desktop_ui::MainWindow::bankOpened ( const drn::banking::BankName & bn)
signal

◆ bankRemoved

void drn::desktop_ui::MainWindow::bankRemoved ( const drn::banking::BankName & bn)
signal

◆ bankRenamed

void drn::desktop_ui::MainWindow::bankRenamed ( const drn::banking::BankName & original,
const drn::banking::BankName & change )
signal

◆ bankSaveFailed

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

◆ bankSaveSucceeded

void drn::desktop_ui::MainWindow::bankSaveSucceeded ( const drn::banking::BankName & bn)
signal

◆ bankUpdated

void drn::desktop_ui::MainWindow::bankUpdated ( const drn::banking::Bank & b)
signal

Triggered when there are updates to a bank.

Parameters
bThe bank object that has undergone updates and needs processing.

◆ checkIsBudgetFileDirty

void drn::desktop_ui::MainWindow::checkIsBudgetFileDirty ( )
signal

◆ closed

void drn::desktop_ui::MainWindow::closed ( const drn::accounting::AccountCode & code)
signal

◆ closeEvent()

void drn::desktop_ui::MainWindow::closeEvent ( QCloseEvent * event)
overrideprotected

◆ completedNewBudgetFirstTimeWizard

void drn::desktop_ui::MainWindow::completedNewBudgetFirstTimeWizard ( 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 )
signal

Triggered when the user completes the first-time setup process.

This function provides the first-time budget setup process by capturing and processing the user-provided details such as currency preferences, bank account details, and budget template selections.

Ensure the required data is valid and complete before invoking this method.

Precondition
The wizard process must have all necessary preferences inputted and validated.
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.

◆ completedSurvey

void drn::desktop_ui::MainWindow::completedSurvey ( 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 )
signal

◆ completedSurveyFailed

void drn::desktop_ui::MainWindow::completedSurveyFailed ( const QString & errorMessage)
signal

◆ completedSurveySucceeded

void drn::desktop_ui::MainWindow::completedSurveySucceeded ( )
signal

◆ configureSaveFailed

void drn::desktop_ui::MainWindow::configureSaveFailed ( const QString & errorMessage)
signal

◆ configureSaveSucceeded

void drn::desktop_ui::MainWindow::configureSaveSucceeded ( )
signal

◆ configureUpdated

void drn::desktop_ui::MainWindow::configureUpdated ( 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 drn::foundation::Percentage & balanceWindow )
signal

◆ confirmedLoadBudgetFile

void drn::desktop_ui::MainWindow::confirmedLoadBudgetFile ( const QString & filePathName,
const bool isReloaded )
signal

◆ confirmedNewBudgetEmpty

void drn::desktop_ui::MainWindow::confirmedNewBudgetEmpty ( )
signal

Triggered when the user confirms that they wish to have a new budget via an empty one.

◆ confirmedNewBudgetFirstTimeWizard

void drn::desktop_ui::MainWindow::confirmedNewBudgetFirstTimeWizard ( )
signal

Triggered when the user confirms that they wish to display the first-time budget wizard.

◆ fetchedExchangeRates

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

◆ fetchExchangeRates

void drn::desktop_ui::MainWindow::fetchExchangeRates ( const std::set< pecunia::Currency > & currencies)
signal

◆ fetchReleaseNotes

void drn::desktop_ui::MainWindow::fetchReleaseNotes ( )
signal

◆ generatedMappingSurvey

void drn::desktop_ui::MainWindow::generatedMappingSurvey ( const drn::surveying::MappingSurvey & survey)
signal

◆ generateMappingSurvey

void drn::desktop_ui::MainWindow::generateMappingSurvey ( const drn::banking::BankName & bn,
const drn::accounting::AccountNumber & an,
const QDate & surveyingOn )
signal

◆ loadBudgetFile

void drn::desktop_ui::MainWindow::loadBudgetFile ( const QString & filePathName)
signal

◆ lookedUpBankAccounts

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

◆ lookedUpBudgetItemSources

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

Emitted when the available sources for a specific budget item type are retrieved.

This signal should be used to notify the completion of a source lookup for a specific budget item. It facilitates downstream processes or UI updates by providing the set of associated sources for the identified budget item type.

Parameters
requestedByA unique identifier specifying the exact budget item for which sources were retrieved.
sourcesThe set of sources determined to be associated with the budget item type.

◆ lookedUpLastReconciliation

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

This is to be triggered when the details of the last reconciliation for the current financial account displayed is available.

Parameters
codeThe currency associated with the selected account reconciliation process.
reconciliationThe last reconciled balance, if available.
Postcondition
Retrieves the last reconciliation details and displays them using a GUI item.
Updates the internal state of the application to reflect the data of the displayed reconciliation.

◆ lookedUpRefundableTransactions

void drn::desktop_ui::MainWindow::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.

◆ lookUpBankAccounts

void drn::desktop_ui::MainWindow::lookUpBankAccounts ( const drn::banking::BankName & bn,
const drn::navigation::AllowSubAccounts & shouldAllow )
signal

◆ lookUpBudgetItemSources

void drn::desktop_ui::MainWindow::lookUpBudgetItemSources ( const drn::budgeting::BudgetItemDueIdentifier & requestedBy)
signal

Emitted when the user requests to look up all sources related to a specific budget item type.

This should be used when there is a need to identify all associated sources for a given budget item, categorized by its type.

Parameters
requestedByA unique identifier specifying the budget item for which sources need to be retrieved.

◆ lookUpLastReconciliation

void drn::desktop_ui::MainWindow::lookUpLastReconciliation ( const drn::accounting::AccountNumber & an)
signal

Triggered when the user wishes to look up and processes the most recent reconciliation for a specified account.

This method should be used when there is a need to analyze or display the latest reconciliation details for a given account.

Parameters
anThe identifier representing the account for which to look up the latest reconciliation.

◆ lookUpRefundableTransactions

void drn::desktop_ui::MainWindow::lookUpRefundableTransactions ( const drn::budgeting::BudgetItemIdentifier & bii)
signal

Emitted when the users wishes to look up all refundable transactions for a specific budget item.

Parameters
biiA unique identifier that specifies the budget item for which refundable transactions need to be located.

◆ markCleared

void drn::desktop_ui::MainWindow::markCleared ( const std::set< drn::accounting::TransactionNumber > & numbers)
signal

◆ markReconciled

void drn::desktop_ui::MainWindow::markReconciled ( const drn::accounting::TransactionNumber & number)
signal

◆ markUnreconciled

void drn::desktop_ui::MainWindow::markUnreconciled ( const std::set< drn::accounting::TransactionNumber > & numbers)
signal

◆ onCheckCleanExit

void drn::desktop_ui::MainWindow::onCheckCleanExit ( const bool isDirty)
slot

◆ onFetchedReleaseNotes

void drn::desktop_ui::MainWindow::onFetchedReleaseNotes ( const std::set< drn::updating::ReleaseInformation > & versions)
slot

◆ onLoadedBudgetFile

void drn::desktop_ui::MainWindow::onLoadedBudgetFile ( const QString & filePathName,
const bool isReloaded )
slot

◆ onSavedBudgetFile

void drn::desktop_ui::MainWindow::onSavedBudgetFile ( const QString & filePathName)
slot

◆ onShowAccounts

void drn::desktop_ui::MainWindow::onShowAccounts ( const std::set< drn::accounting::Account > & accounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onShowBanks

void drn::desktop_ui::MainWindow::onShowBanks ( const drn::banking::BankMap & banks,
const std::set< drn::accounting::Account > & allAccounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onShowBills

void drn::desktop_ui::MainWindow::onShowBills ( const drn::budgeting::BillMap & bills,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onShowBudgetItemRefund

void drn::desktop_ui::MainWindow::onShowBudgetItemRefund ( const std::set< pecunia::Currency > & codes,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

Sets up and displays a GUI element for budget item refunds, enabling interactions such as looking up sources, transactions, or posting refunds. Additionally, connects signals and slots for transaction save results and the widget's lifecycle events.

This should be used when the user needs to view and process refunds related to specific budget items. The associated signals provide functionality for retrieving associated data and managing refund operations in an interactive interface.

Precondition
The application framework must be initialized, and this method must only be called from the main thread of the application.
Parameters
codesA collection of currency codes that determine the scope of refundable budget items.
displayAsOptions that define how refund information should be displayed within the GUI.
Postcondition
A GUI element is created and set as the primary view for the application window. Internal signal and slot connections are established to handle interactions such as looking up budget item sources, looking up refundable transactions, posting refunds, and handling save operations.

◆ onShowConfigure

void drn::desktop_ui::MainWindow::onShowConfigure ( 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 )
slot

◆ onShowConfirmLoadBudgetFile

void drn::desktop_ui::MainWindow::onShowConfirmLoadBudgetFile ( const QString & filePathName)
slot

◆ onShowConfirmNewBudget

void drn::desktop_ui::MainWindow::onShowConfirmNewBudget ( )
slot

Displays a confirmation dialog to verify the user's intent to create a new budget and emits appropriate signals based on the user's response.

This should be used when a user initiates the creation of a new budget, ensuring they are aware of potential loss of unsaved changes and providing an opportunity to confirm or cancel the action. Signals emitted notify subscribed components or systems about the user's decision and the context of the requested budget creation (using a wizard or starting empty).

Precondition
The application must have a valid budget creation request, stored as a value in the relevant member variable.
Postcondition
Displays a confirmation dialog using a GUI element to prompt the user.
If the user confirms, emits a signal indicating the type of new budget to create, such as using a wizard, or starting with an empty budget.
Resets the tracked request for new budget creation to an uninitialized state.

◆ onShowDashboard

void drn::desktop_ui::MainWindow::onShowDashboard ( 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 )
slot

◆ onShowDebts

void drn::desktop_ui::MainWindow::onShowDebts ( 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 )
slot

◆ onShowExchangeRates

void drn::desktop_ui::MainWindow::onShowExchangeRates ( const drn::conversion::ConversionMap & currentConversions,
const std::set< pecunia::Currency > & currencies )
slot

◆ onShowGoals

void drn::desktop_ui::MainWindow::onShowGoals ( 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 )
slot

◆ onShowLedgers

void drn::desktop_ui::MainWindow::onShowLedgers ( const std::set< drn::accounting::Account > & accounts,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onShowMoneyTransfer

void drn::desktop_ui::MainWindow::onShowMoneyTransfer ( 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 )
slot

◆ onShowNewBudget

void drn::desktop_ui::MainWindow::onShowNewBudget ( )
slot

Displays a status message about the creation of a new budget and emits a signal to prepare the display of the primary dashboard GUI element.

This should be used when initializing or transitioning the user to a new budgeting process, ensuring they are informed about the new budget creation and directing them to the appropriate dashboard view.

Postcondition
A status message is shown in the status bar for a specified duration.
A signal is emitted to notify subscribers to prepare and show the dashboard interface.

◆ onShowNewBudgetFirstTimeWizard

void drn::desktop_ui::MainWindow::onShowNewBudgetFirstTimeWizard ( const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usable,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

Sets up and displays a GUI element for a first-time setup wizard, enabling users to configure settings such as preferred currency and display options.

This should be used when the application is launched for the first time, allowing users to define initial preferences and streamline their onboarding experience. The wizard provides an interactive GUI element for setting up the application.

Parameters
preferredThe default display currency option for the application.
usableThe set of currencies marked as usable, which will be reflected in the GUI list.
displayAsThe display preferences defining how currency values should be formatted or shown within the application during configuration.
Postcondition
A GUI element for the first-time setup wizard is created and displayed. A connection is established between the wizard's closing event and the method that switches to the dashboard view.

◆ onShowNoBudgetFileOpened

void drn::desktop_ui::MainWindow::onShowNoBudgetFileOpened ( )
slot

◆ onShowNontracks

void drn::desktop_ui::MainWindow::onShowNontracks ( const drn::budgeting::NontrackMap & nontracks,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onShowOpenBudgetFile

void drn::desktop_ui::MainWindow::onShowOpenBudgetFile ( )
slot

◆ onShowProcessBudgetItems

void drn::desktop_ui::MainWindow::onShowProcessBudgetItems ( 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 )
slot

◆ onShowSaveAsBudgetFile

void drn::desktop_ui::MainWindow::onShowSaveAsBudgetFile ( )
slot

◆ onShowSurvey

void drn::desktop_ui::MainWindow::onShowSurvey ( 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 )
slot

◆ onShowWages

void drn::desktop_ui::MainWindow::onShowWages ( const drn::budgeting::WageMap & wages,
const pecunia::Currency & preferred,
const std::set< pecunia::Currency > & usableCurrencies,
const drn::navigation::CurrencyDisplayOptions & displayAs )
slot

◆ onUpdateReleased

void drn::desktop_ui::MainWindow::onUpdateReleased ( const drn::updating::SemanticVersion & latest)
slot

◆ opened

void drn::desktop_ui::MainWindow::opened ( const drn::accounting::AccountCode & code)
signal

◆ postRefund

void drn::desktop_ui::MainWindow::postRefund ( const drn::accounting::TransactionNumber & txnNum,
const pecunia::Money & refund )
signal

Emitted when the users clicks to save a budget item refund.

Parameters
txnNumThe unique identifier representing the transaction to which the budget item is to be refunded.
refundThe refund amount to be posted against the specified transaction.

◆ prepareNewBudgetEmpty

void drn::desktop_ui::MainWindow::prepareNewBudgetEmpty ( )
signal

Emitted when the user wishes to prepare a new budget item using an empty one.

◆ prepareNewBudgetFirstTimeWizard

void drn::desktop_ui::MainWindow::prepareNewBudgetFirstTimeWizard ( )
signal

Emitted when the user wishes to prepare a new budget item using a first-time wizard.

◆ prepareShowAccounts

void drn::desktop_ui::MainWindow::prepareShowAccounts ( )
signal

◆ prepareShowBanks

void drn::desktop_ui::MainWindow::prepareShowBanks ( )
signal

◆ prepareShowBills

void drn::desktop_ui::MainWindow::prepareShowBills ( )
signal

◆ prepareShowBudgetItemRefund

void drn::desktop_ui::MainWindow::prepareShowBudgetItemRefund ( )
signal

◆ prepareShowConfigure

void drn::desktop_ui::MainWindow::prepareShowConfigure ( )
signal

◆ prepareShowDashboard

void drn::desktop_ui::MainWindow::prepareShowDashboard ( )
signal

◆ prepareShowDebts

void drn::desktop_ui::MainWindow::prepareShowDebts ( )
signal

◆ prepareShowExchangeRates

void drn::desktop_ui::MainWindow::prepareShowExchangeRates ( )
signal

◆ prepareShowGoals

void drn::desktop_ui::MainWindow::prepareShowGoals ( )
signal

◆ prepareShowLedgers

void drn::desktop_ui::MainWindow::prepareShowLedgers ( )
signal

◆ prepareShowMoneyTransfer

void drn::desktop_ui::MainWindow::prepareShowMoneyTransfer ( )
signal

◆ prepareShowNontracks

void drn::desktop_ui::MainWindow::prepareShowNontracks ( )
signal

◆ prepareShowProcessBudgetItems

void drn::desktop_ui::MainWindow::prepareShowProcessBudgetItems ( )
signal

◆ prepareShowSurvey

void drn::desktop_ui::MainWindow::prepareShowSurvey ( )
signal

◆ prepareShowWages

void drn::desktop_ui::MainWindow::prepareShowWages ( )
signal

◆ processBudgetItemPosted

void drn::desktop_ui::MainWindow::processBudgetItemPosted ( const drn::budgeting::BudgetItemAmountDue & bid,
const drn::accounting::AccountCode & ac,
const QDate & postOn )
signal

◆ processBudgetItemPostedUnexpected

void drn::desktop_ui::MainWindow::processBudgetItemPostedUnexpected ( const drn::budgeting::BudgetItemDueIdentifier & bidi,
const pecunia::Money & amount,
const drn::accounting::AccountCode & ac,
const QDate & postOn )
signal

◆ processBudgetItemSaveFailed

void drn::desktop_ui::MainWindow::processBudgetItemSaveFailed ( const drn::budgeting::BudgetItemDueIdentifier & bidi,
const QString & errorMessage )
signal

◆ processBudgetItemSaveSucceeded

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

◆ processBudgetItemSkipped

void drn::desktop_ui::MainWindow::processBudgetItemSkipped ( const drn::budgeting::BudgetItemDueIdentifier & bidi)
signal

◆ recoded

void drn::desktop_ui::MainWindow::recoded ( const drn::accounting::AccountCode & current,
const drn::accounting::AccountCode & changed )
signal

◆ reloadBudgetFile

void drn::desktop_ui::MainWindow::reloadBudgetFile ( )
signal

◆ removed

void drn::desktop_ui::MainWindow::removed ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetSource & source )
signal

◆ removedAct

void drn::desktop_ui::MainWindow::removedAct ( const drn::accounting::AccountCode & code)
signal

◆ removedBankAccount

void drn::desktop_ui::MainWindow::removedBankAccount ( const drn::accounting::AccountCode & ac)
signal

◆ removedTransaction

void drn::desktop_ui::MainWindow::removedTransaction ( const drn::accounting::TransactionNumber & number)
signal

◆ renamed

void drn::desktop_ui::MainWindow::renamed ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetSource & original,
const drn::budgeting::BudgetSource & changed )
signal

◆ renamedBankAccount

void drn::desktop_ui::MainWindow::renamedBankAccount ( const drn::accounting::AccountCode & original,
const drn::accounting::AccountCode & changed )
signal

◆ saveAsBudgetFile

void drn::desktop_ui::MainWindow::saveAsBudgetFile ( const QString & filePathName)
signal

◆ saveBudgetFile

void drn::desktop_ui::MainWindow::saveBudgetFile ( )
signal

◆ saveFailed

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

◆ saveSucceeded

void drn::desktop_ui::MainWindow::saveSucceeded ( const drn::budgeting::BudgetSource & source)
signal

◆ selectedLedger

void drn::desktop_ui::MainWindow::selectedLedger ( const drn::accounting::AccountCode & code)
signal

◆ show

void drn::desktop_ui::MainWindow::show ( )
slot

◆ showLedger

void drn::desktop_ui::MainWindow::showLedger ( const drn::accounting::LedgerAccount & ledger)
signal

◆ storeExchangeRates

void drn::desktop_ui::MainWindow::storeExchangeRates ( const drn::conversion::ConversionMap & conversions)
signal

◆ transactionSaveFailed

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

◆ transactionSaveSucceeded

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

◆ transferRequested

void drn::desktop_ui::MainWindow::transferRequested ( const drn::accounting::AccountNumber & from,
const drn::accounting::AccountNumber & to,
const pecunia::Money & amount,
const QString & reason )
signal

◆ updateAvailableAcknowledged

void drn::desktop_ui::MainWindow::updateAvailableAcknowledged ( )
signal

◆ updated

void drn::desktop_ui::MainWindow::updated ( const drn::budgeting::BudgetItemTypes & type,
const drn::budgeting::BudgetedMoney & item,
const std::optional< drn::banking::BankAccount > & ba )
signal

◆ updatedTransaction

void drn::desktop_ui::MainWindow::updatedTransaction ( const drn::accounting::TransactionNumber & tn,
const drn::accounting::Transaction & txn )
signal