mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
Summary Data Source Stepping : Reintroduce stepping for summary plot
Data source stepping for multi plot is work in progress, and have disabled stepping for single summary plots. This commit will make it possible to do source stepping on single summary plots.
This commit is contained in:
parent
eb02908dc7
commit
dc31a731ad
@ -2242,20 +2242,7 @@ void RimSummaryPlot::onCurveCollectionChanged( const SignalEmitter* emitter )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimSummaryPlotSourceStepping* RimSummaryPlot::sourceSteppingObjectForKeyEventHandling() const
|
||||
{
|
||||
caf::PdmObjectHandle* selectedObj =
|
||||
dynamic_cast<caf::PdmObjectHandle*>( caf::SelectionManager::instance()->selectedItem() );
|
||||
if ( selectedObj )
|
||||
{
|
||||
RimEnsembleCurveSetCollection* ensembleCurveSetColl = nullptr;
|
||||
selectedObj->firstAncestorOrThisOfType( ensembleCurveSetColl );
|
||||
|
||||
if ( ensembleCurveSetColl )
|
||||
{
|
||||
return ensembleCurveSetCollection()->sourceSteppingObject();
|
||||
}
|
||||
}
|
||||
|
||||
return summaryCurveCollection()->sourceSteppingObject( RimSummaryDataSourceStepping::Axis::Y_AXIS );
|
||||
return m_sourceStepping;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -159,7 +159,7 @@ void RimSummaryPlotSourceStepping::applyPrevOtherIdentifier()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::fieldsToShowInToolbar()
|
||||
{
|
||||
return computeVisibleFieldsAndSetFieldVisibility();
|
||||
return activeFieldsForDataSourceStepping();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -167,15 +167,18 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::fieldsToShowInTo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryPlotSourceStepping::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
auto visible = computeVisibleFieldsAndSetFieldVisibility();
|
||||
auto visible = activeFieldsForDataSourceStepping();
|
||||
if ( visible.empty() )
|
||||
{
|
||||
m_placeholderForLabel.uiCapability()->setUiHidden( false );
|
||||
uiOrdering.add( &m_placeholderForLabel );
|
||||
}
|
||||
else
|
||||
|
||||
for ( auto f : visible )
|
||||
{
|
||||
m_placeholderForLabel.uiCapability()->setUiHidden( true );
|
||||
uiOrdering.add( f );
|
||||
}
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -728,21 +731,8 @@ std::set<RimSummaryCase*> RimSummaryPlotSourceStepping::summaryCasesCurveCollect
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFieldsAndSetFieldVisibility()
|
||||
std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::activeFieldsForDataSourceStepping()
|
||||
{
|
||||
// Required to set all stepping controls hidden, as they show up in the property editor when selecting a plot
|
||||
m_summaryCase.uiCapability()->setUiHidden( true );
|
||||
m_includeEnsembleCasesForCaseStepping.uiCapability()->setUiHidden( true );
|
||||
m_wellName.uiCapability()->setUiHidden( true );
|
||||
m_wellGroupName.uiCapability()->setUiHidden( true );
|
||||
m_region.uiCapability()->setUiHidden( true );
|
||||
m_quantity.uiCapability()->setUiHidden( true );
|
||||
m_ensemble.uiCapability()->setUiHidden( true );
|
||||
m_cellBlock.uiCapability()->setUiHidden( true );
|
||||
m_segment.uiCapability()->setUiHidden( true );
|
||||
m_completion.uiCapability()->setUiHidden( true );
|
||||
m_aquifer.uiCapability()->setUiHidden( true );
|
||||
|
||||
std::vector<caf::PdmFieldHandle*> fields;
|
||||
|
||||
auto sumCases = summaryCasesCurveCollection();
|
||||
@ -753,8 +743,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
m_summaryCase = *( sumCases.begin() );
|
||||
|
||||
m_summaryCase.uiCapability()->setUiHidden( false );
|
||||
|
||||
fields.push_back( &m_summaryCase );
|
||||
|
||||
m_includeEnsembleCasesForCaseStepping.uiCapability()->setUiHidden( false );
|
||||
@ -770,8 +758,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
m_ensemble = *( ensembleColl.begin() );
|
||||
|
||||
m_ensemble.uiCapability()->setUiHidden( false );
|
||||
|
||||
fields.push_back( &m_ensemble );
|
||||
}
|
||||
}
|
||||
@ -814,7 +800,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::fromStdString( *( analyzer.wellNames().begin() ) );
|
||||
m_wellName = txt;
|
||||
m_wellName.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_wellName );
|
||||
}
|
||||
@ -823,7 +808,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::fromStdString( *( analyzer.wellGroupNames().begin() ) );
|
||||
m_wellGroupName = txt;
|
||||
m_wellGroupName.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_wellGroupName );
|
||||
}
|
||||
@ -831,7 +815,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
if ( analyzer.regionNumbers().size() == 1 )
|
||||
{
|
||||
m_region = *( analyzer.regionNumbers().begin() );
|
||||
m_region.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_region );
|
||||
}
|
||||
@ -840,7 +823,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::number( *( analyzer.wellSegmentNumbers( m_wellName().toStdString() ).begin() ) );
|
||||
m_segment = txt;
|
||||
m_segment.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_segment );
|
||||
}
|
||||
@ -849,7 +831,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::fromStdString( *( analyzer.blocks().begin() ) );
|
||||
m_cellBlock = txt;
|
||||
m_cellBlock.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_cellBlock );
|
||||
}
|
||||
@ -858,7 +839,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::fromStdString( *( analyzer.wellCompletions( m_wellName().toStdString() ).begin() ) );
|
||||
m_completion = txt;
|
||||
m_completion.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_completion );
|
||||
}
|
||||
@ -866,7 +846,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
if ( analyzer.aquifers().size() == 1 )
|
||||
{
|
||||
m_aquifer = *( analyzer.aquifers().begin() );
|
||||
m_aquifer.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_aquifer );
|
||||
}
|
||||
@ -875,7 +854,6 @@ std::vector<caf::PdmFieldHandle*> RimSummaryPlotSourceStepping::computeVisibleFi
|
||||
{
|
||||
QString txt = QString::fromStdString( analyzer.quantityNameForTitle() );
|
||||
m_quantity = txt;
|
||||
m_quantity.uiCapability()->setUiHidden( false );
|
||||
|
||||
fieldsCommonForAllCurves.push_back( &m_quantity );
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ private:
|
||||
|
||||
std::set<RifEclipseSummaryAddress> addressesForCurvesInPlot() const;
|
||||
std::set<RimSummaryCase*> summaryCasesCurveCollection() const;
|
||||
std::vector<caf::PdmFieldHandle*> computeVisibleFieldsAndSetFieldVisibility();
|
||||
std::vector<caf::PdmFieldHandle*> activeFieldsForDataSourceStepping();
|
||||
std::set<RimSummaryCaseCollection*> ensembleCollection() const;
|
||||
|
||||
bool isXAxisStepping() const;
|
||||
|
Loading…
Reference in New Issue
Block a user