Class: QgsPercentageNumericFormat

class qgis.core.QgsPercentageNumericFormat

Bases: QgsBasicNumericFormat

Default constructor

QgsPercentageNumericFormat(QgsPercentageNumericFormat)

A numeric formatter which returns a text representation of a percentage value.

Methods

clone

rtype

QgsNumericFormat

configuration

param context

create

param configuration

formatDouble

param value

id

rtype

str

inputValues

Returns the format of the incoming values.

setConfiguration

Sets the format’s configuration.

setInputValues

Sets the format of the incoming values.

sortKey

rtype

int

suggestSampleValue

rtype

float

visibleName

rtype

str

Attributes

ValuesAreFractions

ValuesArePercentage

class InputValues

Bases: int

ValuesAreFractions = 1
ValuesArePercentage = 0
clone(self)QgsNumericFormat
Return type

QgsNumericFormat

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
Return type

QgsNumericFormat

formatDouble(self, value: float, context: QgsNumericFormatContext) → str
Parameters
Return type

str

id(self) → str
Return type

str

inputValues(self)QgsPercentageNumericFormat.InputValues

Returns the format of the incoming values.

See also

setInputValues()

Return type

QgsPercentageNumericFormat.InputValues

setConfiguration(self, configuration: Dict[str, Any], context: QgsReadWriteContext)

Sets the format’s configuration.

setInputValues(self, format: QgsPercentageNumericFormat.InputValues)

Sets the format of the incoming values.

See also

inputValues()

Parameters

format (QgsPercentageNumericFormat.InputValues) –

sortKey(self) → int
Return type

int

suggestSampleValue(self) → float
Return type

float

visibleName(self) → str
Return type

str