mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Project Tree updates (#8490)
Split project tree into multiple dockable tree views for plots, keeping one for 3d views.
This commit is contained in:
@@ -167,19 +167,18 @@ RimProject::RimProject( void )
|
||||
calculationCollection = new RimSummaryCalculationCollection;
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &commandObjects, "CommandObjects", "Command Objects" );
|
||||
// wellPathImport.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &multiSnapshotDefinitions, "MultiSnapshotDefinitions", "Multi Snapshot Definitions" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &mainWindowTreeViewState, "TreeViewState", "" );
|
||||
mainWindowTreeViewState.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &mainWindowCurrentModelIndexPath, "TreeViewCurrentModelIndexPath", "" );
|
||||
mainWindowCurrentModelIndexPath.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &mainWindowTreeViewStates, "TreeViewStates", "" );
|
||||
mainWindowTreeViewStates.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &mainWindowCurrentModelIndexPaths, "TreeViewCurrentModelIndexPaths", "" );
|
||||
mainWindowCurrentModelIndexPaths.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &plotWindowTreeViewState, "PlotWindowTreeViewState", "" );
|
||||
plotWindowTreeViewState.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &plotWindowCurrentModelIndexPath, "PlotWindowTreeViewCurrentModelIndexPath", "" );
|
||||
plotWindowCurrentModelIndexPath.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &plotWindowTreeViewStates, "PlotWindowTreeViewStates", "" );
|
||||
plotWindowTreeViewStates.uiCapability()->setUiHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &plotWindowCurrentModelIndexPaths, "PlotWindowTreeViewCurrentModelIndexPaths", "" );
|
||||
plotWindowCurrentModelIndexPaths.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_show3DWindow, "show3DWindow", true, "Show 3D Window" );
|
||||
m_show3DWindow.uiCapability()->setUiHidden( true );
|
||||
@@ -271,10 +270,10 @@ void RimProject::close()
|
||||
|
||||
fileName = "";
|
||||
|
||||
mainWindowCurrentModelIndexPath = "";
|
||||
mainWindowTreeViewState = "";
|
||||
plotWindowCurrentModelIndexPath = "";
|
||||
plotWindowTreeViewState = "";
|
||||
mainWindowCurrentModelIndexPaths = "";
|
||||
mainWindowTreeViewStates = "";
|
||||
plotWindowCurrentModelIndexPaths = "";
|
||||
plotWindowTreeViewStates = "";
|
||||
|
||||
m_nextValidCaseId = 0;
|
||||
m_nextValidCaseGroupId = 0;
|
||||
@@ -308,7 +307,6 @@ void RimProject::initAfterRead()
|
||||
if ( analysisModels )
|
||||
{
|
||||
analysisModels->caseGroups.push_back( sourceCaseGroup );
|
||||
// printf("Moved m_project->caseGroupsObsolete[%i] to first oil fields analysis models\n", cgIdx);
|
||||
movedOneRimIdenticalGridCaseGroup = true; // moved at least one so assume the others will be moved too...
|
||||
}
|
||||
}
|
||||
@@ -326,7 +324,6 @@ void RimProject::initAfterRead()
|
||||
RimEclipseCase* sourceCase = casesObsolete[cIdx];
|
||||
casesObsolete.set( cIdx, nullptr );
|
||||
analysisModels->cases.push_back( sourceCase );
|
||||
// printf("Moved m_project->casesObsolete[%i] to first oil fields analysis models\n", cIdx);
|
||||
movedOneRimCase = true; // moved at least one so assume the others will be moved too...
|
||||
}
|
||||
}
|
||||
@@ -336,13 +333,6 @@ void RimProject::initAfterRead()
|
||||
casesObsolete.clear();
|
||||
}
|
||||
|
||||
if ( casesObsolete().size() > 0 || caseGroupsObsolete.size() > 0 )
|
||||
{
|
||||
// printf("RimProject::initAfterRead: Was not able to move all cases (%i left) or caseGroups (%i left) from
|
||||
// Project to analysisModels",
|
||||
// casesObsolete().size(), caseGroupsObsolete.size());
|
||||
}
|
||||
|
||||
// Set project pointer to each well path
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++ )
|
||||
{
|
||||
@@ -1387,101 +1377,79 @@ void RimProject::reloadCompletionTypeResultsForEclipseCase( RimEclipseCase* ecli
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( uiConfigName == "PlotWindow" )
|
||||
if ( uiConfigName == "PlotWindow.Plots" )
|
||||
{
|
||||
{
|
||||
auto itemCollection = uiTreeOrdering.add( "Data Sources", ":/Folder.png" );
|
||||
|
||||
RimOilField* oilField = activeOilField();
|
||||
if ( oilField )
|
||||
{
|
||||
if ( oilField->summaryCaseMainCollection() )
|
||||
{
|
||||
itemCollection->add( oilField->summaryCaseMainCollection() );
|
||||
}
|
||||
if ( oilField->observedDataCollection() )
|
||||
{
|
||||
itemCollection->add( oilField->observedDataCollection() );
|
||||
}
|
||||
if ( oilField->ensembleWellLogsCollection() )
|
||||
{
|
||||
itemCollection->add( oilField->ensembleWellLogsCollection() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( mainPlotCollection )
|
||||
{
|
||||
auto itemCollection = uiTreeOrdering.add( "Plots", ":/Folder.png" );
|
||||
if ( mainPlotCollection->summaryPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->summaryPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->summaryPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->analysisPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->analysisPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->analysisPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->correlationPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->correlationPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->correlationPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->summaryCrossPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->summaryCrossPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->summaryCrossPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->wellLogPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->wellLogPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->wellLogPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->rftPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->rftPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->rftPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->pltPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->pltPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->pltPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->flowPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->flowPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->flowPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->gridCrossPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->gridCrossPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->gridCrossPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->saturationPressurePlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->saturationPressurePlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->saturationPressurePlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->multiPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->multiPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->multiPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->stimPlanModelPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->stimPlanModelPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->stimPlanModelPlotCollection() );
|
||||
}
|
||||
|
||||
if ( mainPlotCollection->vfpPlotCollection() )
|
||||
{
|
||||
itemCollection->add( mainPlotCollection->vfpPlotCollection() );
|
||||
uiTreeOrdering.add( mainPlotCollection->vfpPlotCollection() );
|
||||
}
|
||||
#ifdef USE_QTCHARTS
|
||||
if ( mainPlotCollection->gridStatisticsPlotCollection() ||
|
||||
mainPlotCollection->ensembleFractureStatisticsPlotCollection() )
|
||||
{
|
||||
auto statisticsItemCollection = itemCollection->add( "Statistics Plots", ":/Folder.png" );
|
||||
auto statisticsItemCollection = uiTreeOrdering.add( "Statistics Plots", ":/Folder.png" );
|
||||
if ( mainPlotCollection->gridStatisticsPlotCollection() )
|
||||
statisticsItemCollection->add( mainPlotCollection->gridStatisticsPlotCollection() );
|
||||
|
||||
@@ -1490,7 +1458,28 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
else if ( uiConfigName == "PlotWindow.DataSources" )
|
||||
{
|
||||
RimOilField* oilField = activeOilField();
|
||||
if ( oilField )
|
||||
{
|
||||
if ( oilField->summaryCaseMainCollection() )
|
||||
{
|
||||
uiTreeOrdering.add( oilField->summaryCaseMainCollection() );
|
||||
}
|
||||
if ( oilField->observedDataCollection() )
|
||||
{
|
||||
uiTreeOrdering.add( oilField->observedDataCollection() );
|
||||
}
|
||||
if ( oilField->ensembleWellLogsCollection() )
|
||||
{
|
||||
uiTreeOrdering.add( oilField->ensembleWellLogsCollection() );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( uiConfigName == "PlotWindow.Scripts" )
|
||||
{
|
||||
uiTreeOrdering.add( scriptCollection() );
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user