Deprecate single summary plots and plot collections. (#8777)

* Deprecate single summary plots and plot collections. Replace functionality using summary multi plots. Clean up some code. Fix crash when trying to normalize an empty curve
This commit is contained in:
jonjenssen 2022-04-06 17:39:07 +02:00 committed by GitHub
parent 9bbc709157
commit 3590c52cdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
63 changed files with 352 additions and 388 deletions

View File

@ -79,7 +79,6 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimTextAnnotation.h"
#include "RimTextAnnotationInView.h"
#include "RimViewLinker.h"

View File

@ -53,7 +53,6 @@
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimWellLogRftCurve.h"
#include "Riu3DMainWindowTools.h"

View File

@ -36,8 +36,9 @@
#include "RimSummaryCrossPlot.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmObject.h"
@ -46,11 +47,11 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlotCollection* RiaSummaryTools::summaryPlotCollection()
RimSummaryMultiPlotCollection* RiaSummaryTools::summaryMultiPlotCollection()
{
RimProject* project = RimProject::current();
return project->mainPlotCollection()->summaryPlotCollection();
return project->mainPlotCollection()->summaryMultiPlotCollection();
}
//--------------------------------------------------------------------------------------------------
@ -79,18 +80,21 @@ RimSummaryCaseMainCollection* RiaSummaryTools::summaryCaseMainCollection()
//--------------------------------------------------------------------------------------------------
void RiaSummaryTools::notifyCalculatedCurveNameHasChanged( int calculationId, const QString& currentCurveName )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
for ( RimSummaryPlot* plot : summaryPlotColl->plots() )
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
for ( RimSummaryCurve* curve : plot->summaryCurves() )
for ( RimSummaryPlot* plot : multiPlot->summaryPlots() )
{
RifEclipseSummaryAddress adr = curve->summaryAddressY();
if ( adr.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED && adr.id() == calculationId )
for ( RimSummaryCurve* curve : plot->summaryCurves() )
{
RifEclipseSummaryAddress updatedAdr =
RifEclipseSummaryAddress::calculatedAddress( currentCurveName.toStdString(), calculationId );
curve->setSummaryAddressYAndApplyInterpolation( updatedAdr );
RifEclipseSummaryAddress adr = curve->summaryAddressY();
if ( adr.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED && adr.id() == calculationId )
{
RifEclipseSummaryAddress updatedAdr =
RifEclipseSummaryAddress::calculatedAddress( currentCurveName.toStdString(), calculationId );
curve->setSummaryAddressYAndApplyInterpolation( updatedAdr );
}
}
}
}
@ -119,9 +123,9 @@ RimSummaryPlot* RiaSummaryTools::parentSummaryPlot( caf::PdmObject* object )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlotCollection* RiaSummaryTools::parentSummaryPlotCollection( caf::PdmObject* object )
RimSummaryMultiPlotCollection* RiaSummaryTools::parentSummaryPlotCollection( caf::PdmObject* object )
{
RimSummaryPlotCollection* summaryPlotColl = nullptr;
RimSummaryMultiPlotCollection* summaryPlotColl = nullptr;
if ( object )
{
@ -131,6 +135,21 @@ RimSummaryPlotCollection* RiaSummaryTools::parentSummaryPlotCollection( caf::Pdm
return summaryPlotColl;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryMultiPlot* RiaSummaryTools::parentSummaryMultiPlot( caf::PdmObject* object )
{
RimSummaryMultiPlot* multiPlot = nullptr;
if ( object )
{
object->firstAncestorOrThisOfType( multiPlot );
}
return multiPlot;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -24,8 +24,9 @@
#include <vector>
class RimSummaryPlotCollection;
class RimSummaryPlot;
class RimSummaryMultiPlot;
class RimSummaryMultiPlotCollection;
class RimSummaryCrossPlot;
class RimSummaryCrossPlotCollection;
class RimSummaryCaseMainCollection;
@ -47,14 +48,15 @@ class PdmObject;
class RiaSummaryTools
{
public:
static RimSummaryPlotCollection* summaryPlotCollection();
static RimSummaryCrossPlotCollection* summaryCrossPlotCollection();
static RimSummaryCaseMainCollection* summaryCaseMainCollection();
static RimSummaryMultiPlotCollection* summaryMultiPlotCollection();
static void notifyCalculatedCurveNameHasChanged( int calculationId, const QString& currentCurveName );
static RimSummaryPlot* parentSummaryPlot( caf::PdmObject* object );
static RimSummaryPlotCollection* parentSummaryPlotCollection( caf::PdmObject* object );
static RimSummaryPlot* parentSummaryPlot( caf::PdmObject* object );
static RimSummaryMultiPlot* parentSummaryMultiPlot( caf::PdmObject* object );
static RimSummaryMultiPlotCollection* parentSummaryPlotCollection( caf::PdmObject* object );
static RimSummaryCrossPlot* parentCrossPlot( caf::PdmObject* object );
static RimSummaryCrossPlotCollection* parentCrossPlotCollection( caf::PdmObject* object );

View File

@ -20,6 +20,8 @@
#include "RiaGuiApplication.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RifEclipseSummaryAddress.h"
#include "RifSummaryReaderInterface.h"
@ -37,8 +39,8 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryCurveAppearanceCalculator.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
@ -80,8 +82,6 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if ( !sumCaseColl ) return;
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
std::vector<RimSimWellInView*> collection;
caf::SelectionManager::instance()->objectsByType( &collection );
@ -100,7 +100,9 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
}
description += well->name();
RimSummaryPlot* plot = summaryPlotColl->createNamedSummaryPlot( description );
RimSummaryPlot* plot = new RimSummaryPlot();
plot->setUiName( description );
RimSummaryMultiPlot* multiPlot = RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot );
if ( RimSimWellInViewTools::isInjector( well ) )
{
@ -210,7 +212,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
}
}
summaryPlotColl->updateConnectedEditors();
multiPlot->updateConnectedEditors();
plot->loadDataAndUpdate();
summaryPlotToSelect = plot;

View File

@ -21,7 +21,6 @@
#include "RiaSummaryTools.h"
#include "RimSummaryAddress.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RicSummaryPlotBuilder.h"

View File

@ -21,7 +21,6 @@
#include "RiaSummaryTools.h"
#include "RimSummaryAddress.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RicSummaryPlotBuilder.h"
@ -101,17 +100,7 @@ void RicNewSummaryPlotFromDataVectorFeature::onActionTriggered( bool isChecked )
}
auto newPlot = RicSummaryPlotBuilder::createPlot( eclipseAddresses, selectedCases, selectedEnsembles );
auto plotCollection = RiaSummaryTools::summaryPlotCollection();
newPlot->setAsPlotMdiWindow();
plotCollection->addPlot( newPlot );
newPlot->loadDataAndUpdate();
plotCollection->updateConnectedEditors();
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot, true );
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot );
}
//--------------------------------------------------------------------------------------------------

View File

@ -41,7 +41,7 @@
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RiuPlotMainWindowTools.h"
@ -475,6 +475,31 @@ RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( con
return plotWindow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryMultiPlot* RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot )
{
RimProject* project = RimProject::current();
auto* plotCollection = project->mainPlotCollection()->summaryMultiPlotCollection();
auto* plotWindow = new RimSummaryMultiPlot();
plotWindow->setColumnCount( RiaDefines::ColumnCount::COLUMNS_1 );
plotWindow->setRowCount( RiaDefines::RowCount::ROWS_1 );
plotWindow->setAsPlotMdiWindow();
plotCollection->addSummaryMultiPlot( plotWindow );
appendPlotsToSummaryMultiPlot( plotWindow, { plot } );
plotCollection->updateAllRequiredEditors();
plotWindow->loadDataAndUpdate();
plotWindow->updateAllRequiredEditors();
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
return plotWindow;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -79,6 +79,7 @@ public:
createAndAppendDefaultSummaryMultiPlot( const std::vector<RimSummaryCase*>& cases,
const std::vector<RimSummaryCaseCollection*>& ensembles );
static RimSummaryMultiPlot* createAndAppendSingleSummaryMultiPlot( RimSummaryPlot* plot );
static RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector<RimSummaryPlot*>& plots );
static RimSummaryMultiPlot* createAndAppendSummaryMultiPlot( const std::vector<caf::PdmObjectHandle*>& objects );
static void appendPlotsToSummaryMultiPlot( RimSummaryMultiPlot* multiPlot, const std::vector<RimSummaryPlot*>& plots );

