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:
@@ -26,7 +26,7 @@
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
#include "RiuLineSegmentQwtPlotCurve.h"
|
||||
#include "RiuQwtPlotCurve.h"
|
||||
|
||||
#include "qwt_plot.h"
|
||||
|
||||
|
||||
@@ -725,7 +725,7 @@ void RimWellPltPlot::addStackedCurve(const QString& curveName,
|
||||
if (curveGroupId == 0)
|
||||
{
|
||||
curve->setDoFillCurve(true);
|
||||
curve->setSymbol(RimPlotCurve::SYMBOL_NONE);
|
||||
curve->setSymbol(RiuQwtSymbol::SYMBOL_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user