QGIS API Documentation  3.2.0-Bonn (bc43194)
qgsprojectmetadata.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprojectmetadata.h
3  -------------------
4  begin : March 2018
5  copyright : (C) 2018 by Nyall Dawson
6  email : nyall dot dawson 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 QGSPROJECTMETADATA_H
19 #define QGSPROJECTMETADATA_H
20 
21 #include "qgis.h"
22 #include "qgis_core.h"
24 
51 class CORE_EXPORT QgsProjectMetadata : public QgsAbstractMetadataBase
52 {
53  public:
54 
58  QgsProjectMetadata() = default;
59 
60  QgsProjectMetadata *clone() const override SIP_FACTORY;
61 
66  QString author() const;
67 
72  void setAuthor( const QString &author );
73 
78  QDateTime creationDateTime() const;
79 
84  void setCreationDateTime( const QDateTime &creationDateTime );
85 
86  bool readMetadataXml( const QDomElement &metadataElement ) override;
87  bool writeMetadataXml( QDomElement &metadataElement, QDomDocument &document ) const override;
88 
89  bool operator==( const QgsProjectMetadata &metadataOther ) const;
90 
91  private:
92 
93  /*
94  * IMPORTANT!!!!!!
95  *
96  * Do NOT add anything to this class without also updating the schema
97  * definition located at resources/qgis-resource-metadata.xsd
98  *
99  */
100 
101  QString mAuthor;
102 
103  QDateTime mCreationDateTime;
104 
105  /*
106  * IMPORTANT!!!!!!
107  *
108  * Do NOT add anything to this class without also updating the schema
109  * definition located at resources/qgis-resource-metadata.xsd
110  *
111  */
112 
113 };
114 
115 
116 #endif // QGSPROJECTMETADATA_H
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
virtual bool readMetadataXml(const QDomElement &metadataElement)
Sets state from DOM document.
virtual bool writeMetadataXml(QDomElement &metadataElement, QDomDocument &document) const
Stores state in a DOM node.
#define SIP_FACTORY
Definition: qgis_sip.h:69
virtual QgsAbstractMetadataBase * clone() const =0
Clones the metadata object.
An abstract base class for metadata stores.
A structured metadata store for a map layer.