Class: QgsBearingNumericFormat

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

Added in version 3.12.

List of all members, including inherited members

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.

Enums

FormatDirectionOption

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.

class qgis.core.QgsBearingNumericFormat[source]

Bases: QgsBasicNumericFormat

__init__()

Default constructor

__init__(a0: QgsBearingNumericFormat)
Parameters:

a0 (QgsBearingNumericFormat)

class FormatDirectionOption(*values)

Bases: IntEnum

UseRange0To180WithEWDirectionalSuffix = 0
UseRange0To360 = 2
UseRangeNegative180ToPositive180 = 1
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)