DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::adviser::BudgetHealth Class Reference

Determines the health of a budget. Currently, when only +/- 5% of the budgeted wage is left it's deemed healthy, +/- 12.5% deemed ailing, and anything else as sick. More...

#include <BudgetHealth.h>

Collaboration diagram for drn::adviser::BudgetHealth:

Public Member Functions

 BudgetHealth ()
 Constructor to initialise in an empty, but healthy state.
 
 BudgetHealth (const budgeting::BudgetTotals &totals)
 Constructor to fully initialise the budget health using the budget data.
 
const ::QStringList & information () const noexcept
 Provides the information details on the health of the budget with each detail per entry.
 
const double & percent () const noexcept
 Provides the percentage of incoming to the outgoing budgeted items when there is more incoming than outoing and the inverse when there isn't. This will always be in the range of 0.0% and 100.0%.
 
const HealthStatuses & status () const noexcept
 Provides the health status of the budget.
 

Static Public Attributes

static const double lowerAilingRange_
 
static const double lowerHealthyRange_
 
static const double nontrackWageRatioThreshold_
 

Detailed Description

Determines the health of a budget. Currently, when only +/- 5% of the budgeted wage is left it's deemed healthy, +/- 12.5% deemed ailing, and anything else as sick.

Constructor & Destructor Documentation

◆ BudgetHealth() [1/2]

drn::adviser::BudgetHealth::BudgetHealth ( )

Constructor to initialise in an empty, but healthy state.

◆ BudgetHealth() [2/2]

drn::adviser::BudgetHealth::BudgetHealth ( const budgeting::BudgetTotals & totals)
explicit

Constructor to fully initialise the budget health using the budget data.

Parameters
totalsThe budget totals whose health is to be determined.

Member Function Documentation

◆ information()

const ::QStringList & drn::adviser::BudgetHealth::information ( ) const
nodiscardnoexcept

Provides the information details on the health of the budget with each detail per entry.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ percent()

const double & drn::adviser::BudgetHealth::percent ( ) const
nodiscardnoexcept

Provides the percentage of incoming to the outgoing budgeted items when there is more incoming than outoing and the inverse when there isn't. This will always be in the range of 0.0% and 100.0%.

◆ status()

const HealthStatuses & drn::adviser::BudgetHealth::status ( ) const
nodiscardnoexcept

Provides the health status of the budget.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ lowerAilingRange_

const double drn::adviser::BudgetHealth::lowerAilingRange_
static

The lowest value that the ratio of outgoing to incoming can be to be considered an ailing budget.

◆ lowerHealthyRange_

const double drn::adviser::BudgetHealth::lowerHealthyRange_
static

The lowest value that the ratio of outgoing to incoming can be to be considered a healthy budget.

◆ nontrackWageRatioThreshold_

const double drn::adviser::BudgetHealth::nontrackWageRatioThreshold_
static

The lowest value that the ratio of outgoing to incoming can be to be considered a sick budget.