mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge dev into pre-proto
This commit is contained in:
@@ -45,6 +45,8 @@ RimWellPathCompletions::RimWellPathCompletions()
|
||||
CAF_PDM_InitFieldNoDefault(&m_fractureCollection, "Fractures", "Fractures", "", "", "");
|
||||
m_fractureCollection = new RimWellPathFractureCollection;
|
||||
m_fractureCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitField(&m_wellNameForExport, "WellNameForExport", QString(), "Well Name for Completion Export", "", "", "");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -67,6 +69,22 @@ RimPerforationCollection* RimWellPathCompletions::perforationCollection() const
|
||||
return m_perforationCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCompletions::setWellNameForExport(const QString& name)
|
||||
{
|
||||
m_wellNameForExport = name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPathCompletions::wellNameForExport() const
|
||||
{
|
||||
return m_wellNameForExport();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -75,4 +93,4 @@ RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() cons
|
||||
CVF_ASSERT(m_fractureCollection);
|
||||
|
||||
return m_fractureCollection;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmChildField.h"
|
||||
|
||||
class RimFishbonesCollection;
|
||||
@@ -40,8 +41,13 @@ public:
|
||||
RimPerforationCollection* perforationCollection() const;
|
||||
RimWellPathFractureCollection* fractureCollection() const;
|
||||
|
||||
void setWellNameForExport(const QString& name);
|
||||
QString wellNameForExport() const;
|
||||
|
||||
private:
|
||||
caf::PdmChildField<RimFishbonesCollection*> m_fishbonesCollection;
|
||||
caf::PdmChildField<RimPerforationCollection*> m_perforationCollection;
|
||||
caf::PdmChildField<RimWellPathFractureCollection*> m_fractureCollection;
|
||||
|
||||
caf::PdmField<QString> m_wellNameForExport;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimTreeViewStateSerializer.h"
|
||||
|
||||
#include <QTreeView>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -125,5 +144,3 @@ void RimTreeViewStateSerializer::encodeStringFromModelIndex(const QModelIndex mi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,21 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017 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 <QModelIndex>
|
||||
@@ -12,7 +30,7 @@ public:
|
||||
static void applyTreeViewStateFromString(QTreeView* treeView, const QString& treeViewState);
|
||||
static void storeTreeViewStateToString (const QTreeView* treeView, QString& treeViewState);
|
||||
|
||||
static QModelIndex getModelIndexFromString(QAbstractItemModel* model, const QString& currentIndexString);
|
||||
static void encodeStringFromModelIndex(const QModelIndex mi, QString& currentIndexString);
|
||||
static QModelIndex getModelIndexFromString(QAbstractItemModel* model, const QString& currentIndexString);
|
||||
static void encodeStringFromModelIndex(const QModelIndex mi, QString& currentIndexString);
|
||||
};
|
||||
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimView.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
@@ -148,7 +148,7 @@ bool RimWellLogFile::readFile(QString* errorMessage)
|
||||
{
|
||||
if (wellPath->filepath().isEmpty())
|
||||
{
|
||||
wellPath->name = m_wellName;
|
||||
wellPath->setName(m_wellName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +57,11 @@ RimWellPath::RimWellPath()
|
||||
{
|
||||
CAF_PDM_InitObject("WellPath", ":/Well.png", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&name, "WellPathName", "Name", "", "", "");
|
||||
name.uiCapability()->setUiReadOnly(true);
|
||||
name.xmlCapability()->setIOWritable(false);
|
||||
name.xmlCapability()->setIOReadable(false);
|
||||
name.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&m_name, "WellPathName", "Name", "", "", "");
|
||||
m_name.uiCapability()->setUiReadOnly(true);
|
||||
m_name.xmlCapability()->setIOWritable(false);
|
||||
m_name.xmlCapability()->setIOReadable(false);
|
||||
m_name.uiCapability()->setUiHidden(true);
|
||||
CAF_PDM_InitFieldNoDefault(&id, "WellPathId", "Id", "", "", "");
|
||||
id.uiCapability()->setUiReadOnly(true);
|
||||
id.xmlCapability()->setIOWritable(false);
|
||||
@@ -150,7 +150,7 @@ RimWellPath::~RimWellPath()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellPath::userDescriptionField()
|
||||
{
|
||||
return &name;
|
||||
return &m_name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -205,6 +205,14 @@ const RimPerforationCollection* RimWellPath::perforationIntervalCollection() con
|
||||
return m_completions->perforationCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const RimWellPathCompletions* RimWellPath::completions() const
|
||||
{
|
||||
return m_completions();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -265,6 +273,23 @@ void RimWellPath::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimWellPath::name() const
|
||||
{
|
||||
return m_name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPath::setName(const QString& name)
|
||||
{
|
||||
m_name = name;
|
||||
m_completions->setWellNameForExport(name);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -284,7 +309,7 @@ bool RimWellPath::readWellPathFile(QString* errorMessage, RifWellPathImporter* w
|
||||
RifWellPathImporter::WellMetaData wellMetaData = wellPathImporter->readWellMetaData(filepath(), wellPathIndexInFile());
|
||||
// General well info
|
||||
|
||||
name = wellData.m_name;
|
||||
setName(wellData.m_name);
|
||||
id = wellMetaData.m_id;
|
||||
sourceSystem = wellMetaData.m_sourceSystem;
|
||||
utmZone = wellMetaData.m_utmZone;
|
||||
@@ -488,5 +513,5 @@ void RimWellPath::setLogFileInfo(RimWellLogFile* logFileInfo)
|
||||
m_wellLogFile = logFileInfo;
|
||||
m_wellLogFile->uiCapability()->setUiHidden(true);
|
||||
|
||||
this->name = m_wellLogFile->wellName();
|
||||
setName(m_wellLogFile->wellName());
|
||||
}
|
||||
|
||||
@@ -66,7 +66,8 @@ public:
|
||||
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue );
|
||||
|
||||
caf::PdmField<QString> name;
|
||||
QString name() const;
|
||||
void setName(const QString& name);
|
||||
|
||||
caf::PdmField<QString> filepath;
|
||||
caf::PdmField<int> wellPathIndexInFile; // -1 means none.
|
||||
@@ -83,6 +84,7 @@ public:
|
||||
const RimFishbonesCollection* fishbonesCollection() const;
|
||||
RimPerforationCollection* perforationIntervalCollection();
|
||||
const RimPerforationCollection* perforationIntervalCollection() const;
|
||||
const RimWellPathCompletions* completions() const;
|
||||
RimWellPathFractureCollection* fractureCollection();
|
||||
|
||||
RigWellPath* wellPathGeometry();
|
||||
@@ -127,5 +129,5 @@ private:
|
||||
|
||||
cvf::ref<RigWellPath> m_wellPath;
|
||||
cvf::ref<RivWellPathPartMgr> m_wellPathPartMgr;
|
||||
|
||||
caf::PdmField<QString> m_name;
|
||||
};
|
||||
|
||||
@@ -159,7 +159,7 @@ void RimWellPathCollection::readWellPathFiles()
|
||||
}
|
||||
}
|
||||
|
||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name));
|
||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPaths[wpIdx]->name()));
|
||||
progress.incrementProgress();
|
||||
}
|
||||
|
||||
@@ -248,10 +248,10 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimWellPath*>& wellP
|
||||
RimWellPath* wellPath = wellPathArray[wpIdx];
|
||||
wellPath->readWellPathFile(NULL, m_wellPathImporter);
|
||||
|
||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPath->name));
|
||||
progress.setProgressDescription(QString("Reading file %1").arg(wellPath->name()));
|
||||
|
||||
// If a well path with this name exists already, make it read the well path file
|
||||
RimWellPath* existingWellPath = wellPathByName(wellPath->name);
|
||||
RimWellPath* existingWellPath = wellPathByName(wellPath->name());
|
||||
if (existingWellPath)
|
||||
{
|
||||
existingWellPath->filepath = wellPath->filepath;
|
||||
|
||||
Reference in New Issue
Block a user