:right-sidebar: True ColumnViewSorter =================================================================== .. currentmodule:: gi.repository.Gtk .. versionadded:: 4.10 .. class:: ColumnViewSorter(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Sorter`, :class:`~gi.repository.GObject.Object` :Constructors: :: ColumnViewSorter(**properties) Methods ------- .. rst-class:: interim-class .. class:: ColumnViewSorter :no-index: .. method:: get_n_sort_columns() -> int Returns the number of columns by which the sorter sorts. If the sorter of the primary sort column does not determine a total order, then the secondary sorters are consulted to break the ties. Use the :obj:`~gi.repository.Gtk.Sorter.signals.changed` signal to get notified when the number of sort columns changes. .. versionadded:: 4.10 .. method:: get_nth_sort_column(position: int) -> tuple[~gi.repository.Gtk.ColumnViewColumn | None, ~gi.repository.Gtk.SortType] Gets the ``position``'th sort column and its associated sort order. Use the :obj:`~gi.repository.Gtk.Sorter.signals.changed` signal to get notified when sort columns change. .. versionadded:: 4.10 :param position: the position of the sort column to retrieve (0 for the primary sort column) .. method:: get_primary_sort_column() -> ~gi.repository.Gtk.ColumnViewColumn | None Returns the primary sort column. The primary sort column is the one that displays the triangle in a column view header. .. versionadded:: 4.10 .. method:: get_primary_sort_order() -> ~gi.repository.Gtk.SortType Returns the primary sort order. The primary sort order determines whether the triangle displayed in the column view header of the primary sort column points upwards or downwards. If there is no primary sort column, then this function returns ``GTK_SORT_ASCENDING``. .. versionadded:: 4.10 Properties ---------- .. rst-class:: interim-class .. class:: ColumnViewSorter :no-index: .. attribute:: props.primary_sort_column :type: ~gi.repository.Gtk.ColumnViewColumn The primary sort column. The primary sort column is the one that displays the triangle in a column view header. .. versionadded:: 4.10 .. attribute:: props.primary_sort_order :type: ~gi.repository.Gtk.SortType The primary sort order. The primary sort order determines whether the triangle displayed in the column view header of the primary sort column points upwards or downwards. .. versionadded:: 4.10