#5472 Improve visualisation of water depth

This commit is contained in:
Gaute Lindkvist
2020-02-07 15:20:19 +01:00
parent dfe6d0b94e
commit 2949d3458d
4 changed files with 17 additions and 10 deletions

View File

@@ -50,7 +50,8 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames /*= true */,
TrackSpan trackSpan /*= FULL_WIDTH*/ )
TrackSpan trackSpan /*= FULL_WIDTH*/,
const std::vector<Qt::BrushStyle>& brushStyles /* = {}*/ )
{
if ( names.size() != yPositions.size() ) return;
m_plot = plot;
@@ -66,12 +67,10 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
for ( size_t i = 0; i < names.size(); i++ )
{
if ( names[i].isEmpty() ) continue;
QwtPlotMarker* line( new QwtPlotMarker() );
QString name;
if ( showNames )
if ( showNames && !names[i].isEmpty() )
{
name = names[i];
if ( ( regionDisplay & COLOR_SHADING ) == 0 && names[i].toLower().indexOf( "top" ) == -1 )
@@ -88,7 +87,12 @@ void RiuPlotAnnotationTool::attachNamedRegions( QwtPlot*
shading->setOrientation( Qt::Horizontal );
shading->setInterval( yPositions[i].first, yPositions[i].second );
shading->setPen( shadingColor, 0.0, Qt::NoPen );
shading->setBrush( QBrush( shadingColor ) );
QBrush brush( shadingColor );
if ( i < brushStyles.size() )
{
brush.setStyle( brushStyles[i] );
}
shading->setBrush( brush );
shading->attach( m_plot );
shading->setZ( -100.0 );
shading->setXAxis( QwtPlot::xTop );

View File

@@ -66,8 +66,9 @@ public:
RegionDisplay regionDisplay,
const caf::ColorTable& colorTable,
int shadingAlphaByte,
bool showNames = true,
TrackSpan trackSpan = FULL_WIDTH );
bool showNames = true,
TrackSpan trackSpan = FULL_WIDTH,
const std::vector<Qt::BrushStyle>& brushStyles = {} );
void attachWellPicks( QwtPlot* plot, const std::vector<QString>& names, const std::vector<double>& yPositions );
void attachAnnotationLine( QwtPlot* plot, const QColor& color, const QString& annotationText, const double yPosition );