mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Convert to enum class
This commit is contained in:
@@ -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]" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user