From e027bad961ae9fa8b0bf2de85a0d1ac95dc68beb Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 23 Dec 2024 13:45:48 +0100 Subject: [PATCH] Improve user interface Add icon for well target generator Improve uiOrdering for RimRegularGridCase --- .../ProjectDataModel/RimRegularGridCase.cpp | 20 +++++++++++++++++++ .../ProjectDataModel/RimRegularGridCase.h | 2 ++ .../RimWellTargetCandidatesGenerator.cpp | 2 +- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp index 9ee37f21ae..1a50f60f4f 100644 --- a/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.cpp @@ -88,6 +88,26 @@ void RimRegularGridCase::createModel() computeCachedData(); } +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +void RimRegularGridCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) +{ + uiOrdering.add( &m_caseUserDescription ); + uiOrdering.add( &m_displayNameOption ); + uiOrdering.add( &m_caseId ); + + auto group = uiOrdering.addNewGroup( "Regular Grid Definition" ); + group->add( &m_minimum ); + group->add( &m_maximum ); + + group->add( &m_cellCountI ); + group->add( &m_cellCountJ ); + group->add( &m_cellCountK ); + + uiOrdering.skipRemainingFields(); +} + //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h index e96e44aeee..65e140cc99 100644 --- a/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h +++ b/ApplicationLibCode/ProjectDataModel/RimRegularGridCase.h @@ -46,6 +46,8 @@ public: void createModel(); private: + void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override; + void setupBeforeSave() override; QString cacheFileName() const; diff --git a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp index 10d8f6bbdc..3afa9126d3 100644 --- a/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp +++ b/ApplicationLibCode/ProjectDataModel/RimWellTargetCandidatesGenerator.cpp @@ -84,7 +84,7 @@ void caf::AppEnum::setUp() //-------------------------------------------------------------------------------------------------- RimWellTargetCandidatesGenerator::RimWellTargetCandidatesGenerator() { - CAF_PDM_InitObject( "Well Target Candidates Generator" ); + CAF_PDM_InitObject( "Well Target Candidates Generator", ":/WellTargets.png" ); CAF_PDM_InitField( &m_timeStep, "TimeStep", 0, "Time Step" );