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"
|
|
|
|
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
2017-10-03 01:19:38 -05:00
|
|
|
#include "RimWellRftAddress.h"
|
2017-09-27 05:39:28 -05:00
|
|
|
|
|
|
|
#include <QPointer>
|
2017-10-03 01:19:38 -05:00
|
|
|
#include <QDate>
|
|
|
|
#include <QMetaType>
|
2017-09-27 05:39:28 -05:00
|
|
|
|
|
|
|
class RimEclipseResultCase;
|
|
|
|
class RimEclipseWell;
|
|
|
|
class RimFlowDiagSolution;
|
|
|
|
class RimTotalWellAllocationPlot;
|
|
|
|
class RimWellLogPlot;
|
|
|
|
class RiuWellRftPlot;
|
|
|
|
class RimWellLogTrack;
|
|
|
|
class RimTofAccumulatedPhaseFractionsPlot;
|
|
|
|
class RigSingleWellResultsData;
|
2017-10-03 01:19:38 -05:00
|
|
|
class RimWellLogFileChannel;
|
|
|
|
class RimWellLogFile;
|
|
|
|
//class RimWellRftAddress;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
|
|
|
namespace cvf {
|
|
|
|
class Color3f;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace caf {
|
|
|
|
class PdmOptionItemInfo;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class RimWellRftPlot : public RimViewWindow
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
|
|
|
enum FlowType { ACCUMULATED, INFLOW};
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimWellRftPlot();
|
|
|
|
virtual ~RimWellRftPlot();
|
|
|
|
|
|
|
|
void setDescription(const QString& description);
|
|
|
|
QString description() const;
|
|
|
|
|
|
|
|
virtual void loadDataAndUpdate() override;
|
|
|
|
|
|
|
|
virtual QWidget* viewWidget() override;
|
|
|
|
virtual void zoomAll() override;
|
|
|
|
|
2017-09-27 07:05:14 -05:00
|
|
|
RimWellLogPlot* wellLogPlot() const;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
2017-09-29 04:24:18 -05:00
|
|
|
void setCurrentWellName(const QString& currWellName);
|
|
|
|
QString currentWellName() const;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// Overridden PDM methods
|
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
2017-09-29 04:24:18 -05:00
|
|
|
//std::set<QString> findSortedWellNames();
|
2017-09-27 05:39:28 -05: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-03 01:19:38 -05:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute) override;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
|
|
|
private:
|
2017-09-29 04:24:18 -05:00
|
|
|
void calculateValueOptionsForWells(QList<caf::PdmOptionItemInfo>& options);
|
2017-10-02 02:40:33 -05:00
|
|
|
void calculateValueOptionsForObservedData(QList<caf::PdmOptionItemInfo>& options, int level);
|
|
|
|
|
2017-09-27 05:39:28 -05:00
|
|
|
void updateFromWell();
|
|
|
|
void updateWidgetTitleWindowTitle();
|
|
|
|
|
2017-10-03 01:19:38 -05:00
|
|
|
void loadDataAndUpdatePlot();
|
|
|
|
|
|
|
|
static bool isPressureChannel(RimWellLogFileChannel* channel);
|
|
|
|
std::vector<RimWellLogFile*> getWellLogFilesWithPressure() const;
|
|
|
|
std::vector<RimWellLogFileChannel*> getPressureChannelsFromWellLogFile(const RimWellLogFile* wellLogFile) const;
|
|
|
|
|
2017-09-27 05:39:28 -05:00
|
|
|
// RimViewWindow overrides
|
|
|
|
|
|
|
|
virtual QWidget* createViewWidget(QWidget* mainWindowParent) override;
|
|
|
|
virtual void deleteViewWidget() override;
|
|
|
|
|
|
|
|
cvf::Color3f getTracerColor(const QString& tracerName);
|
|
|
|
|
|
|
|
private:
|
|
|
|
caf::PdmField<bool> m_showPlotTitle;
|
|
|
|
caf::PdmField<QString> m_userName;
|
|
|
|
|
|
|
|
caf::PdmField<QString> m_wellName;
|
2017-10-03 01:19:38 -05:00
|
|
|
caf::PdmField<std::vector<RimWellRftAddress>> m_selectedSources;
|
|
|
|
|
2017-09-29 04:24:18 -05:00
|
|
|
caf::PdmField<std::vector<QString>> m_selectedTimeSteps;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
2017-09-27 07:05:14 -05:00
|
|
|
QPointer<RiuWellRftPlot> m_wellLogPlotWidget;
|
2017-09-27 05:39:28 -05:00
|
|
|
|
2017-09-27 07:05:14 -05:00
|
|
|
caf::PdmChildField<RimWellLogPlot*> m_wellLogPlot;
|
2017-09-27 05:39:28 -05:00
|
|
|
};
|