SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
openswmmvis::ui::NumericTableWidgetItem Class Reference

#include <numerictablewidgetitem.h>

Inheritance diagram for openswmmvis::ui::NumericTableWidgetItem:
Collaboration diagram for openswmmvis::ui::NumericTableWidgetItem:

Public Member Functions

bool operator< (const QTableWidgetItem &other) const override
 Sort finite numeric keys before unavailable/text values while preserving formatted display text.
 

Static Public Attributes

static constexpr int SortKeyRole = Qt::UserRole + 1
 

Member Function Documentation

◆ operator<()

bool openswmmvis::ui::NumericTableWidgetItem::operator< ( const QTableWidgetItem &  other) const
inlineoverride

Sort finite numeric keys before unavailable/text values while preserving formatted display text.

Parameters
[in]otherCompared table item. Each side uses SortKeyRole when valid, otherwise text() converted through QVariant::toDouble().
Returns
Numeric less-than when both are finite, true when only this side is numeric, or the base QTableWidgetItem comparison when neither converts. An invalid numeric explicit key does not fall back to text.

Member Data Documentation

◆ SortKeyRole

constexpr int openswmmvis::ui::NumericTableWidgetItem::SortKeyRole = Qt::UserRole + 1
staticconstexpr

The documentation for this class was generated from the following file: