WTableView: support for multiple column sorting
Feature request: Multiple column sorts by clicking on Ctrl+left mouse on each column to be used for sorting.
Updated by Trigve Siver almost 7 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 almost 6 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.
Updated by Trigve Siver over 5 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.