mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1618 Changing proxy fields from double to QString to have more control over the output and limit accuracy of numbers printed.
This commit is contained in:
@@ -101,10 +101,10 @@ RimFracture::RimFracture(void)
|
||||
CAF_PDM_InitField(&stimPlanTimeIndexToPlot, "timeIndexToPlot", 0, "StimPlan Time Step", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_uiWellPathAzimuth, "WellPathAzimuth", "Well Path Azimuth", "", "", "");
|
||||
m_uiWellPathAzimuth.registerGetMethod(this, &RimFracture::wellAzimuthAtFracturePosition);
|
||||
m_uiWellPathAzimuth.registerGetMethod(this, &RimFracture::wellAzimuthAtFracturePositionText);
|
||||
m_uiWellPathAzimuth.uiCapability()->setUiReadOnly(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_uiWellFractureAzimuthDiff, "WellFractureAzimuthDiff", "Azimuth Difference Between Fracture and Well", "", "", "");
|
||||
m_uiWellFractureAzimuthDiff.registerGetMethod(this, &RimFracture::wellFractureAzimuthDiff);
|
||||
m_uiWellFractureAzimuthDiff.registerGetMethod(this, &RimFracture::wellFractureAzimuthDiffText);
|
||||
m_uiWellFractureAzimuthDiff.uiCapability()->setUiReadOnly(true);
|
||||
CAF_PDM_InitField(&m_wellFractureAzimuthAngleWarning, "WellFractureAzimithAngleWarning", QString("Difference is below 10 degrees. Consider longitudinal fracture"), "", "", "", "");
|
||||
m_wellFractureAzimuthAngleWarning.uiCapability()->setUiReadOnly(true);
|
||||
@@ -189,6 +189,21 @@ double RimFracture::wellFractureAzimuthDiff() const
|
||||
return wellDifference;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::wellFractureAzimuthDiffText() const
|
||||
{
|
||||
double wellDifference = wellFractureAzimuthDiff();
|
||||
return QString::number(wellDifference, 'f', 2);
|
||||
}
|
||||
|
||||
QString RimFracture::wellAzimuthAtFracturePositionText() const
|
||||
{
|
||||
double wellAzimuth = wellAzimuthAtFracturePosition();
|
||||
return QString::number(wellAzimuth, 'f', 2);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -106,7 +106,9 @@ private:
|
||||
cvf::Vec3d fracturePositionForUi() const;
|
||||
double wellFractureAzimuthDiff() const;
|
||||
|
||||
|
||||
QString wellFractureAzimuthDiffText() const;
|
||||
QString wellAzimuthAtFracturePositionText() const;
|
||||
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() override;
|
||||
|
||||
protected:
|
||||
@@ -114,8 +116,8 @@ protected:
|
||||
caf::PdmProxyValueField<cvf::Vec3d> m_uiAnchorPosition;
|
||||
caf::PdmField< RiaEclipseUnitTools::UnitSystemType > m_fractureUnit;
|
||||
|
||||
caf::PdmProxyValueField<double> m_uiWellPathAzimuth;
|
||||
caf::PdmProxyValueField<double> m_uiWellFractureAzimuthDiff;
|
||||
caf::PdmProxyValueField<QString> m_uiWellPathAzimuth;
|
||||
caf::PdmProxyValueField<QString> m_uiWellFractureAzimuthDiff;
|
||||
caf::PdmField<QString> m_wellFractureAzimuthAngleWarning;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user