NumericSorter
- Constructors:
NumericSorter(**properties)
new(expression:Gtk.Expression=None) -> Gtk.NumericSorter
Constructors
- class NumericSorter
- classmethod new(expression: Expression | None = None) NumericSorter
Creates a new numeric sorter using the given
expression
.Smaller numbers will be sorted first. You can call
set_sort_order
to change this.- Parameters:
expression – The expression to evaluate
Methods
- class NumericSorter
- get_expression() Expression | None
Gets the expression that is evaluated to obtain numbers from items.
- set_expression(expression: Expression | None = None) None
Sets the expression that is evaluated to obtain numbers from items.
Unless an expression is set on
self
, the sorter will always compare items as invalid.The expression must have a return type that can be compared numerically, such as
int
orfloat
.- Parameters:
expression – a
GtkExpression
Properties
- class NumericSorter
- props.expression: Expression
The expression to evaluate on items to get a number to compare with.