mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2591 3D well log curve: Add option to place at the side of the well
This commit is contained in:
@@ -23,6 +23,17 @@
|
||||
|
||||
CAF_PDM_SOURCE_INIT(Rim3dWellLogCurveCollection, "Rim3dWellLogCurveCollection");
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void AppEnum< Rim3dWellLogCurveCollection::PlanePosition >::setUp()
|
||||
{
|
||||
addItem(Rim3dWellLogCurveCollection::ALONG_WELLPATH, "ALONG_WELLPATH", "On One Side of Well Path");
|
||||
addItem(Rim3dWellLogCurveCollection::ON_WELLPATH, "ON_WELLPATH", "On Well Path");
|
||||
setDefault(Rim3dWellLogCurveCollection::ALONG_WELLPATH);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -35,6 +46,8 @@ Rim3dWellLogCurveCollection::Rim3dWellLogCurveCollection()
|
||||
|
||||
CAF_PDM_InitField(&m_showGrid, "Show3dWellLogGrid", true, "Show Grid", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_planePosition, "PlanePosition", "Plane Position", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "", "", "", "");
|
||||
m_3dWellLogCurves.uiCapability()->setUiTreeHidden(true);
|
||||
}
|
||||
@@ -82,6 +95,14 @@ bool Rim3dWellLogCurveCollection::isShowingPlot() const
|
||||
return m_showPlot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogCurveCollection::PlanePosition Rim3dWellLogCurveCollection::planePosition() const
|
||||
{
|
||||
return m_planePosition();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -113,3 +134,14 @@ caf::PdmFieldHandle* Rim3dWellLogCurveCollection::objectToggleField()
|
||||
{
|
||||
return &m_showPlot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dWellLogCurveCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
||||
{
|
||||
caf::PdmUiGroup* settingsGroup = uiOrdering.addNewGroup("Track Settings");
|
||||
|
||||
settingsGroup->add(&m_showGrid);
|
||||
settingsGroup->add(&m_planePosition);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
@@ -32,6 +33,13 @@ class Rim3dWellLogCurveCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum PlanePosition
|
||||
{
|
||||
ALONG_WELLPATH,
|
||||
ON_WELLPATH
|
||||
};
|
||||
|
||||
public:
|
||||
Rim3dWellLogCurveCollection();
|
||||
virtual ~Rim3dWellLogCurveCollection();
|
||||
@@ -42,14 +50,20 @@ public:
|
||||
bool isShowingGrid() const;
|
||||
bool isShowingPlot() const;
|
||||
|
||||
PlanePosition planePosition() const;
|
||||
|
||||
std::vector<Rim3dWellLogCurve*> vectorOf3dWellLogCurves() const;
|
||||
|
||||
private:
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
virtual caf::PdmFieldHandle* objectToggleField() override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showPlot;
|
||||
|
||||
caf::PdmField<bool> m_showGrid;
|
||||
caf::PdmField<caf::AppEnum<PlanePosition>> m_planePosition;
|
||||
|
||||
caf::PdmChildArrayField<Rim3dWellLogCurve*> m_3dWellLogCurves;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user