Show packer in RFT topology track

* Show packers in topology track
* Support optional display of property axis values
* Add legend item clickable option to RimPlotWindow
This commit is contained in:
Magne Sjaastad
2022-10-13 13:03:55 +02:00
committed by GitHub
parent 8c03fb1b36
commit 1d23e8f5c9
17 changed files with 331 additions and 127 deletions

View File

@@ -19,6 +19,7 @@
#include "RimRftTopologyCurve.h"
#include "RiaColorTables.h"
#include "RiaColorTools.h"
#include "RiaSummaryTools.h"
#include "RifReaderOpmRft.h"
@@ -50,20 +51,39 @@ RimRftTopologyCurve::RimRftTopologyCurve()
CAF_PDM_InitField( &m_segmentBranchIndex, "SegmentBranchIndex", -1, "Branch" );
CAF_PDM_InitFieldNoDefault( &m_segmentBranchType, "SegmentBranchType", "Completion" );
CAF_PDM_InitField( &m_isPackerCurve, "IsPackerCurve", false, "Packer Curve" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimRftTopologyCurve::setDataSource( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex,
RiaDefines::RftBranchType branchType )
RimRftTopologyCurve* RimRftTopologyCurve::createPackerCurve( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex )
{
setDataSource( summaryCase, timeStep, wellName, segmentBranchIndex );
RimRftTopologyCurve* curve = new RimRftTopologyCurve();
curve->setDataSource( summaryCase, timeStep, wellName, segmentBranchIndex );
curve->m_isPackerCurve = true;
m_segmentBranchType = branchType;
return curve;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimRftTopologyCurve* RimRftTopologyCurve::createTopologyCurve( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex,
RiaDefines::RftBranchType branchType )
{
RimRftTopologyCurve* curve = new RimRftTopologyCurve();
curve->setDataSource( summaryCase, timeStep, wellName, segmentBranchIndex );
curve->m_segmentBranchType = branchType;
return curve;
}
//--------------------------------------------------------------------------------------------------
@@ -85,7 +105,7 @@ void RimRftTopologyCurve::setDataSource( RimSummaryCase* summaryCase,
//--------------------------------------------------------------------------------------------------
QString RimRftTopologyCurve::wellName() const
{
return "Topology curve";
return m_wellName;
}
//--------------------------------------------------------------------------------------------------
@@ -111,9 +131,16 @@ QString RimRftTopologyCurve::createCurveAutoName()
{
QString text;
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_ANNULUS ) text += "Annulus";
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_DEVICE ) text += "Device";
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_TUBING ) text += "Tubing";
if ( m_isPackerCurve() )
{
text += "Packer";
}
else
{
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_ANNULUS ) text += "Annulus";
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_DEVICE ) text += "Device";
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_TUBING ) text += "Tubing";
}
text += QString( " (%1)" ).arg( m_segmentBranchIndex() );
@@ -131,8 +158,13 @@ void RimRftTopologyCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde
curveDataGroup->add( &m_summaryCase );
curveDataGroup->add( &m_wellName );
curveDataGroup->add( &m_timeStep );
curveDataGroup->add( &m_isPackerCurve );
curveDataGroup->add( &m_segmentBranchIndex );
curveDataGroup->add( &m_segmentBranchType );
if ( !m_isPackerCurve() )
{
curveDataGroup->add( &m_segmentBranchType );
}
caf::PdmUiGroup* stackingGroup = uiOrdering.addNewGroup( "Stacking" );
RimStackablePlotCurve::stackingUiOrdering( *stackingGroup );
@@ -225,23 +257,44 @@ void RimRftTopologyCurve::onLoadDataAndUpdate( bool updateParentPlot )
std::vector<double> depths;
std::vector<double> propertyValues;
// Assign a static property value to each type of curve to make sure they all are separated and easily
// visible
// Assign a static property value to each type of curve to make sure they all are separated and
// easily visible
double curveValue = 1.0;
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_TUBING ) curveValue = 2.0;
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_DEVICE ) curveValue = 3.0;
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_ANNULUS ) curveValue = 4.0;
if ( m_isPackerCurve )
{
curveValue = 3.5;
}
// Adjust the location of each branch if multiple branches are visible at the same time
curveValue += m_segmentBranchIndex() * 0.2;
for ( auto segmentIndex : segmentIndices )
if ( m_isPackerCurve )
{
depths.push_back( seglenstValues[segmentIndex] );
depths.push_back( seglenenValues[segmentIndex] );
auto packerSegmentIndices = segment.packerSegmentIndicesOnAnnulus( m_segmentBranchIndex() );
propertyValues.push_back( curveValue );
propertyValues.push_back( curveValue );
for ( auto segmentIndex : packerSegmentIndices )
{
depths.push_back( seglenstValues[segmentIndex] );
depths.push_back( seglenenValues[segmentIndex] );
propertyValues.push_back( curveValue );
propertyValues.push_back( curveValue );
}
}
else
{
for ( auto segmentIndex : segmentIndices )
{
depths.push_back( seglenstValues[segmentIndex] );
depths.push_back( seglenenValues[segmentIndex] );
propertyValues.push_back( curveValue );
propertyValues.push_back( curveValue );
}
}
RimDepthTrackPlot* wellLogPlot;
@@ -255,16 +308,16 @@ void RimRftTopologyCurve::onLoadDataAndUpdate( bool updateParentPlot )
// Assign curve values based on horizontal or vertical plot
setPropertyAndDepthValuesToPlotCurve( propertyValues, depths );
}
if ( updateParentPlot )
{
updateZoomInParentPlot();
}
if ( updateParentPlot )
{
updateZoomInParentPlot();
}
if ( m_parentPlot )
{
m_parentPlot->replot();
}
if ( m_parentPlot )
{
m_parentPlot->replot();
}
}
}
@@ -275,23 +328,41 @@ void RimRftTopologyCurve::onLoadDataAndUpdate( bool updateParentPlot )
//--------------------------------------------------------------------------------------------------
void RimRftTopologyCurve::applyDefaultAppearance()
{
cvf::Color3f color = cvf::Color3f::BLUE;
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_TUBING )
if ( m_isPackerCurve() )
{
color = RiaColorTables::wellLogPlotPaletteColors().cycledColor3f( 0 );
}
else if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_DEVICE )
{
color = RiaColorTables::wellLogPlotPaletteColors().cycledColor3f( 1 );
setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_NONE );
}
else if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_ANNULUS )
{
color = RiaColorTables::wellLogPlotPaletteColors().cycledColor3f( 2 );
setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_NONE );
}
auto color = RiaColorTools::fromQColorTo3f( QColor( "DarkGoldenRod" ) );
int adjustedSymbolSize = symbolSize() * 2;
setColor( color );
setLineThickness( 5.0 );
setSymbol( RiuPlotCurveSymbol::PointSymbolEnum::SYMBOL_ELLIPSE );
setColor( color );
setSymbolSize( adjustedSymbolSize );
setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_NONE );
setSymbol( RiuPlotCurveSymbol::PointSymbolEnum::SYMBOL_RECT );
}
else
{
if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_TUBING )
{
auto color = RiaColorTools::fromQColorTo3f( QColor( "ForestGreen" ) );
setColor( color );
setLineThickness( 5.0 );
}
else if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_DEVICE )
{
auto color = RiaColorTools::fromQColorTo3f( QColor( "IndianRed" ) );
setColor( color );
setSymbolEdgeColor( color );
setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_NONE );
}
else if ( m_segmentBranchType() == RiaDefines::RftBranchType::RFT_ANNULUS )
{
auto color = RiaColorTools::fromQColorTo3f( QColor( "DeepSkyBlue" ) );
setColor( color );
setSymbolEdgeColor( color );
setLineStyle( RiuQwtPlotCurveDefines::LineStyleEnum::STYLE_NONE );
}
int adjustedSymbolSize = symbolSize() * 1.5;
setSymbolSize( adjustedSymbolSize );
setSymbol( RiuPlotCurveSymbol::PointSymbolEnum::SYMBOL_ELLIPSE );
}
}

