mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#541) Added feature for export of well log plot curves to a LAS file
Did some refactoring/improvements by introducing new class RigWellLogCurveData.
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
|
||||
#include "RiuWellLogPlotCurve.h"
|
||||
|
||||
#include "RigWellLogCurveData.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -33,14 +36,6 @@ RiuWellLogPlotCurve::~RiuWellLogPlotCurve()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlotCurve::setPlotIntervals(const std::vector<std::pair<size_t, size_t> >& intervals)
|
||||
{
|
||||
m_intervals = intervals;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -58,3 +53,17 @@ void RiuWellLogPlotCurve::drawCurve(QPainter* p, int style,
|
||||
}
|
||||
else QwtPlotCurve::drawCurve(p, style, xMap, yMap, canvasRect, from, to);
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlotCurve::setCurveData(const RigWellLogCurveData* curveData)
|
||||
{
|
||||
CVF_ASSERT(curveData);
|
||||
|
||||
std::vector<double> validXValues = curveData->validXValues();
|
||||
std::vector<double> validYValues = curveData->validYValues();
|
||||
|
||||
setSamples(validXValues.data(), validYValues.data(), (int) validXValues.size());
|
||||
m_intervals = curveData->validPointsIntervals();
|
||||
}
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigWellLogCurveData;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@@ -30,10 +32,11 @@
|
||||
class RiuWellLogPlotCurve : public QwtPlotCurve
|
||||
{
|
||||
public:
|
||||
|
||||
RiuWellLogPlotCurve();
|
||||
virtual ~RiuWellLogPlotCurve();
|
||||
|
||||
void setPlotIntervals(const std::vector<std::pair<size_t, size_t> >& intervals);
|
||||
void setCurveData(const RigWellLogCurveData* curveData);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -42,5 +45,5 @@ protected:
|
||||
const QRectF& canvasRect, int from, int to) const;
|
||||
|
||||
private:
|
||||
std::vector< std::pair<size_t, size_t> > m_intervals;
|
||||
std::vector< std::pair<size_t, size_t> > m_intervals;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user