GnuCash
5.6-150-g038405b370+
|
gnc-budget_view.c – Budget display widget More...
Files | |
file | gnc-budget.h |
GnuCash Budgets. | |
file | gnc-budget-view.c |
File to define budget views for gnucash (the actual display of the budget, along with some calculations and event handlers). | |
file | gnc-budget-view.h |
file | gnc-plugin-page-budget.h |
file | gnc-tree-model-budget.h |
provides some utilities for working with the list of budgets in a book. | |
Data Structures | |
struct | GncBudgetView |
struct | GncBudgetViewClass |
struct | GncBudgetViewPrivate |
the private budget view structure More... | |
struct | BudgetAccumulationInfo |
Action for when a selection in a gnc budget view is changed. More... | |
struct | GncPluginPageBudget |
struct | GncPluginPageBudgetClass |
Macros | |
#define | GNC_TYPE_BUDGET (gnc_budget_get_type ()) |
#define | GNC_BUDGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_BUDGET, GncBudget)) |
#define | GNC_BUDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GNC_TYPE_BUDGET, GncBudgetClass)) |
#define | GNC_IS_BUDGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_BUDGET)) |
#define | GNC_IS_BUDGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GNC_TYPE_BUDGET)) |
#define | GNC_BUDGET_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GNC_TYPE_BUDGET, GncBudgetClass)) |
#define | GNC_BUDGET_MAX_NUM_PERIODS_DIGITS 3 |
#define | GNC_BUDGET_NOTES_PATH "notes" |
#define | gnc_budget_return_guid(X) (X ? *(qof_entity_get_guid(QOF_INSTANCE(X))) : *(guid_null())) |
#define | gnc_budget_lookup_direct(g, b) gnc_budget_lookup(&(g),(b)) |
#define | PLUGIN_PAGE_BUDGET_CM_CLASS "budget-view" |
#define | STATE_SECTION_PREFIX "Budget" |
#define | GNC_BUDGET_VIEW_GET_PRIVATE(o) ((GncBudgetViewPrivate*)gnc_budget_view_get_instance_private((GncBudgetView*)o)) |
#define | BUDGET_GUID "Budget GncGUID" |
#define | GNC_TYPE_BUDGET_VIEW (gnc_budget_view_get_type ()) |
#define | GNC_BUDGET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_BUDGET_VIEW, GncBudgetView)) |
#define | GNC_BUDGET_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_BUDGET_VIEW, GncBudgetViewClass)) |
#define | GNC_IS_BUDGET_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_BUDGET_VIEW)) |
#define | GNC_IS_BUDGET_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_BUDGET_VIEW)) |
#define | GNC_BUDGET_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_BUDGET_VIEW, GncBudgetViewClass)) |
#define | GNC_BUDGET_VIEW_NAME "GncBudgetView" |
#define | GNC_TYPE_PLUGIN_PAGE_BUDGET (gnc_plugin_page_budget_get_type ()) |
#define | GNC_PLUGIN_PAGE_BUDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_PLUGIN_PAGE_BUDGET, GncPluginPageBudget)) |
#define | GNC_PLUGIN_PAGE_BUDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN_PAGE_BUDGET, GncPluginPageBudgetClass)) |
#define | GNC_IS_PLUGIN_PAGE_BUDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_PLUGIN_PAGE_BUDGET)) |
#define | GNC_IS_PLUGIN_PAGE_BUDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN_PAGE_BUDGET)) |
#define | GNC_PLUGIN_PAGE_BUDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_PLUGIN_PAGE_BUDGET, GncPluginPageBudgetClass)) |
#define | GNC_PLUGIN_PAGE_BUDGET_NAME "GncPluginPageBudget" |
Enumerations | |
enum | { TOTALS_TYPE_INCOME, TOTALS_TYPE_EXPENSES, TOTALS_TYPE_ASSET_LIAB_EQ, TOTALS_TYPE_REMAINDER } |
enum | { BUDGET_GUID_COLUMN, BUDGET_NAME_COLUMN, BUDGET_DESCRIPTION_COLUMN, BUDGET_LIST_NUM_COLS } |
Functions | |
GType | gnc_budget_get_type (void) |
gboolean | gnc_budget_register (void) |
GncBudget * | gnc_budget_new (QofBook *book) |
Creates and initializes a Budget. | |
void | gnc_budget_destroy (GncBudget *budget) |
Deletes the given budget object. More... | |
void | gnc_budget_begin_edit (GncBudget *bgt) |
void | gnc_budget_commit_edit (GncBudget *bgt) |
GncBudget * | gnc_budget_clone (const GncBudget *budget) |
Clones a budget creating a copy. | |
const GncGUID * | gnc_budget_get_guid (const GncBudget *budget) |
void | gnc_budget_set_name (GncBudget *budget, const gchar *name) |
Set/Get the name of the Budget. | |
const gchar * | gnc_budget_get_name (const GncBudget *budget) |
void | gnc_budget_set_description (GncBudget *budget, const gchar *description) |
Set/Get the description of the Budget. | |
const gchar * | gnc_budget_get_description (const GncBudget *budget) |
void | gnc_budget_set_num_periods (GncBudget *budget, guint num_periods) |
Set/Get the number of periods in the Budget. | |
guint | gnc_budget_get_num_periods (const GncBudget *budget) |
void | gnc_budget_set_recurrence (GncBudget *budget, const Recurrence *r) |
const Recurrence * | gnc_budget_get_recurrence (const GncBudget *budget) |
time64 | gnc_budget_get_period_start_date (const GncBudget *budget, guint period_num) |
Get the starting date of the Budget period. | |
time64 | gnc_budget_get_period_end_date (const GncBudget *budget, guint period_num) |
Get the ending date of the Budget period. | |
void | gnc_budget_set_account_period_value (GncBudget *budget, const Account *account, guint period_num, gnc_numeric val) |
void | gnc_budget_unset_account_period_value (GncBudget *budget, const Account *account, guint period_num) |
gboolean | gnc_budget_is_account_period_value_set (const GncBudget *budget, const Account *account, guint period_num) |
gnc_numeric | gnc_budget_get_account_period_value (const GncBudget *budget, const Account *account, guint period_num) |
gnc_numeric | gnc_budget_get_account_period_actual_value (const GncBudget *budget, Account *account, guint period_num) |
void | gnc_budget_set_account_period_note (GncBudget *budget, const Account *account, guint period_num, const gchar *note) |
const gchar * | gnc_budget_get_account_period_note (const GncBudget *budget, const Account *account, guint period_num) |
GncBudget * | gnc_budget_get_default (QofBook *book) |
GncBudget * | gnc_budget_lookup (const GncGUID *guid, const QofBook *book) |
GncBudgetView * | gnc_budget_view_new (GncBudget *budget, AccountFilterDialog *fd) |
Create new gnc budget view. More... | |
void | gnc_budget_view_set_show_account_code (GncBudgetView *budget_view, gboolean show_account_code) |
gboolean | gnc_budget_view_get_show_account_code (GncBudgetView *budget_view) |
void | gnc_budget_view_set_show_account_description (GncBudgetView *budget_view, gboolean show_account_desc) |
gboolean | gnc_budget_view_get_show_account_description (GncBudgetView *budget_view) |
GtkTreeSelection * | gnc_budget_view_get_selection (GncBudgetView *budget_view) |
returns the current selection in the gnc budget view. More... | |
Account * | gnc_budget_view_get_account_from_path (GncBudgetView *budget_view, GtkTreePath *path) |
GtkWidget * | gnc_budget_view_get_account_tree_view (GncBudgetView *budget_view) |
GList * | gnc_budget_view_get_selected_accounts (GncBudgetView *budget_view) |
void | gnc_budget_view_save (GncBudgetView *budget_view, GKeyFile *key_file, const gchar *group_name) |
gboolean | gnc_budget_view_restore (GncBudgetView *budget_view, GKeyFile *key_file, const gchar *group_name) |
void | gnc_budget_view_delete_budget (GncBudgetView *budget_view) |
void | gnc_budget_view_save_account_filter (GncBudgetView *budget_view) |
void | gnc_budget_view_refresh (GncBudgetView *budget_view) |
refreshes the current budget view More... | |
GType | gnc_budget_view_get_type (void) |
GType | gnc_plugin_page_budget_get_type (void) |
GncPluginPage * | gnc_plugin_page_budget_new (GncBudget *budget) |
Create a new "budget" plugin page. More... | |
void | gnc_budget_gui_delete_budget (GncBudget *budget) |
GtkTreeModel * | gnc_tree_model_budget_new (QofBook *book) |
void | gnc_tree_view_budget_set_model (GtkTreeView *tv, GtkTreeModel *tm) |
GncBudget * | gnc_tree_model_budget_get_budget (GtkTreeModel *tm, GtkTreeIter *iter) |
gboolean | gnc_tree_model_budget_get_iter_for_budget (GtkTreeModel *tm, GtkTreeIter *iter, GncBudget *bgt) |
Variables | |
GtkBox | GncBudgetView::w |
GtkBoxClass | GncBudgetViewClass::w |
GtkTreeView * | GncBudgetViewPrivate::tree_view |
GtkTreeView * | GncBudgetViewPrivate::totals_tree_view |
GtkWidget * | GncBudgetViewPrivate::totals_scroll_window |
GtkAdjustment * | GncBudgetViewPrivate::hadj |
GncBudget * | GncBudgetViewPrivate::budget |
GncGUID | GncBudgetViewPrivate::key |
gboolean | GncBudgetViewPrivate::use_red_color |
GList * | GncBudgetViewPrivate::period_col_list |
GList * | GncBudgetViewPrivate::totals_col_list |
GtkTreeViewColumn * | GncBudgetViewPrivate::total_col |
AccountFilterDialog * | GncBudgetViewPrivate::fd |
Account * | GncBudgetViewPrivate::rootAcct |
gboolean | GncBudgetViewPrivate::show_account_code |
gboolean | GncBudgetViewPrivate::show_account_desc |
GtkCellRenderer * | GncBudgetViewPrivate::temp_cr |
GtkCellEditable * | GncBudgetViewPrivate::temp_ce |
gnc_numeric | BudgetAccumulationInfo::total |
GncBudget * | BudgetAccumulationInfo::budget |
guint | BudgetAccumulationInfo::period_num |
GNCPriceDB * | BudgetAccumulationInfo::pdb |
gnc_commodity * | BudgetAccumulationInfo::total_currency |
gnc-budget_view.c – Budget display widget
anonymous enum |
Definition at line 97 of file gnc-budget-view.c.
anonymous enum |
Definition at line 42 of file gnc-tree-model-budget.h.
void gnc_budget_destroy | ( | GncBudget * | budget | ) |
Deletes the given budget object.
Definition at line 321 of file gnc-budget.cpp.
GtkTreeSelection * gnc_budget_view_get_selection | ( | GncBudgetView * | budget_view | ) |
returns the current selection in the gnc budget view.
Returns the current selection in the gnc budget view by using the macro GNC_BUDGET_VIEW_GET_PRIVATE.
Definition at line 318 of file gnc-budget-view.c.
GncBudgetView * gnc_budget_view_new | ( | GncBudget * | budget, |
AccountFilterDialog * | fd | ||
) |
Create new gnc budget view.
Create a new "budget" display widget.
As the name suggests, this creates a new gnc budget view.
Definition at line 188 of file gnc-budget-view.c.
void gnc_budget_view_refresh | ( | GncBudgetView * | budget_view | ) |
refreshes the current budget view
The function will step through to only display the columns that are set as visible, and will add any needed columns (e.g. the totals column).
Definition at line 1477 of file gnc-budget-view.c.
GncPluginPage* gnc_plugin_page_budget_new | ( | GncBudget * | budget | ) |
Create a new "budget" plugin page.
Definition at line 234 of file gnc-plugin-page-budget.cpp.