2017-10-23 06:57:01 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017 Statoil ASA
|
2019-09-06 06:17:36 -05:00
|
|
|
//
|
2017-10-23 06:57:01 -05:00
|
|
|
// 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.
|
2019-09-06 06:17:36 -05:00
|
|
|
//
|
2017-10-23 06:57:01 -05:00
|
|
|
// 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.
|
2019-09-06 06:17:36 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2017-10-23 06:57:01 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
2017-11-13 04:10:27 -06:00
|
|
|
#include "RifDataSourceForRftPltQMetaType.h"
|
2019-03-12 03:13:48 -05:00
|
|
|
|
2019-09-04 08:51:44 -05:00
|
|
|
#include "RimWellLogPlot.h"
|
2017-11-09 03:03:32 -06:00
|
|
|
#include "RimWellPlotTools.h"
|
2017-10-27 02:38:24 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2017-10-23 06:57:01 -05:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
|
|
|
#include "cvfCollection.h"
|
2017-10-26 03:35:23 -05:00
|
|
|
|
2017-10-23 06:57:01 -05:00
|
|
|
#include <QDate>
|
|
|
|
#include <QMetaType>
|
2019-09-06 06:17:36 -05:00
|
|
|
#include <QPointer>
|
2019-03-12 03:13:48 -05:00
|
|
|
|
2017-10-23 06:57:01 -05:00
|
|
|
#include <map>
|
2019-09-06 06:17:36 -05:00
|
|
|
#include <set>
|
2017-10-23 06:57:01 -05:00
|
|
|
|
|
|
|
class RimEclipseCase;
|
|
|
|
class RimEclipseResultCase;
|
|
|
|
class RimWellLogCurve;
|
|
|
|
class RimWellLogFileChannel;
|
|
|
|
class RimWellPath;
|
|
|
|
class RiuWellPltPlot;
|
2017-10-25 07:43:17 -05:00
|
|
|
class RimWellLogTrack;
|
2019-03-12 03:13:48 -05:00
|
|
|
class RiaRftPltCurveDefinition;
|
|
|
|
class RimDataSourceForRftPlt;
|
2017-10-25 07:43:17 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class Color3f;
|
2017-10-23 06:57:01 -05:00
|
|
|
}
|
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
namespace caf
|
|
|
|
{
|
|
|
|
class PdmOptionItemInfo;
|
2017-10-23 06:57:01 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//==================================================================================================
|
2019-09-06 06:17:36 -05:00
|
|
|
///
|
|
|
|
///
|
2017-10-23 06:57:01 -05:00
|
|
|
//==================================================================================================
|
2019-09-04 08:51:44 -05:00
|
|
|
class RimWellPltPlot : public RimWellLogPlot
|
2017-10-23 06:57:01 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
static const char PLOT_NAME_QFORMAT_STRING[];
|
|
|
|
|
|
|
|
public:
|
|
|
|
RimWellPltPlot();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimWellPltPlot() override;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
void setCurrentWellName( const QString& currWellName );
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
static const char* plotNameFormatString();
|
2017-11-16 08:53:30 -06:00
|
|
|
|
2017-10-23 06:57:01 -05:00
|
|
|
protected:
|
|
|
|
// Overridden PDM methods
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2019-09-06 06:17:36 -05:00
|
|
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly ) override;
|
|
|
|
void calculateValueOptionsForWells( QList<caf::PdmOptionItemInfo>& options );
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute ) override;
|
|
|
|
void onLoadDataAndUpdate() override;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
void initAfterRead() override;
|
|
|
|
void setupBeforeSave() override;
|
|
|
|
void initAfterLoad();
|
2017-10-27 02:38:24 -05:00
|
|
|
|
2017-10-23 06:57:01 -05:00
|
|
|
private:
|
2019-09-06 06:17:36 -05:00
|
|
|
void syncSourcesIoFieldFromGuiField();
|
|
|
|
void syncCurvesFromUiSelection();
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
std::set<RiaRftPltCurveDefinition> selectedCurveDefs() const;
|
|
|
|
void addStackedCurve( const QString& tracerName,
|
2019-03-12 03:13:48 -05:00
|
|
|
const std::vector<double>& depthValues,
|
|
|
|
const std::vector<double>& accFlow,
|
|
|
|
RimWellLogTrack* plotTrack,
|
|
|
|
cvf::Color3f color,
|
|
|
|
int curveGroupId,
|
2019-09-06 06:17:36 -05:00
|
|
|
bool doFillCurve );
|
2017-10-25 07:43:17 -05:00
|
|
|
|
2019-03-12 03:13:48 -05:00
|
|
|
std::vector<RifDataSourceForRftPlt> selectedSourcesExpanded() const;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
|
|
|
// RimViewWindow overrides
|
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
void setPlotXAxisTitles( RimWellLogTrack* plotTrack );
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-09 04:00:11 -05:00
|
|
|
void updateFormationsOnPlot() const;
|
2019-09-06 06:17:36 -05:00
|
|
|
|
2017-10-23 06:57:01 -05:00
|
|
|
private:
|
2019-09-06 06:17:36 -05:00
|
|
|
caf::PdmField<QString> m_wellPathName;
|
2017-10-27 02:38:24 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
caf::PdmField<std::vector<RifDataSourceForRftPlt>> m_selectedSources;
|
|
|
|
caf::PdmChildArrayField<RimDataSourceForRftPlt*> m_selectedSourcesForIo;
|
2017-10-27 02:38:24 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
caf::PdmField<std::vector<QDateTime>> m_selectedTimeSteps;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
caf::PdmChildField<RimWellLogPlot*> m_wellLogPlot_OBSOLETE;
|
2017-10-23 06:57:01 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
caf::PdmField<bool> m_useStandardConditionCurves;
|
|
|
|
caf::PdmField<bool> m_useReservoirConditionCurves;
|
2017-10-25 07:43:17 -05:00
|
|
|
caf::PdmField<std::vector<caf::AppEnum<FlowPhase>>> m_phases;
|
2017-10-27 02:38:24 -05:00
|
|
|
|
2019-09-06 06:17:36 -05:00
|
|
|
bool m_doInitAfterLoad;
|
|
|
|
bool m_isOnLoad;
|
2017-10-23 06:57:01 -05:00
|
|
|
};
|