mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2677 Show curve value when clicking the curve
This change will show the following: - Curve name - Well path name - Measured depth - name of variable - value
This commit is contained in:
parent
3a670d94a2
commit
029369d187
@ -21,6 +21,7 @@
|
||||
|
||||
#include "Rim3dWellLogCurve.h"
|
||||
#include "Rim3dWellLogCurveCollection.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RivObjectSourceInfo.h"
|
||||
|
||||
@ -53,6 +54,9 @@ bool Ric3dWellLogCurveViewerEventHandler::handleEvent(const RicViewerEventObject
|
||||
Rim3dWellLogCurveCollection* curveCollection = dynamic_cast<Rim3dWellLogCurveCollection*>(sourceInfo->object());
|
||||
if (curveCollection)
|
||||
{
|
||||
RimWellPath* wellPath;
|
||||
curveCollection->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
QString wellPathName = wellPath->name();
|
||||
cvf::Vec3d closestPoint;
|
||||
double measuredDepthAtPoint;
|
||||
double valueAtPoint;
|
||||
@ -61,6 +65,14 @@ bool Ric3dWellLogCurveViewerEventHandler::handleEvent(const RicViewerEventObject
|
||||
if (curve)
|
||||
{
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(curve);
|
||||
|
||||
QString curveText;
|
||||
curveText += QString("Curve name : %1\n").arg(curve->name());;
|
||||
curveText += QString("Well path name: %1\n").arg(wellPathName);
|
||||
curveText += QString("Measured depth: %1\n").arg(measuredDepthAtPoint);
|
||||
curveText += QString("%1 at depth: %2\n").arg(curve->resultPropertyString()).arg(valueAtPoint);
|
||||
|
||||
RiuMainWindow::instance()->setResultInfo(curveText);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -90,6 +90,14 @@ void Rim3dWellLogCurve::updateCurveIn3dView()
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const QString& Rim3dWellLogCurve::name() const
|
||||
{
|
||||
return m_name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -52,25 +52,26 @@ public:
|
||||
|
||||
void updateCurveIn3dView();
|
||||
|
||||
DrawPlane drawPlane() const;
|
||||
cvf::Color3f color() const;
|
||||
bool isShowingCurve() const;
|
||||
const QString& name() const;
|
||||
virtual QString resultPropertyString() const = 0;
|
||||
DrawPlane drawPlane() const;
|
||||
cvf::Color3f color() const;
|
||||
bool isShowingCurve() const;
|
||||
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0;
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0;
|
||||
|
||||
void setColor(const cvf::Color3f& color);
|
||||
void setColor(const cvf::Color3f& color);
|
||||
|
||||
double minCurveValue() const;
|
||||
double maxCurveValue() const;
|
||||
void resetMinMaxValuesAndUpdateUI();
|
||||
bool findClosestPointOnCurve(const cvf::Vec3d& globalIntersection,
|
||||
double minCurveValue() const;
|
||||
double maxCurveValue() const;
|
||||
void resetMinMaxValuesAndUpdateUI();
|
||||
bool findClosestPointOnCurve(const cvf::Vec3d& globalIntersection,
|
||||
cvf::Vec3d* closestPoint,
|
||||
double* measuredDepthAtPoint,
|
||||
double* valueAtPoint) const;
|
||||
double* measuredDepthAtPoint,
|
||||
double* valueAtPoint) const;
|
||||
|
||||
void setGeometryGenerator(Riv3dWellLogCurveGeometryGenerator* generator);
|
||||
cvf::ref<Riv3dWellLogCurveGeometryGenerator> geometryGenerator();
|
||||
|
||||
|
||||
protected:
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
@ -112,6 +112,14 @@ void Rim3dWellLogExtractionCurve::setPropertiesFromView(Rim3dView* view)
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dWellLogExtractionCurve::resultPropertyString() const
|
||||
{
|
||||
return m_eclipseResultDefinition->resultVariableUiName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -41,8 +41,9 @@ public:
|
||||
Rim3dWellLogExtractionCurve();
|
||||
virtual ~Rim3dWellLogExtractionCurve();
|
||||
|
||||
void setPropertiesFromView(Rim3dView* view);
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const override;
|
||||
void setPropertiesFromView(Rim3dView* view);
|
||||
virtual QString resultPropertyString() const override;
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const override;
|
||||
|
||||
private:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||
|
@ -40,7 +40,7 @@ Rim3dWellLogFileCurve::Rim3dWellLogFileCurve()
|
||||
{
|
||||
CAF_PDM_InitObject("3d Well Log File Curve", ":/WellLogCurve16x16.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogChannnelName, "CurveWellLogChannel", "Well Log Channel", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogChannelName, "CurveWellLogChannel", "Well Log Channel", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogFile, "WellLogFile", "Well Log File", "", "", "");
|
||||
|
||||
@ -71,8 +71,8 @@ void Rim3dWellLogFileCurve::setDefaultFileCurveDataInfo()
|
||||
|
||||
if (!fileLogs.empty())
|
||||
{
|
||||
m_wellLogChannnelName = fileLogs[0]->name();
|
||||
m_name = "LAS: " + m_wellLogChannnelName;
|
||||
m_wellLogChannelName = fileLogs[0]->name();
|
||||
m_name = "LAS: " + m_wellLogChannelName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,12 +90,20 @@ void Rim3dWellLogFileCurve::curveValuesAndMds(std::vector<double>* values, std::
|
||||
RigWellLogFile* wellLogFile = m_wellLogFile->wellLogFileData();
|
||||
if (wellLogFile)
|
||||
{
|
||||
*values = wellLogFile->values(m_wellLogChannnelName);
|
||||
*values = wellLogFile->values(m_wellLogChannelName);
|
||||
*measuredDepthValues = wellLogFile->depthValues();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dWellLogFileCurve::resultPropertyString() const
|
||||
{
|
||||
return m_wellLogChannelName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -103,7 +111,7 @@ void Rim3dWellLogFileCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedF
|
||||
const QVariant& oldValue,
|
||||
const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &m_wellLogFile || changedField == &m_wellLogChannnelName)
|
||||
if (changedField == &m_wellLogFile || changedField == &m_wellLogChannelName)
|
||||
{
|
||||
this->resetMinMaxValuesAndUpdateUI();
|
||||
}
|
||||
@ -122,7 +130,7 @@ QList<caf::PdmOptionItemInfo> Rim3dWellLogFileCurve::calculateValueOptions(const
|
||||
|
||||
if (!options.empty()) return options;
|
||||
|
||||
if (fieldNeedingOptions == &m_wellLogChannnelName)
|
||||
if (fieldNeedingOptions == &m_wellLogChannelName)
|
||||
{
|
||||
if (m_wellLogFile)
|
||||
{
|
||||
@ -166,7 +174,7 @@ void Rim3dWellLogFileCurve::defineUiOrdering(QString uiConfigName, caf::PdmUiOrd
|
||||
{
|
||||
caf::PdmUiGroup* curveDataGroup = uiOrdering.addNewGroup("Curve Data");
|
||||
curveDataGroup->add(&m_wellLogFile);
|
||||
curveDataGroup->add(&m_wellLogChannnelName);
|
||||
curveDataGroup->add(&m_wellLogChannelName);
|
||||
|
||||
Rim3dWellLogCurve::configurationUiOrdering(uiOrdering);
|
||||
|
||||
|
@ -38,8 +38,9 @@ public:
|
||||
Rim3dWellLogFileCurve();
|
||||
virtual ~Rim3dWellLogFileCurve();
|
||||
|
||||
void setDefaultFileCurveDataInfo();
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const override;
|
||||
void setDefaultFileCurveDataInfo();
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const override;
|
||||
virtual QString resultPropertyString() const override;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
@ -54,5 +55,5 @@ private:
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimWellLogFile*> m_wellLogFile;
|
||||
caf::PdmField<QString> m_wellLogChannnelName;
|
||||
caf::PdmField<QString> m_wellLogChannelName;
|
||||
};
|
||||
|
@ -76,6 +76,14 @@ void Rim3dWellLogRftCurve::curveValuesAndMds(std::vector<double>* values, std::v
|
||||
*measuredDepthValues = curveData->measuredDepths();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString Rim3dWellLogRftCurve::resultPropertyString() const
|
||||
{
|
||||
return caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>::uiText(m_wellLogChannelName());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
|
||||
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const override;
|
||||
|
||||
virtual QString resultPropertyString() const override;
|
||||
|
||||
protected:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
const QVariant& oldValue,
|
||||
|
Loading…
Reference in New Issue
Block a user