Well Label Color: Preferences for new views and color setting on well

collection.
This commit is contained in:
Jacob Støren 2013-10-01 11:13:23 +02:00
parent 2372cf86ca
commit a8f9851896
5 changed files with 14 additions and 3 deletions

View File

@ -44,6 +44,7 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&defaultGridLines, "defaultGridLines", true, "Gridlines", "", "", "");
CAF_PDM_InitField(&defaultGridLineColors, "defaultGridLineColors", cvf::Color3f(0.92f, 0.92f, 0.92f), "Mesh color", "", "", "");
CAF_PDM_InitField(&defaultFaultGridLineColors, "defaultFaultGridLineColors", cvf::Color3f(0.08f, 0.08f, 0.08f), "Mesh color along faults", "", "", "");
CAF_PDM_InitField(&defaultWellLabelColor, "defaultWellLableColor", cvf::Color3f(0.92f, 0.92f, 0.92f), "Well label color", "", "The default well label color in new views", "");
CAF_PDM_InitField(&defaultViewerBackgroundColor, "defaultViewerBackgroundColor", cvf::Color3f(0.69f, 0.77f, 0.87f), "Viewer background", "", "The viewer background color for new views", "");
@ -102,7 +103,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
defaultSettingsGroup->add(&defaultGridLines);
defaultSettingsGroup->add(&defaultGridLineColors);
defaultSettingsGroup->add(&defaultFaultGridLineColors);
defaultSettingsGroup->add(&defaultWellLabelColor);
caf::PdmUiGroup* autoComputeGroup = uiOrdering.addNewGroup("Compute when loading new case");
autoComputeGroup->add(&autocomputeSOIL);

View File

@ -48,6 +48,7 @@ public: // Pdm Fields
caf::PdmField<cvf::Color3f> defaultGridLineColors;
caf::PdmField<cvf::Color3f> defaultFaultGridLineColors;
caf::PdmField<cvf::Color3f> defaultViewerBackgroundColor;
caf::PdmField<cvf::Color3f> defaultWellLabelColor;
caf::PdmField<bool> useShaders;
caf::PdmField<bool> showHud;

View File

@ -290,7 +290,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
drawableText->setDrawBorder(false);
drawableText->setDrawBackground(false);
drawableText->setVerticalAlignment(cvf::TextDrawer::CENTER);
drawableText->setTextColor(cvf::Color3f(0.92f, 0.92f, 0.92f));
drawableText->setTextColor(m_rimReservoirView->wellCollection()->wellLabelColor());
cvf::String cvfString = cvfqt::Utils::fromQString(well->name());

View File

@ -29,6 +29,8 @@
#include "Rim3dOverlayInfoConfig.h"
#include "RimCellEdgeResultSlot.h"
#include "RiaApplication.h"
#include "RiaPreferences.h"
namespace caf
{
@ -93,6 +95,8 @@ RimWellCollection::RimWellCollection()
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well labels", "", "", "");
CAF_PDM_InitField(&wellHeadScaleFactor, "WellHeadScale", 1.0, "Well head scale", "", "", "");
CAF_PDM_InitField(&wellHeadPosition, "WellHeadPosition", WellHeadPositionEnum(WELLHEAD_POS_TOP_COLUMN), "Well head position", "", "", "");
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
CAF_PDM_InitField(&wellLabelColor, "WellLabelColor", defWellLabelColor, "Well label color", "", "", "");
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
@ -243,7 +247,8 @@ void RimWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField
|| &wellHeadScaleFactor == changedField
|| &showWellHead == changedField
|| &isAutoDetectingBranches == changedField
|| &wellHeadPosition == changedField)
|| &wellHeadPosition == changedField
|| &wellLabelColor == changedField)
{
if (m_reservoirView)
{
@ -276,6 +281,7 @@ void RimWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
wellHeadGroup->add(&wellHeadScaleFactor);
wellHeadGroup->add(&showWellLabel);
wellHeadGroup->add(&wellHeadPosition);
wellHeadGroup->add(&wellLabelColor);
caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe");
wellPipe->add(&wellPipeVisibility);

View File

@ -76,6 +76,8 @@ public:
caf::PdmField<bool> showWellLabel;
caf::PdmField<cvf::Color3f> wellLabelColor;
caf::PdmField<bool> isActive;
caf::PdmField<WellCellsRangeFilterEnum> wellCellsToRangeFilterMode;
@ -91,6 +93,7 @@ public:
caf::PdmField<bool> showWellHead;
caf::PdmField<WellHeadPositionEnum> wellHeadPosition;
caf::PdmField<bool> isAutoDetectingBranches;
caf::PdmPointersField<RimWell*> wells;