author | chicken <chicken> | 2004-11-02 19:46:53 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-11-02 19:46:53 (UTC) |
commit | 30c9ee6ca6442c66f02c004dd960b26eeab6dee2 (patch) (unidiff) | |
tree | 4e399ff17e29ae3b7769f69e926d76f7dfeb8128 | |
parent | 029fc220470de74b7c1a148c9ea934c17686149f (diff) | |
download | opie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.zip opie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.tar.gz opie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.tar.bz2 |
switching to sqlite3
-rwxr-xr-x | noncore/apps/qashmoney/budgetdisplay.cpp | 2 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transfer.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/qashmoney/budgetdisplay.cpp b/noncore/apps/qashmoney/budgetdisplay.cpp index 3fc4e6c..b83eb46 100755 --- a/noncore/apps/qashmoney/budgetdisplay.cpp +++ b/noncore/apps/qashmoney/budgetdisplay.cpp | |||
@@ -1,51 +1,51 @@ | |||
1 | #include <qmessagebox.h> | 1 | #include <qmessagebox.h> |
2 | #include <qheader.h> | 2 | #include <qheader.h> |
3 | #include <sqlite.h> | 3 | #include <sqlite3.h> |
4 | 4 | ||
5 | #include "budgetdisplay.h" | 5 | #include "budgetdisplay.h" |
6 | #include "budget.h" | 6 | #include "budget.h" |
7 | #include "datepicker.h" | 7 | #include "datepicker.h" |
8 | #include "transaction.h" | 8 | #include "transaction.h" |
9 | 9 | ||
10 | extern Preferences *preferences; | 10 | extern Preferences *preferences; |
11 | extern Budget *budget; | 11 | extern Budget *budget; |
12 | extern Transaction *transaction; | 12 | extern Transaction *transaction; |
13 | 13 | ||
14 | BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent ) | 14 | BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent ) |
15 | { | 15 | { |
16 | QFont font = this->font(); | 16 | QFont font = this->font(); |
17 | font.setWeight ( QFont::Bold ); | 17 | font.setWeight ( QFont::Bold ); |
18 | 18 | ||
19 | //set the default date to today | 19 | //set the default date to today |
20 | newDate = QDate::currentDate (); | 20 | newDate = QDate::currentDate (); |
21 | year = newDate.year(); | 21 | year = newDate.year(); |
22 | month = newDate.month(); | 22 | month = newDate.month(); |
23 | day = newDate.day(); | 23 | day = newDate.day(); |
24 | datelabel = preferences->getDate ( year, month ); | 24 | datelabel = preferences->getDate ( year, month ); |
25 | 25 | ||
26 | setCaption ( "Budget" ); | 26 | setCaption ( "Budget" ); |
27 | 27 | ||
28 | firstline = new QHBox ( this ); | 28 | firstline = new QHBox ( this ); |
29 | firstline->setSpacing ( 2 ); | 29 | firstline->setSpacing ( 2 ); |
30 | secondline = new QHBox ( this ); | 30 | secondline = new QHBox ( this ); |
31 | secondline->setSpacing ( 10 ); | 31 | secondline->setSpacing ( 10 ); |
32 | 32 | ||
33 | menu = new QMenuBar ( this ); | 33 | menu = new QMenuBar ( this ); |
34 | menu->setFrameStyle ( QFrame::Box | QFrame::Sunken ); | 34 | menu->setFrameStyle ( QFrame::Box | QFrame::Sunken ); |
35 | budgetmenu = new QPopupMenu ( this ); | 35 | budgetmenu = new QPopupMenu ( this ); |
36 | lineitemsmenu = new QPopupMenu ( this ); | 36 | lineitemsmenu = new QPopupMenu ( this ); |
37 | datemenu = new QPopupMenu ( this ); | 37 | datemenu = new QPopupMenu ( this ); |
38 | menu->insertItem ( "Budget", budgetmenu ); | 38 | menu->insertItem ( "Budget", budgetmenu ); |
39 | menu->insertItem ( "Line Item", lineitemsmenu ); | 39 | menu->insertItem ( "Line Item", lineitemsmenu ); |
40 | menu->insertItem ( "Date", datemenu ); | 40 | menu->insertItem ( "Date", datemenu ); |
41 | budgetmenu->insertItem ( "New", this, SLOT ( newBudget() ), 0, 1 ); | 41 | budgetmenu->insertItem ( "New", this, SLOT ( newBudget() ), 0, 1 ); |
42 | budgetmenu->insertItem ( "Edit", this, SLOT ( editBudget() ), 0, 2 ); | 42 | budgetmenu->insertItem ( "Edit", this, SLOT ( editBudget() ), 0, 2 ); |
43 | budgetmenu->insertItem ( "Delete", this, SLOT ( deleteBudget() ), 0, 3 ); | 43 | budgetmenu->insertItem ( "Delete", this, SLOT ( deleteBudget() ), 0, 3 ); |
44 | lineitemsmenu->insertItem ( "New", this, SLOT ( newLineItem() ), 0, 1 ); | 44 | lineitemsmenu->insertItem ( "New", this, SLOT ( newLineItem() ), 0, 1 ); |
45 | lineitemsmenu->insertItem ( "Edit", this, SLOT ( editLineItem() ), 0, 2 ); | 45 | lineitemsmenu->insertItem ( "Edit", this, SLOT ( editLineItem() ), 0, 2 ); |
46 | lineitemsmenu->insertItem ( "Delete", this, SLOT ( deleteLineItem() ), 0, 3 ); | 46 | lineitemsmenu->insertItem ( "Delete", this, SLOT ( deleteLineItem() ), 0, 3 ); |
47 | datemenu->insertItem ( "Change", this, SLOT ( showCalendar() ) ); | 47 | datemenu->insertItem ( "Change", this, SLOT ( showCalendar() ) ); |
48 | 48 | ||
49 | budgetbox = new QComboBox ( firstline ); | 49 | budgetbox = new QComboBox ( firstline ); |
50 | connect ( budgetbox, SIGNAL ( activated(int) ), this, SLOT ( setCurrentBudget(int) ) ); | 50 | connect ( budgetbox, SIGNAL ( activated(int) ), this, SLOT ( setCurrentBudget(int) ) ); |
51 | 51 | ||
diff --git a/noncore/apps/qashmoney/transfer.h b/noncore/apps/qashmoney/transfer.h index e910e7c..cec3386 100755 --- a/noncore/apps/qashmoney/transfer.h +++ b/noncore/apps/qashmoney/transfer.h | |||
@@ -1,52 +1,52 @@ | |||
1 | #ifndef TRANSFER_H | 1 | #ifndef TRANSFER_H |
2 | #define TRANSFER_H | 2 | #define TRANSFER_H |
3 | 3 | ||
4 | #include <qlistview.h> | 4 | #include <qlistview.h> |
5 | #include <qstring.h> | 5 | #include <qstring.h> |
6 | #include <sqlite.h> | 6 | #include <sqlite3.h> |
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | 8 | ||
9 | #include "preferences.h" | 9 | #include "preferences.h" |
10 | 10 | ||
11 | class Transfer | 11 | class Transfer |
12 | { | 12 | { |
13 | public: | 13 | public: |
14 | 14 | ||
15 | Transfer (); | 15 | Transfer (); |
16 | ~Transfer (); | 16 | ~Transfer (); |
17 | 17 | ||
18 | // This function adds a new transfer to the database. It takes the fromaccount, toaccount, | 18 | // This function adds a new transfer to the database. It takes the fromaccount, toaccount, |
19 | // number, frombudget, tobudget, day, month, year, amount, cleared | 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 ); | 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 ); | 21 | void updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ); |
22 | 22 | ||
23 | // Deletes a transfer. Takes the transferid as its parameter | 23 | // Deletes a transfer. Takes the transferid as its parameter |
24 | void deleteTransfer ( int ); | 24 | void deleteTransfer ( int ); |
25 | 25 | ||
26 | // Deletes all transfers for a given accountid | 26 | // Deletes all transfers for a given accountid |
27 | void deleteAllTransfers ( int accountid ); | 27 | void deleteAllTransfers ( int accountid ); |
28 | 28 | ||
29 | // Returns the number of checking transfers | 29 | // Returns the number of checking transfers |
30 | int getNumberOfTransfers (); | 30 | int getNumberOfTransfers (); |
31 | int getNumberOfTransfers ( int accountid ); | 31 | int getNumberOfTransfers ( int accountid ); |
32 | 32 | ||
33 | void displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate ); | 33 | void displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate ); |
34 | int getCleared ( int id ); | 34 | int getCleared ( int id ); |
35 | void setCleared ( int id, int cleared ); | 35 | void setCleared ( int id, int cleared ); |
36 | int getFromAccountID ( int id ); | 36 | int getFromAccountID ( int id ); |
37 | int getToAccountID ( int id ); | 37 | int getToAccountID ( int id ); |
38 | 38 | ||
39 | int getDay ( int id ); | 39 | int getDay ( int id ); |
40 | int getMonth ( int id ); | 40 | int getMonth ( int id ); |
41 | int getYear ( int id ); | 41 | int getYear ( int id ); |
42 | QString getAmount ( int id ); | 42 | QString getAmount ( int id ); |
43 | 43 | ||
44 | private: | 44 | private: |
45 | 45 | ||
46 | sqlite *db; | 46 | sqlite3 *db; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | 51 | ||
52 | 52 | ||