QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
Public Member Functions | List of all members
QgsMeshTimeSettings Class Reference

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

#include <qgsmeshtimesettings.h>

Public Member Functions

 QgsMeshTimeSettings ()
 Default constructor for relative time formate and 0 offset. More...
 
 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...
 
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 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.

Constructor & Destructor Documentation

◆ QgsMeshTimeSettings() [1/3]

QgsMeshTimeSettings::QgsMeshTimeSettings ( )
default

Default constructor for relative time formate and 0 offset.

◆ 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 97 of file qgsmeshtimesettings.cpp.

◆ absoluteTimeReferenceTime()

QDateTime QgsMeshTimeSettings::absoluteTimeReferenceTime ( ) const

Returns reference time used for absolute time format.

Definition at line 87 of file qgsmeshtimesettings.cpp.

◆ readXml()

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

Reads configuration from the given DOM element.

Definition at line 46 of file qgsmeshtimesettings.cpp.

◆ relativeTimeFormat()

QString QgsMeshTimeSettings::relativeTimeFormat ( ) const

Returns format used for relative time.

Definition at line 77 of file qgsmeshtimesettings.cpp.

◆ relativeTimeOffsetHours()

double QgsMeshTimeSettings::relativeTimeOffsetHours ( ) const

Returns number of offset hours for relative time formatting.

Definition at line 67 of file qgsmeshtimesettings.cpp.

◆ setAbsoluteTimeFormat()

void QgsMeshTimeSettings::setAbsoluteTimeFormat ( const QString &  absoluteTimeFormat)

Sets format used for absolute time.

Definition at line 102 of file qgsmeshtimesettings.cpp.

◆ setAbsoluteTimeReferenceTime()

void QgsMeshTimeSettings::setAbsoluteTimeReferenceTime ( const QDateTime &  absoluteTimeReferenceTime)

Sets reference time used for absolute time format.

Definition at line 92 of file qgsmeshtimesettings.cpp.

◆ setRelativeTimeFormat()

void QgsMeshTimeSettings::setRelativeTimeFormat ( const QString &  relativeTimeFormat)

Sets format used for relative time.

Definition at line 82 of file qgsmeshtimesettings.cpp.

◆ setRelativeTimeOffsetHours()

void QgsMeshTimeSettings::setRelativeTimeOffsetHours ( double  relativeTimeOffsetHours)

Sets number of offset hours for relative time formatting.

Definition at line 72 of file qgsmeshtimesettings.cpp.

◆ setUseAbsoluteTime()

void QgsMeshTimeSettings::setUseAbsoluteTime ( bool  useAbsoluteTime)

Sets use absolute time flag.

Definition at line 61 of file qgsmeshtimesettings.cpp.

◆ useAbsoluteTime()

bool QgsMeshTimeSettings::useAbsoluteTime ( ) const

Returns whether to use absolute time format.

Definition at line 56 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: