2015-08-26 05:27:29 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2015- Statoil ASA
|
|
|
|
// Copyright (C) 2015- Ceetron Solutions AS
|
|
|
|
//
|
|
|
|
// 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 "cafPdmObject.h"
|
2015-08-27 09:13:49 -05:00
|
|
|
#include "cafPdmField.h"
|
2015-08-27 09:43:54 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
2017-10-25 07:41:54 -05:00
|
|
|
#include "cvfCollection.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
2015-08-27 09:43:54 -05:00
|
|
|
|
2015-08-30 19:06:37 -05:00
|
|
|
#include <QPointer>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
2017-10-25 07:41:54 -05:00
|
|
|
class RigWellPath;
|
|
|
|
class RimCase;
|
|
|
|
class RimWellFlowRateCurve;
|
2015-11-04 09:19:38 -06:00
|
|
|
class RimWellLogCurve;
|
2017-10-25 07:41:54 -05:00
|
|
|
class RimWellPath;
|
|
|
|
class RiuPlotAnnotationTool;
|
2015-11-04 08:57:06 -06:00
|
|
|
class RiuWellLogTrack;
|
2015-08-26 05:27:29 -05:00
|
|
|
|
2015-09-17 04:34:03 -05:00
|
|
|
class QwtPlotCurve;
|
|
|
|
|
2015-08-26 05:27:29 -05:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2015-11-04 08:57:06 -06:00
|
|
|
class RimWellLogTrack : public caf::PdmObject
|
2015-08-26 05:27:29 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
2015-11-04 08:57:06 -06:00
|
|
|
RimWellLogTrack();
|
|
|
|
virtual ~RimWellLogTrack();
|
2015-08-27 09:13:49 -05:00
|
|
|
|
2017-10-25 07:41:54 -05:00
|
|
|
enum TrajectoryType { WELL_PATH, SIMULATION_WELL };
|
|
|
|
|
2015-09-18 04:07:21 -05:00
|
|
|
void setDescription(const QString& description);
|
2015-10-29 04:29:48 -05:00
|
|
|
bool isVisible();
|
2015-11-04 09:19:38 -06:00
|
|
|
void addCurve(RimWellLogCurve* curve);
|
|
|
|
void insertCurve(RimWellLogCurve* curve, size_t index);
|
|
|
|
void removeCurve(RimWellLogCurve* curve);
|
|
|
|
size_t curveIndex(RimWellLogCurve* curve);
|
2015-09-02 09:46:30 -05:00
|
|
|
size_t curveCount() { return curves.size(); }
|
2017-02-08 06:23:52 -06:00
|
|
|
void setXAxisTitle(const QString& text);
|
2015-09-02 09:46:30 -05:00
|
|
|
|
2015-09-03 07:21:08 -05:00
|
|
|
void recreateViewer();
|
2015-09-03 08:10:02 -05:00
|
|
|
void detachAllCurves();
|
|
|
|
|
2015-09-03 01:09:06 -05:00
|
|
|
void loadDataAndUpdate();
|
|
|
|
|
2015-10-28 10:49:52 -05:00
|
|
|
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
2016-09-13 02:59:34 -05:00
|
|
|
void updateXZoomAndParentPlotDepthZoom();
|
|
|
|
void updateXZoom();
|
2015-08-30 19:06:37 -05:00
|
|
|
|
2015-11-04 08:57:06 -06:00
|
|
|
RiuWellLogTrack* viewer();
|
2015-09-17 04:34:03 -05:00
|
|
|
|
2015-11-04 09:19:38 -06:00
|
|
|
RimWellLogCurve* curveDefinitionFromCurve(const QwtPlotCurve* curve) const;
|
2015-08-30 19:06:37 -05:00
|
|
|
|
2015-12-09 04:32:46 -06:00
|
|
|
void setLogarithmicScale(bool enable);
|
|
|
|
|
2017-02-01 12:17:56 -06:00
|
|
|
std::vector<RimWellFlowRateCurve*> visibleStackedCurves();
|
2017-03-09 07:27:41 -06:00
|
|
|
|
|
|
|
QString description();
|
|
|
|
std::vector<RimWellLogCurve* > curvesVector();
|
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
protected:
|
2017-10-25 07:41:54 -05:00
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
// Overridden PDM methods
|
2017-10-25 07:41:54 -05:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
2015-12-09 00:55:35 -06:00
|
|
|
|
2015-12-09 03:14:58 -06:00
|
|
|
void computeAndSetXRangeMinForLogarithmicScale();
|
2017-10-25 07:41:54 -05:00
|
|
|
void updateGeneratedSimulationWellpath();
|
2015-12-09 00:55:35 -06:00
|
|
|
|
2017-10-25 07:41:54 -05:00
|
|
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2015-08-27 09:13:49 -05:00
|
|
|
|
2015-09-22 04:54:58 -05:00
|
|
|
private:
|
2017-10-25 07:41:54 -05:00
|
|
|
void clearGeneratedSimWellPaths();
|
|
|
|
void updateFormationNamesOnPlot();
|
|
|
|
void removeFormationNames();
|
2015-12-09 00:55:35 -06:00
|
|
|
void updateAxisScaleEngine();
|
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
private:
|
2017-02-08 06:23:52 -06:00
|
|
|
QString m_xAxisTitle;
|
|
|
|
|
2015-09-11 03:44:10 -05:00
|
|
|
caf::PdmField<bool> m_show;
|
2015-09-18 04:07:21 -05:00
|
|
|
caf::PdmField<QString> m_userName;
|
2015-11-04 09:19:38 -06:00
|
|
|
caf::PdmChildArrayField<RimWellLogCurve*> curves;
|
2015-09-18 04:41:14 -05:00
|
|
|
caf::PdmField<double> m_visibleXRangeMin;
|
|
|
|
caf::PdmField<double> m_visibleXRangeMax;
|
2015-12-01 09:51:51 -06:00
|
|
|
caf::PdmField<bool> m_isAutoScaleXEnabled;
|
2015-12-09 00:55:35 -06:00
|
|
|
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
2015-09-02 09:46:30 -05:00
|
|
|
|
2017-10-25 07:41:54 -05:00
|
|
|
caf::PdmField<bool> m_showFormations;
|
|
|
|
caf::PdmPtrField<RimCase*> m_case;
|
|
|
|
caf::PdmField<caf::AppEnum<TrajectoryType> > m_trajectoryType;
|
|
|
|
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
|
|
|
caf::PdmField<QString> m_simWellName;
|
|
|
|
caf::PdmField<int> m_branchIndex;
|
|
|
|
|
|
|
|
cvf::Collection<RigWellPath> m_generatedSimulationWellPathBranches;
|
|
|
|
|
|
|
|
|
2015-11-04 08:57:06 -06:00
|
|
|
QPointer<RiuWellLogTrack> m_wellLogTrackPlotWidget;
|
2017-10-25 07:41:54 -05:00
|
|
|
|
|
|
|
RiuPlotAnnotationTool* m_annotationTool;
|
2015-08-26 05:27:29 -05:00
|
|
|
};
|