OGS
anonymous_namespace{ElementTreeModel.cpp} Namespace Reference

Functions

template<typename PropertyType>
QList< QVariant > propertyBounds (PropertyType const &property)

Function Documentation

◆ propertyBounds()

template<typename PropertyType>
QList< QVariant > anonymous_namespace{ElementTreeModel.cpp}::propertyBounds ( PropertyType const & property)

Definition at line 17 of file ElementTreeModel.cpp.

18{
19 auto const bounds = MeshToolsLib::MeshInformation::getValueBounds(property);
20 if (bounds.has_value())
21 {
22 return {"[" + QString::number(bounds->first) + ",",
23 QString::number(bounds->second) + "]"};
24 }
25 // Makeup the same structure of output as in the valid case above.
26 return {"[empty,", "empty]"};
27}
static std::optional< std::pair< T, T > > const getValueBounds(MeshLib::PropertyVector< T > const &property)

References MeshToolsLib::MeshInformation::getValueBounds().