QGIS API Documentation  3.11.0-Master (68611307d7)
Public Types | Public Member Functions | List of all members
QgsMeshTimeSettings Class Reference

Represents a mesh time settings for mesh datasets. More...

#include <qgsmeshtimesettings.h>

Public Types

enum  TimeUnit { seconds = 0, minutes, hours, days }
 Time units used to display time. More...
 

Public Member Functions

 QgsMeshTimeSettings ()
 
 QgsMeshTimeSettings (double relativeTimeOffsetHours, const QString &relativeTimeFormat)
 Constructs relative time format settings with defined offset in hours. More...
 
 QgsMeshTimeSettings (const QDateTime &absoluteTimeReferenceTime, const QString &absoluteTimeFormat)
 Constructs absolute time format settings with defined reference time. More...
 
QString absoluteTimeFormat () const
 Returns format used for absolute time. More...
 
QDateTime absoluteTimeReferenceTime () const
 Returns reference time used for absolute time format. More...
 
double datasetPlaybackInterval () const
 Returns number of seconds used as interval for dataset playback. More...
 
TimeUnit providerTimeUnit () const
 Returns the provider time unit. More...
 
void readXml (const QDomElement &elem, const QgsReadWriteContext &context)
 Reads configuration from the given DOM element. More...
 
QString relativeTimeFormat () const
 Returns format used for relative time. More...
 
double relativeTimeOffsetHours () const
 Returns number of offset hours for relative time formatting. More...
 
void setAbsoluteTimeFormat (const QString &absoluteTimeFormat)
 Sets format used for absolute time. More...
 
void setAbsoluteTimeReferenceTime (const QDateTime &absoluteTimeReferenceTime)
 Sets reference time used for absolute time format. More...
 
void setDatasetPlaybackInterval (double seconds)
 Sets number of seconds used as interval for dataset playback. More...
 
void setProviderTimeUnit (const TimeUnit &providerTimeUnit)
 Sets the provider time unit. More...
 
void setRelativeTimeFormat (const QString &relativeTimeFormat)
 Sets format used for relative time. More...
 
void setRelativeTimeOffsetHours (double relativeTimeOffsetHours)
 Sets number of offset hours for relative time formatting. More...
 
void setUseAbsoluteTime (bool useAbsoluteTime)
 Sets use absolute time flag. More...
 
bool useAbsoluteTime () const
 Returns whether to use absolute time format. More...
 
QDomElement writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const
 Writes configuration to a new DOM element. More...
 

Detailed Description

Represents a mesh time settings for mesh datasets.

Since
QGIS 3.8

Definition at line 35 of file qgsmeshtimesettings.h.

Member Enumeration Documentation

◆ TimeUnit

Time units used to display time.

Since
QGIS 3.12
Enumerator
seconds 

second unit

minutes 

minute unit

hours 

hour unit

days 

day unit

Definition at line 43 of file qgsmeshtimesettings.h.

Constructor & Destructor Documentation

◆ QgsMeshTimeSettings() [1/3]

QgsMeshTimeSettings::QgsMeshTimeSettings ( )
default

◆ QgsMeshTimeSettings() [2/3]

QgsMeshTimeSettings::QgsMeshTimeSettings ( double  relativeTimeOffsetHours,
const QString &  relativeTimeFormat 
)

Constructs relative time format settings with defined offset in hours.

Definition at line 22 of file qgsmeshtimesettings.cpp.

◆ QgsMeshTimeSettings() [3/3]

QgsMeshTimeSettings::QgsMeshTimeSettings ( const QDateTime &  absoluteTimeReferenceTime,
const QString &  absoluteTimeFormat 
)

Constructs absolute time format settings with defined reference time.

Definition at line 28 of file qgsmeshtimesettings.cpp.

Member Function Documentation

◆ absoluteTimeFormat()

QString QgsMeshTimeSettings::absoluteTimeFormat ( ) const

Returns format used for absolute time.

