-rw-r--r-- | noncore/apps/qashmoney/config.in | 4 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/qashmoney.pro | 8 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transaction.cpp | 8 | ||||
-rwxr-xr-x | noncore/apps/qashmoney/transfer.cpp | 4 | ||||
-rw-r--r-- | packages | 1 |
5 files changed, 19 insertions, 6 deletions
diff --git a/noncore/apps/qashmoney/config.in b/noncore/apps/qashmoney/config.in new file mode 100644 index 0000000..94c39b6 --- a/dev/null +++ b/noncore/apps/qashmoney/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config QASHMONEY | ||
2 | boolean "opie-qashmoney (money manager)" | ||
3 | default "n" | ||
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | ||
diff --git a/noncore/apps/qashmoney/qashmoney.pro b/noncore/apps/qashmoney/qashmoney.pro index 1070767..8b4646a 100755 --- a/noncore/apps/qashmoney/qashmoney.pro +++ b/noncore/apps/qashmoney/qashmoney.pro | |||
@@ -16,26 +16,34 @@ HEADERS = qashmoney.h \ | |||
16 | calculator.h \ | 16 | calculator.h \ |
17 | datepicker.h \ | 17 | datepicker.h \ |
18 | budget.h \ | 18 | budget.h \ |
19 | budgetdisplay.h \ | 19 | budgetdisplay.h \ |
20 | currency.h | 20 | currency.h |
21 | SOURCES =qashmoney.cpp \ | 21 | 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 | ||
41 | DEPENDPATH = $(OPIEDIR)/include | ||
42 | |||
43 | DESTDIR = $(OPIEDIR)/bin | ||
44 | |||
40 | unix:LIBS += -lm | 45 | unix:LIBS += -lm |
41 | LIBS += -lqpe -lqte -lstdc++ -lsqlite | 46 | LIBS += -lqpe -lqte -lstdc++ -lsqlite |
47 | |||
48 | include ( $(OPIEDIR)/include.pro ) | ||
49 | |||
diff --git a/noncore/apps/qashmoney/transaction.cpp b/noncore/apps/qashmoney/transaction.cpp index a3bd9e7..dcf46b1 100755 --- a/noncore/apps/qashmoney/transaction.cpp +++ b/noncore/apps/qashmoney/transaction.cpp | |||
@@ -4,56 +4,56 @@ | |||
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> | 11 | #include <iostream.h> |
12 | 12 | ||
13 | extern Account *account; | 13 | extern Account *account; |
14 | extern Preferences *preferences; | 14 | extern Preferences *preferences; |
15 | 15 | ||
16 | Transaction::Transaction () | 16 | Transaction::Transaction () |
17 | { | 17 | { |
18 | tdb = sqlite_open ( "qmtransactions.db", 0, NULL ); | 18 | tdb = sqlite_open ( "qmtransactions.db", 0, NULL ); |
19 | } | 19 | } |
20 | 20 | ||
21 | Transaction::~Transaction () | 21 | Transaction::~Transaction () |
22 | { | 22 | { |
23 | sqlite_close ( tdb ); | 23 | sqlite_close ( tdb ); |
24 | } | 24 | } |
25 | 25 | ||
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 ) | 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 ) |
27 | { | 27 | { |
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, | 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, " |
29 | 0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); | 29 | "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description ); |
30 | } | 30 | } |
31 | 31 | ||
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 ) | 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 ) |
33 | { | 33 | { |
34 | sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f, | 34 | 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, | 35 | "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year, |
36 | amount, cleared, budgetid, lineitemid, transactionid ); | 36 | amount, cleared, budgetid, lineitemid, transactionid ); |
37 | } | 37 | } |
38 | 38 | ||
39 | void Transaction::deleteTransaction ( int transid ) | 39 | void Transaction::deleteTransaction ( int transid ) |
40 | { | 40 | { |
41 | sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid ); | 41 | sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid ); |
42 | } | 42 | } |
43 | 43 | ||
44 | void Transaction::deleteAllTransactions ( int accountid ) | 44 | void Transaction::deleteAllTransactions ( int accountid ) |
45 | { | 45 | { |
46 | sqlite_exec_printf ( tdb, "delete from transactions where accountid = %i;", 0, 0, 0, accountid ); | 46 | sqlite_exec_printf ( tdb, "delete from transactions where accountid = %i;", 0, 0, 0, accountid ); |
47 | } | 47 | } |
48 | 48 | ||
49 | int Transaction::getAccountID ( int id ) | 49 | int Transaction::getAccountID ( int id ) |
50 | { | 50 | { |
51 | char **results; | 51 | char **results; |
52 | sqlite_get_table_printf ( tdb, "select accountid from transactions where transid= %i;", &results, NULL, NULL, NULL, id ); | 52 | sqlite_get_table_printf ( tdb, "select accountid from transactions where transid= %i;", &results, NULL, NULL, NULL, id ); |
53 | return atol ( results [ 1 ] ); | 53 | return atol ( results [ 1 ] ); |
54 | } | 54 | } |
55 | 55 | ||
56 | int Transaction::getNumberOfTransactions () | 56 | int Transaction::getNumberOfTransactions () |
57 | { | 57 | { |
58 | char **results; | 58 | char **results; |
59 | sqlite_get_table ( tdb, "select count() from transactions;", &results, NULL, NULL, NULL ); | 59 | sqlite_get_table ( tdb, "select count() from transactions;", &results, NULL, NULL, NULL ); |
diff --git a/noncore/apps/qashmoney/transfer.cpp b/noncore/apps/qashmoney/transfer.cpp index 568d584..c4bbaf9 100755 --- a/noncore/apps/qashmoney/transfer.cpp +++ b/noncore/apps/qashmoney/transfer.cpp | |||
@@ -12,50 +12,50 @@ Transfer::Transfer () | |||
12 | db = sqlite_open ( "qmtransfers.db", 0, 0 ); | 12 | db = sqlite_open ( "qmtransfers.db", 0, 0 ); |
13 | } | 13 | } |
14 | 14 | ||
15 | Transfer::~Transfer () | 15 | Transfer::~Transfer () |
16 | { | 16 | { |
17 | sqlite_close ( db ); | 17 | sqlite_close ( db ); |
18 | } | 18 | } |
19 | 19 | ||
20 | void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ) | 20 | void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ) |
21 | { | 21 | { |
22 | int nextrowid = -1; | 22 | int nextrowid = -1; |
23 | char **results; | 23 | char **results; |
24 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); | 24 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); |
25 | if ( atoi ( results [ 1 ] ) != 0 ) | 25 | if ( atoi ( results [ 1 ] ) != 0 ) |
26 | { | 26 | { |
27 | char **results; | 27 | char **results; |
28 | sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 ); | 28 | sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 ); |
29 | nextrowid = ( atoi ( results [ 1 ] ) ) - 1; | 29 | nextrowid = ( atoi ( results [ 1 ] ) ) - 1; |
30 | } | 30 | } |
31 | sqlite_exec_printf ( db, "insert into transfers values ( %i, %i, %i, %i, %i, %i, %i, 0, 0, %.2f, %i, 0, 0, 0, 0, 0, %i );", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, nextrowid ); | 31 | sqlite_exec_printf ( db, "insert into transfers values ( %i, %i, %i, %i, %i, %i, %i, 0, 0, %.2f, %i, 0, 0, 0, 0, 0, %i );", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, nextrowid ); |
32 | } | 32 | } |
33 | 33 | ||
34 | void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ) | 34 | void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid ) |
35 | { | 35 | { |
36 | sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i, | 36 | sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i," |
37 | amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid ); | 37 | "amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid ); |
38 | } | 38 | } |
39 | 39 | ||
40 | void Transfer::deleteTransfer ( int transferid ) | 40 | void Transfer::deleteTransfer ( int transferid ) |
41 | { | 41 | { |
42 | sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid ); | 42 | sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid ); |
43 | } | 43 | } |
44 | 44 | ||
45 | void Transfer::deleteAllTransfers ( int accountid ) | 45 | void Transfer::deleteAllTransfers ( int accountid ) |
46 | { | 46 | { |
47 | sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid ); | 47 | sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid ); |
48 | sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid ); | 48 | sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid ); |
49 | } | 49 | } |
50 | 50 | ||
51 | int Transfer::getNumberOfTransfers () | 51 | int Transfer::getNumberOfTransfers () |
52 | { | 52 | { |
53 | char **results; | 53 | char **results; |
54 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); | 54 | sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 ); |
55 | return atoi ( results [ 1 ] ); | 55 | return atoi ( results [ 1 ] ); |
56 | } | 56 | } |
57 | 57 | ||
58 | int Transfer::getNumberOfTransfers ( int accountid ) | 58 | int Transfer::getNumberOfTransfers ( int accountid ) |
59 | { | 59 | { |
60 | char **results; | 60 | char **results; |
61 | sqlite_get_table_printf ( db, "select count() from transfers where fromaccount = %i;", &results, 0, 0, 0, accountid ); | 61 | sqlite_get_table_printf ( db, "select count() from transfers where fromaccount = %i;", &results, 0, 0, 0, accountid ); |
@@ -99,48 +99,49 @@ CONFIG_OAPP core/apps/oapp oapp.pro | |||
99 | CONFIG_OBEX core/applets/obex2obex.pro | 99 | CONFIG_OBEX core/applets/obex2obex.pro |
100 | CONFIG_ODICT noncore/apps/odictodict.pro | 100 | CONFIG_ODICT noncore/apps/odictodict.pro |
101 | CONFIG_OIPKG core/apps/oipkgoipkg.pro | 101 | CONFIG_OIPKG core/apps/oipkgoipkg.pro |
102 | CONFIG_OPIE-CONSOLE noncore/apps/opie-consoleopie-console.pro | 102 | CONFIG_OPIE-CONSOLE noncore/apps/opie-consoleopie-console.pro |
103 | CONFIG_OPIE-LOGIN core/opie-loginopie-login.pro | 103 | CONFIG_OPIE-LOGIN core/opie-loginopie-login.pro |
104 | CONFIG_OPIE-READER noncore/apps/opie-readeropie-reader.pro | 104 | CONFIG_OPIE-READER noncore/apps/opie-readeropie-reader.pro |
105 | CONFIG_OPIE-SH noncore/tools/opie-shopie-sh.pro | 105 | CONFIG_OPIE-SH noncore/tools/opie-shopie-sh.pro |
106 | CONFIG_OPIE-SHEET noncore/apps/opie-sheetopie-sheet.pro | 106 | CONFIG_OPIE-SHEET noncore/apps/opie-sheetopie-sheet.pro |
107 | CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro | 107 | CONFIG_OPIE-WRITE noncore/apps/opie-writeopie-write.pro |
108 | CONFIG_OPIEALARMcore/opiealarm | 108 | CONFIG_OPIEALARMcore/opiealarm |
109 | CONFIG_OPIEFTP noncore/net/opieftpopieftp.pro | 109 | CONFIG_OPIEFTP noncore/net/opieftpopieftp.pro |
110 | CONFIG_OPIEIRC noncore/net/opieircopieirc.pro | 110 | CONFIG_OPIEIRC noncore/net/opieircopieirc.pro |
111 | CONFIG_OPIEMAIL2noncore/mail mail.pro | 111 | CONFIG_OPIEMAIL2noncore/mail mail.pro |
112 | CONFIG_OPIEPLAYER core/multimedia/opieplayeropieplayer.pro | 112 | CONFIG_OPIEPLAYER core/multimedia/opieplayeropieplayer.pro |
113 | CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2opieplayer2.pro | 113 | CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2opieplayer2.pro |
114 | CONFIG_OPIE-RDESKTOP noncore/net/opierdesktopopierdesktop.pro | 114 | CONFIG_OPIE-RDESKTOP noncore/net/opierdesktopopierdesktop.pro |
115 | CONFIG_OPIEREC noncore/multimedia/opierecopierec.pro | 115 | CONFIG_OPIEREC noncore/multimedia/opierecopierec.pro |
116 | CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro | 116 | CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/appletapplet.pro |
117 | CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/managermanager.pro | 117 | CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/managermanager.pro |
118 | CONFIG_OSEARCH core/pim/osearchosearch.pro | 118 | CONFIG_OSEARCH core/pim/osearchosearch.pro |
119 | CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro | 119 | CONFIG_OXYGEN noncore/apps/oxygenoxygen.pro |
120 | CONFIG_PARASHOOT noncore/games/parashootparashoot.pro | 120 | CONFIG_PARASHOOT noncore/games/parashootparashoot.pro |
121 | CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro | 121 | CONFIG_PICKBOARD inputmethods/pickboardpickboard.pro |
122 | CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro | 122 | CONFIG_QASTEROIDS noncore/games/qasteroidsqasteroids.pro |
123 | CONFIG_QASHMONEY noncore/apps/qashmoneyqashmoney.pro | ||
123 | CONFIG_QCOP core/apps/qcopqcop.pro | 124 | CONFIG_QCOP core/apps/qcopqcop.pro |
124 | CONFIG_QPDF noncore/graphics/qpdfqpdf.pro | 125 | CONFIG_QPDF noncore/graphics/qpdfqpdf.pro |
125 | CONFIG_QPDF2 noncore/graphics/qpdf2qpdf2.pro | 126 | CONFIG_QPDF2 noncore/graphics/qpdf2qpdf2.pro |
126 | CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro | 127 | CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro |
127 | CONFIG_QWS core/qwsqws.pro | 128 | CONFIG_QWS core/qwsqws.pro |
128 | CONFIG_REMOTE noncore/tools/remoteremote.pro | 129 | CONFIG_REMOTE noncore/tools/remoteremote.pro |
129 | CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro | 130 | CONFIG_RESTARTAPPLET core/applets/restartappletrestartapplet.pro |
130 | CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro | 131 | CONFIG_RESTARTAPPLET2 core/applets/restartapplet2restartapplet2.pro |
131 | CONFIG_ROTATEAPPLET core/applets/rotateappletrotateapplet.pro | 132 | CONFIG_ROTATEAPPLET core/applets/rotateappletrotateapplet.pro |
132 | CONFIG_ROTATION noncore/settings/rotationrotation.pro | 133 | CONFIG_ROTATION noncore/settings/rotationrotation.pro |
133 | CONFIG_RUNAPPLET core/applets/runappletrunapplet.pro | 134 | CONFIG_RUNAPPLET core/applets/runappletrunapplet.pro |
134 | CONFIG_SCREENSHOTAPPLET core/applets/screenshotappletscreenshotapplet.pro | 135 | CONFIG_SCREENSHOTAPPLET core/applets/screenshotappletscreenshotapplet.pro |
135 | CONFIG_SECURITY core/settings/securitysecurity.pro | 136 | CONFIG_SECURITY core/settings/securitysecurity.pro |
136 | CONFIG_SFCAVE noncore/games/sfcavesfcave.pro | 137 | CONFIG_SFCAVE noncore/games/sfcavesfcave.pro |
137 | CONFIG_SFCAVE-SDL noncore/games/sfcave-sdlsfcave-sdl.pro | 138 | CONFIG_SFCAVE-SDL noncore/games/sfcave-sdlsfcave-sdl.pro |
138 | CONFIG_SHOWIMG noncore/multimedia/showimgshowimg.pro | 139 | CONFIG_SHOWIMG noncore/multimedia/showimgshowimg.pro |
139 | CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro | 140 | CONFIG_SIMPLE noncore/tools/calc2/simplesimple.pro |
140 | CONFIG_SINGLE singlesingle.pro | 141 | CONFIG_SINGLE singlesingle.pro |
141 | CONFIG_SNAKE noncore/games/snakesnake.pro | 142 | CONFIG_SNAKE noncore/games/snakesnake.pro |
142 | CONFIG_SOLITAIRE noncore/games/solitairesolitaire.pro | 143 | CONFIG_SOLITAIRE noncore/games/solitairesolitaire.pro |
143 | CONFIG_SOUND noncore/settings/soundsound.pro | 144 | CONFIG_SOUND noncore/settings/soundsound.pro |
144 | CONFIG_SSHKEYS noncore/settings/sshkeyssshkeys.pro | 145 | CONFIG_SSHKEYS noncore/settings/sshkeyssshkeys.pro |
145 | CONFIG_SUSPENDAPPLET core/applets/suspendappletsuspendapplet.pro | 146 | CONFIG_SUSPENDAPPLET core/applets/suspendappletsuspendapplet.pro |
146 | CONFIG_SYSINFO noncore/apps/sysinfosysinfo.pro | 147 | CONFIG_SYSINFO noncore/apps/sysinfosysinfo.pro |