Add reference well to well log extraction curve eclipse case (#9516)

This commit is contained in:
Jørgen Herje
2022-11-30 23:13:39 +01:00
committed by GitHub
parent eb390100bd
commit 278828b08f
13 changed files with 450 additions and 113 deletions

View File

@@ -19,12 +19,17 @@
#include "RimWellLogCurve.h"
#include "RiaApplication.h"
#include "RiaCurveDataTools.h"
#include "RiaPlotDefines.h"
#include "RigWellLogCurveData.h"
#include "RimDepthTrackPlot.h"
#include "RimMainPlotCollection.h"
#include "RimTools.h"
#include "RimWellLogTrack.h"
#include "RimWellPath.h"
#include "RiuQwtPlotCurve.h"
#include "RiuQwtPlotWidget.h"
@@ -52,6 +57,12 @@ RimWellLogCurve::RimWellLogCurve()
m_curveDataPropertyValueRange =
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
// Ref well path as Ui element for debug purpose. If not needed: Remove use of caf::PdmPtrField,
// and replace with regular non-ui ptr. The remove related code in calculateValueOptions() and
// defineUiOrdering().
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "ReferenceWellPath", "Reference Well Path" );
m_refWellPath.uiCapability()->setUiHidden( !RiaApplication::enableDevelopmentFeatures() );
setDeletable( true );
}
@@ -220,6 +231,14 @@ const RigWellLogCurveData* RimWellLogCurve::curveData() const
return m_curveData.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::setReferenceWellPath( RimWellPath* refWellPath )
{
m_refWellPath = refWellPath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -407,6 +426,36 @@ void RimWellLogCurve::calculateCurveDataPropertyValueRange()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimWellLogCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
{
auto options = RimStackablePlotCurve::calculateValueOptions( fieldNeedingOptions );
if ( fieldNeedingOptions == &m_refWellPath )
{
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
RimTools::wellPathOptionItems( &options );
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
RimStackablePlotCurve::defineUiOrdering( uiConfigName, uiOrdering );
auto group = uiOrdering.findGroup( "DataSource" );
if ( group != nullptr )
{
group->add( &m_refWellPath );
}
uiOrdering.skipRemainingFields( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------