mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7493 Add "Fracture Group Statistics" pdm object and import method.
This commit is contained in:
parent
509cc31cc8
commit
836c679e89
@ -13,6 +13,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteValveTemplateFeature.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportCompletionsFileFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportCompletionsFileFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportPerforationIntervalsFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportPerforationIntervalsFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanModelPlotFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanModelPlotFeature.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicImportFractureGroupStatisticsFeature.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SOURCE_GROUP_SOURCE_FILES
|
set (SOURCE_GROUP_SOURCE_FILES
|
||||||
@ -29,6 +30,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicDeleteValveTemplateFeature.cpp
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportCompletionsFileFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportCompletionsFileFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportPerforationIntervalsFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicWellPathImportPerforationIntervalsFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanModelPlotFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewStimPlanModelPlotFeature.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicImportFractureGroupStatisticsFeature.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,120 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021- 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 "RicImportFractureGroupStatisticsFeature.h"
|
||||||
|
|
||||||
|
#include "RiaGuiApplication.h"
|
||||||
|
|
||||||
|
#include "RicRecursiveFileSearchDialog.h"
|
||||||
|
|
||||||
|
#include "RimCompletionTemplateCollection.h"
|
||||||
|
#include "RimFractureGroupStatistics.h"
|
||||||
|
#include "RimFractureGroupStatisticsCollection.h"
|
||||||
|
#include "RimOilField.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT( RicImportFractureGroupStatisticsFeature, "RicImportFractureGroupStatisticsFeature" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RicImportFractureGroupStatisticsFeature::m_pathFilter = "*";
|
||||||
|
QString RicImportFractureGroupStatisticsFeature::m_fileNameFilter = "*";
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicImportFractureGroupStatisticsFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicImportFractureGroupStatisticsFeature::onActionTriggered( bool isChecked )
|
||||||
|
{
|
||||||
|
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||||
|
QString pathCacheName = "INPUT_FILES";
|
||||||
|
QStringList fileNames = runRecursiveFileSearchDialog( "Import Summary Cases", pathCacheName );
|
||||||
|
|
||||||
|
RimProject* project = RimProject::current();
|
||||||
|
CVF_ASSERT( project );
|
||||||
|
|
||||||
|
RimOilField* oilfield = project->activeOilField();
|
||||||
|
if ( !oilfield ) return;
|
||||||
|
|
||||||
|
RimCompletionTemplateCollection* completionTemplateCollection = oilfield->completionTemplateCollection();
|
||||||
|
if ( !completionTemplateCollection ) return;
|
||||||
|
|
||||||
|
RimFractureGroupStatisticsCollection* fractureGroupStatisticsCollection =
|
||||||
|
completionTemplateCollection->fractureGroupStatisticsCollection();
|
||||||
|
if ( !fractureGroupStatisticsCollection ) return;
|
||||||
|
|
||||||
|
auto fractureGroupStatistics = new RimFractureGroupStatistics;
|
||||||
|
fractureGroupStatistics->setName( "Imported Fracture Group Statistics" );
|
||||||
|
|
||||||
|
for ( auto f : fileNames )
|
||||||
|
{
|
||||||
|
fractureGroupStatistics->addFilePath( f );
|
||||||
|
}
|
||||||
|
|
||||||
|
fractureGroupStatisticsCollection->addFractureGroupStatistics( fractureGroupStatistics );
|
||||||
|
|
||||||
|
fractureGroupStatisticsCollection->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicImportFractureGroupStatisticsFeature::setupActionLook( QAction* actionToSetup )
|
||||||
|
{
|
||||||
|
actionToSetup->setText( "Import StimPlan Fractures Recursively" );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QStringList RicImportFractureGroupStatisticsFeature::runRecursiveFileSearchDialog( const QString& dialogTitle,
|
||||||
|
const QString& pathCacheName )
|
||||||
|
{
|
||||||
|
RiaApplication* app = RiaApplication::instance();
|
||||||
|
QString defaultDir = app->lastUsedDialogDirectory( pathCacheName );
|
||||||
|
|
||||||
|
RicRecursiveFileSearchDialogResult result =
|
||||||
|
RicRecursiveFileSearchDialog::runRecursiveSearchDialog( nullptr,
|
||||||
|
dialogTitle,
|
||||||
|
defaultDir,
|
||||||
|
m_pathFilter,
|
||||||
|
m_fileNameFilter,
|
||||||
|
QStringList( ".xml" ) );
|
||||||
|
|
||||||
|
// Remember filters
|
||||||
|
m_pathFilter = result.pathFilter;
|
||||||
|
m_fileNameFilter = result.fileNameFilter;
|
||||||
|
|
||||||
|
if ( !result.ok ) return QStringList();
|
||||||
|
|
||||||
|
// Remember the path to next time
|
||||||
|
app->setLastUsedDialogDirectory( pathCacheName, QFileInfo( result.rootDir ).absoluteFilePath() );
|
||||||
|
|
||||||
|
return result.files;
|
||||||
|
}
|
@ -0,0 +1,46 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021- 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
|
||||||
|
|
||||||
|
#include "cafCmdFeature.h"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RicImportFractureGroupStatisticsFeature : public caf::CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RicImportFractureGroupStatisticsFeature() {}
|
||||||
|
|
||||||
|
static QStringList runRecursiveFileSearchDialog( const QString& dialogTitle, const QString& pathCacheName );
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Overrides
|
||||||
|
bool isCommandEnabled() override;
|
||||||
|
void onActionTriggered( bool isChecked ) override;
|
||||||
|
void setupActionLook( QAction* actionToSetup ) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
static QString m_pathFilter;
|
||||||
|
static QString m_fileNameFilter;
|
||||||
|
};
|
@ -32,7 +32,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimWellPathComponentInterface.h
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.h
|
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.h
|
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.h
|
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatistics.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatisticsCollection.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -68,6 +69,8 @@ ${CMAKE_CURRENT_LIST_DIR}/RimNonDarcyPerforationParameters.cpp
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimWellPathValve.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimMultipleValveLocations.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimWellPathAicdParameters.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatistics.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimFractureGroupStatisticsCollection.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "RimCompletionTemplateCollection.h"
|
#include "RimCompletionTemplateCollection.h"
|
||||||
|
|
||||||
|
#include "RimFractureGroupStatisticsCollection.h"
|
||||||
#include "RimFractureTemplateCollection.h"
|
#include "RimFractureTemplateCollection.h"
|
||||||
#include "RimStimPlanModelTemplateCollection.h"
|
#include "RimStimPlanModelTemplateCollection.h"
|
||||||
#include "RimValveTemplateCollection.h"
|
#include "RimValveTemplateCollection.h"
|
||||||
@ -44,6 +45,9 @@ RimCompletionTemplateCollection::RimCompletionTemplateCollection()
|
|||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_valveTemplates, "ValveTemplates", "", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_valveTemplates, "ValveTemplates", "", "", "", "" );
|
||||||
m_valveTemplates = new RimValveTemplateCollection;
|
m_valveTemplates = new RimValveTemplateCollection;
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_fractureGroupStatisticsCollection, "FractureGroupStatisticsCollection", "", "", "", "" );
|
||||||
|
m_fractureGroupStatisticsCollection = new RimFractureGroupStatisticsCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -119,6 +123,22 @@ const RimStimPlanModelTemplateCollection* RimCompletionTemplateCollection::stimP
|
|||||||
return m_stimPlanModelTemplates;
|
return m_stimPlanModelTemplates;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimFractureGroupStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection()
|
||||||
|
{
|
||||||
|
return m_fractureGroupStatisticsCollection;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
const RimFractureGroupStatisticsCollection* RimCompletionTemplateCollection::fractureGroupStatisticsCollection() const
|
||||||
|
{
|
||||||
|
return m_fractureGroupStatisticsCollection;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -128,6 +148,7 @@ void RimCompletionTemplateCollection::defineUiTreeOrdering( caf::PdmUiTreeOrderi
|
|||||||
uiTreeOrdering.add( m_fractureTemplates );
|
uiTreeOrdering.add( m_fractureTemplates );
|
||||||
uiTreeOrdering.add( m_stimPlanModelTemplates );
|
uiTreeOrdering.add( m_stimPlanModelTemplates );
|
||||||
uiTreeOrdering.add( m_valveTemplates );
|
uiTreeOrdering.add( m_valveTemplates );
|
||||||
|
uiTreeOrdering.add( m_fractureGroupStatisticsCollection );
|
||||||
uiTreeOrdering.skipRemainingChildren( true );
|
uiTreeOrdering.skipRemainingChildren( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,4 +159,5 @@ void RimCompletionTemplateCollection::loadAndUpdateData()
|
|||||||
{
|
{
|
||||||
m_fractureTemplates->loadAndUpdateData();
|
m_fractureTemplates->loadAndUpdateData();
|
||||||
m_stimPlanModelTemplates->loadAndUpdateData();
|
m_stimPlanModelTemplates->loadAndUpdateData();
|
||||||
|
m_fractureGroupStatisticsCollection->loadAndUpdateData();
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ class RimOilField;
|
|||||||
class RimValveTemplateCollection;
|
class RimValveTemplateCollection;
|
||||||
class RimFractureTemplateCollection;
|
class RimFractureTemplateCollection;
|
||||||
class RimStimPlanModelTemplateCollection;
|
class RimStimPlanModelTemplateCollection;
|
||||||
|
class RimFractureGroupStatisticsCollection;
|
||||||
|
|
||||||
class RimCompletionTemplateCollection : public caf::PdmObject
|
class RimCompletionTemplateCollection : public caf::PdmObject
|
||||||
{
|
{
|
||||||
@ -34,13 +35,15 @@ public:
|
|||||||
RimCompletionTemplateCollection();
|
RimCompletionTemplateCollection();
|
||||||
~RimCompletionTemplateCollection() override;
|
~RimCompletionTemplateCollection() override;
|
||||||
|
|
||||||
RimFractureTemplateCollection* fractureTemplateCollection();
|
RimFractureTemplateCollection* fractureTemplateCollection();
|
||||||
const RimFractureTemplateCollection* fractureTemplateCollection() const;
|
const RimFractureTemplateCollection* fractureTemplateCollection() const;
|
||||||
RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection();
|
RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection();
|
||||||
const RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection() const;
|
const RimStimPlanModelTemplateCollection* stimPlanModelTemplateCollection() const;
|
||||||
RimValveTemplateCollection* valveTemplateCollection();
|
RimValveTemplateCollection* valveTemplateCollection();
|
||||||
const RimValveTemplateCollection* valveTemplateCollection() const;
|
const RimValveTemplateCollection* valveTemplateCollection() const;
|
||||||
void setDefaultUnitSystemBasedOnLoadedCases();
|
RimFractureGroupStatisticsCollection* fractureGroupStatisticsCollection();
|
||||||
|
const RimFractureGroupStatisticsCollection* fractureGroupStatisticsCollection() const;
|
||||||
|
void setDefaultUnitSystemBasedOnLoadedCases();
|
||||||
|
|
||||||
void loadAndUpdateData();
|
void loadAndUpdateData();
|
||||||
|
|
||||||
@ -48,9 +51,10 @@ private:
|
|||||||
friend class RimOilField;
|
friend class RimOilField;
|
||||||
void setFractureTemplateCollection( RimFractureTemplateCollection* fractureTemplateCollection );
|
void setFractureTemplateCollection( RimFractureTemplateCollection* fractureTemplateCollection );
|
||||||
|
|
||||||
caf::PdmChildField<RimFractureTemplateCollection*> m_fractureTemplates;
|
caf::PdmChildField<RimFractureTemplateCollection*> m_fractureTemplates;
|
||||||
caf::PdmChildField<RimValveTemplateCollection*> m_valveTemplates;
|
caf::PdmChildField<RimValveTemplateCollection*> m_valveTemplates;
|
||||||
caf::PdmChildField<RimStimPlanModelTemplateCollection*> m_stimPlanModelTemplates;
|
caf::PdmChildField<RimStimPlanModelTemplateCollection*> m_stimPlanModelTemplates;
|
||||||
|
caf::PdmChildField<RimFractureGroupStatisticsCollection*> m_fractureGroupStatisticsCollection;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
|
@ -0,0 +1,95 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021 - 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 "RimFractureGroupStatistics.h"
|
||||||
|
|
||||||
|
#include "cafPdmUiTextEditor.h"
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT( RimFractureGroupStatistics, "FractureGroupStatistics" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimFractureGroupStatistics::RimFractureGroupStatistics()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject( "Fracture Group Statistics", ":/FractureTemplate16x16.png", "", "" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_filePaths, "FilePaths", "", "", "", "" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_filePathsTable, "FilePathsTable", "File Paths Table", "", "", "" );
|
||||||
|
m_filePathsTable.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() );
|
||||||
|
m_filePathsTable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||||
|
m_filePathsTable.uiCapability()->setUiReadOnly( true );
|
||||||
|
m_filePathsTable.xmlCapability()->disableIO();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimFractureGroupStatistics::~RimFractureGroupStatistics()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureGroupStatistics::addFilePath( const QString& filePath )
|
||||||
|
{
|
||||||
|
m_filePaths.v().push_back( filePath );
|
||||||
|
m_filePathsTable = generateFilePathsTable();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimFractureGroupStatistics::generateFilePathsTable()
|
||||||
|
{
|
||||||
|
QString body;
|
||||||
|
for ( auto prop : m_filePaths.v() )
|
||||||
|
{
|
||||||
|
body.append( prop.path() + "<br>" );
|
||||||
|
}
|
||||||
|
|
||||||
|
return body;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureGroupStatistics::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
|
caf::PdmUiEditorAttribute* attribute )
|
||||||
|
{
|
||||||
|
if ( field == &m_filePathsTable )
|
||||||
|
{
|
||||||
|
auto myAttr = dynamic_cast<caf::PdmUiTextEditorAttribute*>( attribute );
|
||||||
|
if ( myAttr )
|
||||||
|
{
|
||||||
|
myAttr->wrapMode = caf::PdmUiTextEditorAttribute::NoWrap;
|
||||||
|
myAttr->textMode = caf::PdmUiTextEditorAttribute::HTML;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureGroupStatistics::loadAndUpdateData()
|
||||||
|
{
|
||||||
|
m_filePathsTable = generateFilePathsTable();
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021 - 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
|
||||||
|
|
||||||
|
#include "RimNamedObject.h"
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimFractureGroupStatistics : public RimNamedObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimFractureGroupStatistics();
|
||||||
|
~RimFractureGroupStatistics() override;
|
||||||
|
void addFilePath( const QString& filePath );
|
||||||
|
void loadAndUpdateData();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||||
|
QString uiConfigName,
|
||||||
|
caf::PdmUiEditorAttribute* attribute ) override;
|
||||||
|
QString generateFilePathsTable();
|
||||||
|
|
||||||
|
caf::PdmField<std::vector<caf::FilePath>> m_filePaths;
|
||||||
|
caf::PdmField<QString> m_filePathsTable;
|
||||||
|
};
|
@ -0,0 +1,53 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021- 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 "RimFractureGroupStatisticsCollection.h"
|
||||||
|
|
||||||
|
#include "RimFractureGroupStatistics.h"
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT( RimFractureGroupStatisticsCollection, "FractureGroupStatisticsCollection" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimFractureGroupStatisticsCollection::RimFractureGroupStatisticsCollection()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject( "Derived Fracture Completions", ":/FractureTemplates16x16.png", "", "" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_fractureGroupStatistics, "FractureGroupStatistics", "", "", "", "" );
|
||||||
|
m_fractureGroupStatistics.uiCapability()->setUiHidden( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureGroupStatisticsCollection::addFractureGroupStatistics( RimFractureGroupStatistics* fractureGroupStatistics )
|
||||||
|
{
|
||||||
|
m_fractureGroupStatistics.push_back( fractureGroupStatistics );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimFractureGroupStatisticsCollection::loadAndUpdateData()
|
||||||
|
{
|
||||||
|
for ( auto f : m_fractureGroupStatistics.childObjects() )
|
||||||
|
{
|
||||||
|
f->loadAndUpdateData();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,43 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2021- 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
|
||||||
|
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
|
class RimFractureGroupStatistics;
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimFractureGroupStatisticsCollection : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimFractureGroupStatisticsCollection();
|
||||||
|
|
||||||
|
void addFractureGroupStatistics( RimFractureGroupStatistics* fractureGroupStatistics );
|
||||||
|
|
||||||
|
void loadAndUpdateData();
|
||||||
|
|
||||||
|
private:
|
||||||
|
caf::PdmChildArrayField<RimFractureGroupStatistics*> m_fractureGroupStatistics;
|
||||||
|
};
|
@ -72,6 +72,7 @@
|
|||||||
#include "RimFlowPlotCollection.h"
|
#include "RimFlowPlotCollection.h"
|
||||||
#include "RimFormationNames.h"
|
#include "RimFormationNames.h"
|
||||||
#include "RimFormationNamesCollection.h"
|
#include "RimFormationNamesCollection.h"
|
||||||
|
#include "RimFractureGroupStatisticsCollection.h"
|
||||||
#include "RimFractureTemplate.h"
|
#include "RimFractureTemplate.h"
|
||||||
#include "RimFractureTemplateCollection.h"
|
#include "RimFractureTemplateCollection.h"
|
||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
@ -890,6 +891,10 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
{
|
{
|
||||||
menuBuilder << "RicDeleteValveTemplateFeature";
|
menuBuilder << "RicDeleteValveTemplateFeature";
|
||||||
}
|
}
|
||||||
|
else if ( dynamic_cast<RimFractureGroupStatisticsCollection*>( firstUiItem ) )
|
||||||
|
{
|
||||||
|
menuBuilder << "RicImportFractureGroupStatisticsFeature";
|
||||||
|
}
|
||||||
else if ( dynamic_cast<RimStimPlanModelTemplate*>( firstUiItem ) )
|
else if ( dynamic_cast<RimStimPlanModelTemplate*>( firstUiItem ) )
|
||||||
{
|
{
|
||||||
menuBuilder << "RicImportFaciesFeature";
|
menuBuilder << "RicImportFaciesFeature";
|
||||||
|
Loading…
Reference in New Issue
Block a user