Convert to enum class

This commit is contained in:
Magne Sjaastad
2020-04-24 07:13:33 +02:00
parent 83914006fd
commit f89dcf4e52
63 changed files with 513 additions and 450 deletions

View File

@@ -1957,22 +1957,26 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
const std::vector<int>& visibleCategories =
cellResultsData->uniqueCellScalarValues( this->eclipseResultAddress() );
std::vector<RiaDefines::WellPathComponentType> supportedCompletionTypes = {RiaDefines::WELL_PATH,
RiaDefines::FISHBONES,
RiaDefines::PERFORATION_INTERVAL,
RiaDefines::FRACTURE};
std::vector<RiaDefines::WellPathComponentType> supportedCompletionTypes =
{RiaDefines::WellPathComponentType::WELL_PATH,
RiaDefines::WellPathComponentType::FISHBONES,
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL,
RiaDefines::WellPathComponentType::FRACTURE};
RiaColorTables::WellPathComponentColors colors = RiaColorTables::wellPathComponentColors();
std::vector<std::tuple<QString, int, cvf::Color3ub>> categories;
for ( auto completionType : supportedCompletionTypes )
{
if ( std::find( visibleCategories.begin(), visibleCategories.end(), completionType ) !=
visibleCategories.end() )
if ( std::find( visibleCategories.begin(),
visibleCategories.end(),
static_cast<int>( completionType ) ) != visibleCategories.end() )
{
QString categoryText =
caf::AppEnum<RiaDefines::WellPathComponentType>::uiText( completionType );
categories.push_back( std::make_tuple( categoryText, completionType, colors[completionType] ) );
categories.push_back( std::make_tuple( categoryText,
static_cast<int>( completionType ),
colors[completionType] ) );
}
}