Fix whitespace and includes

This commit is contained in:
Magne Sjaastad committed 2019-03-12 09:22:48 +01:00
1 parent 246326229e
commit f7600199c7
6 files changed
+119 -120

No files matched your search

@@ -21,8 +21,9 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RifEclipseRftAddress::RifEclipseRftAddress(QString wellName, QDateTime timeStep, RftWellLogChannelType wellLogChannelName) :
m_wellName(wellName), m_wellLogChannel(wellLogChannelName)
RifEclipseRftAddress::RifEclipseRftAddress(QString wellName, QDateTime timeStep, RftWellLogChannelType wellLogChannelName)
: m_wellName(wellName)
, m_wellLogChannel(wellLogChannelName)
{
timeStep.setTimeSpec(Qt::TimeSpec::UTC);
@@ -53,4 +54,3 @@ bool operator<(const RifEclipseRftAddress& first, const RifEclipseRftAddress& se
return false;
}
@@ -226,8 +226,8 @@ bool RimWellPlotTools::hasFlowData(RimEclipseResultCase* gridCase)
for (const QString& channelName : FLOW_DATA_NAMES)
{
if (eclipseCaseData->results(RiaDefines::MATRIX_MODEL)->hasResultEntry(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE,
channelName)) )
if (eclipseCaseData->results(RiaDefines::MATRIX_MODEL)
->hasResultEntry(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, channelName)))
{
return true;
}
@@ -75,9 +75,6 @@ public:
static std::map<QDateTime, std::set<RifDataSourceForRftPlt>> timeStepsMapFromGridCase(RimEclipseCase* gridCase);
static RiaRftPltCurveDefinition curveDefFromCurve(const RimWellLogCurve* curve);
template<typename T>
static void appendSet(std::set<T>& destSet, const std::set<T>& setToAppend);
// others
static bool hasFlowData(const RimWellLogFile* wellLogFile);
static bool hasAssociatedWellPath(const QString& wellName);
@@ -138,12 +135,3 @@ private:
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<typename T>
void RimWellPlotTools::appendSet(std::set<T>& destSet, const std::set<T>& setToAppend)
{
destSet.insert(setToAppend.begin(), setToAppend.end());
}
@@ -35,6 +35,7 @@
#include "RigWellLogExtractor.h"
#include "RigWellPath.h"
#include "RimDataSourceForRftPlt.h"
#include "RimEclipseCase.h"
#include "RimEclipseCaseCollection.h"
#include "RimEclipseResultCase.h"
@@ -62,12 +63,11 @@
#include "cafPdmUiTreeSelectionEditor.h"
#include "cafVecIjk.h"
#include <QMessageBox>
#include <algorithm>
#include <iterator>
#include <tuple>
#include "QMessageBox"
CAF_PDM_SOURCE_INIT(RimWellPltPlot, "WellPltPlot");
@@ -89,7 +89,7 @@ void caf::AppEnum< FlowPhase>::setUp()
addItem(FLOW_PHASE_WATER, "PHASE_WATER", "Water");
addItem(FLOW_PHASE_TOTAL, "PHASE_TOTAL", "Total");
}
}
} // namespace caf
//--------------------------------------------------------------------------------------------------
///
@@ -164,7 +164,6 @@ void RimWellPltPlot::deleteViewWidget()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -181,24 +180,32 @@ void RimWellPltPlot::setPlotXAxisTitles(RimWellLogTrack* plotTrack)
// Todo: Handle different units in the relevant las channels
switch (source.wellLogFile()->wellLogFileData()->depthUnit())
{
case RiaDefines::UNIT_METER: presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_METRIC);
case RiaDefines::UNIT_FEET: presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_FIELD);
case RiaDefines::UNIT_NONE: presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_UNKNOWN);
case RiaDefines::UNIT_METER:
presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_METRIC);
case RiaDefines::UNIT_FEET:
presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_FIELD);
case RiaDefines::UNIT_NONE:
presentUnitSystems.insert(RiaEclipseUnitTools::UNITS_UNKNOWN);
}
}
}
}
if (presentUnitSystems.size() > 1) { QMessageBox::warning(nullptr, "ResInsight PLT Plot", "Inconsistent units in PLT plot");}
if (presentUnitSystems.size() > 1)
{
QMessageBox::warning(nullptr, "ResInsight PLT Plot", "Inconsistent units in PLT plot");
}
if (presentUnitSystems.size() <= 0) return;
RiaEclipseUnitTools::UnitSystem unitSet = *presentUnitSystems.begin();
QString axisTitle;
if (m_useReservoirConditionCurves) axisTitle += RimWellPlotTools::flowPlotAxisTitle(RimWellLogFile::WELL_FLOW_COND_RESERVOIR, unitSet);
if (m_useReservoirConditionCurves)
axisTitle += RimWellPlotTools::flowPlotAxisTitle(RimWellLogFile::WELL_FLOW_COND_RESERVOIR, unitSet);
if (m_useReservoirConditionCurves && m_useStandardConditionCurves) axisTitle += " | ";
if (m_useStandardConditionCurves) axisTitle += RimWellPlotTools::flowPlotAxisTitle(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet);
if (m_useStandardConditionCurves)
axisTitle += RimWellPlotTools::flowPlotAxisTitle(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet);
plotTrack->setXAxisTitle(axisTitle);
#if 0
@@ -297,14 +304,21 @@ public:
RigResultPointCalculator() {}
virtual ~RigResultPointCalculator() {}
const std::vector <cvf::Vec3d>& pipeBranchCLCoords() { return m_pipeBranchCLCoords; }
const std::vector <RigWellResultPoint>& pipeBranchWellResultPoints() { return m_pipeBranchWellResultPoints; }
const std::vector <double>& pipeBranchMeasuredDepths() { return m_pipeBranchMeasuredDepths; }
const std::vector<cvf::Vec3d>& pipeBranchCLCoords()
{
return m_pipeBranchCLCoords;
}
const std::vector<RigWellResultPoint>& pipeBranchWellResultPoints()
{
return m_pipeBranchWellResultPoints;
}
const std::vector<double>& pipeBranchMeasuredDepths()
{
return m_pipeBranchMeasuredDepths;
}
protected:
RigEclipseWellLogExtractor* findWellLogExtractor(const QString& wellPathName,
RimEclipseResultCase* eclCase)
RigEclipseWellLogExtractor* findWellLogExtractor(const QString& wellPathName, RimEclipseResultCase* eclCase)
{
RimProject* proj = RiaApplication::instance()->project();
RimWellPath* wellPath = proj->wellPathByName(wellPathName);
@@ -314,7 +328,6 @@ protected:
return eclExtractor;
}
std::vector<cvf::Vec3d> m_pipeBranchCLCoords;
std::vector<RigWellResultPoint> m_pipeBranchWellResultPoints;
std::vector<double> m_pipeBranchMeasuredDepths;
@@ -327,11 +340,8 @@ protected:
class RigRftResultPointCalculator : public RigResultPointCalculator
{
public:
RigRftResultPointCalculator(const QString& wellPathName,
RimEclipseResultCase* eclCase,
QDateTime m_timeStep)
RigRftResultPointCalculator(const QString& wellPathName, RimEclipseResultCase* eclCase, QDateTime m_timeStep)
{
RifEclipseRftAddress gasRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::GRAT);
RifEclipseRftAddress oilRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::ORAT);
RifEclipseRftAddress watRateAddress(RimWellPlotTools::simWellName(wellPathName), m_timeStep, RifEclipseRftAddress::WRAT);
@@ -389,8 +399,8 @@ public:
resPoint.m_gridIndex = 0; // Always main grid
resPoint.m_gridCellIndex = globCellIdx; // Shortcut, since we only have main grid results from RFT
resPoint.m_gasRate = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(eclCase->eclipseCaseData()->unitsType(),
gasRates[it->second]);
resPoint.m_gasRate = RiaEclipseUnitTools::convertSurfaceGasFlowRateToOilEquivalents(
eclCase->eclipseCaseData()->unitsType(), gasRates[it->second]);
resPoint.m_oilRate = oilRates[it->second];
resPoint.m_waterRate = watRates[it->second];
@@ -398,12 +408,11 @@ public:
if (wpExIdx < intersections.size() - 1)
{
m_pipeBranchWellResultPoints.push_back(RigWellResultPoint()); // Invalid res point describing the "line" between the cells
m_pipeBranchWellResultPoints.push_back(
RigWellResultPoint()); // Invalid res point describing the "line" between the cells
}
}
}
};
//--------------------------------------------------------------------------------------------------
@@ -412,15 +421,16 @@ public:
class RigSimWellResultPointCalculator : public RigResultPointCalculator
{
public:
RigSimWellResultPointCalculator(const QString& wellPathName,
RimEclipseResultCase* eclCase,
QDateTime m_timeStep)
RigSimWellResultPointCalculator(const QString& wellPathName, RimEclipseResultCase* eclCase, QDateTime m_timeStep)
{
// Find timestep index from qdatetime
const std::vector<QDateTime> timeSteps = eclCase->eclipseCaseData()->results(RiaDefines::MATRIX_MODEL)->timeStepDates();
size_t tsIdx = timeSteps.size();
for ( tsIdx = 0; tsIdx < timeSteps.size(); ++tsIdx) { if (timeSteps[tsIdx] == m_timeStep) break; }
for (tsIdx = 0; tsIdx < timeSteps.size(); ++tsIdx)
{
if (timeSteps[tsIdx] == m_timeStep) break;
}
if (tsIdx >= timeSteps.size()) return;
@@ -429,7 +439,8 @@ public:
std::map<size_t, std::pair<size_t, size_t>> globCellIdxToIdxInSimWellBranch;
const RimWellPath* wellPath = RimWellPlotTools::wellPathByWellPathNameOrSimWellName(wellPathName);
const RigSimWellData* simWell = wellPath != nullptr ? eclCase->eclipseCaseData()->findSimWellData(wellPath->associatedSimulationWellName()) : nullptr;
const RigSimWellData* simWell =
wellPath != nullptr ? eclCase->eclipseCaseData()->findSimWellData(wellPath->associatedSimulationWellName()) : nullptr;
if (!simWell) return;
@@ -477,18 +488,19 @@ public:
m_pipeBranchCLCoords.push_back(intersections[wpExIdx].endPoint);
m_pipeBranchMeasuredDepths.push_back(intersections[wpExIdx].endMD);
const RigWellResultPoint& resPoint = resFrame.m_wellResultBranches[it->second.first].m_branchResultPoints[it->second.second];
const RigWellResultPoint& resPoint =
resFrame.m_wellResultBranches[it->second.first].m_branchResultPoints[it->second.second];
m_pipeBranchWellResultPoints.push_back(resPoint);
if (wpExIdx < intersections.size() - 1)
{
m_pipeBranchWellResultPoints.push_back(RigWellResultPoint()); // Invalid res point describing the "line" between the cells
m_pipeBranchWellResultPoints.push_back(
RigWellResultPoint()); // Invalid res point describing the "line" between the cells
}
}
}
};
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -539,15 +551,11 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
if (sourceDef.sourceType() == RifDataSourceForRftPlt::RFT)
{
resultPointCalc.reset(new RigRftResultPointCalculator(m_wellPathName,
rimEclipseResultCase,
timeStep));
resultPointCalc.reset(new RigRftResultPointCalculator(m_wellPathName, rimEclipseResultCase, timeStep));
}
else if (sourceDef.sourceType() == RifDataSourceForRftPlt::GRID)
{
resultPointCalc.reset(new RigSimWellResultPointCalculator(m_wellPathName,
rimEclipseResultCase,
timeStep));
resultPointCalc.reset(new RigSimWellResultPointCalculator(m_wellPathName, rimEclipseResultCase, timeStep));
}
RiaEclipseUnitTools::UnitSystem unitSet = RiaEclipseUnitTools::UNITS_UNKNOWN;
@@ -560,10 +568,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
{
if (resultPointCalc->pipeBranchCLCoords().size())
{
if ( selectedPhases.count(FLOW_PHASE_TOTAL)
&& m_useReservoirConditionCurves()
&& sourceDef.sourceType() == RifDataSourceForRftPlt::GRID )
if (selectedPhases.count(FLOW_PHASE_TOTAL) && m_useReservoirConditionCurves() &&
sourceDef.sourceType() == RifDataSourceForRftPlt::GRID)
{
RigAccWellFlowCalculator wfTotalAccumulator(resultPointCalc->pipeBranchCLCoords(),
resultPointCalc->pipeBranchWellResultPoints(),
@@ -574,7 +580,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
QString curveUnitText = RimWellPlotTools::flowUnitText(RimWellLogFile::WELL_FLOW_COND_RESERVOIR, unitSet);
const std::vector<double> accFlow = wfTotalAccumulator.accumulatedTracerFlowPrPseudoLength(RIG_FLOW_TOTAL_NAME, 0);
const std::vector<double> accFlow =
wfTotalAccumulator.accumulatedTracerFlowPrPseudoLength(RIG_FLOW_TOTAL_NAME, 0);
addStackedCurve(curveName + ", " + RIG_FLOW_TOTAL_NAME + " " + curveUnitText,
depthValues,
accFlow,
@@ -592,27 +599,32 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
resultPointCalc->pipeBranchMeasuredDepths(),
false);
const std::vector<double>& depthValues = wfPhaseAccumulator.pseudoLengthFromTop(0);
std::vector<QString> tracerNames = wfPhaseAccumulator.tracerNames();
for (const QString& tracerName : tracerNames)
{
auto color = tracerName == RIG_FLOW_OIL_NAME ? cvf::Color3f::DARK_GREEN :
tracerName == RIG_FLOW_GAS_NAME ? cvf::Color3f::DARK_RED :
tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE :
cvf::Color3f::DARK_GRAY;
auto color = tracerName == RIG_FLOW_OIL_NAME
? cvf::Color3f::DARK_GREEN
: tracerName == RIG_FLOW_GAS_NAME
? cvf::Color3f::DARK_RED
: tracerName == RIG_FLOW_WATER_NAME ? cvf::Color3f::BLUE : cvf::Color3f::DARK_GRAY;
if ( tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count(FLOW_PHASE_OIL)
|| tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count(FLOW_PHASE_GAS)
|| tracerName == RIG_FLOW_WATER_NAME && selectedPhases.count(FLOW_PHASE_WATER) )
if (tracerName == RIG_FLOW_OIL_NAME && selectedPhases.count(FLOW_PHASE_OIL) ||
tracerName == RIG_FLOW_GAS_NAME && selectedPhases.count(FLOW_PHASE_GAS) ||
tracerName == RIG_FLOW_WATER_NAME && selectedPhases.count(FLOW_PHASE_WATER))
{
FlowPhase flowPhase = FLOW_PHASE_NONE;
if (tracerName == RIG_FLOW_OIL_NAME) flowPhase = FLOW_PHASE_OIL;
else if (tracerName == RIG_FLOW_GAS_NAME) flowPhase = FLOW_PHASE_GAS;
else if (tracerName == RIG_FLOW_WATER_NAME) flowPhase = FLOW_PHASE_WATER;
QString curveUnitText = RimWellPlotTools::curveUnitText(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet, flowPhase);
if (tracerName == RIG_FLOW_OIL_NAME)
flowPhase = FLOW_PHASE_OIL;
else if (tracerName == RIG_FLOW_GAS_NAME)
flowPhase = FLOW_PHASE_GAS;
else if (tracerName == RIG_FLOW_WATER_NAME)
flowPhase = FLOW_PHASE_WATER;
QString curveUnitText =
RimWellPlotTools::curveUnitText(RimWellLogFile::WELL_FLOW_COND_STANDARD, unitSet, flowPhase);
const std::vector<double> accFlow = wfPhaseAccumulator.accumulatedTracerFlowPrPseudoLength(tracerName, 0);
const std::vector<double> accFlow =
wfPhaseAccumulator.accumulatedTracerFlowPrPseudoLength(tracerName, 0);
addStackedCurve(curveName + ", " + tracerName + " " + curveUnitText,
depthValues,
accFlow,
@@ -631,8 +643,8 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
{
RimWellLogFile::WellFlowCondition flowCondition = sourceDef.wellLogFile()->wellFlowRateCondition();
if ( (m_useStandardConditionCurves() && flowCondition == RimWellLogFile::WELL_FLOW_COND_STANDARD)
|| (m_useReservoirConditionCurves() && flowCondition == RimWellLogFile::WELL_FLOW_COND_RESERVOIR) )
if ((m_useStandardConditionCurves() && flowCondition == RimWellLogFile::WELL_FLOW_COND_STANDARD) ||
(m_useReservoirConditionCurves() && flowCondition == RimWellLogFile::WELL_FLOW_COND_RESERVOIR))
{
using ChannelValNameIdxTuple = std::tuple<double, QString, int>;
@@ -663,22 +675,25 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
if (depthUnit == RiaDefines::UNIT_METER) unitSystem = RiaEclipseUnitTools::UNITS_METRIC;
}
for (const ChannelValNameIdxTuple& channelInfo : sortedChannels)
{
const auto& channelName = std::get<1>(channelInfo);
if (selectedPhases.count(RimWellPlotTools::flowPhaseFromChannelName(channelName)) > 0)
{
auto color = RimWellPlotTools::isOilFlowChannel(channelName) ? cvf::Color3f::DARK_GREEN :
RimWellPlotTools::isGasFlowChannel(channelName) ? cvf::Color3f::DARK_RED :
RimWellPlotTools::isWaterFlowChannel(channelName) ? cvf::Color3f::BLUE :
cvf::Color3f::DARK_GRAY;
auto color = RimWellPlotTools::isOilFlowChannel(channelName)
? cvf::Color3f::DARK_GREEN
: RimWellPlotTools::isGasFlowChannel(channelName)
? cvf::Color3f::DARK_RED
: RimWellPlotTools::isWaterFlowChannel(channelName) ? cvf::Color3f::BLUE
: cvf::Color3f::DARK_GRAY;
FlowPhase flowPhase = FLOW_PHASE_NONE;
if (RimWellPlotTools::isOilFlowChannel(channelName)) flowPhase = FLOW_PHASE_OIL;
else if (RimWellPlotTools::isGasFlowChannel(channelName)) flowPhase = FLOW_PHASE_GAS;
else if (RimWellPlotTools::isWaterFlowChannel(channelName)) flowPhase = FLOW_PHASE_WATER;
if (RimWellPlotTools::isOilFlowChannel(channelName))
flowPhase = FLOW_PHASE_OIL;
else if (RimWellPlotTools::isGasFlowChannel(channelName))
flowPhase = FLOW_PHASE_GAS;
else if (RimWellPlotTools::isWaterFlowChannel(channelName))
flowPhase = FLOW_PHASE_WATER;
QString curveUnitText = RimWellPlotTools::curveUnitText(flowCondition, unitSystem, flowPhase);
addStackedCurve(curveName + ", " + channelName + " " + curveUnitText,
@@ -801,7 +816,8 @@ const char* RimWellPltPlot::plotNameFormatString()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly)
QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly)
{
QList<caf::PdmOptionItemInfo> options;
const QString simWellName = RimWellPlotTools::simWellName(m_wellPathName);
@@ -830,7 +846,8 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
if (availableRftSources.size())
{
options.push_back(caf::PdmOptionItemInfo::createHeader(RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
options.push_back(caf::PdmOptionItemInfo::createHeader(
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::RFT), true));
for (const auto& addr : availableRftSources)
{
@@ -843,7 +860,8 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
const std::vector<RimEclipseResultCase*> gridCases = RimWellPlotTools::gridCasesForWell(simWellName);
if (gridCases.size() > 0)
{
options.push_back(caf::PdmOptionItemInfo::createHeader(RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
options.push_back(caf::PdmOptionItemInfo::createHeader(
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::GRID), true));
}
for (const auto& gridCase : gridCases)
@@ -856,7 +874,8 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
if (RimWellPlotTools::wellLogFilesContainingFlow(m_wellPathName).size() > 0)
{
options.push_back(caf::PdmOptionItemInfo::createHeader(RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
options.push_back(caf::PdmOptionItemInfo::createHeader(
RifDataSourceForRftPlt::sourceTypeUiText(RifDataSourceForRftPlt::OBSERVED), true));
auto addr = RifDataSourceForRftPlt(RifDataSourceForRftPlt::OBSERVED);
auto item = caf::PdmOptionItemInfo("Observed Data", QVariant::fromValue(addr));
@@ -869,10 +888,8 @@ QList<caf::PdmOptionItemInfo> RimWellPltPlot::calculateValueOptions(const caf::P
{
std::set<RifEclipseRftAddress::RftWellLogChannelType> channelTypesToUse = RifEclipseRftAddress::pltPlotChannelTypes();
RimWellPlotTools::calculateValueOptionsForTimeSteps(RimWellPlotTools::simWellName(m_wellPathName),
selectedSourcesExpanded(),
channelTypesToUse,
options);
RimWellPlotTools::calculateValueOptionsForTimeSteps(
RimWellPlotTools::simWellName(m_wellPathName), selectedSourcesExpanded(), channelTypesToUse, options);
}
if (fieldNeedingOptions == &m_phases)
@@ -918,7 +935,8 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
{
if (!wellPath->wellPathGeometry())
{
QString tmp = QString("Display of Measured Depth (MD) for Grid or RFT curves is not possible without a well log path, and the curve will be hidden in this mode.\n\n");
QString tmp = QString("Display of Measured Depth (MD) for Grid or RFT curves is not possible without a "
"well log path, and the curve will be hidden in this mode.\n\n");
QMessageBox::warning(nullptr, "Grid/RFT curve without MD", tmp);
@@ -930,8 +948,7 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
}
}
if (changedField == &m_selectedSources ||
changedField == &m_selectedTimeSteps)
if (changedField == &m_selectedSources || changedField == &m_selectedTimeSteps)
{
updateFormationsOnPlot();
syncSourcesIoFieldFromGuiField();
@@ -942,16 +959,14 @@ void RimWellPltPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
plotTrack->calculateXZoomRangeAndUpdateQwt();
}
if ( changedField == &m_useStandardConditionCurves
|| changedField == &m_useReservoirConditionCurves
|| changedField == &m_phases)
if (changedField == &m_useStandardConditionCurves || changedField == &m_useReservoirConditionCurves ||
changedField == &m_phases)
{
syncCurvesFromUiSelection();
m_wellLogPlot->updateDepthZoom();
RimWellLogTrack* const plotTrack = m_wellLogPlot->trackByIndex(0);
plotTrack->calculateXZoomRangeAndUpdateQwt();
}
}
@@ -1023,7 +1038,9 @@ void RimWellPltPlot::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPltPlot::defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute)
void RimWellPltPlot::defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute)
{
if (field == &m_phases)
{
@@ -1076,7 +1093,6 @@ void RimWellPltPlot::syncSourcesIoFieldFromGuiField()
{
m_selectedSourcesForIo.push_back(new RimDataSourceForRftPlt(addr));
}
}
//--------------------------------------------------------------------------------------------------
@@ -17,12 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "RimViewWindow.h"
#include "RigFlowDiagResultAddress.h"
#include "RimDataSourceForRftPlt.h"
#include "RifDataSourceForRftPltQMetaType.h"
#include "RimPlotCurve.h"
#include "RimWellPlotTools.h"
#include "cafPdmField.h"
@@ -34,9 +30,9 @@
#include <QPointer>
#include <QDate>
#include <QMetaType>
#include <set>
#include <map>
#include "RifEclipseRftAddress.h"
class RimEclipseCase;
class RimEclipseResultCase;
@@ -46,6 +42,8 @@ class RimWellLogPlot;
class RimWellPath;
class RiuWellPltPlot;
class RimWellLogTrack;
class RiaRftPltCurveDefinition;
class RimDataSourceForRftPlt;
namespace cvf {
@@ -103,7 +101,6 @@ protected:
void initAfterLoad();
private:
void syncSourcesIoFieldFromGuiField();
void syncCurvesFromUiSelection();
@@ -21,11 +21,6 @@
#include "RimViewWindow.h"
#include "RiaRftPltCurveDefinition.h"
#include "RimCase.h"
#include "RimPlotCurve.h"
#include "RifDataSourceForRftPltQMetaType.h"
#include "cafPdmField.h"
@@ -36,6 +31,7 @@
#include <QDate>
#include <QMetaType>
#include <QPointer>
#include <map>
#include <set>
#include <utility>
@@ -48,6 +44,8 @@ class RimWellLogPlot;
class RimWellPath;
class RiuWellRftPlot;
class RigEclipseCaseData;
class RiaRftPltCurveDefinition;
class RifDataSourceForRftPlt;
namespace cvf {
class Color3f;
@@ -82,12 +80,13 @@ public:
RimWellLogPlot* wellLogPlot() const;
void setSimWellOrWellPathName(const QString& currWellName);
int branchIndex() const;
static const char* plotNameFormatString();
void applyInitialSelections();
static const char* plotNameFormatString();
protected:
// Overridden PDM methods
caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
@@ -104,10 +103,8 @@ protected:
private:
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
void updateEditorsFromCurves();
void updateWidgetTitleWindowTitle();
void syncCurvesFromUiSelection();
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
@@ -116,6 +113,7 @@ private:
void updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>& allCurveDefs,
const std::set<RiaRftPltCurveDefinition>& curveDefsToAdd,
const std::set<RimWellLogCurve*>& curvesToDelete);
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
// RimViewWindow overrides