View File

@ -27,7 +27,6 @@
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmUiTreeSelectionEditor.h"

View File

@ -23,6 +23,7 @@
#include "RiaPreferences.h"
#include "RiaSummaryAddressAnalyzer.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RicSelectPlotTemplateUi.h"
#include "RifSummaryReaderInterface.h"
@ -38,7 +39,6 @@
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
@ -230,9 +230,7 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
if ( selectedSummaryCases.empty() && selectedEnsembles.empty() ) return;
RimSummaryPlotCollection* plotColl = RimProject::current()->mainPlotCollection()->summaryPlotCollection();
plotColl->addPlot( summaryPlot );
RimSummaryMultiPlot* multiPlot = RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( summaryPlot );
summaryPlot->resolveReferencesRecursively();
summaryPlot->initAfterReadRecursively();
@ -355,7 +353,7 @@ void RicSummaryPlotTemplateTools::appendSummaryPlotToPlotCollection(
}
}
plotColl->updateConnectedEditors();
multiPlot->updateConnectedEditors();
summaryPlot->loadDataAndUpdate();
}

View File

@ -26,8 +26,9 @@
#include "RimObservedSummaryData.h"
#include "RimProject.h"
#include "RimRftPlotCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimWellRftPlot.h"
#include "cafSelectionManager.h"
@ -52,15 +53,18 @@ void RicCloseObservedDataFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
void RicCloseObservedDataFeature::deleteObservedSummaryData( const std::vector<RimObservedSummaryData*>& data )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
for ( RimObservedSummaryData* observedData : data )
{
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( observedData );
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( observedData );
}
multiPlot->updateConnectedEditors();
}
summaryPlotColl->updateConnectedEditors();
RimObservedDataCollection* observedDataCollection = nullptr;
observedData->firstAncestorOrThisOfTypeAsserted( observedDataCollection );

View File

@ -25,8 +25,9 @@
#include "RimProject.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
@ -54,16 +55,19 @@ void RicCloseSummaryCaseFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
void RicCloseSummaryCaseFeature::deleteSummaryCases( std::vector<RimSummaryCase*>& cases )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryCaseMainCollection* summaryCaseMainCollection = RiaSummaryTools::summaryCaseMainCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
RimSummaryCaseMainCollection* summaryCaseMainCollection = RiaSummaryTools::summaryCaseMainCollection();
for ( RimSummaryCase* summaryCase : cases )
{
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( summaryCase );
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( summaryCase );
}
multiPlot->updateConnectedEditors();
}
summaryPlotColl->updateConnectedEditors();
summaryCaseMainCollection->removeCase( summaryCase );
}

View File

@ -29,7 +29,6 @@
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"

View File

@ -32,7 +32,6 @@
#include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"

View File

@ -19,7 +19,8 @@
#include "RicDeleteSubItemsFeature.h"
#include "RimProject.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimWellPathCollection.h"
#include "RimWellPathFractureCollection.h"
@ -63,7 +64,17 @@ void RicDeleteSubItemsFeature::onActionTriggered( bool isChecked )
if ( !RicDeleteSubItemsFeature::hasDeletableSubItems( item ) ) continue;
{
auto collection = dynamic_cast<RimSummaryPlotCollection*>( item );
auto multiPlot = dynamic_cast<RimSummaryMultiPlot*>( item );
if ( multiPlot )
{
multiPlot->deleteAllPlots();
multiPlot->updateConnectedEditors();
}
}
{
auto collection = dynamic_cast<RimSummaryMultiPlotCollection*>( item );
if ( collection )
{
collection->deleteAllPlots();
@ -115,8 +126,16 @@ void RicDeleteSubItemsFeature::setupActionLook( QAction* actionToSetup )
bool RicDeleteSubItemsFeature::hasDeletableSubItems( caf::PdmUiItem* uiItem )
{
{
auto collection = dynamic_cast<RimSummaryPlotCollection*>( uiItem );
if ( collection && !collection->plots().empty() )
auto multiPlot = dynamic_cast<RimSummaryMultiPlot*>( uiItem );
if ( multiPlot && !multiPlot->summaryPlots().empty() )
{
return true;
}
}
{
auto collection = dynamic_cast<RimSummaryMultiPlotCollection*>( uiItem );
if ( collection && !collection->multiPlots().empty() )
{
return true;
}

View File

@ -26,8 +26,9 @@
#include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmObject.h"
#include "cafSelectionManager.h"
@ -44,17 +45,19 @@ CAF_CMD_SOURCE_INIT( RicDeleteSummaryCaseCollectionFeature, "RicDeleteSummaryCas
//--------------------------------------------------------------------------------------------------
void RicDeleteSummaryCaseCollectionFeature::deleteSummaryCaseCollection( RimSummaryCaseCollection* caseCollection )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
for ( RimSummaryCase* summaryCase : caseCollection->allSummaryCases() )
{
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( summaryCase );
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
summaryPlot->deleteCurvesAssosiatedWithCase( summaryCase );
}
multiPlot->updateConnectedEditors();
}
}
summaryPlotColl->updateConnectedEditors();
}
//--------------------------------------------------------------------------------------------------

View File

@ -39,7 +39,6 @@
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"

View File

@ -27,7 +27,6 @@
#include "RimProject.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"

View File

@ -38,7 +38,6 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"

View File

@ -32,7 +32,6 @@
#include "RimProject.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"

View File

@ -29,8 +29,9 @@
#include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmObject.h"
#include "cafSelectionManager.h"
@ -54,7 +55,7 @@ bool RicReloadSummaryCaseFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
std::vector<RimSummaryCase*> caseSelection = selectedSummaryCases();
for ( RimSummaryCase* summaryCase : caseSelection )
@ -68,9 +69,12 @@ void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
RiaLogging::info( QString( "Reloaded data for %1" ).arg( summaryCase->summaryHeaderFilename() ) );
}
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
summaryPlot->loadDataAndUpdate();
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
summaryPlot->loadDataAndUpdate();
}
}
}

View File

@ -30,8 +30,9 @@
#include "RimReloadCaseTools.h"
#include "RimSummaryCase.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimTimeStepFilter.h"
#include "Riu3dSelectionManager.h"
@ -110,10 +111,13 @@ void RicReplaceCaseFeature::onActionTriggered( bool isChecked )
gridSummaryCase->createSummaryReaderInterface();
gridSummaryCase->createRftReaderInterface();
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
summaryPlot->loadDataAndUpdate();
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
summaryPlot->loadDataAndUpdate();
}
}
}
}

View File

