author | alwin <alwin> | 2004-02-23 00:11:55 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-23 00:11:55 (UTC) |
commit | fdf3a6d59f3725bebb923a774d04fb51fb1b0d68 (patch) (unidiff) | |
tree | fffc5daec8afe5c339c3fe15988a30b7fe6aca21 | |
parent | c1cf5f3efde5a50656a196795fe297ca58ac4334 (diff) | |
download | opie-fdf3a6d59f3725bebb923a774d04fb51fb1b0d68.zip opie-fdf3a6d59f3725bebb923a774d04fb51fb1b0d68.tar.gz opie-fdf3a6d59f3725bebb923a774d04fb51fb1b0d68.tar.bz2 |
remove depes to libstdc++
-rwxr-xr-x | noncore/apps/qashmoney/account.cpp | 1 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/budget.cpp | 1 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/qashmoney.cpp | 1 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/qashmoney.pro | 2 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transaction.cpp | 1 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transactiondisplay.cpp | 1 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transfer.cpp | 1 |
7 files changed, 1 insertions, 7 deletions
diff --git a/noncore/apps/qashmoney/account.cpp b/noncore/apps/qashmoney/account.cpp index 28f9ba2..181be23 100755 --- a/noncore/apps/qashmoney/account.cpp +++ b/noncore/apps/qashmoney/account.cpp | |||
@@ -1,32 +1,31 @@ | |||
1 | #include "account.h" | 1 | #include "account.h" |
2 | #include "transaction.h" | 2 | #include "transaction.h" |
3 | #include "transfer.h" | 3 | #include "transfer.h" |
4 | #include "preferences.h" | 4 | #include "preferences.h" |
5 | 5 | ||
6 | #include <qpixmap.h> | 6 | #include <qpixmap.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #include <iostream.h> | ||
9 | 8 | ||
10 | extern Preferences *preferences; | 9 | extern Preferences *preferences; |
11 | 10 | ||
12 | Account::Account () | 11 | Account::Account () |
13 | { | 12 | { |
14 | adb = sqlite_open ( "qmaccounts.db", 0, NULL ); | 13 | adb = sqlite_open ( "qmaccounts.db", 0, NULL ); |
15 | } | 14 | } |
16 | 15 | ||
17 | Account::~Account () | 16 | Account::~Account () |
18 | { | 17 | { |
19 | sqlite_close ( adb ); | 18 | sqlite_close ( adb ); |
20 | } | 19 | } |
21 | 20 | ||
22 | void Account::addAccount ( QString name, int parentid, float balance, int type, QString description, float creditlimit, | 21 | void Account::addAccount ( QString name, int parentid, float balance, int type, QString description, float creditlimit, |
23 | int statementyear, int statementmonth, int statementday, float statementbalance, const char *currency ) | 22 | int statementyear, int statementmonth, int statementday, float statementbalance, const char *currency ) |
24 | { | 23 | { |
25 | sqlite_exec_printf ( adb, "insert into accounts2 values ( '%q', %i, %.2f, %i, '%q', %.2f, %i, %i, %i, %.2f, '%q', 0, 0, 0, 0, 0, NULL );", 0, 0, 0, | 24 | sqlite_exec_printf ( adb, "insert into accounts2 values ( '%q', %i, %.2f, %i, '%q', %.2f, %i, %i, %i, %.2f, '%q', 0, 0, 0, 0, 0, NULL );", 0, 0, 0, |
26 | (const char *) name, parentid, balance, type, (const char *) description, creditlimit, statementyear, statementmonth, statementday, statementbalance, currency ); | 25 | (const char *) name, parentid, balance, type, (const char *) description, creditlimit, statementyear, statementmonth, statementday, statementbalance, currency ); |
27 | } | 26 | } |
28 | 27 | ||
29 | void Account::updateAccount ( QString name, QString description, QString currencycode, int accountid ) | 28 | void Account::updateAccount ( QString name, QString description, QString currencycode, int accountid ) |
30 | { | 29 | { |
31 | sqlite_exec_printf ( adb, "update accounts2 set name = '%q', description = '%q', currency = '%q' where accountid = %i;", 0, 0, 0, ( const char * ) name, ( const char * ) description, ( const char * ) currencycode, accountid ); | 30 | sqlite_exec_printf ( adb, "update accounts2 set name = '%q', description = '%q', currency = '%q' where accountid = %i;", 0, 0, 0, ( const char * ) name, ( const char * ) description, ( const char * ) currencycode, accountid ); |
32 | } | 31 | } |
diff --git a/noncore/apps/qashmoney/budget.cpp b/noncore/apps/qashmoney/budget.cpp index 9f74078..2cec329 100755 --- a/noncore/apps/qashmoney/budget.cpp +++ b/noncore/apps/qashmoney/budget.cpp | |||
@@ -1,28 +1,27 @@ | |||
1 | #include "budget.h" | 1 | #include "budget.h" |
2 | #include "transaction.h" | 2 | #include "transaction.h" |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | #include <iostream.h> | ||
5 | 4 | ||
6 | extern Transaction *transaction; | 5 | extern Transaction *transaction; |
7 | 6 | ||
8 | Budget::Budget () | 7 | Budget::Budget () |
9 | { | 8 | { |
10 | bdb = sqlite_open ( "qmbudgets.db", 0, NULL ); | 9 | bdb = sqlite_open ( "qmbudgets.db", 0, NULL ); |
11 | } | 10 | } |
12 | 11 | ||
13 | Budget::~Budget () | 12 | Budget::~Budget () |
14 | { | 13 | { |
15 | sqlite_close ( bdb ); | 14 | sqlite_close ( bdb ); |
16 | } | 15 | } |
17 | 16 | ||
18 | int Budget::addBudget ( QString name, int type, QString description, QString currency, int startday, int startmonth, int startyear, int endday, int endmonth, int endyear, int defaultview ) | 17 | int Budget::addBudget ( QString name, int type, QString description, QString currency, int startday, int startmonth, int startyear, int endday, int endmonth, int endyear, int defaultview ) |
19 | { | 18 | { |
20 | sqlite_exec_printf ( bdb, "insert into budgets values ( '%q', %i, '%q', '%q', %i, %i, %i, %i, %i, %i, %i, NULL );", 0, 0, 0, ( const char * ) name, type, ( const char * ) description, ( const char * ) currency, startday, startmonth, startyear, endday, endmonth, endyear, defaultview ); | 19 | sqlite_exec_printf ( bdb, "insert into budgets values ( '%q', %i, '%q', '%q', %i, %i, %i, %i, %i, %i, %i, NULL );", 0, 0, 0, ( const char * ) name, type, ( const char * ) description, ( const char * ) currency, startday, startmonth, startyear, endday, endmonth, endyear, defaultview ); |
21 | char **results; | 20 | char **results; |
22 | sqlite_get_table ( bdb, "select last_insert_rowid() from budgets;", &results, NULL, NULL, NULL ); | 21 | sqlite_get_table ( bdb, "select last_insert_rowid() from budgets;", &results, NULL, NULL, NULL ); |
23 | QString tablename = "table"; | 22 | QString tablename = "table"; |
24 | tablename.append ( results [ 1 ] ); | 23 | tablename.append ( results [ 1 ] ); |
25 | sqlite_exec_printf ( bdb, "create table '%q' ( name, lineitemamount, type, lineitemid integer primary key );", 0, 0, 0, ( const char* ) tablename ); | 24 | sqlite_exec_printf ( bdb, "create table '%q' ( name, lineitemamount, type, lineitemid integer primary key );", 0, 0, 0, ( const char* ) tablename ); |
26 | return atoi ( results [ 1 ] ); | 25 | return atoi ( results [ 1 ] ); |
27 | } | 26 | } |
28 | 27 | ||
diff --git a/noncore/apps/qashmoney/qashmoney.cpp b/noncore/apps/qashmoney/qashmoney.cpp index e985f0b..d4cbc14 100755 --- a/noncore/apps/qashmoney/qashmoney.cpp +++ b/noncore/apps/qashmoney/qashmoney.cpp | |||
@@ -1,30 +1,29 @@ | |||
1 | #include "qashmoney.h" | 1 | #include "qashmoney.h" |
2 | #include "preferencedialogs.h" | 2 | #include "preferencedialogs.h" |
3 | #include "memorydialog.h" | 3 | #include "memorydialog.h" |
4 | 4 | ||
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <iostream.h> | ||
7 | 6 | ||
8 | Budget *budget = new Budget (); | 7 | Budget *budget = new Budget (); |
9 | Preferences *preferences = new Preferences (); | 8 | Preferences *preferences = new Preferences (); |
10 | Account *account = new Account (); | 9 | Account *account = new Account (); |
11 | Transaction *transaction = new Transaction (); | 10 | Transaction *transaction = new Transaction (); |
12 | Transfer *transfer = new Transfer (); | 11 | Transfer *transfer = new Transfer (); |
13 | Memory *memory = new Memory (); | 12 | Memory *memory = new Memory (); |
14 | 13 | ||
15 | QashMoney::QashMoney () : QWidget () | 14 | QashMoney::QashMoney () : QWidget () |
16 | { | 15 | { |
17 | preferences->addPreferences (); | 16 | preferences->addPreferences (); |
18 | preferences->initializeColumnPreferences (); | 17 | preferences->initializeColumnPreferences (); |
19 | preferences->initializeSortingPreferences (); | 18 | preferences->initializeSortingPreferences (); |
20 | 19 | ||
21 | // set the text in the upper part of the frame | 20 | // set the text in the upper part of the frame |
22 | setCaption ( tr ( "QashMoney" ) ); | 21 | setCaption ( tr ( "QashMoney" ) ); |
23 | 22 | ||
24 | // Create new menubar for our mainwindow | 23 | // Create new menubar for our mainwindow |
25 | // and add menu items | 24 | // and add menu items |
26 | mainmenu = new QMenuBar ( this ); | 25 | mainmenu = new QMenuBar ( this ); |
27 | mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); | 26 | mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); |
28 | preferencesmenu = new QPopupMenu ( this ); | 27 | preferencesmenu = new QPopupMenu ( this ); |
29 | utilitiesmenu = new QPopupMenu ( this ); | 28 | utilitiesmenu = new QPopupMenu ( this ); |
30 | mainmenu->insertItem ( "Preferences", preferencesmenu ); | 29 | mainmenu->insertItem ( "Preferences", preferencesmenu ); |
diff --git a/noncore/apps/qashmoney/qashmoney.pro b/noncore/apps/qashmoney/qashmoney.pro index 8b4646a..ec29faa 100755 --- a/noncore/apps/qashmoney/qashmoney.pro +++ b/noncore/apps/qashmoney/qashmoney.pro | |||
@@ -22,28 +22,28 @@ SOURCES = qashmoney.cpp \ | |||
22 | accountdisplay.cpp \ | 22 | accountdisplay.cpp \ |
23 | account.cpp \ | 23 | account.cpp \ |
24 | transaction.cpp \ | 24 | transaction.cpp \ |
25 | transactiondisplay.cpp \ | 25 | transactiondisplay.cpp \ |
26 | newtransaction.cpp \ | 26 | newtransaction.cpp \ |
27 | transfer.cpp \ | 27 | transfer.cpp \ |
28 | transferdialog.cpp \ | 28 | transferdialog.cpp \ |
29 | preferences.cpp \ | 29 | preferences.cpp \ |
30 | preferencedialogs.cpp \ | 30 | preferencedialogs.cpp \ |
31 | memory.cpp \ | 31 | memory.cpp \ |
32 | memorydialog.cpp \ | 32 | memorydialog.cpp \ |
33 | newaccount.cpp \ | 33 | newaccount.cpp \ |
34 | calculator.cpp \ | 34 | calculator.cpp \ |
35 | datepicker.cpp \ | 35 | datepicker.cpp \ |
36 | main.cpp \ | 36 | main.cpp \ |
37 | budget.cpp \ | 37 | budget.cpp \ |
38 | budgetdisplay.cpp \ | 38 | budgetdisplay.cpp \ |
39 | currency.cpp | 39 | currency.cpp |
40 | INCLUDEPATH = $(OPIEDIR)/include | 40 | INCLUDEPATH = $(OPIEDIR)/include |
41 | DEPENDPATH = $(OPIEDIR)/include | 41 | DEPENDPATH = $(OPIEDIR)/include |
42 | 42 | ||
43 | DESTDIR = $(OPIEDIR)/bin | 43 | DESTDIR = $(OPIEDIR)/bin |
44 | 44 | ||
45 | unix:LIBS += -lm | 45 | unix:LIBS += -lm |
46 | LIBS += -lqpe -lqte -lstdc++ -lsqlite | 46 | LIBS += -lqpe -lqte -lsqlite |
47 | 47 | ||
48 | include ( $(OPIEDIR)/include.pro ) | 48 | include ( $(OPIEDIR)/include.pro ) |
49 | 49 | ||
diff --git a/noncore/apps/qashmoney/transaction.cpp b/noncore/apps/qashmoney/transaction.cpp index dcf46b1..d008a4f 100755 --- a/noncore/apps/qashmoney/transaction.cpp +++ b/noncore/apps/qashmoney/transaction.cpp | |||
@@ -1,35 +1,34 @@ | |||
1 | // RESERVEDONE COLUMN NAME REPRESENTS THE LINEITEMID AND SHOULD BE CHANGED IN | 1 | // RESERVEDONE COLUMN NAME REPRESENTS THE LINEITEMID AND SHOULD BE CHANGED IN |
2 | // FUTURE VERSIONS OF QASHMONEY | 2 | // FUTURE VERSIONS OF QASHMONEY |
3 | 3 | ||
4 | // RESERVEDTWO REPRESENTS THE TRANSACTION DESCRIPTION | 4 | // RESERVEDTWO REPRESENTS THE TRANSACTION DESCRIPTION |
5 | 5 | ||
6 | #include "transaction.h" | 6 | #include "transaction.h" |
7 | #include "account.h" | 7 | #include "account.h" |
8 | #include "transactiondisplay.h" | 8 | #include "transactiondisplay.h" |
9 | 9 | ||
10 | #include <stdlib.h> | 10 | #include <stdlib.h> |
11 | #include <iostream.h> | ||
12 | 11 | ||
13 | extern Account *account; | 12 | extern Account *account; |
14 | extern Preferences *preferences; | 13 | extern Preferences *preferences; |
15 | 14 | ||
16 | Transaction::Transaction () | 15 | Transaction::Transaction () |
17 | { | 16 | { |
18 | tdb = sqlite_open ( "qmtransactions.db", 0, NULL ); | 17 | tdb = sqlite_open ( "qmtransactions.db", 0, NULL ); |
19 | } | 18 | } |
20 | 19 | ||
21 | Transaction::~Transaction () | 20 | Transaction::~Transaction () |
22 | { | 21 | { |
23 | sqlite_close ( tdb ); | 22 | sqlite_close ( tdb ); |
24 | } | 23 | } |
25 | 24 | ||
26 | void Transaction::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 ) | 25 | void Transaction::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 ) |
27 | { | 26 | { |
28 | sqlite_exec_printf ( tdb, "insert into transactions values ( '%q', %i, %i, %i, %i, %i, %i, %.2f, %i, %i, 0, 0, 0, 0, 0, 0, %i, '%q', 0, " | 27 | sqlite_exec_printf ( tdb, "insert into transactions values ( '%q', %i, %i, %i, %i, %i, %i, %.2f, %i, %i, 0, 0, 0, 0, 0, 0, %i, '%q', 0, " |
29 | "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); | 28 | "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); |
30 | } | 29 | } |
31 | 30 | ||
32 | void Transaction::updateTransaction ( QString description, QString payee, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid, int transactionid ) | 31 | void Transaction::updateTransaction ( QString description, QString payee, int number, int day, int month, int year, float amount, int cleared, int budgetid, int lineitemid, int transactionid ) |
33 | { | 32 | { |
34 | sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f," | 33 | sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f," |
35 | "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year, | 34 | "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year, |
diff --git a/noncore/apps/qashmoney/transactiondisplay.cpp b/noncore/apps/qashmoney/transactiondisplay.cpp index 1839cd2..78b8a00 100755 --- a/noncore/apps/qashmoney/transactiondisplay.cpp +++ b/noncore/apps/qashmoney/transactiondisplay.cpp | |||
@@ -1,39 +1,38 @@ | |||
1 | #include "transactiondisplay.h" | 1 | #include "transactiondisplay.h" |
2 | #include "newtransaction.h" | 2 | #include "newtransaction.h" |
3 | #include "account.h" | 3 | #include "account.h" |
4 | #include "budget.h" | 4 | #include "budget.h" |
5 | #include "memory.h" | 5 | #include "memory.h" |
6 | #include "transfer.h" | 6 | #include "transfer.h" |
7 | #include "preferences.h" | 7 | #include "preferences.h" |
8 | #include "calculator.h" | 8 | #include "calculator.h" |
9 | #include "datepicker.h" | 9 | #include "datepicker.h" |
10 | 10 | ||
11 | #include <qdatetime.h> | 11 | #include <qdatetime.h> |
12 | #include <qmessagebox.h> | 12 | #include <qmessagebox.h> |
13 | #include <qheader.h> | 13 | #include <qheader.h> |
14 | #include <qmultilineedit.h> | 14 | #include <qmultilineedit.h> |
15 | #include <iostream.h> | ||
16 | #include <qdatetime.h> | 15 | #include <qdatetime.h> |
17 | 16 | ||
18 | extern Transaction *transaction; | 17 | extern Transaction *transaction; |
19 | extern Budget *budget; | 18 | extern Budget *budget; |
20 | extern Account *account; | 19 | extern Account *account; |
21 | extern Preferences *preferences; | 20 | extern Preferences *preferences; |
22 | extern Memory *memory; | 21 | extern Memory *memory; |
23 | extern Transfer *transfer; | 22 | extern Transfer *transfer; |
24 | 23 | ||
25 | TransactionDisplay::TransactionDisplay ( QWidget* parent ) : QWidget ( parent ) | 24 | TransactionDisplay::TransactionDisplay ( QWidget* parent ) : QWidget ( parent ) |
26 | { | 25 | { |
27 | // set transactiondisplay variables; | 26 | // set transactiondisplay variables; |
28 | accountid = 0; | 27 | accountid = 0; |
29 | children = TRUE; | 28 | children = TRUE; |
30 | 29 | ||
31 | firstline = new QHBox ( this ); | 30 | firstline = new QHBox ( this ); |
32 | firstline->setSpacing ( 2 ); | 31 | firstline->setSpacing ( 2 ); |
33 | 32 | ||
34 | newtransaction = new QPushButton ( firstline ); | 33 | newtransaction = new QPushButton ( firstline ); |
35 | newtransaction->setPixmap ( QPixmap ("/opt/QtPalmtop/pics/new.png") ); | 34 | newtransaction->setPixmap ( QPixmap ("/opt/QtPalmtop/pics/new.png") ); |
36 | connect ( newtransaction, SIGNAL ( released () ), this, SLOT ( addTransaction () ) ); | 35 | connect ( newtransaction, SIGNAL ( released () ), this, SLOT ( addTransaction () ) ); |
37 | 36 | ||
38 | edittransaction = new QPushButton ( firstline ); | 37 | edittransaction = new QPushButton ( firstline ); |
39 | edittransaction->setPixmap( QPixmap ("/opt/QtPalmtop/pics/edit.png") ); | 38 | edittransaction->setPixmap( QPixmap ("/opt/QtPalmtop/pics/edit.png") ); |
diff --git a/noncore/apps/qashmoney/transfer.cpp b/noncore/apps/qashmoney/transfer.cpp index c4bbaf9..ae1b748 100755 --- a/noncore/apps/qashmoney/transfer.cpp +++ b/noncore/apps/qashmoney/transfer.cpp | |||
@@ -1,29 +1,28 @@ | |||
1 | #include "transfer.h" | 1 | #include "transfer.h" |
2 | #include "account.h" | 2 | #include "account.h" |
3 | #include "transactiondisplay.h" | 3 | #include "transactiondisplay.h" |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #include <iostream.h> | ||
6 | 5 | ||
7 | extern Account *account; | 6 | extern Account *account; |
8 | extern Preferences *preferences; | 7 | extern Preferences *preferences; |
9 | 8 | ||
10 | Transfer::Transfer () | 9 | Transfer::Transfer () |
11 | { | 10 | { |
12 | db = sqlite_open ( "qmtransfers.db", 0, 0 ); | 11 | db = sqlite_open ( "qmtransfers.db", 0, 0 ); |
13 | } | 12 | } |
14 | 13 | ||
15 | Transfer::~Transfer () | 14 | Transfer::~Transfer () |
16 | { | 15 | { |
17 | sqlite_close ( db ); | 16 | sqlite_close ( db ); |
18 | } | 17 | } |
19 | 18 | ||
20 | void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ) | 19 | void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ) |
21 | { | 20 | { |
22 | int nextrowid = -1; | 21 | int nextrowid = -1; |
23 | char **results; | 22 | char **results; |
24 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); | 23 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); |
25 | if ( atoi ( results [ 1 ] ) != 0 ) | 24 | if ( atoi ( results [ 1 ] ) != 0 ) |
26 | { | 25 | { |
27 | char **results; | 26 | char **results; |
28 | sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 ); | 27 | sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 ); |
29 | nextrowid = ( atoi ( results [ 1 ] ) ) - 1; | 28 | nextrowid = ( atoi ( results [ 1 ] ) ) - 1; |