mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show well completion annotations in horizontal plots (#9193)
This commit is contained in:
@@ -1222,10 +1222,17 @@ RimDepthTrackPlot::DepthOrientation RimDepthTrackPlot::depthOrientation() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::depthAxis() const
|
||||
{
|
||||
if ( m_depthOrientation() == RimDepthTrackPlot::DepthOrientation::VERTICAL )
|
||||
return RiuPlotAxis::defaultLeft();
|
||||
else
|
||||
return RiuPlotAxis::defaultBottom();
|
||||
return depthAxis( m_depthOrientation() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::depthAxis( DepthOrientation depthOrientation )
|
||||
{
|
||||
if ( depthOrientation == RimDepthTrackPlot::DepthOrientation::VERTICAL ) return RiuPlotAxis::defaultLeft();
|
||||
|
||||
return RiuPlotAxis::defaultBottom();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1233,10 +1240,37 @@ RiuPlotAxis RimDepthTrackPlot::depthAxis() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::valueAxis() const
|
||||
{
|
||||
if ( m_depthOrientation() == RimDepthTrackPlot::DepthOrientation::VERTICAL )
|
||||
return RiuPlotAxis::defaultTop();
|
||||
else
|
||||
return RiuPlotAxis::defaultLeft();
|
||||
return valueAxis( m_depthOrientation() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::valueAxis( DepthOrientation depthOrientation )
|
||||
{
|
||||
if ( depthOrientation == RimDepthTrackPlot::DepthOrientation::VERTICAL ) return RiuPlotAxis::defaultTop();
|
||||
|
||||
return RiuPlotAxis::defaultLeft();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::annotationAxis() const
|
||||
{
|
||||
return annotationAxis( m_depthOrientation() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotAxis RimDepthTrackPlot::annotationAxis( DepthOrientation depthOrientation )
|
||||
{
|
||||
auto riuAxis = valueAxis( depthOrientation );
|
||||
|
||||
auto oppositeAxis = RiaDefines::opposite( riuAxis.axis() );
|
||||
|
||||
return RiuPlotAxis( oppositeAxis );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -107,6 +107,7 @@ public:
|
||||
RimDepthTrackPlot::DepthOrientation depthOrientation() const;
|
||||
RiuPlotAxis depthAxis() const;
|
||||
RiuPlotAxis valueAxis() const;
|
||||
RiuPlotAxis annotationAxis() const;
|
||||
|
||||
void setAutoScalePropertyValuesEnabled( bool enabled );
|
||||
void setAutoScaleDepthValuesEnabled( bool enabled );
|
||||
@@ -149,6 +150,10 @@ public:
|
||||
bool isFirstVisibleTrack( RimWellLogTrack* track );
|
||||
bool isLastVisibleTrack( RimWellLogTrack* track );
|
||||
|
||||
static RiuPlotAxis depthAxis( DepthOrientation depthOrientation );
|
||||
static RiuPlotAxis valueAxis( DepthOrientation depthOrientation );
|
||||
static RiuPlotAxis annotationAxis( DepthOrientation depthOrientation );
|
||||
|
||||
protected:
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ void RimWellLogTrack::calculateDepthZoomRange()
|
||||
{
|
||||
double minObjectDepth = HUGE_VAL;
|
||||
double maxObjectDepth = -HUGE_VAL;
|
||||
if ( plotObject->yValueRange( &minObjectDepth, &maxObjectDepth ) )
|
||||
if ( plotObject->depthValueRange( &minObjectDepth, &maxObjectDepth ) )
|
||||
{
|
||||
if ( minObjectDepth < minDepth )
|
||||
{
|
||||
@@ -522,7 +522,7 @@ void RimWellLogTrack::updatePropertyValueZoom()
|
||||
{
|
||||
m_plotWidget->setAxisRange( RiuPlotAxis::defaultBottom(), componentRangeMin, componentRangeMax );
|
||||
}
|
||||
else if ( wellLogPlot->depthOrientation() == RimDepthTrackPlot::DepthOrientation::VERTICAL )
|
||||
else
|
||||
{
|
||||
m_plotWidget->setAxisRange( RiuPlotAxis::defaultRight(), componentRangeMin, componentRangeMax );
|
||||
}
|
||||
@@ -3258,11 +3258,13 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
|
||||
|
||||
RimDepthTrackPlot* wellLogPlot;
|
||||
this->firstAncestorOrThisOfTypeAsserted( wellLogPlot );
|
||||
RimWellLogPlot::DepthTypeEnum depthType = wellLogPlot->depthType();
|
||||
RimWellLogPlot::DepthTypeEnum depthType = wellLogPlot->depthType();
|
||||
auto depthOrientation = wellLogPlot->depthOrientation();
|
||||
|
||||
for ( auto& attributePlotObject : m_wellPathAttributePlotObjects )
|
||||
{
|
||||
attributePlotObject->setDepthType( depthType );
|
||||
attributePlotObject->setDepthOrientation( depthOrientation );
|
||||
attributePlotObject->setShowLabel( m_showWellPathComponentLabels() );
|
||||
attributePlotObject->loadDataAndUpdate( false );
|
||||
attributePlotObject->setParentPlotNoReplot( m_plotWidget->qwtPlot() );
|
||||
|
||||
Reference in New Issue
Block a user