summaryrefslogtreecommitdiff
authorchicken <chicken>2004-11-02 18:23:35 (UTC)
committer chicken <chicken>2004-11-02 18:23:35 (UTC)
commit029fc220470de74b7c1a148c9ea934c17686149f (patch) (side-by-side diff)
tree115de8edc9142615b31d906770cb7978190e7af8
parentebdc2d346272bae27c867b855207993985df4450 (diff)
downloadopie-029fc220470de74b7c1a148c9ea934c17686149f.zip
opie-029fc220470de74b7c1a148c9ea934c17686149f.tar.gz
opie-029fc220470de74b7c1a148c9ea934c17686149f.tar.bz2
switching to sqlite3
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/account.h4
-rwxr-xr-xnoncore/apps/qashmoney/budget.h4
-rwxr-xr-xnoncore/apps/qashmoney/memory.h4
-rwxr-xr-xnoncore/apps/qashmoney/preferences.h4
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.pro2
-rwxr-xr-xnoncore/apps/qashmoney/transaction.h4
6 files changed, 11 insertions, 11 deletions
diff --git a/noncore/apps/qashmoney/account.h b/noncore/apps/qashmoney/account.h
index f77f400..5bad4a1 100755
--- a/noncore/apps/qashmoney/account.h
+++ b/noncore/apps/qashmoney/account.h
@@ -1,23 +1,23 @@
#ifndef ACCOUNT_H
#define ACCOUNT_H
#include <qstring.h>
#include <qlistview.h>
#include <qcombobox.h>
-#include <sqlite.h>
+#include <sqlite3.h>
class Account
{
public:
Account ();
~Account ();
// This function adds a new account to the database. It takes the account name, parent,
// initial balance and the account type, description, credit limit, statementbalancedate
// as three integers, and the statementbalance amount
// The parent is an integer account id. Its -1 if there is no parent
// The account types (so far) are 0=not defined 1=parent checking 2=child checking
void addAccount ( QString, int, float, int, QString, float, int, int, int, float, const char * );
// updates certain parts of an account
@@ -67,33 +67,33 @@ class Account
int getStatementMonth ( int );
int getStatementYear ( int );
float getStatementBalance ( int );
// Returns account description and name
QString getAccountDescription ( int accountid );
QString getCurrencyCode ( int accountid );
QString getAccountName ( int accountid );
QStringList getAccountNames ();
QStringList getAccountIDs ();
QString getAccountBalance ( int accountid );
// returns account credit limit
float getAccountCreditLimit ( int );
// The primary database that stores all our data
- sqlite *adb;
+ sqlite3 *adb;
};
class GreyBackgroundItem : public QListViewItem
{
public:
GreyBackgroundItem ( QListView *parent );
GreyBackgroundItem ( QListView *parent, QString label1, QString label2, QString label3 );
GreyBackgroundItem ( QListView *parent, QString label1, QString label2, QString label3, QString label4 );
GreyBackgroundItem ( QListView *parent, QString label1, QString label2, QString label3, QString label4, QString label5 );
virtual void paintCell ( QPainter *p, const QColorGroup &cg, int column, int width, int alignment );
};
#endif
diff --git a/noncore/apps/qashmoney/budget.h b/noncore/apps/qashmoney/budget.h
index 16af26a..f82e048 100755
--- a/noncore/apps/qashmoney/budget.h
+++ b/noncore/apps/qashmoney/budget.h
@@ -1,23 +1,23 @@
#ifndef BUDGET_H
#define BUDGET_H
#include <qstring.h>
#include <qstringlist.h>
#include <qlistview.h>
-#include <sqlite.h>
+#include <sqlite3.h>
class Budget
{
public:
Budget ();
~Budget ();
int addBudget ( QString name, int type, QString description, QString currency, int startday, int startmonth, int startyear, int endday, int endmonth, int endyear, int defaultview );
void updateBudget ( QString name, QString description, QString currency, int budgetid );
void deleteBudget ( int budgetid );
int getNumberOfBudgets ();
int getNumberOfLineItems ( int budgetid );
QStringList* getBudgetNames ();
QStringList* getBudgetIDs ();
@@ -25,21 +25,21 @@ class Budget
QStringList getLineItemIDs ( int budgetid );
QString getBudgetName ( int budgetid );
QString getBudgetDescription ( int budgetid );
QString getCurrency ( int budgetid );
QString getBudgetTotal ( int budgetid, int viewtype );
int getLastAdded ();
int addLineItem ( int budgetid, QString lineitemname, float lineitemamount, int lineitemtype );
void updateLineItem ( QString lineitemname, float lineitemamount, int lineitemtype, int budgetid, int lineitemid );
void displayLineItems ( int budgetid, QListView *listview, int month, int year, int viewtype );
void deleteLineItem ( int budgetid, int lineitemid );
int getLineItemTime ( int budgetid, int lineitemid );
float getLineItemAmount ( int budgetid, int lineitemid );
private:
- sqlite *bdb;
+ sqlite3 *bdb;
};
#endif
diff --git a/noncore/apps/qashmoney/memory.h b/noncore/apps/qashmoney/memory.h
index 6f3f100..6e8ae46 100755
--- a/noncore/apps/qashmoney/memory.h
+++ b/noncore/apps/qashmoney/memory.h
@@ -1,45 +1,45 @@
#ifndef MEMORY_H
#define MEMORY_H
#include <qstring.h>
#include <qlistbox.h>
#include <qcombobox.h>
-#include <sqlite.h>
+#include <sqlite3.h>
class Memory : public QObject
{
Q_OBJECT
public:
Memory ();
~Memory ();
// This function adds a new memory to the database. It takes the memory name, parent,
// initial balance, a displayed variable, and the memory type
// The parent is an integer memory id. Its -1 if there is not parent
// The memory types are 0=not defined 1=parent 2=child
void addMemoryItem ( QString );
// Returns the number of checking memorys
int getNumberOfMemoryItems ();
void changeMemoryName ( QString );
// This takes a QListView and puts parents and children memorys
// into the list view
void displayMemoryItems ( QListBox * );
void displayMemoryItems ( QComboBox * );
// The primary database that stores all our data
- sqlite *db;
+ sqlite3 *db;
public slots:
// Deletes a memory item. Takes the memoryid as its parameter
void deleteMemoryItem ( QString );
};
#endif
diff --git a/noncore/apps/qashmoney/preferences.h b/noncore/apps/qashmoney/preferences.h
index 10ec6e9..38579ad 100755
--- a/noncore/apps/qashmoney/preferences.h
+++ b/noncore/apps/qashmoney/preferences.h
@@ -1,48 +1,48 @@
-#include <sqlite.h>
+#include <sqlite3.h>
#include <qstring.h>
#ifndef PREFERENCES_H
#define PREFERENCES_H
class Preferences
{
public:
Preferences ();
~Preferences ();
void addPreferences ();
void initializeColumnPreferences ();
void initializeSortingPreferences ();
// Returns a preference value for the given preferences ID
int getPreference ( int );
int getColumnPreference ( int id );
void getSortingPreference ( int id, int *column, int *direction );
// Convenience for getting date separator with one function
// call. Takes the preference id as its argument
QString getSeparator ( );
// Changes a preference for the given ID
void changePreference ( int , int );
void changeColumnPreference ( int id, int width );
void changeSortingPreference ( int id, int column );
// The primary database that stores all our data
- sqlite *db;
+ sqlite3 *db;
// This function returns a Qstring for the year first date formats
// for displaying. It takes the date numbers
QString getDate ( int, int, int );
QString getDate ( int y, int m );
void setDefaultDatePreferences ();
};
#endif
diff --git a/noncore/apps/qashmoney/qashmoney.pro b/noncore/apps/qashmoney/qashmoney.pro
index 4222a25..faa898b 100755
--- a/noncore/apps/qashmoney/qashmoney.pro
+++ b/noncore/apps/qashmoney/qashmoney.pro
@@ -30,26 +30,26 @@ SOURCES = qashmoney.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
TARGET = qashmoney
DESTDIR = $(OPIEDIR)/bin
unix:LIBS += -lm
-LIBS += -lqpe -lopiecore2 -lsqlite
+LIBS += -lqpe -lopiecore2 -lsqlite3
include ( $(OPIEDIR)/include.pro )
!isEmpty( LIBSQLITE_INC_DIR ) {
INCLUDEPATH = $$LIBSQLITE_INC_DIR $$INCLUDEPATH
}
!isEmpty( LIBSQLITE_LIB_DIR ) {
LIBS = -L$$LIBSQLITE_LIB_DIR $$LIBS
}
diff --git a/noncore/apps/qashmoney/transaction.h b/noncore/apps/qashmoney/transaction.h
index 5871555..3df43a8 100755
--- a/noncore/apps/qashmoney/transaction.h
+++ b/noncore/apps/qashmoney/transaction.h
@@ -1,23 +1,23 @@
#ifndef TRANSACTION_H
#define TRANSACTION_H
#include <qstring.h>
#include <qlistview.h>
#include <qdatetime.h>
-#include <sqlite.h>
+#include <sqlite3.h>
#include "preferences.h"
class Transaction
{
public:
Transaction ();
~Transaction ();
// This function adds a new transaction to the database. It takes the payee, accountid,
// budgetid, number, day, month, year, amount, cleared
void 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 );
// This updates an already existing transaction
void updateTransaction ( QString, QString, int, int, int, int, float, int, int, int, int );
@@ -50,24 +50,24 @@ class Transaction
QString getPayee ( int );
QString getTransactionDescription ( int );
QString getNumber ( int );
QString getAmount ( int );
QString getAbsoluteAmount ( int );
int getCleared ( int );
void setCleared ( int id, int cleared );
int getBudgetID ( int id );
int getLineItemID ( int id );
int getDay ( int );
int getMonth ( int );
int getYear ( int );
int getAccountID ( int id );
private:
- sqlite *tdb;
+ sqlite3 *tdb;
int rows, columns;
};
#endif