summaryrefslogtreecommitdiff
path: root/noncore/apps/qashmoney/qashmoney.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/qashmoney/qashmoney.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-xnoncore/apps/qashmoney/qashmoney.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/noncore/apps/qashmoney/qashmoney.cpp b/noncore/apps/qashmoney/qashmoney.cpp
index 83eea01..20e8d32 100755
--- a/noncore/apps/qashmoney/qashmoney.cpp
+++ b/noncore/apps/qashmoney/qashmoney.cpp
@@ -15,6 +15,7 @@ Memory *memory = new Memory ();
QashMoney::QashMoney () : QWidget ()
{
- preferences->addPreferences();
+ preferences->addPreferences ();
preferences->initializeColumnPreferences ();
+ preferences->initializeSortingPreferences ();
// set the text in the upper part of the frame
@@ -154,5 +155,5 @@ void QashMoney::changeTabDisplay ()
// display transfers
- transfer->displayTransfers ( transactiondisplay->listview, accountid, children );
+ transfer->displayTransfers ( transactiondisplay->listview, accountid, children, newdate );
// open a new preferences object and resize the transaction display columns
@@ -179,4 +180,10 @@ void QashMoney::changeTabDisplay ()
transactiondisplay->listview->setColumnWidthMode ( 4, QListView::Manual );
}
+
+ // pull the column sorting preference from the preferences table, and configure the listview accordingly
+ int column = 0;
+ int direction = 0;
+ preferences->getSortingPreference ( 2, &column, &direction );
+ transactiondisplay->listview->setSorting ( column, direction );
// show the window
@@ -198,4 +205,10 @@ void QashMoney::changeTabDisplay ()
accountdisplay->listview->setColumnWidth ( 1, preferences->getColumnPreference ( 2 ) );
+ // set sorting preference on account display columns
+ int column = 0;
+ int direction = 0;
+ preferences->getSortingPreference ( 1, &column, &direction );
+ accountdisplay->listview->setSorting ( column, direction );
+
// display the accounts
if ( account->getNumberOfAccounts() != 0 )
@@ -263,5 +276,5 @@ void QashMoney::displayDatePreferencesDialog ()
if ( transfer->getNumberOfTransfers() != 0 )
- transfer->displayTransfers ( transactiondisplay->listview, accountid, children );
+ transfer->displayTransfers ( transactiondisplay->listview, accountid, children, newdate );
}
else if ( accountdisplay->isVisible() )
@@ -301,5 +314,5 @@ void QashMoney::displayTransactionPreferencesDialog ()
if ( transfer->getNumberOfTransfers() != 0 )
- transfer->displayTransfers ( transactiondisplay->listview, accountid, children );
+ transfer->displayTransfers ( transactiondisplay->listview, accountid, children, newdate );
}
else
@@ -386,5 +399,5 @@ void QashMoney::setTransactionDisplayDate ()
}
else
- newdate = QDate ( 1, 1, 1000 );
+ newdate = QDate ( 1900, 1, 1 );
}