2018-03-07 04:32:24 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2018- Statoil ASA
|
|
|
|
//
|
|
|
|
// 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 "cafAppEnum.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
2018-04-17 01:38:13 -05:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
|
|
|
|
2018-03-07 04:32:24 -06:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
|
|
|
class Rim3dWellLogCurve : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum DrawPlane
|
|
|
|
{
|
|
|
|
VERTICAL_ABOVE,
|
|
|
|
VERTICAL_BELOW,
|
2018-04-17 01:46:53 -05:00
|
|
|
HORIZONTAL_LEFT,
|
|
|
|
HORIZONTAL_RIGHT
|
2018-03-07 04:32:24 -06:00
|
|
|
};
|
2018-04-18 01:38:15 -05:00
|
|
|
typedef caf::AppEnum<DrawPlane> DrawPlaneEnum;
|
2018-03-07 04:32:24 -06:00
|
|
|
public:
|
|
|
|
Rim3dWellLogCurve();
|
|
|
|
virtual ~Rim3dWellLogCurve();
|
|
|
|
|
2018-03-13 05:18:25 -05:00
|
|
|
void updateCurveIn3dView();
|
|
|
|
|
2018-04-13 06:45:12 -05:00
|
|
|
DrawPlane drawPlane() const;
|
2018-04-17 01:38:13 -05:00
|
|
|
cvf::Color3f color() const;
|
2018-04-13 06:45:12 -05:00
|
|
|
bool isShowingCurve() const;
|
2018-03-09 08:42:23 -06:00
|
|
|
|
2018-04-17 01:38:13 -05:00
|
|
|
virtual void curveValuesAndMds(std::vector<double>* values, std::vector<double>* measuredDepthValues) const = 0;
|
2018-03-13 03:25:29 -05:00
|
|
|
|
2018-04-17 01:38:13 -05:00
|
|
|
void setColor(const cvf::Color3f& color);
|
2018-04-19 06:42:53 -05:00
|
|
|
|
|
|
|
double minCurveValue() const;
|
|
|
|
double maxCurveValue() const;
|
|
|
|
void resetMinMaxValuesAndUpdateUI();
|
2018-03-15 06:55:50 -05:00
|
|
|
protected:
|
2018-03-07 07:24:18 -06:00
|
|
|
virtual caf::PdmFieldHandle* objectToggleField() override;
|
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
2018-04-18 01:38:15 -05:00
|
|
|
void configurationUiOrdering(caf::PdmUiOrdering& uiOrdering);
|
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
2018-04-19 06:42:53 -05:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute);
|
|
|
|
private:
|
|
|
|
void resetMinMaxValues();
|
2018-03-15 06:55:50 -05:00
|
|
|
protected:
|
|
|
|
caf::PdmField<QString> m_name;
|
2018-03-15 08:17:56 -05:00
|
|
|
caf::PdmField<caf::AppEnum<DrawPlane>> m_drawPlane;
|
2018-04-17 01:38:13 -05:00
|
|
|
caf::PdmField<cvf::Color3f> m_color;
|
2018-04-19 06:42:53 -05:00
|
|
|
caf::PdmField<double> m_minCurveValue;
|
|
|
|
caf::PdmField<double> m_maxCurveValue;
|
|
|
|
double m_minCurveDataValue;
|
|
|
|
double m_maxCurveDataValue;
|
2018-03-15 06:55:50 -05:00
|
|
|
|
2018-03-07 04:32:24 -06:00
|
|
|
private:
|
2018-03-07 07:24:18 -06:00
|
|
|
caf::PdmField<bool> m_showCurve;
|
2018-04-19 06:42:53 -05:00
|
|
|
|
2018-03-07 04:32:24 -06:00
|
|
|
};
|