QGIS API Documentation  3.17.0-Master (8af46bc54f)
qgsprojectfiletransform.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsprojectfiletransform.h - description
3  -------------------
4  begin : Sun 15 dec 2007
5  copyright : (C) 2007 by Magnus Homann
6  email : magnus at homann.se
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 
27 #ifndef QGSPROJECTFILETRANSFORM_H
28 #define QGSPROJECTFILETRANSFORM_H
29 
30 #include "qgis_core.h"
31 #include <QString>
32 #include <QDomDocument>
33 #include "qgsprojectversion.h"
34 
35 
36 class QgsRasterLayer;
37 
41 class CORE_EXPORT QgsProjectFileTransform
42 {
43  public:
44  //Default constructor
45  //QgsProjectfiletransform() {}
46 
52  QgsProjectFileTransform( QDomDocument &domDocument,
53  const QgsProjectVersion &version )
54  {
55  mDom = domDocument;
56  mCurrentVersion = version;
57  }
58 
59 
60  bool updateRevision( const QgsProjectVersion &version );
61 
65  void dump();
66 
67  static void convertRasterProperties( QDomDocument &doc, QDomNode &parentNode, QDomElement &rasterPropertiesElem, QgsRasterLayer *rlayer );
68 
74  QDomDocument &dom();
75 
81  QgsProjectVersion currentVersion() const;
82 
83  private:
84 
85  QDomDocument mDom;
86  QgsProjectVersion mCurrentVersion;
87 };
88 
89 
90 #endif //QGSPROJECTFILETRANSFORM_H
91 
Represents a raster layer.
A class to describe the version of a project.
QgsProjectFileTransform(QDomDocument &domDocument, const QgsProjectVersion &version)
Create an instance from a Dom and a supplied version.