mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2591 3D well log curves: Option to turn grid on/off
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -817,6 +817,14 @@ std::vector<Rim3dWellLogCurve*> RimWellPath::vectorOf3dWellLogCurves() const
|
||||
return m_3dWellLogCurves->vectorOf3dWellLogCurves();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dWellLogCurveCollection* RimWellPath::rim3dWellLogCurveCollection() const
|
||||
{
|
||||
return m_3dWellLogCurves();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user