View File

@@ -38,11 +38,16 @@ class RimRftTopologyCurve : public RimWellLogCurve
public:
RimRftTopologyCurve();
void setDataSource( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex,
RiaDefines::RftBranchType branchType );
static RimRftTopologyCurve* createPackerCurve( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex );
static RimRftTopologyCurve* createTopologyCurve( RimSummaryCase* summaryCase,
const QDateTime& timeStep,
const QString& wellName,
int segmentBranchIndex,
RiaDefines::RftBranchType branchType );
void setDataSource( RimSummaryCase* summaryCase, const QDateTime& timeStep, const QString& wellName, int segmentBranchIndex );
@@ -67,4 +72,6 @@ private:
caf::PdmField<QString> m_wellName;
caf::PdmField<int> m_segmentBranchIndex;
caf::PdmField<caf::AppEnum<RiaDefines::RftBranchType>> m_segmentBranchType;
caf::PdmField<bool> m_isPackerCurve;
};

View File

@@ -206,17 +206,18 @@ RimWellLogTrack::RimWellLogTrack()
CAF_PDM_InitField( &m_isAutoScalePropertyValuesEnabled, "AutoScaleX", true, "Auto Scale" );
m_isAutoScalePropertyValuesEnabled.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_isLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale" );
CAF_PDM_InitField( &m_isPropertyLogarithmicScaleEnabled, "LogarithmicScaleX", false, "Logarithmic Scale" );
CAF_PDM_InitField( &m_invertPropertyValueAxis, "InvertPropertyValueAxis", false, "Invert Axis Range" );
CAF_PDM_InitField( &m_isPropertyAxisEnabled, "IsPropertyAxisEnabled", true, "Show Axis" );
CAF_PDM_InitFieldNoDefault( &m_propertyValueAxisGridVisibility, "ShowXGridLines", "Show Grid Lines" );
CAF_PDM_InitField( &m_explicitTickIntervals, "ExplicitTickIntervals", false, "Manually Set Tick Intervals" );
CAF_PDM_InitField( &m_minAndMaxTicksOnly, "MinAndMaxTicksOnly", false, "Show Ticks at Min and Max" );
CAF_PDM_InitField( &m_majorTickInterval, "MajorTickIntervals", 0.0, "Major Tick Interval" );
CAF_PDM_InitField( &m_minorTickInterval, "MinorTickIntervals", 0.0, "Minor Tick Interval" );
m_majorTickInterval.uiCapability()->setUiHidden( true );
m_minorTickInterval.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_explicitTickIntervalsPropertyValueAxis, "ExplicitTickIntervals", false, "Manually Set Tick Intervals" );
CAF_PDM_InitField( &m_propertyAxisMinAndMaxTicksOnly, "MinAndMaxTicksOnly", false, "Show Ticks at Min and Max" );
CAF_PDM_InitField( &m_majorTickIntervalPropertyAxis, "MajorTickIntervals", 0.0, "Major Tick Interval" );
CAF_PDM_InitField( &m_minorTickIntervalPropertyAxis, "MinorTickIntervals", 0.0, "Minor Tick Interval" );
m_majorTickIntervalPropertyAxis.uiCapability()->setUiHidden( true );
m_minorTickIntervalPropertyAxis.uiCapability()->setUiHidden( true );
CAF_PDM_InitFieldNoDefault( &m_axisFontSize, "AxisFontSize", "Axis Font Size" );
@@ -402,9 +403,9 @@ void RimWellLogTrack::calculatePropertyValueZoomRange()
minValue = 0;
maxValue = 0;
}
else if ( m_minorTickInterval() != 0.0 )
else if ( m_minorTickIntervalPropertyAxis() != 0.0 )
{
std::tie( minValue, maxValue ) = adjustXRange( minValue, maxValue, m_minorTickInterval() );
std::tie( minValue, maxValue ) = adjustXRange( minValue, maxValue, m_minorTickIntervalPropertyAxis() );
}
else
{
@@ -488,7 +489,7 @@ void RimWellLogTrack::updatePropertyValueZoom()
m_visiblePropertyValueRangeMin = m_availablePropertyValueRangeMin;
m_visiblePropertyValueRangeMax = m_availablePropertyValueRangeMax;
if ( !visibleStackedCurves().empty() && !m_isLogarithmicScaleEnabled )
if ( !visibleStackedCurves().empty() && !m_isPropertyLogarithmicScaleEnabled )
{
// Try to ensure we include the base line whether the values are negative or positive.
m_visiblePropertyValueRangeMin = std::min( m_visiblePropertyValueRangeMin(), 0.0 );
@@ -583,22 +584,27 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
{
updateParentLayout();
}
else if ( changedField == &m_explicitTickIntervals )
else if ( changedField == &m_explicitTickIntervalsPropertyValueAxis )
{
if ( m_plotWidget )
{
m_majorTickInterval = m_plotWidget->majorTickInterval( valueAxis() );
m_minorTickInterval = m_plotWidget->minorTickInterval( valueAxis() );
m_majorTickIntervalPropertyAxis = m_plotWidget->majorTickInterval( valueAxis() );
m_minorTickIntervalPropertyAxis = m_plotWidget->minorTickInterval( valueAxis() );
}
m_majorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
if ( !m_explicitTickIntervals() )
m_majorTickIntervalPropertyAxis.uiCapability()->setUiHidden( !m_explicitTickIntervalsPropertyValueAxis() );
m_minorTickIntervalPropertyAxis.uiCapability()->setUiHidden( !m_explicitTickIntervalsPropertyValueAxis() );
if ( !m_explicitTickIntervalsPropertyValueAxis() )
{
updatePropertyValueAxisAndGridTickIntervals();
}
}
else if ( changedField == &m_propertyValueAxisGridVisibility || changedField == &m_majorTickInterval ||
changedField == &m_minorTickInterval || changedField == &m_minAndMaxTicksOnly ||
else if ( changedField == &m_isPropertyAxisEnabled )
{
updatePropertyValueAxisAndGridTickIntervals();
updateParentLayout();
}
else if ( changedField == &m_propertyValueAxisGridVisibility || changedField == &m_majorTickIntervalPropertyAxis ||
changedField == &m_minorTickIntervalPropertyAxis || changedField == &m_propertyAxisMinAndMaxTicksOnly ||
changedField == &m_invertPropertyValueAxis )
{
updatePropertyValueAxisAndGridTickIntervals();
@@ -606,7 +612,7 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
else if ( changedField == &m_visiblePropertyValueRangeMin || changedField == &m_visiblePropertyValueRangeMax )
{
bool emptyRange = isEmptyVisiblePropertyRange();
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
m_explicitTickIntervalsPropertyValueAxis.uiCapability()->setUiReadOnly( emptyRange );
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
m_isAutoScalePropertyValuesEnabled = false;
@@ -624,14 +630,14 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
m_plotWidget->scheduleReplot();
}
}
else if ( changedField == &m_isLogarithmicScaleEnabled )
else if ( changedField == &m_isPropertyLogarithmicScaleEnabled )
{
updateAxisScaleEngine();
if ( m_isLogarithmicScaleEnabled() )
if ( m_isPropertyLogarithmicScaleEnabled() )
{
m_explicitTickIntervals = false;
m_explicitTickIntervalsPropertyValueAxis = false;
}
m_explicitTickIntervals.uiCapability()->setUiHidden( m_isLogarithmicScaleEnabled() );
m_explicitTickIntervalsPropertyValueAxis.uiCapability()->setUiHidden( m_isPropertyLogarithmicScaleEnabled() );
updatePropertyValueZoom();
loadDataAndUpdate();
@@ -822,7 +828,7 @@ void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
auto rangeBoundaryB = m_visiblePropertyValueRangeMax();
if ( m_invertPropertyValueAxis() ) std::swap( rangeBoundaryA, rangeBoundaryB );
if ( m_minAndMaxTicksOnly )
if ( m_propertyAxisMinAndMaxTicksOnly )
{
auto roundToDigits = []( double value, int numberOfDigits, bool useFloor ) {
if ( value == 0.0 ) return 0.0;
@@ -867,11 +873,11 @@ void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
m_plotWidget->qwtPlot()->setAxisScaleDiv( QwtAxis::YLeft, div );
}
}
else if ( m_explicitTickIntervals )
else if ( m_explicitTickIntervalsPropertyValueAxis )
{
m_plotWidget->setMajorAndMinorTickIntervals( valueAxis(),
m_majorTickInterval(),
m_minorTickInterval(),
m_majorTickIntervalPropertyAxis(),
m_minorTickIntervalPropertyAxis(),
rangeBoundaryA,
rangeBoundaryB );
}
@@ -896,6 +902,9 @@ void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
wellLogPlot->depthAxisGridLinesEnabled() & RimWellLogPlot::AXIS_GRID_MAJOR,
wellLogPlot->depthAxisGridLinesEnabled() & RimWellLogPlot::AXIS_GRID_MINOR );
}
m_plotWidget->enableAxisNumberLabels( valueAxis(), m_isPropertyAxisEnabled() );
m_plotWidget->scheduleReplot();
}
@@ -1375,11 +1384,11 @@ void RimWellLogTrack::onLoadDataAndUpdate()
}
this->updatePropertyValueAxisAndGridTickIntervals();
m_majorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
m_majorTickIntervalPropertyAxis.uiCapability()->setUiHidden( !m_explicitTickIntervalsPropertyValueAxis() );
m_minorTickIntervalPropertyAxis.uiCapability()->setUiHidden( !m_explicitTickIntervalsPropertyValueAxis() );
bool emptyRange = isEmptyVisiblePropertyRange();
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
m_explicitTickIntervalsPropertyValueAxis.uiCapability()->setUiReadOnly( emptyRange );
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
updateDepthZoom();
@@ -1742,9 +1751,9 @@ void RimWellLogTrack::updateZoomInParentPlot()
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::setTickIntervals( double majorTickInterval, double minorTickInterval )
{
m_explicitTickIntervals = true;
m_majorTickInterval = majorTickInterval;
m_minorTickInterval = minorTickInterval;
m_explicitTickIntervalsPropertyValueAxis = true;
m_majorTickIntervalPropertyAxis = majorTickInterval;
m_minorTickIntervalPropertyAxis = minorTickInterval;
}
//--------------------------------------------------------------------------------------------------
@@ -1752,7 +1761,7 @@ void RimWellLogTrack::setTickIntervals( double majorTickInterval, double minorTi
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::setMinAndMaxTicksOnly( bool enable )
{
m_minAndMaxTicksOnly = enable;
m_propertyAxisMinAndMaxTicksOnly = enable;
}
//--------------------------------------------------------------------------------------------------
@@ -2043,7 +2052,7 @@ void RimWellLogTrack::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
uiOrdering.add( &m_ensembleWellLogCurveSet );
uiOrderingForXAxisSettings( uiOrdering );
uiOrderingForPropertyAxisSettings( uiOrdering );
uiOrdering.skipRemainingFields( true );
}
@@ -2119,7 +2128,7 @@ void RimWellLogTrack::updateAxisScaleEngine()
{
m_plotWidget->setAxisInverted( RiuPlotAxis::defaultLeft(), true );
if ( m_isLogarithmicScaleEnabled )
if ( m_isPropertyLogarithmicScaleEnabled )
{
m_plotWidget->qwtPlot()->setAxisScaleEngine( QwtAxis::XTop, new QwtLogScaleEngine );
@@ -2138,7 +2147,7 @@ void RimWellLogTrack::updateAxisScaleEngine()
{
m_plotWidget->setAxisInverted( RiuPlotAxis::defaultLeft(), false );
if ( m_isLogarithmicScaleEnabled )
if ( m_isPropertyLogarithmicScaleEnabled )
{
m_plotWidget->qwtPlot()->setAxisScaleEngine( QwtAxis::YLeft, new QwtLogScaleEngine );
@@ -2332,7 +2341,7 @@ void RimWellLogTrack::connectCurveSignals( RimWellLogCurve* curve )
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::computeAndSetPropertyValueRangeMinForLogarithmicScale()
{
if ( m_isAutoScalePropertyValuesEnabled && m_isLogarithmicScaleEnabled )
if ( m_isAutoScalePropertyValuesEnabled && m_isPropertyLogarithmicScaleEnabled )
{
double pos = HUGE_VAL;
double neg = -HUGE_VAL;
@@ -2359,7 +2368,7 @@ void RimWellLogTrack::computeAndSetPropertyValueRangeMinForLogarithmicScale()
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::setLogarithmicScale( bool enable )
{
m_isLogarithmicScaleEnabled = enable;
m_isPropertyLogarithmicScaleEnabled = enable;
updateAxisScaleEngine();
computeAndSetPropertyValueRangeMinForLogarithmicScale();
@@ -2370,7 +2379,7 @@ void RimWellLogTrack::setLogarithmicScale( bool enable )
//--------------------------------------------------------------------------------------------------
bool RimWellLogTrack::isLogarithmicScale() const
{
return m_isLogarithmicScaleEnabled;
return m_isPropertyLogarithmicScaleEnabled;
}
//--------------------------------------------------------------------------------------------------
@@ -2451,15 +2460,16 @@ void RimWellLogTrack::uiOrderingForRftPltFormations( caf::PdmUiOrdering& uiOrder
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering )
void RimWellLogTrack::uiOrderingForPropertyAxisSettings( caf::PdmUiOrdering& uiOrdering )
{
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "Property Axis Settings" );
gridGroup->add( &m_isLogarithmicScaleEnabled );
gridGroup->add( &m_isPropertyAxisEnabled );
gridGroup->add( &m_isPropertyLogarithmicScaleEnabled );
gridGroup->add( &m_visiblePropertyValueRangeMin );
gridGroup->add( &m_visiblePropertyValueRangeMax );
gridGroup->add( &m_invertPropertyValueAxis );
gridGroup->add( &m_propertyValueAxisGridVisibility );
gridGroup->add( &m_minAndMaxTicksOnly );
gridGroup->add( &m_propertyAxisMinAndMaxTicksOnly );
// TODO Revisit if these settings are required
// See issue https://github.com/OPM/ResInsight/issues/4367
@@ -2468,6 +2478,22 @@ void RimWellLogTrack::uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering
// gridGroup->add( &m_minorTickInterval );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::enablePropertyAxis( bool enable )
{
m_isPropertyAxisEnabled = enable;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellLogTrack::isPropertyAxisEnabled() const
{
return m_isPropertyAxisEnabled();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -2724,7 +2750,7 @@ void RimWellLogTrack::updateStackedCurveData()
0.0,
displayUnit,
false,
m_isLogarithmicScaleEnabled );
m_isPropertyLogarithmicScaleEnabled );
auto plotDepthValues = tempCurveData.depths( depthType );
auto polyLineStartStopIndices = tempCurveData.polylineStartStopIndices();

View File

@@ -202,7 +202,9 @@ public:
std::vector<RimWellLogCurve*> visibleCurves() const;
void uiOrderingForRftPltFormations( caf::PdmUiOrdering& uiOrdering );
void uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering );
void uiOrderingForPropertyAxisSettings( caf::PdmUiOrdering& uiOrdering );
void enablePropertyAxis( bool enable );
bool isPropertyAxisEnabled() const;
void setFormationsForCaseWithSimWellOnly( bool caseWithSimWellOnly );
void updatePropertyValueAxisAndGridTickIntervals();
@@ -316,25 +318,25 @@ private:
bool isEmptyVisiblePropertyRange() const;
private:
QString m_propertyValueAxisTitle;
caf::PdmField<QString> m_description;
caf::PdmField<QString> m_description;
caf::PdmChildArrayField<RimWellLogCurve*> m_curves;
caf::PdmField<double> m_visiblePropertyValueRangeMin;
caf::PdmField<double> m_visiblePropertyValueRangeMax;
caf::PdmField<double> m_visibleDepthRangeMin;
caf::PdmField<double> m_visibleDepthRangeMax;
// Property value axis
caf::PdmField<bool> m_isPropertyAxisEnabled;
caf::PdmField<double> m_visiblePropertyValueRangeMin;
caf::PdmField<double> m_visiblePropertyValueRangeMax;
caf::PdmField<bool> m_isAutoScalePropertyValuesEnabled;
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
caf::PdmField<bool> m_isPropertyLogarithmicScaleEnabled;
caf::PdmField<bool> m_invertPropertyValueAxis;
caf::PdmField<RimWellLogPlot::AxisGridEnum> m_propertyValueAxisGridVisibility;
caf::PdmField<bool> m_propertyAxisMinAndMaxTicksOnly;
caf::PdmField<bool> m_explicitTickIntervalsPropertyValueAxis;
caf::PdmField<double> m_majorTickIntervalPropertyAxis;
caf::PdmField<double> m_minorTickIntervalPropertyAxis;
caf::PdmField<bool> m_explicitTickIntervals;
caf::PdmField<bool> m_minAndMaxTicksOnly;
caf::PdmField<double> m_majorTickInterval;
caf::PdmField<double> m_minorTickInterval;
// Depth axis
caf::PdmField<double> m_visibleDepthRangeMin;
caf::PdmField<double> m_visibleDepthRangeMax;
caf::PdmField<caf::FontTools::RelativeSizeEnum> m_axisFontSize;
@@ -374,8 +376,9 @@ private:
QPointer<RiuWellLogTrack> m_plotWidget;
std::unique_ptr<RiuPlotAnnotationTool> m_annotationTool;
double m_availablePropertyValueRangeMin;
double m_availablePropertyValueRangeMax;
double m_availableDepthRangeMin;
double m_availableDepthRangeMax;
QString m_propertyValueAxisTitle;
double m_availablePropertyValueRangeMin;
double m_availablePropertyValueRangeMax;
double m_availableDepthRangeMin;
double m_availableDepthRangeMax;
};