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
|
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
#include "cafPdmField.h"
|
2015-09-03 03:55:54 -05:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2015-09-18 06:02:33 -05:00
|
|
|
#include "cafPdmObject.h"
|
2015-08-26 05:27:29 -05:00
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
#include "RigWellLogCurveData.h"
|
2015-10-29 03:06:48 -05:00
|
|
|
#include <QPointer>
|
2015-08-30 19:06:37 -05:00
|
|
|
#include <vector>
|
|
|
|
|
2015-10-15 04:27:12 -05:00
|
|
|
class RigWellLogCurveData;
|
2015-11-04 08:57:06 -06:00
|
|
|
class RiuWellLogTrack;
|
2015-11-06 01:32:58 -06:00
|
|
|
class RiuLineSegmentQwtPlotCurve;
|
2015-08-30 19:06:37 -05:00
|
|
|
class QwtPlotCurve;
|
|
|
|
class QString;
|
|
|
|
|
2015-08-26 05:27:29 -05:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2015-11-04 09:19:38 -06:00
|
|
|
class RimWellLogCurve : public caf::PdmObject
|
2015-08-26 05:27:29 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
public:
|
2015-11-04 09:19:38 -06:00
|
|
|
RimWellLogCurve();
|
|
|
|
virtual ~RimWellLogCurve();
|
2015-08-27 09:13:49 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
void setColor(const cvf::Color3f& color);
|
2015-09-03 08:10:02 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
bool depthRange(double* minimumDepth, double* maximumDepth) const;
|
|
|
|
bool valueRange(double* minimumValue, double* maximumValue) const;
|
2015-09-03 03:55:54 -05:00
|
|
|
|
2015-11-04 08:57:06 -06:00
|
|
|
void setQwtTrack(RiuWellLogTrack* plot);
|
2015-10-27 08:44:53 -05:00
|
|
|
void detachQwtCurve();
|
2015-09-17 04:34:03 -05:00
|
|
|
|
2015-10-28 10:49:52 -05:00
|
|
|
bool isCurveVisible() const;
|
2015-09-18 06:02:33 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
QwtPlotCurve* plotCurve() const;
|
|
|
|
const RigWellLogCurveData* curveData() const;
|
2015-09-17 04:34:03 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
QString name() const { return m_curveName; }
|
|
|
|
void updateCurveName();
|
|
|
|
void updatePlotTitle();
|
2015-09-18 06:43:09 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
virtual QString wellName() const = 0;
|
|
|
|
virtual QString wellLogChannelName() const = 0;
|
|
|
|
virtual QString wellDate() const { return ""; };
|
|
|
|
virtual void updatePlotData() = 0;
|
2015-09-01 02:06:02 -05:00
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
protected:
|
2015-10-27 08:44:53 -05:00
|
|
|
virtual QString createCurveName() = 0;
|
2015-09-18 06:02:33 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
void updatePlotConfiguration();
|
|
|
|
void updateCurveVisibility();
|
2015-10-28 10:49:52 -05:00
|
|
|
void zoomAllOwnerTrackAndPlot();
|
2015-10-27 08:44:53 -05:00
|
|
|
void updateOptionSensitivity();
|
2015-12-01 09:22:18 -06:00
|
|
|
void updateCurvePen();
|
2015-08-27 09:13:49 -05:00
|
|
|
|
|
|
|
// Overridden PDM methods
|
2015-09-18 06:02:33 -05:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
|
|
|
virtual caf::PdmFieldHandle* objectToggleField();
|
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField();
|
2015-09-18 06:43:09 -05:00
|
|
|
virtual void initAfterRead();
|
2015-12-01 09:22:18 -06:00
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly);
|
2015-09-01 04:25:09 -05:00
|
|
|
|
2015-08-27 09:13:49 -05:00
|
|
|
|
2015-11-04 08:57:06 -06:00
|
|
|
QPointer<RiuWellLogTrack> m_ownerQwtTrack;
|
2015-11-06 01:32:58 -06:00
|
|
|
RiuLineSegmentQwtPlotCurve* m_qwtPlotCurve;
|
2015-10-15 04:27:12 -05:00
|
|
|
cvf::ref<RigWellLogCurveData> m_curveData;
|
2015-09-18 06:02:33 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
caf::PdmField<bool> m_showCurve;
|
|
|
|
caf::PdmField<QString> m_curveName;
|
|
|
|
caf::PdmField<QString> m_customCurveName;
|
2015-09-22 08:23:52 -05:00
|
|
|
|
2015-10-27 08:44:53 -05:00
|
|
|
caf::PdmField<bool> m_autoName;
|
|
|
|
caf::PdmField<cvf::Color3f> m_curveColor;
|
2015-12-01 09:22:18 -06:00
|
|
|
caf::PdmField<float> m_curveThickness;
|
2015-08-26 05:27:29 -05:00
|
|
|
};
|