author | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
commit | 52047fd3d3f30509d65834747c3a0c5c6760dc01 (patch) (unidiff) | |
tree | 136945c2ffff2434ba1e3c8959b5335f5016e8f8 /noncore/apps/qashmoney/transactiondisplay.cpp | |
parent | 7c85b3e98921afa74c7c6a90da4dfd54631c89c5 (diff) | |
download | opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.zip opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.tar.gz opie-52047fd3d3f30509d65834747c3a0c5c6760dc01.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'noncore/apps/qashmoney/transactiondisplay.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/transactiondisplay.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/noncore/apps/qashmoney/transactiondisplay.cpp b/noncore/apps/qashmoney/transactiondisplay.cpp index ae6223d..1839cd2 100755 --- a/noncore/apps/qashmoney/transactiondisplay.cpp +++ b/noncore/apps/qashmoney/transactiondisplay.cpp | |||
@@ -67,6 +67,7 @@ TransactionDisplay::TransactionDisplay ( QWidget* parent ) : QWidget ( parent ) | |||
67 | listview->setShowSortIndicator ( TRUE ); | 67 | listview->setShowSortIndicator ( TRUE ); |
68 | listview->header()->setTracking ( FALSE ); | 68 | listview->header()->setTracking ( FALSE ); |
69 | connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); | 69 | connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); |
70 | connect ( listview->header(), SIGNAL ( clicked ( int ) ), this, SLOT ( saveSortingPreference ( int ) ) ); | ||
70 | 71 | ||
71 | layout = new QVBoxLayout ( this, 2, 2 ); | 72 | layout = new QVBoxLayout ( this, 2, 2 ); |
72 | layout->addWidget ( firstline ); | 73 | layout->addWidget ( firstline ); |
@@ -133,7 +134,7 @@ void TransactionDisplay::addTransaction () | |||
133 | 134 | ||
134 | // redisplay transfers | 135 | // redisplay transfers |
135 | if ( transfer->getNumberOfTransfers() > 0 ) | 136 | if ( transfer->getNumberOfTransfers() > 0 ) |
136 | transfer->displayTransfers ( listview, accountid, children ); | 137 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
137 | 138 | ||
138 | // add the transaction amount to the account it's associated with | 139 | // add the transaction amount to the account it's associated with |
139 | // and update its parent account balance if necessary | 140 | // and update its parent account balance if necessary |
@@ -372,7 +373,7 @@ void TransactionDisplay::updateAndDisplay ( int id ) | |||
372 | 373 | ||
373 | // redisplay transfers | 374 | // redisplay transfers |
374 | if ( transfer->getNumberOfTransfers() > 0 ) | 375 | if ( transfer->getNumberOfTransfers() > 0 ) |
375 | transfer->displayTransfers ( listview, accountid, children ); | 376 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
376 | 377 | ||
377 | // add the transaction amount to the account it's associated with | 378 | // add the transaction amount to the account it's associated with |
378 | // and update its parent account balance if necessary | 379 | // and update its parent account balance if necessary |
@@ -416,7 +417,7 @@ void TransactionDisplay::deleteTransaction () | |||
416 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); | 417 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); |
417 | 418 | ||
418 | if ( transfer->getNumberOfTransfers() > 0 ) | 419 | if ( transfer->getNumberOfTransfers() > 0 ) |
419 | transfer->displayTransfers ( listview, accountid, children ); | 420 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
420 | 421 | ||
421 | // if we are viewing different child accounts through the parent account | 422 | // if we are viewing different child accounts through the parent account |
422 | // ie if there are five columns and the parentid is -1 | 423 | // ie if there are five columns and the parentid is -1 |
@@ -448,7 +449,7 @@ void TransactionDisplay::deleteTransaction () | |||
448 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); | 449 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); |
449 | 450 | ||
450 | if ( transfer->getNumberOfTransfers() > 0 ) | 451 | if ( transfer->getNumberOfTransfers() > 0 ) |
451 | transfer->displayTransfers ( listview, accountid, children ); | 452 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
452 | 453 | ||
453 | // for the from account | 454 | // for the from account |
454 | account->updateAccountBalance ( fromaccountid ); | 455 | account->updateAccountBalance ( fromaccountid ); |
@@ -501,7 +502,7 @@ void TransactionDisplay::toggleTransaction () | |||
501 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); | 502 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); |
502 | 503 | ||
503 | if ( transfer->getNumberOfTransfers() != 0 ) | 504 | if ( transfer->getNumberOfTransfers() != 0 ) |
504 | transfer->displayTransfers ( listview, accountid, children ); | 505 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
505 | } | 506 | } |
506 | 507 | ||
507 | void TransactionDisplay::redisplayAccountBalance () | 508 | void TransactionDisplay::redisplayAccountBalance () |
@@ -551,6 +552,11 @@ void TransactionDisplay::saveColumnSize ( int column, int oldsize, int newsize ) | |||
551 | preferences->changeColumnPreference ( 9, newsize ); | 552 | preferences->changeColumnPreference ( 9, newsize ); |
552 | } | 553 | } |
553 | 554 | ||
555 | void TransactionDisplay::saveSortingPreference ( int column ) | ||
556 | { | ||
557 | preferences->changeSortingPreference ( 2, column ); | ||
558 | } | ||
559 | |||
554 | void TransactionDisplay::limitDisplay ( const QString &text ) | 560 | void TransactionDisplay::limitDisplay ( const QString &text ) |
555 | { | 561 | { |
556 | listview->clear (); | 562 | listview->clear (); |
@@ -561,7 +567,7 @@ void TransactionDisplay::limitDisplay ( const QString &text ) | |||
561 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); | 567 | transaction->displayTransactions ( listview, accountid, children, displaytext, displaydate ); |
562 | 568 | ||
563 | if ( displaytext.length() == 1 || preferences->getPreference ( 6 ) == 1 ) | 569 | if ( displaytext.length() == 1 || preferences->getPreference ( 6 ) == 1 ) |
564 | transfer->displayTransfers ( listview, accountid, children ); | 570 | transfer->displayTransfers ( listview, accountid, children, displaydate ); |
565 | } | 571 | } |
566 | 572 | ||
567 | int TransactionDisplay::getIDColumn () | 573 | int TransactionDisplay::getIDColumn () |
@@ -619,5 +625,5 @@ void TransactionDisplay::setTransactionDisplayDate () | |||
619 | } | 625 | } |
620 | } | 626 | } |
621 | else | 627 | else |
622 | displaydate = QDate ( 1, 1, 1000 ); | 628 | displaydate = QDate ( 1900, 1, 1 ); |
623 | } | 629 | } |