diff --git a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp index b87d7d9c9e..2db16ba7a8 100644 --- a/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp +++ b/ApplicationCode/GeoMech/GeoMechVisualization/RivFemPartPartMgr.cpp @@ -33,7 +33,7 @@ #include "RimEclipseView.h" #include "RimGeoMechCellColors.h" #include "RimGeoMechView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RivFemPickSourceInfo.h" #include "RivPartPriority.h" diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp index 2a9d25cc2d..7506558e71 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionBoxPartMgr.cpp @@ -32,7 +32,7 @@ #include "RimGeoMechCellColors.h" #include "RimGeoMechView.h" #include "RimIntersectionBox.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RivIntersectionBoxSourceInfo.h" diff --git a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp index 40fc47bd23..4464ec8e0d 100644 --- a/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/Intersections/RivIntersectionPartMgr.cpp @@ -34,7 +34,7 @@ #include "RimGeoMechCase.h" #include "RimGeoMechCellColors.h" #include "RimGeoMechView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInView.h" #include "RimSimWellInViewCollection.h" #include "RimTernaryLegendConfig.h" diff --git a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp index f881280dc7..0b6cf69ba0 100644 --- a/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp +++ b/ApplicationCode/ModelVisualization/RivCellEdgeGeometryUtils.cpp @@ -32,7 +32,7 @@ #include "RimEclipseCellColors.h" #include "RimEclipseView.h" #include "RimSimWellInViewCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RivTernaryTextureCoordsCreator.h" diff --git a/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp b/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp index a440b24930..f2a06238fa 100644 --- a/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivFaultPartMgr.cpp @@ -31,7 +31,7 @@ #include "RimEclipseView.h" #include "RimFaultInView.h" #include "RimFaultInViewCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RivFaultGeometryGenerator.h" diff --git a/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp b/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp index 4c3249611d..b4a178c60c 100644 --- a/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivGridPartMgr.cpp @@ -32,7 +32,7 @@ #include "RimEclipseCellColors.h" #include "RimEclipseView.h" #include "RimSimWellInViewCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimReservoirCellResultsStorage.h" #include "RimTernaryLegendConfig.h" diff --git a/ApplicationCode/ModelVisualization/RivScalarMapperUtils.cpp b/ApplicationCode/ModelVisualization/RivScalarMapperUtils.cpp index fdbf6a1f4b..36f83ac76e 100644 --- a/ApplicationCode/ModelVisualization/RivScalarMapperUtils.cpp +++ b/ApplicationCode/ModelVisualization/RivScalarMapperUtils.cpp @@ -24,7 +24,7 @@ #include "RimCellEdgeColors.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RivCellEdgeEffectGenerator.h" diff --git a/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp index fa6d0e464e..0d9ab92959 100644 --- a/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivSimWellPipesPartMgr.cpp @@ -29,7 +29,7 @@ #include "Rim3dView.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInView.h" #include "RimSimWellInViewCollection.h" #include "RimVirtualPerforationResults.h" diff --git a/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp b/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp index 53647c90ec..18a4ced74e 100644 --- a/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivTensorResultPartMgr.cpp @@ -22,7 +22,7 @@ #include "RimGeoMechCase.h" #include "RimGeoMechView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTensorResults.h" #include "RigFemPartCollection.h" diff --git a/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp b/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp index 1db9149f92..185f9b7bc3 100644 --- a/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp +++ b/ApplicationCode/ModelVisualization/RivTextureCoordsCreator.cpp @@ -27,7 +27,7 @@ #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInViewCollection.h" #include "RivResultToTextureMapper.h" diff --git a/ApplicationCode/ModelVisualization/RivWellConnectionFactorPartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellConnectionFactorPartMgr.cpp index b481d12924..5e200e2f86 100644 --- a/ApplicationCode/ModelVisualization/RivWellConnectionFactorPartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellConnectionFactorPartMgr.cpp @@ -29,7 +29,7 @@ #include "RimEclipseCase.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInViewCollection.h" #include "RimVirtualPerforationResults.h" #include "RimWellPath.h" diff --git a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp index 68c134bde8..187306ff3e 100644 --- a/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp +++ b/ApplicationCode/ModelVisualization/RivWellFracturePartMgr.cpp @@ -33,7 +33,7 @@ #include "RimFracture.h" #include "RimFractureContainment.h" #include "RimFractureTemplate.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInView.h" #include "RimStimPlanColors.h" #include "RimStimPlanFractureTemplate.h" @@ -360,7 +360,7 @@ cvf::ref RivWellFracturePartMgr::createEllipseSurfacePart(const RimEc cvf::Color4f fractureColor = cvf::Color4f(activeView.fractureColors()->defaultColor()); - RimLegendConfig* legendConfig = nullptr; + RimRegularLegendConfig* legendConfig = nullptr; if (activeView.fractureColors() && activeView.fractureColors()->isChecked()) { legendConfig = activeView.fractureColors()->activeLegend(); @@ -421,7 +421,7 @@ cvf::ref RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa cvf::Mat4d fractureXf = m_rimFracture->transformMatrix(); std::vector nodeDisplayCoords = transformToFractureDisplayCoords(nodeCoords, fractureXf, *displayCoordTransform); - RimLegendConfig* legendConfig = nullptr; + RimRegularLegendConfig* legendConfig = nullptr; if (activeView.fractureColors() && activeView.fractureColors()->isChecked()) { legendConfig = activeView.fractureColors()->activeLegend(); @@ -545,7 +545,7 @@ cvf::ref RivWellFracturePartMgr::createStimPlanElementColorSurfacePar { std::vector stimPlanCells = stimPlanFracTemplate->fractureGrid()->fractureCells(); - RimLegendConfig* legendConfig = nullptr; + RimRegularLegendConfig* legendConfig = nullptr; if (activeView.fractureColors() && activeView.fractureColors()->isChecked() && activeView.fractureColors()->activeLegend()) diff --git a/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake b/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake index 49c2a46248..64f7f7d33d 100644 --- a/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake +++ b/ApplicationCode/ProjectDataModel/CMakeLists_files.cmake @@ -8,7 +8,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimPropertyFilterCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipsePropertyFilterCollection.h ${CMAKE_CURRENT_LIST_DIR}/RimCellRangeFilter.h ${CMAKE_CURRENT_LIST_DIR}/RimCellRangeFilterCollection.h -${CMAKE_CURRENT_LIST_DIR}/RimLegendConfig.h +${CMAKE_CURRENT_LIST_DIR}/RimRegularLegendConfig.h ${CMAKE_CURRENT_LIST_DIR}/RimOilField.h ${CMAKE_CURRENT_LIST_DIR}/RimProject.h ${CMAKE_CURRENT_LIST_DIR}/RimEclipseCase.h @@ -115,7 +115,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RimPropertyFilterCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipsePropertyFilterCollection.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCellRangeFilter.cpp ${CMAKE_CURRENT_LIST_DIR}/RimCellRangeFilterCollection.cpp -${CMAKE_CURRENT_LIST_DIR}/RimLegendConfig.cpp +${CMAKE_CURRENT_LIST_DIR}/RimRegularLegendConfig.cpp ${CMAKE_CURRENT_LIST_DIR}/RimOilField.cpp ${CMAKE_CURRENT_LIST_DIR}/RimProject.cpp ${CMAKE_CURRENT_LIST_DIR}/RimEclipseCase.cpp diff --git a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp index 37ba2a54c9..834f8d518e 100644 --- a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp +++ b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.cpp @@ -25,7 +25,7 @@ #include "RimEclipseCellColors.h" #include "RimGeoMechView.h" #include "RimGeoMechCellColors.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RimSimWellInView.h" #include "RimWellPath.h" @@ -68,7 +68,7 @@ Rim2dIntersectionView::Rim2dIntersectionView(void) m_legendConfig.uiCapability()->setUiHidden(true); m_legendConfig.uiCapability()->setUiTreeChildrenHidden(true); m_legendConfig.xmlCapability()->disableIO(); - m_legendConfig = new RimLegendConfig(); + m_legendConfig = new RimRegularLegendConfig(); CAF_PDM_InitFieldNoDefault(&m_ternaryLegendConfig, "TernaryLegendDefinition", "Ternary Legend Definition", "", "", ""); m_ternaryLegendConfig.uiCapability()->setUiTreeHidden(true); diff --git a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.h b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.h index 7828702e36..85c5b2177c 100644 --- a/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.h +++ b/ApplicationCode/ProjectDataModel/Rim2dIntersectionView.h @@ -22,7 +22,7 @@ #include "cafPdmPtrField.h" class RimIntersection; -class RimLegendConfig; +class RimRegularLegendConfig; class RimTernaryLegendConfig; class RivSimWellPipesPartMgr; class RivWellHeadPartMgr; @@ -93,7 +93,7 @@ protected: int timeStepCount(); - caf::PdmChildField m_legendConfig; + caf::PdmChildField m_legendConfig; caf::PdmChildField m_ternaryLegendConfig; caf::PdmPtrField m_intersection; diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp index b42817b761..6f3e73f500 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.cpp @@ -25,7 +25,7 @@ #include "RimEclipseCellColors.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimReservoirCellResultsStorage.h" #include "cafPdmUiListEditor.h" @@ -70,7 +70,7 @@ RimCellEdgeColors::RimCellEdgeColors() m_resultVariable.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName()); - m_legendConfig = new RimLegendConfig(); + m_legendConfig = new RimRegularLegendConfig(); m_ignoredResultScalar = cvf::UNDEFINED_DOUBLE; resetResultIndices(); @@ -593,7 +593,7 @@ RimEclipseCellColors* RimCellEdgeColors::singleVarEdgeResultColors() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig* RimCellEdgeColors::legendConfig() +RimRegularLegendConfig* RimCellEdgeColors::legendConfig() { if (isUsingSingleVariable()) { diff --git a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h index b427a94ea7..c5e99c7608 100644 --- a/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h +++ b/ApplicationCode/ProjectDataModel/RimCellEdgeColors.h @@ -30,7 +30,7 @@ class RigCaseCellResultsData; class RimEclipseCase; class RimEclipseCellColors; class RimEclipseView; -class RimLegendConfig; +class RimRegularLegendConfig; class RimCellEdgeMetaData { @@ -86,7 +86,7 @@ public: bool isUsingSingleVariable() const; RimEclipseCellColors* singleVarEdgeResultColors(); - RimLegendConfig* legendConfig(); + RimRegularLegendConfig* legendConfig(); PropertyType propertyType() const; void minMaxCellEdgeValues(double& min, double& max); @@ -123,7 +123,7 @@ private: caf::PdmField > m_propertyType; - caf::PdmChildField m_legendConfig; + caf::PdmChildField m_legendConfig; caf::PdmChildField m_singleVarEdgeResultColors; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp index d5899d5dc9..3109a37139 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCase.cpp @@ -47,7 +47,7 @@ #include "RimFlowPlotCollection.h" #include "RimFormationNames.h" #include "RimIntersectionCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimMainPlotCollection.h" #include "RimOilField.h" #include "RimPerforationCollection.h" diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp index 8498d7a6c5..7c15f9065c 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -29,7 +29,7 @@ #include "RimEclipseCase.h" #include "RimEclipseFaultColors.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInView.h" #include "RimSimWellInViewCollection.h" #include "RimTernaryLegendConfig.h" @@ -143,7 +143,7 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend) // Not found ? if (!found) { - RimLegendConfig* newLegend = new RimLegendConfig; + RimRegularLegendConfig* newLegend = new RimRegularLegendConfig; newLegend->resultVariableName = resultVarNameOfNewLegend; m_legendConfigData.push_back(newLegend); @@ -168,7 +168,7 @@ void RimEclipseCellColors::initAfterRead() if (obsoleteField_legendConfig) { // The current legend config is NOT stored in in ResInsight up to v 1.3.7-dev - RimLegendConfig* obsoleteLegend = obsoleteField_legendConfig(); + RimRegularLegendConfig* obsoleteLegend = obsoleteField_legendConfig(); // set to NULL before pushing into container obsoleteField_legendConfig = nullptr; @@ -208,19 +208,19 @@ void RimEclipseCellColors::updateLegendCategorySettings() if (this->hasCategoryResult()) { - legendConfig()->setMappingMode(RimLegendConfig::CATEGORY_INTEGER); - legendConfig()->setColorRangeMode(RimLegendConfig::CATEGORY); + legendConfig()->setMappingMode(RimRegularLegendConfig::CATEGORY_INTEGER); + legendConfig()->setColorRangeMode(RimRegularLegendConfig::CATEGORY); } else { - if (legendConfig()->mappingMode() == RimLegendConfig::CATEGORY_INTEGER) + if (legendConfig()->mappingMode() == RimRegularLegendConfig::CATEGORY_INTEGER) { - legendConfig()->setMappingMode(RimLegendConfig::LINEAR_CONTINUOUS); + legendConfig()->setMappingMode(RimRegularLegendConfig::LINEAR_CONTINUOUS); } - if (legendConfig()->colorRangeMode() == RimLegendConfig::CATEGORY) + if (legendConfig()->colorRangeMode() == RimRegularLegendConfig::CATEGORY) { - legendConfig()->setColorRangeMode(RimLegendConfig::NORMAL); + legendConfig()->setColorRangeMode(RimRegularLegendConfig::NORMAL); } } } @@ -274,7 +274,7 @@ public : /// //-------------------------------------------------------------------------------------------------- void RimEclipseCellColors::updateLegendData(size_t currentTimeStep, - RimLegendConfig* legendConfig, + RimRegularLegendConfig* legendConfig, RimTernaryLegendConfig* ternaryLegendConfig) { if (!legendConfig) legendConfig = this->legendConfig(); @@ -514,7 +514,7 @@ void RimEclipseCellColors::setResultVariable(const QString& val) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig* RimEclipseCellColors::legendConfig() +RimRegularLegendConfig* RimEclipseCellColors::legendConfig() { return m_legendConfigPtrField; } diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h index 9812e8cbdb..3962a7ecaa 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.h @@ -27,7 +27,7 @@ #include "cafPdmPtrField.h" class RimTernaryLegendConfig; -class RimLegendConfig; +class RimRegularLegendConfig; //================================================================================================== /// @@ -44,9 +44,9 @@ public: RimEclipseView* reservoirView(); void updateLegendData(size_t timestep, - RimLegendConfig* legendConfig = nullptr, + RimRegularLegendConfig* legendConfig = nullptr, RimTernaryLegendConfig* ternaryLegendConfig = nullptr); - RimLegendConfig* legendConfig(); + RimRegularLegendConfig* legendConfig(); caf::PdmChildField ternaryLegendConfig; virtual void setResultVariable(const QString& resultName); @@ -67,12 +67,12 @@ protected: private: void changeLegendConfig(QString resultVarNameOfNewLegend); - caf::PdmChildArrayField m_legendConfigData; - caf::PdmPtrField m_legendConfigPtrField; + caf::PdmChildArrayField m_legendConfigData; + caf::PdmPtrField m_legendConfigPtrField; caf::PdmPointer m_reservoirView; // Obsolete - caf::PdmChildField obsoleteField_legendConfig; + caf::PdmChildField obsoleteField_legendConfig; }; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp index 0148e97968..52afeb264e 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp @@ -22,7 +22,7 @@ #include "RimEclipseCase.h" #include "RimEclipseCellColors.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTernaryLegendConfig.h" #include "RiuMainWindow.h" diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index b1b0e6b6ad..7d9338719e 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -50,7 +50,7 @@ #include "RimGridCollection.h" #include "RimIntersection.h" #include "RimIntersectionCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimOilField.h" #include "RimProject.h" #include "RimReservoirCellResultsStorage.h" @@ -151,7 +151,7 @@ RimEclipseView::RimEclipseView() this->cellResult()->setReservoirView(this); this->cellEdgeResult()->setReservoirView(this); - this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimLegendConfig::PINK_WHITE); + this->cellEdgeResult()->legendConfig()->setColorRangeMode(RimRegularLegendConfig::PINK_WHITE); this->faultResultSettings()->setReservoirView(this); @@ -1097,7 +1097,7 @@ void RimEclipseView::updateLegends() } } - RimLegendConfig* stimPlanLegend = fractureColors()->activeLegend(); + RimRegularLegendConfig* stimPlanLegend = fractureColors()->activeLegend(); if (stimPlanLegend && stimPlanLegend->showLegend()) { fractureColors()->updateLegendData(); @@ -1112,7 +1112,7 @@ void RimEclipseView::updateLegends() { updateVirtualConnectionLegendRanges(); - RimLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig(); + RimRegularLegendConfig* virtLegend = m_virtualPerforationResult->legendConfig(); m_viewer->addColorLegendToBottomLeftCorner(virtLegend->legend()); } } @@ -1588,7 +1588,7 @@ RimEclipseCellColors* RimEclipseView::currentFaultResultColors() //-------------------------------------------------------------------------------------------------- void RimEclipseView::resetLegendsInViewer() { - RimLegendConfig* cellResultNormalLegendConfig = this->cellResult()->legendConfig(); + RimRegularLegendConfig* cellResultNormalLegendConfig = this->cellResult()->legendConfig(); if (cellResultNormalLegendConfig) cellResultNormalLegendConfig->recreateLegend(); this->cellResult()->ternaryLegendConfig->recreateLegend(); @@ -1623,7 +1623,7 @@ void RimEclipseView::updateVirtualConnectionLegendRanges() if (minValue != HUGE_VAL) { - RimLegendConfig* legendConfig = virtualPerforationResult()->legendConfig(); + RimRegularLegendConfig* legendConfig = virtualPerforationResult()->legendConfig(); legendConfig->setAutomaticRanges(minValue, maxValue, minValue, maxValue); legendConfig->setClosestToZeroValues(posClosestToZero, negClosestToZero, posClosestToZero, negClosestToZero); diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp index b855c7283d..835d1fbdb4 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.cpp @@ -19,7 +19,7 @@ #include "RimGeoMechCellColors.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "Rim3dView.h" #include "RimViewController.h" #include "RimViewLinker.h" @@ -34,7 +34,7 @@ CAF_PDM_SOURCE_INIT(RimGeoMechCellColors, "GeoMechResultSlot"); RimGeoMechCellColors::RimGeoMechCellColors(void) { CAF_PDM_InitFieldNoDefault(&legendConfig, "LegendDefinition", "Legend Definition", "", "", ""); - this->legendConfig = new RimLegendConfig(); + this->legendConfig = new RimRegularLegendConfig(); legendConfig.uiCapability()->setUiHidden(true); } @@ -87,19 +87,19 @@ void RimGeoMechCellColors::updateLegendCategorySettings() { if(this->hasCategoryResult()) { - legendConfig->setMappingMode(RimLegendConfig::CATEGORY_INTEGER); - legendConfig->setColorRangeMode(RimLegendConfig::CATEGORY); + legendConfig->setMappingMode(RimRegularLegendConfig::CATEGORY_INTEGER); + legendConfig->setColorRangeMode(RimRegularLegendConfig::CATEGORY); } else { - if(legendConfig->mappingMode() == RimLegendConfig::CATEGORY_INTEGER) + if(legendConfig->mappingMode() == RimRegularLegendConfig::CATEGORY_INTEGER) { - legendConfig->setMappingMode(RimLegendConfig::LINEAR_CONTINUOUS); + legendConfig->setMappingMode(RimRegularLegendConfig::LINEAR_CONTINUOUS); } - if(legendConfig->colorRangeMode() == RimLegendConfig::CATEGORY) + if(legendConfig->colorRangeMode() == RimRegularLegendConfig::CATEGORY) { - legendConfig->setColorRangeMode(RimLegendConfig::NORMAL); + legendConfig->setColorRangeMode(RimRegularLegendConfig::NORMAL); } } } diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.h b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.h index c3da0cb14c..0e14fdd270 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechCellColors.h @@ -24,7 +24,7 @@ #include "cafPdmChildField.h" #include "cafPdmField.h" -class RimLegendConfig; +class RimRegularLegendConfig; //================================================================================================== @@ -39,7 +39,7 @@ public: RimGeoMechCellColors(void); virtual ~RimGeoMechCellColors(void); - caf::PdmChildField legendConfig; + caf::PdmChildField legendConfig; void updateIconState(); virtual void initAfterRead() override; diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp index 771207fdc3..358791ded3 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.cpp @@ -36,7 +36,7 @@ #include "RimGeoMechPropertyFilterCollection.h" #include "RimGridCollection.h" #include "RimIntersectionCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimTensorResults.h" #include "RimViewLinker.h" @@ -398,7 +398,7 @@ void RimGeoMechView::updateLegends() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimGeoMechView::updateTensorLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex) +void RimGeoMechView::updateTensorLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex) { if (!m_geomechCase || !m_geomechCase->geoMechData()) return; @@ -432,7 +432,7 @@ void RimGeoMechView::updateTensorLegendTextAndRanges(RimLegendConfig* legendConf //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimGeoMechView::updateLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex) +void RimGeoMechView::updateLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex) { if (!m_geomechCase || !m_geomechCase->geoMechData() || !this->isTimeStepDependentDataVisible() diff --git a/ApplicationCode/ProjectDataModel/RimGeoMechView.h b/ApplicationCode/ProjectDataModel/RimGeoMechView.h index cfcc3bae4a..28efa2ff6f 100644 --- a/ApplicationCode/ProjectDataModel/RimGeoMechView.h +++ b/ApplicationCode/ProjectDataModel/RimGeoMechView.h @@ -42,7 +42,7 @@ class RimTensorResults; class RiuViewer; class RivGeoMechPartMgr; class RivGeoMechVizLogic; -class RimLegendConfig; +class RimRegularLegendConfig; class RivTensorResultPartMgr; namespace cvf { @@ -87,7 +87,7 @@ public: virtual void calculateCurrentTotalCellVisibility(cvf::UByteArray* totalVisibility, int timeStep) override; - void updateLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex); + void updateLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex); const cvf::ref vizLogic() const; const RimTensorResults* tensorResults() const; @@ -112,7 +112,7 @@ private: void updateLegends() override; - void updateTensorLegendTextAndRanges(RimLegendConfig* legendConfig, int timeStepIndex); + void updateTensorLegendTextAndRanges(RimRegularLegendConfig* legendConfig, int timeStepIndex); virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override; virtual void initAfterRead() override; diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp similarity index 82% rename from ApplicationCode/ProjectDataModel/RimLegendConfig.cpp rename to ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp index d3693906c3..c70263f3c9 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.cpp @@ -18,7 +18,7 @@ // ///////////////////////////////////////////////////////////////////////////////// -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RiaApplication.h" #include "RiaColorTables.h" @@ -52,66 +52,66 @@ #include -CAF_PDM_SOURCE_INIT(RimLegendConfig, "Legend"); +CAF_PDM_SOURCE_INIT(RimRegularLegendConfig, "Legend"); namespace caf { template<> - void AppEnum::setUp() + void AppEnum::setUp() { - addItem(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS, "AUTOMATIC_ALLTIMESTEPS", "Min and Max for All Timesteps"); - addItem(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP,"AUTOMATIC_CURRENT_TIMESTEP", "Min and Max for Current Timestep"); - addItem(RimLegendConfig::USER_DEFINED, "USER_DEFINED_MAX_MIN", "User Defined Range"); - setDefault(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS); + addItem(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS, "AUTOMATIC_ALLTIMESTEPS", "Min and Max for All Timesteps"); + addItem(RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP,"AUTOMATIC_CURRENT_TIMESTEP", "Min and Max for Current Timestep"); + addItem(RimRegularLegendConfig::USER_DEFINED, "USER_DEFINED_MAX_MIN", "User Defined Range"); + setDefault(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS); } } namespace caf { template<> - void RimLegendConfig::ColorRangeEnum::setUp() + void RimRegularLegendConfig::ColorRangeEnum::setUp() { - addItem(RimLegendConfig::NORMAL, "NORMAL", "Full color, Red on top"); - addItem(RimLegendConfig::OPPOSITE_NORMAL,"OPPOSITE_NORMAL", "Full color, Blue on top"); - addItem(RimLegendConfig::WHITE_PINK, "WHITE_PIMK", "White to pink"); - addItem(RimLegendConfig::PINK_WHITE, "PINK_WHITE", "Pink to white"); - addItem(RimLegendConfig::BLUE_WHITE_RED, "BLUE_WHITE_RED", "Blue, white, red"); - addItem(RimLegendConfig::RED_WHITE_BLUE, "RED_WHITE_BLUE", "Red, white, blue"); - addItem(RimLegendConfig::WHITE_BLACK, "WHITE_BLACK", "White to black"); - addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white"); - addItem(RimLegendConfig::CATEGORY, "CATEGORY", "Category colors"); - addItem(RimLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic"); - addItem(RimLegendConfig::STIMPLAN, "STIMPLAN", "StimPlan colors"); - setDefault(RimLegendConfig::NORMAL); + addItem(RimRegularLegendConfig::NORMAL, "NORMAL", "Full color, Red on top"); + addItem(RimRegularLegendConfig::OPPOSITE_NORMAL,"OPPOSITE_NORMAL", "Full color, Blue on top"); + addItem(RimRegularLegendConfig::WHITE_PINK, "WHITE_PIMK", "White to pink"); + addItem(RimRegularLegendConfig::PINK_WHITE, "PINK_WHITE", "Pink to white"); + addItem(RimRegularLegendConfig::BLUE_WHITE_RED, "BLUE_WHITE_RED", "Blue, white, red"); + addItem(RimRegularLegendConfig::RED_WHITE_BLUE, "RED_WHITE_BLUE", "Red, white, blue"); + addItem(RimRegularLegendConfig::WHITE_BLACK, "WHITE_BLACK", "White to black"); + addItem(RimRegularLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white"); + addItem(RimRegularLegendConfig::CATEGORY, "CATEGORY", "Category colors"); + addItem(RimRegularLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic"); + addItem(RimRegularLegendConfig::STIMPLAN, "STIMPLAN", "StimPlan colors"); + setDefault(RimRegularLegendConfig::NORMAL); } } namespace caf { template<> - void RimLegendConfig::MappingEnum::setUp() + void RimRegularLegendConfig::MappingEnum::setUp() { - addItem(RimLegendConfig::LINEAR_DISCRETE, "LinearDiscrete", "Discrete Linear"); - addItem(RimLegendConfig::LINEAR_CONTINUOUS, "LinearContinuous", "Continuous Linear"); - addItem(RimLegendConfig::LOG10_CONTINUOUS, "Log10Continuous", "Continuous Logarithmic"); - addItem(RimLegendConfig::LOG10_DISCRETE, "Log10Discrete", "Discrete Logarithmic"); - addItem(RimLegendConfig::CATEGORY_INTEGER, "Category", "Category"); - setDefault(RimLegendConfig::LINEAR_CONTINUOUS); + addItem(RimRegularLegendConfig::LINEAR_DISCRETE, "LinearDiscrete", "Discrete Linear"); + addItem(RimRegularLegendConfig::LINEAR_CONTINUOUS, "LinearContinuous", "Continuous Linear"); + addItem(RimRegularLegendConfig::LOG10_CONTINUOUS, "Log10Continuous", "Continuous Logarithmic"); + addItem(RimRegularLegendConfig::LOG10_DISCRETE, "Log10Discrete", "Discrete Logarithmic"); + addItem(RimRegularLegendConfig::CATEGORY_INTEGER, "Category", "Category"); + setDefault(RimRegularLegendConfig::LINEAR_CONTINUOUS); } } namespace caf { template<> - void AppEnum::setUp() + void AppEnum::setUp() { - addItem( RimLegendConfig::AUTO, "AUTO", "Automatic"); - addItem( RimLegendConfig::FIXED, "FIXED", "Fixed, decimal"); - addItem( RimLegendConfig::SCIENTIFIC, "SCIENTIFIC", "Scientific notation"); - setDefault(RimLegendConfig::FIXED); + addItem( RimRegularLegendConfig::AUTO, "AUTO", "Automatic"); + addItem( RimRegularLegendConfig::FIXED, "FIXED", "Fixed, decimal"); + addItem( RimRegularLegendConfig::SCIENTIFIC, "SCIENTIFIC", "Scientific notation"); + setDefault(RimRegularLegendConfig::FIXED); } } //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig::RimLegendConfig() +RimRegularLegendConfig::RimRegularLegendConfig() : m_globalAutoMax(cvf::UNDEFINED_DOUBLE), m_globalAutoMin(cvf::UNDEFINED_DOUBLE), m_localAutoMax(cvf::UNDEFINED_DOUBLE), @@ -127,7 +127,7 @@ RimLegendConfig::RimLegendConfig() m_showLegend.uiCapability()->setUiHidden(true); CAF_PDM_InitField(&m_numLevels, "NumberOfLevels", 8, "Number of Levels", "", "A hint on how many tick marks you whish.",""); CAF_PDM_InitField(&m_precision, "Precision", 4, "Significant Digits", "", "The number of significant digits displayed in the legend numbers",""); - CAF_PDM_InitField(&m_tickNumberFormat, "TickNumberFormat", caf::AppEnum(FIXED), "Number format", "", "",""); + CAF_PDM_InitField(&m_tickNumberFormat, "TickNumberFormat", caf::AppEnum(FIXED), "Number format", "", "",""); CAF_PDM_InitField(&m_colorRangeMode, "ColorRangeMode", ColorRangeEnum(NORMAL) , "Colors", "", "", ""); CAF_PDM_InitField(&m_mappingMode, "MappingMode", MappingEnum(LINEAR_CONTINUOUS) , "Mapping", "", "", ""); @@ -157,7 +157,7 @@ RimLegendConfig::RimLegendConfig() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig::~RimLegendConfig() +RimRegularLegendConfig::~RimRegularLegendConfig() { } @@ -165,7 +165,7 @@ RimLegendConfig::~RimLegendConfig() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +void RimRegularLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { if (changedField == &m_numLevels) { @@ -220,7 +220,7 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField, //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::updateLegend() +void RimRegularLegendConfig::updateLegend() { double adjustedMin = cvf::UNDEFINED_DOUBLE; double adjustedMax = cvf::UNDEFINED_DOUBLE; @@ -402,7 +402,7 @@ void RimLegendConfig::updateLegend() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::disableAllTimeStepsRange(bool doDisable) +void RimRegularLegendConfig::disableAllTimeStepsRange(bool doDisable) { // If we enable AllTimesteps, and we have used current timestep, then "restore" the default if (m_isAllTimeStepsRangeDisabled && !doDisable && m_rangeMode == AUTOMATIC_CURRENT_TIMESTEP) m_rangeMode = AUTOMATIC_ALLTIMESTEPS; @@ -416,7 +416,7 @@ void RimLegendConfig::disableAllTimeStepsRange(bool doDisable) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax) +void RimRegularLegendConfig::setAutomaticRanges(double globalMin, double globalMax, double localMin, double localMax) { double candidateGlobalAutoMin = roundToNumSignificantDigits(globalMin, m_precision); double candidateGlobalAutoMax = roundToNumSignificantDigits(globalMax, m_precision); @@ -436,12 +436,12 @@ void RimLegendConfig::setAutomaticRanges(double globalMin, double globalMax, dou //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::initAfterRead() +void RimRegularLegendConfig::initAfterRead() { updateFieldVisibility(); } -caf::PdmFieldHandle* RimLegendConfig::objectToggleField() +caf::PdmFieldHandle* RimRegularLegendConfig::objectToggleField() { return &m_showLegend; } @@ -449,7 +449,7 @@ caf::PdmFieldHandle* RimLegendConfig::objectToggleField() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::updateFieldVisibility() +void RimRegularLegendConfig::updateFieldVisibility() { bool showRangeItems = m_mappingMode == CATEGORY_INTEGER ? false : true; @@ -473,7 +473,7 @@ void RimLegendConfig::updateFieldVisibility() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setColorRangeMode(ColorRangesType colorMode) +void RimRegularLegendConfig::setColorRangeMode(ColorRangesType colorMode) { m_colorRangeMode = colorMode; updateLegend(); @@ -482,7 +482,7 @@ void RimLegendConfig::setColorRangeMode(ColorRangesType colorMode) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setMappingMode(MappingType mappingType) +void RimRegularLegendConfig::setMappingMode(MappingType mappingType) { m_mappingMode = mappingType; updateLegend(); @@ -491,7 +491,7 @@ void RimLegendConfig::setMappingMode(MappingType mappingType) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::recreateLegend() +void RimRegularLegendConfig::recreateLegend() { // Due to possible visualization bug, we need to recreate the legend if the last viewer // has been removed, (and thus the opengl resources has been deleted) The text in @@ -507,7 +507,7 @@ void RimLegendConfig::recreateLegend() //-------------------------------------------------------------------------------------------------- /// Rounding the double value to given number of significant digits //-------------------------------------------------------------------------------------------------- -double RimLegendConfig::roundToNumSignificantDigits(double domainValue, double numSignificantDigits) +double RimRegularLegendConfig::roundToNumSignificantDigits(double domainValue, double numSignificantDigits) { double absDomainValue = cvf::Math::abs(domainValue); if (absDomainValue == 0.0) @@ -534,7 +534,7 @@ double RimLegendConfig::roundToNumSignificantDigits(double domainValue, double n //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero) +void RimRegularLegendConfig::setClosestToZeroValues(double globalPosClosestToZero, double globalNegClosestToZero, double localPosClosestToZero, double localNegClosestToZero) { bool needsUpdate = false; const double epsilon = std::numeric_limits::epsilon(); @@ -575,7 +575,7 @@ void RimLegendConfig::setClosestToZeroValues(double globalPosClosestToZero, doub //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setIntegerCategories(const std::vector& categories) +void RimRegularLegendConfig::setIntegerCategories(const std::vector& categories) { m_categories = categories; m_categoryNames.clear(); @@ -587,7 +587,7 @@ void RimLegendConfig::setIntegerCategories(const std::vector& categories) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setNamedCategoriesInverse(const std::vector& categoryNames) +void RimRegularLegendConfig::setNamedCategoriesInverse(const std::vector& categoryNames) { std::vector nameIndices; std::vector names; @@ -607,7 +607,7 @@ void RimLegendConfig::setNamedCategoriesInverse(const std::vector& cate //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setCategoryItems(const std::vector< std::tuple >& categories) +void RimRegularLegendConfig::setCategoryItems(const std::vector< std::tuple >& categories) { m_categories.clear(); m_categoryNames.clear(); @@ -627,7 +627,7 @@ void RimLegendConfig::setCategoryItems(const std::vector< std::tuplesetTitle(cvfTitle); @@ -658,7 +658,7 @@ void RimLegendConfig::setTitle(const QString& title) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -caf::TitledOverlayFrame* RimLegendConfig::legend() +caf::TitledOverlayFrame* RimRegularLegendConfig::legend() { if (m_currentScalarMapper == m_categoryMapper) { @@ -670,7 +670,7 @@ caf::TitledOverlayFrame* RimLegendConfig::legend() } } -bool RimLegendConfig::showLegend() const +bool RimRegularLegendConfig::showLegend() const { return m_showLegend; } @@ -678,7 +678,7 @@ bool RimLegendConfig::showLegend() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig) +void RimRegularLegendConfig::setUiValuesFromLegendConfig(const RimRegularLegendConfig* otherLegendConfig) { QString serializedObjectString = otherLegendConfig->writeObjectToXmlString(); this->readObjectFromXmlString(serializedObjectString, caf::PdmDefaultObjectFactory::instance()); @@ -688,41 +688,41 @@ void RimLegendConfig::setUiValuesFromLegendConfig(const RimLegendConfig* otherLe //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -cvf::Color3ubArray RimLegendConfig::colorArrayFromColorType(ColorRangesType colorType) +cvf::Color3ubArray RimRegularLegendConfig::colorArrayFromColorType(ColorRangesType colorType) { switch (colorType) { - case RimLegendConfig::NORMAL: + case RimRegularLegendConfig::NORMAL: return RiaColorTables::normalPaletteColors().color3ubArray(); break; - case RimLegendConfig::OPPOSITE_NORMAL: + case RimRegularLegendConfig::OPPOSITE_NORMAL: return RiaColorTables::normalPaletteOppositeOrderingColors().color3ubArray(); break; - case RimLegendConfig::WHITE_PINK: + case RimRegularLegendConfig::WHITE_PINK: return RiaColorTables::whitePinkPaletteColors().color3ubArray(); break; - case RimLegendConfig::PINK_WHITE: + case RimRegularLegendConfig::PINK_WHITE: return RiaColorTables::pinkWhitePaletteColors().color3ubArray(); break; - case RimLegendConfig::WHITE_BLACK: + case RimRegularLegendConfig::WHITE_BLACK: return RiaColorTables::whiteBlackPaletteColors().color3ubArray(); break; - case RimLegendConfig::BLACK_WHITE: + case RimRegularLegendConfig::BLACK_WHITE: return RiaColorTables::blackWhitePaletteColors().color3ubArray(); break; - case RimLegendConfig::BLUE_WHITE_RED: + case RimRegularLegendConfig::BLUE_WHITE_RED: return RiaColorTables::blueWhiteRedPaletteColors().color3ubArray(); break; - case RimLegendConfig::RED_WHITE_BLUE: + case RimRegularLegendConfig::RED_WHITE_BLUE: return RiaColorTables::redWhiteBluePaletteColors().color3ubArray(); break; - case RimLegendConfig::CATEGORY: + case RimRegularLegendConfig::CATEGORY: return RiaColorTables::categoryPaletteColors().color3ubArray(); break; - case RimLegendConfig::ANGULAR: + case RimRegularLegendConfig::ANGULAR: return RiaColorTables::angularPaletteColors().color3ubArray(); break; - case RimLegendConfig::STIMPLAN: + case RimRegularLegendConfig::STIMPLAN: return RiaColorTables::stimPlanPaletteColors().color3ubArray(); break; default: @@ -735,7 +735,7 @@ cvf::Color3ubArray RimLegendConfig::colorArrayFromColorType(ColorRangesType colo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +void RimRegularLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) { { caf::PdmUiOrdering * formatGr = uiOrdering.addNewGroup("Format"); @@ -757,7 +757,7 @@ void RimLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QList RimLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) +QList RimRegularLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { bool hasStimPlanParent = false; @@ -832,13 +832,13 @@ QList RimLegendConfig::calculateValueOptions(const caf:: { if (!m_isAllTimeStepsRangeDisabled) { - options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimLegendConfig::AUTOMATIC_ALLTIMESTEPS)); + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS)); } if (!hasStimPlanParent) { - options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP)); + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP)); } - options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED)); + options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimRegularLegendConfig::USER_DEFINED), RimRegularLegendConfig::USER_DEFINED)); } return options; diff --git a/ApplicationCode/ProjectDataModel/RimLegendConfig.h b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h similarity index 98% rename from ApplicationCode/ProjectDataModel/RimLegendConfig.h rename to ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h index 5ae482d36d..107fe8381a 100644 --- a/ApplicationCode/ProjectDataModel/RimLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimRegularLegendConfig.h @@ -53,12 +53,12 @@ class Rim3dView; /// /// //================================================================================================== -class RimLegendConfig: public caf::PdmObject +class RimRegularLegendConfig: public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimLegendConfig(); - virtual ~RimLegendConfig(); + RimRegularLegendConfig(); + virtual ~RimRegularLegendConfig(); caf::PdmField resultVariableName; // Used internally to describe the variable this legend setup is used for @@ -117,7 +117,7 @@ public: void setTitle(const QString& title); - void setUiValuesFromLegendConfig(const RimLegendConfig* otherLegendConfig); + void setUiValuesFromLegendConfig(const RimRegularLegendConfig* otherLegendConfig); cvf::ScalarMapper* scalarMapper() { return m_currentScalarMapper.p(); } caf::TitledOverlayFrame* legend(); diff --git a/ApplicationCode/ProjectDataModel/RimStimPlanColors.cpp b/ApplicationCode/ProjectDataModel/RimStimPlanColors.cpp index 5d713b2b99..2b7afe1325 100644 --- a/ApplicationCode/ProjectDataModel/RimStimPlanColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimStimPlanColors.cpp @@ -23,7 +23,7 @@ #include "RimEclipseView.h" #include "RimFractureTemplateCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimOilField.h" #include "RimProject.h" #include "RimStimPlanFractureTemplate.h" @@ -105,8 +105,8 @@ void RimStimPlanColors::loadDataAndUpdate() // Delete legends referencing results not present on file { - std::vector toBeDeleted; - for (RimLegendConfig* legend : m_legendConfigurations) + std::vector toBeDeleted; + for (RimRegularLegendConfig* legend : m_legendConfigurations) { QString legendVariableName = legend->resultVariableName(); @@ -139,7 +139,7 @@ void RimStimPlanColors::loadDataAndUpdate() QString resultNameUnitString = toString(resultNameAndUnit); bool foundResult = false; - for (RimLegendConfig* legend : m_legendConfigurations) + for (RimRegularLegendConfig* legend : m_legendConfigurations) { if (legend->resultVariableName() == resultNameUnitString) { @@ -149,10 +149,10 @@ void RimStimPlanColors::loadDataAndUpdate() if (!foundResult) { - RimLegendConfig* legendConfig = new RimLegendConfig(); + RimRegularLegendConfig* legendConfig = new RimRegularLegendConfig(); legendConfig->resultVariableName = resultNameUnitString; - legendConfig->setMappingMode(RimLegendConfig::LINEAR_DISCRETE); - legendConfig->setColorRangeMode(RimLegendConfig::STIMPLAN); + legendConfig->setMappingMode(RimRegularLegendConfig::LINEAR_DISCRETE); + legendConfig->setColorRangeMode(RimRegularLegendConfig::STIMPLAN); m_legendConfigurations.push_back(legendConfig); @@ -226,9 +226,9 @@ void RimStimPlanColors::fieldChangedByUi(const caf::PdmFieldHandle* changedField //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig* RimStimPlanColors::activeLegend() const +RimRegularLegendConfig* RimStimPlanColors::activeLegend() const { - for (RimLegendConfig* legendConfig : m_legendConfigurations) + for (RimRegularLegendConfig* legendConfig : m_legendConfigurations) { if (m_resultNameAndUnit == legendConfig->resultVariableName()) { @@ -276,7 +276,7 @@ cvf::Color3f RimStimPlanColors::defaultColor() const //-------------------------------------------------------------------------------------------------- void RimStimPlanColors::updateLegendData() { - RimLegendConfig* legendConfig = activeLegend(); + RimRegularLegendConfig* legendConfig = activeLegend(); if (legendConfig) { double minValue = HUGE_VAL; diff --git a/ApplicationCode/ProjectDataModel/RimStimPlanColors.h b/ApplicationCode/ProjectDataModel/RimStimPlanColors.h index fb40eb701f..1ff3a5735e 100644 --- a/ApplicationCode/ProjectDataModel/RimStimPlanColors.h +++ b/ApplicationCode/ProjectDataModel/RimStimPlanColors.h @@ -33,7 +33,7 @@ namespace caf { } -class RimLegendConfig; +class RimRegularLegendConfig; class RimFractureTemplateCollection; //================================================================================================== @@ -54,7 +54,7 @@ public: RimStimPlanColors(); virtual ~RimStimPlanColors(); - RimLegendConfig* activeLegend() const; + RimRegularLegendConfig* activeLegend() const; QString uiResultName() const; void setDefaultResultName(); QString unit() const; @@ -85,7 +85,7 @@ private: private: caf::PdmField m_defaultColor; caf::PdmField m_resultNameAndUnit; - caf::PdmChildArrayField m_legendConfigurations; + caf::PdmChildArrayField m_legendConfigurations; caf::PdmField m_showStimPlanMesh; caf::PdmField> m_stimPlanCellVizMode; diff --git a/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.cpp b/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.cpp index 9f58c46326..b5d54fe9b6 100644 --- a/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.cpp +++ b/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.cpp @@ -18,7 +18,7 @@ #include "RimStimPlanLegendConfig.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "cafPdmUiOrdering.h" #include "cafPdmUiTreeOrdering.h" @@ -38,7 +38,7 @@ RimStimPlanLegendConfig::RimStimPlanLegendConfig() m_name.uiCapability()->setUiReadOnly(true); CAF_PDM_InitFieldNoDefault(&m_legend, "Legend", "Legend", "", "", ""); - m_legend = new RimLegendConfig; + m_legend = new RimRegularLegendConfig; } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.h b/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.h index 7f8afa26a8..3a60a9719c 100644 --- a/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.h +++ b/ApplicationCode/ProjectDataModel/RimStimPlanLegendConfig.h @@ -24,7 +24,7 @@ #include "cafPdmChildField.h" -class RimLegendConfig; +class RimRegularLegendConfig; //================================================================================================== /// @@ -50,6 +50,6 @@ protected: private: caf::PdmField m_name; - caf::PdmChildField m_legend; + caf::PdmChildField m_legend; }; diff --git a/ApplicationCode/ProjectDataModel/RimTensorResults.cpp b/ApplicationCode/ProjectDataModel/RimTensorResults.cpp index 0c5ef25578..d2f05925a2 100644 --- a/ApplicationCode/ProjectDataModel/RimTensorResults.cpp +++ b/ApplicationCode/ProjectDataModel/RimTensorResults.cpp @@ -63,7 +63,7 @@ RimTensorResults::RimTensorResults() CAF_PDM_InitObject("Element Tensor Results", ":/CellResult.png", "", ""); CAF_PDM_InitFieldNoDefault(&arrowColorLegendConfig, "LegendDefinition", "Legend Definition", "", "", ""); - this->arrowColorLegendConfig = new RimLegendConfig(); + this->arrowColorLegendConfig = new RimRegularLegendConfig(); arrowColorLegendConfig.uiCapability()->setUiHidden(true); CAF_PDM_InitField(&m_resultFieldName, "ResultVariable", QString("ST"), "Value", "", "", ""); @@ -86,7 +86,7 @@ RimTensorResults::RimTensorResults() CAF_PDM_InitField(&m_sizeScale, "SizeScale", 1.0f, "Size Scale", "", "", ""); CAF_PDM_InitField(&m_rangeMode, "RangeType", - RimLegendConfig::RangeModeEnum(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), + RimRegularLegendConfig::RangeModeEnum(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS), "Range Type", "", "Switches between automatic and user defined range", @@ -203,11 +203,11 @@ void RimTensorResults::mappingRange(double* min, double* max) const RigFemPartResultsCollection* resultCollection = geoMechView->geoMechCase()->geoMechData()->femPartResults(); if (!resultCollection) return; - if (m_rangeMode == RimLegendConfig::AUTOMATIC_ALLTIMESTEPS) + if (m_rangeMode == RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS) { resultCollection->minMaxScalarValuesOverAllTensorComponents(selectedTensorResult(), min, max); } - else if (m_rangeMode == RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP) + else if (m_rangeMode == RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP) { resultCollection->minMaxScalarValuesOverAllTensorComponents(selectedTensorResult(), currentTimeStep, min, max); } @@ -293,11 +293,11 @@ QList RimTensorResults::calculateValueOptions(const caf: } else if (fieldNeedingOptions == &m_rangeMode) { - options.push_back(caf::PdmOptionItemInfo(RimLegendConfig::RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), - RimLegendConfig::AUTOMATIC_ALLTIMESTEPS)); + options.push_back(caf::PdmOptionItemInfo(RimRegularLegendConfig::RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS), + RimRegularLegendConfig::AUTOMATIC_ALLTIMESTEPS)); options.push_back( - caf::PdmOptionItemInfo(RimLegendConfig::RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), - RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP)); + caf::PdmOptionItemInfo(RimRegularLegendConfig::RangeModeEnum::uiText(RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), + RimRegularLegendConfig::AUTOMATIC_CURRENT_TIMESTEP)); } return options; diff --git a/ApplicationCode/ProjectDataModel/RimTensorResults.h b/ApplicationCode/ProjectDataModel/RimTensorResults.h index 5785405210..18701d39f1 100644 --- a/ApplicationCode/ProjectDataModel/RimTensorResults.h +++ b/ApplicationCode/ProjectDataModel/RimTensorResults.h @@ -23,14 +23,14 @@ #include "cafPdmObject.h" #include "RigFemResultPosEnum.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include #include class RigFemResultAddress; -class RimLegendConfig; +class RimRegularLegendConfig; //================================================================================================== /// @@ -76,7 +76,7 @@ public: QString resultFieldName() const; static QString uiFieldName(const QString& fieldName); - caf::PdmChildField arrowColorLegendConfig; + caf::PdmChildField arrowColorLegendConfig; private: std::vector getResultMetaDataForUIFieldSetting(); @@ -107,5 +107,5 @@ private: caf::PdmField> m_scaleMethod; caf::PdmField m_sizeScale; - caf::PdmField m_rangeMode; + caf::PdmField m_rangeMode; }; diff --git a/ApplicationCode/ProjectDataModel/RimViewLinker.cpp b/ApplicationCode/ProjectDataModel/RimViewLinker.cpp index 5d967bd77a..25dc2d4126 100644 --- a/ApplicationCode/ProjectDataModel/RimViewLinker.cpp +++ b/ApplicationCode/ProjectDataModel/RimViewLinker.cpp @@ -34,7 +34,7 @@ #include "RimGeoMechResultDefinition.h" #include "RimGeoMechView.h" #include "RimIntersectionCollection.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimProject.h" #include "RimTernaryLegendConfig.h" #include "Rim3dView.h" diff --git a/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.cpp b/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.cpp index 6107b00417..e457b7fd86 100644 --- a/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.cpp +++ b/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.cpp @@ -20,7 +20,7 @@ #include "RimEclipseCase.h" #include "RimEclipseView.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" CAF_PDM_SOURCE_INIT(RimVirtualPerforationResults, "RimVirtualPerforationResults"); @@ -41,7 +41,7 @@ RimVirtualPerforationResults::RimVirtualPerforationResults() CAF_PDM_InitFieldNoDefault(&m_legendConfig, "LegendDefinition", "Legend Definition", "", "", ""); m_legendConfig.uiCapability()->setUiHidden(true); - m_legendConfig = new RimLegendConfig(); + m_legendConfig = new RimRegularLegendConfig(); m_legendConfig->setTitle(connectionFactorUiName); // clang-format on @@ -71,7 +71,7 @@ double RimVirtualPerforationResults::geometryScaleFactor() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimLegendConfig* RimVirtualPerforationResults::legendConfig() const +RimRegularLegendConfig* RimVirtualPerforationResults::legendConfig() const { return m_legendConfig(); } diff --git a/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.h b/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.h index cc55c9c0fc..9b0ce42896 100644 --- a/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.h +++ b/ApplicationCode/ProjectDataModel/RimVirtualPerforationResults.h @@ -25,7 +25,7 @@ #include -class RimLegendConfig; +class RimRegularLegendConfig; //================================================================================================== /// @@ -41,7 +41,7 @@ public: bool isActive() const; double geometryScaleFactor() const; - RimLegendConfig* legendConfig() const; + RimRegularLegendConfig* legendConfig() const; void loadData(); @@ -56,5 +56,5 @@ private: caf::PdmField m_isActive; caf::PdmField m_geometryScaleFactor; - caf::PdmChildField m_legendConfig; + caf::PdmChildField m_legendConfig; }; diff --git a/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.cpp b/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.cpp index 7dbf587ea6..94d0acca49 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.cpp +++ b/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.cpp @@ -136,7 +136,7 @@ RimEnsambleCurveSet::RimEnsambleCurveSet() CAF_PDM_InitField(&m_ensambleParameter, "EnsambleParameter", QString(""), "Ensamble Parameter", "", "", ""); CAF_PDM_InitFieldNoDefault(&m_legendConfig, "LegendConfig", "", "", "", ""); - m_legendConfig = new RimLegendConfig(); + m_legendConfig = new RimRegularLegendConfig(); } //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.h b/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.h index d9dab31632..f73ab30bf0 100644 --- a/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.h +++ b/ApplicationCode/ProjectDataModel/Summary/RimEnsambleCurveSet.h @@ -21,7 +21,7 @@ #include "RifEclipseSummaryAddress.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "cafPdmFieldCvfColor.h" #include "cafPdmChildArrayField.h" @@ -121,6 +121,6 @@ private: caf::PdmField m_color; caf::PdmField m_ensambleParameter; - caf::PdmChildField m_legendConfig; + caf::PdmChildField m_legendConfig; }; diff --git a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp index 6e228082e6..d957952604 100644 --- a/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp +++ b/ApplicationCode/UserInterface/RiuResultTextBuilder.cpp @@ -35,7 +35,7 @@ #include "RimEclipseFaultColors.h" #include "RimEclipseView.h" #include "RimFormationNames.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimReservoirCellResultsStorage.h" #include "RivIntersectionPartMgr.h" @@ -793,7 +793,7 @@ QString RiuResultTextBuilder::cellResultText(RimEclipseCellColors* resultColors) QString resultValueText; if (resultColors->hasCategoryResult()) { - RimLegendConfig* legendConfig = resultColors->legendConfig(); + RimRegularLegendConfig* legendConfig = resultColors->legendConfig(); resultValueText += legendConfig->categoryNameFromCategoryValue(scalarValue); } diff --git a/ApplicationCode/UserInterface/RiuViewerCommands.cpp b/ApplicationCode/UserInterface/RiuViewerCommands.cpp index 303728c10f..d36a249b02 100644 --- a/ApplicationCode/UserInterface/RiuViewerCommands.cpp +++ b/ApplicationCode/UserInterface/RiuViewerCommands.cpp @@ -51,7 +51,7 @@ #include "RimGeoMechView.h" #include "RimIntersection.h" #include "RimIntersectionBox.h" -#include "RimLegendConfig.h" +#include "RimRegularLegendConfig.h" #include "RimSimWellInView.h" #include "RimTernaryLegendConfig.h" #include "RimViewController.h"