mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7667 Refactor: extract number format settings for reuse.
This commit is contained in:
committed by
Magne Sjaastad
parent
5d703b2a08
commit
b2025fbeef
@@ -35,7 +35,7 @@ RiuScalarMapperLegendFrame::RiuScalarMapperLegendFrame( QWidget* parent, const Q
|
||||
: RiuAbstractLegendFrame( parent, title )
|
||||
, m_scalarMapper( scalarMapper )
|
||||
, m_tickNumberPrecision( 4 )
|
||||
, m_numberFormat( RimRegularLegendConfig::NumberFormatType::AUTO )
|
||||
, m_numberFormat( RiaNumberFormat::NumberFormatType::AUTO )
|
||||
{
|
||||
if ( m_scalarMapper.notNull() )
|
||||
{
|
||||
@@ -126,7 +126,7 @@ void RiuScalarMapperLegendFrame::layoutInfo( LayoutInfo* layout ) const
|
||||
QString RiuScalarMapperLegendFrame::label( int index ) const
|
||||
{
|
||||
double tickValue = m_tickValues[index];
|
||||
return RimRegularLegendConfig::valueToText( tickValue, m_numberFormat, m_tickNumberPrecision );
|
||||
return RiaNumberFormat::valueToText( tickValue, m_numberFormat, m_tickNumberPrecision );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RiaNumberFormat.h"
|
||||
|
||||
#include "RimRegularLegendConfig.h"
|
||||
#include "RiuAbstractLegendFrame.h"
|
||||
|
||||
@@ -37,7 +39,7 @@ class RiuScalarMapperLegendFrame : public RiuAbstractLegendFrame
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using NumberFormat = RimRegularLegendConfig::NumberFormatType;
|
||||
using NumberFormat = RiaNumberFormat::NumberFormatType;
|
||||
|
||||
public:
|
||||
RiuScalarMapperLegendFrame( QWidget* parent, const QString& title, cvf::ScalarMapper* scalarMapper );
|
||||
|
||||
Reference in New Issue
Block a user