summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/accountdisplay.cpp
Unidiff
Diffstat (limited to 'noncore/apps/qashmoney/accountdisplay.cpp') (more/less context) (show whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/accountdisplay.cpp15
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
@@ -2,4 +2,5 @@
2#include <qmessagebox.h> 2#include <qmessagebox.h>
3#include <qheader.h> 3#include <qheader.h>
4#include <iostream.h>
4 5
5#include "accountdisplay.h" 6#include "accountdisplay.h"
@@ -49,4 +50,5 @@ AccountDisplay::AccountDisplay ( QWidget *parent ) : QWidget ( parent )
49 listview->header()->setTracking ( FALSE ); 50 listview->header()->setTracking ( FALSE );
50 connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); 51 connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) );
52 connect ( listview->header(), SIGNAL ( clicked ( int ) ), this, SLOT ( saveSortingPreference ( int ) ) );
51 53
52 layout = new QVBoxLayout ( this, 2, 5 ); 54 layout = new QVBoxLayout ( this, 2, 5 );
@@ -269,12 +271,10 @@ void AccountDisplay::getTransferAccounts ( QListViewItem * item )
269 if ( td->clearedcheckbox->isChecked() == TRUE ) 271 if ( td->clearedcheckbox->isChecked() == TRUE )
270 cleared = 1; 272 cleared = 1;
271 273 cout << "Year from transferdialog = " << td->getYear() << endl;
272 // add the transfer with a new date if its been edited or use the default date 274 // add the transfer with a new date if its been edited or use the default date
273 if ( td->getDateEdited () == TRUE ) 275 if ( td->getDateEdited () == TRUE )
274 transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, 276 transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, account->getParentAccountID ( secondaccountid ), td->getDay(), td->getMonth(), td->getYear(), td->amount->text().toFloat(), cleared );
275 account->getParentAccountID ( secondaccountid ), td->getDay(), td->getMonth(), td->getYear(), td->amount->text().toFloat(), cleared );
276 else 277 else
277 transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, 278 transfer->addTransfer ( firstaccountid, account->getParentAccountID ( firstaccountid ), secondaccountid, account->getParentAccountID ( secondaccountid ), defaultday, defaultmonth, defaultyear, td->amount->text().toFloat(), cleared );
278 account->getParentAccountID ( secondaccountid ), defaultday, defaultmonth, defaultyear, td->amount->text().toFloat(), cleared );
279 279
280 // update account balances of both accounts and parents if necessary 280 // update account balances of both accounts and parents if necessary
@@ -348,4 +348,9 @@ void AccountDisplay::saveColumnSize ( int column, int oldsize, int newsize )
348 } 348 }
349 349
350void AccountDisplay::saveSortingPreference ( int column )
351 {
352 preferences->changeSortingPreference ( 1, column );
353 }
354
350int AccountDisplay::getIDColumn () 355int AccountDisplay::getIDColumn ()
351 { 356 {