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