author | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
---|---|---|
committer | allenforsythe <allenforsythe> | 2003-05-28 11:49:47 (UTC) |
commit | 52047fd3d3f30509d65834747c3a0c5c6760dc01 (patch) (side-by-side diff) | |
tree | 136945c2ffff2434ba1e3c8959b5335f5016e8f8 /noncore/apps/qashmoney/budgetdisplay.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/budgetdisplay.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/budgetdisplay.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/apps/qashmoney/budgetdisplay.cpp b/noncore/apps/qashmoney/budgetdisplay.cpp index 09f62b2..afc6a2d 100755 --- a/noncore/apps/qashmoney/budgetdisplay.cpp +++ b/noncore/apps/qashmoney/budgetdisplay.cpp @@ -82,6 +82,13 @@ BudgetDisplay::BudgetDisplay ( QWidget *parent ) : QWidget ( parent ) listview->header()->setTracking ( FALSE ); connect ( listview->header(), SIGNAL ( sizeChange ( int, int, int ) ), this, SLOT ( saveColumnSize ( int, int, int ) ) ); + connect ( listview->header(), SIGNAL ( clicked ( int ) ), this, SLOT ( saveSortingPreference ( int ) ) ); + + // pull the column sorting preference from the preferences table, and configure the listview accordingly + int column = 0; + int direction = 0; + preferences->getSortingPreference ( 3, &column, &direction ); + listview->setSorting ( column, direction ); displayBudgetNames(); @@ -118,6 +125,11 @@ void BudgetDisplay::saveColumnSize ( int column, int oldsize, int newsize ) } } +void BudgetDisplay::saveSortingPreference ( int column ) + { + preferences->changeSortingPreference ( 3, column ); + } + int BudgetDisplay::getIDColumn () { int counter; |