summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/budget.h
authorallenforsythe <allenforsythe>2003-05-13 21:14:56 (UTC)
committer allenforsythe <allenforsythe>2003-05-13 21:14:56 (UTC)
commitf08e51ae62bf814b4cbf8873afd0e44b167cb9b4 (patch) (side-by-side diff)
treebab48138189f471aa8f18dd53dd57b4d0bfd156b /noncore/apps/qashmoney/budget.h
parentf31e2ecd95aba951dc77d98f02b45cb1297046ac (diff)
downloadopie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.zip
opie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.tar.gz
opie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.tar.bz2
Initial revision
Diffstat (limited to 'noncore/apps/qashmoney/budget.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/budget.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/noncore/apps/qashmoney/budget.h b/noncore/apps/qashmoney/budget.h
new file mode 100755
index 0000000..16af26a
--- a/dev/null
+++ b/noncore/apps/qashmoney/budget.h
@@ -0,0 +1,45 @@
+#ifndef BUDGET_H
+#define BUDGET_H
+
+#include <qstring.h>
+#include <qstringlist.h>
+#include <qlistview.h>
+#include <sqlite.h>
+
+class Budget
+ {
+ public:
+
+ Budget ();
+ ~Budget ();
+
+ int addBudget ( QString name, int type, QString description, QString currency, int startday, int startmonth, int startyear, int endday, int endmonth, int endyear, int defaultview );
+ void updateBudget ( QString name, QString description, QString currency, int budgetid );
+ void deleteBudget ( int budgetid );
+ int getNumberOfBudgets ();
+ int getNumberOfLineItems ( int budgetid );
+
+ QStringList* getBudgetNames ();
+ QStringList* getBudgetIDs ();
+ QStringList getLineItems ( int budgetid );
+ QStringList getLineItemIDs ( int budgetid );
+ QString getBudgetName ( int budgetid );
+ QString getBudgetDescription ( int budgetid );
+ QString getCurrency ( int budgetid );
+ QString getBudgetTotal ( int budgetid, int viewtype );
+
+ int getLastAdded ();
+
+ int addLineItem ( int budgetid, QString lineitemname, float lineitemamount, int lineitemtype );
+ void updateLineItem ( QString lineitemname, float lineitemamount, int lineitemtype, int budgetid, int lineitemid );
+ void displayLineItems ( int budgetid, QListView *listview, int month, int year, int viewtype );
+ void deleteLineItem ( int budgetid, int lineitemid );
+ int getLineItemTime ( int budgetid, int lineitemid );
+ float getLineItemAmount ( int budgetid, int lineitemid );
+
+ private:
+ sqlite *bdb;
+ };
+
+#endif
+