Class: QgsProjectTimeSettings

class qgis.core.QgsProjectTimeSettings

Bases: PyQt5.QtCore.QObject

Contains temporal settings and properties for the project, this may be used when animating maps or showing temporal layers.

New in version 3.14.

QgsProjectTimeSettings(parent: QObject = None) Constructor for QgsProjectTimeSettings with the specified parent object.

Methods

childEvent

connectNotify

customEvent

disconnectNotify

framesPerSecond

Returns the project’s default animation frame rate, in frames per second.

isSignalConnected

isTemporalRangeCumulative

Returns the value of cumulative temporal range in animation settings.

readXml

Reads the settings’s state from a DOM element.

receivers

reset

Resets the settings to a default state.

sender

senderSignalIndex

setFramesPerSecond

Sets the project’s default animation frame rate, in frames per second.

setIsTemporalRangeCumulative

Sets the project’s temporal range as cumulative in animation settings.

setTemporalRange

Sets the project’s temporal range, which indicates the earliest and latest datetime ranges associated with the project.

setTimeStep

Sets the project’s time step (length of one animation frame), which is used as the default value when animating the project.

setTimeStepUnit

Sets the project’s time step (length of one animation frame) unit, which is used as the default value when animating the project.

temporalRange

Returns the project’s temporal range, which indicates the earliest and latest datetime ranges associated with the project.

timeStep

Returns the project’s time step (length of one animation frame), which is used as the default value when animating the project.

timeStepUnit

Returns the project’s time step (length of one animation frame) unit, which is used as the default value when animating the project.

timerEvent

writeXml

Returns a DOM element representing the settings.

Signals

temporalRangeChanged

Emitted when the temporal range changes.

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
framesPerSecond(self)float

Returns the project’s default animation frame rate, in frames per second.

Return type

float

isSignalConnected(self, QMetaMethod)bool
isTemporalRangeCumulative(self)bool

Returns the value of cumulative temporal range in animation settings.

Return type

bool

readXml(self, element: QDomElement, context: QgsReadWriteContext)bool

Reads the settings’s state from a DOM element.

See also

writeXml()

Parameters
Return type

bool

receivers(self, PYQT_SIGNAL)int
reset(self)

Resets the settings to a default state.

sender(self)QObject
senderSignalIndex(self)int
setFramesPerSecond(self, rate: float)

Sets the project’s default animation frame rate, in frames per second.

Parameters

rate (float) –

setIsTemporalRangeCumulative(self, state: bool)

Sets the project’s temporal range as cumulative in animation settings.

Parameters

state (bool) –

setTemporalRange(self, range: QgsDateTimeRange)

Sets the project’s temporal range, which indicates the earliest and latest datetime ranges associated with the project.

Note

This is a manual, use-set property, and does not necessarily coincide with the earliest and latest temporal ranges set for individual layers in the project.

See also

temporalRange()

Parameters

range (QgsDateTimeRange) –

setTimeStep(self, step: float)

Sets the project’s time step (length of one animation frame), which is used as the default value when animating the project.

Units are specified via setTimeStepUnit()

See also

timeStep()

Parameters

step (float) –

setTimeStepUnit(self, unit: QgsUnitTypes.TemporalUnit)

Sets the project’s time step (length of one animation frame) unit, which is used as the default value when animating the project.

See also

timeStepUnit()

See also

setTimeStep()

Parameters

unit (QgsUnitTypes.TemporalUnit) –

temporalRange(self)QgsDateTimeRange

Returns the project’s temporal range, which indicates the earliest and latest datetime ranges associated with the project.

Note

This is a manual, use-set property, and does not necessarily coincide with the earliest and latest temporal ranges set for individual layers in the project.

Return type

QgsDateTimeRange

temporalRangeChanged

Emitted when the temporal range changes.

See also

temporalRange()

See also

setTemporalRange() [signal]

timeStep(self)float

Returns the project’s time step (length of one animation frame), which is used as the default value when animating the project.

Units are specified via timeStepUnit()

See also

setTimeStep()

See also

timeStepUnit()

Return type

float

timeStepUnit(self)QgsUnitTypes.TemporalUnit

Returns the project’s time step (length of one animation frame) unit, which is used as the default value when animating the project.

See also

timeStep()

Return type

QgsUnitTypes.TemporalUnit

timerEvent(self, QTimerEvent)
writeXml(self, document: QDomDocument, context: QgsReadWriteContext)QDomElement

Returns a DOM element representing the settings.

See also

readXml()

Parameters
Return type

QDomElement