Diffstat (limited to 'noncore/unsupported/qashmoney/transfer.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/unsupported/qashmoney/transfer.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/noncore/unsupported/qashmoney/transfer.h b/noncore/unsupported/qashmoney/transfer.h new file mode 100755 index 0000000..cec3386 --- a/dev/null +++ b/noncore/unsupported/qashmoney/transfer.h | |||
@@ -0,0 +1,52 @@ | |||
1 | #ifndef TRANSFER_H | ||
2 | #define TRANSFER_H | ||
3 | |||
4 | #include <qlistview.h> | ||
5 | #include <qstring.h> | ||
6 | #include <sqlite3.h> | ||
7 | #include <qdatetime.h> | ||
8 | |||
9 | #include "preferences.h" | ||
10 | |||
11 | class Transfer | ||
12 | { | ||
13 | public: | ||
14 | |||
15 | Transfer (); | ||
16 | ~Transfer (); | ||
17 | |||
18 | // This function adds a new transfer to the database. It takes the fromaccount, toaccount, | ||
19 | // number, frombudget, tobudget, day, month, year, amount, cleared | ||
20 | void addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ); | ||
21 | void updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ); | ||
22 | |||
23 | // Deletes a transfer. Takes the transferid as its parameter | ||
24 | void deleteTransfer ( int ); | ||
25 | |||
26 | // Deletes all transfers for a given accountid | ||
27 | void deleteAllTransfers ( int accountid ); | ||
28 | |||
29 | // Returns the number of checking transfers | ||
30 | int getNumberOfTransfers (); | ||
31 | int getNumberOfTransfers ( int accountid ); | ||
32 | |||
33 | void displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate ); | ||
34 | int getCleared ( int id ); | ||
35 | void setCleared ( int id, int cleared ); | ||
36 | int getFromAccountID ( int id ); | ||
37 | int getToAccountID ( int id ); | ||
38 | |||
39 | int getDay ( int id ); | ||
40 | int getMonth ( int id ); | ||
41 | int getYear ( int id ); | ||
42 | QString getAmount ( int id ); | ||
43 | |||
44 | private: | ||
45 | |||
46 | sqlite3 *db; | ||
47 | }; | ||
48 | |||
49 | #endif | ||
50 | |||
51 | |||
52 | |||