author | allenforsythe <allenforsythe> | 2003-05-13 21:14:56 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-13 21:14:56 (UTC) |
commit | f08e51ae62bf814b4cbf8873afd0e44b167cb9b4 (patch) (side-by-side diff) | |
tree | bab48138189f471aa8f18dd53dd57b4d0bfd156b /noncore/apps/qashmoney/transfer.h | |
parent | f31e2ecd95aba951dc77d98f02b45cb1297046ac (diff) | |
download | opie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.zip opie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.tar.gz opie-f08e51ae62bf814b4cbf8873afd0e44b167cb9b4.tar.bz2 |
Initial revision
Diffstat (limited to 'noncore/apps/qashmoney/transfer.h') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/transfer.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/noncore/apps/qashmoney/transfer.h b/noncore/apps/qashmoney/transfer.h new file mode 100755 index 0000000..33dedf4 --- a/dev/null +++ b/noncore/apps/qashmoney/transfer.h @@ -0,0 +1,51 @@ +#ifndef TRANSFER_H +#define TRANSFER_H + +#include <qlistview.h> +#include <qstring.h> +#include <sqlite.h> + +#include "preferences.h" + +class Transfer + { + public: + + Transfer (); + ~Transfer (); + + // This function adds a new transfer to the database. It takes the fromaccount, toaccount, + // number, frombudget, tobudget, day, month, year, amount, cleared + void addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ); + void updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ); + + // Deletes a transfer. Takes the transferid as its parameter + void deleteTransfer ( int ); + + // Deletes all transfers for a given accountid + void deleteAllTransfers ( int accountid ); + + // Returns the number of checking transfers + int getNumberOfTransfers (); + int getNumberOfTransfers ( int accountid ); + + void displayTransfers ( QListView *listview, int accountid, bool children ); + int getCleared ( int id ); + void setCleared ( int id, int cleared ); + int getFromAccountID ( int id ); + int getToAccountID ( int id ); + + int getDay ( int id ); + int getMonth ( int id ); + int getYear ( int id ); + QString getAmount ( int id ); + + private: + + sqlite *db; + }; + +#endif + + + |