mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove use of QString::sprintf
This commit is contained in:
@@ -218,11 +218,10 @@ bool RicWellPathPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& event
|
||||
wellPathText += QString( "Well path name : %1\n" ).arg( wellPathSourceInfo->wellPath()->name() );
|
||||
wellPathText += QString( "Measured depth : %1\n" ).arg( measuredDepth );
|
||||
|
||||
QString formattedText;
|
||||
formattedText.sprintf( "Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]",
|
||||
trueVerticalDepth.x(),
|
||||
trueVerticalDepth.y(),
|
||||
-trueVerticalDepth.z() );
|
||||
QString formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" )
|
||||
.arg( trueVerticalDepth.x(), 5, 'f', 2 )
|
||||
.arg( trueVerticalDepth.y(), 5, 'f', 2 )
|
||||
.arg( -trueVerticalDepth.z(), 5, 'f', 2 );
|
||||
wellPathText += formattedText;
|
||||
|
||||
RiuMainWindow::instance()->setResultInfo( wellPathText );
|
||||
|
||||
@@ -239,7 +239,8 @@ QString RiuResultTextBuilder::geometrySelectionText( QString itemSeparator )
|
||||
QString formattedText;
|
||||
if ( m_2dIntersectionView )
|
||||
{
|
||||
formattedText.sprintf( "Horizontal length from well start: %.2f", m_intersectionPointInDisplay.x() );
|
||||
formattedText =
|
||||
QString( "Horizontal length from well start: %1" ).arg( m_intersectionPointInDisplay.x(), 5, 'f', 2 );
|
||||
text += formattedText + itemSeparator;
|
||||
|
||||
cvf::Mat4d t = m_2dIntersectionView->flatIntersectionPartMgr()->unflattenTransformMatrix(
|
||||
@@ -247,10 +248,10 @@ QString RiuResultTextBuilder::geometrySelectionText( QString itemSeparator )
|
||||
if ( !t.isZero() )
|
||||
{
|
||||
cvf::Vec3d intPt = m_intersectionPointInDisplay.getTransformedPoint( t );
|
||||
formattedText.sprintf( "Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]",
|
||||
intPt.x(),
|
||||
intPt.y(),
|
||||
-intPt.z() );
|
||||
formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" )
|
||||
.arg( intPt.x(), 5, 'f', 2 )
|
||||
.arg( intPt.y(), 5, 'f', 2 )
|
||||
.arg( -intPt.z(), 5, 'f', 2 );
|
||||
text += formattedText;
|
||||
}
|
||||
}
|
||||
@@ -261,10 +262,10 @@ QString RiuResultTextBuilder::geometrySelectionText( QString itemSeparator )
|
||||
cvf::ref<caf::DisplayCoordTransform> transForm = m_displayCoordView->displayCoordTransform();
|
||||
cvf::Vec3d domainCoord = transForm->translateToDomainCoord( m_intersectionPointInDisplay );
|
||||
|
||||
formattedText.sprintf( "Intersection point : [E: %.2f, N: %.2f, Depth: %.2f]",
|
||||
domainCoord.x(),
|
||||
domainCoord.y(),
|
||||
-domainCoord.z() );
|
||||
formattedText = QString( "Intersection point : [E: %1, N: %2, Depth: %3]" )
|
||||
.arg( domainCoord.x(), 5, 'f', 2 )
|
||||
.arg( domainCoord.y(), 5, 'f', 2 )
|
||||
.arg( -domainCoord.z(), 5, 'f', 2 );
|
||||
text += formattedText;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -771,12 +771,11 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
|
||||
if ( eclView ) resultInfoText = partMgr->resultInfoText( *eclView, domainCoord );
|
||||
|
||||
// Set intersection point result text
|
||||
QString intersectionPointText;
|
||||
|
||||
intersectionPointText.sprintf( "Intersection point : Global [E: %.2f, N: %.2f, Depth: %.2f]",
|
||||
domainCoord.x(),
|
||||
domainCoord.y(),
|
||||
-domainCoord.z() );
|
||||
QString intersectionPointText =
|
||||
QString( "Intersection point : Global [E: %1, N: %2, Depth: %3]" )
|
||||
.arg( domainCoord.x(), 5, 'f', 2 )
|
||||
.arg( domainCoord.y(), 5, 'f', 2 )
|
||||
.arg( -domainCoord.z(), 5, 'f', 2 );
|
||||
resultInfoText.append( intersectionPointText );
|
||||
|
||||
// Display result info text
|
||||
|
||||
Reference in New Issue
Block a user