mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Show summary data as tree structure in explorer. (#8430)
* Show summary data vectors in project explorer for both summary cases and ensembles. * Enable Drag to be able to drag'n'drop data vector into future summary plot * Make sure tree is refreshed on reload/replace operations * Provide case id and ensemble id in drag/drop object in addition to address
This commit is contained in:
BIN
ApplicationExeCode/Resources/DataVector.png
Normal file
BIN
ApplicationExeCode/Resources/DataVector.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 337 B |
@@ -240,6 +240,7 @@
|
|||||||
<file>ComboBoxDown.svg</file>
|
<file>ComboBoxDown.svg</file>
|
||||||
<file>ComboBoxUp.svg</file>
|
<file>ComboBoxUp.svg</file>
|
||||||
<file>WellIntAnalysis.png</file>
|
<file>WellIntAnalysis.png</file>
|
||||||
|
<file>DataVector.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/Shader">
|
<qresource prefix="/Shader">
|
||||||
<file>fs_CellFace.glsl</file>
|
<file>fs_CellFace.glsl</file>
|
||||||
|
@@ -61,6 +61,7 @@ void RicReloadSummaryCaseFeature::onActionTriggered( bool isChecked )
|
|||||||
{
|
{
|
||||||
summaryCase->createSummaryReaderInterface();
|
summaryCase->createSummaryReaderInterface();
|
||||||
summaryCase->createRftReaderInterface();
|
summaryCase->createRftReaderInterface();
|
||||||
|
summaryCase->refreshMetaData();
|
||||||
|
|
||||||
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
||||||
|
|
||||||
|
@@ -92,6 +92,8 @@ void RicReplaceSummaryCaseFeature::onActionTriggered( bool isChecked )
|
|||||||
summaryCase->updateAutoShortName();
|
summaryCase->updateAutoShortName();
|
||||||
summaryCase->createSummaryReaderInterface();
|
summaryCase->createSummaryReaderInterface();
|
||||||
summaryCase->createRftReaderInterface();
|
summaryCase->createRftReaderInterface();
|
||||||
|
summaryCase->refreshMetaData();
|
||||||
|
|
||||||
RiaLogging::info( QString( "Replaced summary data for %1" ).arg( oldSummaryHeaderFilename ) );
|
RiaLogging::info( QString( "Replaced summary data for %1" ).arg( oldSummaryHeaderFilename ) );
|
||||||
|
|
||||||
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( summaryCase );
|
||||||
|
@@ -347,7 +347,7 @@ void RimMainPlotCollection::ensureCalculationIdsAreAssigned()
|
|||||||
|
|
||||||
for ( RimSummaryAddress* adr : allAddresses )
|
for ( RimSummaryAddress* adr : allAddresses )
|
||||||
{
|
{
|
||||||
adr->ensureIdIsAssigned();
|
adr->ensureCalculationIdIsAssigned();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryDataSourceStepping.h
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryDataSourceStepping.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryNameHelper.h
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryNameHelper.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleSummaryPlotNameHelper.h
|
${CMAKE_CURRENT_LIST_DIR}/RimMultipleSummaryPlotNameHelper.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryAddressCollection.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_GROUP_SOURCE_FILES
|
set(SOURCE_GROUP_SOURCE_FILES
|
||||||
@@ -86,6 +87,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryDataSourceStepping.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryDataSourceStepping.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimSummaryNameHelper.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryNameHelper.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RimMultipleSummaryPlotNameHelper.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RimMultipleSummaryPlotNameHelper.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RimSummaryAddressCollection.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||||
|
@@ -58,6 +58,8 @@ CAF_PDM_SOURCE_INIT( RimSummaryAddress, "SummaryAddress" );
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimSummaryAddress::RimSummaryAddress()
|
RimSummaryAddress::RimSummaryAddress()
|
||||||
{
|
{
|
||||||
|
CAF_PDM_InitObject( "SummaryAddress", ":/DataVector.png", "", "" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_category, "SummaryVarType", "Type" );
|
CAF_PDM_InitFieldNoDefault( &m_category, "SummaryVarType", "Type" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_quantityName, "SummaryQuantityName", "Quantity" );
|
CAF_PDM_InitFieldNoDefault( &m_quantityName, "SummaryQuantityName", "Quantity" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_regionNumber, "SummaryRegion", "Region" );
|
CAF_PDM_InitFieldNoDefault( &m_regionNumber, "SummaryRegion", "Region" );
|
||||||
@@ -73,6 +75,9 @@ RimSummaryAddress::RimSummaryAddress()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_isErrorResult, "IsErrorResult", "Is Error Result" );
|
CAF_PDM_InitFieldNoDefault( &m_isErrorResult, "IsErrorResult", "Is Error Result" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_calculationId, "CalculationId", "Calculation Id" );
|
CAF_PDM_InitFieldNoDefault( &m_calculationId, "CalculationId", "Calculation Id" );
|
||||||
|
|
||||||
|
CAF_PDM_InitField( &m_caseId, "CaseId", -1, "CaseId" );
|
||||||
|
CAF_PDM_InitField( &m_ensembleId, "EnsembleId", -1, "EnsembleId" );
|
||||||
|
|
||||||
m_category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
m_category = RifEclipseSummaryAddress::SUMMARY_INVALID;
|
||||||
m_regionNumber = -1;
|
m_regionNumber = -1;
|
||||||
m_regionNumber2 = -1;
|
m_regionNumber2 = -1;
|
||||||
@@ -92,6 +97,20 @@ RimSummaryAddress::~RimSummaryAddress()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSummaryAddress* RimSummaryAddress::wrapFileReaderAddress( const RifEclipseSummaryAddress& addr,
|
||||||
|
int caseId /* = -1 */,
|
||||||
|
int ensembleId /* = -1 */ )
|
||||||
|
{
|
||||||
|
RimSummaryAddress* newAddress = new RimSummaryAddress();
|
||||||
|
newAddress->setAddress( addr );
|
||||||
|
newAddress->setCaseId( caseId );
|
||||||
|
newAddress->setEnsembleId( ensembleId );
|
||||||
|
return newAddress;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -112,6 +131,8 @@ void RimSummaryAddress::setAddress( const RifEclipseSummaryAddress& addr )
|
|||||||
m_cellJ = addr.cellJ();
|
m_cellJ = addr.cellJ();
|
||||||
m_cellK = addr.cellK();
|
m_cellK = addr.cellK();
|
||||||
m_calculationId = addr.id();
|
m_calculationId = addr.id();
|
||||||
|
|
||||||
|
setUiName( m_quantityName );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -138,7 +159,7 @@ RifEclipseSummaryAddress RimSummaryAddress::address()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryAddress::ensureIdIsAssigned()
|
void RimSummaryAddress::ensureCalculationIdIsAssigned()
|
||||||
{
|
{
|
||||||
if ( m_category == RifEclipseSummaryAddress::SUMMARY_CALCULATED && m_calculationId == -1 )
|
if ( m_category == RifEclipseSummaryAddress::SUMMARY_CALCULATED && m_calculationId == -1 )
|
||||||
{
|
{
|
||||||
@@ -176,3 +197,59 @@ RiaDefines::PhaseType RimSummaryAddress::addressPhaseType() const
|
|||||||
}
|
}
|
||||||
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
|
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddress::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
|
{
|
||||||
|
uiOrdering.skipRemainingFields( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddress::setCaseId( int caseId )
|
||||||
|
{
|
||||||
|
m_caseId = caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RimSummaryAddress::caseId() const
|
||||||
|
{
|
||||||
|
return m_caseId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimSummaryAddress::quantityName() const
|
||||||
|
{
|
||||||
|
return m_quantityName;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddress::setEnsembleId( int ensembleId )
|
||||||
|
{
|
||||||
|
m_ensembleId = ensembleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RimSummaryAddress::ensembleId() const
|
||||||
|
{
|
||||||
|
return m_ensembleId;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimSummaryAddress::isEnsemble() const
|
||||||
|
{
|
||||||
|
return m_ensembleId >= 0;
|
||||||
|
}
|
||||||
|
@@ -44,26 +44,44 @@ public:
|
|||||||
RimSummaryAddress();
|
RimSummaryAddress();
|
||||||
~RimSummaryAddress() override;
|
~RimSummaryAddress() override;
|
||||||
|
|
||||||
|
static RimSummaryAddress*
|
||||||
|
wrapFileReaderAddress( const RifEclipseSummaryAddress& addr, int caseId = -1, int ensembleId = -1 );
|
||||||
|
|
||||||
void setAddress( const RifEclipseSummaryAddress& addr );
|
void setAddress( const RifEclipseSummaryAddress& addr );
|
||||||
RifEclipseSummaryAddress address();
|
RifEclipseSummaryAddress address();
|
||||||
|
|
||||||
void ensureIdIsAssigned();
|
void setCaseId( int caseId );
|
||||||
|
int caseId() const;
|
||||||
|
|
||||||
|
void setEnsembleId( int ensembleId );
|
||||||
|
int ensembleId() const;
|
||||||
|
bool isEnsemble() const;
|
||||||
|
|
||||||
|
QString quantityName() const;
|
||||||
|
|
||||||
|
void ensureCalculationIdIsAssigned();
|
||||||
|
|
||||||
RiaDefines::PhaseType addressPhaseType() const;
|
RiaDefines::PhaseType addressPhaseType() const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_category;
|
caf::PdmField<caf::AppEnum<RifEclipseSummaryAddress::SummaryVarCategory>> m_category;
|
||||||
caf::PdmField<QString> m_quantityName;
|
|
||||||
caf::PdmField<int> m_regionNumber;
|
caf::PdmField<QString> m_quantityName;
|
||||||
caf::PdmField<int> m_regionNumber2;
|
caf::PdmField<int> m_regionNumber;
|
||||||
caf::PdmField<QString> m_wellGroupName;
|
caf::PdmField<int> m_regionNumber2;
|
||||||
caf::PdmField<QString> m_wellName;
|
caf::PdmField<QString> m_wellGroupName;
|
||||||
caf::PdmField<int> m_wellSegmentNumber;
|
caf::PdmField<QString> m_wellName;
|
||||||
caf::PdmField<QString> m_lgrName;
|
caf::PdmField<int> m_wellSegmentNumber;
|
||||||
caf::PdmField<int> m_cellI;
|
caf::PdmField<QString> m_lgrName;
|
||||||
caf::PdmField<int> m_cellJ;
|
caf::PdmField<int> m_cellI;
|
||||||
caf::PdmField<int> m_cellK;
|
caf::PdmField<int> m_cellJ;
|
||||||
caf::PdmField<int> m_aquiferNumber;
|
caf::PdmField<int> m_cellK;
|
||||||
caf::PdmField<bool> m_isErrorResult;
|
caf::PdmField<int> m_aquiferNumber;
|
||||||
caf::PdmField<int> m_calculationId;
|
caf::PdmField<bool> m_isErrorResult;
|
||||||
|
caf::PdmField<int> m_calculationId;
|
||||||
|
caf::PdmField<int> m_caseId;
|
||||||
|
caf::PdmField<int> m_ensembleId;
|
||||||
};
|
};
|
||||||
|
@@ -0,0 +1,190 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 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 "RimSummaryAddressCollection.h"
|
||||||
|
|
||||||
|
#include "RifEclipseSummaryAddress.h"
|
||||||
|
|
||||||
|
#include "RimSummaryAddress.h"
|
||||||
|
|
||||||
|
#include "cafPdmUiTreeOrdering.h"
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT( RimSummaryAddressCollection, "RimSummaryAddressCollection" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSummaryAddressCollection::RimSummaryAddressCollection()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject( "Folder", ":/Folder.png", "", "" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_adresses, "SummaryAddresses", "Addresses" );
|
||||||
|
m_adresses.uiCapability()->setUiTreeHidden( true );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_subfolders, "AddressSubfolders", "Subfolders" );
|
||||||
|
m_subfolders.uiCapability()->setUiTreeHidden( true );
|
||||||
|
|
||||||
|
nameField()->uiCapability()->setUiHidden( true );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSummaryAddressCollection::~RimSummaryAddressCollection()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimSummaryAddressCollection::hasDataVector( const QString quantityName ) const
|
||||||
|
{
|
||||||
|
for ( auto& address : m_adresses )
|
||||||
|
{
|
||||||
|
if ( address->quantityName() == quantityName ) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimSummaryAddressCollection::hasDataVector( const std::string quantityName ) const
|
||||||
|
{
|
||||||
|
return hasDataVector( QString::fromStdString( quantityName ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddressCollection::addAddress( const RifEclipseSummaryAddress& address, int caseId, int ensembleId )
|
||||||
|
{
|
||||||
|
if ( !hasDataVector( address.quantityName() ) )
|
||||||
|
{
|
||||||
|
m_adresses.push_back( RimSummaryAddress::wrapFileReaderAddress( address, caseId, ensembleId ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddressCollection::addToSubfolder( QString foldername,
|
||||||
|
const RifEclipseSummaryAddress& address,
|
||||||
|
int caseId,
|
||||||
|
int ensembleId )
|
||||||
|
{
|
||||||
|
RimSummaryAddressCollection* folder = getOrCreateSubfolder( foldername );
|
||||||
|
folder->addAddress( address, caseId, ensembleId );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddressCollection::updateFolderStructure( const std::set<RifEclipseSummaryAddress>& addresses,
|
||||||
|
int caseId,
|
||||||
|
int ensembleId )
|
||||||
|
{
|
||||||
|
if ( addresses.size() == 0 ) return;
|
||||||
|
|
||||||
|
RimSummaryAddressCollection* misc = getOrCreateSubfolder( "Miscellaneous" );
|
||||||
|
RimSummaryAddressCollection* fields = getOrCreateSubfolder( "Field" );
|
||||||
|
RimSummaryAddressCollection* regions = getOrCreateSubfolder( "Regions" );
|
||||||
|
RimSummaryAddressCollection* wells = getOrCreateSubfolder( "Wells" );
|
||||||
|
RimSummaryAddressCollection* groups = getOrCreateSubfolder( "Groups" );
|
||||||
|
|
||||||
|
for ( const auto& address : addresses )
|
||||||
|
{
|
||||||
|
switch ( address.category() )
|
||||||
|
{
|
||||||
|
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_MISC:
|
||||||
|
misc->addAddress( address, caseId, ensembleId );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_FIELD:
|
||||||
|
fields->addAddress( address, caseId, ensembleId );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_REGION:
|
||||||
|
regions->addToSubfolder( QString::number( address.regionNumber() ), address, caseId, ensembleId );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL_GROUP:
|
||||||
|
groups->addToSubfolder( QString::fromStdString( address.wellGroupName() ), address, caseId, ensembleId );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RifEclipseSummaryAddress::SummaryVarCategory::SUMMARY_WELL:
|
||||||
|
wells->addToSubfolder( QString::fromStdString( address.wellName() ), address, caseId, ensembleId );
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimSummaryAddressCollection* RimSummaryAddressCollection::getOrCreateSubfolder( const QString folderName )
|
||||||
|
{
|
||||||
|
for ( auto& folder : m_subfolders )
|
||||||
|
{
|
||||||
|
if ( folder->name() == folderName )
|
||||||
|
{
|
||||||
|
return folder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RimSummaryAddressCollection* newFolder = new RimSummaryAddressCollection();
|
||||||
|
newFolder->setName( folderName );
|
||||||
|
m_subfolders.push_back( newFolder );
|
||||||
|
return newFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddressCollection::clear()
|
||||||
|
{
|
||||||
|
m_adresses.clear();
|
||||||
|
m_subfolders.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimSummaryAddressCollection::isEmpty() const
|
||||||
|
{
|
||||||
|
return ( ( m_adresses.size() == 0 ) && ( m_subfolders.size() == 0 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryAddressCollection::updateUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering ) const
|
||||||
|
{
|
||||||
|
for ( auto& folder : m_subfolders() )
|
||||||
|
{
|
||||||
|
uiTreeOrdering.add( folder );
|
||||||
|
}
|
||||||
|
|
||||||
|
for ( auto& address : m_adresses() )
|
||||||
|
{
|
||||||
|
uiTreeOrdering.add( address );
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,59 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 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"
|
||||||
|
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
class RimSummaryAddress;
|
||||||
|
class RifEclipseSummaryAddress;
|
||||||
|
|
||||||
|
class RimSummaryAddressCollection : public RimNamedObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
|
||||||
|
public:
|
||||||
|
RimSummaryAddressCollection();
|
||||||
|
~RimSummaryAddressCollection() override;
|
||||||
|
|
||||||
|
void updateFolderStructure( const std::set<RifEclipseSummaryAddress>& addresses, int caseid, int ensembleId = -1 );
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
bool isEmpty() const;
|
||||||
|
|
||||||
|
void updateUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering ) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
RimSummaryAddressCollection* getOrCreateSubfolder( const QString folderName );
|
||||||
|
|
||||||
|
bool hasDataVector( const QString quantityName ) const;
|
||||||
|
bool hasDataVector( const std::string quantityName ) const;
|
||||||
|
|
||||||
|
void addAddress( const RifEclipseSummaryAddress& address, int caseId, int ensembleId = -1 );
|
||||||
|
void addToSubfolder( QString foldername, const RifEclipseSummaryAddress& address, int caseId, int ensembleId = -1 );
|
||||||
|
|
||||||
|
private:
|
||||||
|
caf::PdmChildArrayField<RimSummaryAddress*> m_adresses;
|
||||||
|
caf::PdmChildArrayField<RimSummaryAddressCollection*> m_subfolders;
|
||||||
|
};
|
@@ -24,12 +24,17 @@
|
|||||||
#include "RicfCommandObject.h"
|
#include "RicfCommandObject.h"
|
||||||
#include "RifSummaryReaderInterface.h"
|
#include "RifSummaryReaderInterface.h"
|
||||||
|
|
||||||
|
#include "RifEclipseSummaryAddress.h"
|
||||||
|
|
||||||
#include "RimMainPlotCollection.h"
|
#include "RimMainPlotCollection.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
#include "RimSummaryAddress.h"
|
||||||
|
#include "RimSummaryAddressCollection.h"
|
||||||
#include "RimSummaryCaseCollection.h"
|
#include "RimSummaryCaseCollection.h"
|
||||||
#include "RimSummaryPlotCollection.h"
|
#include "RimSummaryPlotCollection.h"
|
||||||
|
|
||||||
#include "cafPdmFieldScriptingCapability.h"
|
#include "cafPdmFieldScriptingCapability.h"
|
||||||
|
#include "cafPdmUiTreeOrdering.h"
|
||||||
|
|
||||||
#include "cvfAssert.h"
|
#include "cvfAssert.h"
|
||||||
|
|
||||||
@@ -62,6 +67,11 @@ RimSummaryCase::RimSummaryCase()
|
|||||||
m_caseId.uiCapability()->setUiReadOnly( true );
|
m_caseId.uiCapability()->setUiReadOnly( true );
|
||||||
m_caseId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
m_caseId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_dataVectorFolders, "DataVectorFolders", "Data Folders" );
|
||||||
|
m_dataVectorFolders = new RimSummaryAddressCollection();
|
||||||
|
m_dataVectorFolders.uiCapability()->setUiHidden( true );
|
||||||
|
m_dataVectorFolders.xmlCapability()->disableIO();
|
||||||
|
|
||||||
m_isObservedData = false;
|
m_isObservedData = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,11 +210,32 @@ QString RimSummaryCase::errorMessagesFromReader()
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCase::buildChildNodes()
|
||||||
|
{
|
||||||
|
m_dataVectorFolders->clear();
|
||||||
|
|
||||||
|
RifSummaryReaderInterface* reader = summaryReader();
|
||||||
|
if ( !reader ) return;
|
||||||
|
|
||||||
|
m_dataVectorFolders->updateFolderStructure( reader->allResultAddresses(), m_caseId );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
void RimSummaryCase::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||||
{
|
{
|
||||||
|
if ( !ensemble() )
|
||||||
|
{
|
||||||
|
if ( m_dataVectorFolders->isEmpty() ) buildChildNodes();
|
||||||
|
m_dataVectorFolders->updateUiTreeOrdering( uiTreeOrdering );
|
||||||
|
}
|
||||||
|
|
||||||
|
uiTreeOrdering.skipRemainingChildren( true );
|
||||||
|
|
||||||
updateTreeItemName();
|
updateTreeItemName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,6 +300,8 @@ void RimSummaryCase::initAfterRead()
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateOptionSensitivity();
|
updateOptionSensitivity();
|
||||||
|
|
||||||
|
refreshMetaData();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -361,3 +394,12 @@ int RimSummaryCase::caseId() const
|
|||||||
{
|
{
|
||||||
return m_caseId();
|
return m_caseId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCase::refreshMetaData()
|
||||||
|
{
|
||||||
|
buildChildNodes();
|
||||||
|
updateConnectedEditors();
|
||||||
|
}
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
#include "RimCaseDisplayNameTools.h"
|
#include "RimCaseDisplayNameTools.h"
|
||||||
|
|
||||||
#include "cafFilePath.h"
|
#include "cafFilePath.h"
|
||||||
|
#include "cafPdmChildArrayField.h"
|
||||||
|
#include "cafPdmChildField.h"
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
@@ -31,6 +33,7 @@
|
|||||||
class RifReaderRftInterface;
|
class RifReaderRftInterface;
|
||||||
class RifSummaryReaderInterface;
|
class RifSummaryReaderInterface;
|
||||||
class RimSummaryCaseCollection;
|
class RimSummaryCaseCollection;
|
||||||
|
class RimSummaryAddressCollection;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
//
|
//
|
||||||
@@ -63,6 +66,8 @@ public:
|
|||||||
void updateAutoShortName();
|
void updateAutoShortName();
|
||||||
void updateOptionSensitivity();
|
void updateOptionSensitivity();
|
||||||
|
|
||||||
|
void refreshMetaData();
|
||||||
|
|
||||||
virtual void createSummaryReaderInterface() = 0;
|
virtual void createSummaryReaderInterface() = 0;
|
||||||
virtual void createRftReaderInterface() {}
|
virtual void createRftReaderInterface() {}
|
||||||
virtual RifSummaryReaderInterface* summaryReader() = 0;
|
virtual RifSummaryReaderInterface* summaryReader() = 0;
|
||||||
@@ -93,11 +98,15 @@ private:
|
|||||||
static QString uniqueShortNameForEnsembleCase( RimSummaryCase* summaryCase );
|
static QString uniqueShortNameForEnsembleCase( RimSummaryCase* summaryCase );
|
||||||
static QString uniqueShortNameForSummaryCase( RimSummaryCase* summaryCase );
|
static QString uniqueShortNameForSummaryCase( RimSummaryCase* summaryCase );
|
||||||
|
|
||||||
|
void buildChildNodes();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
caf::PdmField<QString> m_displayName;
|
caf::PdmField<QString> m_displayName;
|
||||||
caf::PdmField<DisplayNameEnum> m_displayNameOption;
|
caf::PdmField<DisplayNameEnum> m_displayNameOption;
|
||||||
caf::PdmField<caf::FilePath> m_summaryHeaderFilename;
|
caf::PdmField<caf::FilePath> m_summaryHeaderFilename;
|
||||||
|
|
||||||
|
caf::PdmChildField<RimSummaryAddressCollection*> m_dataVectorFolders;
|
||||||
|
|
||||||
bool m_isObservedData;
|
bool m_isObservedData;
|
||||||
caf::PdmField<int> m_caseId;
|
caf::PdmField<int> m_caseId;
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "RimEnsembleCurveSet.h"
|
#include "RimEnsembleCurveSet.h"
|
||||||
#include "RimGridSummaryCase.h"
|
#include "RimGridSummaryCase.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
|
#include "RimSummaryAddressCollection.h"
|
||||||
#include "RimSummaryCase.h"
|
#include "RimSummaryCase.h"
|
||||||
|
|
||||||
#include "RifReaderEclipseRft.h"
|
#include "RifReaderEclipseRft.h"
|
||||||
@@ -38,6 +39,7 @@
|
|||||||
#include "RifSummaryReaderInterface.h"
|
#include "RifSummaryReaderInterface.h"
|
||||||
|
|
||||||
#include "cafPdmFieldScriptingCapability.h"
|
#include "cafPdmFieldScriptingCapability.h"
|
||||||
|
#include "cafPdmUiTreeOrdering.h"
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
|
||||||
@@ -124,6 +126,13 @@ RimSummaryCaseCollection::RimSummaryCaseCollection()
|
|||||||
m_ensembleId.uiCapability()->setUiReadOnly( true );
|
m_ensembleId.uiCapability()->setUiReadOnly( true );
|
||||||
m_ensembleId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
m_ensembleId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_dataVectorFolders, "DataVectorFolders", "Data Folders" );
|
||||||
|
m_dataVectorFolders = new RimSummaryAddressCollection();
|
||||||
|
m_dataVectorFolders.uiCapability()->setUiHidden( true );
|
||||||
|
m_dataVectorFolders.uiCapability()->setUiTreeHidden( true );
|
||||||
|
m_dataVectorFolders->uiCapability()->setUiTreeHidden( true );
|
||||||
|
m_dataVectorFolders.xmlCapability()->disableIO();
|
||||||
|
|
||||||
m_statisticsEclipseRftReader = new RifReaderEnsembleStatisticsRft( this );
|
m_statisticsEclipseRftReader = new RifReaderEnsembleStatisticsRft( this );
|
||||||
|
|
||||||
m_commonAddressCount = 0;
|
m_commonAddressCount = 0;
|
||||||
@@ -158,6 +167,8 @@ void RimSummaryCaseCollection::removeCase( RimSummaryCase* summaryCase )
|
|||||||
if ( dynamic_cast<RimDerivedSummaryCase*>( summaryCase ) == nullptr )
|
if ( dynamic_cast<RimDerivedSummaryCase*>( summaryCase ) == nullptr )
|
||||||
calculateEnsembleParametersIntersectionHash();
|
calculateEnsembleParametersIntersectionHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildChildNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -188,6 +199,8 @@ void RimSummaryCaseCollection::addCase( RimSummaryCase* summaryCase )
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateReferringCurveSets();
|
updateReferringCurveSets();
|
||||||
|
|
||||||
|
buildChildNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -237,6 +250,8 @@ void RimSummaryCaseCollection::setAsEnsemble( bool isEnsemble )
|
|||||||
validateEnsembleCases( allSummaryCases() );
|
validateEnsembleCases( allSummaryCases() );
|
||||||
calculateEnsembleParametersIntersectionHash();
|
calculateEnsembleParametersIntersectionHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refreshMetaData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -872,7 +887,11 @@ caf::PdmFieldHandle* RimSummaryCaseCollection::userDescriptionField()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCaseCollection::onLoadDataAndUpdate()
|
void RimSummaryCaseCollection::onLoadDataAndUpdate()
|
||||||
{
|
{
|
||||||
if ( m_isEnsemble ) calculateEnsembleParametersIntersectionHash();
|
if ( m_isEnsemble )
|
||||||
|
{
|
||||||
|
calculateEnsembleParametersIntersectionHash();
|
||||||
|
buildChildNodes();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -933,6 +952,8 @@ void RimSummaryCaseCollection::initAfterRead()
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateIcon();
|
updateIcon();
|
||||||
|
|
||||||
|
buildChildNodes();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -969,6 +990,30 @@ void RimSummaryCaseCollection::defineUiOrdering( QString uiConfigName, caf::PdmU
|
|||||||
uiOrdering.skipRemainingFields( true );
|
uiOrdering.skipRemainingFields( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCaseCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||||
|
QString uiConfigName /*= ""*/ )
|
||||||
|
{
|
||||||
|
if ( m_isEnsemble() )
|
||||||
|
{
|
||||||
|
if ( m_dataVectorFolders->isEmpty() )
|
||||||
|
{
|
||||||
|
buildChildNodes();
|
||||||
|
}
|
||||||
|
m_dataVectorFolders->updateUiTreeOrdering( uiTreeOrdering );
|
||||||
|
|
||||||
|
auto subnode = uiTreeOrdering.add( "Realizations", ":/Folder.png" );
|
||||||
|
for ( auto& smcase : m_cases )
|
||||||
|
{
|
||||||
|
subnode->add( smcase );
|
||||||
|
}
|
||||||
|
|
||||||
|
uiTreeOrdering.skipRemainingChildren( true );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@@ -1008,3 +1053,27 @@ bool RimSummaryCaseCollection::hasEnsembleParameters() const
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCaseCollection::buildChildNodes()
|
||||||
|
{
|
||||||
|
m_dataVectorFolders->clear();
|
||||||
|
|
||||||
|
for ( auto& smcase : m_cases )
|
||||||
|
{
|
||||||
|
m_dataVectorFolders->updateFolderStructure( smcase->summaryReader()->allResultAddresses(),
|
||||||
|
smcase->caseId(),
|
||||||
|
m_ensembleId );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCaseCollection::refreshMetaData()
|
||||||
|
{
|
||||||
|
buildChildNodes();
|
||||||
|
updateConnectedEditors();
|
||||||
|
}
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
#include "RimObjectiveFunction.h"
|
#include "RimObjectiveFunction.h"
|
||||||
|
|
||||||
#include "cafPdmChildArrayField.h"
|
#include "cafPdmChildArrayField.h"
|
||||||
|
#include "cafPdmChildField.h"
|
||||||
#include "cafPdmField.h"
|
#include "cafPdmField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
#include "cafPdmProxyValueField.h"
|
#include "cafPdmProxyValueField.h"
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
class RifReaderRftInterface;
|
class RifReaderRftInterface;
|
||||||
class RifReaderEnsembleStatisticsRft;
|
class RifReaderEnsembleStatisticsRft;
|
||||||
class RimSummaryCase;
|
class RimSummaryCase;
|
||||||
|
class RimSummaryAddressCollection;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
@@ -100,6 +102,8 @@ public:
|
|||||||
|
|
||||||
RiaDefines::EclipseUnitSystem unitSystem() const;
|
RiaDefines::EclipseUnitSystem unitSystem() const;
|
||||||
|
|
||||||
|
void refreshMetaData();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RigEnsembleParameter createEnsembleParameter( const QString& paramName ) const;
|
RigEnsembleParameter createEnsembleParameter( const QString& paramName ) const;
|
||||||
static void sortByBinnedVariation( std::vector<RigEnsembleParameter>& parameterVector );
|
static void sortByBinnedVariation( std::vector<RigEnsembleParameter>& parameterVector );
|
||||||
@@ -114,18 +118,22 @@ private:
|
|||||||
|
|
||||||
void onCaseNameChanged( const SignalEmitter* emitter );
|
void onCaseNameChanged( const SignalEmitter* emitter );
|
||||||
|
|
||||||
|
void buildChildNodes();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void onLoadDataAndUpdate();
|
virtual void onLoadDataAndUpdate();
|
||||||
void updateReferringCurveSets();
|
void updateReferringCurveSets();
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||||
void setNameAsReadOnly();
|
void setNameAsReadOnly();
|
||||||
|
|
||||||
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
|
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<QString> m_name;
|
caf::PdmField<QString> m_name;
|
||||||
caf::PdmProxyValueField<QString> m_nameAndItemCount;
|
caf::PdmProxyValueField<QString> m_nameAndItemCount;
|
||||||
caf::PdmField<bool> m_isEnsemble;
|
caf::PdmField<bool> m_isEnsemble;
|
||||||
|
caf::PdmChildField<RimSummaryAddressCollection*> m_dataVectorFolders;
|
||||||
|
|
||||||
cvf::ref<RifReaderEnsembleStatisticsRft> m_statisticsEclipseRftReader;
|
cvf::ref<RifReaderEnsembleStatisticsRft> m_statisticsEclipseRftReader;
|
||||||
caf::PdmField<int> m_ensembleId;
|
caf::PdmField<int> m_ensembleId;
|
||||||
|
@@ -628,6 +628,7 @@ std::vector<RimSummaryCase*> RimSummaryCaseMainCollection::createSummaryCasesFro
|
|||||||
newSumCase->setAssociatedEclipseCase( eclCase );
|
newSumCase->setAssociatedEclipseCase( eclCase );
|
||||||
newSumCase->updateOptionSensitivity();
|
newSumCase->updateOptionSensitivity();
|
||||||
project->assignCaseIdToSummaryCase( newSumCase );
|
project->assignCaseIdToSummaryCase( newSumCase );
|
||||||
|
newSumCase->refreshMetaData();
|
||||||
sumCases.push_back( newSumCase );
|
sumCases.push_back( newSumCase );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -644,6 +645,7 @@ std::vector<RimSummaryCase*> RimSummaryCaseMainCollection::createSummaryCasesFro
|
|||||||
newSumCase->setSummaryHeaderFileName( fileInfo.summaryFileName() );
|
newSumCase->setSummaryHeaderFileName( fileInfo.summaryFileName() );
|
||||||
newSumCase->updateOptionSensitivity();
|
newSumCase->updateOptionSensitivity();
|
||||||
project->assignCaseIdToSummaryCase( newSumCase );
|
project->assignCaseIdToSummaryCase( newSumCase );
|
||||||
|
newSumCase->refreshMetaData();
|
||||||
|
|
||||||
sumCases.push_back( newSumCase );
|
sumCases.push_back( newSumCase );
|
||||||
}
|
}
|
||||||
|
@@ -33,6 +33,7 @@
|
|||||||
#include "RimMimeData.h"
|
#include "RimMimeData.h"
|
||||||
#include "RimMultiPlot.h"
|
#include "RimMultiPlot.h"
|
||||||
#include "RimPlot.h"
|
#include "RimPlot.h"
|
||||||
|
#include "RimSummaryAddress.h"
|
||||||
#include "RimSummaryCase.h"
|
#include "RimSummaryCase.h"
|
||||||
#include "RimSummaryCaseCollection.h"
|
#include "RimSummaryCaseCollection.h"
|
||||||
#include "RimSummaryCaseMainCollection.h"
|
#include "RimSummaryCaseMainCollection.h"
|
||||||
@@ -230,7 +231,7 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
|
|||||||
if ( dynamic_cast<RimEclipseCase*>( uiItem ) || dynamic_cast<RimWellLogCurve*>( uiItem ) ||
|
if ( dynamic_cast<RimEclipseCase*>( uiItem ) || dynamic_cast<RimWellLogCurve*>( uiItem ) ||
|
||||||
dynamic_cast<RimWellLogFileChannel*>( uiItem ) || dynamic_cast<RimPlot*>( uiItem ) ||
|
dynamic_cast<RimWellLogFileChannel*>( uiItem ) || dynamic_cast<RimPlot*>( uiItem ) ||
|
||||||
dynamic_cast<RimSummaryCase*>( uiItem ) || dynamic_cast<RimSummaryCurve*>( uiItem ) ||
|
dynamic_cast<RimSummaryCase*>( uiItem ) || dynamic_cast<RimSummaryCurve*>( uiItem ) ||
|
||||||
dynamic_cast<RimSurface*>( uiItem ) )
|
dynamic_cast<RimSurface*>( uiItem ) || dynamic_cast<RimSummaryAddress*>( uiItem ) )
|
||||||
{
|
{
|
||||||
// TODO: Remember to handle reservoir holding the main grid
|
// TODO: Remember to handle reservoir holding the main grid
|
||||||
itemflags |= Qt::ItemIsDragEnabled;
|
itemflags |= Qt::ItemIsDragEnabled;
|
||||||
|
Reference in New Issue
Block a user