author | alwin <alwin> | 2004-02-23 00:11:55 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-02-23 00:11:55 (UTC) |
commit | fdf3a6d59f3725bebb923a774d04fb51fb1b0d68 (patch) (side-by-side diff) | |
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,56 +1,55 @@ #include "account.h" #include "transaction.h" #include "transfer.h" #include "preferences.h" #include <qpixmap.h> #include <stdlib.h> -#include <iostream.h> extern Preferences *preferences; Account::Account () { adb = sqlite_open ( "qmaccounts.db", 0, NULL ); } Account::~Account () { sqlite_close ( adb ); } void Account::addAccount ( QString name, int parentid, float balance, int type, QString description, float creditlimit, int statementyear, int statementmonth, int statementday, float statementbalance, const char *currency ) { 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, (const char *) name, parentid, balance, type, (const char *) description, creditlimit, statementyear, statementmonth, statementday, statementbalance, currency ); } void Account::updateAccount ( QString name, QString description, QString currencycode, int accountid ) { 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 ); } void Account::deleteAccount ( int accountid ) { sqlite_exec_printf ( adb, "delete from accounts2 where accountid = %i;", 0, 0, 0, accountid ); } void Account::setAccountExpanded ( int expanded, int accountid ) { sqlite_exec_printf ( adb, "update accounts2 set r1 = %i where accountid = %i;", 0, 0, 0, expanded, accountid ); } int Account::getAccountExpanded ( int id ) { char **results; sqlite_get_table_printf ( adb, "select r1 from accounts2 where accountid = %i;", &results, 0, 0, 0, id ); if ( strlen ( results [1] ) == 0 ) return 0; else return atoi ( results [ 1 ] ); } int Account::getNumberOfAccounts () { char **results; 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,52 +1,51 @@ #include "budget.h" #include "transaction.h" #include <stdlib.h> -#include <iostream.h> extern Transaction *transaction; Budget::Budget () { bdb = sqlite_open ( "qmbudgets.db", 0, NULL ); } Budget::~Budget () { sqlite_close ( bdb ); } 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 ) { 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 ); char **results; sqlite_get_table ( bdb, "select last_insert_rowid() from budgets;", &results, NULL, NULL, NULL ); QString tablename = "table"; tablename.append ( results [ 1 ] ); sqlite_exec_printf ( bdb, "create table '%q' ( name, lineitemamount, type, lineitemid integer primary key );", 0, 0, 0, ( const char* ) tablename ); return atoi ( results [ 1 ] ); } void Budget::updateBudget ( QString name, QString description, QString currency, int budgetid ) { sqlite_exec_printf ( bdb, "update budgets set name = '%q', description = '%q', currency = '%q' where budgetid = %i;", 0, 0, 0, ( const char * ) name, ( const char * ) description, ( const char * ) currency, budgetid ); } void Budget::deleteBudget ( int budgetid ) { if ( getNumberOfBudgets() != 0 ) { QString tablename = "table"; tablename.append ( QString::number ( budgetid ) ); sqlite_exec_printf ( bdb, "delete from budgets where budgetid = %i;", 0, 0, 0, budgetid ); sqlite_exec_printf ( bdb, "drop table '%q';", 0, 0, 0, ( const char* ) tablename ); } } int Budget::getNumberOfBudgets () { char **results; sqlite_get_table ( bdb, "select count() from budgets;", &results, NULL, NULL, NULL ); return atoi ( results [ 1 ] ); } int Budget::getNumberOfLineItems ( int budgetid ) 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,54 +1,53 @@ #include "qashmoney.h" #include "preferencedialogs.h" #include "memorydialog.h" #include <qheader.h> -#include <iostream.h> Budget *budget = new Budget (); Preferences *preferences = new Preferences (); Account *account = new Account (); Transaction *transaction = new Transaction (); Transfer *transfer = new Transfer (); Memory *memory = new Memory (); QashMoney::QashMoney () : QWidget () { preferences->addPreferences (); preferences->initializeColumnPreferences (); preferences->initializeSortingPreferences (); // set the text in the upper part of the frame setCaption ( tr ( "QashMoney" ) ); // Create new menubar for our mainwindow // and add menu items mainmenu = new QMenuBar ( this ); mainmenu->setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); preferencesmenu = new QPopupMenu ( this ); utilitiesmenu = new QPopupMenu ( this ); mainmenu->insertItem ( "Preferences", preferencesmenu ); mainmenu->insertItem ( "Utilities", utilitiesmenu ); preferencesmenu->insertItem ( "Date", this, SLOT ( displayDatePreferencesDialog () ) ); preferencesmenu->insertItem ( "Account", this, SLOT ( displayAccountPreferencesDialog () ) ); preferencesmenu->insertItem ( "Transaction", this, SLOT ( displayTransactionPreferencesDialog () ) ); utilitiesmenu->insertItem ( "Memory", this, SLOT ( displayMemoryDialog () ) ); // create the main tabwidget for displaying accounts and transactions maintabs = new QTabWidget ( this ); tab = new QWidget ( this ); tab_2 = new QWidget ( this ); tab_3 = new QWidget ( this ); maintabs->addTab ( tab, "Accounts" ); maintabs->addTab ( tab_2, "Transactions" ); maintabs->addTab ( tab_3, "Budgets" ); tabheight = tab->height(); maintabs->setTabEnabled ( tab_2, FALSE ); // create a new account display object accountdisplay = new AccountDisplay ( maintabs ); accountdisplay->setTabs ( tab_2, maintabs ); connect ( accountdisplay->listview, SIGNAL ( selectionChanged () ), this, SLOT ( setTransactionTab () ) ); // set the connection to disable the one touch account viewing if we are transfering money connect ( accountdisplay->transferbutton, SIGNAL ( toggled ( bool ) ), this, SLOT ( toggleOneTouchViewing ( bool ) ) ); 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 @@ -1,49 +1,49 @@ TEMPLATE = app CONFIG = qt warn_on release HEADERS = qashmoney.h \ accountdisplay.h \ account.h \ transaction.h \ transactiondisplay.h \ newtransaction.h \ transfer.h \ transferdialog.h \ preferences.h \ preferencedialogs.h \ memory.h \ memorydialog.h \ newaccount.h \ calculator.h \ datepicker.h \ budget.h \ budgetdisplay.h \ currency.h SOURCES = qashmoney.cpp \ accountdisplay.cpp \ account.cpp \ transaction.cpp \ transactiondisplay.cpp \ newtransaction.cpp \ transfer.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 +LIBS += -lqpe -lqte -lsqlite include ( $(OPIEDIR)/include.pro ) 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,59 +1,58 @@ // RESERVEDONE COLUMN NAME REPRESENTS THE LINEITEMID AND SHOULD BE CHANGED IN // FUTURE VERSIONS OF QASHMONEY // RESERVEDTWO REPRESENTS THE TRANSACTION DESCRIPTION #include "transaction.h" #include "account.h" #include "transactiondisplay.h" #include <stdlib.h> -#include <iostream.h> extern Account *account; 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 ); } 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, 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 ); } int Transaction::getAccountID ( int id ) { char **results; sqlite_get_table_printf ( tdb, "select accountid from transactions where transid= %i;", &results, NULL, NULL, NULL, id ); return atol ( results [ 1 ] ); } int Transaction::getNumberOfTransactions () { char **results; sqlite_get_table ( tdb, "select count() from transactions;", &results, NULL, NULL, NULL ); 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,63 +1,62 @@ #include "transactiondisplay.h" #include "newtransaction.h" #include "account.h" #include "budget.h" #include "memory.h" #include "transfer.h" #include "preferences.h" #include "calculator.h" #include "datepicker.h" #include <qdatetime.h> #include <qmessagebox.h> #include <qheader.h> #include <qmultilineedit.h> -#include <iostream.h> #include <qdatetime.h> extern Transaction *transaction; extern Budget *budget; extern Account *account; extern Preferences *preferences; extern Memory *memory; extern Transfer *transfer; TransactionDisplay::TransactionDisplay ( QWidget* parent ) : QWidget ( parent ) { // set transactiondisplay variables; accountid = 0; children = TRUE; firstline = new QHBox ( this ); firstline->setSpacing ( 2 ); newtransaction = new QPushButton ( firstline ); newtransaction->setPixmap ( QPixmap ("/opt/QtPalmtop/pics/new.png") ); connect ( newtransaction, SIGNAL ( released () ), this, SLOT ( addTransaction () ) ); edittransaction = new QPushButton ( firstline ); edittransaction->setPixmap( QPixmap ("/opt/QtPalmtop/pics/edit.png") ); connect ( edittransaction, SIGNAL ( released () ), this, SLOT ( checkListViewEdit () ) ); deletetransaction = new QPushButton ( firstline ); deletetransaction->setPixmap( QPixmap ( "/opt/QtPalmtop/pics/delete.png") ); connect ( deletetransaction, SIGNAL ( released () ), this, SLOT ( checkListViewDelete () ) ); toggletransaction = new QPushButton ( firstline ); toggletransaction->setPixmap( QPixmap ( "/opt/QtPalmtop/pics/redo.png") ); connect ( toggletransaction, SIGNAL ( released () ), this, SLOT ( checkListViewToggle () ) ); viewtransactionnotes = new QPushButton ( firstline ); viewtransactionnotes->setPixmap( QPixmap ( "/opt/QtPalmtop/pics/info.png") ); connect ( viewtransactionnotes, SIGNAL ( released () ), this, SLOT ( showTransactionNotes () ) ); secondline = new QHBox ( this ); secondline->setSpacing ( 5 ); name = new QLabel ( secondline ); balance = new QLabel ( secondline ); QLabel *limit = new QLabel ( "Limit", secondline ); limitbox = new QLineEdit ( secondline ); limitbox->setMinimumWidth ( ( int ) ( this->width() / 6 ) ); connect ( limitbox, SIGNAL ( textChanged ( const QString & ) ), this, SLOT ( limitDisplay ( const QString & ) ) ); 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,53 +1,52 @@ #include "transfer.h" #include "account.h" #include "transactiondisplay.h" #include <stdlib.h> -#include <iostream.h> extern Account *account; extern Preferences *preferences; Transfer::Transfer () { db = sqlite_open ( "qmtransfers.db", 0, 0 ); } Transfer::~Transfer () { sqlite_close ( db ); } void Transfer::addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared ) { int nextrowid = -1; char **results; 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 ); } 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 ); } int Transfer::getNumberOfTransfers () { char **results; |