00001 #ifndef TRANSFER_H
00002 #define TRANSFER_H
00003
00004 #include <qlistview.h>
00005 #include <qstring.h>
00006 #include <sqlite3.h>
00007 #include <qdatetime.h>
00008
00009 #include "preferences.h"
00010
00011 class Transfer
00012 {
00013 public:
00014
00015 Transfer ();
00016 ~Transfer ();
00017
00018
00019
00020 void addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared );
00021 void updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid );
00022
00023
00024 void deleteTransfer ( int );
00025
00026
00027 void deleteAllTransfers ( int accountid );
00028
00029
00030 int getNumberOfTransfers ();
00031 int getNumberOfTransfers ( int accountid );
00032
00033 void displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate );
00034 int getCleared ( int id );
00035 void setCleared ( int id, int cleared );
00036 int getFromAccountID ( int id );
00037 int getToAccountID ( int id );
00038
00039 int getDay ( int id );
00040 int getMonth ( int id );
00041 int getYear ( int id );
00042 QString getAmount ( int id );
00043
00044 private:
00045
00046 sqlite3 *db;
00047 };
00048
00049 #endif
00050
00051
00052