2015-08-27 16:13:49 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
2019-09-06 10:40:57 +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 10:40:57 +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 10:40:57 +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 "RicNewWellLogPlotFeature.h"
|
|
|
|
|
|
2015-09-21 14:02:33 +02:00
|
|
|
#include "RicNewWellLogCurveExtractionFeature.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "RicNewWellLogFileCurveFeature.h"
|
|
|
|
|
#include "RicNewWellLogPlotFeatureImpl.h"
|
2015-09-15 18:21:38 +02:00
|
|
|
|
2015-08-28 10:42:57 +02:00
|
|
|
#include "RimProject.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "RimWellLogCurve.h"
|
2019-09-11 15:54:59 +02:00
|
|
|
#include "RimWellLogExtractionCurve.h"
|
2015-09-03 09:46:26 +02:00
|
|
|
#include "RimWellLogPlot.h"
|
2015-11-04 16:14:42 +01:00
|
|
|
#include "RimWellLogTrack.h"
|
2015-09-21 14:02:33 +02:00
|
|
|
|
2017-10-09 14:30:27 +02:00
|
|
|
#include "RicWellLogTools.h"
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
#include <QAction>
|
|
|
|
|
|
2015-09-07 10:44:48 +02:00
|
|
|
#include "cvfAssert.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
CAF_CMD_SOURCE_INIT( RicNewWellLogPlotFeature, "RicNewWellLogPlotFeature" );
|
2015-08-27 16:13:49 +02:00
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-08-27 16:13:49 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
|
bool RicNewWellLogPlotFeature::isCommandEnabled()
|
|
|
|
|
{
|
2015-09-07 10:44:48 +02:00
|
|
|
return true;
|
2015-08-27 16:13:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-08-27 16:13:49 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RicNewWellLogPlotFeature::onActionTriggered( bool isChecked )
|
2015-08-27 16:13:49 +02:00
|
|
|
{
|
2019-09-11 15:54:59 +02:00
|
|
|
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack();
|
2019-10-09 09:21:28 +02:00
|
|
|
RimWellLogExtractionCurve* curve =
|
|
|
|
|
RicWellLogTools::addWellLogExtractionCurve( plotTrack, nullptr, nullptr, nullptr, nullptr, -1, true );
|
2019-09-11 15:54:59 +02:00
|
|
|
curve->loadDataAndUpdate( true );
|
2019-09-11 12:51:25 +02:00
|
|
|
RimWellLogPlot* plot = nullptr;
|
|
|
|
|
plotTrack->firstAncestorOrThisOfTypeAsserted( plot );
|
|
|
|
|
plot->zoomAll();
|
2015-08-27 16:13:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
///
|
2015-08-27 16:13:49 +02:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 10:40:57 +02:00
|
|
|
void RicNewWellLogPlotFeature::setupActionLook( QAction* actionToSetup )
|
2015-08-27 16:13:49 +02:00
|
|
|
{
|
2019-09-06 10:40:57 +02:00
|
|
|
actionToSetup->setText( "New Well Log Plot" );
|
|
|
|
|
actionToSetup->setIcon( QIcon( ":/WellLogPlot16x16.png" ) );
|
2015-08-27 16:13:49 +02:00
|
|
|
}
|