ResInsight/ApplicationCode/ProjectDataModel/RimWellLogCurve.cpp

110 lines
3.5 KiB
C++
Raw Normal View History

/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
2015-11-04 09:22:53 -06:00
#include "RimWellLogCurve.h"
#include "RigWellLogCurveData.h"
#include "RimWellLogPlot.h"
#include "RimWellLogTrack.h"
2015-09-22 04:17:24 -05:00
#include "RiuQwtPlotCurve.h"
#include "RiuWellLogTrack.h"
2015-12-01 09:22:18 -06:00
#include "cafPdmUiComboBoxEditor.h"
#include "cvfAssert.h"
#include "qwt_symbol.h"
2015-09-18 06:02:33 -05:00
// NB! Special macro for pure virtual class
2015-11-04 09:19:38 -06:00
CAF_PDM_XML_ABSTRACT_SOURCE_INIT(RimWellLogCurve, "WellLogPlotCurve");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
2015-11-04 09:19:38 -06:00
RimWellLogCurve::RimWellLogCurve()
{
CAF_PDM_InitObject("WellLogCurve", ":/WellLogCurve16x16.png", "", "");
m_qwtPlotCurve->setXAxis(QwtPlot::xTop);
m_qwtPlotCurve->setYAxis(QwtPlot::yLeft);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogCurve::~RimWellLogCurve()
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
2015-11-04 09:19:38 -06:00
bool RimWellLogCurve::valueRange(double* minimumValue, double* maximumValue) const
{
return xValueRange(minimumValue, maximumValue);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RigWellLogCurveData* RimWellLogCurve::curveData() const
{
return m_curveData.p();
}
2015-09-22 04:17:24 -05:00
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::updateZoomInParentPlot()
2015-09-22 04:17:24 -05:00
{
RimWellLogPlot* wellLogPlot;
firstAncestorOrThisOfType(wellLogPlot);
if (wellLogPlot)
2015-09-22 04:17:24 -05:00
{
wellLogPlot->calculateAvailableDepthRange();
wellLogPlot->updateDepthZoom();
}
RimWellLogTrack* plotTrack;
firstAncestorOrThisOfType(plotTrack);
if (plotTrack)
{
plotTrack->calculateXZoomRangeAndUpdateQwt();
2015-09-22 04:17:24 -05:00
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogCurve::updateLegendsInPlot()
{
RimWellLogTrack* wellLogTrack;
firstAncestorOrThisOfType(wellLogTrack);
if (wellLogTrack)
{
wellLogTrack->updateAllLegendItems();
}
}