QGIS API Documentation 3.41.0-Master (3440c17df1d)
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 <QDateTime>
22#include <QDomDocument>
23
24#include "qgis_core.h"
25#include "qgis.h"
26#include "qgsreadwritecontext.h"
27
35class CORE_EXPORT QgsMeshTimeSettings
36{
37 public:
38
44 {
46 seconds = 0,
52 days
53 };
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.
TimeUnit
Time units used to display time.
The class is used as a container of context for various read/write operations on other objects.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)