Definition at line 109 of file qgsmeshtimesettings.cpp.

◆ absoluteTimeReferenceTime()

QDateTime QgsMeshTimeSettings::absoluteTimeReferenceTime ( ) const

Returns reference time used for absolute time format.

Definition at line 99 of file qgsmeshtimesettings.cpp.

◆ datasetPlaybackInterval()

double QgsMeshTimeSettings::datasetPlaybackInterval ( ) const

Returns number of seconds used as interval for dataset playback.

Since
QGIS 3.12

Definition at line 79 of file qgsmeshtimesettings.cpp.

◆ providerTimeUnit()

QgsMeshTimeSettings::TimeUnit QgsMeshTimeSettings::providerTimeUnit ( ) const

Returns the provider time unit.

Since
QGIS 3.12

Definition at line 119 of file qgsmeshtimesettings.cpp.

◆ readXml()

void QgsMeshTimeSettings::readXml ( const QDomElement &  elem,
const QgsReadWriteContext context 
)

Reads configuration from the given DOM element.

Definition at line 47 of file qgsmeshtimesettings.cpp.

◆ relativeTimeFormat()

QString QgsMeshTimeSettings::relativeTimeFormat ( ) const

Returns format used for relative time.

Definition at line 89 of file qgsmeshtimesettings.cpp.

◆ relativeTimeOffsetHours()

double QgsMeshTimeSettings::relativeTimeOffsetHours ( ) const

Returns number of offset hours for relative time formatting.

Definition at line 69 of file qgsmeshtimesettings.cpp.

◆ setAbsoluteTimeFormat()

void QgsMeshTimeSettings::setAbsoluteTimeFormat ( const QString &  absoluteTimeFormat)

Sets format used for absolute time.

Definition at line 114 of file qgsmeshtimesettings.cpp.

◆ setAbsoluteTimeReferenceTime()

void QgsMeshTimeSettings::setAbsoluteTimeReferenceTime ( const QDateTime &  absoluteTimeReferenceTime)

Sets reference time used for absolute time format.

Definition at line 104 of file qgsmeshtimesettings.cpp.

◆ setDatasetPlaybackInterval()

void QgsMeshTimeSettings::setDatasetPlaybackInterval ( double  seconds)

Sets number of seconds used as interval for dataset playback.

Since
QGIS 3.12

Definition at line 84 of file qgsmeshtimesettings.cpp.

◆ setProviderTimeUnit()

void QgsMeshTimeSettings::setProviderTimeUnit ( const TimeUnit providerTimeUnit)

Sets the provider time unit.

Since
QGIS 3.12

Definition at line 124 of file qgsmeshtimesettings.cpp.

◆ setRelativeTimeFormat()

void QgsMeshTimeSettings::setRelativeTimeFormat ( const QString &  relativeTimeFormat)

Sets format used for relative time.

Definition at line 94 of file qgsmeshtimesettings.cpp.

◆ setRelativeTimeOffsetHours()

void QgsMeshTimeSettings::setRelativeTimeOffsetHours ( double  relativeTimeOffsetHours)

Sets number of offset hours for relative time formatting.

Definition at line 74 of file qgsmeshtimesettings.cpp.

◆ setUseAbsoluteTime()

void QgsMeshTimeSettings::setUseAbsoluteTime ( bool  useAbsoluteTime)

Sets use absolute time flag.

Definition at line 63 of file qgsmeshtimesettings.cpp.

◆ useAbsoluteTime()

bool QgsMeshTimeSettings::useAbsoluteTime ( ) const

Returns whether to use absolute time format.

Definition at line 58 of file qgsmeshtimesettings.cpp.

◆ writeXml()

QDomElement QgsMeshTimeSettings::writeXml ( QDomDocument &  doc,
const QgsReadWriteContext context 
) const

Writes configuration to a new DOM element.

Definition at line 34 of file qgsmeshtimesettings.cpp.


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