(#396) Added fields for min and max depths to the well log plot

Changing those fields will cause all well trace plots to be updated
accordingly.
This commit is contained in:
Pål Hagen
2015-08-31 17:21:21 +02:00
parent 65f0c5fb42
commit 0133659e05
6 changed files with 35 additions and 1 deletions

View File

@@ -59,3 +59,14 @@ RiuWellLogTracePlot* RiuWellLogPlot::createTracePlot()
return tracePlot;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogPlot::setDepthRange(double minDepth, double maxDepth)
{
for (int tpIdx = 0; tpIdx < m_tracePlots.count(); tpIdx++)
{
m_tracePlots[tpIdx]->setDepthRange(minDepth, maxDepth);
}
}

View File

@@ -41,6 +41,8 @@ public:
RiuWellLogTracePlot* createTracePlot();
void setDepthRange(double minDepth, double maxDepth);
private:
void setDefults();

View File

@@ -62,7 +62,6 @@ RiuWellLogTracePlot::~RiuWellLogTracePlot()
delete m_grid;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -92,3 +91,13 @@ void RiuWellLogTracePlot::setDefaults()
axisScaleEngine(QwtPlot::yLeft)->setAttribute(QwtScaleEngine::Inverted, true);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuWellLogTracePlot::setDepthRange(double minDepth, double maxDepth)
{
// Note: Y-axis is inverted
setAxisScale(QwtPlot::yLeft, maxDepth, minDepth);
replot();
}

View File

@@ -37,6 +37,8 @@ public:
RiuWellLogTracePlot(QWidget* parent = NULL);
virtual ~RiuWellLogTracePlot();
void setDepthRange(double minDepth, double maxDepth);
private:
void setDefaults();