@ -36,8 +36,9 @@
#include "RimSummaryCrossPlot.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmObject.h"
#include "cafSelectionManager.h"
@ -110,31 +111,34 @@ void RicReplaceSummaryCaseFeature::onActionTriggered( bool isChecked )
}
}
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
for ( RimSummaryPlot* summaryPlot : summaryPlotColl->plots() )
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
for ( RimSummaryMultiPlot* multiPlot : summaryPlotColl->multiPlots() )
{
// Update summary curves on calculated data
std::vector<RimSummaryCurve*> summaryCurves = summaryPlot->summaryCurves();
for ( RimSummaryCurve* summaryCurve : summaryCurves )
for ( RimSummaryPlot* summaryPlot : multiPlot->summaryPlots() )
{
RifEclipseSummaryAddress summaryAddressY = summaryCurve->summaryAddressY();
if ( summaryAddressY.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED &&
ids.find( summaryAddressY.id() ) != ids.end() )
// Update summary curves on calculated data
std::vector<RimSummaryCurve*> summaryCurves = summaryPlot->summaryCurves();
for ( RimSummaryCurve* summaryCurve : summaryCurves )
{
if ( calcColl )
RifEclipseSummaryAddress summaryAddressY = summaryCurve->summaryAddressY();
if ( summaryAddressY.category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED &&
ids.find( summaryAddressY.id() ) != ids.end() )
{
RimSummaryCalculation* calculation = calcColl->findCalculationById( summaryAddressY.id() );
QString description = calculation->description();
if ( calcColl )
{
RimSummaryCalculation* calculation = calcColl->findCalculationById( summaryAddressY.id() );
QString description = calculation->description();
RifEclipseSummaryAddress updatedAdr =
RifEclipseSummaryAddress::calculatedAddress( description.toStdString(), calculation->id() );
summaryCurve->setSummaryAddressYAndApplyInterpolation( updatedAdr );
summaryCurve->loadDataAndUpdate( true );
RifEclipseSummaryAddress updatedAdr =
RifEclipseSummaryAddress::calculatedAddress( description.toStdString(), calculation->id() );
summaryCurve->setSummaryAddressYAndApplyInterpolation( updatedAdr );
summaryCurve->loadDataAndUpdate( true );
}
}
}
}
summaryPlot->loadDataAndUpdate();
summaryPlot->loadDataAndUpdate();
}
}
RimSummaryCrossPlotCollection* summaryCrossPlotColl = RiaSummaryTools::summaryCrossPlotCollection();

View File

@ -20,10 +20,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlotCollection;
class RimSummaryCase;
class RimSummaryPlot;
//==================================================================================================
///
//==================================================================================================

View File

@ -22,8 +22,8 @@
#include "RicPasteSummaryPlotFeature.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafSelectionManagerTools.h"
#include "cvfAssert.h"
@ -37,15 +37,15 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryPlotFeature, "RicDuplicateSummaryPlotFea
//--------------------------------------------------------------------------------------------------
bool RicDuplicateSummaryPlotFeature::isCommandEnabled()
{
RimSummaryPlotCollection* sumPlotColl = nullptr;
RimSummaryMultiPlot* multiPlot = nullptr;
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>( caf::SelectionManager::instance()->selectedItem() );
if ( selObj )
{
sumPlotColl = RiaSummaryTools::parentSummaryPlotCollection( selObj );
multiPlot = RiaSummaryTools::parentSummaryMultiPlot( selObj );
}
if ( sumPlotColl ) return true;
if ( multiPlot ) return true;
return false;
}

View File

@ -20,10 +20,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlotCollection;
class RimSummaryCase;
class RimSummaryPlot;
//==================================================================================================
///
//==================================================================================================

View File

@ -20,10 +20,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlot;
class RimSummaryPlotCollection;
class RimSummaryCase;
//==================================================================================================
///
//==================================================================================================

View File

