Remove SSIHUB-related classes.

This commit is contained in:
Kristian Bendiksen 2024-07-29 11:30:28 +02:00
parent 4aadf6e801
commit 1d7b40fbdd
14 changed files with 17 additions and 757 deletions

View File

@ -1,19 +1,11 @@
set(SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RicWellPathsImportOsduFeature.h
${CMAKE_CURRENT_LIST_DIR}/RimOilFieldEntry.h
${CMAKE_CURRENT_LIST_DIR}/RimOilRegionEntry.h
${CMAKE_CURRENT_LIST_DIR}/RimWellPathImport.h
${CMAKE_CURRENT_LIST_DIR}/RimWellsEntry.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellImportWizard.h
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogImportWizard.h
)
set(SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RicWellPathsImportOsduFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RimOilFieldEntry.cpp
${CMAKE_CURRENT_LIST_DIR}/RimOilRegionEntry.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellPathImport.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellsEntry.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellImportWizard.cpp
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogImportWizard.cpp
)

View File

@ -33,7 +33,6 @@
#include "RimProject.h"
#include "RimTools.h"
#include "RimWellPathCollection.h"
#include "RimWellPathImport.h"
#include "RiuMainWindow.h"
#include "RiuWellImportWizard.h"
@ -55,17 +54,6 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
RiaApplication* app = RiaApplication::instance();
if ( !app->project() ) return;
// Update the UTM bounding box from the reservoir
app->project()->computeUtmAreaOfInterest();
QString wellPathsFolderPath = QStandardPaths::writableLocation( QStandardPaths::CacheLocation ) + QString( "/wellpaths/" );
QDir::root().mkpath( wellPathsFolderPath );
if ( !app->project()->wellPathImport() ) return;
// Keep a copy of the import settings, and restore if cancel is pressed in the import wizard
QString copyOfOriginalObject = app->project()->wellPathImport()->writeObjectToXmlString();
if ( !app->preferences() ) return;
RimProject* project = RimProject::current();
@ -78,7 +66,7 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
RiaOsduConnector* osduConnector = app->makeOsduConnector();
RiuWellImportWizard wellImportwizard( wellPathsFolderPath, osduConnector, app->project()->wellPathImport(), RiuMainWindow::instance() );
RiuWellImportWizard wellImportwizard( osduConnector, RiuMainWindow::instance() );
if ( QDialog::Accepted == wellImportwizard.exec() )
{
@ -115,10 +103,6 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
project->updateConnectedEditors();
app->project()->scheduleCreateDisplayModelAndRedrawAllViews();
}
else
{
app->project()->wellPathImport()->readObjectFromXmlString( copyOfOriginalObject, caf::PdmDefaultObjectFactory::instance() );
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -1,119 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011- Statoil ASA
// Copyright (C) 2013- Ceetron Solutions AS
// Copyright (C) 2011-2012 Ceetron 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 "RimOilFieldEntry.h"
#include "RimWellPathImport.h"
#include "RifJsonEncodeDecode.h"
#include <QDebug>
#include <QFile>
#include <QFileInfo>
#include <QMap>
CAF_PDM_SOURCE_INIT( RimOilFieldEntry, "RimOilFieldEntry" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimOilFieldEntry::RimOilFieldEntry()
{
CAF_PDM_InitObject( "OilFieldEntry" );
CAF_PDM_InitFieldNoDefault( &name, "OilFieldName", "Oil Field Name" );
CAF_PDM_InitFieldNoDefault( &edmId, "EdmId", "Edm ID" );
CAF_PDM_InitField( &selected, "Selected", false, "Selected" );
CAF_PDM_InitFieldNoDefault( &wellsFilePath, "wellsFilePath", "Wells File Path" );
CAF_PDM_InitFieldNoDefault( &wells, "Wells", "" );
wells.uiCapability()->setUiTreeChildrenHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimOilFieldEntry::userDescriptionField()
{
return &name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimOilFieldEntry::objectToggleField()
{
return &selected;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOilFieldEntry::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
if ( changedField == &selected )
{
updateEnabledState();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOilFieldEntry::initAfterRead()
{
updateEnabledState();
updateUiIconFromToggleField();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOilFieldEntry::updateEnabledState()
{
bool wellsReadOnly = !selected;
if ( isUiReadOnly() )
{
wellsReadOnly = true;
}
for ( size_t i = 0; i < wells.size(); i++ )
{
wells[i]->setUiReadOnly( wellsReadOnly );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathEntry* RimOilFieldEntry::find( const QString& entryName, RimWellPathEntry::WellTypeEnum wellPathType )
{
for ( size_t i = 0; i < wells.size(); i++ )
{
RimWellPathEntry* wellPathEntry = wells[i];
if ( wellPathEntry->name == entryName && wellPathEntry->wellPathType == wellPathType )
{
return wellPathEntry;
}
}
return nullptr;
}

View File

@ -1,50 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "RimWellsEntry.h"
class RimOilFieldEntry : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimOilFieldEntry();
caf::PdmField<QString> name;
caf::PdmField<QString> edmId;
caf::PdmField<bool> selected;
caf::PdmField<QString> wellsFilePath; // Location of the response file from request "/wells"
caf::PdmChildArrayField<RimWellPathEntry*> wells;
RimWellPathEntry* find( const QString& name, RimWellPathEntry::WellTypeEnum wellPathType );
caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* objectToggleField() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void initAfterRead() override;
// private:
void updateEnabledState();
};

View File

@ -1,75 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "RimOilRegionEntry.h"
#include "RimOilFieldEntry.h"
CAF_PDM_SOURCE_INIT( RimOilRegionEntry, "RimOilRegionEntry" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimOilRegionEntry::RimOilRegionEntry()
{
CAF_PDM_InitObject( "OilRegionEntry" );
CAF_PDM_InitFieldNoDefault( &name, "OilRegionEntry", "OilRegionEntry" );
CAF_PDM_InitFieldNoDefault( &fields, "Fields", "" );
CAF_PDM_InitField( &selected, "Selected", false, "Selected" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimOilRegionEntry::userDescriptionField()
{
return &name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimOilRegionEntry::objectToggleField()
{
return &selected;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOilRegionEntry::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
if ( &selected == changedField )
{
updateState();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimOilRegionEntry::updateState()
{
for ( size_t i = 0; i < fields.size(); i++ )
{
fields[i]->setUiReadOnly( !selected );
fields[i]->updateEnabledState();
}
}

View File

@ -1,44 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
class RimOilFieldEntry;
class RimOilRegionEntry : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimOilRegionEntry();
caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* objectToggleField() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void updateState();
caf::PdmField<QString> name;
caf::PdmField<bool> selected;
caf::PdmChildArrayField<RimOilFieldEntry*> fields;
};

View File

@ -1,105 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2024 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.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimWellPathImport.h"
#include "RimFileWellPath.h"
#include "RimOilFieldEntry.h"
#include "RimOilRegionEntry.h"
#include "RimTools.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
#include "cafPdmUiCheckBoxEditor.h"
#include "cafPdmUiTreeAttributes.h"
#include "cafPdmUiTreeViewEditor.h"
#include <QFileInfo>
namespace caf
{
template <>
void caf::AppEnum<RimWellPathImport::UtmFilterEnum>::setUp()
{
addItem( RimWellPathImport::UTM_FILTER_OFF, "UTM_FILTER_OFF", "Off" );
addItem( RimWellPathImport::UTM_FILTER_PROJECT, "UTM_FILTER_PROJECT", "Project" );
addItem( RimWellPathImport::UTM_FILTER_CUSTOM, "UTM_FILTER_CUSTOM", "Custom" );
setDefault( RimWellPathImport::UTM_FILTER_PROJECT );
}
} // End namespace caf
CAF_PDM_SOURCE_INIT( RimWellPathImport, "RimWellPathImport" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathImport::RimWellPathImport()
{
CAF_PDM_InitObject( "RimWellPathImport" );
caf::AppEnum<RimWellPathImport::UtmFilterEnum> defaultUtmMode = UTM_FILTER_OFF;
CAF_PDM_InitField( &utmFilterMode, "UtmMode", defaultUtmMode, "Utm Filter" );
CAF_PDM_InitField( &north, "UtmNorth", 0.0, "North" );
CAF_PDM_InitField( &south, "UtmSouth", 0.0, "South" );
CAF_PDM_InitField( &east, "UtmEast", 0.0, "East" );
CAF_PDM_InitField( &west, "UtmWest", 0.0, "West" );
CAF_PDM_InitFieldNoDefault( &regions_OBSOLETE, "Regions", "" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathImport::initAfterRead()
{
updateFieldVisibility();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathImport::updateFieldVisibility()
{
if ( utmFilterMode == UTM_FILTER_CUSTOM )
{
north.uiCapability()->setUiReadOnly( false );
south.uiCapability()->setUiReadOnly( false );
east.uiCapability()->setUiReadOnly( false );
west.uiCapability()->setUiReadOnly( false );
}
else
{
north.uiCapability()->setUiReadOnly( true );
south.uiCapability()->setUiReadOnly( true );
east.uiCapability()->setUiReadOnly( true );
west.uiCapability()->setUiReadOnly( true );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellPathImport::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
{
if ( changedField == &utmFilterMode )
{
updateFieldVisibility();
}
}

View File

@ -1,56 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "cafAppEnum.h"
#include "cafPdmChildArrayField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
class RimOilRegionEntry;
class RimWellPathImport : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
enum UtmFilterEnum
{
UTM_FILTER_OFF,
UTM_FILTER_PROJECT,
UTM_FILTER_CUSTOM
};
public:
RimWellPathImport();
caf::PdmField<caf::AppEnum<UtmFilterEnum>> utmFilterMode;
caf::PdmField<double> north;
caf::PdmField<double> south;
caf::PdmField<double> east;
caf::PdmField<double> west;
protected:
void initAfterRead() override;
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
void updateFieldVisibility();
caf::PdmChildArrayField<RimOilRegionEntry*> regions_OBSOLETE;
};

View File

@ -1,117 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "RimWellsEntry.h"
#include "cafAppEnum.h"
namespace caf
{
template <>
void caf::AppEnum<RimWellPathEntry::WellTypeEnum>::setUp()
{
addItem( RimWellPathEntry::WELL_ALL, "WELL_ALL", "All" );
addItem( RimWellPathEntry::WELL_SURVEY, "WELL_SURVEY", "Survey" );
addItem( RimWellPathEntry::WELL_PLAN, "WELL_PLAN", "Plan" );
setDefault( RimWellPathEntry::WELL_ALL );
}
} // End namespace caf
CAF_PDM_SOURCE_INIT( RimWellPathEntry, "RimWellPathEntry" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathEntry::RimWellPathEntry()
{
CAF_PDM_InitObject( "WellPathEntry" );
CAF_PDM_InitFieldNoDefault( &name, "Name", "Name" );
CAF_PDM_InitField( &selected, "Selected", false, "Selected" );
caf::AppEnum<RimWellPathEntry::WellTypeEnum> wellType = WELL_ALL;
CAF_PDM_InitField( &wellPathType, "WellPathType", wellType, "Well path type" );
CAF_PDM_InitFieldNoDefault( &surveyType, "surveyType", "surveyType" );
CAF_PDM_InitFieldNoDefault( &requestUrl, "requestUrl", "requestUrl" );
CAF_PDM_InitFieldNoDefault( &wellPathFilePath, "wellPathFilePath", "wellPathFilePath" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellPathEntry::userDescriptionField()
{
return &name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimWellPathEntry::objectToggleField()
{
return &selected;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellPathEntry* RimWellPathEntry::createWellPathEntry( const QString& name,
const QString& surveyType,
const QString& requestUrl,
const QString& absolutePath,
WellTypeEnum wellType )
{
RimWellPathEntry* entry = new RimWellPathEntry();
entry->name = name;
entry->surveyType = surveyType;
entry->requestUrl = requestUrl;
entry->wellPathType = wellType;
QString responseFilePath = undefinedWellPathLocation();
int strIndex = requestUrl.indexOf( "edm/" );
if ( strIndex >= 0 )
{
QString lastPart = requestUrl.right( requestUrl.size() - strIndex );
lastPart = lastPart.replace( '/', '_' );
responseFilePath = absolutePath + "/" + lastPart + ".json";
}
entry->wellPathFilePath = responseFilePath;
return entry;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimWellPathEntry::undefinedWellPathLocation()
{
return "UNDEFIED_WELLPATH_FILE";
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPathEntry::isWellPathValid()
{
return ( wellPathFilePath().compare( undefinedWellPathLocation() ) != 0 );
}

View File

@ -1,61 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2011-2012 Statoil ASA, Ceetron 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 "cafAppEnum.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"
class RimWellPathEntry : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
enum WellTypeEnum
{
WELL_SURVEY,
WELL_PLAN,
WELL_ALL
};
public:
RimWellPathEntry();
static RimWellPathEntry* createWellPathEntry( const QString& name,
const QString& surveyType,
const QString& requestUrl,
const QString& absolutePath,
WellTypeEnum wellType );
caf::PdmFieldHandle* userDescriptionField() override;
caf::PdmFieldHandle* objectToggleField() override;
caf::PdmField<QString> name;
caf::PdmField<bool> selected;
caf::PdmField<caf::AppEnum<WellTypeEnum>> wellPathType;
caf::PdmField<QString> surveyType;
caf::PdmField<QString> requestUrl;
bool isWellPathValid();
caf::PdmField<QString> wellPathFilePath; // Location of the well path response
private:
static QString undefinedWellPathLocation();
};

View File

@ -20,15 +20,7 @@
#include "RiaFeatureCommandContext.h"
#include "RimWellPathImport.h"
#include "cafCmdFeatureMenuBuilder.h"
#include "cafPdmUiListView.h"
#include "cafPdmUiPropertyView.h"
#include "cafPdmUiTreeAttributes.h"
#include "cafPdmUiTreeView.h"
#include "cafPdmUiTreeViewEditor.h"
#include "cafUtils.h"
#include <QAbstractTableModel>
#include <QObject>
@ -44,23 +36,17 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuWellImportWizard::RiuWellImportWizard( const QString& downloadFolder,
RiaOsduConnector* osduConnector,
RimWellPathImport* wellPathImportObject,
QWidget* parent /*= 0*/ )
RiuWellImportWizard::RiuWellImportWizard( RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
: QWizard( parent )
{
m_wellPathImportObject = wellPathImportObject;
m_osduConnector = osduConnector;
m_destinationFolder = downloadFolder;
m_osduConnector = osduConnector;
m_firstTimeRequestingAuthentication = true;
addPage( new AuthenticationPage( m_osduConnector, this ) );
addPage( new FieldSelectionPage( m_wellPathImportObject, m_osduConnector, this ) );
addPage( new WellSelectionPage( m_wellPathImportObject, m_osduConnector, this ) );
addPage( new WellSummaryPage( m_wellPathImportObject, m_osduConnector, this ) );
addPage( new FieldSelectionPage( m_osduConnector, this ) );
addPage( new WellSelectionPage( m_osduConnector, this ) );
addPage( new WellSummaryPage( m_osduConnector, this ) );
}
//--------------------------------------------------------------------------------------------------
@ -75,7 +61,6 @@ RiuWellImportWizard::~RiuWellImportWizard()
//--------------------------------------------------------------------------------------------------
void RiuWellImportWizard::downloadFields( const QString& fieldName )
{
// TODO: filter by user input
m_osduConnector->requestFieldsByName( fieldName );
}
@ -234,7 +219,7 @@ void AuthenticationPage::accessOk()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
FieldSelectionPage::FieldSelectionPage( RimWellPathImport* wellPathImport, RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
FieldSelectionPage::FieldSelectionPage( RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
{
setTitle( "Field Selection" );
@ -349,7 +334,7 @@ FieldSelectionPage::~FieldSelectionPage()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
WellSelectionPage::WellSelectionPage( RimWellPathImport* wellPathImport, RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
WellSelectionPage::WellSelectionPage( RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
{
QVBoxLayout* layout = new QVBoxLayout;
setLayout( layout );
@ -389,8 +374,6 @@ WellSelectionPage::WellSelectionPage( RimWellPathImport* wellPathImport, RiaOsdu
QObject::connect( filterLineEdit, &QLineEdit::textChanged, m_proxyModel, &QSortFilterProxyModel::setFilterWildcard );
m_wellPathImportObject = wellPathImport;
m_osduConnector = osduConnector;
connect( m_osduConnector, SIGNAL( wellsFinished() ), SLOT( wellsFinished() ) );
connect( m_osduConnector, SIGNAL( wellboresFinished( const QString& ) ), SLOT( wellboresFinished( const QString& ) ) );
@ -483,11 +466,8 @@ void WellSelectionPage::selectWellbore( const QItemSelection& newSelection, cons
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
WellSummaryPage::WellSummaryPage( RimWellPathImport* wellPathImport, RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
WellSummaryPage::WellSummaryPage( RiaOsduConnector* osduConnector, QWidget* parent /*= 0*/ )
{
m_wellPathImportObject = wellPathImport;
m_wellPathImportObject->setUiHidden( true );
m_osduConnector = osduConnector;
QVBoxLayout* layout = new QVBoxLayout;

View File

@ -35,15 +35,6 @@ class QLabel;
class QTextEdit;
class QTableView;
class RimWellPathImport;
namespace caf
{
class PdmUiTreeView;
class PdmUiListView;
class PdmUiPropertyView;
} // namespace caf
class OsduFieldTableModel : public QAbstractTableModel
{
Q_OBJECT
@ -285,7 +276,7 @@ class FieldSelectionPage : public QWizardPage
Q_OBJECT
public:
FieldSelectionPage( RimWellPathImport* wellPathImport, RiaOsduConnector* m_osduConnector, QWidget* parent = nullptr );
FieldSelectionPage( RiaOsduConnector* m_osduConnector, QWidget* parent = nullptr );
~FieldSelectionPage() override;
bool isComplete() const override;
@ -313,7 +304,7 @@ class WellSelectionPage : public QWizardPage
Q_OBJECT
public:
WellSelectionPage( RimWellPathImport* wellPathImport, RiaOsduConnector* m_osduConnector, QWidget* parent = nullptr );
WellSelectionPage( RiaOsduConnector* m_osduConnector, QWidget* parent = nullptr );
~WellSelectionPage() override;
void initializePage() override;
@ -325,7 +316,6 @@ private slots:
void selectWellbore( const QItemSelection& newSelection, const QItemSelection& oldSelection );
private:
RimWellPathImport* m_wellPathImportObject;
RiaOsduConnector* m_osduConnector;
QTableView* m_tableView;
OsduWellboreTableModel* m_osduWellboresModel;
@ -340,7 +330,7 @@ class WellSummaryPage : public QWizardPage
Q_OBJECT
public:
WellSummaryPage( RimWellPathImport* wellPathImport, RiaOsduConnector* osduConnector, QWidget* parent = nullptr );
WellSummaryPage( RiaOsduConnector* osduConnector, QWidget* parent = nullptr );
void initializePage() override;
bool isComplete() const override;
@ -349,11 +339,10 @@ private slots:
void wellboreTrajectoryFinished( const QString& wellboreId, int numTrajectories, const QString& errorMessage );
private:
RimWellPathImport* m_wellPathImportObject;
RiaOsduConnector* m_osduConnector;
QTextEdit* m_textEdit;
std::set<QString> m_pendingWellboreIds;
mutable QMutex m_mutex;
RiaOsduConnector* m_osduConnector;
QTextEdit* m_textEdit;
std::set<QString> m_pendingWellboreIds;
mutable QMutex m_mutex;
};
//--------------------------------------------------------------------------------------------------
@ -373,10 +362,7 @@ public:
double datumElevation;
};
RiuWellImportWizard( const QString& downloadFolder,
RiaOsduConnector* osduConnector,
RimWellPathImport* wellPathImportObject,
QWidget* parent = nullptr );
RiuWellImportWizard( RiaOsduConnector* osduConnector, QWidget* parent = nullptr );
~RiuWellImportWizard() override;
// Methods used from the wizard pages
@ -402,11 +388,6 @@ private:
QString m_selectedFieldId;
std::vector<QString> m_selectedWellboreIds;
QString m_destinationFolder;
RimWellPathImport* m_wellPathImportObject;
caf::PdmUiTreeView* m_pdmTreeView;
bool m_firstTimeRequestingAuthentication;
std::vector<RiuWellImportWizard::WellInfo> m_wellInfos;

View File

@ -113,8 +113,6 @@
#include "RimGridStatisticsPlotCollection.h"
#endif
#include "OsduImportCommands/RimWellPathImport.h"
#include "RiuMainWindow.h"
#include "RiuPlotMainWindow.h"
@ -161,10 +159,6 @@ RimProject::RimProject()
CAF_PDM_InitFieldNoDefault( &scriptCollection, "ScriptCollection", "Octave Scripts", ":/octave.png" );
scriptCollection.xmlCapability()->disableIO();
CAF_PDM_InitFieldNoDefault( &wellPathImport, "WellPathImport", "WellPathImport" );
wellPathImport = new RimWellPathImport();
wellPathImport.uiCapability()->setUiTreeChildrenHidden( true );
CAF_PDM_InitFieldNoDefault( &m_mainPlotCollection, "MainPlotCollection", "Plots" );
CAF_PDM_InitFieldNoDefault( &viewLinkerCollection, "LinkedViews", "Linked Views", ":/LinkView.svg" );
@ -914,46 +908,6 @@ const RimOilField* RimProject::activeOilField() const
return oilFields[0];
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimProject::computeUtmAreaOfInterest()
{
cvf::BoundingBox projectBB;
for ( RimCase* rimCase : allGridCases() )
{
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( rimCase );
if ( eclipseCase && eclipseCase->eclipseCaseData() )
{
for ( size_t gridIdx = 0; gridIdx < eclipseCase->eclipseCaseData()->gridCount(); gridIdx++ )
{
RigGridBase* rigGrid = eclipseCase->eclipseCaseData()->grid( gridIdx );
projectBB.add( rigGrid->boundingBox() );
}
}
else
{
// Todo : calculate BBox of GeoMechCase
}
}
if ( projectBB.isValid() )
{
double north, south, east, west;
north = projectBB.max().y();
south = projectBB.min().y();
west = projectBB.min().x();
east = projectBB.max().x();
wellPathImport->north = north;
wellPathImport->south = south;
wellPathImport->east = east;
wellPathImport->west = west;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -66,7 +66,6 @@ class RimViewLinker;
class RimViewLinkerCollection;
class RimViewWindow;
class RimWellPath;
class RimWellPathImport;
class RimFractureTemplateCollection;
class RimFractureTemplate;
class RimValveTemplateCollection;
@ -99,7 +98,6 @@ public:
caf::PdmChildArrayField<RimOilField*> oilFields;
caf::PdmChildField<RimColorLegendCollection*> colorLegendCollection;
caf::PdmChildField<RimScriptCollection*> scriptCollection;
caf::PdmChildField<RimWellPathImport*> wellPathImport;
caf::PdmChildField<RimViewLinkerCollection*> viewLinkerCollection;
caf::PdmChildField<RimSummaryCalculationCollection*> calculationCollection;
caf::PdmChildField<RimGridCalculationCollection*> gridCalculationCollection;
@ -146,8 +144,6 @@ public:
void scheduleCreateDisplayModelAndRedrawAllViews();
void computeUtmAreaOfInterest();
[[nodiscard]] std::vector<RimOilField*> allOilFields() const;
RimOilField* activeOilField();
const RimOilField* activeOilField() const;