Fixed visibility of more items in tree view

This commit is contained in:
Magne Sjaastad 2015-08-09 14:12:09 +02:00
parent 111509e52a
commit 65d372dd70
7 changed files with 21 additions and 5 deletions

View File

@ -36,7 +36,7 @@ CAF_PDM_SOURCE_INIT(RimCellEdgeColors, "CellEdgeResultSlot");
//--------------------------------------------------------------------------------------------------
RimCellEdgeColors::RimCellEdgeColors()
{
CAF_PDM_InitObject("Cell Edge Result", "", "", "");
CAF_PDM_InitObject("Cell Edge Result", ":/EdgeResult_1.png", "", "");
CAF_PDM_InitField(&enableCellEdgeColors, "EnableCellEdgeColors", true, "Enable cell edge results", "", "", "");
enableCellEdgeColors.uiCapability()->setUiHidden(true);
@ -47,6 +47,7 @@ RimCellEdgeColors::RimCellEdgeColors()
CAF_PDM_InitField(&useZVariable, "UseZVariable", true, "Use Z values", "", "", "");
CAF_PDM_InitFieldNoDefault(&legendConfig, "LegendDefinition", "Legend Definition", ":/Legend.png", "", "");
legendConfig.uiCapability()->setUiHidden(true);
resultVariable.uiCapability()->setUiEditorTypeName(caf::PdmUiListEditor::uiEditorTypeName());

View File

@ -42,6 +42,7 @@ RimEclipseCaseCollection::RimEclipseCaseCollection(void)
cases.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&caseGroups, "CaseGroups", "", "", "", "");
caseGroups.uiCapability()->setUiHidden(true);
m_gridCollection = new RigGridManager;
}

View File

@ -32,7 +32,7 @@ CAF_PDM_SOURCE_INIT(RimEclipseCellColors, "ResultSlot");
//--------------------------------------------------------------------------------------------------
RimEclipseCellColors::RimEclipseCellColors()
{
CAF_PDM_InitObject("Result Slot", "", "", "");
CAF_PDM_InitObject("Cell Result", ":/CellResult.png", "", "");
CAF_PDM_InitFieldNoDefault(&obsoleteField_legendConfig, "LegendDefinition", "Legend Definition", "", "", "");
this->obsoleteField_legendConfig.uiCapability()->setUiHidden(true);
@ -100,7 +100,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend)
{
this->ternaryLegendConfig.uiCapability()->setUiHidden(false);
this->ternaryLegendConfig.uiCapability()->setUiChildrenHidden(false);
this->m_legendConfigPtrField.uiCapability()->setUiHidden(true);
this->m_legendConfigPtrField.uiCapability()->setUiChildrenHidden(true);
}
else
@ -141,7 +140,6 @@ void RimEclipseCellColors::changeLegendConfig(QString resultVarNameOfNewLegend)
}
}
this->m_legendConfigPtrField.uiCapability()->setUiHidden(false);
this->m_legendConfigPtrField.uiCapability()->setUiChildrenHidden(false);
}
}

View File

@ -27,6 +27,7 @@
#include "RimEclipseCellColors.h"
#include "RimUiTreeModelPdm.h"
#include "RiuMainWindow.h"
#include "cafPdmUiTreeOrdering.h"
@ -49,6 +50,7 @@ RimEclipseFaultColors::RimEclipseFaultColors()
//m_customFaultResultColors.setOwnerObject(this);
m_customFaultResultColors.uiCapability()->setUiHidden(true);
m_customFaultResultColors()->setUiHidden(true);
// MODTODO how to handle this?
/*
@ -164,3 +166,13 @@ bool RimEclipseFaultColors::hasValidCustomResult()
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseFaultColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
uiTreeOrdering.add(m_customFaultResultColors()->legendConfig());
uiTreeOrdering.setForgetRemainingFields(true);
}

View File

@ -55,6 +55,7 @@ protected:
virtual caf::PdmFieldHandle* objectToggleField();
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) ;
virtual void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "");
private:
caf::PdmChildField<RimEclipseCellColors*> m_customFaultResultColors;

View File

@ -35,6 +35,7 @@ RimEclipseStatisticsCaseCollection::RimEclipseStatisticsCaseCollection()
CAF_PDM_InitObject("Derived Statistics", "", "", "");
CAF_PDM_InitFieldNoDefault(&cases, "Reservoirs", "", "", "", "");
cases.uiCapability()->setUiHidden(true);
}
//--------------------------------------------------------------------------------------------------

View File

@ -79,13 +79,15 @@ RimEclipseView::RimEclipseView()
CAF_PDM_InitFieldNoDefault(&cellResult, "GridCellResult", "Cell Result", ":/CellResult.png", "", "");
cellResult = new RimEclipseCellColors();
cellResult.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&cellEdgeResult, "GridCellEdgeResult", "Cell Edge Result", ":/EdgeResult_1.png", "", "");
cellEdgeResult = new RimCellEdgeColors();
cellEdgeResult.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&faultResultSettings, "FaultResultSettings", "Separate Fault Result", "", "", "");
faultResultSettings = new RimEclipseFaultColors();
faultResultSettings.uiCapability()->setUiHidden(true);
CAF_PDM_InitFieldNoDefault(&wellCollection, "WellCollection", "Simulation Wells", "", "", "");
wellCollection = new RimEclipseWellCollection;