@ -39,7 +39,6 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
@ -68,48 +67,15 @@ void extractPlotObjectsFromSelection( std::vector<RimSummaryCase*>* se
{
return;
}
RimSummaryPlotCollection* sumPlotColl =
caf::SelectionManager::instance()->selectedItemAncestorOfType<RimSummaryPlotCollection>();
if ( sumPlotColl )
{
RimSummaryCase* firstIndividualSummaryCase = nullptr;
RimSummaryCaseCollection* firstEnsemble = nullptr;
auto sumCaseVector = RimProject::current()->allSummaryCases();
for ( RimSummaryCase* summaryCase : sumCaseVector )
{
RimSummaryCaseCollection* parentEnsemble = nullptr;
summaryCase->firstAncestorOrThisOfType( parentEnsemble );
if ( !parentEnsemble && !firstIndividualSummaryCase )
{
firstIndividualSummaryCase = summaryCase;
break;
}
else if ( parentEnsemble && !firstEnsemble )
{
firstEnsemble = parentEnsemble;
}
}
if ( firstIndividualSummaryCase )
{
selectedIndividualSummaryCases->push_back( firstIndividualSummaryCase );
}
else if ( firstEnsemble )
{
selectedEnsembles->push_back( firstEnsemble );
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlot* RicNewDefaultSummaryPlotFeature::createFromSummaryCases( RimSummaryPlotCollection* plotCollection,
const std::vector<RimSummaryCase*>& summaryCases )
RimSummaryPlot* RicNewDefaultSummaryPlotFeature::createFromSummaryCases( const std::vector<RimSummaryCase*>& summaryCases )
{
RimSummaryPlot* newPlot = plotCollection->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
for ( RimSummaryCase* sumCase : summaryCases )
{
@ -119,10 +85,8 @@ RimSummaryPlot* RicNewDefaultSummaryPlotFeature::createFromSummaryCases( RimSumm
newPlot->applyDefaultCurveAppearances();
newPlot->loadDataAndUpdate();
plotCollection->updateConnectedEditors();
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot );
RiuPlotMainWindowTools::setExpanded( newPlot );
RiuPlotMainWindowTools::selectAsCurrentItem( newPlot );
return newPlot;
}
@ -154,6 +118,8 @@ bool RicNewDefaultSummaryPlotFeature::isCommandEnabled()
if ( customObjFuncCollection || curveFilter ) return false;
return !( selectedIndividualSummaryCases.empty() && selectedEnsembles.empty() );
return false;
}
//--------------------------------------------------------------------------------------------------
@ -177,8 +143,7 @@ void RicNewDefaultSummaryPlotFeature::onActionTriggered( bool isChecked )
if ( !selectedIndividualSummaryCases.empty() )
{
RimSummaryPlotCollection* sumPlotColl = RimProject::current()->mainPlotCollection()->summaryPlotCollection();
createFromSummaryCases( sumPlotColl, selectedIndividualSummaryCases );
createFromSummaryCases( selectedIndividualSummaryCases );
}
else
{

View File

@ -22,7 +22,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlotCollection;
class RimSummaryCase;
class RimSummaryPlot;
@ -34,8 +33,7 @@ class RicNewDefaultSummaryPlotFeature : public caf::CmdFeature
CAF_CMD_HEADER_INIT;
public:
static RimSummaryPlot* createFromSummaryCases( RimSummaryPlotCollection* plotCollection,
const std::vector<RimSummaryCase*>& summaryCases );
static RimSummaryPlot* createFromSummaryCases( const std::vector<RimSummaryCase*>& summaryCases );
protected:
bool isCommandEnabled() override;

View File

@ -20,10 +20,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlotCollection;
class RimSummaryCase;
class RimSummaryPlot;
//==================================================================================================
///
//==================================================================================================

View File

@ -20,10 +20,6 @@
#include "cafCmdFeature.h"
class RimSummaryPlotCollection;
class RimSummaryCase;
class RimSummaryPlot;
//==================================================================================================
///
//==================================================================================================

View File

@ -23,6 +23,7 @@
#include "RigFemResultAddress.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RicNewSummaryCurveFeature.h"
#include "RicSelectSummaryPlotUI.h"
#include "RicWellLogTools.h"
@ -35,8 +36,9 @@
#include "RimGeoMechView.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimProject.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "Riu3dSelectionManager.h"
#include "RiuPlotMainWindowTools.h"
@ -86,7 +88,7 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
const QString lastUsedSummaryPlotKey( "lastUsedSummaryPlotKey" );
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
RimSummaryPlot* defaultSelectedPlot = nullptr;
{
@ -97,16 +99,6 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
{
defaultSelectedPlot = lastUsedPlot;
}
if ( !defaultSelectedPlot )
{
defaultSelectedPlot = dynamic_cast<RimSummaryPlot*>( app->activePlotWindow() );
}
if ( !defaultSelectedPlot && !summaryPlotColl->plots().empty() )
{
defaultSelectedPlot = summaryPlotColl->plots().front();
}
}
RicSelectSummaryPlotUI featureUi;
@ -126,10 +118,9 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
RimSummaryPlot* summaryPlot = nullptr;
if ( featureUi.isCreateNewPlotChecked() )
{
RimSummaryPlot* plot = summaryPlotColl->createNamedSummaryPlot( featureUi.newPlotName() );
summaryPlotColl->updateConnectedEditors();
RimSummaryPlot* plot = new RimSummaryPlot();
plot->setUiName( featureUi.newPlotName() );
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot );
plot->loadDataAndUpdate();
summaryPlot = plot;

View File

@ -28,7 +28,6 @@
#include "RimSummaryCrossPlot.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"

View File

@ -31,7 +31,6 @@
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"

View File

@ -23,9 +23,6 @@
#include <vector>
class RimSummaryPlot;
class RimSummaryCase;
class RimSummaryCurve;
class RimSummaryPlotCollection;
//==================================================================================================
///

View File

@ -21,9 +21,9 @@
#include "RiaColorTables.h"
#include "RiaGuiApplication.h"
#include "RiaPreferencesSummary.h"
#include "RiaSummaryTools.h"
#include "RiaTextStringTools.h"
#include "RiaSummaryTools.h"
#include "RimEnsembleCurveFilter.h"
#include "RimEnsembleCurveFilterCollection.h"
#include "RimEnsembleCurveSet.h"
@ -34,11 +34,13 @@
#include "RimProject.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
#include "cafSelectionManager.h"
@ -109,8 +111,9 @@ RimSummaryPlot*
if ( prefs->defaultSummaryCurvesTextFilter().isEmpty() ) return nullptr;
RimSummaryPlotCollection* summaryPlotCollection = proj->mainPlotCollection->summaryPlotCollection();
RimSummaryPlot* plot = summaryPlotCollection->createSummaryPlotWithAutoTitle();
RimSummaryPlot* plot = new RimSummaryPlot();
plot->enableAutoPlotTitle( true );
RimSummaryMultiPlot* multiPlot = RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot );
RimEnsembleCurveSet* firstCurveSetCreated = nullptr;
for ( RimSummaryCaseCollection* ensemble : ensembles )
@ -121,7 +124,7 @@ RimSummaryPlot*
}
plot->loadDataAndUpdate();
summaryPlotCollection->updateConnectedEditors();
multiPlot->updateConnectedEditors();
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
if ( mainPlotWindow )

View File

@ -35,7 +35,6 @@
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
@ -51,13 +50,13 @@ CAF_CMD_SOURCE_INIT( RicOpenSummaryPlotEditorFeature, "RicOpenSummaryPlotEditorF
//--------------------------------------------------------------------------------------------------
bool RicOpenSummaryPlotEditorFeature::isCommandEnabled()
{
RimSummaryPlotCollection* sumPlotColl = nullptr;
RimSummaryMultiPlot* multiPlot = nullptr;
RimCustomObjectiveFunctionCollection* customObjFuncCollection = nullptr;
caf::PdmObject* selObj = dynamic_cast<caf::PdmObject*>( caf::SelectionManager::instance()->selectedItem() );
if ( selObj )
{
sumPlotColl = RiaSummaryTools::parentSummaryPlotCollection( selObj );
multiPlot = RiaSummaryTools::parentSummaryMultiPlot( selObj );
selObj->firstAncestorOrThisOfType( customObjFuncCollection );
}
@ -66,7 +65,7 @@ bool RicOpenSummaryPlotEditorFeature::isCommandEnabled()
auto legendConfig = dynamic_cast<RimRegularLegendConfig*>( selObj );
if ( ensembleFilter || ensembleFilterColl || legendConfig || customObjFuncCollection ) return false;
if ( sumPlotColl ) return true;
if ( multiPlot ) return true;
// Multiple case selections
std::vector<caf::PdmUiItem*> selectedItems = caf::selectedObjectsByTypeStrict<caf::PdmUiItem*>();

View File

@ -19,14 +19,15 @@
#include "RicPasteAsciiDataToSummaryPlotFeature.h"
#include "OperationsUsingObjReferences/RicPasteFeatureImpl.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RicPasteAsciiDataToSummaryPlotFeatureUi.h"
#include "RiaLogging.h"
#include "RimAsciiDataCurve.h"
#include "RimSummaryCurveAppearanceCalculator.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmDefaultObjectFactory.h"
#include "cafPdmDocument.h"
@ -55,9 +56,9 @@ bool RicPasteAsciiDataToSummaryPlotFeature::isCommandEnabled()
if ( !destinationObject ) return false;
RimSummaryPlotCollection* summaryPlotCollection = nullptr;
destinationObject->firstAncestorOrThisOfType( summaryPlotCollection );
if ( !summaryPlotCollection )
RimSummaryMultiPlot* multiPlot = nullptr;
destinationObject->firstAncestorOrThisOfType( multiPlot );
if ( !multiPlot )
{
return false;
}
@ -79,7 +80,7 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered( bool isChecked )
RicPasteAsciiDataToSummaryPlotFeatureUi pasteOptions;
caf::PdmSettings::readFieldsFromApplicationStore( &pasteOptions, pasteOptions.contextString() );
if ( !summaryPlot ) pasteOptions.createNewPlot();
if ( !summaryPlot ) pasteOptions.setCreateNewPlot();
pasteOptions.setUiModePasteText( text );
caf::PdmUiPropertyViewDialog propertyDialog( nullptr, &pasteOptions, "Set Paste Options", "" );
@ -91,14 +92,10 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered( bool isChecked )
{
if ( !summaryPlot )
{
RimSummaryPlotCollection* summaryPlotCollection = nullptr;
destinationObject->firstAncestorOrThisOfType( summaryPlotCollection );
if ( !summaryPlotCollection )
{
return;
}
summaryPlot = createSummaryPlotAndAddToPlotCollection( summaryPlotCollection );
summaryPlotCollection->updateConnectedEditors();
summaryPlot = new RimSummaryPlot();
summaryPlot->enableAutoPlotTitle( true );
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( summaryPlot );
}
caf::PdmSettings::writeFieldsToApplicationStore( &pasteOptions, pasteOptions.contextString() );
@ -249,14 +246,3 @@ RicPasteAsciiDataToSummaryPlotFeature::CurveType
}
return CURVE_UNKNOWN;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlot*
RicPasteAsciiDataToSummaryPlotFeature::createSummaryPlotAndAddToPlotCollection( RimSummaryPlotCollection* plotCollection )
{
QString name = QString( "Summary Plot %1" ).arg( plotCollection->plots().size() + 1 );
return plotCollection->createNamedSummaryPlot( name );
}

View File

@ -26,7 +26,6 @@
class RimSummaryCurve;
class RimAsciiDataCurve;
class RicPasteAsciiDataToSummaryPlotFeatureUi;
class RimSummaryPlotCollection;
class RimSummaryPlot;
//==================================================================================================
@ -58,6 +57,4 @@ private:
const RicPasteAsciiDataToSummaryPlotFeatureUi& settings );
static CurveType guessCurveType( const QString& curveName );
static RimSummaryPlot* createSummaryPlotAndAddToPlotCollection( RimSummaryPlotCollection* plotCollection );
};

View File

@ -316,7 +316,7 @@ const AsciiDataParseOptions RicPasteAsciiDataToSummaryPlotFeatureUi::parseOption
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicPasteAsciiDataToSummaryPlotFeatureUi::createNewPlot()
void RicPasteAsciiDataToSummaryPlotFeatureUi::setCreateNewPlot()
{
m_createNewPlot = true;
}
@ -558,4 +558,4 @@ void RicPasteAsciiDataToSummaryPlotFeatureUi::updatePreviewTextAndDateFormat()
QString RicPasteAsciiDataToSummaryPlotFeatureUi::contextString() const
{
return QString( "AsciiDataToSummarySettings" );
}
}

View File

@ -129,7 +129,7 @@ public:
UiMode uiModeImport() const;
const AsciiDataParseOptions parseOptions() const;
void createNewPlot();
void setCreateNewPlot();
QString contextString() const;

View File

@ -23,7 +23,6 @@
#include "RimMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindowTools.h"
@ -56,27 +55,6 @@ void RicPasteSummaryPlotFeature::copyPlotAndAddToCollection( RimSummaryPlot* sou
return;
}
RimSummaryPlotCollection* plotColl = caf::firstAncestorOfTypeFromSelectedObject<RimSummaryPlotCollection*>();
if ( plotColl )
{
RimSummaryPlot* newSummaryPlot = dynamic_cast<RimSummaryPlot*>(
sourcePlot->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( newSummaryPlot );
plotColl->addPlot( newSummaryPlot );
// Resolve references after object has been inserted into the data model
newSummaryPlot->resolveReferencesRecursively();
newSummaryPlot->initAfterReadRecursively();
QString nameOfCopy = QString( "Copy of " ) + newSummaryPlot->description();
newSummaryPlot->setDescription( nameOfCopy );
plotColl->updateConnectedEditors();
newSummaryPlot->loadDataAndUpdate();
}
}
//--------------------------------------------------------------------------------------------------
@ -90,14 +68,7 @@ bool RicPasteSummaryPlotFeature::isCommandEnabled()
if ( !destinationObject ) return false;
auto multiPlot = caf::firstAncestorOfTypeFromSelectedObject<RimMultiPlot*>();
if ( multiPlot ) return true;
RimSummaryPlotCollection* plotColl = nullptr;
destinationObject->firstAncestorOrThisOfType( plotColl );
if ( !plotColl )
{
return false;
}
if ( !multiPlot ) return false;
return RicPasteSummaryPlotFeature::summaryPlots().size() > 0;
}

