author | ar <ar> | 2004-02-08 19:14:56 (UTC) |
---|---|---|
committer | ar <ar> | 2004-02-08 19:14:56 (UTC) |
commit | 5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0 (patch) (unidiff) | |
tree | 525f35c4937c9f4ae99538289c5d1f96c53d7fa7 /noncore/apps/checkbook/checkbook.cpp | |
parent | 2dc8add65c44b3dd240cf2bd3c276c3c0155f46b (diff) | |
download | opie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.zip opie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.tar.gz opie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.tar.bz2 |
improve support for BigScreen
Diffstat (limited to 'noncore/apps/checkbook/checkbook.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index a42c824..a5492e4 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp | |||
@@ -474,26 +474,25 @@ void Checkbook::slotStartingBalanceChanged( const QString &newbalance ) | |||
474 | 474 | ||
475 | 475 | ||
476 | // --- slotNewTran ------------------------------------------------------------ | 476 | // --- slotNewTran ------------------------------------------------------------ |
477 | void Checkbook::slotNewTran() | 477 | void Checkbook::slotNewTran() |
478 | { | 478 | { |
479 | TranInfo *traninfo = new TranInfo( info->getNextNumber() ); | 479 | TranInfo *traninfo = new TranInfo( info->getNextNumber() ); |
480 | if( !_dLastNew.isNull() ) | 480 | if( !_dLastNew.isNull() ) |
481 | traninfo->setDate(_dLastNew); | 481 | traninfo->setDate(_dLastNew); |
482 | 482 | ||
483 | Transaction *currtran = new Transaction( this, true, info->name(), | 483 | Transaction *currtran = new Transaction( this, true, info->name(), |
484 | traninfo, | 484 | traninfo, |
485 | _pCfg ); | 485 | _pCfg ); |
486 | currtran->showMaximized(); | 486 | if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted ) |
487 | if ( currtran->exec() == QDialog::Accepted ) | ||
488 | { | 487 | { |
489 | // Add to transaction list | 488 | // Add to transaction list |
490 | info->addTransaction( traninfo ); | 489 | info->addTransaction( traninfo ); |
491 | 490 | ||
492 | // Add to transaction table | 491 | // Add to transaction table |
493 | float amount; | 492 | float amount; |
494 | QString stramount; | 493 | QString stramount; |
495 | amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount(); | 494 | amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount(); |
496 | stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount ); | 495 | stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount ); |
497 | ( void ) new CBListItem( traninfo, tranTable, traninfo->getIdStr(), traninfo->datestr(false), | 496 | ( void ) new CBListItem( traninfo, tranTable, traninfo->getIdStr(), traninfo->datestr(false), |
498 | traninfo->number(), traninfo->datestr(true), traninfo->desc(), | 497 | traninfo->number(), traninfo->datestr(true), traninfo->desc(), |
499 | stramount ); | 498 | stramount ); |
@@ -521,26 +520,25 @@ void Checkbook::slotNewTran() | |||
521 | // --- slotEditTran ----------------------------------------------------------- | 520 | // --- slotEditTran ----------------------------------------------------------- |
522 | void Checkbook::slotEditTran() | 521 | void Checkbook::slotEditTran() |
523 | { | 522 | { |
524 | QListViewItem *curritem = tranTable->currentItem(); | 523 | QListViewItem *curritem = tranTable->currentItem(); |
525 | if ( !curritem ) | 524 | if ( !curritem ) |
526 | return; | 525 | return; |
527 | 526 | ||
528 | TranInfo *traninfo=info->findTransaction( curritem->text(COL_ID) ); | 527 | TranInfo *traninfo=info->findTransaction( curritem->text(COL_ID) ); |
529 | 528 | ||
530 | Transaction *currtran = new Transaction( this, false, info->name(), | 529 | Transaction *currtran = new Transaction( this, false, info->name(), |
531 | traninfo, | 530 | traninfo, |
532 | _pCfg ); | 531 | _pCfg ); |
533 | currtran->showMaximized(); | 532 | if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted ) |
534 | if ( currtran->exec() == QDialog::Accepted ) | ||
535 | { | 533 | { |
536 | curritem->setText( COL_NUM, traninfo->number() ); | 534 | curritem->setText( COL_NUM, traninfo->number() ); |
537 | curritem->setText( COL_SORTDATE, traninfo->datestr(false) ); | 535 | curritem->setText( COL_SORTDATE, traninfo->datestr(false) ); |
538 | curritem->setText( COL_DATE, traninfo->datestr(true) ); | 536 | curritem->setText( COL_DATE, traninfo->datestr(true) ); |
539 | curritem->setText( COL_DESC, traninfo->desc() ); | 537 | curritem->setText( COL_DESC, traninfo->desc() ); |
540 | 538 | ||
541 | float amount = traninfo->amount(); | 539 | float amount = traninfo->amount(); |
542 | if ( traninfo->withdrawal() ) | 540 | if ( traninfo->withdrawal() ) |
543 | { | 541 | { |
544 | amount *= -1; | 542 | amount *= -1; |
545 | } | 543 | } |
546 | QString stramount; | 544 | QString stramount; |