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-09-10 15:29:50 +02:00
|
|
|
#include "cafAppEnum.h"
|
2015-08-27 16:13:49 +02:00
|
|
|
|
|
|
|
|
#include <QPointer>
|
2015-12-02 13:39:16 +01:00
|
|
|
#include "RimDefines.h"
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2016-05-24 10:37:10 +02:00
|
|
|
#include "RimViewWindow.h"
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
class RiuWellLogPlot;
|
2015-11-04 15:57:06 +01:00
|
|
|
class RimWellLogTrack;
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2015-08-26 12:27:29 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2016-05-24 10:37:10 +02:00
|
|
|
class RimWellLogPlot : public RimViewWindow
|
2015-08-26 12:27:29 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2015-09-10 15:29:50 +02:00
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
enum DepthTypeEnum
|
|
|
|
|
{
|
|
|
|
|
MEASURED_DEPTH,
|
|
|
|
|
TRUE_VERTICAL_DEPTH
|
|
|
|
|
};
|
|
|
|
|
|
2016-07-05 10:47:03 +02:00
|
|
|
|
2015-08-26 12:27:29 +02:00
|
|
|
public:
|
2015-08-27 16:13:49 +02:00
|
|
|
RimWellLogPlot();
|
|
|
|
|
virtual ~RimWellLogPlot();
|
|
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
void setDescription(const QString& description);
|
2015-09-04 16:45:09 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
DepthTypeEnum depthType() const;
|
2015-12-02 15:07:12 +01:00
|
|
|
|
2015-12-02 13:39:16 +01:00
|
|
|
RimDefines::DepthUnitType depthUnit() const;
|
2015-12-02 15:07:12 +01:00
|
|
|
void setDepthUnit(RimDefines::DepthUnitType depthUnit);
|
|
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
QString depthPlotTitle() const;
|
2015-08-28 14:25:14 +02:00
|
|
|
|
2015-11-04 15:57:06 +01:00
|
|
|
void addTrack(RimWellLogTrack* track);
|
|
|
|
|
void insertTrack(RimWellLogTrack* track, size_t index);
|
2015-10-27 14:44:53 +01:00
|
|
|
size_t trackCount() { return m_tracks.size();}
|
2015-11-04 15:57:06 +01:00
|
|
|
void removeTrack(RimWellLogTrack* track);
|
|
|
|
|
size_t trackIndex(RimWellLogTrack* track);
|
|
|
|
|
void moveTracks(RimWellLogTrack* insertAfterTrack, const std::vector<RimWellLogTrack*>& tracksToMove);
|
2015-08-31 02:06:37 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
void loadDataAndUpdate();
|
|
|
|
|
void updateTracks();
|
|
|
|
|
void updateTrackNames();
|
2015-09-01 14:50:26 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
RiuWellLogPlot* viewer();
|
2015-09-01 14:50:26 +02:00
|
|
|
|
2015-12-07 12:03:33 +01:00
|
|
|
void updateDepthZoom();
|
2015-10-27 14:44:53 +01:00
|
|
|
void setDepthZoomByFactorAndCenter(double zoomFactor, double zoomCenter);
|
|
|
|
|
void panDepth(double panFactor);
|
|
|
|
|
void setDepthZoomMinMax(double minimumDepth, double maximumDepth);
|
|
|
|
|
void depthZoomMinMax(double* minimumDepth, double* maximumDepth) const;
|
2015-09-16 12:56:48 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
void calculateAvailableDepthRange();
|
|
|
|
|
void availableDepthRange(double* minimumDepth, double* maximumDepth) const;
|
|
|
|
|
bool hasAvailableDepthRange() const;
|
2015-09-16 12:56:48 +02:00
|
|
|
|
2016-07-05 10:47:03 +02:00
|
|
|
virtual void zoomAll() override;
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// Overridden PDM methods
|
2015-10-27 14:44:53 +01:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
|
|
|
|
virtual void setupBeforeSave();
|
|
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
|
|
|
|
virtual caf::PdmFieldHandle* objectToggleField();
|
|
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_userName; }
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2016-06-27 21:01:17 +02:00
|
|
|
virtual QImage snapshotWindowContent() override;
|
|
|
|
|
|
|
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
private:
|
2015-10-27 14:44:53 +01:00
|
|
|
void updateViewerWidget();
|
|
|
|
|
void updateViewerWidgetWindowTitle();
|
2015-12-07 12:03:33 +01:00
|
|
|
void applyZoomAllDepths();
|
|
|
|
|
void applyDepthZoomFromVisibleDepth();
|
2015-10-27 14:44:53 +01:00
|
|
|
void recreateTrackPlots();
|
|
|
|
|
void detachAllCurves();
|
|
|
|
|
void handleViewerDeletion();
|
2015-09-02 15:53:49 +02:00
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
private:
|
2015-10-27 14:44:53 +01:00
|
|
|
caf::PdmField<bool> m_showWindow;
|
2015-09-10 15:29:50 +02:00
|
|
|
caf::PdmField<QString> m_userName;
|
2015-12-02 13:39:16 +01:00
|
|
|
|
|
|
|
|
caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType;
|
|
|
|
|
caf::PdmField< caf::AppEnum< RimDefines::DepthUnitType > > m_depthUnit;
|
|
|
|
|
|
|
|
|
|
caf::PdmChildArrayField<RimWellLogTrack*> m_tracks;
|
2015-09-01 14:50:26 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
caf::PdmField<double> m_minVisibleDepth;
|
|
|
|
|
caf::PdmField<double> m_maxVisibleDepth;
|
2015-12-07 12:03:33 +01:00
|
|
|
caf::PdmField<bool> m_isAutoScaleDepthEnabled;
|
2015-10-27 14:44:53 +01:00
|
|
|
|
|
|
|
|
double m_minAvailableDepth;
|
|
|
|
|
double m_maxAvailableDepth;
|
2015-09-08 11:11:42 +02:00
|
|
|
|
|
|
|
|
friend class RiuWellLogPlot;
|
2015-10-27 14:44:53 +01:00
|
|
|
QPointer<RiuWellLogPlot> m_viewer;
|
|
|
|
|
|
2015-08-26 12:27:29 +02:00
|
|
|
};
|