#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:
Gaute Lindkvist
2018-09-04 09:08:29 +02:00
parent e3baaa4133
commit 12484bf1e9
35 changed files with 468 additions and 361 deletions

View File

@@ -141,25 +141,25 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
std::vector<cvf::Color3f> colorTable;
RiaColorTables::summaryCurveDefaultPaletteColors().color3fArray().toStdVector(&colorTable);
std::vector<RimPlotCurve::PointSymbolEnum> symbolTable = {RimPlotCurve::SYMBOL_ELLIPSE,
RimPlotCurve::SYMBOL_RECT,
RimPlotCurve::SYMBOL_DIAMOND,
RimPlotCurve::SYMBOL_TRIANGLE,
RimPlotCurve::SYMBOL_CROSS,
RimPlotCurve::SYMBOL_XCROSS};
std::vector<RiuQwtSymbol::PointSymbolEnum> symbolTable = {RiuQwtSymbol::SYMBOL_ELLIPSE,
RiuQwtSymbol::SYMBOL_RECT,
RiuQwtSymbol::SYMBOL_DIAMOND,
RiuQwtSymbol::SYMBOL_TRIANGLE,
RiuQwtSymbol::SYMBOL_CROSS,
RiuQwtSymbol::SYMBOL_XCROSS};
// State variables
static size_t defaultColorTableIndex = 0;
static size_t defaultSymbolTableIndex = 0;
cvf::Color3f currentColor;
RimPlotCurve::PointSymbolEnum currentSymbol = symbolTable.front();
RimPlotCurve::LineStyleEnum currentLineStyle = RimPlotCurve::STYLE_SOLID;
RiuQwtSymbol::PointSymbolEnum currentSymbol = symbolTable.front();
RiuQwtPlotCurve::LineStyleEnum currentLineStyle = RiuQwtPlotCurve::STYLE_SOLID;
bool isCurrentColorSet = false;
bool isCurrentSymbolSet = false;
std::set<cvf::Color3f> assignedColors;
std::set<RimPlotCurve::PointSymbolEnum> assignedSymbols;
std::set<RiuQwtSymbol::PointSymbolEnum> assignedSymbols;
// Used colors and symbols
for (RimWellLogCurve* const curve : m_wellLogPlot->trackByIndex(0)->curvesVector())
@@ -220,8 +220,8 @@ void RimWellRftPlot::applyCurveAppearance(RimWellLogCurve* newCurve)
}
// Observed data
currentLineStyle = newCurveDef.address().sourceType() == RifDataSourceForRftPlt::OBSERVED ? RimPlotCurve::STYLE_NONE
: RimPlotCurve::STYLE_SOLID;
currentLineStyle = newCurveDef.address().sourceType() == RifDataSourceForRftPlt::OBSERVED ? RiuQwtPlotCurve::STYLE_NONE
: RiuQwtPlotCurve::STYLE_SOLID;
newCurve->setColor(currentColor);
newCurve->setSymbol(currentSymbol);