mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5768 Info Box : Use space as thousand separator
This commit is contained in:
parent
42b0c1c357
commit
d4130b456b
@ -63,6 +63,7 @@
|
|||||||
#include "RiuViewer.h"
|
#include "RiuViewer.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QLocale>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
CAF_PDM_SOURCE_INIT( Rim3dOverlayInfoConfig, "View3dOverlayInfoConfig" );
|
CAF_PDM_SOURCE_INIT( Rim3dOverlayInfoConfig, "View3dOverlayInfoConfig" );
|
||||||
@ -561,12 +562,15 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimEclipseView* eclipseView )
|
|||||||
{
|
{
|
||||||
QString caseName = eclipseView->eclipseCase()->caseUserDescription();
|
QString caseName = eclipseView->eclipseCase()->caseUserDescription();
|
||||||
|
|
||||||
|
QLocale localeWithSpaceAsGroupSeparator( QLocale::Norwegian );
|
||||||
|
|
||||||
RimEclipseContourMapView* contourMap = dynamic_cast<RimEclipseContourMapView*>( eclipseView );
|
RimEclipseContourMapView* contourMap = dynamic_cast<RimEclipseContourMapView*>( eclipseView );
|
||||||
if ( contourMap && contourMap->contourMapProjection() )
|
if ( contourMap && contourMap->contourMapProjection() )
|
||||||
{
|
{
|
||||||
QString totCellCount = QString::number( contourMap->contourMapProjection()->numberOfCells() );
|
QString totCellCount =
|
||||||
|
localeWithSpaceAsGroupSeparator.toString( contourMap->contourMapProjection()->numberOfCells() );
|
||||||
cvf::uint validCellCount = contourMap->contourMapProjection()->numberOfValidCells();
|
cvf::uint validCellCount = contourMap->contourMapProjection()->numberOfValidCells();
|
||||||
QString activeCellCountText = QString::number( validCellCount );
|
QString activeCellCountText = localeWithSpaceAsGroupSeparator.toString( validCellCount );
|
||||||
QString aggregationType = contourMap->contourMapProjection()->resultAggregationText();
|
QString aggregationType = contourMap->contourMapProjection()->resultAggregationText();
|
||||||
QString weightingParameterString;
|
QString weightingParameterString;
|
||||||
if ( contourMap->contourMapProjection()->weightingParameter() != "None" )
|
if ( contourMap->contourMapProjection()->weightingParameter() != "None" )
|
||||||
@ -582,8 +586,10 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimEclipseView* eclipseView )
|
|||||||
}
|
}
|
||||||
else if ( eclipseView->mainGrid() )
|
else if ( eclipseView->mainGrid() )
|
||||||
{
|
{
|
||||||
QString totCellCount = QString::number( eclipseView->mainGrid()->globalCellArray().size() );
|
QString totCellCount =
|
||||||
size_t mxActCellCount = eclipseView->eclipseCase()
|
localeWithSpaceAsGroupSeparator.toString( eclipseView->mainGrid()->globalCellArray().size() );
|
||||||
|
|
||||||
|
size_t mxActCellCount = eclipseView->eclipseCase()
|
||||||
->eclipseCaseData()
|
->eclipseCaseData()
|
||||||
->activeCellInfo( RiaDefines::MATRIX_MODEL )
|
->activeCellInfo( RiaDefines::MATRIX_MODEL )
|
||||||
->reservoirActiveCellCount();
|
->reservoirActiveCellCount();
|
||||||
@ -594,8 +600,9 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimEclipseView* eclipseView )
|
|||||||
|
|
||||||
QString activeCellCountText;
|
QString activeCellCountText;
|
||||||
if ( frActCellCount > 0 ) activeCellCountText += "Matrix : ";
|
if ( frActCellCount > 0 ) activeCellCountText += "Matrix : ";
|
||||||
activeCellCountText += QString::number( mxActCellCount );
|
activeCellCountText += localeWithSpaceAsGroupSeparator.toString( mxActCellCount );
|
||||||
if ( frActCellCount > 0 ) activeCellCountText += " Fracture : " + QString::number( frActCellCount );
|
if ( frActCellCount > 0 )
|
||||||
|
activeCellCountText += " Fracture : " + localeWithSpaceAsGroupSeparator.toString( frActCellCount );
|
||||||
|
|
||||||
QString iSize = QString::number( eclipseView->mainGrid()->cellCountI() );
|
QString iSize = QString::number( eclipseView->mainGrid()->cellCountI() );
|
||||||
QString jSize = QString::number( eclipseView->mainGrid()->cellCountJ() );
|
QString jSize = QString::number( eclipseView->mainGrid()->cellCountJ() );
|
||||||
|
Loading…
Reference in New Issue
Block a user