From ecf0d19110aad6ed6517205ccf2b35f6eea78ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Hagen?= Date: Fri, 18 Sep 2015 11:47:17 +0200 Subject: [PATCH] Added group for visible depth range. Renamed fields. --- .../ProjectDataModel/RimWellLogPlot.cpp | 19 +++++++++++++++++-- .../ProjectDataModel/RimWellLogPlot.h | 1 + 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index eb5dc97f70..e18d29f17a 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -66,8 +66,8 @@ RimWellLogPlot::RimWellLogPlot() 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_minimumVisibleDepth, "MinimumDepth", 0.0, "Min", "", "", ""); + CAF_PDM_InitField(&m_maximumVisibleDepth, "MaximumDepth", 1000.0, "Max", "", "", ""); CAF_PDM_InitFieldNoDefault(&traces, "Traces", "", "", "", ""); traces.uiCapability()->setUiHidden(true); @@ -294,6 +294,21 @@ void RimWellLogPlot::setupBeforeSave() } } + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimWellLogPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) +{ + uiOrdering.add(&m_userName); + uiOrdering.add(&m_depthType); + + caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup("Visible Depth Range"); + gridGroup->add(&m_minimumVisibleDepth); + gridGroup->add(&m_maximumVisibleDepth); +} + + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h index 6692167a5e..66f3ab10e0 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.h +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.h @@ -85,6 +85,7 @@ protected: // Overridden PDM methods virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue); virtual void setupBeforeSave(); + virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering); private: void updateViewerWidget();