mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
More summary data types in data source tree (#8840)
* Add support for block data in data sources tree * Add option to show summary data sub-tree for single realizations inside an ensemble
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmUiCheckBoxEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
@@ -54,6 +55,9 @@ RimSummaryCase::RimSummaryCase()
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_displayName, "ShortName", "Display Name" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_displayNameOption, "NameSetting", "Name Setting" );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_showSubNodesInTree, "ShowSubNodesInTree", false, "Show Summary Data Sub-Tree" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_showSubNodesInTree );
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_useAutoShortName_OBSOLETE, "AutoShortyName", false, "Use Auto Display Name" );
|
||||
m_useAutoShortName_OBSOLETE.xmlCapability()->setIOWritable( false );
|
||||
m_useAutoShortName_OBSOLETE.uiCapability()->setUiHidden( true );
|
||||
@@ -181,6 +185,10 @@ void RimSummaryCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
updateTreeItemName();
|
||||
nameChanged.send();
|
||||
}
|
||||
else if ( changedField == &m_showSubNodesInTree )
|
||||
{
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
updateOptionSensitivity();
|
||||
}
|
||||
@@ -222,12 +230,27 @@ void RimSummaryCase::buildChildNodes()
|
||||
m_dataVectorFolders->updateFolderStructure( reader->allResultAddresses(), m_caseId );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_displayName );
|
||||
uiOrdering.add( &m_displayNameOption );
|
||||
uiOrdering.add( &m_summaryHeaderFilename );
|
||||
uiOrdering.add( &m_caseId );
|
||||
|
||||
if ( ensemble() ) uiOrdering.add( &m_showSubNodesInTree );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( !ensemble() )
|
||||
if ( !ensemble() || m_showSubNodesInTree() )
|
||||
{
|
||||
if ( m_dataVectorFolders->isEmpty() ) buildChildNodes();
|
||||
m_dataVectorFolders->updateUiTreeOrdering( uiTreeOrdering );
|
||||
|
||||
Reference in New Issue
Block a user