Class: QgsCurrencyNumericFormat¶
- class qgis.core.QgsCurrencyNumericFormat¶
Bases:
QgsBasicNumericFormat
A numeric formatter which returns a text representation of a currency value.
New in version 3.12.
QgsCurrencyNumericFormat() Default constructor
QgsCurrencyNumericFormat(
QgsCurrencyNumericFormat
)Methods
- rtype
QgsNumericFormat
- param context
- param configuration
- param value
- rtype
str
Returns the currency prefix, e.g.
Sets the format's
configuration
.Sets the currency
prefix
, e.g.Sets the currency
suffix
, e.g.- rtype
int
Returns the currency suffix, e.g.
- rtype
float
- rtype
str
- clone(self) QgsNumericFormat ¶
- Return type
- configuration(self, context: QgsReadWriteContext) Dict[str, Any] ¶
- Parameters
context (QgsReadWriteContext) –
- Return type
Dict[str, Any]
- create(self, configuration: Dict[str, Any], context: QgsReadWriteContext) QgsNumericFormat ¶
- Parameters
configuration (Dict[str) –
context (QgsReadWriteContext) –
- Return type
- formatDouble(self, value: float, context: QgsNumericFormatContext) str ¶
- Parameters
value (float) –
context (QgsNumericFormatContext) –
- Return type
str
- id(self) str ¶
- Return type
str
- prefix(self) str ¶
Returns the currency prefix, e.g. “$”.
See also
- Return type
str
- setConfiguration(self, configuration: Dict[str, Any], context: QgsReadWriteContext)¶
Sets the format’s
configuration
.
- setPrefix(self, prefix: str)¶
Sets the currency
prefix
, e.g. “$”.See also
- Parameters
prefix (str) –
- setSuffix(self, suffix: str)¶
Sets the currency
suffix
, e.g. “AUD”.See also
- Parameters
suffix (str) –
- sortKey(self) int ¶
- Return type
int
- suffix(self) str ¶
Returns the currency suffix, e.g. “AUD”.
See also
- Return type
str
- suggestSampleValue(self) float ¶
- Return type
float
- visibleName(self) str ¶
- Return type
str