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 specifiedparent
object.Methods
Returns the project's default animation frame rate, in frames per second.
Returns the value of cumulative temporal range in animation settings.
Reads the settings's state from a DOM
element
.Resets the settings to a default state.
Sets the project's default animation frame
rate
, in frames per second.Sets the project's temporal range as cumulative in animation settings.
Sets the project's temporal
range
, which indicates the earliest and latest datetime ranges associated with the project.Sets the project's time
step
(length of one animation frame), which is used as the default value when animating the project.Sets the project's time step (length of one animation frame)
unit
, which is used as the default value when animating the project.Sets the total number of
frames
for the movie.Returns the project's temporal range, which indicates the earliest and latest datetime ranges associated with the project.
Returns the project's time step (length of one animation frame), which is used as the default value when animating the project.
Returns the project's time step (length of one animation frame) unit, which is used as the default value when animating the project.
Returns the total number of frames for the project's movie.
Returns a DOM element representing the settings.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- 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.
See also
- Return type:
float
- isSignalConnected(self, QMetaMethod) bool ¶
- isTemporalRangeCumulative(self) bool ¶
Returns the value of cumulative temporal range in animation settings.
See also
- Return type:
bool
- readXml(self, element: QDomElement, context: QgsReadWriteContext) bool ¶
Reads the settings’s state from a DOM
element
.See also
- Parameters:
element (QDomElement) –
context (QgsReadWriteContext) –
- 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.See also
- Parameters:
rate (float) –
- setIsTemporalRangeCumulative(self, state: bool)¶
Sets the project’s temporal range as cumulative in animation settings.
See also
- 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
See also
- 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
See also
- Parameters:
step (float) –
- setTimeStepUnit(self, unit: Qgis.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
See also
- Parameters:
unit (Qgis.TemporalUnit) –
- setTotalMovieFrames(self, frames: int)¶
Sets the total number of
frames
for the movie.Note
This is only used when the navigationm mode is set to
Qgis
.TemporalNavigationMode.Movie.See also
New in version 3.36.
- Parameters:
frames (int) –
- 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.
See also
See also
- Return type:
- temporalRangeChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_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
See also
- Return type:
float
- timeStepUnit(self) Qgis.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
See also
- Return type:
- timerEvent(self, QTimerEvent)¶
- totalMovieFrames(self) int ¶
Returns the total number of frames for the project’s movie.
Note
This is only used when the navigation mode is set to
Qgis
.TemporalNavigationMode.Movie.See also
New in version 3.36.
- Return type:
int
- writeXml(self, document: QDomDocument, context: QgsReadWriteContext) QDomElement ¶
Returns a DOM element representing the settings.
See also
- Parameters:
document (QDomDocument) –
context (QgsReadWriteContext) –
- Return type:
QDomElement