QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
22 : mPrefix( QStringLiteral(
"$" ) )
30 return QStringLiteral(
"currency" );
35 return QObject::tr(
"Currency" );
52 return res.at( 0 ) + mPrefix + res.mid( 1 ) + mSuffix;
54 return mPrefix + res + mSuffix;
64 std::unique_ptr< QgsCurrencyNumericFormat > res = qgis::make_unique< QgsCurrencyNumericFormat >();
66 res->mPrefix =
configuration.value( QStringLiteral(
"prefix" ), QStringLiteral(
"$" ) ).toString();
67 res->mSuffix =
configuration.value( QStringLiteral(
"suffix" ), QString() ).toString();
70 res->setNumberDecimalPlaces(
configuration.value( QStringLiteral(
"decimals" ), 2 ).toInt() );
71 res->setShowTrailingZeros(
configuration.value( QStringLiteral(
"show_trailing_zeros" ),
true ).toBool() );
80 res.insert( QStringLiteral(
"prefix" ), mPrefix );
81 res.insert( QStringLiteral(
"suffix" ), mSuffix );
The class is used as a container of context for various read/write operations on other objects.
A context for numeric formats.