summaryrefslogtreecommitdiff
authorchicken <chicken>2004-11-02 19:46:53 (UTC)
committer chicken <chicken>2004-11-02 19:46:53 (UTC)
commit30c9ee6ca6442c66f02c004dd960b26eeab6dee2 (patch) (side-by-side diff)
tree4e399ff17e29ae3b7769f69e926d76f7dfeb8128
parent029fc220470de74b7c1a148c9ea934c17686149f (diff)
downloadopie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.zip
opie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.tar.gz
opie-30c9ee6ca6442c66f02c004dd960b26eeab6dee2.tar.bz2
switching to sqlite3
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/budgetdisplay.cpp2
-rwxr-xr-xnoncore/apps/qashmoney/transfer.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/qashmoney/budgetdisplay.cpp b/noncore/apps/qashmoney/budgetdisplay.cpp
index 3fc4e6c..b83eb46 100755
--- a/noncore/apps/qashmoney/budgetdisplay.cpp
+++ b/noncore/apps/qashmoney/budgetdisplay.cpp
@@ -1,67 +1,67 @@
#include <qmessagebox.h>
#include <qheader.h>
-#include <sqlite.h>
+#include <sqlite3.h>
#include "budgetdisplay.h"
#include "budget.h"
#include "datepicker.h"
#include "transaction.h"
extern Preferences *preferences;
extern Budget *budget;
extern Transaction *transaction;
BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent )
{
QFont font = this->font();
font.setWeight ( QFont::Bold );
//set the default date to today
newDate = QDate::currentDate ();
year = newDate.year();
month = newDate.month();
day = newDate.day();
datelabel = preferences->getDate ( year, month );
setCaption ( "Budget" );
firstline = new QHBox ( this );
firstline->setSpacing ( 2 );
secondline = new QHBox ( this );
secondline->setSpacing ( 10 );
menu = new QMenuBar ( this );
menu->setFrameStyle ( QFrame::Box | QFrame::Sunken );
budgetmenu = new QPopupMenu ( this );
lineitemsmenu = new QPopupMenu ( this );
datemenu = new QPopupMenu ( this );
menu->insertItem ( "Budget", budgetmenu );
menu->insertItem ( "Line Item", lineitemsmenu );
menu->insertItem ( "Date", datemenu );
budgetmenu->insertItem ( "New", this, SLOT ( newBudget() ), 0, 1 );
budgetmenu->insertItem ( "Edit", this, SLOT ( editBudget() ), 0, 2 );
budgetmenu->insertItem ( "Delete", this, SLOT ( deleteBudget() ), 0, 3 );
lineitemsmenu->insertItem ( "New", this, SLOT ( newLineItem() ), 0, 1 );
lineitemsmenu->insertItem ( "Edit", this, SLOT ( editLineItem() ), 0, 2 );
lineitemsmenu->insertItem ( "Delete", this, SLOT ( deleteLineItem() ), 0, 3 );
datemenu->insertItem ( "Change", this, SLOT ( showCalendar() ) );
budgetbox = new QComboBox ( firstline );
connect ( budgetbox, SIGNAL ( activated(int) ), this, SLOT ( setCurrentBudget(int) ) );
budgetview = new QComboBox ( firstline );
budgetview->insertItem ( "Month" );
budgetview->insertItem ( "Year" );
connect ( budgetview, SIGNAL ( activated(int) ), this, SLOT ( setCurrentView(int) ) );
budgeted = new QLabel ( secondline );
budgeted->setFont ( font );
actual = new QLabel ( secondline );
actual->setFont ( font );
date = new QLabel ( secondline );
date->setFont ( font );
listview = new QListView ( this );
listview->setAllColumnsShowFocus ( TRUE );
listview->setShowSortIndicator ( TRUE );
listview->setRootIsDecorated ( TRUE );
diff --git a/noncore/apps/qashmoney/transfer.h b/noncore/apps/qashmoney/transfer.h
index e910e7c..cec3386 100755
--- a/noncore/apps/qashmoney/transfer.h
+++ b/noncore/apps/qashmoney/transfer.h
@@ -1,52 +1,52 @@
#ifndef TRANSFER_H
#define TRANSFER_H
#include <qlistview.h>
#include <qstring.h>
-#include <sqlite.h>
+#include <sqlite3.h>
#include <qdatetime.h>
#include "preferences.h"
class Transfer
{
public:
Transfer ();
~Transfer ();
// This function adds a new transfer to the database. It takes the fromaccount, toaccount,
// number, frombudget, tobudget, day, month, year, amount, cleared
void addTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared );
void updateTransfer ( int fromaccount, int fromparent, int toaccount, int toparent, int day, int month, int year, float amount, int cleared, int transferid );
// Deletes a transfer. Takes the transferid as its parameter
void deleteTransfer ( int );
// Deletes all transfers for a given accountid
void deleteAllTransfers ( int accountid );
// Returns the number of checking transfers
int getNumberOfTransfers ();
int getNumberOfTransfers ( int accountid );
void displayTransfers ( QListView *listview, int accountid, bool children, QDate displaydate );
int getCleared ( int id );
void setCleared ( int id, int cleared );
int getFromAccountID ( int id );
int getToAccountID ( int id );
int getDay ( int id );
int getMonth ( int id );
int getYear ( int id );
QString getAmount ( int id );
private:
- sqlite *db;
+ sqlite3 *db;
};
#endif