mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5019 Add relevant access to IntersectionResultDefinition
Implement initAfterRead to populate the resultDefinitions with correct case
This commit is contained in:
@@ -115,7 +115,7 @@ QString RimIntersectionResultDefinition::autoName() const
|
||||
m_geomResultDefinition->resultComponentUiName();
|
||||
}
|
||||
|
||||
return resultVarUiName + " " + timestepName + " " + caseName;
|
||||
return resultVarUiName + " " + timestepName + " " + caseName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -129,7 +129,46 @@ RimCase* RimIntersectionResultDefinition::activeCase() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimEclipseResultDefinition* RimIntersectionResultDefinition::eclipseResultDefinition() const
|
||||
int RimIntersectionResultDefinition::timeStep() const
|
||||
{
|
||||
return m_timeStep();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimRegularLegendConfig* RimIntersectionResultDefinition::regularLegendConfig() const
|
||||
{
|
||||
return m_legendConfig();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimTernaryLegendConfig* RimIntersectionResultDefinition::ternaryLegendConfig() const
|
||||
{
|
||||
return m_ternaryLegendConfig();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimIntersectionResultDefinition::isEclipseResultDefinition()
|
||||
{
|
||||
if ( dynamic_cast<RimEclipseCase*>( m_case() ) )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseResultDefinition* RimIntersectionResultDefinition::eclipseResultDefinition() const
|
||||
{
|
||||
return m_eclipseResultDefinition();
|
||||
}
|
||||
@@ -137,7 +176,7 @@ const RimEclipseResultDefinition* RimIntersectionResultDefinition::eclipseResult
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimGeoMechResultDefinition* RimIntersectionResultDefinition::geoMechResultDefinition() const
|
||||
RimGeoMechResultDefinition* RimIntersectionResultDefinition::geoMechResultDefinition() const
|
||||
{
|
||||
return m_geomResultDefinition();
|
||||
}
|
||||
@@ -253,3 +292,21 @@ void RimIntersectionResultDefinition::defineUiTreeOrdering( caf::PdmUiTreeOrderi
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimIntersectionResultDefinition::initAfterRead()
|
||||
{
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( m_case.value() );
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( m_case.value() );
|
||||
|
||||
if ( eclipseCase )
|
||||
{
|
||||
m_eclipseResultDefinition->setEclipseCase( eclipseCase );
|
||||
}
|
||||
else if ( geomCase )
|
||||
{
|
||||
m_geomResultDefinition->setGeoMechCase( geomCase );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,10 +41,14 @@ public:
|
||||
bool isActive();
|
||||
QString autoName() const;
|
||||
RimCase* activeCase() const;
|
||||
int timeStep() const { return m_timeStep();}
|
||||
bool isEclipseResultDefinition();
|
||||
int timeStep() const;
|
||||
|
||||
const RimEclipseResultDefinition* eclipseResultDefinition() const;
|
||||
const RimGeoMechResultDefinition* geoMechResultDefinition() const;
|
||||
RimRegularLegendConfig* regularLegendConfig() const;
|
||||
RimTernaryLegendConfig* ternaryLegendConfig() const;
|
||||
|
||||
RimEclipseResultDefinition* eclipseResultDefinition() const;
|
||||
RimGeoMechResultDefinition* geoMechResultDefinition() const;
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
@@ -58,6 +62,7 @@ protected:
|
||||
bool* useOptionsOnly ) override;
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
virtual void initAfterRead() override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_isActive;
|
||||
|
||||
Reference in New Issue
Block a user