QGIS API Documentation 3.31.0-Master (b9736bd33d)
Public Member Functions | Static Public Member Functions | List of all members
QgsProjectFileTransform Class Reference

Class to convert from older project file versions to newer. More...

#include <qgsprojectfiletransform.h>

Public Member Functions

 QgsProjectFileTransform (QDomDocument &domDocument, const QgsProjectVersion &version)
 Create an instance from a Dom and a supplied version. More...
 
QgsProjectVersion currentVersion () const
 The current project version. More...
 
QDomDocument & dom ()
 The current dom document. More...
 
void dump ()
 Prints the contents via QgsDebugMsgLevel() More...
 
bool updateRevision (const QgsProjectVersion &version)
 

Static Public Member Functions

static void convertRasterProperties (QDomDocument &doc, QDomNode &parentNode, QDomElement &rasterPropertiesElem, QgsRasterLayer *rlayer)
 
static Q_DECL_DEPRECATED void fixOldSymbolLayerReferences (const QMap< QString, QgsMapLayer * > &mapLayers)
 QgsSymbolLayerReference uses QgsSymbolLayer unique uuid identifier since QGIS 3.30, instead of the symbol key (rule for QgsRuleBasedRenderer for instance) and index path, so this method migrates mapLayers old references to new ones. More...
 

Detailed Description

Class to convert from older project file versions to newer.

This class provides possibility to store a project file as a QDomDocument, and provides the ability to specify version of the project file, and perform upgrades to a more recent version

Definition at line 38 of file qgsprojectfiletransform.h.

Constructor & Destructor Documentation

◆ QgsProjectFileTransform()

QgsProjectFileTransform::QgsProjectFileTransform ( QDomDocument &  domDocument,
const QgsProjectVersion version 
)
inline

Create an instance from a Dom and a supplied version.

Parameters
domDocumentThe Dom document to use as content
versionVersion number

Definition at line 49 of file qgsprojectfiletransform.h.

Member Function Documentation

◆ convertRasterProperties()

void QgsProjectFileTransform::convertRasterProperties ( QDomDocument &  doc,
QDomNode &  parentNode,
QDomElement &  rasterPropertiesElem,
QgsRasterLayer rlayer 
)
static

Definition at line 893 of file qgsprojectfiletransform.cpp.

◆ currentVersion()

QgsProjectVersion QgsProjectFileTransform::currentVersion ( ) const

The current project version.

Since
QGIS 3.12

Definition at line 1113 of file qgsprojectfiletransform.cpp.

◆ dom()

QDomDocument & QgsProjectFileTransform::dom ( )

The current dom document.

Since
QGIS 3.12

Definition at line 1108 of file qgsprojectfiletransform.cpp.

◆ dump()

void QgsProjectFileTransform::dump ( )

Prints the contents via QgsDebugMsgLevel()

Definition at line 127 of file qgsprojectfiletransform.cpp.

◆ fixOldSymbolLayerReferences()

void QgsProjectFileTransform::fixOldSymbolLayerReferences ( const QMap< QString, QgsMapLayer * > &  mapLayers)
static

QgsSymbolLayerReference uses QgsSymbolLayer unique uuid identifier since QGIS 3.30, instead of the symbol key (rule for QgsRuleBasedRenderer for instance) and index path, so this method migrates mapLayers old references to new ones.

Since
QGIS 3.30
Deprecated:
since QGIS 3.30

Definition at line 1232 of file qgsprojectfiletransform.cpp.

◆ updateRevision()

bool QgsProjectFileTransform::updateRevision ( const QgsProjectVersion version)

Definition at line 75 of file qgsprojectfiletransform.cpp.


The documentation for this class was generated from the following files: