QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 
35 class CORE_EXPORT QgsMeshTimeSettings
36 {
37  public:
38 
43  enum TimeUnit
44  {
46  seconds = 0,
48  minutes,
50  hours,
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( "dd.MM.yyyy hh:mm:ss" );
76 };
77 
79 
80 #endif // QGSMESHTIMESETTINGS_H
QgsMeshTimeSettings
Definition: qgsmeshtimesettings.h:35
QgsReadWriteContext
Definition: qgsreadwritecontext.h:34
qgsreadwritecontext.h
qgis.h
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QgsMeshTimeSettings::TimeUnit
TimeUnit
Time units used to display time.
Definition: qgsmeshtimesettings.h:56