mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #8791 from OPM/8790-rename-to-group
Rename summary references to "Group"
This commit is contained in:
@@ -762,7 +762,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspecsToFile( RimEclips
|
||||
auto ijIntersection = wellPathUpperGridIntersectionIJ( gridCase, wellPath );
|
||||
|
||||
formatter.add( completionSettings->wellNameForExport() )
|
||||
.add( completionSettings->wellGroupNameForExport() )
|
||||
.add( completionSettings->groupNameForExport() )
|
||||
.addOneBasedCellIndex( ijIntersection.second.x() )
|
||||
.addOneBasedCellIndex( ijIntersection.second.y() )
|
||||
.add( completionSettings->referenceDepthForExport() )
|
||||
@@ -853,7 +853,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWelspeclToFile(
|
||||
auto completionSettings = wellPath->completionSettings();
|
||||
|
||||
formatter.add( completionSettings->wellNameForExport() )
|
||||
.add( completionSettings->wellGroupNameForExport() )
|
||||
.add( completionSettings->groupNameForExport() )
|
||||
.add( lgrName )
|
||||
.addOneBasedCellIndex( ijIntersection.x() )
|
||||
.addOneBasedCellIndex( ijIntersection.y() )
|
||||
|
||||
@@ -52,7 +52,7 @@ bool RicAppendSummaryPlotsForObjectsFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicAppendSummaryPlotsForObjectsFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
// - Select a set of objects in Data Source (wells, well groups, regions, ..)
|
||||
// - Select a set of objects in Data Source (wells, groups, regions, ..)
|
||||
// - Use context menu to activate action
|
||||
// - For each plot in the current active plot, create a duplicate plot and replace the object name
|
||||
|
||||
@@ -134,7 +134,7 @@ void RicAppendSummaryPlotsForObjectsFeature::setupActionLook( QAction* actionToS
|
||||
}
|
||||
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
|
||||
{
|
||||
objectType = "Well Groups";
|
||||
objectType = "Groups";
|
||||
}
|
||||
else if ( firstAdr->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
|
||||
{
|
||||
@@ -159,7 +159,7 @@ std::vector<RimSummaryAddressCollection*> RicAppendSummaryPlotsForObjectsFeature
|
||||
{
|
||||
auto coll = sumAddressCollections[0];
|
||||
if ( coll->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_FOLDER ||
|
||||
coll->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP_FOLDER ||
|
||||
coll->contentType() == RimSummaryAddressCollection::CollectionContentType::GROUP_FOLDER ||
|
||||
coll->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION_FOLDER )
|
||||
{
|
||||
// If a folder is selected, return all sub items in folder
|
||||
@@ -220,10 +220,9 @@ bool RicAppendSummaryPlotsForObjectsFeature::isSelectionCompatibleWithPlot(
|
||||
}
|
||||
else if ( selectionType == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
|
||||
{
|
||||
if ( analyzer.wellGroupNames().size() != 1 )
|
||||
if ( analyzer.groupNames().size() != 1 )
|
||||
{
|
||||
errorText =
|
||||
"Source plot must contain one well group only to be able to duplicate a selection of well groups";
|
||||
errorText = "Source plot must contain one well group only to be able to duplicate a selection of groups";
|
||||
}
|
||||
}
|
||||
else if ( selectionType == RimSummaryAddressCollection::CollectionContentType::REGION )
|
||||
@@ -271,7 +270,7 @@ RifEclipseSummaryAddress
|
||||
}
|
||||
else if ( summaryAddressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
|
||||
{
|
||||
adr.setWellGroupName( objectName );
|
||||
adr.setGroupName( objectName );
|
||||
}
|
||||
else if ( summaryAddressCollection->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ void RicCreateMultiPlotFromSelectionFeature::onActionTriggered( bool isChecked )
|
||||
auto summaryAddressCollections = RicSummaryPlotTemplateTools::selectedSummaryAddressCollections();
|
||||
|
||||
std::vector<QString> wellNames;
|
||||
std::vector<QString> wellGroupNames;
|
||||
std::vector<QString> groupNames;
|
||||
std::vector<QString> regions;
|
||||
std::set<RimSummaryCase*> caseSet;
|
||||
std::set<RimSummaryCaseCollection*> caseCollectionSet;
|
||||
@@ -74,7 +74,7 @@ void RicCreateMultiPlotFromSelectionFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
else if ( a->contentType() == RimSummaryAddressCollection::CollectionContentType::WELL_GROUP )
|
||||
{
|
||||
wellGroupNames.push_back( a->name() );
|
||||
groupNames.push_back( a->name() );
|
||||
}
|
||||
else if ( a->contentType() == RimSummaryAddressCollection::CollectionContentType::REGION )
|
||||
{
|
||||
@@ -110,7 +110,7 @@ void RicCreateMultiPlotFromSelectionFeature::onActionTriggered( bool isChecked )
|
||||
sumCases,
|
||||
sumCaseCollections,
|
||||
wellNames,
|
||||
wellGroupNames,
|
||||
groupNames,
|
||||
regions );
|
||||
newSummaryPlot->initAfterReadRecursively();
|
||||
newSummaryPlot->loadDataAndUpdate();
|
||||
|
||||
@@ -218,17 +218,17 @@ QString RicSaveMultiPlotTemplateFeature::createTextFromObject( RimSummaryMultiPl
|
||||
objectAsText );
|
||||
}
|
||||
|
||||
if ( settings.usePlacholderForWellGroups() )
|
||||
if ( settings.usePlacholderForGroups() )
|
||||
{
|
||||
std::set<QString> sourceStrings;
|
||||
for ( const auto& wellGroupName : analyzer.wellGroupNames() )
|
||||
for ( const auto& groupName : analyzer.groupNames() )
|
||||
{
|
||||
sourceStrings.insert( QString::fromStdString( wellGroupName ) );
|
||||
sourceStrings.insert( QString::fromStdString( groupName ) );
|
||||
}
|
||||
|
||||
replaceStrings( sourceStrings,
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddress::SUMMARY_WELL_GROUP ),
|
||||
RicSummaryPlotTemplateTools::placeholderTextForWellGroup(),
|
||||
dummy.keywordForCategory( RifEclipseSummaryAddress::SUMMARY_GROUP ),
|
||||
RicSummaryPlotTemplateTools::placeholderTextForGroup(),
|
||||
objectAsText );
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ RicSaveMultiPlotTemplateFeatureSettings::RicSaveMultiPlotTemplateFeatureSettings
|
||||
CAF_PDM_InitFieldNoDefault( &m_filePath, "FilePath", "File Path" );
|
||||
|
||||
CAF_PDM_InitField( &m_replaceWells, "ReplaceWells", true, "Wells" );
|
||||
CAF_PDM_InitField( &m_replaceWellGroups, "ReplaceWellGroups", true, "Well Groups" );
|
||||
CAF_PDM_InitField( &m_replaceGroups, "ReplaceGroups", true, "Groups" );
|
||||
CAF_PDM_InitField( &m_replaceRegions, "ReplaceRegions", true, "Regions" );
|
||||
}
|
||||
|
||||
@@ -61,9 +61,9 @@ bool RicSaveMultiPlotTemplateFeatureSettings::usePlacholderForWells() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSaveMultiPlotTemplateFeatureSettings::usePlacholderForWellGroups() const
|
||||
bool RicSaveMultiPlotTemplateFeatureSettings::usePlacholderForGroups() const
|
||||
{
|
||||
return m_replaceWellGroups;
|
||||
return m_replaceGroups;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -84,7 +84,7 @@ void RicSaveMultiPlotTemplateFeatureSettings::defineUiOrdering( QString uiConfig
|
||||
{
|
||||
auto group = uiOrdering.addNewGroup( "Use Placeholders for Objects" );
|
||||
group->add( &m_replaceWells );
|
||||
group->add( &m_replaceWellGroups );
|
||||
group->add( &m_replaceGroups );
|
||||
group->add( &m_replaceRegions );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public:
|
||||
QString filePath() const;
|
||||
|
||||
bool usePlacholderForWells() const;
|
||||
bool usePlacholderForWellGroups() const;
|
||||
bool usePlacholderForGroups() const;
|
||||
bool usePlacholderForRegions() const;
|
||||
|
||||
private:
|
||||
@@ -48,6 +48,6 @@ private:
|
||||
private:
|
||||
caf::PdmField<caf::FilePath> m_filePath;
|
||||
caf::PdmField<bool> m_replaceWells;
|
||||
caf::PdmField<bool> m_replaceWellGroups;
|
||||
caf::PdmField<bool> m_replaceGroups;
|
||||
caf::PdmField<bool> m_replaceRegions;
|
||||
};
|
||||
|
||||
@@ -79,8 +79,8 @@ void RicSummaryPlotTemplateTools::setValuesForPlaceholders( RimSummaryMultiPlot*
|
||||
const std::vector<RimSummaryCase*>& selectedSummaryCases,
|
||||
const std::vector<RimSummaryCaseCollection*>& selectedEnsembles,
|
||||
const std::vector<QString>& wellNames,
|
||||
const std::vector<QString>& wellGroupNames,
|
||||
const std::vector<QString>& regions )
|
||||
const std::vector<QString>& groupNames,
|
||||
const std::vector<QString>& regions )
|
||||
|
||||
{
|
||||
// Assumes this plot is inserted into the project. This is required when assigning the ptrFields
|
||||
@@ -93,7 +93,7 @@ void RicSummaryPlotTemplateTools::setValuesForPlaceholders( RimSummaryMultiPlot*
|
||||
{
|
||||
auto summaryPlot = dynamic_cast<RimSummaryPlot*>( p );
|
||||
if ( summaryPlot )
|
||||
setValuesForPlaceholders( summaryPlot, selectedSummaryCases, selectedEnsembles, wellNames, wellGroupNames, regions );
|
||||
setValuesForPlaceholders( summaryPlot, selectedSummaryCases, selectedEnsembles, wellNames, groupNames, regions );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,8 +104,8 @@ void RicSummaryPlotTemplateTools::setValuesForPlaceholders( RimSummaryPlot*
|
||||
const std::vector<RimSummaryCase*>& selectedSummaryCases,
|
||||
const std::vector<RimSummaryCaseCollection*>& selectedEnsembles,
|
||||
const std::vector<QString>& wellNames,
|
||||
const std::vector<QString>& wellGroupNames,
|
||||
const std::vector<QString>& regions )
|
||||
const std::vector<QString>& groupNames,
|
||||
const std::vector<QString>& regions )
|
||||
{
|
||||
// Assumes this plot is inserted into the project. This is required when assigning the ptrFields
|
||||
RimProject* proj = nullptr;
|
||||
@@ -138,7 +138,7 @@ void RicSummaryPlotTemplateTools::setValuesForPlaceholders( RimSummaryPlot*
|
||||
// Replace placeholders with object names from selection
|
||||
auto curveAdr = curve->summaryAddressY();
|
||||
setPlaceholderWellName( &curveAdr, wellNames );
|
||||
setPlaceholderWellGroupName( &curveAdr, wellGroupNames );
|
||||
setPlaceholderGroupName( &curveAdr, groupNames );
|
||||
setPlaceholderRegion( &curveAdr, regions );
|
||||
curve->setSummaryAddressY( curveAdr );
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void RicSummaryPlotTemplateTools::setValuesForPlaceholders( RimSummaryPlot*
|
||||
// Replace placeholders with object names from selection
|
||||
auto curveAdr = curveSet->summaryAddress();
|
||||
setPlaceholderWellName( &curveAdr, wellNames );
|
||||
setPlaceholderWellGroupName( &curveAdr, wellGroupNames );
|
||||
setPlaceholderGroupName( &curveAdr, groupNames );
|
||||
setPlaceholderRegion( &curveAdr, regions );
|
||||
curveSet->setSummaryAddress( curveAdr );
|
||||
}
|
||||
@@ -413,11 +413,11 @@ QString RicSummaryPlotTemplateTools::htmlTextFromPlotAndSelection( const RimSumm
|
||||
text += htmlTextFromCount( itemText, requiredCount, selectedCount );
|
||||
}
|
||||
|
||||
if ( !templateAnalyzer.wellGroupNames().empty() )
|
||||
if ( !templateAnalyzer.groupNames().empty() )
|
||||
{
|
||||
QString itemText = "Well Groups";
|
||||
size_t requiredCount = templateAnalyzer.wellGroupNames().size();
|
||||
size_t selectedCount = selectionAnalyzer.wellGroupNames().size();
|
||||
QString itemText = "Groups";
|
||||
size_t requiredCount = templateAnalyzer.groupNames().size();
|
||||
size_t selectedCount = selectionAnalyzer.groupNames().size();
|
||||
text += htmlTextFromCount( itemText, requiredCount, selectedCount );
|
||||
}
|
||||
|
||||
@@ -556,7 +556,7 @@ QString RicSummaryPlotTemplateTools::placeholderTextForWell()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicSummaryPlotTemplateTools::placeholderTextForWellGroup()
|
||||
QString RicSummaryPlotTemplateTools::placeholderTextForGroup()
|
||||
{
|
||||
return "__WELL_GROUP__";
|
||||
}
|
||||
@@ -637,20 +637,19 @@ void RicSummaryPlotTemplateTools::setPlaceholderWellName( RifEclipseSummaryAddre
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicSummaryPlotTemplateTools::setPlaceholderWellGroupName( RifEclipseSummaryAddress* summaryAddress,
|
||||
const std::vector<QString>& wellGroupNames )
|
||||
void RicSummaryPlotTemplateTools::setPlaceholderGroupName( RifEclipseSummaryAddress* summaryAddress,
|
||||
const std::vector<QString>& groupNames )
|
||||
{
|
||||
if ( wellGroupNames.empty() ) return;
|
||||
if ( groupNames.empty() ) return;
|
||||
|
||||
auto sourceWellGroupName = QString::fromStdString( summaryAddress->wellGroupName() );
|
||||
bool conversionOk = false;
|
||||
const QString placeholderString = RicSummaryPlotTemplateTools::placeholderTextForWellGroup();
|
||||
auto sourceGroupName = QString::fromStdString( summaryAddress->groupName() );
|
||||
bool conversionOk = false;
|
||||
const QString placeholderString = RicSummaryPlotTemplateTools::placeholderTextForGroup();
|
||||
|
||||
int indexValue =
|
||||
RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString, sourceWellGroupName, &conversionOk );
|
||||
if ( conversionOk && indexValue >= 0 && indexValue < static_cast<int>( wellGroupNames.size() ) )
|
||||
int indexValue = RicSummaryPlotTemplateTools::findValueForKeyword( placeholderString, sourceGroupName, &conversionOk );
|
||||
if ( conversionOk && indexValue >= 0 && indexValue < static_cast<int>( groupNames.size() ) )
|
||||
{
|
||||
summaryAddress->setWellGroupName( wellGroupNames[indexValue].toStdString() );
|
||||
summaryAddress->setGroupName( groupNames[indexValue].toStdString() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,14 +47,14 @@ public:
|
||||
const std::vector<RimSummaryCase*>& selectedSummaryCases,
|
||||
const std::vector<RimSummaryCaseCollection*>& selectedEnsembles,
|
||||
const std::vector<QString>& wellNames,
|
||||
const std::vector<QString>& wellGroupNames,
|
||||
const std::vector<QString>& groupNames,
|
||||
const std::vector<QString>& regions );
|
||||
|
||||
static void setValuesForPlaceholders( RimSummaryPlot* summaryPlot,
|
||||
const std::vector<RimSummaryCase*>& selectedSummaryCases,
|
||||
const std::vector<RimSummaryCaseCollection*>& selectedEnsembles,
|
||||
const std::vector<QString>& wellNames,
|
||||
const std::vector<QString>& wellGroupNames,
|
||||
const std::vector<QString>& groupNames,
|
||||
const std::vector<QString>& regions );
|
||||
|
||||
static RimSummaryPlot* createPlotFromTemplateFile( const QString& fileName );
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
static QString placeholderTextForSummaryCase();
|
||||
static QString placeholderTextForSummaryGroup();
|
||||
static QString placeholderTextForWell();
|
||||
static QString placeholderTextForWellGroup();
|
||||
static QString placeholderTextForGroup();
|
||||
|
||||
private:
|
||||
static RifEclipseSummaryAddress firstAddressByQuantity( const RifEclipseSummaryAddress& sourceAddress,
|
||||
@@ -90,7 +90,6 @@ private:
|
||||
static int findValueForKeyword( const QString& keyword, const QString& valueString, bool* ok );
|
||||
|
||||
static void setPlaceholderWellName( RifEclipseSummaryAddress* summaryAddress, const std::vector<QString>& wellNames );
|
||||
static void setPlaceholderWellGroupName( RifEclipseSummaryAddress* summaryAddress,
|
||||
const std::vector<QString>& wellGroupNames );
|
||||
static void setPlaceholderGroupName( RifEclipseSummaryAddress* summaryAddress, const std::vector<QString>& groupNames );
|
||||
static void setPlaceholderRegion( RifEclipseSummaryAddress* summaryAddress, const std::vector<QString>& regions );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user