Renamed class RimResultDefinition to RimEclipseResultDefinition

This commit is contained in:
Pål Hagen 2015-06-25 09:38:53 +02:00
parent d43c5d4dae
commit f7a2582805
7 changed files with 33 additions and 33 deletions

View File

@ -57,7 +57,7 @@ RimCellPropertyFilter::RimCellPropertyFilter()
obsoleteField_evaluationRegion.setIOWritable(false); obsoleteField_evaluationRegion.setIOWritable(false);
CAF_PDM_InitFieldNoDefault(&resultDefinition, "ResultDefinition", "Result definition", "", "", ""); 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 // Take ownership of the fields in RimResultDefinition to be able to trap fieldChangedByUi in this class
resultDefinition->m_resultTypeUiField.setOwnerObject(this); resultDefinition->m_resultTypeUiField.setOwnerObject(this);

View File

@ -24,7 +24,7 @@
class RimEclipseView; class RimEclipseView;
class RimCellPropertyFilterCollection; class RimCellPropertyFilterCollection;
class RimResultDefinition; class RimEclipseResultDefinition;
class RigGridBase; class RigGridBase;
class RigCaseCellResultsData; class RigCaseCellResultsData;
@ -42,7 +42,7 @@ public:
RimCellPropertyFilter(); RimCellPropertyFilter();
virtual ~RimCellPropertyFilter(); virtual ~RimCellPropertyFilter();
caf::PdmField<RimResultDefinition*> resultDefinition; caf::PdmField<RimEclipseResultDefinition*> resultDefinition;
caf::PdmField<double> lowerBound; caf::PdmField<double> lowerBound;
caf::PdmField<double> upperBound; caf::PdmField<double> upperBound;

View File

