From f89dcf4e52a7d1108929266a2e2b99ca996d7c1b Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Fri, 24 Apr 2020 07:13:33 +0200 Subject: [PATCH] Convert to enum class --- .../Application/RiaApplication.cpp | 6 +- ApplicationCode/Application/RiaDefines.cpp | 66 +++++++++---------- ApplicationCode/Application/RiaDefines.h | 16 ++--- .../Application/RiaPreferences.cpp | 8 +-- .../Application/Tools/RiaColorTables.cpp | 22 +++---- .../Application/Tools/RiaEclipseUnitTools.cpp | 10 +-- .../Application/Tools/RiaWellLogUnitTools.inl | 58 ++++++++-------- .../RicMswValveAccumulators.cpp | 5 +- .../RicWellPathExportMswCompletionsImpl.cpp | 18 ++--- .../RicPlotProductionRateFeature.cpp | 6 +- .../RicSummaryCurveSwitchAxisFeature.cpp | 18 ++--- .../RicNewWellBoreStabilityPlotFeature.cpp | 2 +- .../RifEclipseOutputFileTools.cpp | 6 +- .../RivWellFracturePartMgr.cpp | 2 +- .../ModelVisualization/RivWellPathPartMgr.cpp | 11 ++-- .../AnalysisPlots/RimAnalysisPlot.cpp | 48 +++++++------- .../RimCompletionCellIntersectionCalc.cpp | 36 +++++----- .../Completions/RimFishbonesMultipleSubs.cpp | 4 +- .../Completions/RimFracture.cpp | 2 +- .../Completions/RimPerforationInterval.cpp | 2 +- .../Completions/RimValveTemplate.cpp | 19 +++--- .../RimValveTemplateCollection.cpp | 6 +- .../Completions/RimWellPathValve.cpp | 42 ++++++------ .../Flow/RimWellAllocationPlot.cpp | 22 ++++--- .../Flow/RimWellDistributionPlot.cpp | 6 +- .../Flow/RimWellDistributionPlot.h | 2 +- .../RimWellDistributionPlotCollection.cpp | 6 +- .../Flow/RimWellFlowRateCurve.cpp | 8 +-- .../ProjectDataModel/Flow/RimWellPltPlot.cpp | 14 ++-- .../ProjectDataModel/Flow/RimWellRftPlot.cpp | 8 +-- .../GridCrossPlots/RimGridCrossPlot.cpp | 20 +++--- .../ProjectDataModel/Rim3dView.cpp | 14 ++-- .../ProjectDataModel/Rim3dWellLogRftCurve.cpp | 2 +- .../ProjectDataModel/RimDepthTrackPlot.cpp | 30 +++++---- .../RimEclipseContourMapView.cpp | 2 +- .../RimEclipsePropertyFilter.cpp | 14 ++-- .../RimEclipseResultDefinition.cpp | 18 +++-- .../RimGeoMechContourMapView.cpp | 2 +- .../RimGridTimeHistoryCurve.cpp | 4 +- .../ProjectDataModel/RimGridView.cpp | 8 +-- .../ProjectDataModel/RimMultiPlot.cpp | 4 +- .../RimPlotAxisProperties.cpp | 6 +- .../RimWellBoreStabilityPlot.cpp | 2 +- .../ProjectDataModel/RimWellLogCurve.cpp | 6 +- .../RimWellLogCurveCommonDataSource.cpp | 10 +-- .../RimWellLogExtractionCurve.cpp | 9 +-- .../ProjectDataModel/RimWellLogFileCurve.cpp | 10 +-- .../ProjectDataModel/RimWellLogRftCurve.cpp | 15 +++-- .../ProjectDataModel/RimWellLogTrack.cpp | 57 ++++++++-------- .../RimWellMeasurementCurve.cpp | 10 +-- .../ProjectDataModel/RimWellPath.cpp | 2 +- .../ProjectDataModel/RimWellPathAttribute.cpp | 26 ++++---- .../Summary/RimAsciiDataCurve.cpp | 2 +- .../Summary/RimSummaryCurve.cpp | 2 +- .../Summary/RimSummaryPlot.cpp | 38 +++++------ .../Summary/RimSummaryPlotAxisFormatter.cpp | 2 +- .../RigCaseCellResultsData.cpp | 4 +- .../ReservoirDataModel/RigLasFileExporter.cpp | 42 +++++++----- .../RigTofWellDistributionCalculator.cpp | 6 +- .../RigWellLogCurveData.cpp | 50 ++++++++------ .../ReservoirDataModel/RigWellLogFile.cpp | 10 +-- .../RigWellPathFormations.cpp | 16 ++--- .../RiuWellPathComponentPlotItem.cpp | 41 ++++++------ 63 files changed, 513 insertions(+), 450 deletions(-) diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index b030a1f372..db2090e37c 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -1208,9 +1208,9 @@ void RiaApplication::applyPreferences() // instead of using the application font std::map fontSizes = m_preferences->defaultFontSizes(); - m_defaultSceneFont = RiaFontCache::getFont( fontSizes[RiaDefines::SCENE_FONT] ); - m_defaultAnnotationFont = RiaFontCache::getFont( fontSizes[RiaDefines::ANNOTATION_FONT] ); - m_defaultWellLabelFont = RiaFontCache::getFont( fontSizes[RiaDefines::WELL_LABEL_FONT] ); + m_defaultSceneFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::SCENE_FONT] ); + m_defaultAnnotationFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::ANNOTATION_FONT] ); + m_defaultWellLabelFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::WELL_LABEL_FONT] ); if ( this->project() ) { diff --git a/ApplicationCode/Application/RiaDefines.cpp b/ApplicationCode/Application/RiaDefines.cpp index 29f124d129..f2cb980872 100644 --- a/ApplicationCode/Application/RiaDefines.cpp +++ b/ApplicationCode/Application/RiaDefines.cpp @@ -42,66 +42,66 @@ void caf::AppEnum::setUp() template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::UNIT_METER, "UNIT_METER", "Meter" ); - addItem( RiaDefines::UNIT_FEET, "UNIT_FEET", "Feet" ); - addItem( RiaDefines::UNIT_NONE, "UNIT_NONE", "None" ); + addItem( RiaDefines::DepthUnitType::UNIT_METER, "UNIT_METER", "Meter" ); + addItem( RiaDefines::DepthUnitType::UNIT_FEET, "UNIT_FEET", "Feet" ); + addItem( RiaDefines::DepthUnitType::UNIT_NONE, "UNIT_NONE", "None" ); - setDefault( RiaDefines::UNIT_METER ); + setDefault( RiaDefines::DepthUnitType::UNIT_METER ); } template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth" ); - addItem( RiaDefines::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth (MSL)" ); - addItem( RiaDefines::PSEUDO_LENGTH, "PSEUDO_LENGTH", "Pseudo Length" ); - addItem( RiaDefines::CONNECTION_NUMBER, "CONNECTION_NUMBER", "Connection Number" ); - addItem( RiaDefines::TRUE_VERTICAL_DEPTH_RKB, "TRUE_VERTICAL_DEPTH_RKB", "True Vertical Depth (RKB)" ); - setDefault( RiaDefines::MEASURED_DEPTH ); + addItem( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth" ); + addItem( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth (MSL)" ); + addItem( RiaDefines::DepthTypeEnum::PSEUDO_LENGTH, "PSEUDO_LENGTH", "Pseudo Length" ); + addItem( RiaDefines::DepthTypeEnum::CONNECTION_NUMBER, "CONNECTION_NUMBER", "Connection Number" ); + addItem( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, "TRUE_VERTICAL_DEPTH_RKB", "True Vertical Depth (RKB)" ); + setDefault( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ); } template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::PLOT_AXIS_LEFT, "PLOT_AXIS_LEFT", "Left" ); - addItem( RiaDefines::PLOT_AXIS_RIGHT, "PLOT_AXIS_RIGHT", "Right" ); + addItem( RiaDefines::PlotAxis::PLOT_AXIS_LEFT, "PLOT_AXIS_LEFT", "Left" ); + addItem( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT, "PLOT_AXIS_RIGHT", "Right" ); - setDefault( RiaDefines::PLOT_AXIS_LEFT ); + setDefault( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); } template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::OIL_PHASE, "OIL_PHASE", "Oil" ); - addItem( RiaDefines::GAS_PHASE, "GAS_PHASE", "Gas" ); - addItem( RiaDefines::WATER_PHASE, "WATER_PHASE", "Water" ); - setDefault( RiaDefines::OIL_PHASE ); + addItem( RiaDefines::PhaseType::OIL_PHASE, "OIL_PHASE", "Oil" ); + addItem( RiaDefines::PhaseType::GAS_PHASE, "GAS_PHASE", "Gas" ); + addItem( RiaDefines::PhaseType::WATER_PHASE, "WATER_PHASE", "Water" ); + setDefault( RiaDefines::PhaseType::OIL_PHASE ); } template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::WELL_PATH, "WELL_PATH", "Well Path" ); - addItem( RiaDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval" ); - addItem( RiaDefines::FISHBONES, "FISHBONES", "Fishbones" ); - addItem( RiaDefines::FRACTURE, "FRACTURE", "Fracture" ); - addItem( RiaDefines::ICD, "ICD", "ICD" ); - addItem( RiaDefines::AICD, "AICD", "AICD" ); - addItem( RiaDefines::ICV, "ICV", "ICV" ); - addItem( RiaDefines::CASING, "CASING", "Casing" ); - addItem( RiaDefines::LINER, "LINER", "Liner" ); - addItem( RiaDefines::PACKER, "PACKER", "Packer" ); - addItem( RiaDefines::UNDEFINED_COMPONENT, "UNDEFINED", "Undefined Component" ); - setDefault( RiaDefines::WELL_PATH ); + addItem( RiaDefines::WellPathComponentType::WELL_PATH, "WELL_PATH", "Well Path" ); + addItem( RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval" ); + addItem( RiaDefines::WellPathComponentType::FISHBONES, "FISHBONES", "Fishbones" ); + addItem( RiaDefines::WellPathComponentType::FRACTURE, "FRACTURE", "Fracture" ); + addItem( RiaDefines::WellPathComponentType::ICD, "ICD", "ICD" ); + addItem( RiaDefines::WellPathComponentType::AICD, "AICD", "AICD" ); + addItem( RiaDefines::WellPathComponentType::ICV, "ICV", "ICV" ); + addItem( RiaDefines::WellPathComponentType::CASING, "CASING", "Casing" ); + addItem( RiaDefines::WellPathComponentType::LINER, "LINER", "Liner" ); + addItem( RiaDefines::WellPathComponentType::PACKER, "PACKER", "Packer" ); + addItem( RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT, "UNDEFINED", "Undefined Component" ); + setDefault( RiaDefines::WellPathComponentType::WELL_PATH ); } template <> void caf::AppEnum::setUp() { - addItem( RiaDefines::FULL_MESH, "FULL_MESH", "All" ); - addItem( RiaDefines::FAULTS_MESH, "FAULTS_MESH", "Faults only" ); - addItem( RiaDefines::NO_MESH, "NO_MESH", "None" ); - setDefault( RiaDefines::FULL_MESH ); + addItem( RiaDefines::MeshModeType::FULL_MESH, "FULL_MESH", "All" ); + addItem( RiaDefines::MeshModeType::FAULTS_MESH, "FAULTS_MESH", "Faults only" ); + addItem( RiaDefines::MeshModeType::NO_MESH, "NO_MESH", "None" ); + setDefault( RiaDefines::MeshModeType::FULL_MESH ); } } // namespace caf diff --git a/ApplicationCode/Application/RiaDefines.h b/ApplicationCode/Application/RiaDefines.h index b3f9fa1fb2..8a717201ef 100644 --- a/ApplicationCode/Application/RiaDefines.h +++ b/ApplicationCode/Application/RiaDefines.h @@ -43,7 +43,7 @@ enum class ResultCatType // WARNING: DO NOT CHANGE THE ORDER WITHOUT KNOWING WHAT YOU ARE DOING! // You may well change the behaviour of property filters. -enum WellPathComponentType +enum class WellPathComponentType { // Production Tube WELL_PATH, @@ -61,7 +61,7 @@ enum WellPathComponentType UNDEFINED_COMPONENT }; -enum MeshModeType +enum class MeshModeType { FULL_MESH, FAULTS_MESH, @@ -133,7 +133,7 @@ std::vector wbsAngleResultNames(); std::vector wbsDerivedResultNames(); // Units and conversions -enum DepthUnitType +enum class DepthUnitType { UNIT_METER, UNIT_FEET, @@ -141,7 +141,7 @@ enum DepthUnitType }; // Depth types used for well log plots -enum DepthTypeEnum +enum class DepthTypeEnum { MEASURED_DEPTH, TRUE_VERTICAL_DEPTH, @@ -151,7 +151,7 @@ enum DepthTypeEnum }; // Defines relate to plotting -enum PlotAxis +enum class PlotAxis { PLOT_AXIS_LEFT, PLOT_AXIS_RIGHT, @@ -162,7 +162,7 @@ double minimumDefaultValuePlot(); double minimumDefaultLogValuePlot(); double maximumDefaultValuePlot(); -enum PhaseType +enum class PhaseType { OIL_PHASE, GAS_PHASE, @@ -186,7 +186,7 @@ enum ImportFileType ImportFileType obtainFileTypeFromFileName( const QString& fileName ); QString defaultDirectoryLabel( ImportFileType fileTypes ); -enum CaseType +enum class CaseType { UNDEFINED_CASE = -1, ECLIPSE_RESULT_CASE = 1, @@ -196,7 +196,7 @@ enum CaseType GEOMECH_ODB_CASE = 5 }; -enum FontSettingType +enum class FontSettingType { SCENE_FONT, ANNOTATION_FONT, diff --git a/ApplicationCode/Application/RiaPreferences.cpp b/ApplicationCode/Application/RiaPreferences.cpp index 27ab92373e..d0a76680ca 100644 --- a/ApplicationCode/Application/RiaPreferences.cpp +++ b/ApplicationCode/Application/RiaPreferences.cpp @@ -995,10 +995,10 @@ bool RiaPreferences::openExportedPdfInViewer() const std::map RiaPreferences::defaultFontSizes() const { std::map fontSizes; - fontSizes[RiaDefines::SCENE_FONT] = defaultSceneFontSize(); - fontSizes[RiaDefines::ANNOTATION_FONT] = defaultAnnotationFontSize(); - fontSizes[RiaDefines::WELL_LABEL_FONT] = defaultWellLabelFontSize(); - fontSizes[RiaDefines::PLOT_FONT] = defaultPlotFontSize(); + fontSizes[RiaDefines::FontSettingType::SCENE_FONT] = defaultSceneFontSize(); + fontSizes[RiaDefines::FontSettingType::ANNOTATION_FONT] = defaultAnnotationFontSize(); + fontSizes[RiaDefines::FontSettingType::WELL_LABEL_FONT] = defaultWellLabelFontSize(); + fontSizes[RiaDefines::FontSettingType::PLOT_FONT] = defaultPlotFontSize(); return fontSizes; } diff --git a/ApplicationCode/Application/Tools/RiaColorTables.cpp b/ApplicationCode/Application/Tools/RiaColorTables.cpp index 29d7789391..8f6754a8fb 100644 --- a/ApplicationCode/Application/Tools/RiaColorTables.cpp +++ b/ApplicationCode/Application/Tools/RiaColorTables.cpp @@ -511,17 +511,17 @@ cvf::Color3f RiaColorTables::undefinedCellColor() //-------------------------------------------------------------------------------------------------- RiaColorTables::WellPathComponentColors RiaColorTables::wellPathComponentColors() { - return {{RiaDefines::WELL_PATH, cvf::Color3::CEETRON}, - {RiaDefines::PERFORATION_INTERVAL, cvf::Color3::DARK_MAGENTA}, - {RiaDefines::FISHBONES, cvf::Color3::DARK_GREEN}, - {RiaDefines::FRACTURE, cvf::Color3::CRIMSON}, - {RiaDefines::ICD, cvf::Color3::DARK_ORANGE}, - {RiaDefines::AICD, cvf::Color3::INDIGO}, - {RiaDefines::ICV, cvf::Color3::ORCHID}, - {RiaDefines::CASING, cvf::Color3::SEA_GREEN}, - {RiaDefines::LINER, cvf::Color3::OLIVE}, - {RiaDefines::PACKER, cvf::Color3::GRAY}, - {RiaDefines::UNDEFINED_COMPONENT, cvf::Color3::MAGENTA}}; + return {{RiaDefines::WellPathComponentType::WELL_PATH, cvf::Color3::CEETRON}, + {RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, cvf::Color3::DARK_MAGENTA}, + {RiaDefines::WellPathComponentType::FISHBONES, cvf::Color3::DARK_GREEN}, + {RiaDefines::WellPathComponentType::FRACTURE, cvf::Color3::CRIMSON}, + {RiaDefines::WellPathComponentType::ICD, cvf::Color3::DARK_ORANGE}, + {RiaDefines::WellPathComponentType::AICD, cvf::Color3::INDIGO}, + {RiaDefines::WellPathComponentType::ICV, cvf::Color3::ORCHID}, + {RiaDefines::WellPathComponentType::CASING, cvf::Color3::SEA_GREEN}, + {RiaDefines::WellPathComponentType::LINER, cvf::Color3::OLIVE}, + {RiaDefines::WellPathComponentType::PACKER, cvf::Color3::GRAY}, + {RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT, cvf::Color3::MAGENTA}}; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/Application/Tools/RiaEclipseUnitTools.cpp b/ApplicationCode/Application/Tools/RiaEclipseUnitTools.cpp index e7cae68593..913322202b 100644 --- a/ApplicationCode/Application/Tools/RiaEclipseUnitTools.cpp +++ b/ApplicationCode/Application/Tools/RiaEclipseUnitTools.cpp @@ -67,19 +67,19 @@ RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit( UnitSystem unit ) switch ( unit ) { case RiaEclipseUnitTools::UNITS_METRIC: - return RiaDefines::UNIT_METER; + return RiaDefines::DepthUnitType::UNIT_METER; break; case RiaEclipseUnitTools::UNITS_FIELD: - return RiaDefines::UNIT_FEET; + return RiaDefines::DepthUnitType::UNIT_FEET; break; case RiaEclipseUnitTools::UNITS_LAB: - return RiaDefines::UNIT_NONE; + return RiaDefines::DepthUnitType::UNIT_NONE; break; case RiaEclipseUnitTools::UNITS_UNKNOWN: - return RiaDefines::UNIT_NONE; + return RiaDefines::DepthUnitType::UNIT_NONE; break; default: - return RiaDefines::UNIT_NONE; + return RiaDefines::DepthUnitType::UNIT_NONE; break; } } diff --git a/ApplicationCode/Application/Tools/RiaWellLogUnitTools.inl b/ApplicationCode/Application/Tools/RiaWellLogUnitTools.inl index 94f8b12830..2fb7e4291a 100644 --- a/ApplicationCode/Application/Tools/RiaWellLogUnitTools.inl +++ b/ApplicationCode/Application/Tools/RiaWellLogUnitTools.inl @@ -22,14 +22,13 @@ #include - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- template const FloatType RiaWellLogUnitTools::gravityAcceleration() { - return (FloatType) 9.81; + return (FloatType)9.81; } //-------------------------------------------------------------------------------------------------- @@ -136,14 +135,14 @@ QString RiaWellLogUnitTools::pascalUnitStringShort() //-------------------------------------------------------------------------------------------------- template std::vector RiaWellLogUnitTools::convertDepths( const std::vector& depthsIn, - RiaDefines::DepthUnitType unitsIn, - RiaDefines::DepthUnitType unitsOut ) + RiaDefines::DepthUnitType unitsIn, + RiaDefines::DepthUnitType unitsOut ) { - if ( unitsOut == RiaDefines::UNIT_METER && unitsIn == RiaDefines::UNIT_FEET ) + if ( unitsOut == RiaDefines::DepthUnitType::UNIT_METER && unitsIn == RiaDefines::DepthUnitType::UNIT_FEET ) { return multiply( depthsIn, RiaEclipseUnitTools::feetPerMeter() ); } - else if ( unitsOut == RiaDefines::UNIT_FEET && unitsIn == RiaDefines::UNIT_METER ) + else if ( unitsOut == RiaDefines::DepthUnitType::UNIT_FEET && unitsIn == RiaDefines::DepthUnitType::UNIT_METER ) { return multiply( depthsIn, RiaEclipseUnitTools::meterPerFeet() ); } @@ -155,10 +154,10 @@ std::vector RiaWellLogUnitTools::convertDepths( const std: //-------------------------------------------------------------------------------------------------- template bool RiaWellLogUnitTools::convertValues( const std::vector& tvdRKBs, - const std::vector& valuesIn, - std::vector* valuesOut, - const QString& unitsIn, - const QString& unitsOut ) + const std::vector& valuesIn, + std::vector* valuesOut, + const QString& unitsIn, + const QString& unitsOut ) { CAF_ASSERT( valuesOut ); @@ -215,7 +214,7 @@ bool RiaWellLogUnitTools::convertValues( const std::vector } else if ( stringsMatch( unitsIn, barUnitString() ) && stringsMatch( unitsOut, barX100UnitString() ) ) { - *valuesOut = multiply( valuesIn, (FloatType) 0.01 ); + *valuesOut = multiply( valuesIn, (FloatType)0.01 ); return true; } else if ( ( stringsMatch( unitsIn, noUnitString() ) || stringsMatch( unitsIn, sg_emwUnitString() ) ) && @@ -230,12 +229,14 @@ bool RiaWellLogUnitTools::convertValues( const std::vector *valuesOut = convertBarToNormalizedByPP( tvdRKBs, valuesIn ); return true; } - else if ( (stringsMatch( unitsIn, pascalUnitString()) || stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) )) + else if ( ( stringsMatch( unitsIn, pascalUnitString() ) || + stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) ) ) { *valuesOut = multiply( valuesIn, 1.0 / pascalPerBar() ); return true; } - else if ( stringsMatch( unitsIn, barUnitString() ) && (stringsMatch( unitsIn, pascalUnitString()) || stringsMatch( unitsIn, pascalUnitString() )) ) + else if ( stringsMatch( unitsIn, barUnitString() ) && + ( stringsMatch( unitsIn, pascalUnitString() ) || stringsMatch( unitsIn, pascalUnitString() ) ) ) { *valuesOut = multiply( valuesIn, pascalPerBar() ); return true; @@ -248,9 +249,9 @@ bool RiaWellLogUnitTools::convertValues( const std::vector //-------------------------------------------------------------------------------------------------- template bool RiaWellLogUnitTools::convertValues( std::vector>* measuredDepthsAndValues, - const QString& unitsIn, - const QString& unitsOut, - const RigWellPath* wellPath ) + const QString& unitsIn, + const QString& unitsOut, + const RigWellPath* wellPath ) { CAF_ASSERT( measuredDepthsAndValues ); if ( unitsIn == unitsOut ) return true; @@ -282,7 +283,8 @@ bool RiaWellLogUnitTools::convertValues( std::vector -std::vector RiaWellLogUnitTools::tvdRKBs( const std::vector& measuredDepths, const RigWellPath* wellPath ) +std::vector + RiaWellLogUnitTools::tvdRKBs( const std::vector& measuredDepths, const RigWellPath* wellPath ) { std::vector tvdRKBs( measuredDepths.size(), 0.0 ); for ( size_t i = 0; i < measuredDepths.size(); ++i ) @@ -290,7 +292,7 @@ std::vector RiaWellLogUnitTools::tvdRKBs( const std::vecto cvf::Vec3d point = wellPath->interpolatedPointAlongWellPath( measuredDepths[i] ); tvdRKBs[i] = -point.z() + wellPath->rkbDiff(); } - return std::vector(tvdRKBs.begin(), tvdRKBs.end()); + return std::vector( tvdRKBs.begin(), tvdRKBs.end() ); } //-------------------------------------------------------------------------------------------------- @@ -298,7 +300,7 @@ std::vector RiaWellLogUnitTools::tvdRKBs( const std::vecto //-------------------------------------------------------------------------------------------------- template std::vector RiaWellLogUnitTools::convertGpcm3ToBar( const std::vector& tvdRKBs, - const std::vector& valuesInGpcm3 ) + const std::vector& valuesInGpcm3 ) { CAF_ASSERT( tvdRKBs.size() == valuesInGpcm3.size() ); @@ -325,7 +327,7 @@ std::vector RiaWellLogUnitTools::convertGpcm3ToBar( const //-------------------------------------------------------------------------------------------------- template std::vector RiaWellLogUnitTools::convertBarToGpcm3( const std::vector& tvdRKBs, - const std::vector& valuesInBar ) + const std::vector& valuesInBar ) { CAF_ASSERT( tvdRKBs.size() == valuesInBar.size() ); @@ -350,9 +352,10 @@ std::vector RiaWellLogUnitTools::convertBarToGpcm3( const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -template -std::vector RiaWellLogUnitTools::convertNormalizedByPPToBar( const std::vector& tvdRKBs, - const std::vector& normalizedValues ) +template +std::vector + RiaWellLogUnitTools::convertNormalizedByPPToBar( const std::vector& tvdRKBs, + const std::vector& normalizedValues ) { CAF_ASSERT( tvdRKBs.size() == normalizedValues.size() ); @@ -368,8 +371,9 @@ std::vector RiaWellLogUnitTools::convertNormalizedByPPToBa /// //-------------------------------------------------------------------------------------------------- template -std::vector RiaWellLogUnitTools::convertBarToNormalizedByPP( const std::vector& tvdRKBs, - const std::vector& valuesInBar ) +std::vector + RiaWellLogUnitTools::convertBarToNormalizedByPP( const std::vector& tvdRKBs, + const std::vector& valuesInBar ) { CAF_ASSERT( tvdRKBs.size() == valuesInBar.size() ); @@ -410,7 +414,7 @@ FloatType RiaWellLogUnitTools::pascalPerBar() template FloatType RiaWellLogUnitTools::MPaPerBar() { - return (FloatType) 1.0e-1; + return (FloatType)1.0e-1; } //-------------------------------------------------------------------------------------------------- @@ -419,5 +423,5 @@ FloatType RiaWellLogUnitTools::MPaPerBar() template FloatType RiaWellLogUnitTools::hydrostaticPorePressureBar( FloatType depth ) { - return (FloatType) 1.0 / pascalPerBar() * depth * unitWeightOfWater(); + return (FloatType)1.0 / pascalPerBar() * depth * unitWeightOfWater(); } diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicMswValveAccumulators.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicMswValveAccumulators.cpp index 294d5751d7..b350cd3a67 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicMswValveAccumulators.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicMswValveAccumulators.cpp @@ -41,7 +41,8 @@ bool RicMswICDAccumulator::accumulateValveParameters( const RimWellPathValve* we double contributionFraction ) { CVF_ASSERT( wellPathValve ); - if ( wellPathValve->componentType() == RiaDefines::ICV || wellPathValve->componentType() == RiaDefines::ICD ) + if ( wellPathValve->componentType() == RiaDefines::WellPathComponentType::ICV || + wellPathValve->componentType() == RiaDefines::WellPathComponentType::ICD ) { double icdOrificeRadius = wellPathValve->orificeDiameter( m_unitSystem ) / 2; double icdArea = icdOrificeRadius * icdOrificeRadius * cvf::PI_D; @@ -86,7 +87,7 @@ bool RicMswAICDAccumulator::accumulateValveParameters( const RimWellPathValve* w double contributionFraction ) { CVF_ASSERT( wellPathValve ); - if ( wellPathValve->componentType() == RiaDefines::AICD ) + if ( wellPathValve->componentType() == RiaDefines::WellPathComponentType::AICD ) { const RimWellPathAicdParameters* params = wellPathValve->aicdParameters(); if ( params->isValid() ) diff --git a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp index acc3ccec7b..7de4a3fd14 100644 --- a/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp +++ b/ApplicationCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp @@ -1302,7 +1302,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( if ( segment->startMD() <= valveMD && valveMD < segment->endMD() ) { - if ( valve->componentType() == RiaDefines::AICD ) + if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD ) { QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 ); @@ -1312,7 +1312,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( superAICD = std::make_shared( valveLabel, valve ); superAICD->addSubSegment( subSegment ); } - else if ( valve->componentType() == RiaDefines::ICD ) + else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD ) { QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 ); @@ -1322,7 +1322,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( superICD = std::make_shared( valveLabel, valve ); superICD->addSubSegment( subSegment ); } - else if ( valve->componentType() == RiaDefines::ICV ) + else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICV ) { QString valveLabel = QString( "ICV %1 at segment #%2" ).arg( valve->name() ).arg( nMainSegment + 2 ); @@ -1336,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( ICV->setArea( orificeRadius * orificeRadius * cvf::PI_D ); } } - else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) ) + else if ( overlap > 0.0 && + ( valve->componentType() == RiaDefines::WellPathComponentType::ICD && !superICD ) ) { QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 ); @@ -1345,7 +1346,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( superICD = std::make_shared( valveLabel, valve ); superICD->addSubSegment( subSegment ); } - else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) ) + else if ( overlap > 0.0 && + ( valve->componentType() == RiaDefines::WellPathComponentType::AICD && !superAICD ) ) { QString valveLabel = QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 ); @@ -1355,11 +1357,11 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions( superAICD->addSubSegment( subSegment ); } - if ( valve->componentType() == RiaDefines::AICD ) + if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD ) { totalAICDOverlap += overlap; } - else if ( valve->componentType() == RiaDefines::ICD ) + else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD ) { totalICDOverlap += overlap; } @@ -1516,7 +1518,7 @@ void RicWellPathExportMswCompletionsImpl::moveIntersectionsToICVs( for ( const RimWellPathValve* valve : perforationValves ) { if ( !valve->isChecked() ) continue; - if ( valve->componentType() != RiaDefines::ICV ) continue; + if ( valve->componentType() != RiaDefines::WellPathComponentType::ICV ) continue; auto icvIt = icvCompletionMap.find( valve ); if ( icvIt == icvCompletionMap.end() ) continue; diff --git a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp index 25bb021f72..737354a6fe 100644 --- a/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp +++ b/ApplicationCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -107,7 +107,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked ) { // Left Axis - RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_LEFT; + RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_LEFT; { // Note : The parameter "WOIR" is probably never-existing, but we check for existence before creating @@ -147,7 +147,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked ) { // Left Axis - RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_LEFT; + RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_LEFT; { // Oil @@ -186,7 +186,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked ) // Right Axis { - RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_RIGHT; + RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_RIGHT; { QString parameterName = "WTHP"; diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp index bb8affd10f..e1f6ddc5bc 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp @@ -58,13 +58,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked ) { RiaDefines::PlotAxis plotAxis = summaryCurve->axisY(); - if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { - summaryCurve->setLeftOrRightAxisY( RiaDefines::PLOT_AXIS_RIGHT ); + summaryCurve->setLeftOrRightAxisY( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); } else { - summaryCurve->setLeftOrRightAxisY( RiaDefines::PLOT_AXIS_LEFT ); + summaryCurve->setLeftOrRightAxisY( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); } summaryCurve->updateQwtPlotAxis(); @@ -79,13 +79,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked ) { RiaDefines::PlotAxis plotAxis = asciiCurve->yAxis(); - if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { - asciiCurve->setYAxis( RiaDefines::PLOT_AXIS_RIGHT ); + asciiCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); } else { - asciiCurve->setYAxis( RiaDefines::PLOT_AXIS_LEFT ); + asciiCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); } asciiCurve->updateQwtPlotAxis(); @@ -100,13 +100,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked ) { RiaDefines::PlotAxis plotAxis = timeHistoryCurve->yAxis(); - if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { - timeHistoryCurve->setYAxis( RiaDefines::PLOT_AXIS_RIGHT ); + timeHistoryCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); } else { - timeHistoryCurve->setYAxis( RiaDefines::PLOT_AXIS_LEFT ); + timeHistoryCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); } timeHistoryCurve->updateConnectedEditors(); diff --git a/ApplicationCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp b/ApplicationCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp index ce6c374372..25d295130e 100644 --- a/ApplicationCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp +++ b/ApplicationCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp @@ -112,7 +112,7 @@ RimWellBoreStabilityPlot* plot->setPlotTitleVisible( true ); plot->setLegendsVisible( true ); plot->setLegendsHorizontal( true ); - plot->setDepthType( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ); + plot->setDepthType( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ); plot->setAutoScaleDepthEnabled( true ); RicNewWellLogPlotFeatureImpl::updateAfterCreation( plot ); diff --git a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp index 8ba1dbb546..7b22042e53 100644 --- a/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp +++ b/ApplicationCode/FileInterface/RifEclipseOutputFileTools.cpp @@ -542,17 +542,17 @@ std::set RifEclipseOutputFileTools::findAvailablePhases( if ( phases & ECL_OIL_PHASE ) { - phaseTypes.insert( RiaDefines::OIL_PHASE ); + phaseTypes.insert( RiaDefines::PhaseType::OIL_PHASE ); } if ( phases & ECL_GAS_PHASE ) { - phaseTypes.insert( RiaDefines::GAS_PHASE ); + phaseTypes.insert( RiaDefines::PhaseType::GAS_PHASE ); } if ( phases & ECL_WATER_PHASE ) { - phaseTypes.insert( RiaDefines::WATER_PHASE ); + phaseTypes.insert( RiaDefines::PhaseType::WATER_PHASE ); } } } diff --git a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp index 04b472241c..d7ffade6c4 100644 --- a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp @@ -979,7 +979,7 @@ void RivWellFracturePartMgr::appendFracturePerforationLengthParts( const RimEcli RivPipeGeometryGenerator geoGenerator; geoGenerator.cylinderWithCenterLineParts( &parts, displayCoords, - RiaColorTables::wellPathComponentColors()[RiaDefines::PERFORATION_INTERVAL], + RiaColorTables::wellPathComponentColors()[RiaDefines::WellPathComponentType::PERFORATION_INTERVAL], perforationRadius ); for ( auto part : parts ) diff --git a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp index 1e6905f564..2f4718c1ca 100644 --- a/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellPathPartMgr.cpp @@ -184,7 +184,7 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel( cvf::ModelBasicList* { if ( attribute->isEnabled() ) { - if ( attribute->componentType() == RiaDefines::CASING ) + if ( attribute->componentType() == RiaDefines::WellPathComponentType::CASING ) { double wellPathRadius = this->wellPathRadius( characteristicCellSize, this->wellPathCollection() ); double endMD = attribute->endMD(); @@ -217,7 +217,7 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel( cvf::ModelBasicList* model->addPart( part.p() ); } } - else if ( attribute->componentType() == RiaDefines::PACKER ) + else if ( attribute->componentType() == RiaDefines::WellPathComponentType::PACKER ) { double wellPathRadius = this->wellPathRadius( characteristicCellSize, this->wellPathCollection() ); double startMD = attribute->startMD(); @@ -499,7 +499,7 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList* std::vector measuredDepthsRelativeToStartMD; std::vector radii; cvf::Color3f valveColor = valve->defaultComponentColor(); - if ( valve->componentType() == RiaDefines::ICV ) + if ( valve->componentType() == RiaDefines::WellPathComponentType::ICV ) { measuredDepthsRelativeToStartMD = {0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0}; radii = {wellPathRadius, @@ -530,7 +530,8 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList* model->addPart( part.p() ); } } - else if ( valve->componentType() == RiaDefines::ICD || valve->componentType() == RiaDefines::AICD ) + else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD || + valve->componentType() == RiaDefines::WellPathComponentType::AICD ) { std::vector valveLocations = valve->valveLocations(); for ( double startMD : valveLocations ) @@ -549,7 +550,7 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList* int nInners = 0; for ( int i = 1; i < size - 1; i += 2 ) { - if ( inner && valve->componentType() == RiaDefines::AICD && nInners > 0 ) + if ( inner && valve->componentType() == RiaDefines::WellPathComponentType::AICD && nInners > 0 ) { radii[i + 1] = radii[i] = wellPathRadius * 1.7; nInners = 0; diff --git a/ApplicationCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp b/ApplicationCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp index 46f23d95cd..22cc4f4fea 100644 --- a/ApplicationCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp +++ b/ApplicationCode/ProjectDataModel/AnalysisPlots/RimAnalysisPlot.cpp @@ -449,7 +449,7 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering { caf::PdmUiGroup* selVectorsGrp = uiOrdering.addNewGroup( "Selected Vectors" ); selVectorsGrp->add( &m_selectedVarsUiField ); - selVectorsGrp->add( &m_selectVariablesButtonField, { false } ); + selVectorsGrp->add( &m_selectVariablesButtonField, {false} ); QString vectorNames; if ( m_analyserOfSelectedCurveDefs ) @@ -471,14 +471,14 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering timeStepGrp->add( &m_addTimestepUiField ); timeStepGrp->add( &m_selectedTimeSteps ); - uiOrdering.add( &m_referenceCase, { true, 3, 2 } ); + uiOrdering.add( &m_referenceCase, {true, 3, 2} ); uiOrdering.add( &m_showPlotTitle ); - uiOrdering.add( &m_useAutoPlotTitle, { false } ); - uiOrdering.add( &m_description, { false } ); + uiOrdering.add( &m_useAutoPlotTitle, {false} ); + uiOrdering.add( &m_description, {false} ); m_description.uiCapability()->setUiReadOnly( m_useAutoPlotTitle() ); - uiOrdering.add( &m_barOrientation, { true, 3, 2 } ); + uiOrdering.add( &m_barOrientation, {true, 3, 2} ); caf::PdmUiGroup* sortGrp = uiOrdering.addNewGroup( "Sorting and Grouping" ); sortGrp->add( &m_majorGroupType ); @@ -486,7 +486,7 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering sortGrp->add( &m_minorGroupType ); sortGrp->add( &m_valueSortOperation ); sortGrp->add( &m_useTopBarsFilter ); - sortGrp->add( &m_maxBarCount, { false } ); + sortGrp->add( &m_maxBarCount, {false} ); m_maxBarCount.uiCapability()->setUiReadOnly( !m_useTopBarsFilter() ); caf::PdmUiGroup* legendGrp = uiOrdering.addNewGroup( "Legend" ); @@ -499,10 +499,10 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering caf::PdmUiGroup* barLabelGrp = uiOrdering.addNewGroup( "Bar Labels" ); barLabelGrp->add( &m_useBarText ); barLabelGrp->add( &m_useQuantityInBarText ); - barLabelGrp->add( &m_useSummaryItemInBarText, { false } ); + barLabelGrp->add( &m_useSummaryItemInBarText, {false} ); barLabelGrp->add( &m_useCaseInBarText ); - barLabelGrp->add( &m_useEnsembleInBarText, { false } ); - barLabelGrp->add( &m_useTimeStepInBarText, { true, 4, 1 } ); + barLabelGrp->add( &m_useEnsembleInBarText, {false} ); + barLabelGrp->add( &m_useTimeStepInBarText, {true, 4, 1} ); m_useQuantityInBarText.uiCapability()->setUiReadOnly( !m_useBarText ); m_useSummaryItemInBarText.uiCapability()->setUiReadOnly( !m_useBarText ); @@ -556,16 +556,16 @@ QList RimAnalysisPlot::calculateValueOptions( const caf: if ( fieldNeedingOptions == &m_addTimestepUiField ) { - options.push_back( { "None", QDateTime() } ); + options.push_back( {"None", QDateTime()} ); std::set timeStepUnion = allAvailableTimeSteps(); for ( time_t timeT : timeStepUnion ) { QDateTime dateTime = RiaQDateTimeTools::fromTime_t( timeT ); - QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { dateTime } ); + QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {dateTime} ); - options.push_back( { dateTime.toString( formatString ), dateTime } ); + options.push_back( {dateTime.toString( formatString ), dateTime} ); } } else if ( fieldNeedingOptions == &m_valueSortOperation ) @@ -588,7 +588,7 @@ QList RimAnalysisPlot::calculateValueOptions( const caf: { std::vector allSummaryCases = RiaApplication::instance()->project()->allSummaryCases(); - options.push_back( { "None", nullptr } ); + options.push_back( {"None", nullptr} ); for ( auto sumCase : allSummaryCases ) { @@ -599,7 +599,7 @@ QList RimAnalysisPlot::calculateValueOptions( const caf: displayName = caseColl->name() + "/" + displayName; } - options.push_back( { displayName, sumCase } ); + options.push_back( {displayName, sumCase} ); } } @@ -730,7 +730,7 @@ bool RimAnalysisPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType { bool anyChange = false; - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { for ( auto plotAxis : allPlotAxes() ) { @@ -1071,7 +1071,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, if ( filter->useAbsoluteValues() ) value = fabs( value ); bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N; - auto itIsInsertedPair = casesToKeepWithValue.insert( { sumCase, value } ); + auto itIsInsertedPair = casesToKeepWithValue.insert( {sumCase, value} ); if ( !itIsInsertedPair.second ) // Already exists in map { double& insertedValue = itIsInsertedPair.first->second; @@ -1165,7 +1165,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, if ( historyTimesteps.size() ) { selectedTimestepIndices = - RimAnalysisPlot::findTimestepIndices( { historyTimesteps.back() }, timesteps ); + RimAnalysisPlot::findTimestepIndices( {historyTimesteps.back()}, timesteps ); } } else if ( filter->consideredTimeStepsType() == RimPlotDataFilterItem::SELECT_TIMESTEP_RANGE ) @@ -1223,7 +1223,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, if ( filter->useAbsoluteValues() ) value = fabs( value ); bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N; - auto itIsInsertedPair = casesToKeepWithValue.insert( { sumCaseInEvaluation, value } ); + auto itIsInsertedPair = casesToKeepWithValue.insert( {sumCaseInEvaluation, value} ); if ( !itIsInsertedPair.second ) // Already exists in map { double& insertedValue = itIsInsertedPair.first->second; @@ -1277,7 +1277,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, if ( filter->useAbsoluteValues() ) value = fabs( value ); bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N; - auto itIsInsertedPair = sumItemsToKeepWithValue.insert( { sumItem, value } ); + auto itIsInsertedPair = sumItemsToKeepWithValue.insert( {sumItem, value} ); if ( !itIsInsertedPair.second ) // Already exists in map { double& insertedValue = itIsInsertedPair.first->second; @@ -1305,7 +1305,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, std::multimap valueSortedSumItems; for ( const auto& itemValPair : sumItemsToKeepWithValue ) { - valueSortedSumItems.insert( { itemValPair.second, itemValPair.first } ); + valueSortedSumItems.insert( {itemValPair.second, itemValPair.first} ); } if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N ) @@ -1336,7 +1336,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter, std::multimap valueSortedSumCases; for ( const auto& caseValPair : casesToKeepWithValue ) { - valueSortedSumCases.insert( { caseValPair.second, caseValPair.first } ); + valueSortedSumCases.insert( {caseValPair.second, caseValPair.first} ); } if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N ) @@ -1448,7 +1448,7 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui double sortValue = std::numeric_limits::infinity(); QDateTime dateTime = RiaQDateTimeTools::fromTime_t( timesteps[timestepIdx] ); - QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { dateTime } ); + QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {dateTime} ); QString timestepString = dateTime.toString( formatString ); @@ -1554,7 +1554,7 @@ void RimAnalysisPlot::updatePlotTitle() { if ( !autoTitle.isEmpty() ) autoTitle += " @ "; - QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { m_selectedTimeSteps()[0] } ); + QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {m_selectedTimeSteps()[0]} ); autoTitle += m_selectedTimeSteps()[0].toString( formatString ); } @@ -1629,7 +1629,7 @@ std::vector RimAnalysisPlot::curveDefinitionsWithEmbe //-------------------------------------------------------------------------------------------------- std::set RimAnalysisPlot::allPlotAxes() const { - return { m_valueAxisProperties }; + return {m_valueAxisProperties}; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp b/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp index 0b4a1b4759..e908aa65ec 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimCompletionCellIntersectionCalc.cpp @@ -43,13 +43,13 @@ std::vector fromCompletionData( const std::ve switch ( d.completionType() ) { case RigCompletionData::FRACTURE: - appCompletionTypes.push_back( RiaDefines::FRACTURE ); + appCompletionTypes.push_back( RiaDefines::WellPathComponentType::FRACTURE ); break; case RigCompletionData::PERFORATION: - appCompletionTypes.push_back( RiaDefines::PERFORATION_INTERVAL ); + appCompletionTypes.push_back( RiaDefines::WellPathComponentType::PERFORATION_INTERVAL ); break; case RigCompletionData::FISHBONES: - appCompletionTypes.push_back( RiaDefines::FISHBONES ); + appCompletionTypes.push_back( RiaDefines::WellPathComponentType::FISHBONES ); break; default: break; @@ -85,7 +85,8 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult( RimEclips for ( auto& intersection : intersectedCells ) { - completionTypeCellResult[intersection] = RiaDefines::WELL_PATH; + completionTypeCellResult[intersection] = + static_cast( RiaDefines::WellPathComponentType::WELL_PATH ); } auto completions = eclipseCase->computeAndGetVirtualPerforationTransmissibilities(); @@ -94,28 +95,31 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult( RimEclips for ( const auto& completionsForWell : completions->multipleCompletionsPerEclipseCell( wellPath, timeStep ) ) { - RiaDefines::WellPathComponentType appCompletionType = RiaDefines::WELL_PATH; + RiaDefines::WellPathComponentType appCompletionType = RiaDefines::WellPathComponentType::WELL_PATH; auto appCompletionTypes = fromCompletionData( completionsForWell.second ); - if ( std::find( appCompletionTypes.begin(), appCompletionTypes.end(), RiaDefines::FRACTURE ) != - appCompletionTypes.end() ) + if ( std::find( appCompletionTypes.begin(), + appCompletionTypes.end(), + RiaDefines::WellPathComponentType::FRACTURE ) != appCompletionTypes.end() ) { - appCompletionType = RiaDefines::FRACTURE; - } - else if ( std::find( appCompletionTypes.begin(), appCompletionTypes.end(), RiaDefines::FISHBONES ) != - appCompletionTypes.end() ) - { - appCompletionType = RiaDefines::FISHBONES; + appCompletionType = RiaDefines::WellPathComponentType::FRACTURE; } else if ( std::find( appCompletionTypes.begin(), appCompletionTypes.end(), - RiaDefines::PERFORATION_INTERVAL ) != appCompletionTypes.end() ) + RiaDefines::WellPathComponentType::FISHBONES ) != appCompletionTypes.end() ) { - appCompletionType = RiaDefines::PERFORATION_INTERVAL; + appCompletionType = RiaDefines::WellPathComponentType::FISHBONES; + } + else if ( std::find( appCompletionTypes.begin(), + appCompletionTypes.end(), + RiaDefines::WellPathComponentType::PERFORATION_INTERVAL ) != + appCompletionTypes.end() ) + { + appCompletionType = RiaDefines::WellPathComponentType::PERFORATION_INTERVAL; } - completionTypeCellResult[completionsForWell.first] = appCompletionType; + completionTypeCellResult[completionsForWell.first] = static_cast( appCompletionType ); } } } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp index c5b9e0adb7..bec7834efb 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFishbonesMultipleSubs.cpp @@ -74,7 +74,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs() m_name.uiCapability()->setUiReadOnly( true ); m_name.xmlCapability()->setIOWritable( false ); - cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::FISHBONES]; + cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::WellPathComponentType::FISHBONES]; CAF_PDM_InitField( &fishbonesColor, "Color", defaultColor, "Fishbones Color", "", "", "" ); CAF_PDM_InitField( &m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub", "", "", "" ); @@ -447,7 +447,7 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults() //-------------------------------------------------------------------------------------------------- RiaDefines::WellPathComponentType RimFishbonesMultipleSubs::componentType() const { - return RiaDefines::FISHBONES; + return RiaDefines::WellPathComponentType::FISHBONES; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp index ad17883ba1..d8a883d067 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimFracture.cpp @@ -324,7 +324,7 @@ void RimFracture::clearCachedNonDarcyProperties() //-------------------------------------------------------------------------------------------------- RiaDefines::WellPathComponentType RimFracture::componentType() const { - return RiaDefines::FRACTURE; + return RiaDefines::WellPathComponentType::FRACTURE; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp index ad449328ec..31a16cd081 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimPerforationInterval.cpp @@ -258,7 +258,7 @@ bool RimPerforationInterval::isEnabled() const //-------------------------------------------------------------------------------------------------- RiaDefines::WellPathComponentType RimPerforationInterval::componentType() const { - return RiaDefines::PERFORATION_INTERVAL; + return RiaDefines::WellPathComponentType::PERFORATION_INTERVAL; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Completions/RimValveTemplate.cpp b/ApplicationCode/ProjectDataModel/Completions/RimValveTemplate.cpp index 7564fb83ac..598ae9bdf9 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimValveTemplate.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimValveTemplate.cpp @@ -42,7 +42,7 @@ RimValveTemplate::RimValveTemplate() m_valveTemplateUnit.uiCapability()->setUiReadOnly( true ); CAF_PDM_InitFieldNoDefault( &m_type, "CompletionType", "Type", "", "", "" ); - m_type = RiaDefines::ICD; + m_type = RiaDefines::WellPathComponentType::ICD; CAF_PDM_InitField( &m_userLabel, "UserLabel", QString( "Template" ), "Name", "", "", "" ); this->setName( fullLabel() ); @@ -106,7 +106,8 @@ RiaDefines::WellPathComponentType RimValveTemplate::type() const //-------------------------------------------------------------------------------------------------- void RimValveTemplate::setType( RiaDefines::WellPathComponentType type ) { - CAF_ASSERT( type == RiaDefines::ICD || type == RiaDefines::AICD || RiaDefines::ICV ); + CAF_ASSERT( type == RiaDefines::WellPathComponentType::ICD || type == RiaDefines::WellPathComponentType::AICD || + type == RiaDefines::WellPathComponentType::ICV ); m_type = type; } @@ -178,7 +179,9 @@ QList RimValveTemplate::calculateValueOptions( const caf if ( fieldNeedingOptions == &m_type ) { - std::set supportedTypes = {RiaDefines::ICD, RiaDefines::AICD, RiaDefines::ICV}; + std::set supportedTypes = {RiaDefines::WellPathComponentType::ICD, + RiaDefines::WellPathComponentType::AICD, + RiaDefines::WellPathComponentType::ICV}; for ( RiaDefines::WellPathComponentType type : supportedTypes ) { options.push_back( caf::PdmOptionItemInfo( CompletionTypeEnum::uiText( type ), type ) ); @@ -195,7 +198,7 @@ void RimValveTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin uiOrdering.add( &m_type ); uiOrdering.add( &m_userLabel ); uiOrdering.add( &m_valveTemplateUnit ); - if ( m_type() == RiaDefines::ICV || m_type() == RiaDefines::ICD ) + if ( m_type() == RiaDefines::WellPathComponentType::ICV || m_type() == RiaDefines::WellPathComponentType::ICD ) { if ( m_valveTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC ) { @@ -207,7 +210,7 @@ void RimValveTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin } } - if ( m_type() == RiaDefines::ICV || m_type() == RiaDefines::ICD ) + if ( m_type() == RiaDefines::WellPathComponentType::ICV || m_type() == RiaDefines::WellPathComponentType::ICD ) { caf::PdmUiGroup* group = uiOrdering.addNewGroup( "MSW Valve Parameters" ); group->add( &m_orificeDiameter ); @@ -257,15 +260,15 @@ void RimValveTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedField void RimValveTemplate::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ ) { this->setName( fullLabel() ); - if ( m_type() == RiaDefines::ICV ) + if ( m_type() == RiaDefines::WellPathComponentType::ICV ) { this->setUiIconFromResourceString( ":/ICVValve16x16.png" ); } - else if ( m_type() == RiaDefines::ICD ) + else if ( m_type() == RiaDefines::WellPathComponentType::ICD ) { this->setUiIconFromResourceString( ":/ICDValve16x16.png" ); } - else if ( m_type() == RiaDefines::AICD ) + else if ( m_type() == RiaDefines::WellPathComponentType::AICD ) { this->setUiIconFromResourceString( ":/AICDValve16x16.png" ); } diff --git a/ApplicationCode/ProjectDataModel/Completions/RimValveTemplateCollection.cpp b/ApplicationCode/ProjectDataModel/Completions/RimValveTemplateCollection.cpp index cbc0b69e92..0372b5705a 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimValveTemplateCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimValveTemplateCollection.cpp @@ -108,15 +108,15 @@ void RimValveTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases() void RimValveTemplateCollection::addDefaultValveTemplates() { RimValveTemplate* aicd = new RimValveTemplate; - aicd->setType( RiaDefines::AICD ); + aicd->setType( RiaDefines::WellPathComponentType::AICD ); aicd->setUserLabel( "Valve Template #1" ); RimValveTemplate* icd = new RimValveTemplate; - icd->setType( RiaDefines::ICD ); + icd->setType( RiaDefines::WellPathComponentType::ICD ); icd->setUserLabel( "Valve Template #2" ); RimValveTemplate* icv = new RimValveTemplate; - icv->setType( RiaDefines::ICV ); + icv->setType( RiaDefines::WellPathComponentType::ICV ); icv->setUserLabel( "Valve Template #3" ); addValveTemplate( aicd ); diff --git a/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp b/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp index 53b28ea0c0..4e7ebed042 100644 --- a/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp +++ b/ApplicationCode/ProjectDataModel/Completions/RimWellPathValve.cpp @@ -76,7 +76,7 @@ RimWellPathValve::~RimWellPathValve() //-------------------------------------------------------------------------------------------------- void RimWellPathValve::perforationIntervalUpdated() { - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { const RimPerforationInterval* perfInterval = nullptr; this->firstAncestorOrThisOfType( perfInterval ); @@ -84,7 +84,8 @@ void RimWellPathValve::perforationIntervalUpdated() double endMD = perfInterval->endMD(); m_measuredDepth = cvf::Math::clamp( m_measuredDepth(), std::min( startMD, endMD ), std::max( startMD, endMD ) ); } - else if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::ICD || + componentType() == RiaDefines::WellPathComponentType::AICD ) { m_multipleValveLocations->perforationIntervalUpdated(); } @@ -121,11 +122,12 @@ void RimWellPathValve::multipleValveGeometryUpdated() std::vector RimWellPathValve::valveLocations() const { std::vector valveDepths; - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { valveDepths.push_back( m_measuredDepth ); } - else if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::ICD || + componentType() == RiaDefines::WellPathComponentType::AICD ) { valveDepths = m_multipleValveLocations->valveLocations(); } @@ -179,13 +181,13 @@ void RimWellPathValve::setValveTemplate( RimValveTemplate* valveTemplate ) //-------------------------------------------------------------------------------------------------- void RimWellPathValve::applyValveLabelAndIcon() { - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { this->setUiIconFromResourceString( ":/ICVValve16x16.png" ); QString fullName = QString( "%1: %2" ).arg( componentLabel() ).arg( m_measuredDepth() ); this->setName( fullName ); } - else if ( componentType() == RiaDefines::ICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::ICD ) { this->setUiIconFromResourceString( ":/ICDValve16x16.png" ); QString fullName = QString( "%1 %2: %3 - %4" ) @@ -195,7 +197,7 @@ void RimWellPathValve::applyValveLabelAndIcon() .arg( m_multipleValveLocations->rangeEnd() ); this->setName( fullName ); } - else if ( componentType() == RiaDefines::AICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::AICD ) { this->setUiIconFromResourceString( ":/AICDValve16x16.png" ); QString fullName = QString( "%1 %2: %3 - %4" ) @@ -307,7 +309,7 @@ RiaDefines::WellPathComponentType RimWellPathValve::componentType() const { return m_valveTemplate()->type(); } - return RiaDefines::UNDEFINED_COMPONENT; + return RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT; } //-------------------------------------------------------------------------------------------------- @@ -315,7 +317,7 @@ RiaDefines::WellPathComponentType RimWellPathValve::componentType() const //-------------------------------------------------------------------------------------------------- QString RimWellPathValve::componentLabel() const { - if ( componentType() == RiaDefines::ICD ) + if ( componentType() == RiaDefines::WellPathComponentType::ICD ) { if ( m_multipleValveLocations->valveLocations().size() > 1 ) { @@ -326,7 +328,7 @@ QString RimWellPathValve::componentLabel() const return "ICD"; } } - else if ( componentType() == RiaDefines::AICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::AICD ) { if ( m_multipleValveLocations->valveLocations().size() > 1 ) { @@ -337,7 +339,7 @@ QString RimWellPathValve::componentLabel() const return "AICD"; } } - else if ( componentType() == RiaDefines::ICV ) + else if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { return "ICV"; } @@ -349,15 +351,15 @@ QString RimWellPathValve::componentLabel() const //-------------------------------------------------------------------------------------------------- QString RimWellPathValve::componentTypeLabel() const { - if ( componentType() == RiaDefines::ICD ) + if ( componentType() == RiaDefines::WellPathComponentType::ICD ) { return "ICD"; } - else if ( componentType() == RiaDefines::AICD ) + else if ( componentType() == RiaDefines::WellPathComponentType::AICD ) { return "AICD"; } - else if ( componentType() == RiaDefines::ICV ) + else if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { return "ICV"; } @@ -377,7 +379,7 @@ cvf::Color3f RimWellPathValve::defaultComponentColor() const //-------------------------------------------------------------------------------------------------- double RimWellPathValve::startMD() const { - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { return m_measuredDepth; } @@ -396,7 +398,7 @@ double RimWellPathValve::startMD() const //-------------------------------------------------------------------------------------------------- double RimWellPathValve::endMD() const { - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { return m_measuredDepth + 0.5; } @@ -493,9 +495,10 @@ void RimWellPathValve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin uiOrdering.add( &m_createValveTemplate, false ); } - if ( componentType() == RiaDefines::ICV || componentType() == RiaDefines::ICD ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV || + componentType() == RiaDefines::WellPathComponentType::ICD ) { - if ( componentType() == RiaDefines::ICV ) + if ( componentType() == RiaDefines::WellPathComponentType::ICV ) { RimWellPath* wellPath; firstAncestorOrThisOfType( wellPath ); @@ -514,7 +517,8 @@ void RimWellPathValve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin } } - if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD ) + if ( componentType() == RiaDefines::WellPathComponentType::ICD || + componentType() == RiaDefines::WellPathComponentType::AICD ) { caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Multiple Valve Locations" ); m_multipleValveLocations->uiOrdering( uiConfigName, *group ); diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp index e161e0a664..16bcc6f979 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellAllocationPlot.cpp @@ -100,8 +100,8 @@ RimWellAllocationPlot::RimWellAllocationPlot() CAF_PDM_InitFieldNoDefault( &m_accumulatedWellFlowPlot, "AccumulatedWellFlowPlot", "Accumulated Well Flow", "", "", "" ); m_accumulatedWellFlowPlot.uiCapability()->setUiHidden( true ); m_accumulatedWellFlowPlot = new RimWellLogPlot; - m_accumulatedWellFlowPlot->setDepthUnit( RiaDefines::UNIT_NONE ); - m_accumulatedWellFlowPlot->setDepthType( RiaDefines::CONNECTION_NUMBER ); + m_accumulatedWellFlowPlot->setDepthUnit( RiaDefines::DepthUnitType::UNIT_NONE ); + m_accumulatedWellFlowPlot->setDepthType( RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ); m_accumulatedWellFlowPlot->setLegendsVisible( false ); m_accumulatedWellFlowPlot->uiCapability()->setUiIconFromResourceString( ":/WellFlowPlot16x16.png" ); @@ -125,8 +125,9 @@ RimWellAllocationPlot::RimWellAllocationPlot() this->setAsPlotMdiWindow(); m_accumulatedWellFlowPlot->setAvailableDepthUnits( {} ); - m_accumulatedWellFlowPlot->setAvailableDepthTypes( - {RiaDefines::CONNECTION_NUMBER, RiaDefines::TRUE_VERTICAL_DEPTH, RiaDefines::PSEUDO_LENGTH} ); + m_accumulatedWellFlowPlot->setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::CONNECTION_NUMBER, + RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, + RiaDefines::DepthTypeEnum::PSEUDO_LENGTH} ); m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false ); @@ -282,7 +283,7 @@ void RimWellAllocationPlot::updateFromWell() auto depthType = accumulatedWellFlowPlot()->depthType(); - if ( depthType == RiaDefines::MEASURED_DEPTH ) return; + if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) return; // Create tracks and curves from the calculated data @@ -300,11 +301,11 @@ void RimWellAllocationPlot::updateFromWell() accumulatedWellFlowPlot()->addPlot( plotTrack ); - const std::vector& depthValues = depthType == RiaDefines::CONNECTION_NUMBER + const std::vector& depthValues = depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ? wfCalculator->connectionNumbersFromTop( brIdx ) - : depthType == RiaDefines::PSEUDO_LENGTH + : depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH ? wfCalculator->pseudoLengthFromTop( brIdx ) - : depthType == RiaDefines::TRUE_VERTICAL_DEPTH + : depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ? wfCalculator->trueVerticalDepth( brIdx ) : std::vector(); @@ -314,7 +315,7 @@ void RimWellAllocationPlot::updateFromWell() { std::vector curveDepthValues = depthValues; std::vector accFlow; - if ( depthType == RiaDefines::CONNECTION_NUMBER ) + if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) { accFlow = ( m_flowType == ACCUMULATED ? wfCalculator->accumulatedTracerFlowPrConnection( tracerName, brIdx ) @@ -341,7 +342,8 @@ void RimWellAllocationPlot::updateFromWell() } } } - else if ( depthType == RiaDefines::PSEUDO_LENGTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH || + depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { accFlow = ( m_flowType == ACCUMULATED ? wfCalculator->accumulatedTracerFlowPrPseudoLength( tracerName, brIdx ) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp index a26ed9e55d..d0b010be60 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.cpp @@ -374,11 +374,11 @@ void RimWellDistributionPlot::onLoadDataAndUpdate() } QString phaseString = "N/A"; - if ( m_phase == RiaDefines::OIL_PHASE ) + if ( m_phase == RiaDefines::PhaseType::OIL_PHASE ) phaseString = "Oil"; - else if ( m_phase == RiaDefines::GAS_PHASE ) + else if ( m_phase == RiaDefines::PhaseType::GAS_PHASE ) phaseString = "Gas"; - else if ( m_phase == RiaDefines::WATER_PHASE ) + else if ( m_phase == RiaDefines::PhaseType::WATER_PHASE ) phaseString = "Water"; const QString timeStepName = m_case ? m_case->timeStepName( m_timeStepIndex ) : "N/A"; diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.h b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.h index b4e0bf3fb7..e30b4b7f28 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.h +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlot.h @@ -40,7 +40,7 @@ class RimWellDistributionPlot : public RimPlot CAF_PDM_HEADER_INIT; public: - explicit RimWellDistributionPlot( RiaDefines::PhaseType phase = RiaDefines::OIL_PHASE ); + explicit RimWellDistributionPlot( RiaDefines::PhaseType phase = RiaDefines::PhaseType::OIL_PHASE ); ~RimWellDistributionPlot() override; void setDataSourceParameters( RimEclipseResultCase* eclipseResultCase, int timeStepIndex, QString targetWellName ); diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp index 670856029d..82be69e3fd 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellDistributionPlotCollection.cpp @@ -95,9 +95,9 @@ RimWellDistributionPlotCollection::RimWellDistributionPlotCollection() setAsPlotMdiWindow(); - addPlot( new RimWellDistributionPlot( RiaDefines::OIL_PHASE ) ); - addPlot( new RimWellDistributionPlot( RiaDefines::GAS_PHASE ) ); - addPlot( new RimWellDistributionPlot( RiaDefines::WATER_PHASE ) ); + addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::OIL_PHASE ) ); + addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::GAS_PHASE ) ); + addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::WATER_PHASE ) ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp index b21101b617..3996beccb0 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellFlowRateCurve.cpp @@ -254,9 +254,9 @@ void RimWellFlowRateCurve::updateStackedPlotData() RimWellLogPlot::DepthTypeEnum depthType = wellLogPlot->depthType(); RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit(); - if ( depthType == RiaDefines::CONNECTION_NUMBER ) + if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) { - displayUnit = RiaDefines::UNIT_NONE; + displayUnit = RiaDefines::DepthUnitType::UNIT_NONE; } std::vector depthValues; @@ -323,7 +323,7 @@ bool RimWellFlowRateCurve::isUsingConnectionNumberDepthType() const { RimWellLogPlot* wellLogPlot; firstAncestorOrThisOfType( wellLogPlot ); - if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::CONNECTION_NUMBER ) + if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) { return true; } @@ -350,7 +350,7 @@ void RimWellFlowRateCurve::setFlowValuesPrDepthValue( const QString& const std::vector& depthValues, const std::vector& flowRates ) { - this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::UNIT_NONE, false ); + this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::DepthUnitType::UNIT_NONE, false ); m_curveAutoName = curveName; } diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp index 93398f5845..3959a9e9c5 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellPltPlot.cpp @@ -140,7 +140,7 @@ RimWellPltPlot::RimWellPltPlot() m_isOnLoad = true; m_plotLegendsHorizontal = false; - setAvailableDepthTypes( {RiaDefines::MEASURED_DEPTH} ); + setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH} ); } //-------------------------------------------------------------------------------------------------- @@ -169,13 +169,13 @@ void RimWellPltPlot::setPlotXAxisTitles( RimWellLogTrack* plotTrack ) // Todo: Handle different units in the relevant las channels switch ( source.wellLogFile()->wellLogFileData()->depthUnit() ) { - case RiaDefines::UNIT_METER: + case RiaDefines::DepthUnitType::UNIT_METER: presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_METRIC ); break; - case RiaDefines::UNIT_FEET: + case RiaDefines::DepthUnitType::UNIT_FEET: presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_FIELD ); break; - case RiaDefines::UNIT_NONE: + case RiaDefines::DepthUnitType::UNIT_NONE: presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_UNKNOWN ); break; } @@ -657,8 +657,10 @@ void RimWellPltPlot::syncCurvesFromUiSelection() RiaEclipseUnitTools::UnitSystem unitSystem = RiaEclipseUnitTools::UNITS_UNKNOWN; { RiaDefines::DepthUnitType depthUnit = wellLogFileData->depthUnit(); - if ( depthUnit == RiaDefines::UNIT_FEET ) unitSystem = RiaEclipseUnitTools::UNITS_FIELD; - if ( depthUnit == RiaDefines::UNIT_METER ) unitSystem = RiaEclipseUnitTools::UNITS_METRIC; + if ( depthUnit == RiaDefines::DepthUnitType::UNIT_FEET ) + unitSystem = RiaEclipseUnitTools::UNITS_FIELD; + if ( depthUnit == RiaDefines::DepthUnitType::UNIT_METER ) + unitSystem = RiaEclipseUnitTools::UNITS_METRIC; } for ( const ChannelValNameIdxTuple& channelInfo : sortedChannels ) diff --git a/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp b/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp index 81b79c8377..8243ca0fb5 100644 --- a/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Flow/RimWellRftPlot.cpp @@ -95,7 +95,7 @@ RimWellRftPlot::RimWellRftPlot() m_wellLogPlot_OBSOLETE.uiCapability()->setUiHidden( true ); m_wellLogPlot_OBSOLETE.xmlCapability()->setIOWritable( false ); - m_depthType = RiaDefines::TRUE_VERTICAL_DEPTH; + m_depthType = RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH; CAF_PDM_InitFieldNoDefault( &m_wellPathNameOrSimWellName, "WellName", "Well Name", "", "", "" ); CAF_PDM_InitField( &m_branchIndex, "BranchIndex", 0, "Branch Index", "", "", "" ); @@ -128,7 +128,7 @@ RimWellRftPlot::RimWellRftPlot() // TODO: may want to support TRUE_VERTICAL_DEPTH_RKB in the future // It was developed for regular well log plots and requires some more work for RFT plots. - setAvailableDepthTypes( {RiaDefines::MEASURED_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH} ); + setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH, RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH} ); m_nameConfig->setCustomName( "RFT Plot" ); m_plotLegendsHorizontal = false; @@ -647,7 +647,7 @@ void RimWellRftPlot::updateCurvesInPlot( const std::setupdateAnnotationObjects( m_xAxisProperties ); m_plotWidget->updateAnnotationObjects( m_yAxisProperties ); @@ -733,7 +733,7 @@ void RimGridCrossPlot::setYAxisInverted( bool inverted ) //-------------------------------------------------------------------------------------------------- bool RimGridCrossPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const { - if ( fontSettingType != RiaDefines::PLOT_FONT ) return false; + if ( fontSettingType != RiaDefines::FontSettingType::PLOT_FONT ) return false; for ( auto plotAxis : allPlotAxes() ) { @@ -759,7 +759,7 @@ bool RimGridCrossPlot::applyFontSize( RiaDefines::FontSettingType fontSettingTyp bool forceChange /*= false*/ ) { bool anyChange = false; - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { for ( auto plotAxis : allPlotAxes() ) { @@ -819,8 +819,8 @@ void RimGridCrossPlot::updateZoomInQwt() { if ( m_plotWidget ) { - updateAxisInQwt( RiaDefines::PLOT_AXIS_LEFT ); - updateAxisInQwt( RiaDefines::PLOT_AXIS_BOTTOM ); + updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); + updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ); m_plotWidget->updateAxes(); updateZoomFromQwt(); m_plotWidget->scheduleReplot(); @@ -832,8 +832,8 @@ void RimGridCrossPlot::updateZoomInQwt() //-------------------------------------------------------------------------------------------------- void RimGridCrossPlot::updateZoomFromQwt() { - updateAxisFromQwt( RiaDefines::PLOT_AXIS_LEFT ); - updateAxisFromQwt( RiaDefines::PLOT_AXIS_BOTTOM ); + updateAxisFromQwt( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); + updateAxisFromQwt( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ); } //-------------------------------------------------------------------------------------------------- @@ -894,7 +894,7 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType ) RimPlotAxisProperties* axisProperties = m_xAxisProperties(); QString axisParameterString = xAxisParameterString(); - if ( axisType == RiaDefines::PLOT_AXIS_LEFT ) + if ( axisType == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { axisProperties = m_yAxisProperties(); axisParameterString = yAxisParameterString(); @@ -989,7 +989,7 @@ void RimGridCrossPlot::updateAxisFromQwt( RiaDefines::PlotAxis axisType ) RimPlotAxisProperties* axisProperties = m_xAxisProperties(); QwtInterval axisRange = xAxisRange; - if ( axisType == RiaDefines::PLOT_AXIS_LEFT ) + if ( axisType == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { axisProperties = m_yAxisProperties(); axisRange = yAxisRange; diff --git a/ApplicationCode/ProjectDataModel/Rim3dView.cpp b/ApplicationCode/ProjectDataModel/Rim3dView.cpp index c0187b8f4c..ee6950f1c3 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dView.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dView.cpp @@ -737,7 +737,7 @@ void Rim3dView::setupBeforeSave() //-------------------------------------------------------------------------------------------------- void Rim3dView::setMeshOnlyDrawstyle() { - meshMode.setValueWithFieldChanged( RiaDefines::FULL_MESH ); + meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FULL_MESH ); surfaceMode.setValueWithFieldChanged( NO_SURFACE ); } @@ -747,7 +747,7 @@ void Rim3dView::setMeshOnlyDrawstyle() void Rim3dView::setMeshSurfDrawstyle() { surfaceMode.setValueWithFieldChanged( SURFACE ); - meshMode.setValueWithFieldChanged( RiaDefines::FULL_MESH ); + meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FULL_MESH ); } //-------------------------------------------------------------------------------------------------- @@ -756,7 +756,7 @@ void Rim3dView::setMeshSurfDrawstyle() void Rim3dView::setFaultMeshSurfDrawstyle() { surfaceMode.setValueWithFieldChanged( SURFACE ); - meshMode.setValueWithFieldChanged( RiaDefines::FAULTS_MESH ); + meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FAULTS_MESH ); } //-------------------------------------------------------------------------------------------------- @@ -765,7 +765,7 @@ void Rim3dView::setFaultMeshSurfDrawstyle() void Rim3dView::setSurfOnlyDrawstyle() { surfaceMode.setValueWithFieldChanged( SURFACE ); - meshMode.setValueWithFieldChanged( RiaDefines::NO_MESH ); + meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::NO_MESH ); } //-------------------------------------------------------------------------------------------------- @@ -1252,14 +1252,14 @@ void Rim3dView::updateDisplayModelVisibility() mask |= intersectionCellFaceBit; } - if ( meshMode == RiaDefines::FULL_MESH ) + if ( meshMode == RiaDefines::MeshModeType::FULL_MESH ) { mask |= uintMeshSurfaceBit; mask |= uintMeshFaultBit; mask |= intersectionCellMeshBit; mask |= intersectionFaultMeshBit; } - else if ( meshMode == RiaDefines::FAULTS_MESH ) + else if ( meshMode == RiaDefines::MeshModeType::FAULTS_MESH ) { mask |= uintMeshFaultBit; mask |= intersectionFaultMeshBit; @@ -1327,7 +1327,7 @@ bool Rim3dView::applyFontSize( RiaDefines::FontSettingType fontSettingType, int fontSize, bool forceChange /*= false*/ ) { - if ( fontSettingType == RiaDefines::SCENE_FONT ) + if ( fontSettingType == RiaDefines::FontSettingType::SCENE_FONT ) { applyBackgroundColorAndFontChanges(); return true; diff --git a/ApplicationCode/ProjectDataModel/Rim3dWellLogRftCurve.cpp b/ApplicationCode/ProjectDataModel/Rim3dWellLogRftCurve.cpp index b889f7bd7f..fb67f8bdea 100644 --- a/ApplicationCode/ProjectDataModel/Rim3dWellLogRftCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Rim3dWellLogRftCurve.cpp @@ -80,7 +80,7 @@ void Rim3dWellLogRftCurve::curveValuesAndMds( std::vector* values, std:: // These values are for a simulation well *values = curveData->xValues(); - *measuredDepthValues = curveData->depths( RiaDefines::MEASURED_DEPTH ); + *measuredDepthValues = curveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp b/ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp index e787f8ee1c..98679d3903 100644 --- a/ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimDepthTrackPlot.cpp @@ -89,10 +89,10 @@ RimDepthTrackPlot::RimDepthTrackPlot() CAF_PDM_InitField( &m_plotWindowTitle, "PlotDescription", QString( "" ), "Name", "", "", "" ); m_plotWindowTitle.xmlCapability()->setIOWritable( false ); - caf::AppEnum depthType = RiaDefines::MEASURED_DEPTH; + caf::AppEnum depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH; CAF_PDM_InitScriptableFieldWithIO( &m_depthType, "DepthType", depthType, "Type", "", "", "" ); - caf::AppEnum depthUnit = RiaDefines::UNIT_METER; + caf::AppEnum depthUnit = RiaDefines::DepthUnitType::UNIT_METER; CAF_PDM_InitScriptableFieldWithIO( &m_depthUnit, "DepthUnit", depthUnit, "Unit", "", "", "" ); CAF_PDM_InitScriptableFieldWithIO( &m_minVisibleDepth, "MinimumDepth", 0.0, "Min", "", "", "" ); @@ -112,8 +112,10 @@ RimDepthTrackPlot::RimDepthTrackPlot() CAF_PDM_InitFieldNoDefault( &m_plots, "Tracks", "", "", "", "" ); m_plots.uiCapability()->setUiHidden( true ); - m_availableDepthUnits = {RiaDefines::UNIT_METER, RiaDefines::UNIT_FEET}; - m_availableDepthTypes = {RiaDefines::MEASURED_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH_RKB}; + m_availableDepthUnits = {RiaDefines::DepthUnitType::UNIT_METER, RiaDefines::DepthUnitType::UNIT_FEET}; + m_availableDepthTypes = {RiaDefines::DepthTypeEnum::MEASURED_DEPTH, + RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, + RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB}; m_minAvailableDepth = HUGE_VAL; m_maxAvailableDepth = -HUGE_VAL; @@ -771,7 +773,7 @@ void RimDepthTrackPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFiel { m_isAutoScaleDepthEnabled = true; - bool isTVDRKB = m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB; + bool isTVDRKB = m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB; m_nameConfig->setAutoNameTags( m_nameConfig->addCaseName(), m_nameConfig->addWellName(), m_nameConfig->addTimeStep(), @@ -959,38 +961,38 @@ QString RimDepthTrackPlot::depthAxisTitle() const switch ( m_depthType.value() ) { - case RiaDefines::MEASURED_DEPTH: + case RiaDefines::DepthTypeEnum::MEASURED_DEPTH: depthTitle = "MD"; break; - case RiaDefines::TRUE_VERTICAL_DEPTH: + case RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH: depthTitle = "TVDMSL"; break; - case RiaDefines::PSEUDO_LENGTH: + case RiaDefines::DepthTypeEnum::PSEUDO_LENGTH: depthTitle = "PL"; break; - case RiaDefines::CONNECTION_NUMBER: + case RiaDefines::DepthTypeEnum::CONNECTION_NUMBER: depthTitle = "Connection"; break; - case RiaDefines::TRUE_VERTICAL_DEPTH_RKB: + case RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB: depthTitle = "TVDRKB"; break; } - if ( m_depthType() == RiaDefines::CONNECTION_NUMBER ) return depthTitle; + if ( m_depthType() == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) return depthTitle; - if ( m_depthUnit == RiaDefines::UNIT_METER ) + if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_METER ) { depthTitle += " [m]"; } - else if ( m_depthUnit == RiaDefines::UNIT_FEET ) + else if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_FEET ) { depthTitle += " [ft]"; } - else if ( m_depthUnit == RiaDefines::UNIT_NONE ) + else if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_NONE ) { depthTitle += ""; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseContourMapView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseContourMapView.cpp index 2dba5ee15c..1736de3b52 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseContourMapView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseContourMapView.cpp @@ -162,7 +162,7 @@ void RimEclipseContourMapView::initAfterRead() disablePerspectiveProjectionField(); setShowGridBox( false ); - meshMode.setValue( RiaDefines::NO_MESH ); + meshMode.setValue( RiaDefines::MeshModeType::NO_MESH ); surfaceMode.setValue( FAULTS ); setFaultVisParameters(); scheduleCreateDisplayModelAndRedraw(); diff --git a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp index 22cb17da7b..b333b40f7c 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipsePropertyFilter.cpp @@ -411,15 +411,17 @@ void RimEclipsePropertyFilter::computeResultValueRange() } else if ( m_resultDefinition->resultVariable() == RiaDefines::completionTypeResultName() ) { - std::vector componentTypes = {RiaDefines::WELL_PATH, - RiaDefines::PERFORATION_INTERVAL, - RiaDefines::FISHBONES, - RiaDefines::FRACTURE}; - std::vector> ctNamesAndValues; + std::vector componentTypes = + {RiaDefines::WellPathComponentType::WELL_PATH, + RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, + RiaDefines::WellPathComponentType::FISHBONES, + RiaDefines::WellPathComponentType::FRACTURE}; + std::vector> ctNamesAndValues; for ( RiaDefines::WellPathComponentType type : componentTypes ) { ctNamesAndValues.push_back( - std::make_pair( caf::AppEnum::uiText( type ), type ) ); + std::make_pair( caf::AppEnum::uiText( type ), + static_cast( type ) ) ); } setCategoryNamesAndValues( ctNamesAndValues ); } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp index 882047422e..2e5d938765 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseResultDefinition.cpp @@ -1957,22 +1957,26 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen const std::vector& visibleCategories = cellResultsData->uniqueCellScalarValues( this->eclipseResultAddress() ); - std::vector supportedCompletionTypes = {RiaDefines::WELL_PATH, - RiaDefines::FISHBONES, - RiaDefines::PERFORATION_INTERVAL, - RiaDefines::FRACTURE}; + std::vector supportedCompletionTypes = + {RiaDefines::WellPathComponentType::WELL_PATH, + RiaDefines::WellPathComponentType::FISHBONES, + RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, + RiaDefines::WellPathComponentType::FRACTURE}; RiaColorTables::WellPathComponentColors colors = RiaColorTables::wellPathComponentColors(); std::vector> categories; for ( auto completionType : supportedCompletionTypes ) { - if ( std::find( visibleCategories.begin(), visibleCategories.end(), completionType ) != - visibleCategories.end() ) + if ( std::find( visibleCategories.begin(), + visibleCategories.end(), + static_cast( completionType ) ) != visibleCategories.end() ) { QString categoryText = caf::AppEnum::uiText( completionType ); - categories.push_back( std::make_tuple( categoryText, completionType, colors[completionType] ) ); + categories.push_back( std::make_tuple( categoryText, + static_cast( completionType ), + colors[completionType] ) ); } } diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechContourMapView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechContourMapView.cpp index bc41a7bc3b..a00beb01a3 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechContourMapView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechContourMapView.cpp @@ -175,7 +175,7 @@ void RimGeoMechContourMapView::initAfterRead() m_gridCollection->setActive( false ); // This is also not added to the tree view, so cannot be enabled. disablePerspectiveProjectionField(); setShowGridBox( false ); - meshMode.setValue( RiaDefines::NO_MESH ); + meshMode.setValue( RiaDefines::MeshModeType::NO_MESH ); surfaceMode.setValue( FAULTS ); scheduleCreateDisplayModelAndRedraw(); } diff --git a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp index ba28dea1c5..2d29fe8f9d 100644 --- a/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimGridTimeHistoryCurve.cpp @@ -74,7 +74,7 @@ RimGridTimeHistoryCurve::RimGridTimeHistoryCurve() CAF_PDM_InitField( &m_plotAxis, "PlotAxis", - caf::AppEnum( RiaDefines::PLOT_AXIS_LEFT ), + caf::AppEnum( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ), "Axis", "", "", @@ -711,7 +711,7 @@ void RimGridTimeHistoryCurve::updateQwtPlotAxis() { if ( m_qwtPlotCurve ) { - if ( this->yAxis() == RiaDefines::PLOT_AXIS_LEFT ) + if ( this->yAxis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { m_qwtPlotCurve->setYAxis( QwtPlot::yLeft ); } diff --git a/ApplicationCode/ProjectDataModel/RimGridView.cpp b/ApplicationCode/ProjectDataModel/RimGridView.cpp index 6e0a0fdab8..cd8d5397c7 100644 --- a/ApplicationCode/ProjectDataModel/RimGridView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGridView.cpp @@ -375,7 +375,7 @@ bool RimGridView::isGridVisualizationMode() const bool RimGridView::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const { bool hasCustomFonts = Rim3dView::hasCustomFontSizes( fontSettingType, defaultFontSize ); - if ( fontSettingType == RiaDefines::ANNOTATION_FONT ) + if ( fontSettingType == RiaDefines::FontSettingType::ANNOTATION_FONT ) { auto annotations = annotationCollection(); if ( annotations ) @@ -396,7 +396,7 @@ bool RimGridView::applyFontSize( RiaDefines::FontSettingType fontSettingType, bool forceChange /*= false*/ ) { bool anyChange = Rim3dView::applyFontSize( fontSettingType, oldFontSize, fontSize, forceChange ); - if ( fontSettingType == RiaDefines::ANNOTATION_FONT ) + if ( fontSettingType == RiaDefines::FontSettingType::ANNOTATION_FONT ) { auto annotations = annotationCollection(); if ( annotations ) @@ -448,7 +448,7 @@ void RimGridView::initAfterRead() // This change was introduced in https://github.com/OPM/ResInsight/commit/f7bfe8d0 bool isGridVisualizationModeBefore_2018_1_1 = - ( ( surfaceMode() == RimGridView::SURFACE ) || ( meshMode() == RiaDefines::FULL_MESH ) ); + ( ( surfaceMode() == RimGridView::SURFACE ) || ( meshMode() == RiaDefines::MeshModeType::FULL_MESH ) ); m_gridCollection->setActive( isGridVisualizationModeBefore_2018_1_1 ); if ( !isGridVisualizationModeBefore_2018_1_1 ) @@ -457,7 +457,7 @@ void RimGridView::initAfterRead() // If was showing with mesh and/or surfaces, turn to full mesh/surf mode to show the mesh, // and to avoid a strange setup when dropping out into grid mode again if ( surfaceMode() != RimGridView::NO_SURFACE ) surfaceMode = RimGridView::SURFACE; - if ( meshMode() != RiaDefines::NO_MESH ) meshMode = RiaDefines::FULL_MESH; + if ( meshMode() != RiaDefines::MeshModeType::NO_MESH ) meshMode = RiaDefines::MeshModeType::FULL_MESH; } } } diff --git a/ApplicationCode/ProjectDataModel/RimMultiPlot.cpp b/ApplicationCode/ProjectDataModel/RimMultiPlot.cpp index a23b291169..b8a760d696 100644 --- a/ApplicationCode/ProjectDataModel/RimMultiPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimMultiPlot.cpp @@ -686,7 +686,7 @@ void RimMultiPlot::recreatePlotWidgets() //-------------------------------------------------------------------------------------------------- bool RimMultiPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const { - if ( fontSettingType == RiaDefines::PLOT_FONT && m_viewer ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_viewer ) { if ( m_viewer->fontSize() != defaultFontSize ) { @@ -716,7 +716,7 @@ bool RimMultiPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType, bool forceChange /*= false */ ) { bool somethingChanged = false; - if ( fontSettingType == RiaDefines::PLOT_FONT && m_viewer ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_viewer ) { if ( oldFontSize == m_viewer->fontSize() || forceChange ) { diff --git a/ApplicationCode/ProjectDataModel/RimPlotAxisProperties.cpp b/ApplicationCode/ProjectDataModel/RimPlotAxisProperties.cpp index 757b837812..e4691500e1 100644 --- a/ApplicationCode/ProjectDataModel/RimPlotAxisProperties.cpp +++ b/ApplicationCode/ProjectDataModel/RimPlotAxisProperties.cpp @@ -297,10 +297,10 @@ QString RimPlotAxisProperties::name() const //-------------------------------------------------------------------------------------------------- RiaDefines::PlotAxis RimPlotAxisProperties::plotAxisType() const { - if ( m_axis == QwtPlot::yRight ) return RiaDefines::PLOT_AXIS_RIGHT; - if ( m_axis == QwtPlot::xBottom ) return RiaDefines::PLOT_AXIS_BOTTOM; + if ( m_axis == QwtPlot::yRight ) return RiaDefines::PlotAxis::PLOT_AXIS_RIGHT; + if ( m_axis == QwtPlot::xBottom ) return RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM; - return RiaDefines::PLOT_AXIS_LEFT; + return RiaDefines::PlotAxis::PLOT_AXIS_LEFT; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellBoreStabilityPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellBoreStabilityPlot.cpp index 9d5ac6dcb7..f95dee8f55 100644 --- a/ApplicationCode/ProjectDataModel/RimWellBoreStabilityPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellBoreStabilityPlot.cpp @@ -63,7 +63,7 @@ RimWellBoreStabilityPlot::RimWellBoreStabilityPlot() m_nameConfig->setCustomName( "Well Bore Stability" ); m_nameConfig->enableAllAutoNameTags( true ); - m_commonDataSource->setCaseType( RiaDefines::GEOMECH_ODB_CASE ); + m_commonDataSource->setCaseType( RiaDefines::CaseType::GEOMECH_ODB_CASE ); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp index f9ac7bfba9..35fd698e9e 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp @@ -148,8 +148,10 @@ void RimWellLogCurve::setValuesWithMdAndTVD( const std::vector& xValues, bool isExtractionCurve, const QString& xUnits ) { - std::map> depths = { { RiaDefines::MEASURED_DEPTH, measuredDepths }, - { RiaDefines::TRUE_VERTICAL_DEPTH, tvdMSL } }; + std::map> depths = {{RiaDefines::DepthTypeEnum::MEASURED_DEPTH, + measuredDepths}, + {RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, + tvdMSL}}; setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve, xUnits ); } diff --git a/ApplicationCode/ProjectDataModel/RimWellLogCurveCommonDataSource.cpp b/ApplicationCode/ProjectDataModel/RimWellLogCurveCommonDataSource.cpp index a8dfa4e308..ede4f77744 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogCurveCommonDataSource.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogCurveCommonDataSource.cpp @@ -69,7 +69,7 @@ bool RimWellLogCurveCommonDataSource::DoubleComparator::operator()( const double /// //-------------------------------------------------------------------------------------------------- RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource() - : m_caseType( RiaDefines::UNDEFINED_CASE ) + : m_caseType( RiaDefines::CaseType::UNDEFINED_CASE ) { CAF_PDM_InitObject( "Change Data Source", "", "", "" ); @@ -758,12 +758,14 @@ QList if ( fieldNeedingOptions == &m_case ) { - if ( m_caseType == RiaDefines::GEOMECH_ODB_CASE ) + if ( m_caseType == RiaDefines::CaseType::GEOMECH_ODB_CASE ) { RimTools::geoMechCaseOptionItems( &options ); } - else if ( m_caseType == RiaDefines::ECLIPSE_RESULT_CASE || m_caseType == RiaDefines::ECLIPSE_INPUT_CASE || - m_caseType == RiaDefines::ECLIPSE_SOURCE_CASE || m_caseType == RiaDefines::ECLIPSE_STAT_CASE ) + else if ( m_caseType == RiaDefines::CaseType::ECLIPSE_RESULT_CASE || + m_caseType == RiaDefines::CaseType::ECLIPSE_INPUT_CASE || + m_caseType == RiaDefines::CaseType::ECLIPSE_SOURCE_CASE || + m_caseType == RiaDefines::CaseType::ECLIPSE_STAT_CASE ) { RimTools::eclipseCaseOptionItems( &options ); } diff --git a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp index cf6d603da3..5f4d3bd41d 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogExtractionCurve.cpp @@ -345,7 +345,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot ) RiaDefines::DepthTypeEnum depthType = wellLogPlot->depthType(); RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit(); - if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH || + depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { isUsingPseudoLength = false; } @@ -450,7 +451,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength, std::vector tvDepthValues; double rkbDiff = 0.0; - RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER; + RiaDefines::DepthUnitType depthUnit = RiaDefines::DepthUnitType::UNIT_METER; QString xUnits = RiaWellLogUnitTools::noUnitString(); if ( eclExtractor.notNull() && eclipseCase ) @@ -477,7 +478,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength, { // See https://github.com/OPM/ResInsight/issues/538 - depthUnit = RiaDefines::UNIT_FEET; + depthUnit = RiaDefines::DepthUnitType::UNIT_FEET; } } else if ( geomExtractor.notNull() ) // geomExtractor @@ -517,7 +518,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength, { this->setValuesAndDepths( values, measuredDepthValues, - RiaDefines::MEASURED_DEPTH, + RiaDefines::DepthTypeEnum::MEASURED_DEPTH, 0.0, depthUnit, !performDataSmoothing, diff --git a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp index 3803e79955..a431ee07ff 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogFileCurve.cpp @@ -125,15 +125,15 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot ) std::map> validDepths; if ( values.size() == measuredDepthValues.size() ) { - validDepths.insert( std::make_pair( RiaDefines::MEASURED_DEPTH, measuredDepthValues ) ); + validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepthValues ) ); } if ( values.size() == tvdMslValues.size() ) { - validDepths.insert( std::make_pair( RiaDefines::TRUE_VERTICAL_DEPTH, tvdMslValues ) ); + validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvdMslValues ) ); } if ( values.size() == tvdRkbValues.size() ) { - validDepths.insert( std::make_pair( RiaDefines::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) ); + validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) ); } this->setValuesAndDepths( values, validDepths, rkbDiff, wellLogFile->depthUnit(), false ); @@ -165,13 +165,13 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot ) } } - RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER; + RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER; if ( wellLogPlot ) { displayUnit = wellLogPlot->depthUnit(); } - RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH; + RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH; if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) ) { depthType = wellLogPlot->depthType(); diff --git a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp index 4604b4e3cf..8c71eb5e54 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogRftCurve.cpp @@ -376,7 +376,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot ) { this->RimPlotCurve::updateCurvePresentation( updateParentPlot ); - RiaDefines::DepthTypeEnum depthType = RiaDefines::TRUE_VERTICAL_DEPTH; + RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH; DerivedMDSource derivedMDSource = NO_SOURCE; if ( isCurveVisible() ) @@ -461,18 +461,18 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot ) RiaEclipseUnitTools::depthUnit( unitSystem ), false ); - RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER; + RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER; if ( wellLogPlot ) { displayUnit = wellLogPlot->depthUnit(); } - if ( wellLogPlot->depthType() == RiaDefines::MEASURED_DEPTH ) + if ( wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) { m_qwtPlotCurve->setPerPointLabels( perPointLabels ); - auto xValues = this->curveData()->xPlotValues(); - auto yValues = this->curveData()->depthPlotValues( RiaDefines::MEASURED_DEPTH, displayUnit ); + auto xValues = this->curveData()->xPlotValues(); + auto yValues = this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit ); bool keepOnlyPositiveValues = false; if ( !errors.empty() ) @@ -516,8 +516,9 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot ) { m_qwtPlotCurve->setPerPointLabels( perPointLabels ); - auto xValues = this->curveData()->xPlotValues(); - auto yValues = this->curveData()->depthPlotValues( RiaDefines::TRUE_VERTICAL_DEPTH, displayUnit ); + auto xValues = this->curveData()->xPlotValues(); + auto yValues = + this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, displayUnit ); bool isLogCurve = false; if ( !errors.empty() ) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp index f4d02dd854..4ffbf8db3f 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogTrack.cpp @@ -798,23 +798,23 @@ QString RimWellLogTrack::asciiDataForPlotExport() const // Header - if ( depthType == RiaDefines::CONNECTION_NUMBER ) + if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) { out += "Connection"; } - else if ( depthType == RiaDefines::MEASURED_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) { out += "MD "; } - else if ( depthType == RiaDefines::PSEUDO_LENGTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH ) { out += "PL "; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { out += "TVDMSL "; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { out += "TVDRKB "; } @@ -830,7 +830,7 @@ QString RimWellLogTrack::asciiDataForPlotExport() const size_t i = dIdx; double curveDepth = curveDepths[i]; - if ( depthType == RiaDefines::CONNECTION_NUMBER ) + if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) { if ( dIdx == 0 ) continue; // Skip the first line. (shallow depth, which is last) @@ -871,7 +871,7 @@ QString RimWellLogTrack::asciiDataForPlotExport() const //-------------------------------------------------------------------------------------------------- bool RimWellLogTrack::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const { - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { return defaultFontSize != m_plotWidget->axisTitleFontSize( QwtPlot::xTop ); } @@ -886,7 +886,7 @@ bool RimWellLogTrack::applyFontSize( RiaDefines::FontSettingType fontSettingType int fontSize, bool forceChange /*= false*/ ) { - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { if ( oldFontSize == m_plotWidget->axisTitleFontSize( QwtPlot::xTop ) || forceChange ) { @@ -1921,7 +1921,7 @@ void RimWellLogTrack::handleWheelEvent( QWheelEvent* event ) std::vector> RimWellLogTrack::waterAndRockRegions( RiaDefines::DepthTypeEnum depthType, const RigWellLogExtractor* extractor ) const { - if ( depthType == RiaDefines::MEASURED_DEPTH ) + if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) { double waterStartMD = 0.0; if ( extractor->wellPathData()->rkbDiff() != std::numeric_limits::infinity() ) @@ -1932,14 +1932,14 @@ std::vector> RimWellLogTrack::waterAndRockRegions( Ria double rockEndMD = extractor->cellIntersectionMDs().back(); return {{waterStartMD, waterEndMD}, {waterEndMD, rockEndMD}}; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { double waterStartTVD = 0.0; double waterEndTVD = extractor->cellIntersectionTVDs().front(); double rockEndTVD = extractor->cellIntersectionTVDs().back(); return {{waterStartTVD, waterEndTVD}, {waterEndTVD, rockEndTVD}}; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { double waterStartTVDRKB = extractor->wellPathData()->rkbDiff(); double waterEndTVDRKB = extractor->cellIntersectionTVDs().front() + extractor->wellPathData()->rkbDiff(); @@ -2171,14 +2171,15 @@ void RimWellLogTrack::findRegionNamesToPlot( const CurveSamplingPointData& std::vector depthVector; - if ( depthType == RiaDefines::MEASURED_DEPTH || depthType == RiaDefines::PSEUDO_LENGTH ) + if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH || depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH ) { depthVector = curveData.md; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH || + depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { depthVector = curveData.tvd; - if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { for ( double& depthValue : depthVector ) { @@ -2290,8 +2291,9 @@ void RimWellLogTrack::updateFormationNamesOnPlot() { if ( m_formationWellPathForSourceWellPath == nullptr ) return; - if ( !( plot->depthType() == RiaDefines::MEASURED_DEPTH || plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH || - plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) ) + if ( !( plot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH || + plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH || + plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) ) { return; } @@ -2308,7 +2310,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot() m_showformationFluids(), plot->depthType() ); - if ( plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + if ( plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { for ( double& depthValue : yValues ) { @@ -2590,16 +2592,17 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot() } } - const std::map sortIndices = {{RiaDefines::WELL_PATH, 0}, - {RiaDefines::CASING, 1}, - {RiaDefines::LINER, 2}, - {RiaDefines::PERFORATION_INTERVAL, 3}, - {RiaDefines::FISHBONES, 4}, - {RiaDefines::FRACTURE, 5}, - {RiaDefines::PACKER, 6}, - {RiaDefines::ICD, 7}, - {RiaDefines::AICD, 8}, - {RiaDefines::ICV, 9}}; + const std::map sortIndices = + {{RiaDefines::WellPathComponentType::WELL_PATH, 0}, + {RiaDefines::WellPathComponentType::CASING, 1}, + {RiaDefines::WellPathComponentType::LINER, 2}, + {RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, 3}, + {RiaDefines::WellPathComponentType::FISHBONES, 4}, + {RiaDefines::WellPathComponentType::FRACTURE, 5}, + {RiaDefines::WellPathComponentType::PACKER, 6}, + {RiaDefines::WellPathComponentType::ICD, 7}, + {RiaDefines::WellPathComponentType::AICD, 8}, + {RiaDefines::WellPathComponentType::ICV, 9}}; std::stable_sort( allWellPathComponents.begin(), allWellPathComponents.end(), diff --git a/ApplicationCode/ProjectDataModel/RimWellMeasurementCurve.cpp b/ApplicationCode/ProjectDataModel/RimWellMeasurementCurve.cpp index 58981352a8..c753bc3d9e 100644 --- a/ApplicationCode/ProjectDataModel/RimWellMeasurementCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellMeasurementCurve.cpp @@ -127,16 +127,16 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot ) measuredDepthValues, trueVerticalDepthValues, m_wellPath->wellPathGeometry()->rkbDiff(), - RiaDefines::UNIT_METER, + RiaDefines::DepthUnitType::UNIT_METER, false ); } else { this->setValuesAndDepths( values, measuredDepthValues, - RiaDefines::MEASURED_DEPTH, + RiaDefines::DepthTypeEnum::MEASURED_DEPTH, 0.0, - RiaDefines::UNIT_METER, + RiaDefines::DepthUnitType::UNIT_METER, false ); } } @@ -151,13 +151,13 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot ) setSymbolEdgeColor( getColorForMeasurementKind( measurementKind() ) ); setLineStyle( RiuQwtPlotCurve::STYLE_NONE ); - RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER; + RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER; if ( wellLogPlot ) { displayUnit = wellLogPlot->depthUnit(); } - RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH; + RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH; if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) ) { depthType = wellLogPlot->depthType(); diff --git a/ApplicationCode/ProjectDataModel/RimWellPath.cpp b/ApplicationCode/ProjectDataModel/RimWellPath.cpp index c8c0555a42..871388612b 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPath.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPath.cpp @@ -207,7 +207,7 @@ bool RimWellPath::isEnabled() const //-------------------------------------------------------------------------------------------------- RiaDefines::WellPathComponentType RimWellPath::componentType() const { - return RiaDefines::WELL_PATH; + return RiaDefines::WellPathComponentType::WELL_PATH; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp index 3d55ee39a1..735bd45e52 100644 --- a/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellPathAttribute.cpp @@ -43,7 +43,7 @@ RimWellPathAttribute::RimWellPathAttribute() CAF_PDM_InitField( &m_startMD, "DepthStart", -1.0, "Start MD", "", "", "" ); CAF_PDM_InitField( &m_endMD, "DepthEnd", -1.0, "End MD", "", "", "" ); CAF_PDM_InitField( &m_diameterInInches, "DiameterInInches", MAX_DIAMETER_IN_INCHES, "Diameter", "", "", "" ); - m_type = RiaDefines::CASING; + m_type = RiaDefines::WellPathComponentType::CASING; m_diameterInInches.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() ); } @@ -114,7 +114,7 @@ RiaDefines::WellPathComponentType RimWellPathAttribute::componentType() const QString RimWellPathAttribute::componentLabel() const { QString fullLabel = componentTypeLabel(); - if ( m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER ) + if ( m_type() == RiaDefines::WellPathComponentType::CASING || m_type() == RiaDefines::WellPathComponentType::LINER ) { fullLabel += QString( " %1" ).arg( diameterLabel() ); } @@ -158,9 +158,9 @@ double RimWellPathAttribute::endMD() const //-------------------------------------------------------------------------------------------------- std::set RimWellPathAttribute::supportedDiameters( RiaDefines::WellPathComponentType type ) { - CAF_ASSERT( type == RiaDefines::CASING || type == RiaDefines::LINER ); + CAF_ASSERT( type == RiaDefines::WellPathComponentType::CASING || type == RiaDefines::WellPathComponentType::LINER ); std::set values; - if ( type == RiaDefines::CASING ) + if ( type == RiaDefines::WellPathComponentType::CASING ) { values = {MAX_DIAMETER_IN_INCHES, 26.0, @@ -187,7 +187,7 @@ std::set RimWellPathAttribute::supportedDiameters( RiaDefines::WellPathC //-------------------------------------------------------------------------------------------------- bool RimWellPathAttribute::isDiameterSupported() const { - return m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER; + return m_type() == RiaDefines::WellPathComponentType::CASING || m_type() == RiaDefines::WellPathComponentType::LINER; } //-------------------------------------------------------------------------------------------------- @@ -199,9 +199,9 @@ QList QList options; if ( fieldNeedingOptions == &m_type ) { - std::set supportedTypes = {RiaDefines::CASING, - RiaDefines::LINER, - RiaDefines::PACKER}; + std::set supportedTypes = {RiaDefines::WellPathComponentType::CASING, + RiaDefines::WellPathComponentType::LINER, + RiaDefines::WellPathComponentType::PACKER}; for ( RiaDefines::WellPathComponentType type : supportedTypes ) { options.push_back( caf::PdmOptionItemInfo( CompletionTypeEnum::uiText( type ), type ) ); @@ -252,7 +252,7 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF { if ( changedField == &m_type ) { - if ( m_type() == RiaDefines::CASING ) + if ( m_type() == RiaDefines::WellPathComponentType::CASING ) { RimWellPath* wellPath = nullptr; this->firstAncestorOrThisOfTypeAsserted( wellPath ); @@ -263,21 +263,21 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF m_diameterInInches = *( supportedDiameters( m_type() ).begin() ); } } - else if ( m_type() == RiaDefines::LINER ) + else if ( m_type() == RiaDefines::WellPathComponentType::LINER ) { if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) ) { m_diameterInInches = *( supportedDiameters( m_type() ).rbegin() ); } } - else if ( m_type() == RiaDefines::PACKER ) + else if ( m_type() == RiaDefines::WellPathComponentType::PACKER ) { m_endMD = m_startMD + 1; } } if ( changedField == &m_startMD ) { - if ( m_type() == RiaDefines::PACKER ) + if ( m_type() == RiaDefines::WellPathComponentType::PACKER ) { m_endMD = m_startMD + 1; } @@ -300,7 +300,7 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF //-------------------------------------------------------------------------------------------------- void RimWellPathAttribute::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) { - bool startDepthAvailable = m_type() != RiaDefines::CASING; + bool startDepthAvailable = m_type() != RiaDefines::WellPathComponentType::CASING; m_startMD.uiCapability()->setUiReadOnly( !startDepthAvailable ); m_diameterInInches.uiCapability()->setUiReadOnly( !isDiameterSupported() ); diff --git a/ApplicationCode/ProjectDataModel/Summary/RimAsciiDataCurve.cpp b/ApplicationCode/ProjectDataModel/Summary/RimAsciiDataCurve.cpp index bf843448d4..2157070a48 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimAsciiDataCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimAsciiDataCurve.cpp @@ -202,7 +202,7 @@ void RimAsciiDataCurve::updateQwtPlotAxis() { if ( m_qwtPlotCurve ) { - if ( this->yAxis() == RiaDefines::PLOT_AXIS_LEFT ) + if ( this->yAxis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { m_qwtPlotCurve->setYAxis( QwtPlot::yLeft ); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp index 8a5235ad2a..0548db6f59 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryCurve.cpp @@ -753,7 +753,7 @@ void RimSummaryCurve::updateQwtPlotAxis() { if ( m_qwtPlotCurve ) { - if ( this->axisY() == RiaDefines::PLOT_AXIS_LEFT ) + if ( this->axisY() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { m_qwtPlotCurve->setYAxis( QwtPlot::yLeft ); } diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp index af31f70d44..37679ac1c7 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlot.cpp @@ -257,8 +257,8 @@ void RimSummaryPlot::setShowPlotTitle( bool showTitle ) //-------------------------------------------------------------------------------------------------- void RimSummaryPlot::updateAxes() { - updateYAxis( RiaDefines::PLOT_AXIS_LEFT ); - updateYAxis( RiaDefines::PLOT_AXIS_RIGHT ); + updateYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); + updateYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); if ( m_isCrossPlot ) { @@ -586,15 +586,15 @@ void RimSummaryPlot::copyAxisPropertiesFromOther( const RimSummaryPlot& sourceSu { { QString data = - sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_LEFT )->writeObjectToXmlString(); - yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_LEFT ) + sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_LEFT )->writeObjectToXmlString(); + yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) ->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() ); } { QString data = - sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_RIGHT )->writeObjectToXmlString(); - yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_RIGHT ) + sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )->writeObjectToXmlString(); + yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ) ->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() ); } } @@ -733,7 +733,7 @@ void RimSummaryPlot::applyDefaultCurveAppearances() //-------------------------------------------------------------------------------------------------- bool RimSummaryPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const { - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { for ( auto plotAxis : allPlotAxes() ) { @@ -761,7 +761,7 @@ bool RimSummaryPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType, { bool anyChange = false; - if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget ) + if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget ) { for ( auto plotAxis : allPlotAxes() ) { @@ -812,7 +812,7 @@ void RimSummaryPlot::updateYAxis( RiaDefines::PlotAxis plotAxis ) if ( !m_plotWidget ) return; QwtPlot::Axis qwtAxis = QwtPlot::yLeft; - if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { qwtAxis = QwtPlot::yLeft; } @@ -851,7 +851,7 @@ void RimSummaryPlot::updateYAxis( RiaDefines::PlotAxis plotAxis ) //-------------------------------------------------------------------------------------------------- void RimSummaryPlot::updateZoomForAxis( RiaDefines::PlotAxis plotAxis ) { - if ( plotAxis == RiaDefines::PLOT_AXIS_BOTTOM ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ) { if ( m_isCrossPlot ) { @@ -942,7 +942,7 @@ std::vector RimSummaryPlot::visibleSummaryCurvesForAxis( RiaDe { std::vector curves; - if ( plotAxis == RiaDefines::PLOT_AXIS_BOTTOM ) + if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ) { if ( m_summaryCurveCollection && m_summaryCurveCollection->isCurvesVisible() ) { @@ -1016,7 +1016,7 @@ RimPlotAxisProperties* RimSummaryPlot::yAxisPropertiesLeftOrRight( RiaDefines::P { RimPlotAxisProperties* yAxisProps = nullptr; - if ( leftOrRightPlotAxis == RiaDefines::PLOT_AXIS_LEFT ) + if ( leftOrRightPlotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT ) { yAxisProps = m_leftYAxisProperties(); } @@ -1041,7 +1041,7 @@ std::vector RimSummaryPlot::visibleTimeHistoryCurvesFo { if ( c->isCurveVisible() ) { - if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PLOT_AXIS_BOTTOM ) + if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ) { curves.push_back( c ); } @@ -1062,7 +1062,7 @@ std::vector RimSummaryPlot::visibleAsciiDataCurvesForAxis( R { if ( c->isCurveVisible() ) { - if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PLOT_AXIS_BOTTOM ) + if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ) { curves.push_back( c ); } @@ -1162,9 +1162,9 @@ void RimSummaryPlot::updateBottomXAxis() std::set timeHistoryQuantities; RimSummaryPlotAxisFormatter calc( bottomAxisProperties, - visibleSummaryCurvesForAxis( RiaDefines::PLOT_AXIS_BOTTOM ), + visibleSummaryCurvesForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ), {}, - visibleAsciiDataCurvesForAxis( RiaDefines::PLOT_AXIS_BOTTOM ), + visibleAsciiDataCurvesForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ), timeHistoryQuantities ); calc.applyAxisPropertiesToPlot( m_plotWidget ); } @@ -1493,9 +1493,9 @@ void RimSummaryPlot::updateZoomInQwt() { if ( m_plotWidget ) { - updateZoomForAxis( RiaDefines::PLOT_AXIS_BOTTOM ); - updateZoomForAxis( RiaDefines::PLOT_AXIS_LEFT ); - updateZoomForAxis( RiaDefines::PLOT_AXIS_RIGHT ); + updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ); + updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ); + updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT ); m_plotWidget->updateAxes(); updateZoomFromQwt(); diff --git a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp index d0beabed89..8b57509c3a 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimSummaryPlotAxisFormatter.cpp @@ -231,7 +231,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const { continue; } - else if ( m_axisProperties->plotAxisType() == RiaDefines::PLOT_AXIS_BOTTOM ) + else if ( m_axisProperties->plotAxisType() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ) { sumAddress = rimCurve->summaryAddressX(); unitText = rimCurve->unitNameX(); diff --git a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp index c2234ca4ee..d37b3a65cf 100644 --- a/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigCaseCellResultsData.cpp @@ -1724,8 +1724,8 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex if ( m_readerInterface.isNull() ) return; std::set phases = m_readerInterface->availablePhases(); - if ( phases.count( RiaDefines::GAS_PHASE ) == 0 ) return; - if ( phases.count( RiaDefines::OIL_PHASE ) > 0 ) return; + if ( phases.count( RiaDefines::PhaseType::GAS_PHASE ) == 0 ) return; + if ( phases.count( RiaDefines::PhaseType::OIL_PHASE ) > 0 ) return; // Simulation type is gas and water. No SGAS is present, compute SGAS based on SWAT diff --git a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp index 85081cc377..a761724fc5 100644 --- a/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp +++ b/ApplicationCode/ReservoirDataModel/RigLasFileExporter.cpp @@ -178,44 +178,53 @@ public: const RigWellLogCurveData* firstCurveData = curveDataForFirstCurve(); - if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER ) + if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER ) { - lasFile->AddLog( "DEPTH", "M", "Depth in meters", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) ); + lasFile->AddLog( "DEPTH", + "M", + "Depth in meters", + firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) ); } - else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET ) + else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET ) { - lasFile->AddLog( "DEPTH", "FT", "Depth in feet", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) ); + lasFile->AddLog( "DEPTH", + "FT", + "Depth in feet", + firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) ); } - else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE ) + else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_NONE ) { - lasFile->AddLog( "DEPTH", "", "Depth in Connection number", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) ); + lasFile->AddLog( "DEPTH", + "", + "Depth in Connection number", + firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) ); } - if ( firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH ).size() ) + if ( firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ).size() ) { lasFile->AddLog( "TVDMSL", "M", "True vertical depth in meters", - firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH ) ); + firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) ); if ( m_exportTvdrkb && m_rkbDiff != -1.0 ) { // Export True Vertical Depth Rotary Kelly Bushing - TVDRKB - std::vector tvdrkbValues = firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH ); + std::vector tvdrkbValues = firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ); for ( auto& value : tvdrkbValues ) { value += m_rkbDiff; } - if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER ) + if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER ) { lasFile->AddLog( "TVDRKB", "M", "True vertical depth (Rotary Kelly Bushing)", tvdrkbValues ); } - else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET ) + else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET ) { lasFile->AddLog( "TVDRKB", "FT", "True vertical depth (Rotary Kelly Bushing)", tvdrkbValues ); } - else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE ) + else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_NONE ) { CVF_ASSERT( false ); lasFile->AddLog( "TVDRKB", "", "", tvdrkbValues ); @@ -225,16 +234,19 @@ public: double minDepth = 0.0; double maxDepth = 0.0; - firstCurveData->calculateDepthRange( RiaDefines::MEASURED_DEPTH, firstCurveData->depthUnit(), &minDepth, &maxDepth ); + firstCurveData->calculateDepthRange( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, + firstCurveData->depthUnit(), + &minDepth, + &maxDepth ); lasFile->setStartDepth( minDepth ); lasFile->setStopDepth( maxDepth ); - if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER ) + if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER ) { lasFile->setDepthUnit( "M" ); } - else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET ) + else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET ) { lasFile->setDepthUnit( "FT" ); } diff --git a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp index f614d36771..0821432220 100644 --- a/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp +++ b/ApplicationCode/ReservoirDataModel/RigTofWellDistributionCalculator.cpp @@ -70,11 +70,11 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe } QString phaseResultName; - if ( phase == RiaDefines::WATER_PHASE ) + if ( phase == RiaDefines::PhaseType::WATER_PHASE ) phaseResultName = "SWAT"; - else if ( phase == RiaDefines::OIL_PHASE ) + else if ( phase == RiaDefines::PhaseType::OIL_PHASE ) phaseResultName = "SOIL"; - else if ( phase == RiaDefines::GAS_PHASE ) + else if ( phase == RiaDefines::PhaseType::GAS_PHASE ) phaseResultName = "SGAS"; const std::vector* phaseResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL, RiaDefines::ResultCatType::DYNAMIC_NATIVE, diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp index 1ecb03904d..bbe2fc0629 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogCurveData.cpp @@ -34,7 +34,7 @@ RigWellLogCurveData::RigWellLogCurveData() { m_isExtractionCurve = false; - m_depthUnit = RiaDefines::UNIT_METER; + m_depthUnit = RiaDefines::DepthUnitType::UNIT_METER; m_xUnitString = RiaWellLogUnitTools::noUnitString(); } @@ -117,11 +117,12 @@ std::vector RigWellLogCurveData::xValues() const std::vector RigWellLogCurveData::xValues( const QString& units ) const { std::vector convertedValues; - if ( units != m_xUnitString && RiaWellLogUnitTools::convertValues( depths( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ), - m_xValues, - &convertedValues, - m_xUnitString, - units ) ) + if ( units != m_xUnitString && + RiaWellLogUnitTools::convertValues( depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ), + m_xValues, + &convertedValues, + m_xUnitString, + units ) ) { return convertedValues; } @@ -149,18 +150,20 @@ std::vector RigWellLogCurveData::depths( RiaDefines::DepthTypeEnum depth if ( m_rkbDiff != 0.0 ) { - if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB && m_depths.count( RiaDefines::TRUE_VERTICAL_DEPTH ) ) + if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB && + m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) ) { - std::vector tvds = depths( RiaDefines::TRUE_VERTICAL_DEPTH ); + std::vector tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ); for ( double& tvdValue : tvds ) { tvdValue += m_rkbDiff; } return tvds; } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH && m_depths.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH && + m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) ) { - std::vector tvds = depths( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ); + std::vector tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ); for ( double& tvdValue : tvds ) { tvdValue -= m_rkbDiff; @@ -185,14 +188,15 @@ std::set RigWellLogCurveData::availableDepthTypes() c if ( m_rkbDiff != 0.0 ) { - if ( depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH ) && !depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) ) + if ( depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) && + !depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) ) { - depthTypes.insert( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ); + depthTypes.insert( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ); } - else if ( depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) && - !depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH ) ) + else if ( depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) && + !depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) ) { - depthTypes.insert( RiaDefines::TRUE_VERTICAL_DEPTH ); + depthTypes.insert( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ); } } @@ -255,8 +259,8 @@ cvf::ref RigWellLogCurveData::calculateResampledCurveData( bool isTVDAvailable = false; std::vector tvDepths; - auto mdIt = m_depths.find( RiaDefines::MEASURED_DEPTH ); - auto tvdIt = m_depths.find( RiaDefines::TRUE_VERTICAL_DEPTH ); + auto mdIt = m_depths.find( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ); + auto tvdIt = m_depths.find( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ); if ( tvdIt != m_depths.end() && !tvdIt->second.empty() ) isTVDAvailable = true; @@ -306,12 +310,18 @@ cvf::ref RigWellLogCurveData::calculateResampledCurveData( if ( isTVDAvailable ) { std::map> resampledDepths = - {{RiaDefines::TRUE_VERTICAL_DEPTH, tvDepths}, {RiaDefines::MEASURED_DEPTH, measuredDepths}}; + {{RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvDepths}, + {RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepths}}; reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true ); } else { - reSampledData->setValuesAndDepths( xValues, measuredDepths, RiaDefines::MEASURED_DEPTH, 0.0, m_depthUnit, m_isExtractionCurve ); + reSampledData->setValuesAndDepths( xValues, + measuredDepths, + RiaDefines::DepthTypeEnum::MEASURED_DEPTH, + 0.0, + m_depthUnit, + m_isExtractionCurve ); } return reSampledData; @@ -337,7 +347,7 @@ void RigWellLogCurveData::calculateIntervalsOfContinousValidValues() for ( size_t intIdx = 0; intIdx < intervalsCount; intIdx++ ) { std::vector> depthValuesIntervals; - splitIntervalAtEmptySpace( m_depths[RiaDefines::MEASURED_DEPTH], + splitIntervalAtEmptySpace( m_depths[RiaDefines::DepthTypeEnum::MEASURED_DEPTH], intervalsOfValidValues[intIdx].first, intervalsOfValidValues[intIdx].second, &depthValuesIntervals ); diff --git a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp index 35894b5414..092ad44738 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellLogFile.cpp @@ -241,15 +241,15 @@ QString RigWellLogFile::wellLogChannelUnitString( const QString& well { if ( displayDepthUnit != depthUnit() ) { - if ( displayDepthUnit == RiaDefines::UNIT_METER ) + if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_METER ) { return "M"; } - else if ( displayDepthUnit == RiaDefines::UNIT_FEET ) + else if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_FEET ) { return "FT"; } - else if ( displayDepthUnit == RiaDefines::UNIT_NONE ) + else if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_NONE ) { CVF_ASSERT( false ); return ""; @@ -296,11 +296,11 @@ bool RigWellLogFile::hasTvdRkbChannel() const //-------------------------------------------------------------------------------------------------- RiaDefines::DepthUnitType RigWellLogFile::depthUnit() const { - RiaDefines::DepthUnitType unitType = RiaDefines::UNIT_METER; + RiaDefines::DepthUnitType unitType = RiaDefines::DepthUnitType::UNIT_METER; if ( depthUnitString().toUpper() == "F" || depthUnitString().toUpper() == "FT" ) { - unitType = RiaDefines::UNIT_FEET; + unitType = RiaDefines::DepthUnitType::UNIT_FEET; } return unitType; diff --git a/ApplicationCode/ReservoirDataModel/RigWellPathFormations.cpp b/ApplicationCode/ReservoirDataModel/RigWellPathFormations.cpp index 68b0c4472d..8334df080b 100644 --- a/ApplicationCode/ReservoirDataModel/RigWellPathFormations.cpp +++ b/ApplicationCode/ReservoirDataModel/RigWellPathFormations.cpp @@ -55,7 +55,7 @@ void RigWellPathFormations::depthAndFormationNamesWithoutDuplicatesOnDepth( std: { std::map tempMakeVectorUniqueOnMeasuredDepth; - if ( depthType == RiaDefines::MEASURED_DEPTH ) + if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) { for ( const std::pair& formation : m_formations ) { @@ -77,7 +77,7 @@ void RigWellPathFormations::depthAndFormationNamesWithoutDuplicatesOnDepth( std: } } } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { for ( const std::pair& formation : m_formations ) { @@ -169,7 +169,7 @@ void RigWellPathFormations::evaluateFormationsForOnePosition( { double depth; - if ( depthType == RiaDefines::MEASURED_DEPTH ) + if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) { if ( position == TOP ) { @@ -180,7 +180,7 @@ void RigWellPathFormations::evaluateFormationsForOnePosition( depth = formation.first.mdBase; } } - else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { if ( position == TOP ) { @@ -237,11 +237,11 @@ void RigWellPathFormations::evaluateFluids( const std::vectordescendantsIncludingThisOfType( attributeCollection ); for ( const RimWellPathAttribute* otherAttribute : attributeCollection.front()->attributes() ) { - if ( otherAttribute->componentType() == RiaDefines::CASING ) + if ( otherAttribute->componentType() == RiaDefines::WellPathComponentType::CASING ) { uniqueCasingDiameters.insert( otherAttribute->diameterInInches() ); } @@ -148,7 +148,7 @@ void RiuWellPathComponentPlotItem::calculateColumnOffsets( const RimWellPathComp m_maxColumnOffset = ( uniqueCasingDiameters.size() - 1 ) * 0.25; const RimWellPathAttribute* myAttribute = dynamic_cast( component ); - if ( myAttribute && myAttribute->componentType() == RiaDefines::CASING ) + if ( myAttribute && myAttribute->componentType() == RiaDefines::WellPathComponentType::CASING ) { int nNarrowerCasings = std::count_if( uniqueCasingDiameters.begin(), uniqueCasingDiameters.end(), @@ -172,11 +172,11 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) double casingTrackEnd = 0.75 + m_maxColumnOffset; - if ( m_componentType == RiaDefines::WELL_PATH ) + if ( m_componentType == RiaDefines::WellPathComponentType::WELL_PATH ) { addColumnFeature( -0.25, 0.25, startDepth, endDepth, componentColor() ); } - else if ( m_componentType == RiaDefines::CASING ) + else if ( m_componentType == RiaDefines::WellPathComponentType::CASING ) { double posMin = 0.5 + m_columnOffset; double posMax = 0.75 + m_columnOffset; @@ -186,13 +186,13 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) addMarker( posMax, endDepth, 12, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor() ); addMarker( casingTrackEnd, endDepth, 12, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() ); } - else if ( m_componentType == RiaDefines::LINER ) + else if ( m_componentType == RiaDefines::WellPathComponentType::LINER ) { addColumnFeature( -0.5, -0.25, startDepth, endDepth, componentColor() ); addColumnFeature( 0.25, 0.5, startDepth, endDepth, componentColor() ); addMarker( casingTrackEnd, endDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() ); } - else if ( m_componentType == RiaDefines::PERFORATION_INTERVAL ) + else if ( m_componentType == RiaDefines::WellPathComponentType::PERFORATION_INTERVAL ) { addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::Dense6Pattern ); addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::Dense6Pattern ); @@ -218,13 +218,13 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) m_combinedComponentGroup.addLegendItem( legendItem1 ); m_combinedComponentGroup.addLegendItem( legendItem2 ); } - else if ( m_componentType == RiaDefines::FISHBONES ) + else if ( m_componentType == RiaDefines::WellPathComponentType::FISHBONES ) { addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::BDiagPattern ); addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::FDiagPattern ); addMarker( casingTrackEnd, midDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() ); } - else if ( m_componentType == RiaDefines::FRACTURE ) + else if ( m_componentType == RiaDefines::WellPathComponentType::FRACTURE ) { addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::SolidPattern ); addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::SolidPattern ); @@ -254,7 +254,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) label(), Qt::AlignTop | Qt::AlignRight ); } - else if ( m_componentType == RiaDefines::ICD ) + else if ( m_componentType == RiaDefines::WellPathComponentType::ICD ) { for ( double md : m_subMDs ) { @@ -263,7 +263,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) m_combinedComponentGroup.addLegendItem( createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) ); } - else if ( m_componentType == RiaDefines::ICV ) + else if ( m_componentType == RiaDefines::WellPathComponentType::ICV ) { for ( double md : m_subMDs ) { @@ -272,7 +272,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) m_combinedComponentGroup.addLegendItem( createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) ); } - else if ( m_componentType == RiaDefines::AICD ) + else if ( m_componentType == RiaDefines::WellPathComponentType::AICD ) { for ( double md : m_subMDs ) { @@ -281,7 +281,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot ) m_combinedComponentGroup.addLegendItem( createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) ); } - else if ( m_componentType == RiaDefines::PACKER ) + else if ( m_componentType == RiaDefines::WellPathComponentType::PACKER ) { addColumnFeature( -1.1 * casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::DiagCrossPattern ); addColumnFeature( 0.25, 1.1 * casingTrackEnd, startDepth, endDepth, componentColor(), Qt::DiagCrossPattern ); @@ -299,7 +299,8 @@ std::pair RiuWellPathComponentPlotItem::depthsOfDepthType() cons double startDepth = m_startMD; double endDepth = m_endMD; - if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH || m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH || + m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { endDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_endMD ).z(); double rkbDiff = m_wellPath->wellPathGeometry()->rkbDiff(); @@ -308,14 +309,14 @@ std::pair RiuWellPathComponentPlotItem::depthsOfDepthType() cons rkbDiff = 0.0; } - if ( m_componentType == RiaDefines::WELL_PATH ) + if ( m_componentType == RiaDefines::WellPathComponentType::WELL_PATH ) { startDepth = 0.0; - if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH ) + if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) { startDepth -= rkbDiff; } - else if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + else if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { endDepth += m_wellPath->wellPathGeometry()->rkbDiff(); } @@ -323,7 +324,7 @@ std::pair RiuWellPathComponentPlotItem::depthsOfDepthType() cons else { startDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_startMD ).z(); - if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) + if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) { startDepth += m_wellPath->wellPathGeometry()->rkbDiff(); endDepth += m_wellPath->wellPathGeometry()->rkbDiff();