Class: QgsBearingNumericFormat

A numeric formatter which returns a text representation of a direction/bearing.

Added in version 3.12.

Class Hierarchy

Inheritance diagram of qgis.core.QgsBearingNumericFormat

Base classes

QgsBasicNumericFormat

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

QgsNumericFormat

Abstract base class for numeric formatters, which allow for formatting a numeric value for display.

Methods

directionFormat

Returns the directional formatting option, which controls how bearing direction is described in the returned strings.

setDirectionFormat

Sets the directional formatting option, which controls how bearing direction is described in the returned strings.

Attributes

UseRange0To180WithEWDirectionalSuffix

UseRange0To360

UseRangeNegative180ToPositive180

class qgis.core.QgsBearingNumericFormat[source]

Bases: QgsBasicNumericFormat

__init__()

Default constructor

__init__(a0: QgsBearingNumericFormat)
Parameters:

a0 (QgsBearingNumericFormat)

class FormatDirectionOption

Bases: int

UseRange0To180WithEWDirectionalSuffix = 0
UseRange0To360 = 2
UseRangeNegative180ToPositive180 = 1
directionFormat(self) QgsBearingNumericFormat.FormatDirectionOption[source]

Returns the directional formatting option, which controls how bearing direction is described in the returned strings.

Return type:

QgsBearingNumericFormat.FormatDirectionOption

setDirectionFormat(self, format: QgsBearingNumericFormat.FormatDirectionOption)[source]

Sets the directional formatting option, which controls how bearing direction is described in the returned strings.

Parameters:

format (QgsBearingNumericFormat.FormatDirectionOption)