QGIS API Documentation
3.24.2-Tisler (13c1a02865)
|
#include "qgsproject.h"
#include "qgsdatasourceuri.h"
#include "qgslabelingenginesettings.h"
#include "qgslayertree.h"
#include "qgslayertreeutils.h"
#include "qgslayertreeregistrybridge.h"
#include "qgslogger.h"
#include "qgsmessagelog.h"
#include "qgsmaplayerfactory.h"
#include "qgspluginlayer.h"
#include "qgspluginlayerregistry.h"
#include "qgsprojectfiletransform.h"
#include "qgssnappingconfig.h"
#include "qgspathresolver.h"
#include "qgsprojectstorage.h"
#include "qgsprojectstorageregistry.h"
#include "qgsprojectversion.h"
#include "qgsrasterlayer.h"
#include "qgsreadwritecontext.h"
#include "qgsrectangle.h"
#include "qgsrelationmanager.h"
#include "qgsannotationmanager.h"
#include "qgsvectorlayerjoininfo.h"
#include "qgsvectorlayerjoinbuffer.h"
#include "qgsmapthemecollection.h"
#include "qgslayerdefinition.h"
#include "qgsunittypes.h"
#include "qgstransaction.h"
#include "qgstransactiongroup.h"
#include "qgsvectordataprovider.h"
#include "qgsprojectbadlayerhandler.h"
#include "qgsmaplayerlistutils_p.h"
#include "qgsmeshlayer.h"
#include "qgslayoutmanager.h"
#include "qgsbookmarkmanager.h"
#include "qgsmaplayerstore.h"
#include "qgsziputils.h"
#include "qgsauxiliarystorage.h"
#include "qgssymbollayerutils.h"
#include "qgsapplication.h"
#include "qgsexpressioncontextutils.h"
#include "qgsstyleentityvisitor.h"
#include "qgsprojectviewsettings.h"
#include "qgsprojectdisplaysettings.h"
#include "qgsprojecttimesettings.h"
#include "qgsvectortilelayer.h"
#include "qgsruntimeprofiler.h"
#include "qgsannotationlayer.h"
#include "qgspointcloudlayer.h"
#include "qgsattributeeditorcontainer.h"
#include "qgsgrouplayer.h"
#include "qgsmapviewsmanager.h"
#include <algorithm>
#include <QApplication>
#include <QFileInfo>
#include <QDomNode>
#include <QObject>
#include <QTextStream>
#include <QTemporaryFile>
#include <QDir>
#include <QUrl>
#include <QStandardPaths>
#include <QUuid>
#include <QRegularExpression>
#include <utime.h>
Go to the source code of this file.
Functions | |
void | _getProperties (const QDomDocument &doc, QgsProjectPropertyKey &project_properties) |
Restores any optional properties found in "doc" to "properties". More... | |
QgsProjectProperty * | addKey_ (const QString &scope, const QString &key, QgsProjectPropertyKey *rootProperty, const QVariant &value, bool &propertiesModified) |
Adds the given key and value. More... | |
void | dump_ (const QgsProjectPropertyKey &topQgsPropertyKey) |
QgsProjectProperty * | findKey_ (const QString &scope, const QString &key, QgsProjectPropertyKey &rootProperty) |
Returns the property that matches the given key sequence, if any. More... | |
QgsPropertyCollection | getDataDefinedServerProperties (const QDomDocument &doc, const QgsPropertiesDefinition &dataDefinedServerPropertyDefinitions) |
Returns the data defined server properties collection found in "doc" to "dataDefinedServerProperties". More... | |
QgsProjectVersion | getVersion (const QDomDocument &doc) |
Returns the version string found in the given DOM document. More... | |
QStringList | makeKeyTokens_ (const QString &scope, const QString &key) |
Takes the given scope and key and convert them to a string list of key tokens that will be used to navigate through a Property hierarchy. More... | |
void | removeKey_ (const QString &scope, const QString &key, QgsProjectPropertyKey &rootProperty) |
Removes a given key. More... | |
void _getProperties | ( | const QDomDocument & | doc, |
QgsProjectPropertyKey & | project_properties | ||
) |
Restores any optional properties found in "doc" to "properties".
properties tags for all optional properties. Within that there will be scope tags. In the following example there exist one property in the "fsplugin" scope. "layers" is a list containing three string values.
doc | xml document |
project_properties | should be the top QgsProjectPropertyKey node. |
Definition at line 946 of file qgsproject.cpp.
QgsProjectProperty* addKey_ | ( | const QString & | scope, |
const QString & | key, | ||
QgsProjectPropertyKey * | rootProperty, | ||
const QVariant & | value, | ||
bool & | propertiesModified | ||
) |
Adds the given key and value.
scope | scope of key |
key | key name |
rootProperty | is the property from which to start adding |
value | the value associated with the key |
propertiesModified | the parameter will be set to true if the written entry modifies pre-existing properties |
Definition at line 220 of file qgsproject.cpp.
void dump_ | ( | const QgsProjectPropertyKey & | topQgsPropertyKey | ) |
Definition at line 912 of file qgsproject.cpp.
QgsProjectProperty* findKey_ | ( | const QString & | scope, |
const QString & | key, | ||
QgsProjectPropertyKey & | rootProperty | ||
) |
Returns the property that matches the given key sequence, if any.
scope | scope of key |
key | keyname |
rootProperty | is likely to be the top level QgsProjectPropertyKey in QgsProject:e:Imp. |
Definition at line 143 of file qgsproject.cpp.
QgsPropertyCollection getDataDefinedServerProperties | ( | const QDomDocument & | doc, |
const QgsPropertiesDefinition & | dataDefinedServerPropertyDefinitions | ||
) |
Returns the data defined server properties collection found in "doc" to "dataDefinedServerProperties".
doc | xml document |
dataDefinedServerPropertyDefinitions | property collection of the server overrides |
Definition at line 975 of file qgsproject.cpp.
QgsProjectVersion getVersion | ( | QDomDocument const & | doc | ) |
Returns the version string found in the given DOM document.
Definition at line 1045 of file qgsproject.cpp.
QStringList makeKeyTokens_ | ( | const QString & | scope, |
const QString & | key | ||
) |
Takes the given scope and key and convert them to a string list of key tokens that will be used to navigate through a Property hierarchy.
E.g., scope "someplugin" and key "/foo/bar/baz" will become a string list of { "properties", "someplugin", "foo", "bar", "baz" }. "properties" is always first because that's the permanent `‘root’' Property node.
Definition at line 102 of file qgsproject.cpp.
void removeKey_ | ( | const QString & | scope, |
const QString & | key, | ||
QgsProjectPropertyKey & | rootProperty | ||
) |
Removes a given key.
scope | scope of key |
key | key name |
rootProperty | is the property from which to start adding |
Definition at line 306 of file qgsproject.cpp.