#2727 Legends : Rename to RimRegularLegendConfig

This commit is contained in:
Magne Sjaastad 2018-04-18 10:10:39 +02:00
parent f85c1de330
commit 3bc85ce794
41 changed files with 186 additions and 186 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -22,7 +22,7 @@
#include "RimGeoMechCase.h"
#include "RimGeoMechView.h"
#include "RimLegendConfig.h"
#include "RimRegularLegendConfig.h"
#include "RimTensorResults.h"
#include "RigFemPartCollection.h"

View File

@ -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"

View File

@ -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"

View File

@ -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<cvf::Part> 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<cvf::Part> RivWellFracturePartMgr::createStimPlanColorInterpolatedSurfa
cvf::Mat4d fractureXf = m_rimFracture->transformMatrix();
std::vector<cvf::Vec3f> 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<cvf::Part> RivWellFracturePartMgr::createStimPlanElementColorSurfacePar
{
std::vector<RigFractureCell> stimPlanCells = stimPlanFracTemplate->fractureGrid()->fractureCells();
RimLegendConfig* legendConfig = nullptr;
RimRegularLegendConfig* legendConfig = nullptr;
if (activeView.fractureColors() &&
activeView.fractureColors()->isChecked() &&
activeView.fractureColors()->activeLegend())

View File

@ -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

View File

@ -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);

View File

@ -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<RimLegendConfig*> m_legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
caf::PdmPtrField<RimIntersection*> m_intersection;

View File

@ -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())
{

View File

@ -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<caf::AppEnum< PropertyType > > m_propertyType;
caf::PdmChildField<RimLegendConfig*> m_legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
caf::PdmChildField<RimEclipseCellColors*> m_singleVarEdgeResultColors;
};

View File

@ -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"

View File

@ -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 <ResultVarLegendDefinitionList> 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;
}

View File

@ -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<RimTernaryLegendConfig*> ternaryLegendConfig;
virtual void setResultVariable(const QString& resultName);
@ -67,12 +67,12 @@ protected:
private:
void changeLegendConfig(QString resultVarNameOfNewLegend);
caf::PdmChildArrayField<RimLegendConfig*> m_legendConfigData;
caf::PdmPtrField<RimLegendConfig*> m_legendConfigPtrField;
caf::PdmChildArrayField<RimRegularLegendConfig*> m_legendConfigData;
caf::PdmPtrField<RimRegularLegendConfig*> m_legendConfigPtrField;
caf::PdmPointer<RimEclipseView> m_reservoirView;
// Obsolete
caf::PdmChildField<RimLegendConfig*> obsoleteField_legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> obsoleteField_legendConfig;
};

View File

@ -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"

View File

@ -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);

View File

@ -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);
}
}
}

View File

@ -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<RimLegendConfig*> legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> legendConfig;
void updateIconState();
virtual void initAfterRead() override;

View File

@ -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()

View File

@ -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<RivGeoMechVizLogic> 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;

View File

