summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-11-09 01:26:34 (UTC)
committer mickeyl <mickeyl>2003-11-09 01:26:34 (UTC)
commit28d03a7d43f449949991a91cab63580ef6220725 (patch) (side-by-side diff)
tree0d48f35e50f3f4ef58c1961ee4ed968dab183abb
parent61d14f9b908f06e3ef34c2ed3e7f1368c9e4533e (diff)
downloadopie-28d03a7d43f449949991a91cab63580ef6220725.zip
opie-28d03a7d43f449949991a91cab63580ef6220725.tar.gz
opie-28d03a7d43f449949991a91cab63580ef6220725.tar.bz2
fix compilage and integrate into buildsystem
directory structure is a mess though...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/qashmoney/config.in4
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.pro8
-rwxr-xr-xnoncore/apps/qashmoney/transaction.cpp8
-rwxr-xr-xnoncore/apps/qashmoney/transfer.cpp4
-rw-r--r--packages1
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 @@
+ config QASHMONEY
+ boolean "opie-qashmoney (money manager)"
+ default "n"
+ 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
@@ -28,14 +28,22 @@ SOURCES = qashmoney.cpp \
transferdialog.cpp \
preferences.cpp \
preferencedialogs.cpp \
memory.cpp \
memorydialog.cpp \
newaccount.cpp \
calculator.cpp \
datepicker.cpp \
main.cpp \
budget.cpp \
budgetdisplay.cpp \
currency.cpp
+INCLUDEPATH = $(OPIEDIR)/include
+DEPENDPATH = $(OPIEDIR)/include
+
+DESTDIR = $(OPIEDIR)/bin
+
unix:LIBS += -lm
LIBS += -lqpe -lqte -lstdc++ -lsqlite
+
+include ( $(OPIEDIR)/include.pro )
+
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
@@ -16,32 +16,32 @@ extern Preferences *preferences;
Transaction::Transaction ()
{
tdb = sqlite_open ( "qmtransactions.db", 0, NULL );
}
Transaction::~Transaction ()
{
sqlite_close ( tdb );
}
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 )
{
- 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,
- 0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description );
+ 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, "
+ "0, 0, 0, NULL );", 0, 0, 0, ( const char * ) payee, accountid, parentid, number, day, month, year, amount, cleared, budgetid, lineitemid, ( const char * ) description );
}
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 )
{
- sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f,
- cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year,
+ sqlite_exec_printf ( tdb, "update transactions set reservedtwo = '%q', payee = '%q', number = %i, day = %i, month = %i, year = %i, amount = %.2f,"
+ "cleared = %i, budgetid = %i, reservedone = %i where transid = %i;", 0, 0, 0, ( const char * ) description, ( const char * ) payee, number, day, month, year,
amount, cleared, budgetid, lineitemid, transactionid );
}
void Transaction::deleteTransaction ( int transid )
{
sqlite_exec_printf ( tdb, "delete from transactions where transid = %i;", 0, 0, 0, transid );
}
void Transaction::deleteAllTransactions ( int accountid )
{
sqlite_exec_printf ( tdb, "delete from transactions where accountid = %i;", 0, 0, 0, accountid );
}
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
@@ -24,26 +24,26 @@ void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int
sqlite_get_table ( db, "select count() from transfers;", &results, 0, 0, 0 );
if ( atoi ( results [ 1 ] ) != 0 )
{
char **results;
sqlite_get_table ( db, "select min ( rowid ) from transfers;", &results, 0, 0, 0 );
nextrowid = ( atoi ( results [ 1 ] ) ) - 1;
}
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 );
}
void Transfer::updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid )
{
- sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i,
- amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid );
+ sqlite_exec_printf ( db, "update transfers set fromaccount = %i, fromparent = %i, toaccount = %i, toparent = %i, day = %i, month = %i, year = %i,"
+ "amount = %.2f, cleared = %i where transferid = %i;", 0, 0, 0, fromaccount, fromparent, toaccount, toparent, day, month, year, amount, cleared, transferid );
}
void Transfer::deleteTransfer ( int transferid )
{
sqlite_exec_printf ( db, "delete from transfers where transferid = %i;", 0, 0, 0, transferid );
}
void Transfer::deleteAllTransfers ( int accountid )
{
sqlite_exec_printf ( db, "delete from transfers where fromaccount = %i;", 0, 0, 0, accountid );
sqlite_exec_printf ( db, "delete from transfers where toaccount = %i;", 0, 0, 0, accountid );
}
diff --git a/packages b/packages
index c48eee8..0e6340f 100644
--- a/packages
+++ b/packages
@@ -111,24 +111,25 @@ CONFIG_OPIEIRC noncore/net/opieirc opieirc.pro
CONFIG_OPIEMAIL2 noncore/mail mail.pro
CONFIG_OPIEPLAYER core/multimedia/opieplayer opieplayer.pro
CONFIG_OPIEPLAYER2 noncore/multimedia/opieplayer2 opieplayer2.pro
CONFIG_OPIE-RDESKTOP noncore/net/opierdesktop opierdesktop.pro
CONFIG_OPIEREC noncore/multimedia/opierec opierec.pro
CONFIG_OPIETOOTH-APPLET noncore/net/opietooth/applet applet.pro
CONFIG_OPIETOOTH-MANAGER noncore/net/opietooth/manager manager.pro
CONFIG_OSEARCH core/pim/osearch osearch.pro
CONFIG_OXYGEN noncore/apps/oxygen oxygen.pro
CONFIG_PARASHOOT noncore/games/parashoot parashoot.pro
CONFIG_PICKBOARD inputmethods/pickboard pickboard.pro
CONFIG_QASTEROIDS noncore/games/qasteroids qasteroids.pro
+CONFIG_QASHMONEY noncore/apps/qashmoney qashmoney.pro
CONFIG_QCOP core/apps/qcop qcop.pro
CONFIG_QPDF noncore/graphics/qpdf qpdf.pro
CONFIG_QPDF2 noncore/graphics/qpdf2 qpdf2.pro
CONFIG_QUICKLAUNCHER core/tools/quicklauncher quicklauncher.pro
CONFIG_QWS core/qws qws.pro
CONFIG_REMOTE noncore/tools/remote remote.pro
CONFIG_RESTARTAPPLET core/applets/restartapplet restartapplet.pro
CONFIG_RESTARTAPPLET2 core/applets/restartapplet2 restartapplet2.pro
CONFIG_ROTATEAPPLET core/applets/rotateapplet rotateapplet.pro
CONFIG_ROTATION noncore/settings/rotation rotation.pro
CONFIG_RUNAPPLET core/applets/runapplet runapplet.pro
CONFIG_SCREENSHOTAPPLET core/applets/screenshotapplet screenshotapplet.pro