mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 15:41:00 -05:00
update ui and use value.
This commit is contained in:
1 parent
a1b243d723
commit
0f35398b90
5 files changed
+97
-41
No files matched your search
@@ -116,6 +116,9 @@ RimMswCompletionParameters::RimMswCompletionParameters()
|
||||
CAF_PDM_InitScriptableField( &m_maxSegmentLength, "MaxSegmentLength", 200.0, "Max Segment Length" );
|
||||
m_maxSegmentLength.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_minimumSegmentLength, "MinimumSegmentLength", "Minimum Segment Length" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_maximumSegmentLength, "MaximumSegmentLength", "Maximum Segment Length" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_customSegmentIntervals, "CustomSegmentIntervals", "Custom Segment Intervals" );
|
||||
m_customSegmentIntervals = new RimCustomSegmentIntervalCollection();
|
||||
m_customSegmentIntervals->intervalsField().uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
||||
@@ -335,9 +338,17 @@ RimMswCompletionParameters::LengthAndDepthEnum RimMswCompletionParameters::lengt
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimMswCompletionParameters::maxSegmentLength() const
|
||||
std::optional<double> RimMswCompletionParameters::minSegmentLength() const
|
||||
{
|
||||
return m_enforceMaxSegmentLength ? m_maxSegmentLength : std::numeric_limits<double>::infinity();
|
||||
return m_minimumSegmentLength;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::optional<double> RimMswCompletionParameters::maxSegmentLength() const
|
||||
{
|
||||
return m_maximumSegmentLength;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -499,8 +510,8 @@ void RimMswCompletionParameters::defineUiOrdering( QString uiConfigName, caf::Pd
|
||||
|
||||
// Custom Segment Configuration section
|
||||
auto* segmentConfigGroup = uiOrdering.addNewGroup( "Custom Segment Configuration" );
|
||||
segmentConfigGroup->add( &m_enforceMaxSegmentLength );
|
||||
segmentConfigGroup->add( &m_maxSegmentLength );
|
||||
segmentConfigGroup->add( &m_minimumSegmentLength );
|
||||
segmentConfigGroup->add( &m_maximumSegmentLength );
|
||||
segmentConfigGroup->add( &m_customSegmentIntervals->intervalsField() );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -67,15 +67,16 @@ public:
|
||||
|
||||
RimMswCompletionParameters& operator=( const RimMswCompletionParameters& rhs );
|
||||
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
PressureDropEnum pressureDrop() const;
|
||||
LengthAndDepthEnum lengthAndDepth() const;
|
||||
double maxSegmentLength() const;
|
||||
ReferenceMDType referenceMDType() const;
|
||||
double manualReferenceMD() const;
|
||||
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
double linerDiameter() const;
|
||||
double roughnessFactor() const;
|
||||
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
||||
PressureDropEnum pressureDrop() const;
|
||||
LengthAndDepthEnum lengthAndDepth() const;
|
||||
std::optional<double> minSegmentLength() const;
|
||||
std::optional<double> maxSegmentLength() const;
|
||||
|
||||
void setReferenceMDType( ReferenceMDType refType );
|
||||
void setManualReferenceMD( double manualRefMD );
|
||||
@@ -132,5 +133,8 @@ private:
|
||||
caf::PdmField<bool> m_enforceMaxSegmentLength;
|
||||
caf::PdmField<double> m_maxSegmentLength;
|
||||
|
||||
caf::PdmField<std::optional<double>> m_minimumSegmentLength;
|
||||
caf::PdmField<std::optional<double>> m_maximumSegmentLength;
|
||||
|
||||
caf::PdmChildField<RimCustomSegmentIntervalCollection*> m_customSegmentIntervals;
|
||||
};
|
||||
Reference in new issue
Block a user