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 28 of file ElementTreeModel.cpp.

29{
30 auto const bounds = MeshToolsLib::MeshInformation::getValueBounds(property);
31 if (bounds.has_value())
32 {
33 return {"[" + QString::number(bounds->first) + ",",
34 QString::number(bounds->second) + "]"};
35 }
36 // Makeup the same structure of output as in the valid case above.
37 return {"[empty,", "empty]"};
38}
static std::optional< std::pair< T, T > > const getValueBounds(MeshLib::PropertyVector< T > const &property)

References MeshToolsLib::MeshInformation::getValueBounds().