Refactor: rename WellLogFileChannel to WellLogChannel.

This commit is contained in:
Kristian Bendiksen 2024-05-27 12:09:47 +02:00
parent 9858d09a33
commit c1aba471f2
30 changed files with 82 additions and 83 deletions

View File

@ -24,7 +24,7 @@
#include "RimOilField.h" #include "RimOilField.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellPath.h" #include "RimWellPath.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"

View File

@ -31,9 +31,9 @@
#include "RimSimWellInView.h" #include "RimSimWellInView.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimWellLogCalculatedCurve.h" #include "RimWellLogCalculatedCurve.h"
#include "RimWellLogChannel.h"
#include "RimWellLogCurveCommonDataSource.h" #include "RimWellLogCurveCommonDataSource.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogRftCurve.h" #include "RimWellLogRftCurve.h"
@ -136,21 +136,21 @@ bool RicWellLogTools::isWellPathOrSimWellSelectedInView()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicWellLogTools::addWellLogChannelsToPlotTrack( RimWellLogTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels ) void RicWellLogTools::addWellLogChannelsToPlotTrack( RimWellLogTrack* plotTrack, const std::vector<RimWellLogChannel*>& wellLogChannels )
{ {
for ( size_t cIdx = 0; cIdx < wellLogFileChannels.size(); cIdx++ ) for ( RimWellLogChannel* wellLogChannel : wellLogChannels )
{ {
RimWellLogLasFileCurve* plotCurve = RicWellLogTools::addFileCurve( plotTrack ); RimWellLogLasFileCurve* plotCurve = RicWellLogTools::addFileCurve( plotTrack );
RimWellPath* wellPath = wellLogFileChannels[cIdx]->firstAncestorOrThisOfType<RimWellPath>(); RimWellPath* wellPath = wellLogChannel->firstAncestorOrThisOfType<RimWellPath>();
RimWellLogLasFile* wellLogFile = wellLogFileChannels[cIdx]->firstAncestorOrThisOfType<RimWellLogLasFile>(); RimWellLogLasFile* wellLogFile = wellLogChannel->firstAncestorOrThisOfType<RimWellLogLasFile>();
if ( wellPath ) if ( wellPath )
{ {
if ( wellLogFile ) plotCurve->setWellLogFile( wellLogFile ); if ( wellLogFile ) plotCurve->setWellLogFile( wellLogFile );
plotCurve->setWellPath( wellPath ); plotCurve->setWellPath( wellPath );
plotCurve->setWellLogChannelName( wellLogFileChannels[cIdx]->name() ); plotCurve->setWellLogChannelName( wellLogChannel->name() );
plotCurve->loadDataAndUpdate( true ); plotCurve->loadDataAndUpdate( true );
plotCurve->updateConnectedEditors(); plotCurve->updateConnectedEditors();
} }

View File

@ -29,7 +29,7 @@ class RimSimWellInView;
class Rim3dView; class Rim3dView;
class Rim3dWellLogCurveCollection; class Rim3dWellLogCurveCollection;
class RimWellLogExtractionCurve; class RimWellLogExtractionCurve;
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellLogLasFileCurve; class RimWellLogLasFileCurve;
class RimWellLogRftCurve; class RimWellLogRftCurve;
class RimWellLogTrack; class RimWellLogTrack;
@ -50,7 +50,7 @@ public:
static bool hasRftData(); static bool hasRftData();
static bool hasRftDataForWell( const QString& wellName ); static bool hasRftDataForWell( const QString& wellName );
static bool isWellPathOrSimWellSelectedInView(); static bool isWellPathOrSimWellSelectedInView();
static void addWellLogChannelsToPlotTrack( RimWellLogTrack* plotTrack, const std::vector<RimWellLogFileChannel*>& wellLogFileChannels ); static void addWellLogChannelsToPlotTrack( RimWellLogTrack* plotTrack, const std::vector<RimWellLogChannel*>& wellLogFileChannels );
static RimWellPath* selectedWellPathWithLogFile(); static RimWellPath* selectedWellPathWithLogFile();
static RimWellPath* findWellPathWithLogFileFromSelection(); static RimWellPath* findWellPathWithLogFileFromSelection();
static RimWellLogRftCurve* addRftCurve( RimWellLogTrack* plotTrack, const RimSimWellInView* simWell, bool showPlotWindow = true ); static RimWellLogRftCurve* addRftCurve( RimWellLogTrack* plotTrack, const RimSimWellInView* simWell, bool showPlotWindow = true );

View File

@ -24,7 +24,7 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimProject.h" #include "RimProject.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT( RicAddWellLogToPlotFeature, "RicAddWellLogToPlotFeature" );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicAddWellLogToPlotFeature::isCommandEnabled() const bool RicAddWellLogToPlotFeature::isCommandEnabled() const
{ {
std::vector<RimWellLogFileChannel*> selection = selectedWellLogs(); std::vector<RimWellLogChannel*> selection = selectedWellLogs();
return !selection.empty(); return !selection.empty();
} }
@ -58,7 +58,7 @@ bool RicAddWellLogToPlotFeature::isCommandEnabled() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked ) void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
{ {
std::vector<RimWellLogFileChannel*> selection = selectedWellLogs(); std::vector<RimWellLogChannel*> selection = selectedWellLogs();
if ( selection.empty() ) return; if ( selection.empty() ) return;
RimWellLogPlot* plot = RicNewWellLogPlotFeatureImpl::createWellLogPlot(); RimWellLogPlot* plot = RicNewWellLogPlotFeatureImpl::createWellLogPlot();
@ -71,7 +71,7 @@ void RicAddWellLogToPlotFeature::onActionTriggered( bool isChecked )
for ( size_t wlIdx = 0; wlIdx < selection.size(); wlIdx++ ) for ( size_t wlIdx = 0; wlIdx < selection.size(); wlIdx++ )
{ {
RimWellLogFileChannel* wellLog = selection[wlIdx]; RimWellLogChannel* wellLog = selection[wlIdx];
auto wellPath = wellLog->firstAncestorOrThisOfType<RimWellPath>(); auto wellPath = wellLog->firstAncestorOrThisOfType<RimWellPath>();
auto wellLogFile = wellLog->firstAncestorOrThisOfType<RimWellLogLasFile>(); auto wellLogFile = wellLog->firstAncestorOrThisOfType<RimWellLogLasFile>();
@ -116,9 +116,9 @@ void RicAddWellLogToPlotFeature::setupActionLook( QAction* actionToSetup )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<RimWellLogFileChannel*> RicAddWellLogToPlotFeature::selectedWellLogs() std::vector<RimWellLogChannel*> RicAddWellLogToPlotFeature::selectedWellLogs()
{ {
std::vector<RimWellLogFileChannel*> selection; std::vector<RimWellLogChannel*> selection;
caf::SelectionManager::instance()->objectsByType( &selection ); caf::SelectionManager::instance()->objectsByType( &selection );
return selection; return selection;
} }

View File

@ -26,7 +26,7 @@
class RimMainPlotCollection; class RimMainPlotCollection;
class RimWellLogPlotCollection; class RimWellLogPlotCollection;
class RimWellLogPlot; class RimWellLogPlot;
class RimWellLogFileChannel; class RimWellLogChannel;
//================================================================================================== //==================================================================================================
/// ///
@ -41,5 +41,5 @@ protected:
void setupActionLook( QAction* actionToSetup ) override; void setupActionLook( QAction* actionToSetup ) override;
private: private:
static std::vector<RimWellLogFileChannel*> selectedWellLogs(); static std::vector<RimWellLogChannel*> selectedWellLogs();
}; };

View File

@ -35,8 +35,8 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellBoreStabilityPlot.h" #include "RimWellBoreStabilityPlot.h"
#include "RimWellLogChannel.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogPlotCollection.h" #include "RimWellLogPlotCollection.h"

View File

@ -24,7 +24,7 @@
#include "RicWellLogTools.h" #include "RicWellLogTools.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogTrack.h" #include "RimWellLogTrack.h"

View File

@ -37,8 +37,8 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseCollection.h"
#include "RimWellLogChannel.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogRftCurve.h" #include "RimWellLogRftCurve.h"
@ -80,7 +80,7 @@ public:
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimWellPlotTools::hasPressureData( const RimWellLogFile* wellLogFile ) bool RimWellPlotTools::hasPressureData( const RimWellLogFile* wellLogFile )
{ {
for ( RimWellLogFileChannel* const wellLogChannel : wellLogFile->wellLogChannels() ) for ( RimWellLogChannel* const wellLogChannel : wellLogFile->wellLogChannels() )
{ {
if ( isPressureChannel( wellLogChannel ) ) return true; if ( isPressureChannel( wellLogChannel ) ) return true;
} }
@ -125,7 +125,7 @@ std::pair<RigEclipseResultAddress, QString> RimWellPlotTools::pressureResultData
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimWellPlotTools::isPressureChannel( RimWellLogFileChannel* channel ) bool RimWellPlotTools::isPressureChannel( RimWellLogChannel* channel )
{ {
for ( const auto& pressureDataName : PRESSURE_DATA_NAMES ) for ( const auto& pressureDataName : PRESSURE_DATA_NAMES )
{ {
@ -146,7 +146,7 @@ bool RimWellPlotTools::hasPressureData( RimEclipseResultCase* gridCase )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimWellPlotTools::hasFlowData( const RimWellLogFile* wellLogFile ) bool RimWellPlotTools::hasFlowData( const RimWellLogFile* wellLogFile )
{ {
for ( RimWellLogFileChannel* const wellLogChannel : wellLogFile->wellLogChannels() ) for ( RimWellLogChannel* const wellLogChannel : wellLogFile->wellLogChannels() )
{ {
if ( isFlowChannel( wellLogChannel ) ) return true; if ( isFlowChannel( wellLogChannel ) ) return true;
} }
@ -182,7 +182,7 @@ bool RimWellPlotTools::hasAssociatedWellPath( const QString& wellName )
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RimWellPlotTools::isFlowChannel( RimWellLogFileChannel* channel ) bool RimWellPlotTools::isFlowChannel( RimWellLogChannel* channel )
{ {
return tryMatchChannelName( FLOW_DATA_NAMES, channel->name() ); return tryMatchChannelName( FLOW_DATA_NAMES, channel->name() );
} }
@ -297,11 +297,11 @@ std::vector<RimWellLogFile*> RimWellPlotTools::wellLogFilesContainingPressure( c
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogFileChannel* RimWellPlotTools::getPressureChannelFromWellFile( const RimWellLogFile* wellLogFile ) RimWellLogChannel* RimWellPlotTools::getPressureChannelFromWellFile( const RimWellLogFile* wellLogFile )
{ {
if ( wellLogFile != nullptr ) if ( wellLogFile != nullptr )
{ {
for ( RimWellLogFileChannel* const channel : wellLogFile->wellLogChannels() ) for ( RimWellLogChannel* const channel : wellLogFile->wellLogChannels() )
{ {
if ( isPressureChannel( channel ) ) if ( isPressureChannel( channel ) )
{ {

View File

@ -36,7 +36,7 @@ class RimEclipseResultCase;
class RimObservedFmuRftData; class RimObservedFmuRftData;
class RimSummaryCaseCollection; class RimSummaryCaseCollection;
class RimWellLogCurve; class RimWellLogCurve;
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellLogPlot; class RimWellLogPlot;
class RimWellPath; class RimWellPath;
class RimPressureDepthData; class RimPressureDepthData;
@ -87,7 +87,7 @@ public:
static void addTimeStepsToMap( std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& destMap, static void addTimeStepsToMap( std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& destMap,
const std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& timeStepsToAdd ); const std::map<QDateTime, std::set<RifDataSourceForRftPlt>>& timeStepsToAdd );
static std::vector<RimWellLogFile*> wellLogFilesContainingPressure( const QString& wellPathNameOrSimWellName ); static std::vector<RimWellLogFile*> wellLogFilesContainingPressure( const QString& wellPathNameOrSimWellName );
static RimWellLogFileChannel* getPressureChannelFromWellFile( const RimWellLogFile* wellLogFile ); static RimWellLogChannel* getPressureChannelFromWellFile( const RimWellLogFile* wellLogFile );
static RimWellPath* wellPathFromWellLogFile( const RimWellLogFile* wellLogFile ); static RimWellPath* wellPathFromWellLogFile( const RimWellLogFile* wellLogFile );
static std::map<QDateTime, std::set<RifDataSourceForRftPlt>> timeStepsMapFromGridCase( RimEclipseCase* gridCase ); static std::map<QDateTime, std::set<RifDataSourceForRftPlt>> timeStepsMapFromGridCase( RimEclipseCase* gridCase );
static RiaRftPltCurveDefinition curveDefFromCurve( const RimWellLogCurve* curve ); static RiaRftPltCurveDefinition curveDefFromCurve( const RimWellLogCurve* curve );
@ -147,11 +147,11 @@ private:
static std::set<QString> FLOW_DATA_NAMES; static std::set<QString> FLOW_DATA_NAMES;
static bool hasPressureData( const RimWellLogFile* wellLogFile ); static bool hasPressureData( const RimWellLogFile* wellLogFile );
static bool isPressureChannel( RimWellLogFileChannel* channel ); static bool isPressureChannel( RimWellLogChannel* channel );
static bool hasPressureData( RimEclipseResultCase* gridCase ); static bool hasPressureData( RimEclipseResultCase* gridCase );
static bool hasPressureData( RimWellPath* wellPath ); static bool hasPressureData( RimWellPath* wellPath );
static bool hasFlowData( RimEclipseResultCase* gridCase ); static bool hasFlowData( RimEclipseResultCase* gridCase );
static bool isFlowChannel( RimWellLogFileChannel* channel ); static bool isFlowChannel( RimWellLogChannel* channel );
static bool tryMatchChannelName( const std::set<QString>& channelNames, const QString& channelNameToMatch ); static bool tryMatchChannelName( const std::set<QString>& channelNames, const QString& channelNameToMatch );
static std::set<QDateTime> findMatchingOrAdjacentTimeSteps( const std::set<QDateTime>& baseTimeLine, static std::set<QDateTime> findMatchingOrAdjacentTimeSteps( const std::set<QDateTime>& baseTimeLine,
const std::set<QDateTime>& availableTimeSteps ); const std::set<QDateTime>& availableTimeSteps );

View File

@ -47,9 +47,9 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCurveAppearanceCalculator.h" #include "RimSummaryCurveAppearanceCalculator.h"
#include "RimWellFlowRateCurve.h" #include "RimWellFlowRateCurve.h"
#include "RimWellLogChannel.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFile.h" #include "RimWellLogFile.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"

View File

@ -38,7 +38,7 @@
class RimEclipseCase; class RimEclipseCase;
class RimEclipseResultCase; class RimEclipseResultCase;
class RimWellLogCurve; class RimWellLogCurve;
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellPath; class RimWellPath;
class RiuWellPltPlot; class RiuWellPltPlot;
class RimWellLogTrack; class RimWellLogTrack;

View File

@ -46,8 +46,8 @@
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseCollection.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogChannel.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
@ -687,7 +687,7 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
RimWellPath* const wellPath = RimWellPlotTools::wellPathFromWellLogFile( wellLogFile ); RimWellPath* const wellPath = RimWellPlotTools::wellPathFromWellLogFile( wellLogFile );
if ( wellLogFile != nullptr ) if ( wellLogFile != nullptr )
{ {
RimWellLogFileChannel* pressureChannel = RimWellPlotTools::getPressureChannelFromWellFile( wellLogFile ); RimWellLogChannel* pressureChannel = RimWellPlotTools::getPressureChannelFromWellFile( wellLogFile );
auto curve = new RimWellLogLasFileCurve(); auto curve = new RimWellLogLasFileCurve();
plotTrack->addCurve( curve ); plotTrack->addCurve( curve );

View File

@ -44,7 +44,7 @@ class RimEclipseCase;
class RimEclipseResultCase; class RimEclipseResultCase;
class RimRegularLegendConfig; class RimRegularLegendConfig;
class RimWellLogCurve; class RimWellLogCurve;
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellPath; class RimWellPath;
class RimWellPathCollection; class RimWellPathCollection;
class RiuWellRftPlot; class RiuWellRftPlot;

View File

@ -154,8 +154,8 @@
#include "RimVirtualPerforationResults.h" #include "RimVirtualPerforationResults.h"
#include "RimWellAllocationPlot.h" #include "RimWellAllocationPlot.h"
#include "RimWellIASettings.h" #include "RimWellIASettings.h"
#include "RimWellLogChannel.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
#include "RimWellLogPlotCollection.h" #include "RimWellLogPlotCollection.h"
@ -838,7 +838,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder << "RicShowSummaryCurveCalculatorFeature"; menuBuilder << "RicShowSummaryCurveCalculatorFeature";
} }
} }
else if ( dynamic_cast<RimWellLogFileChannel*>( firstUiItem ) ) else if ( dynamic_cast<RimWellLogChannel*>( firstUiItem ) )
{ {
menuBuilder << "RicAddWellLogToPlotFeature"; menuBuilder << "RicAddWellLogToPlotFeature";
} }
@ -1240,7 +1240,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator(); menuBuilder.addSeparator();
} }
if ( dynamic_cast<RimWellLogFileChannel*>( firstUiItem ) ) if ( dynamic_cast<RimWellLogChannel*>( firstUiItem ) )
{ {
menuBuilder << "RicAddWellLogToPlotFeature"; menuBuilder << "RicAddWellLogToPlotFeature";
} }

View File

@ -42,7 +42,7 @@ set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RimWellLogCsvFile.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogCsvFile.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogFile.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogFile.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileUtil.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileUtil.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileChannel.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogChannel.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogLasFileCurve.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogLasFileCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogRftCurve.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogRftCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogWbsCurve.cpp ${CMAKE_CURRENT_LIST_DIR}/RimWellLogWbsCurve.cpp

View File

@ -40,9 +40,9 @@
#include "RimGeoMechResultDefinition.h" #include "RimGeoMechResultDefinition.h"
#include "RimGeoMechView.h" #include "RimGeoMechView.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogChannel.h"
#include "RimWellLogExtractionCurve.h" #include "RimWellLogExtractionCurve.h"
#include "RimWellLogExtractionCurveNameConfig.h" #include "RimWellLogExtractionCurveNameConfig.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellPath.h" #include "RimWellPath.h"

View File

@ -20,7 +20,7 @@
#include "RigWellLogLasFile.h" #include "RigWellLogLasFile.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurveNameConfig.h" #include "RimWellLogLasFileCurveNameConfig.h"
#include "RimWellPath.h" #include "RimWellPath.h"
@ -72,7 +72,7 @@ void Rim3dWellLogFileCurve::setDefaultFileCurveDataInfo()
if ( m_wellLogFile ) if ( m_wellLogFile )
{ {
std::vector<RimWellLogFileChannel*> fileLogs = m_wellLogFile->wellLogChannels(); std::vector<RimWellLogChannel*> fileLogs = m_wellLogFile->wellLogChannels();
if ( !fileLogs.empty() ) if ( !fileLogs.empty() )
{ {
@ -204,7 +204,7 @@ QList<caf::PdmOptionItemInfo> Rim3dWellLogFileCurve::calculateValueOptions( cons
{ {
if ( m_wellLogFile ) if ( m_wellLogFile )
{ {
std::vector<RimWellLogFileChannel*> fileLogs = m_wellLogFile->wellLogChannels(); std::vector<RimWellLogChannel*> fileLogs = m_wellLogFile->wellLogChannels();
for ( size_t i = 0; i < fileLogs.size(); i++ ) for ( size_t i = 0; i < fileLogs.size(); i++ )
{ {

View File

@ -38,8 +38,8 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimSummaryCase.h" #include "RimSummaryCase.h"
#include "RimSummaryCaseCollection.h" #include "RimSummaryCaseCollection.h"
#include "RimWellLogChannel.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogLasFileCurve.h" #include "RimWellLogLasFileCurve.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
@ -567,7 +567,7 @@ QList<caf::PdmOptionItemInfo> RimEnsembleWellLogCurveSet::calculateValueOptions(
std::set<QString> wellLogChannelNames; std::set<QString> wellLogChannelNames;
for ( auto wellLogFile : m_ensembleWellLogs->wellLogFiles() ) for ( auto wellLogFile : m_ensembleWellLogs->wellLogFiles() )
{ {
std::vector<RimWellLogFileChannel*> fileLogs = wellLogFile->wellLogChannels(); std::vector<RimWellLogChannel*> fileLogs = wellLogFile->wellLogChannels();
for ( size_t i = 0; i < fileLogs.size(); i++ ) for ( size_t i = 0; i < fileLogs.size(); i++ )
{ {
QString wellLogChannelName = fileLogs[i]->name(); QString wellLogChannelName = fileLogs[i]->name();

View File

@ -17,18 +17,18 @@
// //
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RiaFieldHandleTools.h" #include "RiaFieldHandleTools.h"
#include <QString> #include <QString>
CAF_PDM_SOURCE_INIT( RimWellLogFileChannel, "WellLogFileChannel" ); CAF_PDM_SOURCE_INIT( RimWellLogChannel, "WellLogFileChannel" );
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimWellLogFileChannel::RimWellLogFileChannel() RimWellLogChannel::RimWellLogChannel()
{ {
CAF_PDM_InitObject( "Well Log File Channel" ); CAF_PDM_InitObject( "Well Log File Channel" );
@ -39,7 +39,7 @@ RimWellLogFileChannel::RimWellLogFileChannel()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimWellLogFileChannel::setName( const QString& name ) void RimWellLogChannel::setName( const QString& name )
{ {
m_name = name; m_name = name;
} }

View File

@ -28,12 +28,12 @@ class QString;
/// ///
/// ///
//================================================================================================== //==================================================================================================
class RimWellLogFileChannel : public caf::PdmObject class RimWellLogChannel : public caf::PdmObject
{ {
CAF_PDM_HEADER_INIT; CAF_PDM_HEADER_INIT;
public: public:
RimWellLogFileChannel(); RimWellLogChannel();
void setName( const QString& name ); void setName( const QString& name );
QString name() const { return m_name; } QString name() const { return m_name; }

View File

@ -25,7 +25,7 @@
#include "RimFileWellPath.h" #include "RimFileWellPath.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include <QFileInfo> #include <QFileInfo>
#include <QString> #include <QString>
@ -91,7 +91,7 @@ bool RimWellLogCsvFile::readFile( QString* errorMessage )
QStringList wellLogNames = m_wellLogDataFile->wellLogChannelNames(); QStringList wellLogNames = m_wellLogDataFile->wellLogChannelNames();
for ( int logIdx = 0; logIdx < wellLogNames.size(); logIdx++ ) for ( int logIdx = 0; logIdx < wellLogNames.size(); logIdx++ )
{ {
RimWellLogFileChannel* wellLog = new RimWellLogFileChannel(); RimWellLogChannel* wellLog = new RimWellLogChannel();
wellLog->setName( wellLogNames[logIdx] ); wellLog->setName( wellLogNames[logIdx] );
m_wellLogChannelNames.push_back( wellLog ); m_wellLogChannelNames.push_back( wellLog );
} }

View File

@ -51,9 +51,9 @@
#include "RimMainPlotCollection.h" #include "RimMainPlotCollection.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellBoreStabilityPlot.h" #include "RimWellBoreStabilityPlot.h"
#include "RimWellLogChannel.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
#include "RimWellLogCurveCommonDataSource.h" #include "RimWellLogCurveCommonDataSource.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogFileUtil.h" #include "RimWellLogFileUtil.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"

View File

@ -20,7 +20,7 @@
#include "RimFileWellPath.h" #include "RimFileWellPath.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RiaFieldHandleTools.h" #include "RiaFieldHandleTools.h"
#include "RiaQDateTimeTools.h" #include "RiaQDateTimeTools.h"
@ -79,9 +79,9 @@ QString RimWellLogFile::fileName() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
std::vector<RimWellLogFileChannel*> RimWellLogFile::wellLogChannels() const std::vector<RimWellLogChannel*> RimWellLogFile::wellLogChannels() const
{ {
std::vector<RimWellLogFileChannel*> channels; std::vector<RimWellLogChannel*> channels;
for ( const auto& channel : m_wellLogChannelNames ) for ( const auto& channel : m_wellLogChannelNames )
{ {
channels.push_back( channel ); channels.push_back( channel );

View File

@ -25,7 +25,7 @@
#include <QDateTime> #include <QDateTime>
#include <QString> #include <QString>
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellPath; class RimWellPath;
class RigWellLogFile; class RigWellLogFile;
@ -44,7 +44,7 @@ public:
virtual void setFileName( const QString& fileName ); virtual void setFileName( const QString& fileName );
virtual QString fileName() const; virtual QString fileName() const;
virtual std::vector<RimWellLogFileChannel*> wellLogChannels() const; virtual std::vector<RimWellLogChannel*> wellLogChannels() const;
virtual QString wellName() const = 0; virtual QString wellName() const = 0;
virtual QString name() const = 0; virtual QString name() const = 0;
@ -62,7 +62,7 @@ protected:
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override; void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override; void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
caf::PdmChildArrayField<RimWellLogFileChannel*> m_wellLogChannelNames; caf::PdmChildArrayField<RimWellLogChannel*> m_wellLogChannelNames;
caf::PdmField<caf::FilePath> m_fileName; caf::PdmField<caf::FilePath> m_fileName;
caf::PdmField<QDateTime> m_date; caf::PdmField<QDateTime> m_date;
}; };

View File

@ -30,7 +30,7 @@
#include "RimFileWellPath.h" #include "RimFileWellPath.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellPathCollection.h" #include "RimWellPathCollection.h"
#include "RimWellPlotTools.h" #include "RimWellPlotTools.h"
@ -155,7 +155,7 @@ bool RimWellLogLasFile::readFile( QString* errorMessage )
QStringList wellLogNames = m_wellLogDataFile->wellLogChannelNames(); QStringList wellLogNames = m_wellLogDataFile->wellLogChannelNames();
for ( int logIdx = 0; logIdx < wellLogNames.size(); logIdx++ ) for ( int logIdx = 0; logIdx < wellLogNames.size(); logIdx++ )
{ {
RimWellLogFileChannel* wellLog = new RimWellLogFileChannel(); RimWellLogChannel* wellLog = new RimWellLogChannel();
wellLog->setName( wellLogNames[logIdx] ); wellLog->setName( wellLogNames[logIdx] );
m_wellLogChannelNames.push_back( wellLog ); m_wellLogChannelNames.push_back( wellLog );
} }

View File

@ -29,7 +29,7 @@
#include <QDateTime> #include <QDateTime>
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellPath; class RimWellPath;
class QString; class QString;

View File

@ -30,7 +30,7 @@
#include "RimProject.h" #include "RimProject.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
#include "RimWellLogTrack.h" #include "RimWellLogTrack.h"
@ -382,7 +382,7 @@ QList<caf::PdmOptionItemInfo> RimWellLogLasFileCurve::calculateValueOptions( con
{ {
if ( m_wellLogFile ) if ( m_wellLogFile )
{ {
std::vector<RimWellLogFileChannel*> fileLogs = m_wellLogFile->wellLogChannels(); std::vector<RimWellLogChannel*> fileLogs = m_wellLogFile->wellLogChannels();
for ( size_t i = 0; i < fileLogs.size(); i++ ) for ( size_t i = 0; i < fileLogs.size(); i++ )
{ {

View File

@ -27,7 +27,7 @@
#include <vector> #include <vector>
class RimWellPath; class RimWellPath;
class RimWellLogFileChannel; class RimWellLogChannel;
class RimWellLogFile; class RimWellLogFile;
class RigWellLogIndexDepthOffset; class RigWellLogIndexDepthOffset;

View File

@ -43,7 +43,7 @@
#include "RimStimPlanModelCollection.h" #include "RimStimPlanModelCollection.h"
#include "RimTools.h" #include "RimTools.h"
#include "RimWellIASettingsCollection.h" #include "RimWellIASettingsCollection.h"
#include "RimWellLogFileChannel.h" #include "RimWellLogChannel.h"
#include "RimWellLogLasFile.h" #include "RimWellLogLasFile.h"
#include "RimWellLogPlotCollection.h" #include "RimWellLogPlotCollection.h"
#include "RimWellPathAttributeCollection.h" #include "RimWellPathAttributeCollection.h"
@ -588,8 +588,8 @@ RimWellLogFile* RimWellPath::firstWellLogFileMatchingChannelName( const QString&
std::vector<RimWellLogFile*> allWellLogFiles = wellLogFiles(); std::vector<RimWellLogFile*> allWellLogFiles = wellLogFiles();
for ( RimWellLogFile* logFile : allWellLogFiles ) for ( RimWellLogFile* logFile : allWellLogFiles )
{ {
std::vector<RimWellLogFileChannel*> channels = logFile->wellLogChannels(); std::vector<RimWellLogChannel*> channels = logFile->wellLogChannels();
for ( RimWellLogFileChannel* channel : channels ) for ( RimWellLogChannel* channel : channels )
{ {
if ( channel->name() == channelName ) if ( channel->name() == channelName )
{ {

View File

@ -41,8 +41,8 @@
#include "RimSurface.h" #include "RimSurface.h"
#include "RimSurfaceCollection.h" #include "RimSurfaceCollection.h"
#include "RimWellAllocationPlot.h" #include "RimWellAllocationPlot.h"
#include "RimWellLogChannel.h"
#include "RimWellLogCurve.h" #include "RimWellLogCurve.h"
#include "RimWellLogFileChannel.h"
#include "RimWellLogPlot.h" #include "RimWellLogPlot.h"
#include "RimWellLogTrack.h" #include "RimWellLogTrack.h"
@ -216,7 +216,7 @@ Qt::DropActions RiuDragDrop::supportedDropActions() const
{ {
return Qt::CopyAction | Qt::MoveAction; return Qt::CopyAction | Qt::MoveAction;
} }
else if ( RiuTypedPdmObjects<RimWellLogFileChannel>::containsTypedObjects( m_dragItems ) ) else if ( RiuTypedPdmObjects<RimWellLogChannel>::containsTypedObjects( m_dragItems ) )
{ {
return Qt::CopyAction; return Qt::CopyAction;
} }
@ -247,7 +247,7 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
} }
if ( dynamic_cast<RimEclipseCase*>( uiItem ) || dynamic_cast<RimWellLogCurve*>( uiItem ) || if ( dynamic_cast<RimEclipseCase*>( uiItem ) || dynamic_cast<RimWellLogCurve*>( uiItem ) ||
dynamic_cast<RimWellLogFileChannel*>( uiItem ) || dynamic_cast<RimPlot*>( uiItem ) || dynamic_cast<RimSummaryCase*>( uiItem ) || dynamic_cast<RimWellLogChannel*>( uiItem ) || dynamic_cast<RimPlot*>( uiItem ) || dynamic_cast<RimSummaryCase*>( uiItem ) ||
dynamic_cast<RimSummaryCaseCollection*>( uiItem ) || dynamic_cast<RimSurface*>( uiItem ) ) dynamic_cast<RimSummaryCaseCollection*>( uiItem ) || dynamic_cast<RimSurface*>( uiItem ) )
{ {
itemflags |= Qt::ItemIsDragEnabled; itemflags |= Qt::ItemIsDragEnabled;
@ -342,14 +342,14 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
{ {
if ( dynamic_cast<RimWellLogTrack*>( uiItem ) ) if ( dynamic_cast<RimWellLogTrack*>( uiItem ) )
{ {
if ( RiuTypedPdmObjects<RimWellLogFileChannel>::containsTypedObjects( m_dragItems ) ) if ( RiuTypedPdmObjects<RimWellLogChannel>::containsTypedObjects( m_dragItems ) )
{ {
itemflags |= Qt::ItemIsDropEnabled; itemflags |= Qt::ItemIsDropEnabled;
} }
} }
else if ( dynamic_cast<RimWellLogCurve*>( uiItem ) ) else if ( dynamic_cast<RimWellLogCurve*>( uiItem ) )
{ {
if ( RiuTypedPdmObjects<RimWellLogFileChannel>::containsTypedObjects( m_dragItems ) ) if ( RiuTypedPdmObjects<RimWellLogChannel>::containsTypedObjects( m_dragItems ) )
{ {
itemflags |= Qt::ItemIsDropEnabled; itemflags |= Qt::ItemIsDropEnabled;
} }
@ -523,13 +523,12 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop( Qt::DropAction action,
RimWellLogTrack* trackTarget, RimWellLogTrack* trackTarget,
int insertAtPosition ) int insertAtPosition )
{ {
std::vector<RimWellLogFileChannel*> wellLogFileChannels = std::vector<RimWellLogChannel*> wellLogChannels = RiuTypedPdmObjects<RimWellLogChannel>::typedObjectsFromGroup( draggedObjects );
RiuTypedPdmObjects<RimWellLogFileChannel>::typedObjectsFromGroup( draggedObjects ); if ( !wellLogChannels.empty() )
if ( !wellLogFileChannels.empty() )
{ {
if ( action == Qt::CopyAction ) if ( action == Qt::CopyAction )
{ {
RicWellLogTools::addWellLogChannelsToPlotTrack( trackTarget, wellLogFileChannels ); RicWellLogTools::addWellLogChannelsToPlotTrack( trackTarget, wellLogChannels );
return true; return true;
} }
} }