mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -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;
|
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& redWhiteBluePaletteColors();
|
||||||
static const caf::ColorTable& categoryPaletteColors();
|
static const caf::ColorTable& categoryPaletteColors();
|
||||||
static const caf::ColorTable& angularPaletteColors();
|
static const caf::ColorTable& angularPaletteColors();
|
||||||
|
static const caf::ColorTable& stimPlanPaletteColors();
|
||||||
static const caf::ColorTable& faultsPaletteColors();
|
static const caf::ColorTable& faultsPaletteColors();
|
||||||
static const caf::ColorTable& wellsPaletteColors();
|
static const caf::ColorTable& wellsPaletteColors();
|
||||||
static const caf::ColorTable& summaryCurveDefaultPaletteColors();
|
static const caf::ColorTable& summaryCurveDefaultPaletteColors();
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
#include "RimEclipseCellColors.h"
|
#include "RimEclipseCellColors.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimGeoMechResultDefinition.h"
|
#include "RimGeoMechResultDefinition.h"
|
||||||
|
#include "RimStimPlanColors.h"
|
||||||
#include "RimViewLinker.h"
|
#include "RimViewLinker.h"
|
||||||
|
|
||||||
#include "cafCategoryLegend.h"
|
#include "cafCategoryLegend.h"
|
||||||
@ -75,6 +76,7 @@ namespace caf {
|
|||||||
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
|
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
|
||||||
addItem(RimLegendConfig::CATEGORY, "CATEGORY", "Category colors");
|
addItem(RimLegendConfig::CATEGORY, "CATEGORY", "Category colors");
|
||||||
addItem(RimLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic");
|
addItem(RimLegendConfig::ANGULAR, "ANGULAR", "Full color cyclic");
|
||||||
|
addItem(RimLegendConfig::STIMPLAN, "STIMPLAN", "StimPlan colors");
|
||||||
setDefault(RimLegendConfig::NORMAL);
|
setDefault(RimLegendConfig::NORMAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -712,6 +714,9 @@ cvf::Color3ubArray RimLegendConfig::colorArrayFromColorType(ColorRangesType colo
|
|||||||
case RimLegendConfig::ANGULAR:
|
case RimLegendConfig::ANGULAR:
|
||||||
return RiaColorTables::angularPaletteColors().color3ubArray();
|
return RiaColorTables::angularPaletteColors().color3ubArray();
|
||||||
break;
|
break;
|
||||||
|
case RimLegendConfig::STIMPLAN:
|
||||||
|
return RiaColorTables::stimPlanPaletteColors().color3ubArray();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -746,6 +751,10 @@ void RimLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
|
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;
|
bool isCategoryResult = false;
|
||||||
{
|
{
|
||||||
@ -798,6 +807,7 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
|||||||
rangeTypes.push_back(WHITE_BLACK);
|
rangeTypes.push_back(WHITE_BLACK);
|
||||||
rangeTypes.push_back(BLACK_WHITE);
|
rangeTypes.push_back(BLACK_WHITE);
|
||||||
rangeTypes.push_back(ANGULAR);
|
rangeTypes.push_back(ANGULAR);
|
||||||
|
if (hasStimPlanParent) rangeTypes.push_back(STIMPLAN);
|
||||||
|
|
||||||
if (isCategoryResult)
|
if (isCategoryResult)
|
||||||
{
|
{
|
||||||
@ -811,10 +821,14 @@ QList<caf::PdmOptionItemInfo> RimLegendConfig::calculateValueOptions(const caf::
|
|||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_rangeMode)
|
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_ALLTIMESTEPS), RimLegendConfig::AUTOMATIC_ALLTIMESTEPS));
|
||||||
}
|
}
|
||||||
|
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::AUTOMATIC_CURRENT_TIMESTEP), RimLegendConfig::AUTOMATIC_CURRENT_TIMESTEP));
|
||||||
|
}
|
||||||
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED));
|
options.push_back(caf::PdmOptionItemInfo(RangeModeEnum::uiText(RimLegendConfig::USER_DEFINED), RimLegendConfig::USER_DEFINED));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,7 +81,8 @@ public:
|
|||||||
BLUE_WHITE_RED,
|
BLUE_WHITE_RED,
|
||||||
RED_WHITE_BLUE,
|
RED_WHITE_BLUE,
|
||||||
CATEGORY,
|
CATEGORY,
|
||||||
ANGULAR
|
ANGULAR,
|
||||||
|
STIMPLAN
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
|
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
|
||||||
|
Loading…
Reference in New Issue
Block a user