mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5472 Improve visualisation of water depth
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user