QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
QgsProjectTimeSettings Class Reference

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

#include <qgsprojecttimesettings.h>

Inheritance diagram for QgsProjectTimeSettings:
Inheritance graph
[legend]

Signals

void temporalRangeChanged ()
 Emitted when the temporal range changes.
 

Public Member Functions

 QgsProjectTimeSettings (QObject *parent=nullptr)
 Constructor for QgsProjectTimeSettings with the specified parent object.
 
double framesPerSecond () const
 Returns the project's default animation frame rate, in frames per second.
 
bool isTemporalRangeCumulative () const
 Returns the value of cumulative temporal range in animation settings.
 
bool readXml (const QDomElement &element, const QgsReadWriteContext &context)
 Reads the settings's state from a DOM element.
 
void reset ()
 Resets the settings to a default state.
 
void setFramesPerSecond (double rate)
 Sets the project's default animation frame rate, in frames per second.
 
void setIsTemporalRangeCumulative (bool state)
 Sets the project's temporal range as cumulative in animation settings.
 
void setTemporalRange (const QgsDateTimeRange &range)
 Sets the project's temporal range, which indicates the earliest and latest datetime ranges associated with the project.
 
void setTimeStep (double step)
 Sets the project's time step (length of one animation frame), which is used as the default value when animating the project.
 
void setTimeStepUnit (Qgis::TemporalUnit unit)
 Sets the project's time step (length of one animation frame) unit, which is used as the default value when animating the project.
 
void setTotalMovieFrames (long long frames)
 Sets the total number of frames for the movie.
 
QgsDateTimeRange temporalRange () const
 Returns the project's temporal range, which indicates the earliest and latest datetime ranges associated with the project.
 
double timeStep () const
 Returns the project's time step (length of one animation frame), which is used as the default value when animating the project.
 
Qgis::TemporalUnit timeStepUnit () const
 Returns the project's time step (length of one animation frame) unit, which is used as the default value when animating the project.
 
long long totalMovieFrames () const
 Returns the total number of frames for the project's movie.
 
QDomElement writeXml (QDomDocument &document, const QgsReadWriteContext &context) const
 Returns a DOM element representing the settings.
 

Detailed Description

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

Since
QGIS 3.14

Definition at line 36 of file qgsprojecttimesettings.h.

Constructor & Destructor Documentation

◆ QgsProjectTimeSettings()

QgsProjectTimeSettings::QgsProjectTimeSettings ( QObject *  parent = nullptr)

Constructor for QgsProjectTimeSettings with the specified parent object.

Definition at line 24 of file qgsprojecttimesettings.cpp.

Member Function Documentation

◆ framesPerSecond()

double QgsProjectTimeSettings::framesPerSecond ( ) const

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

See also
setFramesPerSecond()

Definition at line 131 of file qgsprojecttimesettings.cpp.

◆ isTemporalRangeCumulative()

bool QgsProjectTimeSettings::isTemporalRangeCumulative ( ) const

Returns the value of cumulative temporal range in animation settings.

See also
setIsTemporalRangeCumulative()

Definition at line 141 of file qgsprojecttimesettings.cpp.

◆ readXml()

bool QgsProjectTimeSettings::readXml ( const QDomElement &  element,
const QgsReadWriteContext context 
)

Reads the settings's state from a DOM element.

See also
writeXml()

Definition at line 50 of file qgsprojecttimesettings.cpp.

◆ reset()

void QgsProjectTimeSettings::reset ( )

Resets the settings to a default state.

Definition at line 30 of file qgsprojecttimesettings.cpp.

◆ setFramesPerSecond()

void QgsProjectTimeSettings::setFramesPerSecond ( double  rate)

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

See also
framesPerSecond()

Definition at line 126 of file qgsprojecttimesettings.cpp.

◆ setIsTemporalRangeCumulative()

void QgsProjectTimeSettings::setIsTemporalRangeCumulative ( bool  state)

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

See also
isTemporalRangeCumulative()

Definition at line 136 of file qgsprojecttimesettings.cpp.

◆ setTemporalRange()

void QgsProjectTimeSettings::setTemporalRange ( const QgsDateTimeRange range)

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()
temporalRangeChanged()

Definition at line 41 of file qgsprojecttimesettings.cpp.

◆ setTimeStep()

void QgsProjectTimeSettings::setTimeStep ( double  step)

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()
setTimeStepUnit()

Definition at line 121 of file qgsprojecttimesettings.cpp.

◆ setTimeStepUnit()

void QgsProjectTimeSettings::setTimeStepUnit ( Qgis::TemporalUnit  unit)

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()
setTimeStep()

Definition at line 111 of file qgsprojecttimesettings.cpp.

◆ setTotalMovieFrames()

void QgsProjectTimeSettings::setTotalMovieFrames ( long long  frames)

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
totalMovieFrames()
Since
QGIS 3.36

Definition at line 151 of file qgsprojecttimesettings.cpp.

◆ temporalRange()

QgsDateTimeRange QgsProjectTimeSettings::temporalRange ( ) const

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
setTemporalRange()
temporalRangeChanged()

Definition at line 36 of file qgsprojecttimesettings.cpp.

◆ temporalRangeChanged

void QgsProjectTimeSettings::temporalRangeChanged ( )
signal

Emitted when the temporal range changes.

See also
temporalRange()
setTemporalRange()

◆ timeStep()

double QgsProjectTimeSettings::timeStep ( ) const

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()
timeStepUnit()

Definition at line 116 of file qgsprojecttimesettings.cpp.

◆ timeStepUnit()

Qgis::TemporalUnit QgsProjectTimeSettings::timeStepUnit ( ) const

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
setTimeStepUnit()
timeStep()

Definition at line 106 of file qgsprojecttimesettings.cpp.

◆ totalMovieFrames()

long long QgsProjectTimeSettings::totalMovieFrames ( ) const

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
setTotalMovieFrames()
Since
QGIS 3.36

Definition at line 146 of file qgsprojecttimesettings.cpp.

◆ writeXml()

QDomElement QgsProjectTimeSettings::writeXml ( QDomDocument &  document,
const QgsReadWriteContext context 
) const

Returns a DOM element representing the settings.

See also
readXml()

Definition at line 75 of file qgsprojecttimesettings.cpp.


The documentation for this class was generated from the following files: