2015-08-28 07:25:14 -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 "qwt_plot.h"
|
2016-11-22 04:56:37 -06:00
|
|
|
|
2015-10-30 15:35:43 -05:00
|
|
|
#include "cafPdmPointer.h"
|
2015-08-28 07:25:14 -05:00
|
|
|
|
2015-11-04 08:57:06 -06:00
|
|
|
class RimWellLogTrack;
|
2016-11-22 04:56:37 -06:00
|
|
|
|
2015-08-31 08:23:20 -05:00
|
|
|
class QwtLegend;
|
2016-11-22 04:56:37 -06:00
|
|
|
class QwtPicker;
|
|
|
|
class QwtPlotGrid;
|
|
|
|
class QwtPlotMarker;
|
2015-08-31 04:39:59 -05:00
|
|
|
|
2015-09-04 08:57:34 -05:00
|
|
|
class QEvent;
|
|
|
|
|
2015-08-28 07:25:14 -05:00
|
|
|
//==================================================================================================
|
|
|
|
//
|
2015-09-18 05:29:23 -05:00
|
|
|
//
|
2015-08-28 07:25:14 -05:00
|
|
|
//
|
|
|
|
//==================================================================================================
|
2015-11-04 08:57:06 -06:00
|
|
|
class RiuWellLogTrack : public QwtPlot
|
2015-08-28 07:25:14 -05:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2015-11-04 08:57:06 -06:00
|
|
|
RiuWellLogTrack(RimWellLogTrack* plotTrackDefinition, QWidget* parent = NULL);
|
|
|
|
virtual ~RiuWellLogTrack();
|
2015-08-28 07:25:14 -05:00
|
|
|
|
2015-10-30 15:35:43 -05:00
|
|
|
void setDepthZoom(double minDepth, double maxDepth);
|
|
|
|
void setDepthTitle(const QString& title);
|
2015-08-31 10:21:21 -05:00
|
|
|
|
2015-10-30 15:35:43 -05:00
|
|
|
void setXRange(double min, double max);
|
2015-09-22 04:54:58 -05:00
|
|
|
|
2015-10-30 15:35:43 -05:00
|
|
|
bool isRimTrackVisible();
|
2015-09-22 04:54:58 -05:00
|
|
|
|
2015-09-04 08:57:34 -05:00
|
|
|
protected:
|
2015-10-30 15:35:43 -05:00
|
|
|
virtual bool eventFilter(QObject* watched, QEvent* event);
|
|
|
|
virtual void focusInEvent(QFocusEvent* event);
|
|
|
|
virtual QSize sizeHint() const;
|
|
|
|
virtual QSize minimumSizeHint() const;
|
2016-11-22 04:56:37 -06:00
|
|
|
virtual void leaveEvent(QEvent *) override;
|
2015-09-04 08:57:34 -05:00
|
|
|
|
2015-08-31 02:34:41 -05:00
|
|
|
private:
|
2016-11-22 04:56:37 -06:00
|
|
|
friend class RiuWellLogTrackQwtPicker;
|
|
|
|
QPointF closestCurvePoint(const QPoint& pos, QString* valueString, QString* depthString) const;
|
|
|
|
void updateClosestCurvePointMarker(const QPointF& pos);
|
|
|
|
|
2015-10-30 15:35:43 -05:00
|
|
|
void setDefaults();
|
|
|
|
void selectClosestCurve(const QPoint& pos);
|
2015-08-31 04:39:59 -05:00
|
|
|
|
|
|
|
private:
|
2016-06-22 04:28:19 -05:00
|
|
|
caf::PdmPointer<RimWellLogTrack> m_plotTrackDefinition;
|
2015-10-30 15:35:43 -05:00
|
|
|
QwtPlotGrid* m_grid;
|
2016-11-22 04:56:37 -06:00
|
|
|
QwtPicker* m_plotPicker;
|
|
|
|
QwtPlotMarker* m_plotMarker;
|
2015-08-28 07:25:14 -05:00
|
|
|
};
|
|
|
|
|