@ -18,7 +18,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimLegendConfig.h"
#include "RimRegularLegendConfig.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
@ -52,66 +52,66 @@
#include <cmath>
CAF_PDM_SOURCE_INIT(RimLegendConfig, "Legend");
CAF_PDM_SOURCE_INIT(RimRegularLegendConfig, "Legend");
namespace caf {
template<>
void AppEnum<RimLegendConfig::RangeModeType>::setUp()
void AppEnum<RimRegularLegendConfig::RangeModeType>::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<RimLegendConfig::NumberFormatType>::setUp()
void AppEnum<RimRegularLegendConfig::NumberFormatType>::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<RimLegendConfig::NumberFormatType>(FIXED), "Number format", "", "","");
CAF_PDM_InitField(&m_tickNumberFormat, "TickNumberFormat", caf::AppEnum<RimRegularLegendConfig::NumberFormatType>(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<double>::epsilon();
@ -575,7 +575,7 @@ void RimLegendConfig::setClosestToZeroValues(double globalPosClosestToZero, doub
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setIntegerCategories(const std::vector<int>& categories)
void RimRegularLegendConfig::setIntegerCategories(const std::vector<int>& categories)
{
m_categories = categories;
m_categoryNames.clear();
@ -587,7 +587,7 @@ void RimLegendConfig::setIntegerCategories(const std::vector<int>& categories)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setNamedCategoriesInverse(const std::vector<QString>& categoryNames)
void RimRegularLegendConfig::setNamedCategoriesInverse(const std::vector<QString>& categoryNames)
{
std::vector<int> nameIndices;
std::vector<cvf::String> names;
@ -607,7 +607,7 @@ void RimLegendConfig::setNamedCategoriesInverse(const std::vector<QString>& cate
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setCategoryItems(const std::vector< std::tuple<QString, int, cvf::Color3ub> >& categories)
void RimRegularLegendConfig::setCategoryItems(const std::vector< std::tuple<QString, int, cvf::Color3ub> >& categories)
{
m_categories.clear();
m_categoryNames.clear();
@ -627,7 +627,7 @@ void RimLegendConfig::setCategoryItems(const std::vector< std::tuple<QString, in
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimLegendConfig::categoryNameFromCategoryValue(double categoryResultValue) const
QString RimRegularLegendConfig::categoryNameFromCategoryValue(double categoryResultValue) const
{
if (categoryResultValue == HUGE_VAL) return "Undefined";
@ -648,7 +648,7 @@ QString RimLegendConfig::categoryNameFromCategoryValue(double categoryResultValu
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimLegendConfig::setTitle(const QString& title)
void RimRegularLegendConfig::setTitle(const QString& title)
{
auto cvfTitle = cvfqt::Utils::toString(title);
m_scalarMapperLegend->setTitle(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<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
QList<caf::PdmOptionItemInfo> RimRegularLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
{
bool hasStimPlanParent = false;
@ -832,13 +832,13 @@ QList<caf::PdmOptionItemInfo> 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;

View File

@ -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<QString> 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();

View File

@ -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<RimLegendConfig*> toBeDeleted;
for (RimLegendConfig* legend : m_legendConfigurations)
std::vector<RimRegularLegendConfig*> 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;

View File

@ -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<cvf::Color3f> m_defaultColor;
caf::PdmField<QString> m_resultNameAndUnit;
caf::PdmChildArrayField<RimLegendConfig*> m_legendConfigurations;
caf::PdmChildArrayField<RimRegularLegendConfig*> m_legendConfigurations;
caf::PdmField<bool> m_showStimPlanMesh;
caf::PdmField<caf::AppEnum<StimPlanResultColorType>> m_stimPlanCellVizMode;

View File

@ -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;
}
//--------------------------------------------------------------------------------------------------

View File

@ -24,7 +24,7 @@
#include "cafPdmChildField.h"
class RimLegendConfig;
class RimRegularLegendConfig;
//==================================================================================================
///
@ -50,6 +50,6 @@ protected:
private:
caf::PdmField<QString> m_name;
caf::PdmChildField<RimLegendConfig*> m_legend;
caf::PdmChildField<RimRegularLegendConfig*> m_legend;
};

View File

@ -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<caf::PdmOptionItemInfo> 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;

View File

@ -23,14 +23,14 @@
#include "cafPdmObject.h"
#include "RigFemResultPosEnum.h"
#include "RimLegendConfig.h"
#include "RimRegularLegendConfig.h"
#include <QList>
#include <vector>
class RigFemResultAddress;
class RimLegendConfig;
class RimRegularLegendConfig;
//==================================================================================================
///
@ -76,7 +76,7 @@ public:
QString resultFieldName() const;
static QString uiFieldName(const QString& fieldName);
caf::PdmChildField<RimLegendConfig*> arrowColorLegendConfig;
caf::PdmChildField<RimRegularLegendConfig*> arrowColorLegendConfig;
private:
std::vector<std::string> getResultMetaDataForUIFieldSetting();
@ -107,5 +107,5 @@ private:
caf::PdmField<caf::AppEnum<ScaleMethod>> m_scaleMethod;
caf::PdmField<float> m_sizeScale;
caf::PdmField<RimLegendConfig::RangeModeEnum> m_rangeMode;
caf::PdmField<RimRegularLegendConfig::RangeModeEnum> m_rangeMode;
};

View File

@ -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"

View File

@ -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();
}

View File

@ -25,7 +25,7 @@
#include <vector>
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<bool> m_isActive;
caf::PdmField<double> m_geometryScaleFactor;
caf::PdmChildField<RimLegendConfig*> m_legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
};

View File

@ -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();
}
//--------------------------------------------------------------------------------------------------

View File

@ -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<cvf::Color3f> m_color;
caf::PdmField<QString> m_ensambleParameter;
caf::PdmChildField<RimLegendConfig*> m_legendConfig;
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
};

View File

@ -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);
}

View File

@ -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"