From: <gua...@us...> - 2013-12-16 14:35:13
|
Revision: 5615 http://sourceforge.net/p/moneymanagerex/code/5615 Author: guanlisheng Date: 2013-12-16 14:35:07 +0000 (Mon, 16 Dec 2013) Log Message: ----------- break h to h & cpp Modified Paths: -------------- trunk/src/model/Model_Category.cpp trunk/src/model/Model_Subcategory.h Modified: trunk/src/model/Model_Category.cpp =================================================================== --- trunk/src/model/Model_Category.cpp 2013-12-16 14:22:58 UTC (rev 5614) +++ trunk/src/model/Model_Category.cpp 2013-12-16 14:35:07 UTC (rev 5615) @@ -22,6 +22,14 @@ #include "Model_Account.h" #include "reports/mmDateRange.h" +bool Model_Subcategory::is_used(int id) +{ + int cat_id = instance().get(id)->CATEGID; + Model_Billsdeposits::Data_Set deposits = Model_Billsdeposits::instance().find(Model_Billsdeposits::CATEGID(cat_id), Model_Billsdeposits::SUBCATEGID(id)); + Model_Checking::Data_Set trans = Model_Checking::instance().find(Model_Checking::CATEGID(cat_id), Model_Checking::SUBCATEGID(id)); + return !deposits.empty() || !trans.empty(); +} + Model_Category::Model_Category(): Model_Mix<DB_Table_CATEGORY_V1>() { } Modified: trunk/src/model/Model_Subcategory.h =================================================================== --- trunk/src/model/Model_Subcategory.h 2013-12-16 14:22:58 UTC (rev 5614) +++ trunk/src/model/Model_Subcategory.h 2013-12-16 14:35:07 UTC (rev 5615) @@ -21,8 +21,6 @@ #include "Model.h" #include "db/DB_Table_Subcategory_V1.h" -#include "Model_Category.h" -#include "Model_Checking.h" #include "Model_Billsdeposits.h" class Model_Subcategory : public Model_Mix<DB_Table_SUBCATEGORY_V1> @@ -66,13 +64,7 @@ } public: - static bool is_used(int id) - { - int cat_id = instance().get(id)->CATEGID; - Model_Billsdeposits::Data_Set deposits = Model_Billsdeposits::instance().find(Model_Billsdeposits::CATEGID(cat_id), Model_Billsdeposits::SUBCATEGID(id)); - Model_Checking::Data_Set trans = Model_Checking::instance().find(Model_Checking::CATEGID(cat_id), Model_Checking::SUBCATEGID(id)); - return !deposits.empty() || !trans.empty(); - } + static bool is_used(int id); }; #endif // This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |