23using namespace Qt::StringLiterals;
36 return QObject::tr(
"Bearing" );
51 switch ( mDirectionFormat )
55 value = fmod( value, 360.0 );
61 if ( res !=
"0"_L1 && res !=
"180"_L1 )
63 res += QChar( 176 ) + ( value < 0 ? QObject::tr(
"W" ) : QObject::tr(
"E" ) );
72 value = fmod( value, 360.0 );
82 value = fmod( value, 360.0 );
98 auto res = std::make_unique< QgsBearingNumericFormat >();
101 return res.release();
107 res.insert( u
"direction_format"_s,
static_cast< int >( mDirectionFormat ) );
113 return mDirectionFormat;
A context for numeric formats.
A container for the context for various read/write operations on objects.