QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsmeshtimesettings.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmeshtimesettings.h
3 ---------------------
4 begin : March 2019
5 copyright : (C) 2019 by Peter Petrik
6 email : zilolv at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSMESHTIMESETTINGS_H
19#define QGSMESHTIMESETTINGS_H
20
21#include "qgis.h"
22#include "qgis_core.h"
23#include "qgsreadwritecontext.h"
24
25#include <QDateTime>
26#include <QDomDocument>
27
35class CORE_EXPORT QgsMeshTimeSettings
36{
37 public:
38
54
56
58 QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
60 void readXml( const QDomElement &elem, const QgsReadWriteContext &context );
61
63 QString relativeTimeFormat() const;
65 void setRelativeTimeFormat( const QString &relativeTimeFormat );
66
68 QString absoluteTimeFormat() const;
70 void setAbsoluteTimeFormat( const QString &absoluteTimeFormat );
71
72 private:
73
74 QString mRelativeTimeFormat = QStringLiteral( "d hh:mm:ss" );
75 QString mAbsoluteTimeFormat = QStringLiteral( "yyyy-MM-dd HH:mm:ss" );
76};
77
79
80#endif // QGSMESHTIMESETTINGS_H
Represents a mesh time settings for mesh datasets.
void setAbsoluteTimeFormat(const QString &absoluteTimeFormat)
Sets format used for absolute time.
QString relativeTimeFormat() const
Returns format used for relative time.
void readXml(const QDomElement &elem, const QgsReadWriteContext &context)
Reads configuration from the given DOM element.
TimeUnit
Time units used to display time.
QDomElement writeXml(QDomDocument &doc, const QgsReadWriteContext &context) const
Writes configuration to a new DOM element.
QString absoluteTimeFormat() const
Returns format used for absolute time.
void setRelativeTimeFormat(const QString &relativeTimeFormat)
Sets format used for relative time.
A container for the context for various read/write operations on objects.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)