2015-08-26 12:27:29 +02: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 16:13:49 +02:00
|
|
|
#include "cafPdmField.h"
|
2015-08-27 16:43:54 +02:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
|
|
2015-08-31 02:06:37 +02:00
|
|
|
#include <QPointer>
|
|
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
2015-11-04 16:19:38 +01:00
|
|
|
class RimWellLogCurve;
|
2015-11-04 15:57:06 +01:00
|
|
|
class RiuWellLogTrack;
|
2015-08-26 12:27:29 +02:00
|
|
|
|
2015-09-17 11:34:03 +02:00
|
|
|
class QwtPlotCurve;
|
|
|
|
|
|
2015-08-26 12:27:29 +02:00
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2015-11-04 15:57:06 +01:00
|
|
|
class RimWellLogTrack : public caf::PdmObject
|
2015-08-26 12:27:29 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
public:
|
2015-11-04 15:57:06 +01:00
|
|
|
RimWellLogTrack();
|
|
|
|
|
virtual ~RimWellLogTrack();
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2015-09-18 11:07:21 +02:00
|
|
|
void setDescription(const QString& description);
|
2015-10-29 10:29:48 +01:00
|
|
|
bool isVisible();
|
2015-11-04 16:19:38 +01:00
|
|
|
void addCurve(RimWellLogCurve* curve);
|
|
|
|
|
void insertCurve(RimWellLogCurve* curve, size_t index);
|
|
|
|
|
void removeCurve(RimWellLogCurve* curve);
|
|
|
|
|
size_t curveIndex(RimWellLogCurve* curve);
|
2015-09-02 16:46:30 +02:00
|
|
|
size_t curveCount() { return curves.size(); }
|
|
|
|
|
|
2015-09-03 14:21:08 +02:00
|
|
|
void recreateViewer();
|
2015-09-03 15:10:02 +02:00
|
|
|
void detachAllCurves();
|
|
|
|
|
|
2015-09-03 08:09:06 +02:00
|
|
|
void loadDataAndUpdate();
|
|
|
|
|
|
2015-10-28 16:49:52 +01:00
|
|
|
void availableDepthRange(double* minimumDepth, double* maximumDepth);
|
2016-09-13 09:59:34 +02:00
|
|
|
void updateXZoomAndParentPlotDepthZoom();
|
|
|
|
|
void updateXZoom();
|
2015-08-31 02:06:37 +02:00
|
|
|
|
2015-11-04 15:57:06 +01:00
|
|
|
RiuWellLogTrack* viewer();
|
2015-09-17 11:34:03 +02:00
|
|
|
|
2015-11-04 16:19:38 +01:00
|
|
|
RimWellLogCurve* curveDefinitionFromCurve(const QwtPlotCurve* curve) const;
|
2015-08-31 02:06:37 +02:00
|
|
|
|
2015-12-09 11:32:46 +01:00
|
|
|
void setLogarithmicScale(bool enable);
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
protected:
|
|
|
|
|
// Overridden PDM methods
|
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
2015-12-09 07:55:35 +01:00
|
|
|
|
2015-12-09 10:14:58 +01:00
|
|
|
void computeAndSetXRangeMinForLogarithmicScale();
|
2015-12-09 07:55:35 +01:00
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
virtual caf::PdmFieldHandle* objectToggleField();
|
2015-09-18 11:07:21 +02:00
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField();
|
2015-09-18 11:41:14 +02:00
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2015-09-22 11:54:58 +02:00
|
|
|
private:
|
2015-12-09 07:55:35 +01:00
|
|
|
void updateAxisScaleEngine();
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
private:
|
2015-09-11 10:44:10 +02:00
|
|
|
caf::PdmField<bool> m_show;
|
2015-09-18 11:07:21 +02:00
|
|
|
caf::PdmField<QString> m_userName;
|
2015-11-04 16:19:38 +01:00
|
|
|
caf::PdmChildArrayField<RimWellLogCurve*> curves;
|
2015-09-18 11:41:14 +02:00
|
|
|
caf::PdmField<double> m_visibleXRangeMin;
|
|
|
|
|
caf::PdmField<double> m_visibleXRangeMax;
|
2015-12-01 16:51:51 +01:00
|
|
|
caf::PdmField<bool> m_isAutoScaleXEnabled;
|
2015-12-09 07:55:35 +01:00
|
|
|
caf::PdmField<bool> m_isLogarithmicScaleEnabled;
|
2015-09-02 16:46:30 +02:00
|
|
|
|
2015-11-04 15:57:06 +01:00
|
|
|
QPointer<RiuWellLogTrack> m_wellLogTrackPlotWidget;
|
2015-08-26 12:27:29 +02:00
|
|
|
};
|