23using namespace Qt::StringLiterals;
35 return QObject::tr(
"Bearing" );
50 switch ( mDirectionFormat )
54 value = fmod( value, 360.0 );
60 if ( res !=
"0"_L1 && res !=
"180"_L1 )
62 res += QChar( 176 ) + ( value < 0 ? QObject::tr(
"W" ) : QObject::tr(
"E" ) );
71 value = fmod( value, 360.0 );
81 value = fmod( value, 360.0 );
97 auto res = std::make_unique< QgsBearingNumericFormat >();
100 return res.release();
106 res.insert( u
"direction_format"_s,
static_cast< int >( mDirectionFormat ) );
112 return mDirectionFormat;
A context for numeric formats.
A container for the context for various read/write operations on objects.