diff --git a/ApplicationCode/Application/RiaFractureDefines.cpp b/ApplicationCode/Application/RiaFractureDefines.cpp index c38e69d9fa..63a4058498 100644 --- a/ApplicationCode/Application/RiaFractureDefines.cpp +++ b/ApplicationCode/Application/RiaFractureDefines.cpp @@ -61,3 +61,19 @@ double RiaDefines::nonDarcyFlowAlpha( RiaEclipseUnitTools::UnitSystem unitSystem return 0.0; } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaDefines::faciesColorLegendName() +{ + return "Facies colors"; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +QString RiaDefines::rockTypeColorLegendName() +{ + return "Rock Types"; +} diff --git a/ApplicationCode/Application/RiaFractureDefines.h b/ApplicationCode/Application/RiaFractureDefines.h index eb807c32d7..eb4819afc8 100644 --- a/ApplicationCode/Application/RiaFractureDefines.h +++ b/ApplicationCode/Application/RiaFractureDefines.h @@ -28,4 +28,7 @@ QString conductivityResultName(); QString unitStringConductivity( RiaEclipseUnitTools::UnitSystem unitSystem ); double nonDarcyFlowAlpha( RiaEclipseUnitTools::UnitSystem unitSystem ); + +QString faciesColorLegendName(); +QString rockTypeColorLegendName(); }; // namespace RiaDefines diff --git a/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp b/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp index 6527ab77c6..2257aed67d 100644 --- a/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp +++ b/ApplicationCode/Commands/CompletionCommands/RicNewFractureModelPlotFeature.cpp @@ -20,6 +20,7 @@ #include "RiaApplication.h" #include "RiaColorTables.h" +#include "RiaFractureDefines.h" #include "RiaGuiApplication.h" #include "RiaLogging.h" @@ -232,7 +233,8 @@ void RicNewFractureModelPlotFeature::createFaciesTrack( RimFractureModelPlot* pl faciesTrack->setAnnotationType( RiuPlotAnnotationTool::RegionAnnotationType::RESULT_PROPERTY_ANNOTATIONS ); faciesTrack->setRegionPropertyResultType( RiaDefines::ResultCatType::INPUT_PROPERTY, defaultProperty ); - RimColorLegend* faciesColors = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" ); + RimColorLegend* faciesColors = + RimProject::current()->colorLegendCollection()->findByName( RiaDefines::faciesColorLegendName() ); if ( faciesColors ) { faciesTrack->setColorShadingLegend( faciesColors ); @@ -282,7 +284,8 @@ void RicNewFractureModelPlotFeature::createLayersTrack( RimFractureModelPlot* pl faciesTrack->setFormationWellPath( fractureModel->thicknessDirectionWellPath() ); faciesTrack->setFormationCase( eclipseCase ); - RimColorLegend* faciesColors = RimProject::current()->colorLegendCollection()->findByName( "Facies colors" ); + RimColorLegend* faciesColors = + RimProject::current()->colorLegendCollection()->findByName( RiaDefines::faciesColorLegendName() ); if ( faciesColors ) { faciesTrack->setColorShadingLegend( faciesColors ); diff --git a/ApplicationCode/Commands/RicImportFaciesFeature.cpp b/ApplicationCode/Commands/RicImportFaciesFeature.cpp index 5547035b5c..a6518bbe9f 100644 --- a/ApplicationCode/Commands/RicImportFaciesFeature.cpp +++ b/ApplicationCode/Commands/RicImportFaciesFeature.cpp @@ -20,6 +20,7 @@ #include "RiaApplication.h" #include "RiaColorTables.h" +#include "RiaFractureDefines.h" #include "RiaLogging.h" #include "RiaStdStringTools.h" @@ -79,10 +80,10 @@ void RicImportFaciesFeature::onActionTriggered( bool isChecked ) const caf::ColorTable& colorTable = RiaColorTables::contrastCategoryPaletteColors(); RimColorLegendCollection* colorLegendCollection = RimProject::current()->colorLegendCollection; - RimColorLegend* rockTypeColorLegend = colorLegendCollection->findByName( "Rock Types" ); + RimColorLegend* rockTypeColorLegend = colorLegendCollection->findByName( RiaDefines::rockTypeColorLegendName() ); RimColorLegend* colorLegend = new RimColorLegend; - colorLegend->setColorLegendName( "Facies colors" ); + colorLegend->setColorLegendName( RiaDefines::faciesColorLegendName() ); for ( auto it : codeNames ) { diff --git a/ApplicationCode/ProjectDataModel/RimColorLegendCollection.cpp b/ApplicationCode/ProjectDataModel/RimColorLegendCollection.cpp index f2e723619e..2a7cf3364a 100644 --- a/ApplicationCode/ProjectDataModel/RimColorLegendCollection.cpp +++ b/ApplicationCode/ProjectDataModel/RimColorLegendCollection.cpp @@ -17,11 +17,14 @@ ///////////////////////////////////////////////////////////////////////////////// #include "RimColorLegendCollection.h" -#include "RimColorLegend.h" -#include "RimRegularLegendConfig.h" +#include "RiaFractureDefines.h" + +#include "RimColorLegend.h" #include "RimColorLegendItem.h" #include "RimProject.h" +#include "RimRegularLegendConfig.h" + #include CAF_PDM_SOURCE_INIT( RimColorLegendCollection, "ColorLegendCollection" ); @@ -183,7 +186,7 @@ RimColorLegendItem* RimColorLegendCollection::createColorLegendItem( const QStri RimColorLegend* RimColorLegendCollection::createRockTypeColorLegend() const { RimColorLegend* colorLegend = new RimColorLegend; - colorLegend->setColorLegendName( "Rock Types" ); + colorLegend->setColorLegendName( RiaDefines::rockTypeColorLegendName() ); // Rock types colors taken from "Equinor GeoStandard - May 2020" document. // 6.3.1 Epiclastic rocks diff --git a/ApplicationCode/ProjectDataModel/RimElasticPropertiesCurve.cpp b/ApplicationCode/ProjectDataModel/RimElasticPropertiesCurve.cpp index e03773a7b7..2bea6dbafe 100644 --- a/ApplicationCode/ProjectDataModel/RimElasticPropertiesCurve.cpp +++ b/ApplicationCode/ProjectDataModel/RimElasticPropertiesCurve.cpp @@ -48,6 +48,7 @@ #include "RiuQwtPlotWidget.h" #include "RiaApplication.h" +#include "RiaFractureDefines.h" #include "RiaLogging.h" #include "RiaPreferences.h" @@ -212,7 +213,7 @@ void RimElasticPropertiesCurve::performDataExtraction( bool* isUsingPseudoLength fractureModelPlot->getPorosityValues( poroValues ); // TODO: make this settable?? - QString colorLegendName = "Facies colors"; + QString colorLegendName = RiaDefines::faciesColorLegendName(); RimColorLegend* colorLegend = RimProject::current()->colorLegendCollection()->findByName( colorLegendName ); if ( !colorLegend ) {