mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show summary data as tree structure in explorer. (#8430)
* Show summary data vectors in project explorer for both summary cases and ensembles. * Enable Drag to be able to drag'n'drop data vector into future summary plot * Make sure tree is refreshed on reload/replace operations * Provide case id and ensemble id in drag/drop object in addition to address
This commit is contained in:
@@ -24,12 +24,17 @@
|
||||
#include "RicfCommandObject.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryAddress.h"
|
||||
#include "RimSummaryAddressCollection.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryPlotCollection.h"
|
||||
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@@ -62,6 +67,11 @@ RimSummaryCase::RimSummaryCase()
|
||||
m_caseId.uiCapability()->setUiReadOnly( true );
|
||||
m_caseId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_dataVectorFolders, "DataVectorFolders", "Data Folders" );
|
||||
m_dataVectorFolders = new RimSummaryAddressCollection();
|
||||
m_dataVectorFolders.uiCapability()->setUiHidden( true );
|
||||
m_dataVectorFolders.xmlCapability()->disableIO();
|
||||
|
||||
m_isObservedData = false;
|
||||
}
|
||||
|
||||
@@ -200,11 +210,32 @@ QString RimSummaryCase::errorMessagesFromReader()
|
||||
return QString();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::buildChildNodes()
|
||||
{
|
||||
m_dataVectorFolders->clear();
|
||||
|
||||
RifSummaryReaderInterface* reader = summaryReader();
|
||||
if ( !reader ) return;
|
||||
|
||||
m_dataVectorFolders->updateFolderStructure( reader->allResultAddresses(), m_caseId );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( !ensemble() )
|
||||
{
|
||||
if ( m_dataVectorFolders->isEmpty() ) buildChildNodes();
|
||||
m_dataVectorFolders->updateUiTreeOrdering( uiTreeOrdering );
|
||||
}
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
|
||||
updateTreeItemName();
|
||||
}
|
||||
|
||||
@@ -269,6 +300,8 @@ void RimSummaryCase::initAfterRead()
|
||||
}
|
||||
|
||||
updateOptionSensitivity();
|
||||
|
||||
refreshMetaData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -361,3 +394,12 @@ int RimSummaryCase::caseId() const
|
||||
{
|
||||
return m_caseId();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCase::refreshMetaData()
|
||||
{
|
||||
buildChildNodes();
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user