Class: QgsFieldFormatterRegistry

class qgis.core.QgsFieldFormatterRegistry(parent: QObject = None)

Bases: PyQt5.QtCore.QObject

You should not normally need to create your own field formatter registry.

Use the one provided by QgsApplication.fieldFormatterRegistry() instead.

The QgsFieldFormatterRegistry manages registered classes of QgsFieldFormatter. A reference to the QgsFieldFormatterRegistry can be obtained from QgsApplication.fieldFormatterRegistry()

New in version 3.0.

Parameters

parent

addFieldFormatter(self, formatter: QgsFieldFormatter)

They will take precedence in order of adding them. The later they are added, the more weight they have.

Ownership is transferred to the registry.

Parameters

formatter (QgsFieldFormatter) –

childEvent()
connectNotify()
customEvent()
disconnectNotify()
fallbackFieldFormatter(self) → QgsFieldFormatter

Returns a basic fallback field formatter which can be used to represent any field in an unspectacular manner.

Return type

QgsFieldFormatter

fieldFormatter(self, id: str) → QgsFieldFormatter

Gets a field formatter by its id. If there is no such id registered, a default QgsFallbackFieldFormatter with a null id will be returned instead.

Parameters

id (str) –

Return type

QgsFieldFormatter

fieldFormatterAdded

Will be emitted after a new field formatter has been added. [signal]

Parameters

formatter (QgsFieldFormatter) –

fieldFormatterRemoved

Will be emitted just before a field formatter is removed and deleted. [signal]

Parameters

formatter (QgsFieldFormatter) –

isSignalConnected()
receivers()
removeFieldFormatter(self, formatter: QgsFieldFormatter)

Remove a field formatter from the registry. The field formatter will be deleted.

removeFieldFormatter(self, id: str) Remove the field formatter with the specified id.

Parameters

formatter (QgsFieldFormatter) –

sender()
senderSignalIndex()
timerEvent()