#9369 Curve Probing: Show data from other curves in tooltip text

Optionally show data from other curves in tooltip text when hoovering over a curve point
This commit is contained in:
Magne Sjaastad
2022-10-17 19:48:24 +02:00
parent 7c2941aedd
commit 760bfaeec2
19 changed files with 268 additions and 57 deletions

View File

@@ -122,6 +122,45 @@ void RicNewRftSegmentWellLogPlotFeature::appendTrackAndCurveForBranchType( RimWe
RiuPlotMainWindowTools::setExpanded( curve );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimPlotCurve*> RicNewRftSegmentWellLogPlotFeature::appendAdditionalDataSourceTrack( RimWellLogPlot* plot,
const QString& wellName,
RimSummaryCase* summaryCase )
{
auto additionalDataSourceTrack = new RimWellLogTrack();
additionalDataSourceTrack->setDescription( "Additional Data Source Curves" );
plot->addPlot( additionalDataSourceTrack );
additionalDataSourceTrack->setShowWindow( false );
QString resultName = RiaDefines::segmentNumberResultName();
QString templateText = RiaDefines::namingVariableResultName() + ", " + RiaDefines::namingVariableResultType();
std::vector<RimPlotCurve*> curves;
for ( auto branchType : { RiaDefines::RftBranchType::RFT_TUBING,
RiaDefines::RftBranchType::RFT_DEVICE,
RiaDefines::RftBranchType::RFT_ANNULUS } )
{
auto curve = RicWellLogTools::addSummaryRftSegmentCurve( additionalDataSourceTrack,
resultName,
wellName,
branchType,
summaryCase );
curve->setFillStyle( Qt::NoBrush );
curve->setNamingMethod( RiaDefines::ObjectNamingMethod::TEMPLATE );
curve->setCurveNameTemplateText( templateText );
curves.push_back( curve );
}
additionalDataSourceTrack->updateAllRequiredEditors();
return curves;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -145,22 +184,22 @@ void RicNewRftSegmentWellLogPlotFeature::appendTopologyTrack( RimWellLogPlot* pl
plot->addPlot( track );
std::vector<RiaDefines::RftBranchType> branchTypes{ RiaDefines::RftBranchType::RFT_TUBING,
RiaDefines::RftBranchType::RFT_DEVICE,
RiaDefines::RftBranchType::RFT_ANNULUS };
std::vector<RimPlotCurve*> additionalDataSourceCurves = appendAdditionalDataSourceTrack( plot, wellName, summaryCase );
for ( auto branchType : branchTypes )
for ( auto branchType : { RiaDefines::RftBranchType::RFT_TUBING,
RiaDefines::RftBranchType::RFT_DEVICE,
RiaDefines::RftBranchType::RFT_ANNULUS } )
{
auto curve = RimRftTopologyCurve::createTopologyCurve( summaryCase, dateTime, wellName, branchIndex, branchType );
curve->setAdditionalDataSources( additionalDataSourceCurves );
curve->applyDefaultAppearance();
track->addCurve( curve );
}
{
auto curve = RimRftTopologyCurve::createPackerCurve( summaryCase, dateTime, wellName, branchIndex );
curve->applyDefaultAppearance();
track->addCurve( curve );
}
auto packerCurve = RimRftTopologyCurve::createPackerCurve( summaryCase, dateTime, wellName, branchIndex );
packerCurve->setAdditionalDataSources( additionalDataSourceCurves );
packerCurve->applyDefaultAppearance();
track->addCurve( packerCurve );
track->updateAllRequiredEditors();
}