View File

@ -24,8 +24,8 @@
#include "RimEclipseView.h"
#include "RimMainPlotCollection.h"
#include "RimProject.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
CAF_PDM_SOURCE_INIT( RicSelectSummaryPlotUI, "RicSelectSummaryPlotUI" );
@ -91,7 +91,7 @@ QList<caf::PdmOptionItemInfo>
if ( fieldNeedingOptions == &m_selectedSummaryPlot )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
summaryPlotColl->summaryPlotItemInfos( &options );
}
@ -104,7 +104,7 @@ QList<caf::PdmOptionItemInfo>
//--------------------------------------------------------------------------------------------------
void RicSelectSummaryPlotUI::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
if ( RiaSummaryTools::summaryPlotCollection()->plots().empty() )
if ( RiaSummaryTools::summaryMultiPlotCollection()->multiPlots().empty() )
{
m_createNewPlot = true;
}

View File

@ -23,7 +23,6 @@
#include "cafPdmPtrField.h"
class RimSummaryPlot;
class RimSummaryPlotCollection;
//==================================================================================================
///

View File

@ -23,7 +23,6 @@
#include "RiaGuiApplication.h"
#include "RiaSummaryCurveDefinition.h"
#include "RicSelectSummaryPlotUI.h"
#include "RiuSummaryCurveDefinitionKeywords.h"
#include "RimDerivedEnsembleCaseCollection.h"
@ -44,7 +43,6 @@
#include "RimSummaryCurveCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuPlotMainWindow.h"
#include "RiuPlotMainWindowTools.h"
@ -276,16 +274,6 @@ QList<caf::PdmOptionItemInfo>
{
m_plotContainer->summaryPlotItemInfos( &options );
}
else
{
RimProject* proj = RimProject::current();
RimSummaryPlotCollection* summaryPlotColl = proj->mainPlotCollection()->summaryPlotCollection();
if ( summaryPlotColl )
{
summaryPlotColl->summaryPlotItemInfos( &options );
}
}
}
return options;
@ -853,8 +841,6 @@ void RicSummaryPlotEditorUi::createNewPlot()
RimSummaryPlot* newSummaryPlot = nullptr;
RimSummaryPlotCollection* summaryPlotColl = proj->mainPlotCollection()->summaryPlotCollection();
if ( m_plotContainer )
{
newSummaryPlot = new RimSummaryPlot();
@ -862,10 +848,6 @@ void RicSummaryPlotEditorUi::createNewPlot()
newSummaryPlot->enableAutoPlotTitle( true );
m_plotContainer->addPlot( newSummaryPlot );
}
else if ( summaryPlotColl )
{
newSummaryPlot = summaryPlotColl->createSummaryPlotWithAutoTitle();
}
if ( newSummaryPlot )
{
@ -875,10 +857,6 @@ void RicSummaryPlotEditorUi::createNewPlot()
{
m_plotContainer->updateConnectedEditors();
}
else if ( summaryPlotColl )
{
summaryPlotColl->updateConnectedEditors();
}
m_targetPlot = newSummaryPlot;

View File

@ -29,6 +29,7 @@
#include "RiaSummaryStringTools.h"
#include "RiaTextStringTools.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RicCreateSummaryCaseCollectionFeature.h"
#include "RicImportGeneralDataFeature.h"
#include "RicImportSummaryCasesFeature.h"
@ -53,7 +54,6 @@
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
@ -297,8 +297,6 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
RimSummaryPlot* lastPlotCreated = nullptr;
RimSummaryPlotCollection* sumPlotColl = RimProject::current()->mainPlotCollection()->summaryPlotCollection();
RiaSummaryStringTools::splitAddressFiltersInGridAndSummary( summaryCasesToUse[0],
allCurveAddressFilters,
&summaryAddressFilters,
@ -318,8 +316,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
RimSummaryPlot* newPlot = nullptr;
if ( ensemble )
{
newPlot = createSummaryPlotForEnsemble( sumPlotColl,
summaryCasesToUse,
newPlot = createSummaryPlotForEnsemble( summaryCasesToUse,
ensemble,
summaryAddressFilters,
addHistoryCurves,
@ -328,8 +325,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
}
else
{
newPlot =
createSummaryPlotForCases( sumPlotColl, summaryCasesToUse, summaryAddressFilters, addHistoryCurves );
newPlot = createSummaryPlotForCases( summaryCasesToUse, summaryAddressFilters, addHistoryCurves );
}
lastPlotCreated = newPlot;
@ -337,12 +333,13 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
newPlot->setLegendsVisible( !hideLegend );
newPlot->setNormalizationEnabled( isNormalizedY );
newPlot->loadDataAndUpdate();
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot );
}
else // Multiplot, one for each separate summary address
else // Multiple plots, one for each separate summary address, put them all in a summary multiplot
{
std::vector<RimSummaryPlot*> summaryPlots =
createMultipleSummaryPlotsFromAddresses( sumPlotColl,
summaryCasesToUse,
createMultipleSummaryPlotsFromAddresses( summaryCasesToUse,
ensemble,
summaryAddressFilters,
addHistoryCurves,
@ -357,6 +354,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
summaryPlot->setNormalizationEnabled( isNormalizedY );
summaryPlot->loadDataAndUpdate();
}
RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( summaryPlots );
}
}
@ -412,7 +411,9 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
if ( createdCurves.size() )
{
RimSummaryPlot* newPlot = sumPlotColl->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
for ( auto curve : createdCurves )
{
newPlot->addGridTimeHistoryCurve( curve );
@ -422,6 +423,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
newPlot->setNormalizationEnabled( isNormalizedY );
newPlot->loadDataAndUpdate();
lastPlotCreated = newPlot;
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot );
}
}
else // Multiplot
@ -465,7 +468,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
if ( createdCurves.size() )
{
RimSummaryPlot* newPlot = sumPlotColl->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
for ( auto newCurve : createdCurves )
{
newPlot->addGridTimeHistoryCurve( newCurve );
@ -474,6 +478,8 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
newPlot->setNormalizationEnabled( isNormalizedY );
newPlot->loadDataAndUpdate();
lastPlotCreated = newPlot;
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( newPlot );
}
}
}
@ -482,7 +488,7 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
if ( lastPlotCreated )
{
sumPlotColl->updateConnectedEditors();
RimProject::current()->mainPlotCollection()->summaryMultiPlotCollection()->updateConnectedEditors();
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
// Needed to avoid unnecessary activation of sub windows (plots)
@ -503,15 +509,15 @@ void RicSummaryPlotFeatureImpl::createSummaryPlotsFromArgumentLine( const QStrin
}
}
RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryCaseCollection* ensemble,
QStringList summaryAddressFilters,
bool addHistoryCurves,
EnsembleColoringType ensembleColoringStyle,
QString ensembleColoringParameter )
{
RimSummaryPlot* newPlot = sumPlotColl->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
if ( ensemble )
{
@ -567,12 +573,12 @@ RimEnsembleCurveSet* RicSummaryPlotFeatureImpl::createCurveSet( RimSummaryCaseCo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotForCases( RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotForCases( const std::vector<RimSummaryCase*>& summaryCasesToUse,
QStringList summaryAddressFilters,
bool addHistoryCurves /*= false */ )
{
RimSummaryPlot* newPlot = sumPlotColl->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
for ( RimSummaryCase* sumCase : summaryCasesToUse )
{
@ -588,7 +594,6 @@ RimSummaryPlot* RicSummaryPlotFeatureImpl::createSummaryPlotForCases( RimSummary
///
//--------------------------------------------------------------------------------------------------
std::vector<RimSummaryPlot*> RicSummaryPlotFeatureImpl::createMultipleSummaryPlotsFromAddresses(
RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryCaseCollection* ensemble,
QStringList summaryAddressFilters,
@ -631,7 +636,8 @@ std::vector<RimSummaryPlot*> RicSummaryPlotFeatureImpl::createMultipleSummaryPlo
if ( createdCurves.size() || createdEnsembleCurveSets.size() )
{
RimSummaryPlot* newPlot = sumPlotColl->createSummaryPlotWithAutoTitle();
RimSummaryPlot* newPlot = new RimSummaryPlot();
newPlot->enableAutoPlotTitle( true );
for ( auto curve : createdCurves )
{

View File

@ -33,7 +33,6 @@ class RimSummaryCurve;
class RimSummaryPlot;
class RimSummaryCase;
class RimSummaryCaseCollection;
class RimSummaryPlotCollection;
class RimEnsembleCurveSet;
class QStringList;
@ -50,28 +49,24 @@ public:
};
static std::vector<RimSummaryCurve*> addDefaultCurvesToPlot( RimSummaryPlot* plot, RimSummaryCase* summaryCase );
static void ensureAtLeastOnePlot( RimSummaryPlotCollection* summaryPlotCollection, RimSummaryCase* summaryCase );
static caf::PdmObject* createDefaultSummaryPlot( RimSummaryCase* summaryCase );
static caf::PdmObject* createDefaultSummaryPlot( RimSummaryCase* summaryCase );
static void createSummaryPlotsFromArgumentLine( const QStringList& arguments );
static RimSummaryPlot*
createSummaryPlotForEnsemble( RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
createSummaryPlotForEnsemble( const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryCaseCollection* ensemble,
QStringList summaryAddressFilters,
bool addHistoryCurves = false,
EnsembleColoringType ensembleColoringStyle = EnsembleColoringType::NONE,
QString ensembleColoringParameter = "" );
static RimSummaryPlot* createSummaryPlotForCases( RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
static RimSummaryPlot* createSummaryPlotForCases( const std::vector<RimSummaryCase*>& summaryCasesToUse,
QStringList summaryAddressFilters,
bool addHistoryCurves = false );
static std::vector<RimSummaryPlot*>
createMultipleSummaryPlotsFromAddresses( RimSummaryPlotCollection* sumPlotColl,
const std::vector<RimSummaryCase*>& summaryCasesToUse,
createMultipleSummaryPlotsFromAddresses( const std::vector<RimSummaryCase*>& summaryCasesToUse,
RimSummaryCaseCollection* ensemble,
QStringList summaryAddressFilters,
bool addHistoryCurves = false,

View File

@ -130,7 +130,6 @@
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSurface.h"
#include "RimSurfaceCollection.h"
#include "RimValveTemplate.h"
@ -557,19 +556,14 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
{
menuBuilder << "RicNewVfpPlotFeature";
}
else if ( dynamic_cast<RimSummaryPlotCollection*>( firstUiItem ) )
{
menuBuilder << "RicPasteSummaryPlotFeature";
menuBuilder << "RicPasteAsciiDataToSummaryPlotFeature";
menuBuilder << "Separator";
menuBuilder << "RicOpenSummaryPlotEditorFeature";
menuBuilder << "RicNewDefaultSummaryPlotFeature";
menuBuilder << "Separator";
menuBuilder << "RicShowSummaryCurveCalculatorFeature";
}
else if ( dynamic_cast<RimSummaryMultiPlotCollection*>( firstUiItem ) )
{
menuBuilder << "RicNewSummaryMultiPlotFeature";
menuBuilder << "Separator";
menuBuilder << "RicPasteSummaryPlotFeature";
menuBuilder << "RicPasteAsciiDataToSummaryPlotFeature";
menuBuilder << "Separator";
menuBuilder << "RicShowSummaryCurveCalculatorFeature";
}
else if ( dynamic_cast<RimAnalysisPlotCollection*>( firstUiItem ) )
{
@ -778,7 +772,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicNewSummaryMultiPlotFeature";
menuBuilder << "RicNewDerivedEnsembleFeature";
menuBuilder << "RicOpenSummaryPlotEditorFeature";
menuBuilder << "RicNewDefaultSummaryPlotFeature";
menuBuilder << "RicNewSummaryCrossPlotFeature";
menuBuilder.addSeparator();
menuBuilder << "RicConvertGroupToEnsembleFeature";
@ -795,7 +788,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator();
menuBuilder << "RicNewSummaryMultiPlotFeature";
menuBuilder << "RicOpenSummaryPlotEditorFeature";
menuBuilder << "RicNewDefaultSummaryPlotFeature";
menuBuilder << "RicNewSummaryCrossPlotFeature";
menuBuilder.addSeparator();
menuBuilder << "RicImportGridModelFromSummaryCaseFeature";
@ -1085,7 +1077,6 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicNewSummaryMultiPlotFeature";
menuBuilder << "RicNewDerivedEnsembleFeature";
menuBuilder << "RicOpenSummaryPlotEditorFeature";
menuBuilder << "RicNewDefaultSummaryPlotFeature";
menuBuilder << "RicNewSummaryCrossPlotFeature";
menuBuilder << "RicSummaryCurveSwitchAxisFeature";
menuBuilder << "RicNewDerivedSummaryFeature";

View File

@ -19,6 +19,8 @@
#include "RimMainPlotCollection.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "RimAbstractPlotCollection.h"
#include "RimAnalysisPlotCollection.h"
#include "RimCorrelationPlotCollection.h"
@ -80,9 +82,6 @@ RimMainPlotCollection::RimMainPlotCollection()
CAF_PDM_InitFieldNoDefault( &m_pltPlotCollection, "PltPlotCollection", "" );
m_pltPlotCollection.uiCapability()->setUiTreeHidden( true );
CAF_PDM_InitFieldNoDefault( &m_summaryPlotCollection, "SummaryPlotCollection", "Summary Plots" );
m_summaryPlotCollection.uiCapability()->setUiTreeHidden( true );
CAF_PDM_InitFieldNoDefault( &m_summaryMultiPlotCollection, "SummaryMultiPlotCollection", "Multi Summary Plots" );
m_summaryMultiPlotCollection.uiCapability()->setUiTreeHidden( true );
@ -125,7 +124,6 @@ RimMainPlotCollection::RimMainPlotCollection()
m_wellLogPlotCollection = new RimWellLogPlotCollection();
m_rftPlotCollection = new RimRftPlotCollection();
m_pltPlotCollection = new RimPltPlotCollection();
m_summaryPlotCollection = new RimSummaryPlotCollection();
m_summaryMultiPlotCollection = new RimSummaryMultiPlotCollection();
m_summaryCrossPlotCollection = new RimSummaryCrossPlotCollection();
m_flowPlotCollection = new RimFlowPlotCollection();
@ -140,6 +138,11 @@ RimMainPlotCollection::RimMainPlotCollection()
m_gridStatisticsPlotCollection = new RimGridStatisticsPlotCollection;
m_ensembleFractureStatisticsPlotCollection = new RimEnsembleFractureStatisticsPlotCollection;
#endif
CAF_PDM_InitFieldNoDefault( &m_summaryPlotCollection_OBSOLETE, "SummaryPlotCollection", "Summary Plots" );
m_summaryPlotCollection_OBSOLETE.uiCapability()->setUiTreeHidden( true );
m_summaryPlotCollection_OBSOLETE.xmlCapability()->setIOWritable( false );
m_summaryPlotCollection_OBSOLETE = new RimSummaryPlotCollection();
}
//--------------------------------------------------------------------------------------------------
@ -149,6 +152,25 @@ RimMainPlotCollection::~RimMainPlotCollection()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMainPlotCollection::initAfterRead()
{
std::vector<RimSummaryPlot*> plotsToMove;
for ( auto singlePlot : m_summaryPlotCollection_OBSOLETE()->plots() )
{
plotsToMove.push_back( singlePlot );
}
for ( auto singlePlot : plotsToMove )
{
m_summaryPlotCollection_OBSOLETE()->removePlot( singlePlot );
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( singlePlot );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -190,14 +212,6 @@ RimPltPlotCollection* RimMainPlotCollection::pltPlotCollection() const
return m_pltPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSummaryPlotCollection* RimMainPlotCollection::summaryPlotCollection() const
{
return m_summaryPlotCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -415,7 +429,6 @@ std::vector<RimPlotCollection*> RimMainPlotCollection::allPlotCollections() cons
{
std::vector<RimPlotCollection*> plotCollections;
plotCollections.push_back( wellLogPlotCollection() );
plotCollections.push_back( summaryPlotCollection() );
plotCollections.push_back( summaryMultiPlotCollection() );
plotCollections.push_back( summaryCrossPlotCollection() );
plotCollections.push_back( gridCrossPlotCollection() );

View File

@ -34,9 +34,9 @@ class RimPltPlotCollection;
class RimGridCrossPlotCollection;
class RimMultiPlotCollection;
class RimSummaryMultiPlotCollection;
class RimSummaryPlotCollection;
class RimSummaryCrossPlotCollection;
class RimSummaryPlot;
class RimSummaryPlotCollection;
class RifReaderEclipseSummary;
class RimEclipseResultCase;
class RimFlowPlotCollection;
@ -65,7 +65,6 @@ public:
RimWellLogPlotCollection* wellLogPlotCollection() const;
RimRftPlotCollection* rftPlotCollection() const;
RimPltPlotCollection* pltPlotCollection() const;
RimSummaryPlotCollection* summaryPlotCollection() const;
RimSummaryMultiPlotCollection* summaryMultiPlotCollection() const;
RimSummaryCrossPlotCollection* summaryCrossPlotCollection() const;
RimAnalysisPlotCollection* analysisPlotCollection() const;
@ -91,6 +90,9 @@ public:
void ensureCalculationIdsAreAssigned();
void loadDataAndUpdateAllPlots();
protected:
void initAfterRead() override;
private:
// Overridden PDM methods
caf::PdmFieldHandle* objectToggleField() override;
@ -106,7 +108,6 @@ private:
caf::PdmChildField<RimWellLogPlotCollection*> m_wellLogPlotCollection;
caf::PdmChildField<RimRftPlotCollection*> m_rftPlotCollection;
caf::PdmChildField<RimPltPlotCollection*> m_pltPlotCollection;
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection;
caf::PdmChildField<RimSummaryMultiPlotCollection*> m_summaryMultiPlotCollection;
caf::PdmChildField<RimSummaryCrossPlotCollection*> m_summaryCrossPlotCollection;
caf::PdmChildField<RimAnalysisPlotCollection*> m_analysisPlotCollection;
@ -123,4 +124,6 @@ private:
#endif
caf::PdmField<bool> m_show;
caf::PdmChildField<RimSummaryPlotCollection*> m_summaryPlotCollection_OBSOLETE;
};

View File

@ -78,7 +78,6 @@
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCrossPlotCollection.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlotCollection.h"
#include "RimSurfaceCollection.h"
#include "RimTools.h"
#include "RimUserDefinedPolylinesAnnotation.h"
@ -1450,10 +1449,6 @@ void RimProject::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, Q
statisticsItemCollection->add( mainPlotCollection->ensembleFractureStatisticsPlotCollection() );
}
#endif
if ( mainPlotCollection->summaryPlotCollection() )
{
uiTreeOrdering.add( mainPlotCollection->summaryPlotCollection() );
}
}
}
else if ( uiConfigName == "PlotWindow.DataSources" )

View File

@ -38,8 +38,8 @@
#include "RimMultiPlotCollection.h"
#include "RimProject.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h"
@ -156,10 +156,11 @@ void RimReloadCaseTools::updateAllPlots()
}
}
RimSummaryPlotCollection* summaryPlotCollection = project->mainPlotCollection()->summaryPlotCollection();
if ( summaryPlotCollection )
RimSummaryMultiPlotCollection* summaryMultiPlotCollection =
project->mainPlotCollection()->summaryMultiPlotCollection();
if ( summaryMultiPlotCollection )
{
for ( RimSummaryPlot* summaryPlot : summaryPlotCollection->plots() )
for ( RimSummaryMultiPlot* summaryPlot : summaryMultiPlotCollection->multiPlots() )
{
summaryPlot->loadDataAndUpdate();
}

View File

@ -30,8 +30,9 @@
#include "RimSummaryCalculationCollection.h"
#include "RimSummaryCalculationVariable.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RiuExpressionContextMenuManager.h"
@ -475,24 +476,27 @@ void RimSummaryCalculation::updateDependentCurvesAndPlots()
this->firstAncestorOrThisOfTypeAsserted( calcColl );
calcColl->rebuildCaseMetaData();
RimSummaryPlotCollection* summaryPlotCollection = RiaSummaryTools::summaryPlotCollection();
for ( RimSummaryPlot* sumPlot : summaryPlotCollection->plots() )
RimSummaryMultiPlotCollection* summaryPlotCollection = RiaSummaryTools::summaryMultiPlotCollection();
for ( auto multiPlot : summaryPlotCollection->multiPlots() )
{
bool plotContainsCalculatedCurves = false;
for ( RimSummaryCurve* sumCurve : sumPlot->summaryCurves() )
for ( RimSummaryPlot* sumPlot : multiPlot->summaryPlots() )
{
if ( sumCurve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
bool plotContainsCalculatedCurves = false;
for ( RimSummaryCurve* sumCurve : sumPlot->summaryCurves() )
{
sumCurve->updateConnectedEditors();
if ( sumCurve->summaryAddressY().category() == RifEclipseSummaryAddress::SUMMARY_CALCULATED )
{
sumCurve->updateConnectedEditors();
plotContainsCalculatedCurves = true;
plotContainsCalculatedCurves = true;
}
}
}
if ( plotContainsCalculatedCurves )
{
sumPlot->loadDataAndUpdate();
if ( plotContainsCalculatedCurves )
{
sumPlot->loadDataAndUpdate();
}
}
}
}

View File

@ -31,7 +31,6 @@
#include "RimSummaryAddress.h"
#include "RimSummaryAddressCollection.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryPlotCollection.h"
#include "cafPdmFieldScriptingCapability.h"
#include "cafPdmUiTreeOrdering.h"

View File

@ -42,8 +42,8 @@
#include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "cafProgressInfo.h"
@ -581,7 +581,7 @@ RimSummaryCaseCollection* RimSummaryCaseMainCollection::defaultAllocator()
//--------------------------------------------------------------------------------------------------
void RimSummaryCaseMainCollection::onCaseNameChanged( const SignalEmitter* emitter )
{
RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();
RimSummaryMultiPlotCollection* summaryPlotColl = RiaSummaryTools::summaryMultiPlotCollection();
summaryPlotColl->updateSummaryNameHasChanged();
}

View File

@ -44,7 +44,6 @@
#include "RimSummaryCurveCollection.h"
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryTimeAxisProperties.h"
#include "RimTools.h"
@ -261,6 +260,8 @@ std::vector<double> RimSummaryCurve::valuesY() const
RifEclipseSummaryAddress addr = m_yValuesSummaryAddress()->address();
reader->values( addr, &values );
if ( values.empty() ) return values;
RimSummaryPlot* plot = nullptr;
firstAncestorOrThisOfTypeAsserted( plot );
bool isNormalized = plot->isNormalizationEnabled();

View File

@ -143,3 +143,33 @@ void RimSummaryMultiPlotCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering
}
uiTreeOrdering.skipRemainingChildren( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryMultiPlotCollection::summaryPlotItemInfos( QList<caf::PdmOptionItemInfo>* optionInfos ) const
{
for ( RimSummaryMultiPlot* multiPlot : multiPlots() )
{
for ( RimSummaryPlot* plot : multiPlot->summaryPlots() )
{
QString displayName = plot->description();
optionInfos->push_back(
caf::PdmOptionItemInfo( displayName, plot, false, plot->uiCapability()->uiIconProvider() ) );
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryMultiPlotCollection::updateSummaryNameHasChanged()
{
for ( RimSummaryMultiPlot* multiPlot : multiPlots() )
{
for ( RimSummaryPlot* plot : multiPlot->summaryPlots() )
{
plot->updateCaseNameHasChanged();
}
}
}

View File

@ -21,6 +21,9 @@
#include "cafPdmChildArrayField.h"
#include "cafPdmObject.h"
#include "cafPdmUiItem.h"
#include <QList>
class RimSummaryMultiPlot;
@ -44,6 +47,10 @@ public:
void addSummaryMultiPlot( RimSummaryMultiPlot* plot );
void summaryPlotItemInfos( QList<caf::PdmOptionItemInfo>* optionInfos ) const;
void updateSummaryNameHasChanged();
protected:
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;

View File

@ -51,7 +51,6 @@
#include "RimSummaryCurveCollection.h"
#include "RimSummaryCurvesData.h"
#include "RimSummaryPlotAxisFormatter.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryPlotControls.h"
#include "RimSummaryPlotFilterTextCurveSetEditor.h"
#include "RimSummaryPlotNameHelper.h"

View File

@ -36,8 +36,8 @@
#include "RimSummaryCaseCollection.h"
#include "RimSummaryCaseMainCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
#include "SummaryPlotCommands/RicSummaryPlotFeatureImpl.h"
@ -189,7 +189,7 @@ QList<caf::PdmOptionItemInfo>
QList<caf::PdmOptionItemInfo> options;
if ( fieldNeedingOptions == &m_summaryPlot )
{
auto coll = RiaSummaryTools::summaryPlotCollection();
auto coll = RiaSummaryTools::summaryMultiPlotCollection();
coll->summaryPlotItemInfos( &options );
}
else if ( fieldNeedingOptions == &m_filterText )
@ -419,13 +419,9 @@ void RimSummaryPlotManager::createNewPlot()
}
else
{
auto plotCollection = RiaSummaryTools::summaryPlotCollection();
for ( auto plot : plots )
{
plot->setAsPlotMdiWindow();
plotCollection->addPlot( plot );
RicSummaryPlotBuilder::createAndAppendSingleSummaryMultiPlot( plot );
plot->loadDataAndUpdate();
}
}
@ -549,7 +545,7 @@ void RimSummaryPlotManager::updateFilterTextHistory()
//--------------------------------------------------------------------------------------------------
void RimSummaryPlotManager::updateProjectTreeAndRefresUi()
{
RiaSummaryTools::summaryPlotCollection()->updateConnectedEditors();
RiaSummaryTools::summaryMultiPlotCollection()->updateConnectedEditors();
updateFilterTextHistory();
m_filterText.uiCapability()->updateConnectedEditors();

View File

@ -64,8 +64,7 @@ caf::PdmObjectHandle* RimcSummaryPlotCollection_newSummaryPlot::execute()
{
if ( !addressStrings.empty() )
{
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( self<RimSummaryPlotCollection>(),
std::vector<RimSummaryCase*>(),
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForEnsemble( std::vector<RimSummaryCase*>(),
m_ensemble,
addressStrings );
}
@ -79,21 +78,17 @@ caf::PdmObjectHandle* RimcSummaryPlotCollection_newSummaryPlot::execute()
std::vector<RimSummaryCase*> summaryCases = m_summaryCases.ptrReferencedObjects();
if ( !addressStrings.empty() )
{
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForCases( self<RimSummaryPlotCollection>(),
summaryCases,
addressStrings );
newPlot = RicSummaryPlotFeatureImpl::createSummaryPlotForCases( summaryCases, addressStrings );
}
else
{
newPlot = RicNewDefaultSummaryPlotFeature::createFromSummaryCases( self<RimSummaryPlotCollection>(),
summaryCases );
newPlot = RicNewDefaultSummaryPlotFeature::createFromSummaryCases( summaryCases );
}
}
if ( newPlot )
{
newPlot->loadDataAndUpdate();
self<RimSummaryPlotCollection>()->updateAllRequiredEditors();
}
return newPlot;

View File

@ -37,7 +37,6 @@
#include "RimSummaryMultiPlot.h"
#include "RimSummaryMultiPlotCollection.h"
#include "RimSummaryPlot.h"
#include "RimSummaryPlotCollection.h"
#include "RimSummaryPlotFilterTextCurveSetEditor.h"
#include "RimSummaryPlotManager.h"
#include "RimViewWindow.h"
@ -154,7 +153,7 @@ void RiuPlotMainWindow::initializeGuiNewProjectLoaded()
}
{
auto* obj = RiaSummaryTools::summaryPlotCollection();
auto* obj = RiaSummaryTools::summaryMultiPlotCollection();
if ( obj )
{
setExpanded( obj );