Improved ordering and grouping of parameters for wells and well collection

p4#: 21404
This commit is contained in:
Magne Sjaastad 2013-04-24 10:38:50 +02:00
parent 586908b9be
commit 4ad0a05822
4 changed files with 53 additions and 11 deletions

View File

@ -40,11 +40,11 @@ RimWell::RimWell()
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
CAF_PDM_InitField(&showWellPipes, "ShowWellPipe", true, "Show well pipe", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale",1.0, " Pipe radius scale", "", "", "");
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), " Well pipe color", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale",1.0, "Pipe radius scale", "", "", "");
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", "");
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, " Use well fence", "", "", "");
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
name.setUiHidden(true);
name.setUiReadOnly(true);
@ -204,3 +204,20 @@ bool RimWell::isWellVisible(size_t frameIndex)
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
uiOrdering.add(&showWellLabel);
caf::PdmUiGroup* pipeGroup = uiOrdering.addNewGroup("Well pipe");
pipeGroup->add(&showWellPipes);
pipeGroup->add(&pipeRadiusScaleFactor);
pipeGroup->add(&wellPipeColor);
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Range filter");
filterGroup->add(&showWellCells);
filterGroup->add(&showWellCellFence);
}

View File

@ -49,8 +49,8 @@ public:
virtual caf::PdmFieldHandle* userDescriptionField();
virtual caf::PdmFieldHandle* objectToggleField();
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
caf::PdmField<QString> name;
caf::PdmField<bool> showWellLabel;

View File

@ -74,18 +74,18 @@ RimWellCollection::RimWellCollection()
CAF_PDM_InitObject("Wells", ":/WellCollection.png", "", "");
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well heads", "", "", "");
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, " Show well labels", "", "", "");
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, " Well head scale", "", "", "");
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", "");
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", "");
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_INDIVIDUALLY), "Global well pipe visibility", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale", 0.1, " Pipe radius scale", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe radius scale", "", "", "");
CAF_PDM_InitField(&pipeCrossSectionVertexCount, "WellPipeVertexCount", 12, "Pipe vertex count", "", "", "");
pipeCrossSectionVertexCount.setUiHidden(true);
CAF_PDM_InitField(&wellCellsToRangeFilterMode, "GlobalWellCellVisibility", WellCellsRangeFilterEnum(RANGE_ADD_NONE), "Add cells to range filter", "", "", "");
CAF_PDM_InitField(&showWellCellFences, "ShowWellFences", false, " Use well fence", "", "", "");
CAF_PDM_InitField(&wellCellFenceType, "DefaultWellFenceDirection", WellFenceEnum(K_DIRECTION), " Well Fence direction", "", "", "");
CAF_PDM_InitField(&showWellCellFences, "ShowWellFences", false, "Use well fence", "", "", "");
CAF_PDM_InitField(&wellCellFenceType, "DefaultWellFenceDirection", WellFenceEnum(K_DIRECTION), "Well Fence direction", "", "", "");
CAF_PDM_InitField(&wellCellTransparencyLevel, "WellCellTransparency", 0.5, "Well cell transparency", "", "", "");
@ -237,3 +237,27 @@ void RimWellCollection::setReservoirView(RimReservoirView* ownerReservoirView)
{
m_reservoirView = ownerReservoirView;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Range filter");
filterGroup->add(&wellCellsToRangeFilterMode);
filterGroup->add(&showWellCellFences);
filterGroup->add(&wellCellFenceType);
caf::PdmUiGroup* wellHeadGroup = uiOrdering.addNewGroup("Well head");
wellHeadGroup->add(&showWellHead);
wellHeadGroup->add(&wellHeadScaleFactor);
wellHeadGroup->add(&showWellLabel);
caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe");
wellPipe->add(&wellPipeVisibility);
wellPipe->add(&pipeRadiusScaleFactor);
uiOrdering.add(&showWellLabel);
uiOrdering.add(&wellCellTransparencyLevel);
uiOrdering.add(&isAutoDetectingBranches);
}

View File

@ -89,7 +89,8 @@ public:
bool hasVisibleWellCells();
bool hasVisibleWellPipes();
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
private:
RimReservoirView* m_reservoirView;