@ -28,12 +28,12 @@
#include "cafPdmUiListEditor.h" #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) //: m_gridScalarResultIndex(cvf::UNDEFINED_SIZE_T)
{ {
CAF_PDM_InitObject("Result Definition", "", "", ""); 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; m_reservoirView = ownerReservoirView;
updateFieldVisibility(); updateFieldVisibility();
} }
QStringList RimResultDefinition::getResultVariableListForCurrentUIFieldSettings() QStringList RimEclipseResultDefinition::getResultVariableListForCurrentUIFieldSettings()
{ {
if (!m_reservoirView || !m_reservoirView->eclipseCase() ) return QStringList(); 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; 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 if ( &m_resultTypeUiField == changedField
|| &m_porosityModelUiField == changedField ) || &m_porosityModelUiField == changedField )
@ -132,7 +132,7 @@ void RimResultDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
{ {
return calculateValueOptionsForSpecifiedDerivedListPosition(false, fieldNeedingOptions, useOptionsOnly); return calculateValueOptionsForSpecifiedDerivedListPosition(false, fieldNeedingOptions, useOptionsOnly);
} }
@ -140,7 +140,7 @@ QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptions(const c
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) QList<caf::PdmOptionItemInfo> RimEclipseResultDefinition::calculateValueOptionsForSpecifiedDerivedListPosition(bool showDerivedResultsFirstInList, const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
{ {
if (fieldNeedingOptions == &m_resultVariableUiField) if (fieldNeedingOptions == &m_resultVariableUiField)
{ {
@ -201,7 +201,7 @@ QList<caf::PdmOptionItemInfo> RimResultDefinition::calculateValueOptionsForSpeci
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RimResultDefinition::scalarResultIndex() const size_t RimEclipseResultDefinition::scalarResultIndex() const
{ {
size_t gridScalarResultIndex = cvf::UNDEFINED_SIZE_T; 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(); RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
if (gridCellResults) if (gridCellResults)
@ -230,7 +230,7 @@ void RimResultDefinition::loadResult()
/// Returns whether the result requested by the definition is a single frame result /// Returns whether the result requested by the definition is a single frame result
/// The result needs to be loaded before asking /// The result needs to be loaded before asking
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimResultDefinition::hasStaticResult() const bool RimEclipseResultDefinition::hasStaticResult() const
{ {
const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults(); const RimReservoirCellResultsStorage* gridCellResults = this->currentGridCellResults();
size_t gridScalarResultIndex = this->scalarResultIndex(); 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 /// 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()) 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 /// Returns whether the result requested by the definition is a multi frame result
/// The result needs to be loaded before asking /// The result needs to be loaded before asking
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimResultDefinition::hasDynamicResult() const bool RimEclipseResultDefinition::hasDynamicResult() const
{ {
if (hasResult()) if (hasResult())
{ {
@ -290,7 +290,7 @@ bool RimResultDefinition::hasDynamicResult() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseView* RimResultDefinition::reservoirView() RimEclipseView* RimEclipseResultDefinition::reservoirView()
{ {
return m_reservoirView; return m_reservoirView;
} }
@ -298,7 +298,7 @@ RimEclipseView* RimResultDefinition::reservoirView()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimResultDefinition::initAfterRead() void RimEclipseResultDefinition::initAfterRead()
{ {
m_porosityModelUiField = m_porosityModel; m_porosityModelUiField = m_porosityModel;
m_resultTypeUiField = m_resultType; 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_resultType = val;
m_resultTypeUiField = 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_porosityModel = val;
m_porosityModelUiField = 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_resultVariable = val;
m_resultVariableUiField = 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) && bool isTernary = (m_resultType() == RimDefines::DYNAMIC_NATIVE) &&
(m_resultVariable().compare(RimDefines::ternarySaturationResultName(), Qt::CaseInsensitive) == 0); (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 && if (m_reservoirView &&
m_reservoirView->eclipseCase() && m_reservoirView->eclipseCase() &&

View File

@ -35,12 +35,12 @@ class RimReservoirCellResultsStorage;
/// ///
/// ///
//================================================================================================== //==================================================================================================
class RimResultDefinition : public caf::PdmObject class RimEclipseResultDefinition : public caf::PdmObject
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:
RimResultDefinition(); RimEclipseResultDefinition();
virtual ~RimResultDefinition(); virtual ~RimEclipseResultDefinition();
virtual void setReservoirView(RimEclipseView* ownerReservoirView); virtual void setReservoirView(RimEclipseView* ownerReservoirView);
RimEclipseView* reservoirView(); RimEclipseView* reservoirView();

View File

@ -63,7 +63,7 @@ RimResultSlot::~RimResultSlot()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimResultSlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) 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() // Update of legend config must happen after RimResultDefinition::fieldChangedByUi(), as this function modifies this->resultVariable()
if (changedField == &m_resultVariableUiField) if (changedField == &m_resultVariableUiField)
@ -141,7 +141,7 @@ void RimResultSlot::changeLegendConfig(QString resultVarNameOfNewLegend)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimResultSlot::initAfterRead() void RimResultSlot::initAfterRead()
{ {
RimResultDefinition::initAfterRead(); RimEclipseResultDefinition::initAfterRead();
if (this->legendConfig()->resultVariableName == "") if (this->legendConfig()->resultVariableName == "")
{ {
@ -156,7 +156,7 @@ void RimResultSlot::initAfterRead()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimResultSlot::setReservoirView(RimEclipseView* ownerReservoirView) void RimResultSlot::setReservoirView(RimEclipseView* ownerReservoirView)
{ {
RimResultDefinition::setReservoirView(ownerReservoirView); RimEclipseResultDefinition::setReservoirView(ownerReservoirView);
m_reservoirView = ownerReservoirView; m_reservoirView = ownerReservoirView;
this->legendConfig()->setReservoirView(ownerReservoirView); this->legendConfig()->setReservoirView(ownerReservoirView);
@ -174,7 +174,7 @@ void RimResultSlot::setReservoirView(RimEclipseView* ownerReservoirView)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimResultSlot::setResultVariable(const QString& val) void RimResultSlot::setResultVariable(const QString& val)
{ {
RimResultDefinition::setResultVariable(val); RimEclipseResultDefinition::setResultVariable(val);
this->changeLegendConfig(val); this->changeLegendConfig(val);
} }

View File

@ -30,7 +30,7 @@ class RimTernaryLegendConfig;
/// ///
/// ///
//================================================================================================== //==================================================================================================
class RimResultSlot : public RimResultDefinition class RimResultSlot : public RimEclipseResultDefinition
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:

View File

@ -30,7 +30,7 @@
#include "RimDefines.h" #include "RimDefines.h"
class RimIdenticalGridCaseGroup; class RimIdenticalGridCaseGroup;
class RimResultDefinition; class RimEclipseResultDefinition;
class RimStatisticsCaseCollection; class RimStatisticsCaseCollection;
class RigMainGrid; class RigMainGrid;
class RigSingleWellResultsData; class RigSingleWellResultsData;