2017-09-27 12:39:28 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// 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>
|
|
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "RimViewWindow.h"
|
|
|
|
|
|
2017-11-09 08:21:36 +01:00
|
|
|
#include "RiaRftPltCurveDefinition.h"
|
|
|
|
|
|
2017-11-02 18:14:47 +01:00
|
|
|
#include "RimCase.h"
|
|
|
|
|
#include "RimPlotCurve.h"
|
|
|
|
|
|
2017-11-13 11:10:27 +01:00
|
|
|
#include "RifDataSourceForRftPltQMetaType.h"
|
2017-11-02 18:14:47 +01:00
|
|
|
|
2017-09-27 12:39:28 +02:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmPtrField.h"
|
2017-10-11 13:52:29 +02:00
|
|
|
#include "cvfCollection.h"
|
2017-10-26 10:35:23 +02:00
|
|
|
|
2017-10-03 08:19:38 +02:00
|
|
|
#include <QDate>
|
|
|
|
|
#include <QMetaType>
|
2017-11-02 18:14:47 +01:00
|
|
|
#include <QPointer>
|
2017-10-13 14:32:26 +02:00
|
|
|
#include <map>
|
2017-11-02 18:14:47 +01:00
|
|
|
#include <set>
|
2017-11-02 11:05:39 +01:00
|
|
|
#include <utility>
|
2017-10-13 13:44:53 +02:00
|
|
|
|
2017-10-11 13:52:29 +02:00
|
|
|
class RimEclipseCase;
|
2017-10-13 09:29:42 +02:00
|
|
|
class RimEclipseResultCase;
|
|
|
|
|
class RimWellLogCurve;
|
|
|
|
|
class RimWellLogFileChannel;
|
2017-09-27 12:39:28 +02:00
|
|
|
class RimWellLogPlot;
|
2017-10-03 13:54:07 +02:00
|
|
|
class RimWellPath;
|
2017-10-13 09:29:42 +02:00
|
|
|
class RiuWellRftPlot;
|
2017-11-02 11:05:39 +01:00
|
|
|
class RigEclipseCaseData;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
|
|
|
|
namespace cvf {
|
|
|
|
|
class Color3f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace caf {
|
|
|
|
|
class PdmOptionItemInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
class RimWellRftPlot : public RimViewWindow
|
|
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2017-10-04 14:36:33 +02:00
|
|
|
|
2017-11-02 11:05:39 +01:00
|
|
|
static const std::set<QString> PRESSURE_DATA_NAMES;
|
2017-10-05 16:25:04 +02:00
|
|
|
static const char PLOT_NAME_QFORMAT_STRING[];
|
2017-09-27 12:39:28 +02:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
RimWellRftPlot();
|
|
|
|
|
virtual ~RimWellRftPlot();
|
|
|
|
|
|
|
|
|
|
void setDescription(const QString& description);
|
|
|
|
|
QString description() const;
|
|
|
|
|
|
|
|
|
|
virtual QWidget* viewWidget() override;
|
|
|
|
|
virtual void zoomAll() override;
|
|
|
|
|
|
2017-09-27 14:05:14 +02:00
|
|
|
RimWellLogPlot* wellLogPlot() const;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
2017-11-10 15:41:16 +01:00
|
|
|
void setSimWellOrWellPathName(const QString& currWellName);
|
|
|
|
|
QString simWellOrWellPathName() const;
|
2017-11-03 14:53:00 +01:00
|
|
|
int branchIndex() const;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
2017-10-05 16:25:04 +02:00
|
|
|
static const char* plotNameFormatString();
|
|
|
|
|
|
2017-10-17 11:01:15 +02:00
|
|
|
void applyInitialSelections();
|
|
|
|
|
|
2017-09-27 12:39:28 +02:00
|
|
|
protected:
|
|
|
|
|
// Overridden PDM methods
|
2017-11-02 18:14:47 +01:00
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() override { return &m_userName; }
|
2017-09-27 12:39:28 +02:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
2018-05-11 13:14:49 +02:00
|
|
|
void defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName) override;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
|
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
|
|
|
|
|
|
|
|
|
virtual QImage snapshotWindowContent() override;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2017-10-31 12:49:14 +01:00
|
|
|
virtual void onLoadDataAndUpdate() override;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
|
|
|
|
private:
|
2017-09-29 11:24:18 +02:00
|
|
|
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
2017-10-02 09:40:33 +02:00
|
|
|
|
2017-10-05 10:54:52 +02:00
|
|
|
void updateEditorsFromCurves();
|
2017-09-27 12:39:28 +02:00
|
|
|
void updateWidgetTitleWindowTitle();
|
|
|
|
|
|
2017-10-05 16:25:04 +02:00
|
|
|
void syncCurvesFromUiSelection();
|
2017-10-03 08:19:38 +02:00
|
|
|
|
2017-11-09 08:21:36 +01:00
|
|
|
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
|
|
|
|
std::set<RiaRftPltCurveDefinition> curveDefsFromCurves() const;
|
2017-11-08 10:30:55 +01:00
|
|
|
|
2017-11-09 08:21:36 +01:00
|
|
|
void updateCurvesInPlot(const std::set<RiaRftPltCurveDefinition>& allCurveDefs,
|
|
|
|
|
const std::set<RiaRftPltCurveDefinition>& curveDefsToAdd,
|
2017-10-05 10:54:52 +02:00
|
|
|
const std::set<RimWellLogCurve*>& curvesToDelete);
|
2018-05-11 13:14:49 +02:00
|
|
|
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
2017-10-13 14:32:26 +02:00
|
|
|
|
2017-09-27 12:39:28 +02:00
|
|
|
// RimViewWindow overrides
|
|
|
|
|
|
|
|
|
|
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
|
|
|
|
virtual void deleteViewWidget() override;
|
|
|
|
|
|
2017-10-09 10:51:07 +02:00
|
|
|
void applyCurveAppearance(RimWellLogCurve* newCurve);
|
|
|
|
|
|
2017-11-07 10:38:05 +01:00
|
|
|
void updateFormationsOnPlot() const;
|
2017-11-10 15:41:16 +01:00
|
|
|
QString associatedSimWellName() const;
|
|
|
|
|
|
2017-09-27 12:39:28 +02:00
|
|
|
private:
|
|
|
|
|
caf::PdmField<bool> m_showPlotTitle;
|
|
|
|
|
caf::PdmField<QString> m_userName;
|
|
|
|
|
|
2017-11-09 10:03:32 +01:00
|
|
|
caf::PdmField<QString> m_wellPathNameOrSimWellName;
|
2017-10-05 16:25:04 +02:00
|
|
|
caf::PdmField<int> m_branchIndex;
|
2017-12-07 14:51:58 +01:00
|
|
|
caf::PdmField<bool> m_branchDetection;
|
|
|
|
|
|
2017-11-13 11:10:27 +01:00
|
|
|
caf::PdmField<std::vector<RifDataSourceForRftPlt>> m_selectedSources;
|
2017-10-03 08:19:38 +02:00
|
|
|
|
2017-10-03 13:54:07 +02:00
|
|
|
caf::PdmField<std::vector<QDateTime>> m_selectedTimeSteps;
|
2017-09-27 12:39:28 +02:00
|
|
|
|
2017-09-27 14:05:14 +02:00
|
|
|
caf::PdmChildField<RimWellLogPlot*> m_wellLogPlot;
|
2017-10-13 14:32:26 +02:00
|
|
|
|
2018-05-11 13:14:49 +02:00
|
|
|
QPointer<RiuWellRftPlot> m_wellLogPlotWidget;
|
|
|
|
|
|
2017-10-19 16:12:22 +02:00
|
|
|
bool m_selectedSourcesOrTimeStepsFieldsChanged;
|
2017-11-13 08:56:22 +01:00
|
|
|
bool m_isOnLoad;
|
2017-09-27 12:39:28 +02:00
|
|
|
};
|