Skip to content

Implement ValueTupleItem to hold and sort table items which include a stdev. or quality measure

Ammar Nejati requested to merge correctSortIndexerTable_90 into develop

ValueTupleItem is a QStandardItem which holds a floating-point value and its standard deviation or quality measure. The sorting mechanism is taylored to sort according the value and then (if the values are equal) the std. devs. or quality measures.

Sorting is based on the stored numerical values, not the textual representation.

  • Sorting examples:
ValueTupleItem("1.2(3)", 1.238, 3e-3) < ValueTupleItem("1.0(3)", 1.01, 3e-3)
ValueTupleItem("1.2(3)", 1.238, 3e-3) < ValueTupleItem("1.2(3)", 1.240, 3e-3)
ValueTupleItem("1.2(3)", 1.238, 3e-3) < ValueTupleItem("1.2(4)", 1.238, 4e-3)

See the Qt documentation for QStandardItem::operator<.

Resolves issue #90 (closed)

Edited by Ammar Nejati

Merge request reports