2018-08-06 07:52:02 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// Copyright (C) 2018 - Equinor 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
|
|
|
|
|
|
2018-10-09 13:42:03 +02:00
|
|
|
#include "RimWellPathComponentInterface.h"
|
2018-10-09 11:06:10 +02:00
|
|
|
|
2018-08-06 07:52:02 +02:00
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
|
|
|
|
|
#include "cafAppEnum.h"
|
|
|
|
|
#include "cvfBase.h"
|
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
|
2018-10-05 10:26:26 +02:00
|
|
|
class RimWellPath;
|
|
|
|
|
|
2018-10-09 13:42:03 +02:00
|
|
|
class RimWellPathAttribute : public caf::PdmObject, public RimWellPathComponentInterface
|
2018-08-06 07:52:02 +02:00
|
|
|
{
|
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
public:
|
2018-08-30 13:54:00 +02:00
|
|
|
static double MAX_DIAMETER_IN_INCHES;
|
|
|
|
|
static double MIN_DIAMETER_IN_INCHES;
|
2018-10-09 13:42:03 +02:00
|
|
|
typedef caf::AppEnum<RiaDefines::WellPathComponentType> CompletionTypeEnum;
|
2018-08-06 07:52:02 +02:00
|
|
|
|
|
|
|
|
RimWellPathAttribute();
|
2018-10-18 19:45:57 +02:00
|
|
|
~RimWellPathAttribute() override;
|
2018-08-06 07:52:02 +02:00
|
|
|
|
2018-10-05 15:59:19 +02:00
|
|
|
double diameterInInches() const;
|
|
|
|
|
QString diameterLabel() const;
|
|
|
|
|
bool operator<(const RimWellPathAttribute& rhs) const;
|
|
|
|
|
void setDepthsFromWellPath(const RimWellPath* wellPath);
|
2018-08-30 13:54:00 +02:00
|
|
|
|
2018-10-09 11:06:10 +02:00
|
|
|
// Overrides from RimWellPathCompletionInterface
|
2018-11-22 12:57:11 +01:00
|
|
|
bool isEnabled() const override;
|
2018-10-10 08:44:26 +02:00
|
|
|
RiaDefines::WellPathComponentType componentType() const override;
|
|
|
|
|
QString componentLabel() const override;
|
|
|
|
|
QString componentTypeLabel() const override;
|
2018-10-10 16:57:43 +02:00
|
|
|
cvf::Color3f defaultComponentColor() const override;
|
|
|
|
|
double startMD() const override;
|
|
|
|
|
double endMD() const override;
|
|
|
|
|
|
2018-08-06 07:52:02 +02:00
|
|
|
private:
|
2018-11-22 12:57:11 +01:00
|
|
|
bool isDiameterSupported() const;
|
2018-10-18 19:45:57 +02:00
|
|
|
QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
2018-11-22 12:57:11 +01:00
|
|
|
static QString generateInchesLabel(double diameter);
|
2018-10-18 19:45:57 +02:00
|
|
|
void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
|
|
|
|
void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
2018-08-06 07:52:02 +02:00
|
|
|
|
2018-08-30 14:03:58 +02:00
|
|
|
private:
|
2018-10-09 11:06:10 +02:00
|
|
|
caf::PdmField<CompletionTypeEnum> m_type;
|
|
|
|
|
caf::PdmField<double> m_startMD;
|
|
|
|
|
caf::PdmField<double> m_endMD;
|
|
|
|
|
caf::PdmField<double> m_diameterInInches;
|
2018-08-06 07:52:02 +02:00
|
|
|
};
|
|
|
|
|
|
2018-10-03 15:57:09 +02:00
|
|
|
|