Class: QgsMeshTimeSettings

class qgis.core.QgsMeshTimeSettings

Bases: sip.wrapper

Default constructor for relative time format and 0 offset

QgsMeshTimeSettings(relativeTimeOffsetHours: float, relativeTimeFormat: str) Constructs relative time format settings with defined offset in hours

QgsMeshTimeSettings(absoluteTimeReferenceTime: Union[QDateTime, datetime.datetime], absoluteTimeFormat: str) Constructs absolute time format settings with defined reference time

QgsMeshTimeSettings(QgsMeshTimeSettings)

Represents a mesh time settings for mesh datasets

Methods

absoluteTimeFormat

Returns format used for absolute time

absoluteTimeReferenceTime

Returns reference time used for absolute time format

readXml

Reads configuration from the given DOM element

relativeTimeFormat

Returns format used for relative time

relativeTimeOffsetHours

Returns number of offset hours for relative time formatting

setAbsoluteTimeFormat

Sets format used for absolute time

setAbsoluteTimeReferenceTime

Sets reference time used for absolute time format

setRelativeTimeFormat

Sets format used for relative time

setRelativeTimeOffsetHours

Sets number of offset hours for relative time formatting

setUseAbsoluteTime

Sets use absolute time flag

useAbsoluteTime

Returns whether to use absolute time format

writeXml

Writes configuration to a new DOM element

absoluteTimeFormat(self) → str

Returns format used for absolute time

Return type

str

absoluteTimeReferenceTime(self) → QDateTime

Returns reference time used for absolute time format

Return type

QDateTime

readXml(self, elem: QDomElement, context: QgsReadWriteContext)

Reads configuration from the given DOM element

Parameters
relativeTimeFormat(self) → str

Returns format used for relative time

Return type

str

relativeTimeOffsetHours(self) → float

Returns number of offset hours for relative time formatting

Return type

float

setAbsoluteTimeFormat(self, absoluteTimeFormat: str)

Sets format used for absolute time

Parameters

absoluteTimeFormat (str) –

setAbsoluteTimeReferenceTime(self, absoluteTimeReferenceTime: Union[QDateTime, datetime.datetime])

Sets reference time used for absolute time format

Parameters

absoluteTimeReferenceTime (Union[QDateTime) –

setRelativeTimeFormat(self, relativeTimeFormat: str)

Sets format used for relative time

Parameters

relativeTimeFormat (str) –

setRelativeTimeOffsetHours(self, relativeTimeOffsetHours: float)

Sets number of offset hours for relative time formatting

Parameters

relativeTimeOffsetHours (float) –

setUseAbsoluteTime(self, useAbsoluteTime: bool)

Sets use absolute time flag

Parameters

useAbsoluteTime (bool) –

useAbsoluteTime(self) → bool

Returns whether to use absolute time format

Return type

bool

writeXml(self, doc: QDomDocument, context: QgsReadWriteContext) → QDomElement

Writes configuration to a new DOM element

Parameters
Return type

QDomElement