author | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-27 19:51:32 (UTC) |
commit | 951d1d4125a80dc814f95d2956853bf53ca52e9a (patch) (side-by-side diff) | |
tree | 46c7a70b80a7eebb54cd59c46204c28335f3821c /noncore/apps/checkbook/transaction.cpp | |
parent | f0a15a9866f9eddfe10596e63a1e6300b92b9e3f (diff) | |
download | opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.zip opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.gz opie-951d1d4125a80dc814f95d2956853bf53ca52e9a.tar.bz2 |
merge noncore/apps/* except
- advancedfm (ljp, please...)
- odict (tille, please...)
Diffstat (limited to 'noncore/apps/checkbook/transaction.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/transaction.cpp | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp index c94b989..138d0e6 100644 --- a/noncore/apps/checkbook/transaction.cpp +++ b/noncore/apps/checkbook/transaction.cpp @@ -27,8 +27,9 @@ */ #include "transaction.h" #include "traninfo.h" +#include "cfg.h" #include <qpe/datebookmonth.h> #include <qbuttongroup.h> @@ -40,17 +41,17 @@ #include <qradiobutton.h> #include <qwhatsthis.h> Transaction::Transaction( QWidget *parent, const QString &acctname, TranInfo *info, - const QString &symbol ) + Cfg *pCfg ) : QDialog( parent, 0, TRUE, WStyle_ContextHelp ) { QString tempstr = tr( "Transaction for " ); tempstr.append( acctname ); setCaption( tempstr ); tran = info; - currencySymbol = symbol; + _pCfg=pCfg; QVBoxLayout *vb = new QVBoxLayout( this ); QScrollView *sv = new QScrollView( this ); @@ -229,23 +230,15 @@ void Transaction::accept() void Transaction::slotWithdrawalClicked() { catList->clear(); - catList->insertItem( tr( "Automobile" ) ); - catList->insertItem( tr( "Bills" ) ); - catList->insertItem( tr( "CDs" ) ); - catList->insertItem( tr( "Clothing" ) ); - catList->insertItem( tr( "Computer" ) ); - catList->insertItem( tr( "DVDs" ) ); - catList->insertItem( tr( "Electronics" ) ); - catList->insertItem( tr( "Entertainment" ) ); - catList->insertItem( tr( "Food" ) ); - catList->insertItem( tr( "Gasoline" ) ); - catList->insertItem( tr( "Misc" ) ); - catList->insertItem( tr( "Movies" ) ); - catList->insertItem( tr( "Rent" ) ); - catList->insertItem( tr( "Travel" ) ); + CategoryList *pCatList=_pCfg->getCategoryList(); + for(Category *pCat=pCatList->first(); pCat; pCat=pCatList->next()) { + if( !pCat->isIncome() ) + catList->insertItem( pCat->getName() ); + } catList->setCurrentItem( 0 ); + typeList->clear(); typeList->insertItem( tr( "Debit Charge" ) ); typeList->insertItem( tr( "Written Check" ) ); typeList->insertItem( tr( "Transfer" ) ); @@ -254,12 +247,15 @@ void Transaction::slotWithdrawalClicked() void Transaction::slotDepositClicked() { catList->clear(); - catList->insertItem( tr( "Work" ) ); - catList->insertItem( tr( "Family Member" ) ); - catList->insertItem( tr( "Misc. Credit" ) ); + CategoryList *pCatList=_pCfg->getCategoryList(); + for(Category *pCat=pCatList->first(); pCat; pCat=pCatList->next()) { + if( pCat->isIncome() ) + catList->insertItem( pCat->getName() ); + } catList->setCurrentItem( 0 ); + typeList->clear(); typeList->insertItem( tr( "Written Check" ) ); typeList->insertItem( tr( "Automatic Payment" ) ); typeList->insertItem( tr( "Transfer" ) ); |