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

@@ -116,12 +116,12 @@ void RimFishbonesCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiO
firstAncestorOrThisOfType( wellPath );
if ( wellPath )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
m_startMD.uiCapability()->setUiName( "Start MD [m]" );
m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [m]" );
}
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD )
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
m_startMD.uiCapability()->setUiName( "Start MD [ft]" );
m_mainBoreDiameter.uiCapability()->setUiName( "Main Bore Diameter [ft]" );
@@ -287,11 +287,13 @@ double RimFishbonesCollection::mainBoreDiameter( RiaEclipseUnitTools::UnitSystem
{
RimWellPath* wellPath;
firstAncestorOrThisOfTypeAsserted( wellPath );
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_FIELD && unitSystem == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD &&
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
return RiaEclipseUnitTools::feetToMeter( m_mainBoreDiameter() );
}
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC && unitSystem == RiaEclipseUnitTools::UNITS_FIELD )
else if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC &&
unitSystem == RiaEclipseUnitTools::UnitSystem::UNITS_FIELD )
{
return RiaEclipseUnitTools::meterToFeet( m_mainBoreDiameter() );
}
@@ -307,7 +309,7 @@ void RimFishbonesCollection::setUnitSystemSpecificDefaults()
firstAncestorOrThisOfType( wellPath );
if ( wellPath )
{
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UNITS_METRIC )
if ( wellPath->unitSystem() == RiaEclipseUnitTools::UnitSystem::UNITS_METRIC )
{
m_mainBoreDiameter = 0.216;
}