mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -06:00
Fix whitespace and includes
This commit is contained in:
parent
246326229e
commit
f7600199c7
@ -1,17 +1,17 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 Statoil ASA
|
||||
//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
@ -19,10 +19,11 @@
|
||||
#include "RifEclipseRftAddress.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
|
||||
@ -31,19 +32,19 @@ RifEclipseRftAddress::RifEclipseRftAddress(QString wellName, QDateTime timeStep,
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool operator==(const RifEclipseRftAddress& first, const RifEclipseRftAddress& second)
|
||||
{
|
||||
if (first.wellName() != second.wellName()) return false;
|
||||
if (first.timeStep() != second.timeStep()) return false;
|
||||
if (first.wellLogChannel() != second.wellLogChannel()) return false;
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool operator<(const RifEclipseRftAddress& first, const RifEclipseRftAddress& second)
|
||||
{
|
||||
@ -53,4 +54,3 @@ bool operator<(const RifEclipseRftAddress& first, const RifEclipseRftAddress& se
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ std::pair<RigEclipseResultAddress, QString> RimWellPlotTools::pressureResultData
|
||||
for (const auto& pressureDataName : PRESSURE_DATA_NAMES)
|
||||
{
|
||||
if (eclipseCaseData->results(RiaDefines::MATRIX_MODEL)
|
||||
->hasResultEntry(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, pressureDataName)))
|
||||
->hasResultEntry(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, pressureDataName)))
|
||||
{
|
||||
return std::make_pair(RigEclipseResultAddress(RiaDefines::DYNAMIC_NATIVE, pressureDataName), pressureDataName);
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
@ -411,7 +411,7 @@ std::vector<RimEclipseResultCase*> RimWellPlotTools::rftCasesForWell(const QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::map<QDateTime, std::set<RifDataSourceForRftPlt>> RimWellPlotTools::timeStepsMapFromGridCase(RimEclipseCase* gridCase)
|
||||
{
|
||||
const RigEclipseCaseData* const eclipseCaseData = gridCase->eclipseCaseData();
|
||||
const RigEclipseCaseData* const eclipseCaseData = gridCase->eclipseCaseData();
|
||||
std::pair<RigEclipseResultAddress, QString> resultDataInfo = pressureResultDataInfo(eclipseCaseData);
|
||||
|
||||
std::map<QDateTime, std::set<RifDataSourceForRftPlt>> timeStepsMap;
|
||||
@ -521,7 +521,7 @@ RiaRftPltCurveDefinition RimWellPlotTools::curveDefFromCurve(const RimWellLogCur
|
||||
}
|
||||
else if (wellLogFileCurve != nullptr)
|
||||
{
|
||||
RimWellLogFile* const wellLogFile = wellLogFileCurve->wellLogFile();
|
||||
RimWellLogFile* const wellLogFile = wellLogFileCurve->wellLogFile();
|
||||
|
||||
if (wellLogFile != nullptr)
|
||||
{
|
||||
@ -943,9 +943,9 @@ void RimWellPlotTools::calculateValueOptionsForTimeSteps(
|
||||
{
|
||||
QString optionText = RiaQDateTimeTools::toStringUsingApplicationLocale(timeStepPair.first, dateFormatString);
|
||||
|
||||
bool hasObs = false;
|
||||
bool hasRft = false;
|
||||
bool hasGrid = false;
|
||||
bool hasObs = false;
|
||||
bool hasRft = false;
|
||||
bool hasGrid = false;
|
||||
|
||||
for (const auto& source : timeStepPair.second)
|
||||
{
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -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 {
|
||||
@ -70,63 +68,62 @@ public:
|
||||
RimWellPltPlot();
|
||||
~RimWellPltPlot() override;
|
||||
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
QWidget* viewWidget() override;
|
||||
void zoomAll() override;
|
||||
QWidget* viewWidget() override;
|
||||
void zoomAll() override;
|
||||
|
||||
RimWellLogPlot* wellLogPlot() const;
|
||||
RimWellLogPlot* wellLogPlot() const;
|
||||
|
||||
void setCurrentWellName(const QString& currWellName);
|
||||
void setCurrentWellName(const QString& currWellName);
|
||||
|
||||
static const char* plotNameFormatString();
|
||||
static const char* plotNameFormatString();
|
||||
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
||||
|
||||
QImage snapshotWindowContent() override;
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
|
||||
void initAfterRead() override;
|
||||
void setupBeforeSave() override;
|
||||
void initAfterLoad();
|
||||
void initAfterRead() override;
|
||||
void setupBeforeSave() override;
|
||||
void initAfterLoad();
|
||||
|
||||
private:
|
||||
void syncSourcesIoFieldFromGuiField();
|
||||
void syncCurvesFromUiSelection();
|
||||
|
||||
void syncSourcesIoFieldFromGuiField();
|
||||
void syncCurvesFromUiSelection();
|
||||
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
||||
void addStackedCurve(const QString& tracerName,
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& accFlow,
|
||||
RimWellLogTrack* plotTrack,
|
||||
cvf::Color3f color,
|
||||
int curveGroupId,
|
||||
bool doFillCurve);
|
||||
|
||||
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
||||
void addStackedCurve(const QString& tracerName,
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& accFlow,
|
||||
RimWellLogTrack* plotTrack,
|
||||
cvf::Color3f color,
|
||||
int curveGroupId,
|
||||
bool doFillCurve);
|
||||
|
||||
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
||||
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
||||
|
||||
// RimViewWindow overrides
|
||||
|
||||
void updateWidgetTitleWindowTitle();
|
||||
QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
void deleteViewWidget() override;
|
||||
void updateWidgetTitleWindowTitle();
|
||||
QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
void deleteViewWidget() override;
|
||||
|
||||
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
|
||||
void setPlotXAxisTitles(RimWellLogTrack* plotTrack);
|
||||
|
||||
void updateFormationsOnPlot() const;
|
||||
void updateFormationsOnPlot() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showPlotTitle;
|
||||
@ -134,8 +131,8 @@ private:
|
||||
|
||||
caf::PdmField<QString> m_wellPathName;
|
||||
|
||||
caf::PdmField<std::vector<RifDataSourceForRftPlt>> m_selectedSources;
|
||||
caf::PdmChildArrayField<RimDataSourceForRftPlt*> m_selectedSourcesForIo;
|
||||
caf::PdmField<std::vector<RifDataSourceForRftPlt>> m_selectedSources;
|
||||
caf::PdmChildArrayField<RimDataSourceForRftPlt*> m_selectedSourcesForIo;
|
||||
|
||||
caf::PdmField<std::vector<QDateTime>> m_selectedTimeSteps;
|
||||
|
||||
|
@ -105,7 +105,7 @@ RimWellRftPlot::RimWellRftPlot()
|
||||
m_selectedTimeSteps.uiCapability()->setAutoAddingOptionFromValue(false);
|
||||
|
||||
this->setAsPlotMdiWindow();
|
||||
m_isOnLoad = true;
|
||||
m_isOnLoad = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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;
|
||||
@ -73,60 +71,60 @@ public:
|
||||
RimWellRftPlot();
|
||||
~RimWellRftPlot() override;
|
||||
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
void setDescription(const QString& description);
|
||||
QString description() const;
|
||||
|
||||
QWidget* viewWidget() override;
|
||||
void zoomAll() override;
|
||||
QWidget* viewWidget() override;
|
||||
void zoomAll() override;
|
||||
|
||||
RimWellLogPlot* wellLogPlot() const;
|
||||
RimWellLogPlot* wellLogPlot() const;
|
||||
|
||||
void setSimWellOrWellPathName(const QString& currWellName);
|
||||
int branchIndex() const;
|
||||
void setSimWellOrWellPathName(const QString& currWellName);
|
||||
|
||||
static const char* plotNameFormatString();
|
||||
int branchIndex() const;
|
||||
|
||||
void applyInitialSelections();
|
||||
void applyInitialSelections();
|
||||
|
||||
static const char* plotNameFormatString();
|
||||
|
||||
protected:
|
||||
// Overridden PDM methods
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
||||
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
||||
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
|
||||
QImage snapshotWindowContent() override;
|
||||
QImage snapshotWindowContent() override;
|
||||
|
||||
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
void onLoadDataAndUpdate() override;
|
||||
|
||||
private:
|
||||
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
||||
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
||||
void updateEditorsFromCurves();
|
||||
void updateWidgetTitleWindowTitle();
|
||||
void syncCurvesFromUiSelection();
|
||||
|
||||
void updateEditorsFromCurves();
|
||||
void updateWidgetTitleWindowTitle();
|
||||
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
||||
std::set<RiaRftPltCurveDefinition> curveDefsFromCurves() const;
|
||||
|
||||
void syncCurvesFromUiSelection();
|
||||
void updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>& allCurveDefs,
|
||||
const std::set<RiaRftPltCurveDefinition>& curveDefsToAdd,
|
||||
const std::set<RimWellLogCurve*>& curvesToDelete);
|
||||
|
||||
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
||||
std::set<RiaRftPltCurveDefinition> curveDefsFromCurves() const;
|
||||
|
||||
void updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>& allCurveDefs,
|
||||
const std::set<RiaRftPltCurveDefinition>& curveDefsToAdd,
|
||||
const std::set<RimWellLogCurve*>& curvesToDelete);
|
||||
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
||||
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
||||
|
||||
// RimViewWindow overrides
|
||||
|
||||
QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
void deleteViewWidget() override;
|
||||
QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
||||
void deleteViewWidget() override;
|
||||
|
||||
void applyCurveAppearance(RimWellLogCurve* newCurve);
|
||||
void applyCurveAppearance(RimWellLogCurve* newCurve);
|
||||
|
||||
void updateFormationsOnPlot() const;
|
||||
QString associatedSimWellName() const;
|
||||
void updateFormationsOnPlot() const;
|
||||
QString associatedSimWellName() const;
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> m_showPlotTitle;
|
||||
|
Loading…
Reference in New Issue
Block a user