Diffstat (limited to 'noncore/apps/qashmoney/accountdisplay.cpp') (more/less context) (show whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/accountdisplay.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/noncore/apps/qashmoney/accountdisplay.cpp b/noncore/apps/qashmoney/accountdisplay.cpp index b2c0838..64f4ea8 100755 --- a/noncore/apps/qashmoney/accountdisplay.cpp +++ b/noncore/apps/qashmoney/accountdisplay.cpp @@ -3,2 +3,3 @@ #include <qheader.h> +#include <iostream.h> @@ -50,2 +51,3 @@ AccountDisplay::AccountDisplay ( QWidget *parent ) : QWidget ( parent ) connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); + connect ( listview->header(), SIGNAL ( clicked ( int ) ), this, SLOT ( saveSortingPreference ( int ) ) ); @@ -270,10 +272,8 @@ void AccountDisplay::getTransferAccounts ( QListViewItem * item ) cleared = 1; - + cout << "Year from transferdialog = " << td->getYear() << endl; // add the transfer with a new date if its been edited or use the default date if ( td->getDateEdited () == TRUE ) - transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, - account->getParentAccountID ( secondaccountid ), td->getDay(), td->getMonth(), td->getYear(), td->amount->text().toFloat(), cleared ); + transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, account->getParentAccountID ( secondaccountid ), td->getDay(), td->getMonth(), td->getYear(), td->amount->text().toFloat(), cleared ); else - transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, - account->getParentAccountID ( secondaccountid ), defaultday, defaultmonth, defaultyear, td->amount->text().toFloat(), cleared ); + transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, account->getParentAccountID ( secondaccountid ), defaultday, defaultmonth, defaultyear, td->amount->text().toFloat(), cleared ); @@ -349,2 +349,7 @@ void AccountDisplay::saveColumnSize ( int column, int oldsize, int newsize ) +void AccountDisplay::saveSortingPreference ( int column ) + { + preferences->changeSortingPreference ( 1, column ); + } + int AccountDisplay::getIDColumn () |