1 /* 2 * Copyright (C) 2005, Chris Shoemaker <c.shoemaker@cox.net> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, contact: 16 * 17 * Free Software Foundation Voice: +1-617-542-5942 18 * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 19 * Boston, MA 02110-1301, USA gnu@gnu.org 20 */ 21 22 /** @addtogroup budget 23 @{ */ 24 25 /** @file gnc-tree-model-budget.h 26 * @brief provides some utilities for working with the list of 27 * budgets in a book.*/ 28 29 /** @todo This file is poorly named, since it 30 * covers both model and view.*/ 31 32 #ifndef __GNC_TREE_MODEL_BUDGET_H__ 33 #define __GNC_TREE_MODEL_BUDGET_H__ 34 35 #include "gnc-budget.h" 36 37 /* The budget list columns. */ 38 enum 39 { 40 BUDGET_GUID_COLUMN, 41 BUDGET_NAME_COLUMN, 42 BUDGET_DESCRIPTION_COLUMN, 43 BUDGET_LIST_NUM_COLS 44 }; 45 46 GtkTreeModel * gnc_tree_model_budget_new(QofBook *book); 47 48 void gnc_tree_view_budget_set_model(GtkTreeView *tv, GtkTreeModel *tm); 49 50 GncBudget *gnc_tree_model_budget_get_budget(GtkTreeModel *tm, 51 GtkTreeIter *iter); 52 53 gboolean gnc_tree_model_budget_get_iter_for_budget(GtkTreeModel *tm, 54 GtkTreeIter *iter, 55 GncBudget *bgt); 56 /** @} */ 57 #endif // __GNC_TREE_MODEL_BUDGET_H__ 58