summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/transaction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/checkbook/transaction.cpp b/noncore/apps/checkbook/transaction.cpp
index 07d5ae1..c94b989 100644
--- a/noncore/apps/checkbook/transaction.cpp
+++ b/noncore/apps/checkbook/transaction.cpp
@@ -143,132 +143,132 @@ Transaction::Transaction( QWidget *parent, const QString &acctname, TranInfo *in
// Fee
label = new QLabel( tr( "Fee:" ), container );
QWhatsThis::add( label, tr( "Enter any fee amount assoiciated with this transaction.\n\nThe value entered should always be positive." ) );
layout->addWidget( label, 6, 0 );
feeEdit = new QLineEdit( container );
QWhatsThis::add( feeEdit, tr( "Enter any fee amount assoiciated with this transaction.\n\nThe value entered should always be positive." ) );
layout->addMultiCellWidget( feeEdit, 6, 6, 1, 3 );
// Notes
label = new QLabel( tr( "Notes:" ), container );
QWhatsThis::add( label, tr( "Enter any additional information for this transaction here." ) );
layout->addWidget( label, 7, 0 );
noteEdit = new QMultiLineEdit( container );
QWhatsThis::add( noteEdit, tr( "Enter any additional information for this transaction here." ) );
layout->addMultiCellWidget( noteEdit, 8, 8, 0, 3 );
// Populate current values if provided
if ( info )
{
if ( info->withdrawal() )
{
withBtn->setChecked( TRUE );
slotWithdrawalClicked();
}
else
{
depBtn->setChecked( TRUE );
slotDepositClicked();
}
QDate dt = info->date();
slotDateChanged( dt.year(), dt.month(), dt.day() );
datePicker->setDate( dt );
numEdit->setText( info->number() );
descEdit->setText( info->desc() );
QString temptext = info->category();
int i = catList->count();
while ( i > 0 )
{
i--;
catList->setCurrentItem( i );
if ( catList->currentText() == temptext )
{
break;
}
}
temptext = info->type();
i = typeList->count();
while ( i > 0 )
{
i--;
typeList->setCurrentItem( i );
if ( typeList->currentText() == temptext )
{
break;
}
}
amtEdit->setText( QString( "%1" ).arg( info->amount(), 0, 'f', 2 ) );
feeEdit->setText( QString( "%1" ).arg( info->fee(), 0, 'f', 2 ) );
noteEdit->setText( info->notes() );
}
else
{
withBtn->setChecked( TRUE );
}
}
Transaction::~Transaction()
{
}
void Transaction::accept()
{
tran->setDesc( descEdit->text() );
tran->setDate( datePicker->selectedDate() );
tran->setWithdrawal( withBtn->isChecked() );
tran->setType( typeList->currentText() );
tran->setCategory( catList->currentText() );
bool ok;
tran->setAmount( amtEdit->text().toFloat( &ok ) );
tran->setFee( feeEdit->text().toFloat( &ok ) );
tran->setNumber( numEdit->text() );
tran->setNotes( noteEdit->text() );
QDialog::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( "Eletronics" ) );
+ 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" ) );
catList->setCurrentItem( 0 );
typeList->clear();
typeList->insertItem( tr( "Debit Charge" ) );
typeList->insertItem( tr( "Written Check" ) );
typeList->insertItem( tr( "Transfer" ) );
typeList->insertItem( tr( "Credit Card" ) );
}
void Transaction::slotDepositClicked()
{
catList->clear();
catList->insertItem( tr( "Work" ) );
catList->insertItem( tr( "Family Member" ) );
catList->insertItem( tr( "Misc. Credit" ) );
catList->setCurrentItem( 0 );
typeList->clear();
typeList->insertItem( tr( "Written Check" ) );
typeList->insertItem( tr( "Automatic Payment" ) );
typeList->insertItem( tr( "Transfer" ) );
typeList->insertItem( tr( "Cash" ) );
}
void Transaction::slotDateChanged( int y, int m, int d )
{
QDate date;
date.setYMD( y, m, d );
dateBtn->setText( TimeString::shortDate( date ) );
}