2015-08-27 16:13:49 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 13:17:36 +02:00
|
|
|
//
|
2015-08-27 16:13:49 +02:00
|
|
|
// 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.
|
2019-09-06 13:17:36 +02:00
|
|
|
//
|
2015-08-27 16:13:49 +02:00
|
|
|
// 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.
|
2019-09-06 13:17:36 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2015-08-27 16:13:49 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#include "RimWellLogPlot.h"
|
|
|
|
|
|
2017-04-19 13:31:46 +02:00
|
|
|
#include "RigWellLogCurveData.h"
|
2018-08-07 13:34:13 +02:00
|
|
|
#include "RigWellPath.h"
|
2017-04-19 13:31:46 +02:00
|
|
|
|
2018-07-16 08:56:28 +02:00
|
|
|
#include "RimEclipseCase.h"
|
2019-09-06 13:17:36 +02:00
|
|
|
#include "RimGeoMechCase.h"
|
2019-11-15 10:12:19 +01:00
|
|
|
#include "RimPlot.h"
|
2019-11-19 11:09:22 +01:00
|
|
|
#include "RimWellAllocationPlot.h"
|
2017-04-19 13:31:46 +02:00
|
|
|
#include "RimWellLogCurve.h"
|
2018-07-10 12:44:58 +02:00
|
|
|
#include "RimWellLogCurveCommonDataSource.h"
|
2015-11-04 16:14:42 +01:00
|
|
|
#include "RimWellLogTrack.h"
|
2015-08-27 16:43:54 +02:00
|
|
|
|
2019-12-19 11:37:40 +01:00
|
|
|
#include "RiuMultiPlotPage.h"
|
2018-04-27 06:28:08 +02:00
|
|
|
#include "RiuPlotMainWindow.h"
|
2019-10-10 13:33:57 +02:00
|
|
|
#include "RiuPlotMainWindowTools.h"
|
2019-10-11 15:54:19 +02:00
|
|
|
#include "RiuQwtPlotWidget.h"
|
2015-08-27 16:13:49 +02:00
|
|
|
#include "RiuWellLogPlot.h"
|
2015-08-28 11:32:25 +02:00
|
|
|
|
2020-03-10 14:11:22 +01:00
|
|
|
#include "cafPdmFieldIOScriptability.h"
|
|
|
|
|
#include "cafPdmObjectScriptability.h"
|
2018-06-26 16:23:06 +02:00
|
|
|
#include "cafPdmUiComboBoxEditor.h"
|
2020-01-09 15:04:39 +01:00
|
|
|
#include "cafPdmUiDoubleValueEditor.h"
|
2015-08-31 02:06:37 +02:00
|
|
|
#include "cvfAssert.h"
|
2015-08-28 11:32:25 +02:00
|
|
|
|
2018-09-05 11:04:42 +02:00
|
|
|
#include <QKeyEvent>
|
|
|
|
|
|
2019-01-10 16:16:49 +01:00
|
|
|
#include <cmath>
|
2015-09-01 15:15:54 +02:00
|
|
|
|
2015-09-04 14:14:56 +02:00
|
|
|
#define RI_LOGPLOT_MINDEPTH_DEFAULT 0.0
|
|
|
|
|
#define RI_LOGPLOT_MAXDEPTH_DEFAULT 1000.0
|
|
|
|
|
|
2020-02-24 15:42:23 +01:00
|
|
|
CAF_PDM_SOURCE_INIT( RimWellLogPlot, "WellLogPlot" );
|
2015-08-27 16:13:49 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 13:17:36 +02:00
|
|
|
///
|
2015-08-27 16:13:49 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
RimWellLogPlot::RimWellLogPlot()
|
|
|
|
|
{
|
2020-03-03 10:43:07 +01:00
|
|
|
CAF_PDM_InitScriptableObject( "Well Log Plot",
|
|
|
|
|
":/WellLogPlot16x16.png",
|
|
|
|
|
"",
|
|
|
|
|
"A Well Log Plot With a shared Depth Axis and Multiple Tracks" );
|
2020-05-18 16:02:27 +02:00
|
|
|
|
|
|
|
|
setDeletable( true );
|
2020-03-18 09:35:58 +01:00
|
|
|
}
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2020-03-18 09:35:58 +01:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
///
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
RimWellLogPlot::~RimWellLogPlot()
|
|
|
|
|
{
|
2015-08-27 16:13:49 +02:00
|
|
|
}
|
|
|
|
|
|
2019-09-04 15:51:44 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-04 19:29:44 +02:00
|
|
|
/// Move-assignment operator. Argument has to be passed with std::move()
|
2019-09-04 15:51:44 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 13:17:36 +02:00
|
|
|
RimWellLogPlot& RimWellLogPlot::operator=( RimWellLogPlot&& rhs )
|
2019-09-04 15:51:44 +02:00
|
|
|
{
|
2020-01-16 12:32:40 +01:00
|
|
|
RimPlotWindow::operator=( std::move( rhs ) );
|
|
|
|
|
|
|
|
|
|
// Move all tracks
|
|
|
|
|
std::vector<RimPlot*> plots = rhs.m_plots.childObjects();
|
|
|
|
|
rhs.m_plots.clear();
|
|
|
|
|
for ( RimPlot* plot : plots )
|
|
|
|
|
{
|
|
|
|
|
m_plots.push_back( plot );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Deliberately don't set m_plotWindowTitle. This operator is used for copying parameters from children.
|
|
|
|
|
// This only happens for some plots that used to own a plot but now inherits the plot.
|
|
|
|
|
// These all had their own description at top level which we don't want to overwrite.
|
|
|
|
|
|
|
|
|
|
m_showPlotWindowTitle = rhs.m_showPlotWindowTitle;
|
2019-09-06 10:59:04 +02:00
|
|
|
|
2019-09-04 15:51:44 +02:00
|
|
|
auto dataSource = rhs.m_commonDataSource();
|
2019-09-06 13:17:36 +02:00
|
|
|
rhs.m_commonDataSource.removeChildObject( dataSource );
|
|
|
|
|
m_commonDataSource = dataSource;
|
2019-09-04 15:51:44 +02:00
|
|
|
|
2019-09-06 13:17:36 +02:00
|
|
|
m_depthType = rhs.m_depthType();
|
|
|
|
|
m_depthUnit = rhs.m_depthUnit();
|
|
|
|
|
m_minVisibleDepth = rhs.m_minVisibleDepth();
|
|
|
|
|
m_maxVisibleDepth = rhs.m_maxVisibleDepth();
|
2019-09-04 15:51:44 +02:00
|
|
|
m_depthAxisGridVisibility = rhs.m_depthAxisGridVisibility();
|
|
|
|
|
m_isAutoScaleDepthEnabled = rhs.m_isAutoScaleDepthEnabled();
|
|
|
|
|
|
2020-01-08 14:08:58 +01:00
|
|
|
// Deliberately don't copy m_nameConfig. This operator is used for copying parameters from children.
|
|
|
|
|
// This only happens for some plots that used to own a plot but now inherits the plot.
|
|
|
|
|
// These all had their own description at top level which we don't want to overwrite.
|
2019-09-04 15:51:44 +02:00
|
|
|
|
|
|
|
|
m_minAvailableDepth = rhs.m_minAvailableDepth;
|
|
|
|
|
m_maxAvailableDepth = rhs.m_maxAvailableDepth;
|
|
|
|
|
return *this;
|
|
|
|
|
}
|