Returns the number of columns by which the sorter sorts.
Gets the position'th sort column and its associated sort order.
Returns the primary sort column.
Returns the primary sort order.
Notifies all users of the sorter that it has changed.
Compares two given items according to the sort order implemented by the sorter.
Gets the order that self conforms to.
Connect to Changed signal.
gtk.column_view_sorter.ColumnViewSorter is a sorter implementation that is geared towards the needs of gtk.column_view.ColumnView.
The sorter returned by gtk.column_view.ColumnView.getSorter is a gtk.column_view_sorter.ColumnViewSorter.
In column views, sorting can be configured by associating sorters with columns, and users can invert sort order by clicking on column headers. The API of gtk.column_view_sorter.ColumnViewSorter is designed to allow saving and restoring this configuration.
If you are only interested in the primary sort column (i.e. the column where a sort indicator is shown in the header), then you can just look at property@Gtk.ColumnViewSorter:primary-sort-column and property@Gtk.ColumnViewSorter:primary-sort-order.
If you want to store the full sort configuration, including secondary sort columns that are used for tie breaking, then you can use gtk.column_view_sorter.ColumnViewSorter.getNthSortColumn. To get notified about changes, use gtk.sorter.Sorter.changed.
To restore a saved sort configuration on a gtk.column_view.ColumnView, use code like: