From f7a25828055c629b0c99f9d13592649979111ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Thu, 25 Jun 2015 09:38:53 +0200 Subject: [PATCH] Renamed class RimResultDefinition to RimEclipseResultDefinition --- .../RimCellPropertyFilter.cpp | 2 +- .../ProjectDataModel/RimCellPropertyFilter.h | 4 +- .../ProjectDataModel/RimResultDefinition.cpp | 42 +++++++++---------- .../ProjectDataModel/RimResultDefinition.h | 6 +-- .../ProjectDataModel/RimResultSlot.cpp | 8 ++-- .../ProjectDataModel/RimResultSlot.h | 2 +- .../ProjectDataModel/RimStatisticsCase.h | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp index d30a1e3624..9aa726445c 100644 --- a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp +++ b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.cpp @@ -57,7 +57,7 @@ RimCellPropertyFilter::RimCellPropertyFilter() obsoleteField_evaluationRegion.setIOWritable(false); CAF_PDM_InitFieldNoDefault(&resultDefinition, "ResultDefinition", "Result definition", "", "", ""); - resultDefinition = new RimResultDefinition(); + resultDefinition = new RimEclipseResultDefinition(); // Take ownership of the fields in RimResultDefinition to be able to trap fieldChangedByUi in this class resultDefinition->m_resultTypeUiField.setOwnerObject(this); diff --git a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.h b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.h index a658378001..e1f05a604b 100644 --- a/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.h +++ b/ApplicationCode/ProjectDataModel/RimCellPropertyFilter.h @@ -24,7 +24,7 @@ class RimEclipseView; class RimCellPropertyFilterCollection; -class RimResultDefinition; +class RimEclipseResultDefinition; class RigGridBase; class RigCaseCellResultsData; @@ -42,7 +42,7 @@ public: RimCellPropertyFilter(); virtual ~RimCellPropertyFilter(); - caf::PdmField resultDefinition; + caf::PdmField resultDefinition; caf::PdmField lowerBound; caf::PdmField upperBound; diff --git a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp index 80a85e0107..01e53986e7 100644 --- a/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp +++ b/ApplicationCode/ProjectDataModel/RimResultDefinition.cpp @@ -28,12 +28,12 @@ #include "cafPdmUiListEditor.h" -CAF_PDM_SOURCE_INIT(RimResultDefinition, "ResultDefinition"); +CAF_PDM_SOURCE_INIT(RimEclipseResultDefinition, "ResultDefinition"); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimResultDefinition::RimResultDefinition() +RimEclipseResultDefinition::RimEclipseResultDefinition() //: m_gridScalarResultIndex(cvf::UNDEFINED_SIZE_T) { CAF_PDM_InitObject("Result Definition", "", "", ""); @@ -62,7 +62,7 @@ RimResultDefinition::RimResultDefinition() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimResultDefinition::~RimResultDefinition() +RimEclipseResultDefinition::~RimEclipseResultDefinition() { } @@ -70,14 +70,14 @@ RimResultDefinition::~RimResultDefinition() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::setReservoirView(RimEclipseView* ownerReservoirView) +void RimEclipseResultDefinition::setReservoirView(RimEclipseView* ownerReservoirView) { m_reservoirView = ownerReservoirView; updateFieldVisibility(); } -QStringList RimResultDefinition::getResultVariableListForCurrentUIFieldSettings() +QStringList RimEclipseResultDefinition::getResultVariableListForCurrentUIFieldSettings() { if (!m_reservoirView || !m_reservoirView->eclipseCase() ) return QStringList(); @@ -87,7 +87,7 @@ QStringList RimResultDefinition::getResultVariableListForCurrentUIFieldSettings( } -RimReservoirCellResultsStorage* RimResultDefinition::currentGridCellResults() const +RimReservoirCellResultsStorage* RimEclipseResultDefinition::currentGridCellResults() const { if (!m_reservoirView || !m_reservoirView->eclipseCase()) return NULL; @@ -99,7 +99,7 @@ RimReservoirCellResultsStorage* RimResultDefinition::currentGridCellResults() co //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) +void RimEclipseResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { if ( &m_resultTypeUiField == changedField || &m_porosityModelUiField == changedField ) @@ -132,7 +132,7 @@ void RimResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedFie //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QList RimResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) +QList RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { return calculateValueOptionsForSpecifiedDerivedListPosition(false, fieldNeedingOptions, useOptionsOnly); } @@ -140,7 +140,7 @@ QList RimResultDefinition::calculateValueOptions(const c //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -QList RimResultDefinition::calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) +QList RimEclipseResultDefinition::calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) { if (fieldNeedingOptions == &m_resultVariableUiField) { @@ -201,7 +201,7 @@ QList RimResultDefinition::calculateValueOptionsForSpeci //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -size_t RimResultDefinition::scalarResultIndex() const +size_t RimEclipseResultDefinition::scalarResultIndex() const { size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T; @@ -214,7 +214,7 @@ size_t RimResultDefinition::scalarResultIndex() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::loadResult() +void RimEclipseResultDefinition::loadResult() { RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); if (gridCellResults) @@ -230,7 +230,7 @@ void RimResultDefinition::loadResult() /// Returns whether the result requested by the definition is a single frame result /// The result needs to be loaded before asking //-------------------------------------------------------------------------------------------------- -bool RimResultDefinition::hasStaticResult() const +bool RimEclipseResultDefinition::hasStaticResult() const { const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); size_t gridScalarResultIndex = this->scalarResultIndex(); @@ -248,7 +248,7 @@ bool RimResultDefinition::hasStaticResult() const //-------------------------------------------------------------------------------------------------- /// Returns whether the result requested by the definition is loaded or possible to load from the result file //-------------------------------------------------------------------------------------------------- -bool RimResultDefinition::hasResult() const +bool RimEclipseResultDefinition::hasResult() const { if (this->currentGridCellResults() && this->currentGridCellResults()->cellResults()) { @@ -264,7 +264,7 @@ bool RimResultDefinition::hasResult() const /// Returns whether the result requested by the definition is a multi frame result /// The result needs to be loaded before asking //-------------------------------------------------------------------------------------------------- -bool RimResultDefinition::hasDynamicResult() const +bool RimEclipseResultDefinition::hasDynamicResult() const { if (hasResult()) { @@ -290,7 +290,7 @@ bool RimResultDefinition::hasDynamicResult() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimEclipseView* RimResultDefinition::reservoirView() +RimEclipseView* RimEclipseResultDefinition::reservoirView() { return m_reservoirView; } @@ -298,7 +298,7 @@ RimEclipseView* RimResultDefinition::reservoirView() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::initAfterRead() +void RimEclipseResultDefinition::initAfterRead() { m_porosityModelUiField = m_porosityModel; m_resultTypeUiField = m_resultType; @@ -310,7 +310,7 @@ void RimResultDefinition::initAfterRead() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::setResultType(RimDefines::ResultCatType val) +void RimEclipseResultDefinition::setResultType(RimDefines::ResultCatType val) { m_resultType = val; m_resultTypeUiField = val; @@ -319,7 +319,7 @@ void RimResultDefinition::setResultType(RimDefines::ResultCatType val) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::setPorosityModel(RimDefines::PorosityModelType val) +void RimEclipseResultDefinition::setPorosityModel(RimDefines::PorosityModelType val) { m_porosityModel = val; m_porosityModelUiField = val; @@ -328,7 +328,7 @@ void RimResultDefinition::setPorosityModel(RimDefines::PorosityModelType val) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::setResultVariable(const QString& val) +void RimEclipseResultDefinition::setResultVariable(const QString& val) { m_resultVariable = val; m_resultVariableUiField = val; @@ -337,7 +337,7 @@ void RimResultDefinition::setResultVariable(const QString& val) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RimResultDefinition::isTernarySaturationSelected() const +bool RimEclipseResultDefinition::isTernarySaturationSelected() const { bool isTernary = (m_resultType() == RimDefines::DYNAMIC_NATIVE) && (m_resultVariable().compare(RimDefines::ternarySaturationResultName(), Qt::CaseInsensitive) == 0); @@ -348,7 +348,7 @@ bool RimResultDefinition::isTernarySaturationSelected() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RimResultDefinition::updateFieldVisibility() +void RimEclipseResultDefinition::updateFieldVisibility() { if (m_reservoirView && m_reservoirView->eclipseCase() && diff --git a/ApplicationCode/ProjectDataModel/RimResultDefinition.h b/ApplicationCode/ProjectDataModel/RimResultDefinition.h index 7826ab80ed..2a9280492e 100644 --- a/ApplicationCode/ProjectDataModel/RimResultDefinition.h +++ b/ApplicationCode/ProjectDataModel/RimResultDefinition.h @@ -35,12 +35,12 @@ class RimReservoirCellResultsStorage; /// /// //================================================================================================== -class RimResultDefinition : public caf::PdmObject +class RimEclipseResultDefinition : public caf::PdmObject { CAF_PDM_HEADER_INIT; public: - RimResultDefinition(); - virtual ~RimResultDefinition(); + RimEclipseResultDefinition(); + virtual ~RimEclipseResultDefinition(); virtual void setReservoirView(RimEclipseView* ownerReservoirView); RimEclipseView* reservoirView(); diff --git a/ApplicationCode/ProjectDataModel/RimResultSlot.cpp b/ApplicationCode/ProjectDataModel/RimResultSlot.cpp index a57df435ca..9a23041457 100644 --- a/ApplicationCode/ProjectDataModel/RimResultSlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimResultSlot.cpp @@ -63,7 +63,7 @@ RimResultSlot::~RimResultSlot() //-------------------------------------------------------------------------------------------------- void RimResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) { - RimResultDefinition::fieldChangedByUi(changedField, oldValue, newValue); + RimEclipseResultDefinition::fieldChangedByUi(changedField, oldValue, newValue); // Update of legend config must happen after RimResultDefinition::fieldChangedByUi(), as this function modifies this->resultVariable() if (changedField == &m_resultVariableUiField) @@ -141,7 +141,7 @@ void RimResultSlot::changeLegendConfig(QString resultVarNameOfNewLegend) //-------------------------------------------------------------------------------------------------- void RimResultSlot::initAfterRead() { - RimResultDefinition::initAfterRead(); + RimEclipseResultDefinition::initAfterRead(); if (this->legendConfig()->resultVariableName == "") { @@ -156,7 +156,7 @@ void RimResultSlot::initAfterRead() //-------------------------------------------------------------------------------------------------- void RimResultSlot::setReservoirView(RimEclipseView* ownerReservoirView) { - RimResultDefinition::setReservoirView(ownerReservoirView); + RimEclipseResultDefinition::setReservoirView(ownerReservoirView); m_reservoirView = ownerReservoirView; this->legendConfig()->setReservoirView(ownerReservoirView); @@ -174,7 +174,7 @@ void RimResultSlot::setReservoirView(RimEclipseView* ownerReservoirView) //-------------------------------------------------------------------------------------------------- void RimResultSlot::setResultVariable(const QString& val) { - RimResultDefinition::setResultVariable(val); + RimEclipseResultDefinition::setResultVariable(val); this->changeLegendConfig(val); } diff --git a/ApplicationCode/ProjectDataModel/RimResultSlot.h b/ApplicationCode/ProjectDataModel/RimResultSlot.h index 1ab1c08830..aa8b021472 100644 --- a/ApplicationCode/ProjectDataModel/RimResultSlot.h +++ b/ApplicationCode/ProjectDataModel/RimResultSlot.h @@ -30,7 +30,7 @@ class RimTernaryLegendConfig; /// /// //================================================================================================== -class RimResultSlot : public RimResultDefinition +class RimResultSlot : public RimEclipseResultDefinition { CAF_PDM_HEADER_INIT; public: diff --git a/ApplicationCode/ProjectDataModel/RimStatisticsCase.h b/ApplicationCode/ProjectDataModel/RimStatisticsCase.h index 273db47897..a287a7bcec 100644 --- a/ApplicationCode/ProjectDataModel/RimStatisticsCase.h +++ b/ApplicationCode/ProjectDataModel/RimStatisticsCase.h @@ -30,7 +30,7 @@ #include "RimDefines.h" class RimIdenticalGridCaseGroup; -class RimResultDefinition; +class RimEclipseResultDefinition; class RimStatisticsCaseCollection; class RigMainGrid; class RigSingleWellResultsData;