Convert to enum class

This commit is contained in:
Magne Sjaastad
2020-04-24 08:10:48 +02:00
parent e85c36b4a4
commit 95fc63fe7c
76 changed files with 363 additions and 333 deletions

View File

@@ -49,9 +49,9 @@ double RimFishbonesPipeProperties::holeDiameter( RiaEclipseUnitTools::UnitSystem
{
RimWellPath* wellPath;
firstAncestorOrThisOfTypeAsserted( wellPath );
if ( unitSystem == RiaEclipseUnitTools::UNITS_METRIC )
if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
return RiaEclipseUnitTools::inchToMeter( m_lateralHoleDiameter() );
}
@@ -60,9 +60,9 @@ double RimFishbonesPipeProperties::holeDiameter( RiaEclipseUnitTools::UnitSystem
return m_lateralHoleDiameter() / 1000;
}
}
else if ( unitSystem == RiaEclipseUnitTools::UNITS_FIELD )
else if ( unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
return RiaEclipseUnitTools::meterToFeet( m_lateralHoleDiameter() / 1000 );
}
@@ -84,11 +84,11 @@ void RimFishbonesPipeProperties::setUnitSystemSpecificDefaults()
firstAncestorOrThisOfType( wellPath );
if ( wellPath )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
m_lateralHoleDiameter = 12.5;
}
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD )
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
m_lateralHoleDiameter = 0.5;
}
@@ -105,11 +105,11 @@ void RimFishbonesPipeProperties::defineUiOrdering( QString uiConfigName, caf::Pd
firstAncestorOrThisOfType( wellPath );
if ( wellPath )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
m_lateralHoleDiameter.uiCapability()->setUiName( "Hole Diameter [mm]" );
}
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD )
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
m_lateralHoleDiameter.uiCapability()->setUiName( "Hole Diameter [in]" );
}