mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add itemUiText method on RifEclipseSummaryAddress
This commit is contained in:
parent
2a4fd959e9
commit
bec8afaf39
@ -583,72 +583,89 @@ std::string RifEclipseSummaryAddress::uiText() const
|
||||
if ( m_isErrorResult ) text += "ERR:";
|
||||
|
||||
text += m_quantityName;
|
||||
|
||||
std::string itemText = itemUiText();
|
||||
if ( !itemText.empty() )
|
||||
{
|
||||
text += ":" + itemText;
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string RifEclipseSummaryAddress::itemUiText() const
|
||||
{
|
||||
std::string text;
|
||||
|
||||
switch ( this->category() )
|
||||
{
|
||||
case SUMMARY_REGION:
|
||||
{
|
||||
text += ":" + std::to_string( this->regionNumber() );
|
||||
text += std::to_string( this->regionNumber() );
|
||||
}
|
||||
break;
|
||||
case SUMMARY_REGION_2_REGION:
|
||||
{
|
||||
text += ":" + formatUiTextRegionToRegion();
|
||||
text += formatUiTextRegionToRegion();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL_GROUP:
|
||||
{
|
||||
text += ":" + this->wellGroupName();
|
||||
text += this->wellGroupName();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL:
|
||||
{
|
||||
text += ":" + this->wellName();
|
||||
text += this->wellName();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL_COMPLETION:
|
||||
{
|
||||
text += ":" + this->wellName();
|
||||
text += this->wellName();
|
||||
text += ":" + blockAsString();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL_LGR:
|
||||
{
|
||||
text += ":" + this->lgrName();
|
||||
text += this->lgrName();
|
||||
text += ":" + this->wellName();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL_COMPLETION_LGR:
|
||||
{
|
||||
text += ":" + this->lgrName();
|
||||
text += this->lgrName();
|
||||
text += ":" + this->wellName();
|
||||
text += ":" + blockAsString();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_WELL_SEGMENT:
|
||||
{
|
||||
text += ":" + this->wellName();
|
||||
text += this->wellName();
|
||||
text += ":" + std::to_string( this->wellSegmentNumber() );
|
||||
}
|
||||
break;
|
||||
case SUMMARY_BLOCK:
|
||||
{
|
||||
text += ":" + blockAsString();
|
||||
text += blockAsString();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_BLOCK_LGR:
|
||||
{
|
||||
text += ":" + this->lgrName();
|
||||
text += this->lgrName();
|
||||
text += ":" + blockAsString();
|
||||
}
|
||||
break;
|
||||
case SUMMARY_AQUIFER:
|
||||
{
|
||||
text += ":" + std::to_string( this->aquiferNumber() );
|
||||
text += std::to_string( this->aquiferNumber() );
|
||||
}
|
||||
break;
|
||||
case SUMMARY_CALCULATED:
|
||||
{
|
||||
text += ":" + std::to_string( this->id() );
|
||||
text += std::to_string( this->id() );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -657,7 +674,7 @@ std::string RifEclipseSummaryAddress::uiText() const
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns the stringified value for the specified identifier type
|
||||
/// Returns the stringified address component requested
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::string
|
||||
RifEclipseSummaryAddress::addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType identifierType ) const
|
||||
|
@ -183,6 +183,7 @@ public:
|
||||
// Derived properties
|
||||
|
||||
std::string uiText() const;
|
||||
std::string itemUiText() const;
|
||||
std::string addressComponentUiText( RifEclipseSummaryAddress::SummaryIdentifierType itemTypeInput ) const;
|
||||
bool isUiTextMatchingFilterText( const QString& filterString ) const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user