#2591 3D well log curves: Option to turn grid on/off

This commit is contained in:
Unknown
2018-03-20 11:29:46 +01:00
committed by unknown
parent 60120c70d5
commit 8766ea3057
9 changed files with 111 additions and 24 deletions

View File

@@ -19,6 +19,7 @@
#include "Rim3dWellLogCurveCollection.h"
#include "Rim3dWellLogCurve.h"
#include "RimProject.h"
CAF_PDM_SOURCE_INIT(Rim3dWellLogCurveCollection, "Rim3dWellLogCurveCollection");
@@ -29,8 +30,10 @@ Rim3dWellLogCurveCollection::Rim3dWellLogCurveCollection()
{
CAF_PDM_InitObject("3D Track", ":/WellLogCurve16x16.png", "", "");
CAF_PDM_InitField(&m_showCurves, "Show3dWellLogCurves", true, "Show 3d Well Log Curves", "", "", "");
m_showCurves.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_showPlot, "Show3dWellLogCurves", true, "Show 3d Well Log Curves", "", "", "");
m_showPlot.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&m_showGrid, "Show3dWellLogGrid", true, "Show Grid", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_3dWellLogCurves, "ArrayOf3dWellLogCurves", "", "", "", "");
m_3dWellLogCurves.uiCapability()->setUiTreeHidden(true);
@@ -63,6 +66,22 @@ void Rim3dWellLogCurveCollection::add3dWellLogCurve(Rim3dWellLogCurve* curve)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool Rim3dWellLogCurveCollection::showGrid() const
{
return m_showGrid;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool Rim3dWellLogCurveCollection::showPlot() const
{
return m_showPlot;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -77,10 +96,20 @@ std::vector<Rim3dWellLogCurve*> Rim3dWellLogCurveCollection::vectorOf3dWellLogCu
return curves;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim3dWellLogCurveCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
{
RimProject* proj;
this->firstAncestorOrThisOfTypeAsserted(proj);
proj->createDisplayModelAndRedrawAllViews();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* Rim3dWellLogCurveCollection::objectToggleField()
{
return &m_showCurves;
return &m_showPlot;
}

View File

@@ -39,12 +39,18 @@ public:
bool has3dWellLogCurves() const;
void add3dWellLogCurve(Rim3dWellLogCurve* curve);
bool showGrid() const;
bool showPlot() const;
std::vector<Rim3dWellLogCurve*> vectorOf3dWellLogCurves() const;
private:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
virtual caf::PdmFieldHandle* objectToggleField() override;
private:
caf::PdmField<bool> m_showCurves;
caf::PdmField<bool> m_showPlot;
caf::PdmField<bool> m_showGrid;
caf::PdmChildArrayField<Rim3dWellLogCurve*> m_3dWellLogCurves;
};

View File

@@ -817,6 +817,14 @@ std::vector<Rim3dWellLogCurve*> RimWellPath::vectorOf3dWellLogCurves() const
return m_3dWellLogCurves->vectorOf3dWellLogCurves();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Rim3dWellLogCurveCollection* RimWellPath::rim3dWellLogCurveCollection() const
{
return m_3dWellLogCurves();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -81,6 +81,7 @@ public:
void add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve);
std::vector<Rim3dWellLogCurve*> vectorOf3dWellLogCurves() const;
Rim3dWellLogCurveCollection* rim3dWellLogCurveCollection() const;
virtual caf::PdmFieldHandle* userDescriptionField() override;
virtual caf::PdmFieldHandle* objectToggleField() override;