Skip to content

Commit

Permalink
(#438) Added depth type enum field to well log plot
Browse files Browse the repository at this point in the history
  • Loading branch information
palhagen committed Sep 10, 2015
1 parent 03aa8cc commit 7ba23a7
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
19 changes: 18 additions & 1 deletion ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0

namespace caf {

template<>
void caf::AppEnum< RimWellLogPlot::DepthTypeEnum >::setUp()
{
addItem(RimWellLogPlot::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth");
addItem(RimWellLogPlot::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth");
setDefault(RimWellLogPlot::MEASURED_DEPTH);
}

} // End namespace caf


CAF_PDM_SOURCE_INIT(RimWellLogPlot, "WellLogPlot");

//--------------------------------------------------------------------------------------------------
Expand All @@ -49,8 +62,12 @@ RimWellLogPlot::RimWellLogPlot()
m_showWindow.uiCapability()->setUiHidden(true);

CAF_PDM_InitField(&m_userName, "PlotDescription", QString("Well Log Plot"),"Name", "", "", "");

caf::AppEnum< RimWellLogPlot::DepthTypeEnum > depthType = MEASURED_DEPTH;
CAF_PDM_InitField(&m_depthType, "DepthType", depthType, "Depth type", "", "", "");

CAF_PDM_InitField(&m_minimumVisibleDepth, "MinimumDepth", 0.0, "Minimum depth", "", "", "");
CAF_PDM_InitField(&m_maximumVisibleDepth, "MaximumDepth", 1000.0, "Maximum depth", "", "", "");
CAF_PDM_InitField(&m_maximumVisibleDepth, "MaximumDepth", 1000.0, "Maximum depth", "", "", "");

CAF_PDM_InitFieldNoDefault(&traces, "Traces", "", "", "", "");
traces.uiCapability()->setUiHidden(true);
Expand Down
16 changes: 13 additions & 3 deletions ApplicationCode/ProjectDataModel/RimWellLogPlot.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "cafPdmObject.h"
#include "cafPdmField.h"
#include "cafPdmChildArrayField.h"
#include "cafAppEnum.h"

#include <QPointer>

Expand All @@ -36,6 +37,14 @@ class RimWellLogPlotTrace;
class RimWellLogPlot : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;

public:
enum DepthTypeEnum
{
MEASURED_DEPTH,
TRUE_VERTICAL_DEPTH
};

public:
RimWellLogPlot();
virtual ~RimWellLogPlot();
Expand Down Expand Up @@ -88,9 +97,10 @@ class RimWellLogPlot : public caf::PdmObject

caf::PdmChildArrayField<RimWellLogPlotTrace*> traces;

caf::PdmField<QString> m_userName;
caf::PdmField<double> m_minimumVisibleDepth;
caf::PdmField<double> m_maximumVisibleDepth;
caf::PdmField<QString> m_userName;
caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType;
caf::PdmField<double> m_minimumVisibleDepth;
caf::PdmField<double> m_maximumVisibleDepth;

double m_depthRangeMinimum;
double m_depthRangeMaximum;
Expand Down

0 comments on commit 7ba23a7

Please sign in to comment.