mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8425 Summary Multi Plots: Add grouping on wells, groups, ...
* #8425 Multi Graph : Support grouping on object name * #8425 Multi Graph : Improve creation of new graphs * #8425 Multi Graph : Improve default tick mark count * Handle history and non history as identical headers * #8425 Multi Graph : Increase space below a graph
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaResultNames.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiaTimeTTools.h"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimMultiPlot.h"
|
||||
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RiaSummaryStringTools.h"
|
||||
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
@@ -28,6 +29,7 @@
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
#include "RimSummaryCurve.h"
|
||||
|
||||
#include "RimSummaryMultiPlot.h"
|
||||
#include "RimSummaryPlot.h"
|
||||
#include "RimSummaryPlotNameHelper.h"
|
||||
@@ -53,6 +55,7 @@ RimSummaryMultiPlot::RimSummaryMultiPlot()
|
||||
m_filterText.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
|
||||
CAF_PDM_InitField( &m_individualPlotPerVector, "IndividualPlotPerVector", false, "One plot per Vector" );
|
||||
CAF_PDM_InitField( &m_individualPlotPerObject, "IndividualPlotPerObject", false, "One plot per Object" );
|
||||
CAF_PDM_InitField( &m_individualPlotPerDataSource, "IndividualPlotPerDataSource", false, "One plot per Data Source" );
|
||||
CAF_PDM_InitField( &m_autoPlotTitles, "AutoPlotTitles", false, "Auto Plot Titles" );
|
||||
CAF_PDM_InitField( &m_autoPlotTitlesOnSubPlots, "AutoPlotTitlesSubPlots", false, "Auto Plot Titles Sub Plots" );
|
||||
@@ -118,7 +121,7 @@ QString RimSummaryMultiPlot::description() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::addPlot( RimPlot* plot )
|
||||
void RimSummaryMultiPlot::addPlot( RimSummaryPlot* plot )
|
||||
{
|
||||
m_multiPlot->addPlot( plot );
|
||||
}
|
||||
@@ -126,7 +129,7 @@ void RimSummaryMultiPlot::addPlot( RimPlot* plot )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryMultiPlot* RimSummaryMultiPlot::createAndAppendMultiPlot( const std::vector<RimPlot*>& plots )
|
||||
RimSummaryMultiPlot* RimSummaryMultiPlot::createAndAppendMultiPlot( const std::vector<RimSummaryPlot*>& plots )
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
auto* plotCollection = project->mainPlotCollection()->multiPlotCollection();
|
||||
@@ -135,19 +138,9 @@ RimSummaryMultiPlot* RimSummaryMultiPlot::createAndAppendMultiPlot( const std::v
|
||||
plotWindow->setAsPlotMdiWindow();
|
||||
plotCollection->addMultiSummaryPlot( plotWindow );
|
||||
|
||||
for ( auto plot : plots )
|
||||
{
|
||||
plotWindow->addPlot( plot );
|
||||
|
||||
plot->resolveReferencesRecursively();
|
||||
plot->revokeMdiWindowStatus();
|
||||
plot->setShowWindow( true );
|
||||
|
||||
plot->loadDataAndUpdate();
|
||||
}
|
||||
insertGraphsIntoPlot( plotWindow, plots );
|
||||
|
||||
plotCollection->updateAllRequiredEditors();
|
||||
plotWindow->loadDataAndUpdate();
|
||||
|
||||
return plotWindow;
|
||||
}
|
||||
@@ -296,20 +289,26 @@ QList<caf::PdmOptionItemInfo> RimSummaryMultiPlot::calculateValueOptions( const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_filterText );
|
||||
uiOrdering.add( &m_individualPlotPerVector );
|
||||
uiOrdering.add( &m_individualPlotPerDataSource );
|
||||
uiOrdering.add( &m_autoPlotTitles );
|
||||
uiOrdering.add( &m_autoPlotTitlesOnSubPlots );
|
||||
|
||||
auto group = uiOrdering.addNewGroup( "Multi Plot Options" );
|
||||
m_multiPlot->uiOrderingForSummaryMultiPlot( *group );
|
||||
|
||||
{
|
||||
auto group = uiOrdering.addNewGroup( "Data Source" );
|
||||
m_sourceStepping()->uiOrdering( uiConfigName, *group );
|
||||
}
|
||||
|
||||
auto group = uiOrdering.addNewGroup( "Multi Plot Options" );
|
||||
m_multiPlot->uiOrderingForSummaryMultiPlot( *group );
|
||||
|
||||
{
|
||||
auto group = uiOrdering.addNewGroup( "Graph Building" );
|
||||
group->setCollapsedByDefault( true );
|
||||
|
||||
group->add( &m_filterText );
|
||||
group->add( &m_individualPlotPerVector );
|
||||
group->add( &m_individualPlotPerDataSource );
|
||||
group->add( &m_individualPlotPerObject );
|
||||
}
|
||||
uiOrdering.add( &m_showMultiPlotInProjectTree );
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
@@ -335,7 +334,7 @@ void RimSummaryMultiPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
}
|
||||
}
|
||||
else if ( changedField == &m_filterText || changedField == &m_individualPlotPerDataSource ||
|
||||
changedField == &m_individualPlotPerVector )
|
||||
changedField == &m_individualPlotPerVector || changedField == &m_individualPlotPerObject )
|
||||
{
|
||||
updatePlots();
|
||||
}
|
||||
@@ -404,20 +403,16 @@ void RimSummaryMultiPlot::updatePlots()
|
||||
RicSummaryPlotBuilder plotBuilder;
|
||||
plotBuilder.setAddresses( filteredAddresses );
|
||||
plotBuilder.setDataSources( matchingSummaryCases, matchingEnsembles );
|
||||
plotBuilder.setIndividualPlotPerAddress( m_individualPlotPerVector );
|
||||
plotBuilder.setIndividualPlotPerDataSource( m_individualPlotPerDataSource );
|
||||
|
||||
RicSummaryPlotBuilder::RicGraphCurveGrouping groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::NONE;
|
||||
if ( m_individualPlotPerVector ) groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::SINGLE_CURVES;
|
||||
if ( m_individualPlotPerObject ) groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::CURVES_FOR_OBJECT;
|
||||
plotBuilder.setGrouping( groping );
|
||||
|
||||
auto plots = plotBuilder.createPlots();
|
||||
for ( auto plot : plots )
|
||||
{
|
||||
this->addPlot( plot );
|
||||
|
||||
plot->resolveReferencesRecursively();
|
||||
plot->revokeMdiWindowStatus();
|
||||
plot->setShowWindow( true );
|
||||
}
|
||||
|
||||
onLoadDataAndUpdate();
|
||||
insertGraphsIntoPlot( this, plots );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +435,7 @@ void RimSummaryMultiPlot::updatePlotTitles()
|
||||
// Disable auto plot, as this is required to be able to include the information in the multi plot title
|
||||
plot->enableAutoPlotTitle( false );
|
||||
|
||||
auto plotName = subPlotNameHelper->aggregatedPlotTitle( *m_nameHelper.get() );
|
||||
auto plotName = subPlotNameHelper->aggregatedPlotTitle( *m_nameHelper );
|
||||
plot->setDescription( plotName );
|
||||
plot->updatePlotTitle();
|
||||
}
|
||||
@@ -455,6 +450,22 @@ const RimSummaryNameHelper* RimSummaryMultiPlot::nameHelper() const
|
||||
return m_nameHelper.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::setAutoTitlePlot( bool enable )
|
||||
{
|
||||
m_autoPlotTitles = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::setAutoTitleGraphs( bool enable )
|
||||
{
|
||||
m_autoPlotTitlesOnSubPlots = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -470,3 +481,59 @@ std::vector<RimSummaryPlot*> RimSummaryMultiPlot::summaryPlots() const
|
||||
|
||||
return typedPlots;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::insertGraphsIntoPlot( RimSummaryMultiPlot* plot, const std::vector<RimSummaryPlot*>& graphs )
|
||||
{
|
||||
auto columnCount = RiuMultiPlotPage::ColumnCount::COLUMNS_2;
|
||||
auto rowCount = RimMultiPlot::RowCount::ROWS_2;
|
||||
auto tickmarkCount = RimPlotAxisPropertiesInterface::LegendTickmarkCount::TICKMARK_DEFAULT;
|
||||
|
||||
bool showTitleSubGraph = true;
|
||||
if ( graphs.size() == 1 )
|
||||
{
|
||||
showTitleSubGraph = false;
|
||||
tickmarkCount = RimPlotAxisPropertiesInterface::LegendTickmarkCount::TICKMARK_MANY;
|
||||
}
|
||||
else if ( 4 < graphs.size() && graphs.size() <= 6 )
|
||||
{
|
||||
columnCount = RiuMultiPlotPage::ColumnCount::COLUMNS_3;
|
||||
rowCount = RimMultiPlot::RowCount::ROWS_2;
|
||||
tickmarkCount = RimPlotAxisPropertiesInterface::LegendTickmarkCount::TICKMARK_FEW;
|
||||
}
|
||||
else if ( 6 < graphs.size() && graphs.size() <= 12 )
|
||||
{
|
||||
columnCount = RiuMultiPlotPage::ColumnCount::COLUMNS_4;
|
||||
rowCount = RimMultiPlot::RowCount::ROWS_3;
|
||||
tickmarkCount = RimPlotAxisPropertiesInterface::LegendTickmarkCount::TICKMARK_VERY_FEW;
|
||||
}
|
||||
else
|
||||
{
|
||||
columnCount = RiuMultiPlotPage::ColumnCount::COLUMNS_4;
|
||||
rowCount = RimMultiPlot::RowCount::ROWS_4;
|
||||
tickmarkCount = RimPlotAxisPropertiesInterface::LegendTickmarkCount::TICKMARK_VERY_FEW;
|
||||
}
|
||||
|
||||
plot->setAutoTitlePlot( true );
|
||||
plot->setAutoTitleGraphs( showTitleSubGraph );
|
||||
|
||||
plot->m_multiPlot->setColumnCount( columnCount );
|
||||
plot->m_multiPlot->setRowCount( rowCount );
|
||||
plot->m_multiPlot->setShowPlotTitles( showTitleSubGraph );
|
||||
plot->m_multiPlot->setTickmarkCount( tickmarkCount );
|
||||
|
||||
for ( auto graph : graphs )
|
||||
{
|
||||
plot->addPlot( graph );
|
||||
|
||||
graph->resolveReferencesRecursively();
|
||||
graph->revokeMdiWindowStatus();
|
||||
graph->setShowWindow( true );
|
||||
|
||||
graph->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
plot->loadDataAndUpdate();
|
||||
}
|
||||
|
||||
@@ -48,12 +48,15 @@ public:
|
||||
void zoomAll() override;
|
||||
QString description() const override;
|
||||
|
||||
void addPlot( RimPlot* plot );
|
||||
void addPlot( RimSummaryPlot* plot );
|
||||
|
||||
void updatePlotTitles();
|
||||
const RimSummaryNameHelper* nameHelper() const;
|
||||
|
||||
static RimSummaryMultiPlot* createAndAppendMultiPlot( const std::vector<RimPlot*>& plots );
|
||||
void setAutoTitlePlot( bool enable );
|
||||
void setAutoTitleGraphs( bool enable );
|
||||
|
||||
static RimSummaryMultiPlot* createAndAppendMultiPlot( const std::vector<RimSummaryPlot*>& plots );
|
||||
|
||||
std::vector<RimSummaryDataSourceStepping::Axis> availableAxes() const override;
|
||||
std::vector<RimSummaryCurve*> curvesForStepping( RimSummaryDataSourceStepping::Axis axis ) const override;
|
||||
@@ -82,10 +85,13 @@ private:
|
||||
|
||||
std::vector<RimSummaryPlot*> summaryPlots() const;
|
||||
|
||||
static void insertGraphsIntoPlot( RimSummaryMultiPlot* plot, const std::vector<RimSummaryPlot*>& graphs );
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_filterText;
|
||||
caf::PdmField<bool> m_individualPlotPerVector;
|
||||
caf::PdmField<bool> m_individualPlotPerDataSource;
|
||||
caf::PdmField<bool> m_individualPlotPerObject;
|
||||
caf::PdmField<bool> m_autoPlotTitles;
|
||||
caf::PdmField<bool> m_autoPlotTitlesOnSubPlots;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
#include "RiaTimeHistoryCurveResampler.h"
|
||||
@@ -662,10 +662,9 @@ std::vector<RimSummaryCurve*> RimSummaryPlot::visibleStackedSummaryCurvesForAxis
|
||||
void RimSummaryPlot::updatePlotTitle()
|
||||
{
|
||||
m_nameHelperAllCurves->clear();
|
||||
|
||||
updateNameHelperWithCurveData( m_nameHelperAllCurves.get() );
|
||||
if ( m_useAutoPlotTitle )
|
||||
{
|
||||
updateNameHelperWithCurveData( m_nameHelperAllCurves.get() );
|
||||
m_description = m_nameHelperAllCurves->plotTitle();
|
||||
}
|
||||
|
||||
@@ -1199,6 +1198,9 @@ void RimSummaryPlot::updateTimeAxis()
|
||||
|
||||
switch ( tickmarkCountEnum )
|
||||
{
|
||||
case RimSummaryTimeAxisProperties::LegendTickmarkCount::TICKMARK_VERY_FEW:
|
||||
maxTickmarkCount = 2;
|
||||
break;
|
||||
case RimSummaryTimeAxisProperties::LegendTickmarkCount::TICKMARK_FEW:
|
||||
maxTickmarkCount = 4;
|
||||
break;
|
||||
|
||||
@@ -109,9 +109,17 @@ RimSummaryPlotManager::RimSummaryPlotManager()
|
||||
m_labelB.uiCapability()->setUiEditorTypeName( caf::PdmUiLabelEditor::uiEditorTypeName() );
|
||||
m_labelB.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField( &m_individualPlotPerObject, "IndividualPlotPerObject", false, "One plot per Object" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_individualPlotPerObject );
|
||||
|
||||
CAF_PDM_InitField( &m_individualPlotPerVector, "IndividualPlotPerVector", false, "One plot per Vector" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_individualPlotPerVector );
|
||||
|
||||
CAF_PDM_InitField( &m_individualPlotPerDataSource, "IndividualPlotPerDataSource", false, "One plot per Data Source" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_individualPlotPerDataSource );
|
||||
|
||||
CAF_PDM_InitField( &m_createMultiPlot, "CreateMultiPlot", false, "Create Multiple Plots in One Window" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_createMultiPlot );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -330,8 +338,9 @@ void RimSummaryPlotManager::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
uiOrdering.add( &m_selectedDataSources, false );
|
||||
|
||||
uiOrdering.add( &m_individualPlotPerVector );
|
||||
uiOrdering.add( &m_individualPlotPerDataSource );
|
||||
uiOrdering.add( &m_createMultiPlot );
|
||||
uiOrdering.add( &m_individualPlotPerDataSource, false );
|
||||
uiOrdering.add( &m_individualPlotPerObject );
|
||||
uiOrdering.add( &m_createMultiPlot, false );
|
||||
|
||||
uiOrdering.add( &m_pushButtonAppend );
|
||||
uiOrdering.add( &m_pushButtonReplace, { false } );
|
||||
@@ -379,30 +388,34 @@ void RimSummaryPlotManager::createNewPlot()
|
||||
RicSummaryPlotBuilder plotBuilder;
|
||||
plotBuilder.setAddresses( filteredAddressesFromSource );
|
||||
plotBuilder.setDataSources( summaryCases, ensembles );
|
||||
plotBuilder.setIndividualPlotPerAddress( m_individualPlotPerVector );
|
||||
plotBuilder.setIndividualPlotPerDataSource( m_individualPlotPerDataSource );
|
||||
|
||||
RicSummaryPlotBuilder::RicGraphCurveGrouping groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::NONE;
|
||||
if ( m_individualPlotPerVector ) groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::SINGLE_CURVES;
|
||||
if ( m_individualPlotPerObject ) groping = RicSummaryPlotBuilder::RicGraphCurveGrouping::CURVES_FOR_OBJECT;
|
||||
plotBuilder.setGrouping( groping );
|
||||
|
||||
auto plots = plotBuilder.createPlots();
|
||||
if ( m_createMultiPlot )
|
||||
{
|
||||
std::vector<RimPlot*> plotsForMultiPlot;
|
||||
for ( auto p : plots )
|
||||
{
|
||||
p->loadDataAndUpdate();
|
||||
plotsForMultiPlot.push_back( dynamic_cast<RimPlot*>( p ) );
|
||||
auto summaryPlots = plotBuilder.createPlots();
|
||||
auto plot = RimSummaryMultiPlot::createAndAppendMultiPlot( summaryPlots );
|
||||
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( plot );
|
||||
}
|
||||
|
||||
RicSummaryPlotBuilder::createAndAppendMultiPlot( plotsForMultiPlot );
|
||||
|
||||
bool createStandardMultiPlot = false;
|
||||
if ( createStandardMultiPlot )
|
||||
{
|
||||
auto myCopyOfPlots = plotBuilder.createPlots();
|
||||
std::vector<RimPlot*> myRimPlots;
|
||||
for ( auto p : myCopyOfPlots )
|
||||
// Code to generate a standard multi plot
|
||||
std::vector<RimPlot*> plotsForMultiPlot;
|
||||
for ( auto p : plots )
|
||||
{
|
||||
p->loadDataAndUpdate();
|
||||
myRimPlots.push_back( dynamic_cast<RimPlot*>( p ) );
|
||||
plotsForMultiPlot.push_back( dynamic_cast<RimPlot*>( p ) );
|
||||
}
|
||||
RimSummaryMultiPlot::createAndAppendMultiPlot( myRimPlots );
|
||||
|
||||
RicSummaryPlotBuilder::createAndAppendMultiPlot( plotsForMultiPlot );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -101,6 +101,7 @@ private:
|
||||
|
||||
caf::PdmField<bool> m_individualPlotPerVector;
|
||||
caf::PdmField<bool> m_individualPlotPerDataSource;
|
||||
caf::PdmField<bool> m_individualPlotPerObject;
|
||||
caf::PdmField<bool> m_createMultiPlot;
|
||||
|
||||
caf::PdmField<QString> m_labelA;
|
||||
|
||||
@@ -18,18 +18,19 @@
|
||||
|
||||
#include "RimSummaryPlotNameHelper.h"
|
||||
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "RimObjectiveFunctionTools.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
#include "RiuSummaryQuantityNameInfoProvider.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryPlotNameHelper::RimSummaryPlotNameHelper()
|
||||
{
|
||||
m_analyzer = std::make_unique<RiaSummaryAddressAnalyzer>();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -39,7 +40,7 @@ void RimSummaryPlotNameHelper::clear()
|
||||
{
|
||||
m_summaryCases.clear();
|
||||
m_ensembleCases.clear();
|
||||
m_analyzer.clear();
|
||||
m_analyzer->clear();
|
||||
|
||||
clearTitleSubStrings();
|
||||
}
|
||||
@@ -49,7 +50,7 @@ void RimSummaryPlotNameHelper::clear()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlotNameHelper::appendAddresses( const std::vector<RifEclipseSummaryAddress>& addresses )
|
||||
{
|
||||
m_analyzer.appendAddresses( addresses );
|
||||
m_analyzer->appendAddresses( addresses );
|
||||
|
||||
extractPlotTitleSubStrings();
|
||||
}
|
||||
@@ -103,7 +104,19 @@ QString RimSummaryPlotNameHelper::plotTitle() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimSummaryPlotNameHelper::isPlotDisplayingSingleQuantity() const
|
||||
{
|
||||
return m_analyzer.quantities().size() == 1;
|
||||
if ( m_analyzer->quantities().size() == 2 )
|
||||
{
|
||||
std::vector<std::string> strings;
|
||||
for ( const auto& q : m_analyzer->quantities() )
|
||||
strings.push_back( q );
|
||||
|
||||
auto first = RimObjectiveFunctionTools::nativeQuantityName( strings[0] );
|
||||
auto second = RimObjectiveFunctionTools::nativeQuantityName( strings[1] );
|
||||
|
||||
if ( first == second ) return true;
|
||||
}
|
||||
|
||||
return m_analyzer->quantities().size() == 1;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -249,22 +262,22 @@ void RimSummaryPlotNameHelper::extractPlotTitleSubStrings()
|
||||
{
|
||||
clearTitleSubStrings();
|
||||
|
||||
auto wellNames = m_analyzer.wellNames();
|
||||
auto wellGroupNames = m_analyzer.wellGroupNames();
|
||||
auto regions = m_analyzer.regionNumbers();
|
||||
auto blocks = m_analyzer.blocks();
|
||||
auto categories = m_analyzer.categories();
|
||||
auto wellNames = m_analyzer->wellNames();
|
||||
auto wellGroupNames = m_analyzer->wellGroupNames();
|
||||
auto regions = m_analyzer->regionNumbers();
|
||||
auto blocks = m_analyzer->blocks();
|
||||
auto categories = m_analyzer->categories();
|
||||
|
||||
if ( categories.size() == 1 )
|
||||
{
|
||||
m_titleQuantity = m_analyzer.quantityNameForTitle();
|
||||
m_titleQuantity = m_analyzer->quantityNameForTitle();
|
||||
|
||||
if ( wellNames.size() == 1 )
|
||||
{
|
||||
m_titleWellName = *( wellNames.begin() );
|
||||
|
||||
{
|
||||
auto segments = m_analyzer.wellSegmentNumbers( m_titleWellName );
|
||||
auto segments = m_analyzer->wellSegmentNumbers( m_titleWellName );
|
||||
if ( segments.size() == 1 )
|
||||
{
|
||||
m_titleSegment = std::to_string( *( segments.begin() ) );
|
||||
@@ -272,7 +285,7 @@ void RimSummaryPlotNameHelper::extractPlotTitleSubStrings()
|
||||
}
|
||||
|
||||
{
|
||||
auto completions = m_analyzer.wellCompletions( m_titleWellName );
|
||||
auto completions = m_analyzer->wellCompletions( m_titleWellName );
|
||||
if ( completions.size() == 1 )
|
||||
{
|
||||
m_titleCompletion = *( completions.begin() );
|
||||
|
||||
@@ -20,19 +20,20 @@
|
||||
|
||||
#include "RimSummaryNameHelper.h"
|
||||
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
|
||||
#include "cafPdmPointer.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class RimSummaryCurve;
|
||||
class RimSummaryCase;
|
||||
class RimSummaryCaseCollection;
|
||||
class RiaSummaryAddressAnalyzer;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@@ -77,7 +78,7 @@ private:
|
||||
std::set<RimSummaryCaseCollection*> setOfEnsembleCases() const;
|
||||
|
||||
private:
|
||||
RiaSummaryCurveAnalyzer m_analyzer;
|
||||
std::unique_ptr<RiaSummaryAddressAnalyzer> m_analyzer;
|
||||
|
||||
std::vector<caf::PdmPointer<RimSummaryCase>> m_summaryCases;
|
||||
std::vector<caf::PdmPointer<RimSummaryCaseCollection>> m_ensembleCases;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
#include "RiaSummaryCurveAnalyzer.h"
|
||||
#include "RiaSummaryAddressAnalyzer.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
|
||||
#include "RimDataSourceSteppingTools.h"
|
||||
@@ -235,12 +235,12 @@ QList<caf::PdmOptionItemInfo>
|
||||
std::map<QString, QString> displayAndValueStrings;
|
||||
|
||||
{
|
||||
RiaSummaryCurveAnalyzer quantityAnalyzer;
|
||||
RiaSummaryAddressAnalyzer quantityAnalyzer;
|
||||
|
||||
auto subset = RiaSummaryCurveAnalyzer::addressesForCategory( addresses, category );
|
||||
auto subset = RiaSummaryAddressAnalyzer::addressesForCategory( addresses, category );
|
||||
quantityAnalyzer.appendAddresses( subset );
|
||||
|
||||
RiaSummaryCurveAnalyzer analyzerForVisibleCurves;
|
||||
RiaSummaryAddressAnalyzer analyzerForVisibleCurves;
|
||||
analyzerForVisibleCurves.appendAddresses( visibleCurveAddresses );
|
||||
|
||||
if ( analyzerForVisibleCurves.quantityNamesWithHistory().empty() )
|
||||
@@ -327,7 +327,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
|
||||
if ( category != RifEclipseSummaryAddress::SUMMARY_INVALID )
|
||||
{
|
||||
RiaSummaryCurveAnalyzer analyzer;
|
||||
RiaSummaryAddressAnalyzer analyzer;
|
||||
analyzer.appendAddresses( addresses );
|
||||
|
||||
identifierTexts = analyzer.identifierTexts( category, secondaryIdentifier );
|
||||
@@ -586,7 +586,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmValueField* RimSummaryPlotSourceStepping::fieldToModify()
|
||||
{
|
||||
RiaSummaryCurveAnalyzer analyzer;
|
||||
RiaSummaryAddressAnalyzer analyzer;
|
||||
analyzer.appendAddresses( addressesForCurvesInPlot() );
|
||||
|
||||
if ( analyzer.wellNames().size() == 1 )
|
||||
@@ -779,7 +779,7 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
std::vector<caf::PdmFieldHandle*> fieldsCommonForAllCurves;
|
||||
|
||||
{
|
||||
RiaSummaryCurveAnalyzer analyzer;
|
||||
RiaSummaryAddressAnalyzer analyzer;
|
||||
analyzer.appendAddresses( addressesForCurvesInPlot() );
|
||||
|
||||
RifEclipseSummaryAddress::SummaryVarCategory category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||
|
||||
Reference in New Issue
Block a user