#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:
Gaute Lindkvist
2018-04-25 11:00:27 +02:00
parent 3a670d94a2
commit 029369d187
9 changed files with 73 additions and 24 deletions

View File

@@ -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
{