QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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_sip.h"
22 #include "qgis_core.h"
24 
25 #include <QDateTime>
26 
53 class CORE_EXPORT QgsProjectMetadata : public QgsAbstractMetadataBase
54 {
55  public:
56 
60  QgsProjectMetadata() = default;
61 
62  QgsProjectMetadata *clone() const override SIP_FACTORY;
63 
68  QString author() const;
69 
74  void setAuthor( const QString &author );
75 
80  QDateTime creationDateTime() const;
81 
86  void setCreationDateTime( const QDateTime &creationDateTime );
87 
88  bool readMetadataXml( const QDomElement &metadataElement ) override;
89  bool writeMetadataXml( QDomElement &metadataElement, QDomDocument &document ) const override;
90  void combine( const QgsAbstractMetadataBase *other ) override;
91 
92  bool operator==( const QgsProjectMetadata &metadataOther ) const;
93 
94  private:
95 
96  /*
97  * IMPORTANT!!!!!!
98  *
99  * Do NOT add anything to this class without also updating the schema
100  * definition located at resources/qgis-resource-metadata.xsd
101  *
102  */
103 
104  QString mAuthor;
105 
106  QDateTime mCreationDateTime;
107 
108  /*
109  * IMPORTANT!!!!!!
110  *
111  * Do NOT add anything to this class without also updating the schema
112  * definition located at resources/qgis-resource-metadata.xsd
113  *
114  */
115 
116 };
117 
118 
119 #endif // QGSPROJECTMETADATA_H
QgsProjectMetadata
A structured metadata store for a map layer.
Definition: qgsprojectmetadata.h:53
operator==
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Definition: qgsfeatureiterator.h:425
QgsAbstractMetadataBase::combine
virtual void combine(const QgsAbstractMetadataBase *other)
Combines the metadata from this object with the metadata from an other object.
Definition: qgsabstractmetadatabase.cpp:435
QgsAbstractMetadataBase::readMetadataXml
virtual bool readMetadataXml(const QDomElement &metadataElement)
Sets state from DOM document.
Definition: qgsabstractmetadatabase.cpp:173
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsAbstractMetadataBase::clone
virtual QgsAbstractMetadataBase * clone() const =0
Clones the metadata object.
qgis_sip.h
QgsAbstractMetadataBase::writeMetadataXml
virtual bool writeMetadataXml(QDomElement &metadataElement, QDomDocument &document) const
Stores state in a DOM node.
Definition: qgsabstractmetadatabase.cpp:287
qgsabstractmetadatabase.h
QgsAbstractMetadataBase
An abstract base class for metadata stores.
Definition: qgsabstractmetadatabase.h:56