mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#1138 - pre-proto - Adding stimPlan color palette (for plotting fracture data)
This commit is contained in:
parent
ad3270e513
commit
0a801635dd
@ -212,6 +212,28 @@ const caf::ColorTable& RiaColorTables::angularPaletteColors()
|
||||
return colorTable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const caf::ColorTable& RiaColorTables::stimPlanPaletteColors()
|
||||
{
|
||||
static std::vector<cvf::Color3ub> colors{
|
||||
cvf::Color3ub(220, 220, 220), //Grey
|
||||
cvf::Color3ub(0, 0, 255), //Blue
|
||||
cvf::Color3ub(0, 128, 255), //Lighter blue
|
||||
cvf::Color3ub(80, 240, 60), //Darker green
|
||||
cvf::Color3ub(0, 255, 0), //Green
|
||||
cvf::Color3ub(255, 255, 0), //Yellow
|
||||
cvf::Color3ub(255, 192, 0), //Light orange
|
||||
cvf::Color3ub(255, 128, 0), //Orange
|
||||
cvf::Color3ub(255, 64, 0), //Red-orange
|
||||
cvf::Color3ub(255, 0, 255) //Magenta
|
||||
};
|
||||
|
||||
static caf::ColorTable colorTable = caf::ColorTable(colors);
|
||||
return colorTable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -38,6 +38,7 @@ public:
|
||||
static const caf::ColorTable& redWhiteBluePaletteColors();
|
||||
static const caf::ColorTable& categoryPaletteColors();
|
||||
static const caf::ColorTable& angularPaletteColors();
|
||||
static const caf::ColorTable& stimPlanPaletteColors();
|
||||
static const caf::ColorTable& faultsPaletteColors();
|
||||
static const caf::ColorTable& wellsPaletteColors();
|
||||
static const caf::ColorTable& summaryCurveDefaultPaletteColors();
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "RimEclipseCellColors.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimGeoMechResultDefinition.h"
|
||||
#include "RimStimPlanColors.h"
|
||||
#include "RimViewLinker.h"
|
||||
|
||||
#include "cafCategoryLegend.h"
|
||||
@ -75,6 +76,7 @@ namespace caf {
|
||||
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
|
||||
addItem(RimLegendConfig::CATEGORY, "CATEGORY", "Category colors");
|
||||
addItem(RimLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic");
|
||||
addItem(RimLegendConfig::STIMPLAN, "STIMPLAN", "StimPlan colors");
|
||||
setDefault(RimLegendConfig::NORMAL);
|
||||
}
|
||||
}
|
||||
@ -712,6 +714,9 @@ cvf::Color3ubArray RimLegendConfig::colorArrayFromColorType(ColorRangesType colo
|
||||
case RimLegendConfig::ANGULAR:
|
||||
return RiaColorTables::angularPaletteColors().color3ubArray();
|
||||
break;
|
||||
case RimLegendConfig::STIMPLAN:
|
||||
return RiaColorTables::stimPlanPaletteColors().color3ubArray();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -746,6 +751,10 @@ void RimLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
||||
{
|
||||
bool hasStimPlanParent = false;
|
||||
RimStimPlanColors* stimPlanColors = nullptr;
|
||||
this->firstAncestorOrThisOfType(stimPlanColors);
|
||||
if (stimPlanColors) hasStimPlanParent = true;
|
||||
|
||||
bool isCategoryResult = false;
|
||||
{
|
||||
@ -798,6 +807,7 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
rangeTypes.push_back(WHITE_BLACK);
|
||||
rangeTypes.push_back(BLACK_WHITE);
|
||||
rangeTypes.push_back(ANGULAR);
|
||||
if (hasStimPlanParent) rangeTypes.push_back(STIMPLAN);
|
||||
|
||||
if (isCategoryResult)
|
||||
{
|
||||
@ -811,10 +821,14 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
||||
}
|
||||
else if (fieldNeedingOptions == &m_rangeMode)
|
||||
{
|
||||
if (!m_isAllTimeStepsRangeDisabled) {
|
||||
if (!m_isAllTimeStepsRangeDisabled)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_ALLTIMESTEPS), RimLegendConfig::AUTOMATIC_ALLTIMESTEPS));
|
||||
}
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP));
|
||||
if (!hasStimPlanParent)
|
||||
{
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP));
|
||||
}
|
||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED));
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,8 @@ public:
|
||||
BLUE_WHITE_RED,
|
||||
RED_WHITE_BLUE,
|
||||
CATEGORY,
|
||||
ANGULAR
|
||||
ANGULAR,
|
||||
STIMPLAN
|
||||
};
|
||||
|
||||
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
|
||||
|
Loading…
Reference in New Issue
Block a user