Diffstat (limited to 'noncore/apps/qashmoney/transaction.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/transaction.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/transaction.h b/noncore/apps/qashmoney/transaction.h index 5db011c..7297bb1 100755 --- a/noncore/apps/qashmoney/transaction.h +++ b/noncore/apps/qashmoney/transaction.h | |||
@@ -1,69 +1,70 @@ | |||
1 | #ifndef TRANSACTION_H | 1 | #ifndef TRANSACTION_H |
2 | #define TRANSACTION_H | 2 | #define TRANSACTION_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qlistview.h> | 5 | #include <qlistview.h> |
6 | #include <qdatetime.h> | ||
6 | #include <sqlite.h> | 7 | #include <sqlite.h> |
7 | 8 | ||
8 | #include "preferences.h" | 9 | #include "preferences.h" |
9 | 10 | ||
10 | class Transaction | 11 | class Transaction |
11 | { | 12 | { |
12 | public: | 13 | public: |
13 | 14 | ||
14 | Transaction (); | 15 | Transaction (); |
15 | ~Transaction (); | 16 | ~Transaction (); |
16 | 17 | ||
17 | // This function adds a new transaction to the database. It takes the payee, accountid, | 18 | // This function adds a new transaction to the database. It takes the payee, accountid, |
18 | // budgetid, number, day, month, year, amount, cleared | 19 | // budgetid, number, day, month, year, amount, cleared |
19 | void addTransaction ( QString description, QString payee, int accountid, int parentid, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid ); | 20 | void addTransaction ( QString description, QString payee, int accountid, int parentid, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid ); |
20 | 21 | ||
21 | // This updates an already existing transaction | 22 | // This updates an already existing transaction |
22 | void updateTransaction ( QString, QString, int, int, int, int, float, int, int, int, int ); | 23 | void updateTransaction ( QString, QString, int, int, int, int, float, int, int, int, int ); |
23 | 24 | ||
24 | // Deletes a transaction. Takes the transid as its parameter | 25 | // Deletes a transaction. Takes the transid as its parameter |
25 | void deleteTransaction ( int ); | 26 | void deleteTransaction ( int ); |
26 | 27 | ||
27 | // Returns the number of transactions | 28 | // Returns the number of transactions |
28 | int getNumberOfTransactions (); | 29 | int getNumberOfTransactions (); |
29 | 30 | ||
30 | // this is an overloaded function that returns the number of | 31 | // this is an overloaded function that returns the number of |
31 | // transactions for an account | 32 | // transactions for an account |
32 | int getNumberOfTransactions ( int ); | 33 | int getNumberOfTransactions ( int ); |
33 | 34 | ||
34 | // deletes all transactions for the provided accountid | 35 | // deletes all transactions for the provided accountid |
35 | void deleteAllTransactions ( int accountid ); | 36 | void deleteAllTransactions ( int accountid ); |
36 | 37 | ||
37 | QString getBudgetTotal ( int budgetid, int lineitemid, int year, int month, int viewtype ); | 38 | QString getBudgetTotal ( int budgetid, int lineitemid, int year, int month, int viewtype ); |
38 | QString getActualTotal ( int budgetid, int year, int month, int viewtype ); | 39 | QString getActualTotal ( int budgetid, int year, int month, int viewtype ); |
39 | 40 | ||
40 | // These two functions clear budget ids is either a line item or an entire budget is deleted | 41 | // These two functions clear budget ids is either a line item or an entire budget is deleted |
41 | void clearBudgetIDs ( int, int ); | 42 | void clearBudgetIDs ( int, int ); |
42 | void clearBudgetIDs ( int ); | 43 | void clearBudgetIDs ( int ); |
43 | 44 | ||
44 | public slots: | 45 | public slots: |
45 | 46 | ||
46 | void displayTransactions ( QListView *, int, bool, const char * ); | 47 | void displayTransactions ( QListView *, int, bool, const char *, QDate ); |
47 | QString getPayee ( int ); | 48 | QString getPayee ( int ); |
48 | QString getTransactionDescription ( int ); | 49 | QString getTransactionDescription ( int ); |
49 | QString getNumber ( int ); | 50 | QString getNumber ( int ); |
50 | QString getAmount ( int ); | 51 | QString getAmount ( int ); |
51 | QString getAbsoluteAmount ( int ); | 52 | QString getAbsoluteAmount ( int ); |
52 | int getCleared ( int ); | 53 | int getCleared ( int ); |
53 | void setCleared ( int id, int cleared ); | 54 | void setCleared ( int id, int cleared ); |
54 | int getBudgetID ( int id ); | 55 | int getBudgetID ( int id ); |
55 | int getLineItemID ( int id ); | 56 | int getLineItemID ( int id ); |
56 | int getDay ( int ); | 57 | int getDay ( int ); |
57 | int getMonth ( int ); | 58 | int getMonth ( int ); |
58 | int getYear ( int ); | 59 | int getYear ( int ); |
59 | int getAccountID ( int id ); | 60 | int getAccountID ( int id ); |
60 | 61 | ||
61 | private: | 62 | private: |
62 | 63 | ||
63 | sqlite *tdb; | 64 | sqlite *tdb; |
64 | }; | 65 | }; |
65 | 66 | ||
66 | #endif | 67 | #endif |
67 | 68 | ||
68 | 69 | ||
69 | 70 | ||