QGIS API Documentation
2.6.0-Brighton
|
#include "qgsproject.h"
#include <deque>
#include <memory>
#include "qgsdatasourceuri.h"
#include "qgsexception.h"
#include "qgslayertree.h"
#include "qgslayertreeutils.h"
#include "qgslayertreeregistrybridge.h"
#include "qgslogger.h"
#include "qgsmaplayerregistry.h"
#include "qgspluginlayer.h"
#include "qgspluginlayerregistry.h"
#include "qgsprojectfiletransform.h"
#include "qgsprojectproperty.h"
#include "qgsprojectversion.h"
#include "qgsrasterlayer.h"
#include "qgsrectangle.h"
#include "qgsrelationmanager.h"
#include "qgsvectorlayer.h"
#include <QApplication>
#include <QFileInfo>
#include <QDomNode>
#include <QObject>
#include <QTextStream>
Classes | |
struct | QgsProject::Imp |
Functions | |
static QStringList | makeKeyTokens_ (QString const &scope, QString const &key) |
Take 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. | |
static QgsProperty * | findKey_ (QString const &scope, QString const &key, QgsPropertyKey &rootProperty) |
return the property that matches the given key sequence, if any | |
static QgsProperty * | addKey_ (QString const &scope, QString const &key, QgsPropertyKey *rootProperty, QVariant value) |
add the given key and value | |
static void | removeKey_ (QString const &scope, QString const &key, QgsPropertyKey &rootProperty) |
static void | dump_ (QgsPropertyKey const &topQgsPropertyKey) |
basically a debugging tool to dump property list values | |
static void | _getProperties (QDomDocument const &doc, QgsPropertyKey &project_properties) |
Restore any optional properties found in "doc" to "properties". | |
static void | _getTitle (QDomDocument const &doc, QString &title) |
Get the project title. | |
static QgsProjectVersion | _getVersion (QDomDocument const &doc) |
return the version string found in the given Dom document |
|
static |
Restore 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 QgsPropertyKey node. |
|
static |
Get the project title.
XML in file has this form:
|
static |
return the version string found in the given Dom document
|
static |
add 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 |
|
static |
basically a debugging tool to dump property list values
|
static |
return the property that matches the given key sequence, if any
scope | scope of key |
key | keyname |
rootProperty | is likely to be the top level QgsPropertyKey in QgsProject:e:Imp. |
|
static |
Take 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.
|
static |