mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user