mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7928 Add user interface for exporting multiple well logs.
This commit is contained in:
@@ -60,9 +60,20 @@ caf::PdmObjectHandle* RimcWellLogPlot_newWellLogTrack::execute()
|
||||
|
||||
if ( !wellLogPlot ) return nullptr;
|
||||
|
||||
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, m_title, wellLogPlot );
|
||||
if ( m_case() ) plotTrack->setFormationCase( m_case );
|
||||
if ( m_wellPath() ) plotTrack->setFormationWellPath( m_wellPath );
|
||||
return createWellLogTrack( wellLogPlot, m_case(), m_wellPath(), m_title() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogTrack* RimcWellLogPlot_newWellLogTrack::createWellLogTrack( RimWellLogPlot* wellLogPlot,
|
||||
RimEclipseCase* eclipseCase,
|
||||
RimWellPath* wellPath,
|
||||
const QString& title )
|
||||
{
|
||||
RimWellLogTrack* plotTrack = RicNewWellLogPlotFeatureImpl::createWellLogPlotTrack( false, title, wellLogPlot );
|
||||
if ( eclipseCase ) plotTrack->setFormationCase( eclipseCase );
|
||||
if ( wellPath ) plotTrack->setFormationWellPath( wellPath );
|
||||
plotTrack->setColSpan( RimPlot::TWO );
|
||||
plotTrack->setLegendsVisible( true );
|
||||
plotTrack->setPlotTitleVisible( true );
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
class RimEclipseCase;
|
||||
class RimWellPath;
|
||||
class RimWellLogTrack;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -43,6 +44,11 @@ public:
|
||||
bool resultIsPersistent() const override;
|
||||
std::unique_ptr<PdmObjectHandle> defaultResult() const override;
|
||||
|
||||
static RimWellLogTrack* createWellLogTrack( RimWellLogPlot* wellLogPlot,
|
||||
RimEclipseCase* eclipseCase,
|
||||
RimWellPath* wellPath,
|
||||
const QString& title );
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_title;
|
||||
caf::PdmPtrField<RimEclipseCase*> m_case;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "RimcWellLogPlot.h"
|
||||
#include "WellLogCommands/RicNewWellLogPlotFeatureImpl.h"
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
@@ -64,20 +65,31 @@ caf::PdmObjectHandle* RimcWellLogPlotCollection_newWellLogPlot::execute()
|
||||
|
||||
if ( m_case && m_wellPath && wellLogPlotCollection )
|
||||
{
|
||||
newWellLogPlot = new RimWellLogPlot;
|
||||
newWellLogPlot->setAsPlotMdiWindow();
|
||||
|
||||
wellLogPlotCollection->addWellLogPlot( newWellLogPlot );
|
||||
|
||||
newWellLogPlot->commonDataSource()->setCaseToApply( m_case );
|
||||
newWellLogPlot->commonDataSource()->setWellPathToApply( m_wellPath );
|
||||
newWellLogPlot->loadDataAndUpdate();
|
||||
newWellLogPlot->updateConnectedEditors();
|
||||
newWellLogPlot = createWellLogPlot( wellLogPlotCollection, m_wellPath, m_case );
|
||||
}
|
||||
|
||||
return newWellLogPlot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlot* RimcWellLogPlotCollection_newWellLogPlot::createWellLogPlot( RimWellLogPlotCollection* wellLogPlotCollection,
|
||||
RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
RimWellLogPlot* newWellLogPlot = new RimWellLogPlot;
|
||||
newWellLogPlot->setAsPlotMdiWindow();
|
||||
|
||||
wellLogPlotCollection->addWellLogPlot( newWellLogPlot );
|
||||
|
||||
newWellLogPlot->commonDataSource()->setCaseToApply( eclipseCase );
|
||||
newWellLogPlot->commonDataSource()->setWellPathToApply( wellPath );
|
||||
newWellLogPlot->loadDataAndUpdate();
|
||||
newWellLogPlot->updateConnectedEditors();
|
||||
return newWellLogPlot;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -42,6 +42,10 @@ public:
|
||||
bool resultIsPersistent() const override;
|
||||
std::unique_ptr<PdmObjectHandle> defaultResult() const override;
|
||||
|
||||
static RimWellLogPlot* createWellLogPlot( RimWellLogPlotCollection* wellLogPlotCollection,
|
||||
RimWellPath* wellPath,
|
||||
RimEclipseCase* eclipseCase );
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimEclipseCase*> m_case;
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "RimcWellLogTrack.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
|
||||
#include "WellLogCommands/RicNewWellLogPlotFeatureImpl.h"
|
||||
@@ -61,37 +62,52 @@ caf::PdmObjectHandle* RimcWellLogTrack_addExtractionCurve::execute()
|
||||
|
||||
if ( m_case && m_wellPath && wellLogTrack )
|
||||
{
|
||||
RimWellLogExtractionCurve* curve = new RimWellLogExtractionCurve;
|
||||
curve->setWellPath( m_wellPath );
|
||||
curve->setCase( m_case );
|
||||
curve->setCurrentTimeStep( m_timeStep );
|
||||
curve->setEclipseResultVariable( m_propertyName );
|
||||
|
||||
RiaDefines::ResultCatType resultCategoryType = caf::AppEnum<RiaDefines::ResultCatType>::fromText( m_propertyType );
|
||||
curve->setEclipseResultCategory( resultCategoryType );
|
||||
|
||||
wellLogTrack->addCurve( curve );
|
||||
curve->loadDataAndUpdate( true );
|
||||
|
||||
curve->updateConnectedEditors();
|
||||
|
||||
wellLogTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
||||
wellLogTrack->setShowRegionLabels( true );
|
||||
wellLogTrack->setAutoScaleXEnabled( true );
|
||||
wellLogTrack->updateConnectedEditors();
|
||||
wellLogTrack->setShowWindow( true );
|
||||
|
||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||
|
||||
RimWellLogPlot* wellLogPlot = dynamic_cast<RimWellLogPlot*>( wellLogTrack->parentField() );
|
||||
if ( wellLogPlot ) wellLogPlot->loadDataAndUpdate();
|
||||
|
||||
return curve;
|
||||
return addExtractionCurve( wellLogTrack, m_case, m_wellPath, m_propertyName, resultCategoryType, m_timeStep );
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogExtractionCurve*
|
||||
RimcWellLogTrack_addExtractionCurve::addExtractionCurve( RimWellLogTrack* wellLogTrack,
|
||||
RimEclipseCase* eclipseCase,
|
||||
RimWellPath* wellPath,
|
||||
const QString& propertyName,
|
||||
RiaDefines::ResultCatType resultCategoryType,
|
||||
int timeStep )
|
||||
{
|
||||
RimWellLogExtractionCurve* curve = new RimWellLogExtractionCurve;
|
||||
curve->setWellPath( wellPath );
|
||||
curve->setCase( eclipseCase );
|
||||
curve->setCurrentTimeStep( timeStep );
|
||||
curve->setEclipseResultVariable( propertyName );
|
||||
|
||||
curve->setEclipseResultCategory( resultCategoryType );
|
||||
|
||||
wellLogTrack->addCurve( curve );
|
||||
curve->loadDataAndUpdate( true );
|
||||
|
||||
curve->updateConnectedEditors();
|
||||
|
||||
wellLogTrack->setXAxisGridVisibility( RimWellLogPlot::AXIS_GRID_MAJOR );
|
||||
wellLogTrack->setShowRegionLabels( true );
|
||||
wellLogTrack->setAutoScaleXEnabled( true );
|
||||
wellLogTrack->updateConnectedEditors();
|
||||
wellLogTrack->setShowWindow( true );
|
||||
|
||||
RiaApplication::instance()->project()->updateConnectedEditors();
|
||||
|
||||
RimWellLogPlot* wellLogPlot = dynamic_cast<RimWellLogPlot*>( wellLogTrack->parentField() );
|
||||
if ( wellLogPlot ) wellLogPlot->loadDataAndUpdate();
|
||||
|
||||
return curve;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObjectHandle.h"
|
||||
#include "cafPdmObjectMethod.h"
|
||||
@@ -27,6 +29,7 @@
|
||||
class RimEclipseCase;
|
||||
class RimWellPath;
|
||||
class RimWellLogTrack;
|
||||
class RimWellLogExtractionCurve;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -42,6 +45,13 @@ public:
|
||||
bool resultIsPersistent() const override;
|
||||
std::unique_ptr<PdmObjectHandle> defaultResult() const override;
|
||||
|
||||
static RimWellLogExtractionCurve* addExtractionCurve( RimWellLogTrack* wellLogTrack,
|
||||
RimEclipseCase* eclipseCase,
|
||||
RimWellPath* wellPath,
|
||||
const QString& propertyName,
|
||||
RiaDefines::ResultCatType resultCategoryType,
|
||||
int timeStep );
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimEclipseCase*> m_case;
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||
|
||||
Reference in New Issue
Block a user