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
@@ -1,6 +1,7 @@
1#include <qdatetime.h> 1#include <qdatetime.h>
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"
6#include "newaccount.h" 7#include "newaccount.h"
@@ -48,6 +49,7 @@ AccountDisplay::AccountDisplay ( QWidget *parent ) : QWidget ( parent )
48 49
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 );
53 layout->addWidget ( firstline ); 55 layout->addWidget ( firstline );
@@ -268,14 +270,12 @@ void AccountDisplay::getTransferAccounts ( QListViewItem * item )
268 // set the cleared integer if the checkbox is checked 270 // set the cleared integer if the checkbox is checked
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
281 account->updateAccountBalance ( firstaccountid ); 281 account->updateAccountBalance ( firstaccountid );
@@ -347,6 +347,11 @@ void AccountDisplay::saveColumnSize ( int column, int oldsize, int newsize )
347 347
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 {
352 int counter; 357 int counter;