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>
|
|
|
|
|
|
|
|
|
|
class RiuWellLogPlot;
|
2015-09-18 12:29:23 +02:00
|
|
|
class RimWellLogPlotTrack;
|
2015-08-27 16:13:49 +02:00
|
|
|
|
2015-08-26 12:27:29 +02:00
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
///
|
|
|
|
|
///
|
|
|
|
|
//==================================================================================================
|
2015-08-27 16:13:49 +02:00
|
|
|
class RimWellLogPlot : public caf::PdmObject
|
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
|
|
|
|
|
};
|
|
|
|
|
|
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;
|
|
|
|
|
QString depthPlotTitle() const;
|
2015-08-28 14:25:14 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
caf::PdmField< std::vector<int> > windowGeometry;
|
2015-09-03 08:09:06 +02:00
|
|
|
|
2015-10-27 14:44:53 +01:00
|
|
|
void addTrack(RimWellLogPlotTrack* track);
|
|
|
|
|
void insertTrack(RimWellLogPlotTrack* track, size_t index);
|
|
|
|
|
size_t trackCount() { return m_tracks.size();}
|
|
|
|
|
void removeTrack(RimWellLogPlotTrack* track);
|
2015-10-28 17:28:00 +01:00
|
|
|
size_t trackIndex(RimWellLogPlotTrack* track);
|
2015-10-27 14:44:53 +01:00
|
|
|
void moveTracks(RimWellLogPlotTrack* insertAfterTrack, const std::vector<RimWellLogPlotTrack*>& 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-10-27 14:44:53 +01:00
|
|
|
void zoomAllDepth();
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
private:
|
2015-10-27 14:44:53 +01:00
|
|
|
void updateViewerWidget();
|
|
|
|
|
void updateViewerWidgetWindowTitle();
|
|
|
|
|
void updateDepthZoomInQwt();
|
|
|
|
|
void recreateTrackPlots();
|
|
|
|
|
void detachAllCurves();
|
|
|
|
|
void handleViewerDeletion();
|
2015-09-02 15:53:49 +02:00
|
|
|
|
2015-08-27 16:13:49 +02:00
|
|
|
private:
|
2015-09-02 16:46:30 +02:00
|
|
|
|
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;
|
|
|
|
|
caf::PdmField< caf::AppEnum< DepthTypeEnum > > m_depthType;
|
2015-10-27 14:44:53 +01:00
|
|
|
caf::PdmChildArrayField<RimWellLogPlotTrack*> 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;
|
|
|
|
|
|
|
|
|
|
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
|
|
|
};
|