mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
Add phases display field to Eclipse Result Case
Display available simulation phases (Oil, Gas, Water) in the Eclipse Result Case properties panel. The phases are read from the case data and displayed as a read-only field in the UI.
This commit is contained in:
1 parent
c00da5e8e1
commit
70f76aefb0
2 files changed
+33
No files matched your search
@@ -90,6 +90,10 @@ RimEclipseResultCase::RimEclipseResultCase()
|
||||
m_unitSystem.registerGetMethod( RimProject::current(), &RimProject::commonUnitSystemForAllCases );
|
||||
m_unitSystem.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_phases, "Phases", "Phases" );
|
||||
m_phases.registerGetMethod( this, &RimEclipseResultCase::phasesAsString );
|
||||
m_phases.uiCapability()->setUiReadOnly( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_flowDiagSolutions, "FlowDiagSolutions", "Flow Diagnostics Solutions" );
|
||||
m_flowDiagSolutions.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
|
||||
@@ -129,6 +133,31 @@ void RimEclipseResultCase::initAfterRead()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimEclipseResultCase::phasesAsString() const
|
||||
{
|
||||
if ( auto caseData = eclipseCaseData() )
|
||||
{
|
||||
QStringList phaseNames;
|
||||
const auto phases = caseData->availablePhases();
|
||||
for ( const auto& phase : phases )
|
||||
{
|
||||
phaseNames.append( caf::AppEnum<RiaDefines::PhaseType>::uiText( phase ) );
|
||||
}
|
||||
|
||||
if ( phaseNames.isEmpty() )
|
||||
{
|
||||
return "No phases available";
|
||||
}
|
||||
|
||||
return phaseNames.join( ", " );
|
||||
}
|
||||
|
||||
return "No data available";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -680,6 +709,7 @@ void RimEclipseResultCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrd
|
||||
uiOrdering.add( &m_caseId );
|
||||
uiOrdering.add( &m_caseFileName );
|
||||
uiOrdering.add( &m_unitSystem );
|
||||
uiOrdering.add( &m_phases );
|
||||
|
||||
auto group = uiOrdering.addNewGroup( "Case Options" );
|
||||
group->add( &m_activeFormationNames );
|
||||
|
||||
@@ -90,6 +90,8 @@ private:
|
||||
void ensureRftDataIsImported();
|
||||
bool showTimeStepFilterGUI();
|
||||
|
||||
QString phasesAsString() const;
|
||||
|
||||
cvf::ref<RifReaderInterface> createMockModel( QString modelName );
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
|
||||
@@ -102,6 +104,7 @@ private:
|
||||
caf::PdmProxyValueField<caf::AppEnum<RiaDefines::EclipseUnitSystem>> m_unitSystem;
|
||||
caf::PdmChildArrayField<RimFlowDiagSolution*> m_flowDiagSolutions;
|
||||
caf::PdmField<caf::FilePath> m_sourSimFileName;
|
||||
caf::PdmProxyValueField<QString> m_phases;
|
||||
|
||||
caf::PdmField<std::pair<bool, int>> m_mswMergeThreshold;
|
||||
|
||||
|
||||
Reference in new issue
Block a user