mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3297 Make casing shoe a right-angled triangle and refactor symbols
* Put plot symbol enum inside the symbol class. * Put line style enums inside the line class. * Add custom capability.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaSummaryCurveDefinition.h"
|
||||
#include "RiuQwtPlotCurve.h"
|
||||
|
||||
#include "RimSummaryCurve.h"
|
||||
#include "RimSummaryCase.h"
|
||||
@@ -191,11 +192,11 @@ std::map<std::string, size_t> RimSummaryCurveAppearanceCalculator::mapNameToAppe
|
||||
}
|
||||
else if (appearance == CurveAppearanceType::SYMBOL)
|
||||
{
|
||||
numOptions = caf::AppEnum<RimPlotCurve::PointSymbolEnum>::size() - 1; // -1 since the No symbol option is not counted see cycledSymbol()
|
||||
numOptions = caf::AppEnum<RiuQwtSymbol::PointSymbolEnum>::size() - 1; // -1 since the No symbol option is not counted see cycledSymbol()
|
||||
}
|
||||
else if (appearance == CurveAppearanceType::LINE_STYLE)
|
||||
{
|
||||
numOptions = caf::AppEnum<RimPlotCurve::LineStyleEnum>::size() - 1; // -1 since the No symbol option is not counted see cycledLineStyle()
|
||||
numOptions = caf::AppEnum<RiuQwtPlotCurve::LineStyleEnum>::size() - 1; // -1 since the No symbol option is not counted see cycledLineStyle()
|
||||
}
|
||||
else {
|
||||
// If none of these styles are used, fall back to a simply incrementing index
|
||||
@@ -452,21 +453,21 @@ cvf::Color3f RimSummaryCurveAppearanceCalculator::cycledBrownColor(int colorInde
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCurve::LineStyleEnum RimSummaryCurveAppearanceCalculator::cycledLineStyle(int index)
|
||||
RiuQwtPlotCurve::LineStyleEnum RimSummaryCurveAppearanceCalculator::cycledLineStyle(int index)
|
||||
{
|
||||
if (index < 0) return RimPlotCurve::STYLE_SOLID;
|
||||
if (index < 0) return RiuQwtPlotCurve::STYLE_SOLID;
|
||||
|
||||
return caf::AppEnum<RimPlotCurve::LineStyleEnum>::fromIndex(1 + (index % (caf::AppEnum<RimPlotCurve::LineStyleEnum>::size() - 1)));
|
||||
return caf::AppEnum<RiuQwtPlotCurve::LineStyleEnum>::fromIndex(1 + (index % (caf::AppEnum<RiuQwtPlotCurve::LineStyleEnum>::size() - 1)));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPlotCurve::PointSymbolEnum RimSummaryCurveAppearanceCalculator::cycledSymbol(int index)
|
||||
RiuQwtSymbol::PointSymbolEnum RimSummaryCurveAppearanceCalculator::cycledSymbol(int index)
|
||||
{
|
||||
if (index < 0) return RimPlotCurve::SYMBOL_NONE;
|
||||
if (index < 0) return RiuQwtSymbol::SYMBOL_NONE;
|
||||
|
||||
return caf::AppEnum<RimPlotCurve::PointSymbolEnum>::fromIndex(1 + (index % (caf::AppEnum<RimPlotCurve::PointSymbolEnum>::size() - 1)));
|
||||
return caf::AppEnum<RiuQwtSymbol::PointSymbolEnum>::fromIndex(1 + (index % (caf::AppEnum<RiuQwtSymbol::PointSymbolEnum>::size() - 1)));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user