Feature #4380
openWTableView: support for multiple column sorting
0%
Description
Hello,
Feature request: Multiple column sorts by clicking on Ctrl+left mouse on each column to be used for sorting.
Regards,
Files
Updated by Trigve Siver over 8 years ago
I would also like to have this feature. I could help with development, but I'm not that proficient in JS. I've implemented this feature in wxWidgets.
Also the concrete "shortcut" for multiple sorting should be custom defined (i.e. in config for instance).
Updated by Trigve Siver about 7 years ago
- File 0001-Add-support-for-multiple-column-sort-in-TableView.patch 0001-Add-support-for-multiple-column-sort-in-TableView.patch added
So I've implemented it in my branch. Attaching patch.
The left click is behaving as normal, that is it change the order if the column is sorted already. Otherwise it sort by the new column only.
Using CTRL + CLICK add new column for sorting. Clicking on the already sorted column will change it's order. CTRL + CLICK on already sorted column, will remove the column from the sorted column set. Clicking on the new column, not in already sorted columns set, will reset the sort only with this new column.
Please review.
Updated by Koen Deforche about 7 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
That sounds nice and glancing through the patch I like the approach. All it needs is support in our standard models that support sorting (WStandardItemModel, WSortFilterProxyModel).
Updated by Trigve Siver about 7 years ago
Ok, I can look at it in the near time.
Updated by Trigve Siver about 7 years ago
- File 0001-Add-support-for-multiple-column-sort-for-WStandardIt.patch 0001-Add-support-for-multiple-column-sort-for-WStandardIt.patch added
Here is the patch for WStandardItemModel and WSortFilterProxyModel. Because I had a problem running examples, and don't have time to look at ti, no testing has been done.
Please review and let me know if there are any bugs.
Thank you