QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgsproject.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsproject.h
3
4 Implements persistent project state.
5
6 -------------------
7 begin : July 23, 2004
8 copyright : (C) 2004 by Mark Coletti
9 email : mcoletti at gmail.com
10 ***************************************************************************/
11
12/***************************************************************************
13 * *
14 * This program is free software; you can redistribute it and/or modify *
15 * it under the terms of the GNU General Public License as published by *
16 * the Free Software Foundation; either version 2 of the License, or *
17 * (at your option) any later version. *
18 * *
19 ***************************************************************************/
20
21#ifndef QGSPROJECT_H
22#define QGSPROJECT_H
23
24#include <memory>
25
26#include "qgis.h"
27#include "qgis_core.h"
28#include "qgis_sip.h"
29#include "qgsabstractsensor.h"
30#include "qgsarchive.h"
31#include "qgscolorscheme.h"
37#include "qgsmaplayerstore.h"
40#include "qgsprojectmetadata.h"
41#include "qgsprojectproperty.h"
43#include "qgsprojectversion.h"
45#include "qgsreadwritecontext.h"
46#include "qgsrelationmanager.h"
47#include "qgssettings.h"
48#include "qgssnappingconfig.h"
51
52#include <QFileInfo>
53#include <QHash>
54#include <QList>
55#include <QObject>
56#include <QPair>
57#include <QStringList>
58#include <QTranslator>
59
60class QFileInfo;
61class QDomDocument;
62class QDomElement;
63class QDomNode;
64
67class QgsMapLayer;
68class QgsPathResolver;
71class QgsTolerance;
73class QgsVectorLayer;
77class QgsLayerTree;
80class QgsMapLayer;
94
107
109{
110 Q_OBJECT
112 Q_PROPERTY( QString title READ title WRITE setTitle NOTIFY titleChanged )
113 Q_PROPERTY( QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged )
114 Q_PROPERTY( QString homePath READ homePath WRITE setPresetHomePath NOTIFY homePathChanged )
115 Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
117 Q_PROPERTY( QString ellipsoid READ ellipsoid WRITE setEllipsoid NOTIFY ellipsoidChanged )
127 Q_PROPERTY( Qgis::DistanceUnit distanceUnits READ distanceUnits WRITE setDistanceUnits NOTIFY distanceUnitsChanged )
128 Q_PROPERTY( Qgis::AreaUnit areaUnits READ areaUnits WRITE setAreaUnits NOTIFY areaUnitsChanged )
130 Q_PROPERTY( Qgis::TransactionMode transactionMode READ transactionMode WRITE setTransactionMode NOTIFY transactionModeChanged )
131 Q_PROPERTY( Qgis::ScaleCalculationMethod scaleMethod READ scaleMethod WRITE setScaleMethod NOTIFY scaleMethodChanged )
132
133 public:
134
135 // *INDENT-OFF*
136
146 {
147 NoProperty = 0,
148 AllProperties = 1,
149 WMSOnlineResource = 2,
150 };
151 // *INDENT-ON*
152
154 static QgsProject *instance();
155
164 static void setInstance( QgsProject *project ) ;
165
174 explicit QgsProject( QObject *parent SIP_TRANSFERTHIS = nullptr, Qgis::ProjectCapabilities capabilities = Qgis::ProjectCapability::ProjectStyles );
175
176 ~QgsProject() override;
177
186 void setTitle( const QString &title );
187
194 QString title() const;
195
202 Qgis::ProjectCapabilities capabilities() const { return mCapabilities; }
203
212 Qgis::ProjectFlags flags() const { return mFlags; }
213
222 void setFlags( Qgis::ProjectFlags flags );
223
232 void setFlag( Qgis::ProjectFlag flag, bool enabled = true );
233
241 QString saveUser() const;
242
250 QString saveUserFullName() const;
251
257 QDateTime lastSaveDateTime() const;
258
264 QgsProjectVersion lastSaveVersion() const;
265
269 bool isDirty() const;
270
277 void setFileName( const QString &name );
278
285 QString fileName() const;
286
298 void setOriginalPath( const QString &path );
299
311 QString originalPath() const;
312
323 Q_DECL_DEPRECATED QFileInfo fileInfo() const SIP_DEPRECATED;
324
331 QgsProjectStorage *projectStorage() const;
332
337 QDateTime lastModified() const;
338
344 QString absoluteFilePath() const;
345
351 QString absolutePath() const;
352
357 QString baseName() const;
358
365 Qgis::FilePathType filePathStorage() const;
366
373 void setFilePathStorage( Qgis::FilePathType type );
374
388
407 QgsCoordinateReferenceSystem crs3D() const;
408
423 void setCrs( const QgsCoordinateReferenceSystem &crs, bool adjustEllipsoid = false );
424
432 QString ellipsoid() const;
433
441 void setEllipsoid( const QString &ellipsoid );
442
461 QgsCoordinateReferenceSystem verticalCrs() const;
462
482 bool setVerticalCrs( const QgsCoordinateReferenceSystem &crs, QString *errorMessage SIP_OUT = nullptr );
483
492 QgsCoordinateTransformContext transformContext() const;
493
502 void setTransformContext( const QgsCoordinateTransformContext &context );
503
508 void clear();
509
516 bool read( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
517
526 bool read( Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
527
537 bool readLayer( const QDomNode &layerNode );
538
546 bool write( const QString &filename );
547
553 bool write();
554
566 bool writeEntry( const QString &scope, const QString &key, bool value ) SIP_PYNAME( writeEntryBool );
567
579 bool writeEntry( const QString &scope, const QString &key, double value ) SIP_PYNAME( writeEntryDouble );
580
591 bool writeEntry( const QString &scope, const QString &key, int value );
592
603 bool writeEntry( const QString &scope, const QString &key, const QString &value );
604
615 bool writeEntry( const QString &scope, const QString &key, const QStringList &value );
616
627 QStringList readListEntry( const QString &scope, const QString &key, const QStringList &def = QStringList(), bool *ok SIP_OUT = nullptr ) const;
628
639 QString readEntry( const QString &scope, const QString &key, const QString &def = QString(), bool *ok SIP_OUT = nullptr ) const;
640
651 int readNumEntry( const QString &scope, const QString &key, int def = 0, bool *ok SIP_OUT = nullptr ) const;
652
663 double readDoubleEntry( const QString &scope, const QString &key, double def = 0, bool *ok SIP_OUT = nullptr ) const;
664
675 bool readBoolEntry( const QString &scope, const QString &key, bool def = false, bool *ok SIP_OUT = nullptr ) const;
676
680 bool removeEntry( const QString &scope, const QString &key );
681
690 QStringList entryList( const QString &scope, const QString &key ) const;
691
700 QStringList subkeyList( const QString &scope, const QString &key ) const;
701
702 // TODO Now slightly broken since re-factoring. Won't print out top-level key
703 // and redundantly prints sub-keys.
704
708 void dumpProperties() const;
709
714 QgsPathResolver pathResolver() const;
715
721 QString writePath( const QString &filename ) const;
722
726 QString readPath( const QString &filename ) const;
727
729 QString error() const;
730
735 void setBadLayerHandler( QgsProjectBadLayerHandler *handler SIP_TRANSFER );
736
742 QString layerIsEmbedded( const QString &id ) const;
743
752 bool createEmbeddedLayer( const QString &layerId, const QString &projectFilePath, QList<QDomNode> &brokenNodes,
753 bool saveFlag = true, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
754
761 std::unique_ptr< QgsLayerTreeGroup > createEmbeddedGroup( const QString &groupName, const QString &projectFilePath, const QStringList &invisibleLayers, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
762
764 void setTopologicalEditing( bool enabled );
765
767 bool topologicalEditing() const;
768
774 Qgis::DistanceUnit distanceUnits() const { return mDistanceUnits; }
775
781 void setDistanceUnits( Qgis::DistanceUnit unit );
782
787 Qgis::AreaUnit areaUnits() const { return mAreaUnits; }
788
794 void setAreaUnits( Qgis::AreaUnit unit );
795
803 Qgis::ScaleCalculationMethod scaleMethod() const { return mScaleMethod; }
804
812 void setScaleMethod( Qgis::ScaleCalculationMethod method );
813
826 QString homePath() const;
827
840 QString presetHomePath() const;
841
842 QgsRelationManager *relationManager() const;
843
849 const QgsLayoutManager *layoutManager() const SIP_SKIP;
850
855 QgsLayoutManager *layoutManager();
856
863 const QgsElevationProfileManager *elevationProfileManager() const SIP_SKIP;
864
870 QgsElevationProfileManager *elevationProfileManager();
871
878 const QgsMapViewsManager *viewsManager() const SIP_SKIP;
879
885 QgsMapViewsManager *viewsManager();
886
893 const QgsBookmarkManager *bookmarkManager() const SIP_SKIP;
894
900 QgsBookmarkManager *bookmarkManager();
901
908 const QgsSensorManager *sensorManager() const SIP_SKIP;
909
915 QgsSensorManager *sensorManager();
916
924 const QgsProjectViewSettings *viewSettings() const SIP_SKIP;
925
932 QgsProjectViewSettings *viewSettings();
933
941 const QgsProjectStyleSettings *styleSettings() const SIP_SKIP;
942
949 QgsProjectStyleSettings *styleSettings();
950
958 const QgsProjectTimeSettings *timeSettings() const SIP_SKIP;
959
966 QgsProjectTimeSettings *timeSettings();
967
974 const QgsProjectElevationProperties *elevationProperties() const SIP_SKIP;
975
981 QgsProjectElevationProperties *elevationProperties();
982
989 const QgsProjectDisplaySettings *displaySettings() const SIP_SKIP;
990
997
1005
1012
1016 QgsLayerTree *layerTreeRoot() const;
1017
1021 QgsLayerTreeRegistryBridge *layerTreeRegistryBridge() const { return mLayerTreeRegistryBridge.get(); }
1022
1028
1033
1038
1043 Q_DECL_DEPRECATED void setNonIdentifiableLayers( const QList<QgsMapLayer *> &layers );
1044
1049 Q_DECL_DEPRECATED void setNonIdentifiableLayers( const QStringList &layerIds );
1050
1055 Q_DECL_DEPRECATED QStringList nonIdentifiableLayers() const;
1056
1064 Q_DECL_DEPRECATED bool autoTransaction() const SIP_DEPRECATED;
1065
1075 Q_DECL_DEPRECATED void setAutoTransaction( bool autoTransaction ) SIP_DEPRECATED;
1076
1083 Qgis::TransactionMode transactionMode() const;
1084
1094 bool setTransactionMode( Qgis::TransactionMode transactionMode );
1095
1103 QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups() SIP_SKIP;
1104
1112 QgsTransactionGroup *transactionGroup( const QString &providerKey, const QString &connString );
1113
1120
1126 Q_DECL_DEPRECATED bool evaluateDefaultValues() const SIP_DEPRECATED;
1127
1133 Q_DECL_DEPRECATED void setEvaluateDefaultValues( bool evaluateDefaultValues ) SIP_DEPRECATED;
1134
1137
1143
1149
1156 void setAvoidIntersectionsLayers( const QList<QgsVectorLayer *> &layers );
1157
1163 void setAvoidIntersectionsMode( const Qgis::AvoidIntersectionsMode mode );
1164
1170 Qgis::AvoidIntersectionsMode avoidIntersectionsMode() const { return mAvoidIntersectionsMode; }
1171
1177 QVariantMap customVariables() const;
1178
1183 void setCustomVariables( const QVariantMap &customVariables );
1184
1188 void setLabelingEngineSettings( const QgsLabelingEngineSettings &settings );
1189
1193 const QgsLabelingEngineSettings &labelingEngineSettings() const;
1194
1195 //
1196 // Functionality from QgsMapLayerRegistry
1197 //
1198
1202 QgsMapLayerStore *layerStore();
1203
1207 SIP_SKIP const QgsMapLayerStore *layerStore() const;
1208
1210 int count() const;
1211
1213 int validCount() const;
1214
1222 Q_INVOKABLE QgsMapLayer *mapLayer( const QString &layerId ) const;
1223
1224#ifndef SIP_RUN
1225
1241 template <class T>
1242 T mapLayer( const QString &layerId ) const
1243 {
1244 return qobject_cast<T>( mapLayer( layerId ) );
1245 }
1246#endif
1247
1255 Q_INVOKABLE QList<QgsMapLayer *> mapLayersByName( const QString &layerName ) const;
1256
1266 QList<QgsMapLayer *> mapLayersByShortName( const QString &shortName ) const;
1267
1268
1277 QMap<QString, QgsMapLayer *> mapLayers( const bool validOnly = false ) const;
1278
1282 bool isZipped() const;
1283
1284#ifndef SIP_RUN
1285
1296 template <typename T>
1297 QVector<T> layers() const
1298 {
1299 return mLayerStore->layers<T>();
1300 }
1301
1313 template <typename T>
1314 QVector<T> mapLayersByShortName( const QString &shortName ) const
1315 {
1316 QVector<T> layers;
1317 const auto constMapLayers { mLayerStore->layers<T>() };
1318 for ( const auto l : constMapLayers )
1319 {
1320 if ( ! l->serverProperties()->shortName().isEmpty() )
1321 {
1322 if ( l->serverProperties()->shortName() == shortName )
1323 layers << l;
1324 }
1325 else if ( l->name() == shortName )
1326 {
1327 layers << l;
1328 }
1329 }
1330 return layers;
1331 }
1332
1333#endif
1334
1359 QList<QgsMapLayer *> addMapLayers( const QList<QgsMapLayer *> &mapLayers SIP_TRANSFER,
1360 bool addToLegend = true,
1361 bool takeOwnership SIP_PYARGREMOVE = true );
1362
1390 QgsMapLayer *addMapLayer( QgsMapLayer *mapLayer SIP_TRANSFER,
1391 bool addToLegend = true,
1392 bool takeOwnership SIP_PYARGREMOVE = true );
1393
1394#ifndef SIP_RUN
1408 void removeMapLayers( const QStringList &layerIds );
1409
1410 //TODO QGIS 4.0 - add PyName alias to avoid list type conversion error
1411
1425 void removeMapLayers( const QList<QgsMapLayer *> &layers );
1426#else
1427
1441 void removeMapLayers( SIP_PYOBJECT layers SIP_TYPEHINT( Union[List[QgsVectorLayer], List[str]] ) );
1442 % MethodCode
1443 if ( !PyList_Check( a0 ) )
1444 {
1445 sipIsErr = 1;
1446 PyErr_SetString( PyExc_TypeError, "Expected a list of layers or layers IDs" );
1447 }
1448 else if ( PyList_GET_SIZE( a0 ) )
1449 {
1450 PyObject *firstLayerPyObj = PyList_GetItem( a0, 0 );
1451 if ( firstLayerPyObj )
1452 {
1453 int state;
1454 if ( sipCanConvertToType( firstLayerPyObj, sipType_QgsMapLayer, SIP_NOT_NONE ) )
1455 {
1456 const sipTypeDef *qlist_type = sipFindType( "QList<QgsMapLayer *>" );
1457 QList<QgsMapLayer *> *layersList = reinterpret_cast<QList<QgsMapLayer *> *>( sipConvertToType( a0, qlist_type, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
1458 if ( !sipIsErr )
1459 {
1460 sipCpp->removeMapLayers( *layersList );
1461 }
1462 sipReleaseType( layersList, qlist_type, state );
1463 }
1464 else if ( sipCanConvertToType( firstLayerPyObj, sipType_QString, SIP_NOT_NONE ) )
1465 {
1466 QStringList *layersId = reinterpret_cast<QStringList *>( sipConvertToType( a0, sipType_QStringList, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
1467 if ( !sipIsErr )
1468 {
1469 sipCpp->removeMapLayers( *layersId );
1470 }
1471 sipReleaseType( layersId, sipType_QStringList, state );
1472 }
1473 else
1474 {
1475 sipIsErr = 1;
1476 PyErr_SetString( PyExc_TypeError, "Expected a list of layers or layers IDs" );
1477 }
1478 }
1479 }
1480 % End
1481#endif
1482
1496 void removeMapLayer( const QString &layerId );
1497
1511 void removeMapLayer( QgsMapLayer *layer );
1512
1519 QgsMapLayer *takeMapLayer( QgsMapLayer *layer ) SIP_TRANSFERBACK;
1520
1532 QgsAnnotationLayer *mainAnnotationLayer();
1533
1544 void removeAllMapLayers();
1545
1551 void reloadAllLayers();
1552
1557 QgsCoordinateReferenceSystem defaultCrsForNewLayers() const;
1558
1570 Q_DECL_DEPRECATED void setTrustLayerMetadata( bool trust ) SIP_DEPRECATED;
1571
1582 Q_DECL_DEPRECATED bool trustLayerMetadata() const SIP_DEPRECATED;
1583
1588 const QgsAuxiliaryStorage *auxiliaryStorage() const SIP_SKIP;
1589
1594 QgsAuxiliaryStorage *auxiliaryStorage();
1595
1604 QString createAttachedFile( const QString &nameTemplate );
1605
1612 QStringList attachedFiles() const;
1613
1621 bool removeAttachedFile( const QString &path );
1622
1631 QString attachmentIdentifier( const QString &attachedFile ) const;
1632
1639 QString resolveAttachmentIdentifier( const QString &identifier ) const;
1640
1647 const QgsProjectMetadata &metadata() const;
1648
1655 void setMetadata( const QgsProjectMetadata &metadata );
1656
1665 Q_DECL_DEPRECATED QSet<QgsMapLayer *> requiredLayers() const;
1666
1675 Q_DECL_DEPRECATED void setRequiredLayers( const QSet<QgsMapLayer *> &layers );
1676
1683 void setProjectColors( const QgsNamedColorList &colors );
1684
1691 void setBackgroundColor( const QColor &color );
1692
1699 QColor backgroundColor() const;
1700
1707 void setSelectionColor( const QColor &color );
1708
1715 QColor selectionColor() const;
1716
1728 Q_DECL_DEPRECATED void setMapScales( const QVector<double> &scales ) SIP_DEPRECATED;
1729
1741 Q_DECL_DEPRECATED QVector<double> mapScales() const SIP_DEPRECATED;
1742
1751 Q_DECL_DEPRECATED void setUseProjectScales( bool enabled ) SIP_DEPRECATED;
1752
1761 Q_DECL_DEPRECATED bool useProjectScales() const SIP_DEPRECATED;
1762
1767 void generateTsFile( const QString &locale );
1768
1769 QString translate( const QString &context, const QString &sourceText, const char *disambiguation = nullptr, int n = -1 ) const override;
1770
1780 bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
1781
1791 bool accept( QgsObjectEntityVisitorInterface *visitor, const QgsObjectVisitorContext &context ) const;
1792
1798 QgsElevationShadingRenderer elevationShadingRenderer() const;
1799
1805 void setElevationShadingRenderer( const QgsElevationShadingRenderer &elevationShadingRenderer );
1806
1815 bool loadFunctionsFromProject( bool force = false ) SIP_SKIP;
1816
1824 void cleanFunctionsFromProject() SIP_SKIP;
1825
1826#ifdef SIP_RUN
1827 SIP_PYOBJECT __repr__();
1828 % MethodCode
1829 QString str = QStringLiteral( "<QgsProject: '%1'%2>" ).arg( sipCpp->fileName(),
1830 sipCpp == QgsProject::instance() ? QStringLiteral( " (singleton instance)" ) : QString() ); // skip-keyword-check
1831 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1832 % End
1833#endif
1834
1835 signals:
1836
1844 void cleared();
1845
1853
1857 void readProject( const QDomDocument &document );
1858
1862 void readProjectWithContext( const QDomDocument &document, QgsReadWriteContext &context );
1863
1867 void writeProject( QDomDocument &document );
1868
1877 void readMapLayer( QgsMapLayer *mapLayer, const QDomElement &layerNode );
1878
1887 void writeMapLayer( QgsMapLayer *mapLayer, QDomElement &layerElem, QDomDocument &doc );
1888
1893
1899 Q_DECL_DEPRECATED void oldProjectVersionWarning( const QString &warning ) SIP_DEPRECATED;
1900
1911 void readVersionMismatchOccurred( const QString &fileVersion );
1912
1918 void layerLoaded( int i, int n );
1919
1921 void loadingLayer( const QString &layerName );
1922
1929 void loadingLayerMessageReceived( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
1930
1935 Q_DECL_DEPRECATED void nonIdentifiableLayersChanged( QStringList nonIdentifiableLayers );
1936
1942
1945
1953
1958
1965
1970
1980
1992
2009
2016 void ellipsoidChanged( const QString &ellipsoid );
2017
2025
2033
2042
2049
2053 void missingDatumTransforms( const QStringList &missingTransforms );
2054
2060
2067
2073
2079
2091
2096
2104
2112
2120
2128
2129 //
2130 // signals from QgsMapLayerRegistry
2131 //
2132
2140 void layersWillBeRemoved( const QStringList &layerIds );
2141
2149 void layersWillBeRemoved( const QList<QgsMapLayer *> &layers );
2150
2160 void layerWillBeRemoved( const QString &layerId );
2161
2172
2179 void layersRemoved( const QStringList &layerIds );
2180
2189 void layerRemoved( const QString &layerId );
2190
2191 //TODO QGIS 4.0 - rename to past tense
2192
2200
2211 void layersAdded( const QList<QgsMapLayer *> &layers );
2212
2220
2229 void legendLayersAdded( const QList<QgsMapLayer *> &layers );
2230
2238 void isDirtyChanged( bool dirty );
2239
2247 void dirtySet();
2248
2257 Q_DECL_DEPRECATED void mapScalesChanged() SIP_DEPRECATED;
2258
2265
2266 public slots:
2267
2273
2274 // TODO QGIS 4.0 - rename b to dirty
2275
2282 void setDirty( bool b = true );
2283
2292 void setPresetHomePath( const QString &path );
2293
2303 void registerTranslatableContainers( QgsTranslationContext *translationContext, QgsAttributeEditorContainer *parent, const QString &layerId );
2304
2311 void registerTranslatableObjects( QgsTranslationContext *translationContext );
2312
2319 void setDataDefinedServerProperties( const QgsPropertyCollection &properties );
2320
2328
2345 bool startEditing( QgsVectorLayer *vectorLayer = nullptr );
2346
2376 bool commitChanges( QStringList &commitErrors SIP_OUT, bool stopEditing = true, QgsVectorLayer *vectorLayer = nullptr );
2377
2394 bool rollBack( QStringList &rollbackErrors SIP_OUT, bool stopEditing = true, QgsVectorLayer *vectorLayer = nullptr );
2395
2396 private slots:
2397 void onMapLayersAdded( const QList<QgsMapLayer *> &layers );
2398 void onMapLayersRemoved( const QList<QgsMapLayer *> &layers );
2399 void cleanTransactionGroups( bool force = false );
2400 void updateTransactionGroups();
2401
2402 private:
2403
2404 static QgsProject *sProject;
2405
2406
2415 bool _getMapLayers( const QDomDocument &doc, QList<QDomNode> &brokenNodes, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2416
2421 void setError( const QString &errorMessage ) SIP_SKIP;
2422
2427 void clearError() SIP_SKIP;
2428
2438 bool addLayer( const QDomElement &layerElem,
2439 QList<QDomNode> &brokenNodes,
2440 QgsReadWriteContext &context,
2441 Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags(),
2442 QgsDataProvider *provider = nullptr ) SIP_SKIP;
2443
2447 void removeAuxiliaryLayer( const QgsMapLayer *ml );
2448
2454 void initializeEmbeddedSubtree( const QString &projectFilePath, QgsLayerTreeGroup *group, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
2455
2460 bool loadEmbeddedNodes( QgsLayerTreeGroup *group, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
2461
2463 bool readProjectFile( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2464
2466 bool writeProjectFile( const QString &filename );
2467
2469 bool unzip( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2470
2472 bool zip( const QString &filename );
2473
2475 bool saveAuxiliaryStorage( const QString &filename = QString() );
2476
2478 void loadProjectFlags( const QDomDocument *doc );
2479
2481 static QgsPropertiesDefinition &dataDefinedServerPropertyDefinitions();
2482
2484 void preloadProviders( const QVector<QDomNode> &asynchronusLayerNodes,
2485 const QgsReadWriteContext &context,
2486 QMap<QString, QgsDataProvider *> &loadedProviders,
2487 QgsMapLayer::ReadFlags layerReadFlags,
2488 int totalProviderCount );
2489
2494 void releaseHandlesToProjectArchive();
2495
2496 bool rebuildCrs3D( QString *error = nullptr );
2497
2498 Qgis::ProjectCapabilities mCapabilities;
2499
2500 std::unique_ptr< QgsMapLayerStore > mLayerStore;
2501
2502 QString mErrorMessage;
2503
2504 std::unique_ptr<QgsProjectBadLayerHandler> mBadLayerHandler;
2505
2511 QHash< QString, QPair< QString, bool> > mEmbeddedLayers;
2512
2513 QgsSnappingConfig mSnappingConfig;
2514 Qgis::AvoidIntersectionsMode mAvoidIntersectionsMode = Qgis::AvoidIntersectionsMode::AllowIntersections;
2515
2516 std::unique_ptr<QgsRelationManager> mRelationManager;
2517
2518 std::unique_ptr<QgsAnnotationManager> mAnnotationManager;
2519 std::unique_ptr<QgsLayoutManager> mLayoutManager;
2520 std::unique_ptr<QgsElevationProfileManager> mElevationProfileManager;
2521 std::unique_ptr<QgsMapViewsManager> m3DViewsManager;
2522
2523 QgsBookmarkManager *mBookmarkManager = nullptr;
2524
2525 QgsSensorManager *mSensorManager = nullptr;
2526
2527 QgsProjectViewSettings *mViewSettings = nullptr;
2528
2529 QgsProjectStyleSettings *mStyleSettings = nullptr;
2530
2531 QgsProjectTimeSettings *mTimeSettings = nullptr;
2532
2533 QgsProjectElevationProperties *mElevationProperties = nullptr;
2534
2535 QgsProjectDisplaySettings *mDisplaySettings = nullptr;
2536
2537 QgsProjectGpsSettings *mGpsSettings = nullptr;
2538
2539 std::unique_ptr<QgsLayerTree> mRootGroup;
2540
2541 std::unique_ptr<QgsLayerTreeRegistryBridge> mLayerTreeRegistryBridge;
2542
2543 QgsAnnotationLayer *mMainAnnotationLayer = nullptr;
2544
2546 QMap< QPair< QString, QString>, QgsTransactionGroup *> mTransactionGroups;
2547
2548 QgsVectorLayerEditBufferGroup mEditBufferGroup;
2549
2550 std::unique_ptr<QgsMapThemeCollection> mMapThemeCollection;
2551
2552 std::unique_ptr<QgsLabelingEngineSettings> mLabelingEngineSettings;
2553
2554 QVariantMap mCustomVariables;
2555
2556 std::unique_ptr<QgsArchive> mArchive;
2557
2558 std::unique_ptr<QgsAuxiliaryStorage> mAuxiliaryStorage;
2559
2560 QFile mFile; // current physical project file
2561
2562 QString mOriginalPath;
2563
2564 QString mSaveUser; // last saved user.
2565 QString mSaveUserFull; // last saved user full name.
2566 QDateTime mSaveDateTime;
2567 QgsProjectVersion mSaveVersion;
2568
2573 QString mHomePath;
2574 mutable QString mCachedHomePath;
2575
2576 QColor mBackgroundColor;
2577 QColor mSelectionColor;
2578
2579 Qgis::DistanceUnit mDistanceUnits = Qgis::DistanceUnit::Meters;
2580 Qgis::AreaUnit mAreaUnits = Qgis::AreaUnit::SquareMeters;
2581 Qgis::ScaleCalculationMethod mScaleMethod = Qgis::ScaleCalculationMethod::HorizontalMiddle;
2582
2583 mutable QgsProjectPropertyKey mProperties; // property hierarchy, TODO: this shouldn't be mutable
2584 Qgis::TransactionMode mTransactionMode = Qgis::TransactionMode::Disabled; // transaction grouped editing
2585
2586 Qgis::ProjectFlags mFlags;
2588 QgsCoordinateReferenceSystem mVerticalCrs;
2590
2591 bool mDirty = false; // project has been modified since it has been read or saved
2592 int mDirtyBlockCount = 0;
2593
2594 QgsPropertyCollection mDataDefinedServerProperties;
2595
2596 QgsCoordinateTransformContext mTransformContext;
2597
2598 QgsProjectMetadata mMetadata;
2599
2600 std::unique_ptr< QTranslator > mTranslator;
2601
2602 bool mIsBeingDeleted = false;
2603
2604 QgsSettings mSettings;
2605
2606 mutable std::unique_ptr< QgsExpressionContextScope > mProjectScope;
2607
2608 bool mBlockChangeSignalsDuringClear = false;
2609 int mBlockSnappingUpdates = 0;
2610
2611 QgsElevationShadingRenderer mElevationShadingRenderer;
2612
2613 friend class QgsApplication;
2614
2616
2617 // Required to avoid creating a new project in it's destructor
2619
2620 // Required by QGIS Server for switching the current project instance
2621 friend class QgsServer;
2622
2623 friend class TestQgsProject;
2624
2625 Q_DISABLE_COPY( QgsProject )
2626};
2627
2649class CORE_EXPORT QgsProjectDirtyBlocker
2650{
2651 public:
2652
2659 : mProject( project )
2660 {
2661 mProject->mDirtyBlockCount++;
2662 }
2663
2666
2668 {
2669 mProject->mDirtyBlockCount--;
2670 }
2671
2672 private:
2673 QgsProject *mProject = nullptr;
2674
2675#ifdef SIP_RUN
2677#endif
2678};
2679
2685CORE_EXPORT QgsProjectVersion getVersion( QDomDocument const &doc ) SIP_SKIP;
2686
2687
2688
2690#ifndef SIP_RUN
2691class GetNamedProjectColor : public QgsScopedExpressionFunction
2692{
2693 public:
2694 GetNamedProjectColor( const QgsProject *project );
2695
2700 GetNamedProjectColor( const QHash< QString, QColor > &colors );
2701
2702 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2703 QgsScopedExpressionFunction *clone() const override;
2704
2705 private:
2706
2707 QHash< QString, QColor > mColors;
2708};
2709
2710class GetNamedProjectColorObject : public QgsScopedExpressionFunction
2711{
2712 public:
2713 GetNamedProjectColorObject( const QgsProject *project );
2714
2719 GetNamedProjectColorObject( const QHash< QString, QColor > &colors );
2720
2721 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2722 QgsScopedExpressionFunction *clone() const override;
2723
2724 private:
2725
2726 QHash< QString, QColor > mColors;
2727};
2728
2729
2730
2731class GetSensorData : public QgsScopedExpressionFunction
2732{
2733 public:
2734 GetSensorData( const QMap<QString, QgsAbstractSensor::SensorData> &sensorData = QMap<QString, QgsAbstractSensor::SensorData>() );
2735 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2736 QgsScopedExpressionFunction *clone() const override;
2737
2738 private:
2739
2740 QMap<QString, QgsAbstractSensor::SensorData> mSensorData;
2741};
2742#endif
2744
2745#endif
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:56
QFlags< ProjectCapability > ProjectCapabilities
Flags which control project capabilities.
Definition qgis.h:4343
DistanceUnit
Units of distance.
Definition qgis.h:5013
@ ProjectStyles
Enable the project embedded style library. Enabling this flag can increase the time required to clear...
Definition qgis.h:4334
AreaUnit
Units of area.
Definition qgis.h:5090
ProjectFlag
Flags which control the behavior of QgsProjects.
Definition qgis.h:4092
ScaleCalculationMethod
Scale calculation logic.
Definition qgis.h:5285
QFlags< ProjectFlag > ProjectFlags
Definition qgis.h:4099
Represents a map layer containing a set of georeferenced annotations, e.g.
Manages storage of a set of QgsAnnotation annotation objects.
Manages zip/unzip operations for an archive.
Definition qgsarchive.h:36
A container for attribute editors, used to group them visually in the attribute form if it is set to ...
Providing some utility methods to manage auxiliary storage.
Manages storage of a set of bookmarks.
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Abstract base class for spatial data provider implementations.
Manages storage of a set of elevation profiles.
Renders elevation shading on an image with different methods (eye dome lighting, hillshading,...
Abstract interface for generating an expression context.
Abstract interface for generating an expression context scope.
Single scope for storing variables and functions for use within a QgsExpressionContext.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Stores global configuration for labeling engine.
Layer tree group node serves as a container for layers and further groups.
Listens to layer changes from a QgsProject and applies changes to a QgsLayerTree.
Namespace with helper functions for layer tree operations.
Manages storage of a set of layouts.
A storage object for map layers, in which the layers are owned by the store and have their lifetime b...
Base class for all map layer types.
Definition qgsmaplayer.h:80
Container class that allows storage of map themes consisting of visible map layers and layer styles.
Manages storage of a set of views.
An interface for classes which can visit various object entity (e.g.
A QgsObjectEntityVisitorInterface context object.
Resolves relative paths into absolute paths and vice versa.
Interface for classes that handle missing layer files when reading project files.
Temporarily blocks QgsProject "dirtying" for the lifetime of the object.
QgsProjectDirtyBlocker & operator=(const QgsProjectDirtyBlocker &other)=delete
QgsProjectDirtyBlocker(QgsProject *project)
Constructor for QgsProjectDirtyBlocker.
QgsProjectDirtyBlocker(const QgsProjectDirtyBlocker &other)=delete
Contains settings and properties relating to how a QgsProject should display values such as map coord...
Contains elevation properties for a QgsProject.
Contains settings and properties relating to how a QgsProject should interact with a GPS device.
A structured metadata store for a project.
Project property key node.
Abstract interface for project storage - to be implemented by various backends and registered in QgsP...
Contains settings and properties relating to how a QgsProject should handle styling.
Contains temporal settings and properties for the project, this may be used when animating maps or sh...
An interface for objects which can translate project strings.
Describes the version of a project.
Contains settings and properties relating to how a QgsProject should be displayed inside map canvas,...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:109
QgsRelationManager * relationManager
Definition qgsproject.h:120
QgsProject(QObject *parent=nullptr, Qgis::ProjectCapabilities capabilities=Qgis::ProjectCapability::ProjectStyles)
Create a new QgsProject.
Q_DECL_DEPRECATED void oldProjectVersionWarning(const QString &warning)
Emitted when an old project file is read.
Q_DECL_DEPRECATED bool evaluateDefaultValues() const
Should default values be evaluated on provider side when requested and not when committed.
Qgis::DistanceUnit distanceUnits
Definition qgsproject.h:127
void layersRemoved(const QStringList &layerIds)
Emitted after one or more layers were removed from the registry.
QString error() const
Returns error message from previous read/write.
void readProjectWithContext(const QDomDocument &document, QgsReadWriteContext &context)
Emitted when a project is being read.
Q_DECL_DEPRECATED void setNonIdentifiableLayers(const QList< QgsMapLayer * > &layers)
Set a list of layers which should not be taken into account on map identification.
Qgis::ProjectFlags flags() const
Returns the project's flags, which dictate the behavior of the project.
Definition qgsproject.h:212
void setBackgroundColor(const QColor &color)
Sets the default background color used by default map canvases.
void setCrs(const QgsCoordinateReferenceSystem &crs, bool adjustEllipsoid=false)
Sets the project's native coordinate reference system.
QColor selectionColor
Definition qgsproject.h:125
bool commitChanges(QStringList &commitErrors, bool stopEditing=true, QgsVectorLayer *vectorLayer=nullptr)
Attempts to commit to the underlying data provider any buffered changes made since the last to call t...
void mapThemeCollectionChanged()
Emitted when the map theme collection changes.
static QgsProject * instance()
Returns the QgsProject singleton instance.
Q_DECL_DEPRECATED void mapScalesChanged()
Emitted when the list of custom project map scales changes.
void readVersionMismatchOccurred(const QString &fileVersion)
Emitted when a project is read and the version of QGIS used to save the project differs from the curr...
QString ellipsoid
Definition qgsproject.h:117
void fileNameChanged()
Emitted when the file name of the project changes.
friend class QgsProviderRegistry
void titleChanged()
Emitted when the title of the project changes.
Q_INVOKABLE QgsMapLayer * mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layer ID.
QString title
Definition qgsproject.h:112
void writeMapLayer(QgsMapLayer *mapLayer, QDomElement &layerElem, QDomDocument &doc)
Emitted when a layer is being saved.
void setSnappingConfig(const QgsSnappingConfig &snappingConfig)
The snapping configuration for this project.
void areaUnitsChanged()
Emitted when the default area units changes.
QgsPropertyCollection dataDefinedServerProperties() const
Returns the data defined properties used for overrides in user defined server parameters.
Q_DECL_DEPRECATED void nonIdentifiableLayersChanged(QStringList nonIdentifiableLayers)
Emitted when the list of layer which are excluded from map identification changes.
void layersWillBeRemoved(const QStringList &layerIds)
Emitted when one or more layers are about to be removed from the registry.
void setScaleMethod(Qgis::ScaleCalculationMethod method)
Sets the method to use for map scale calculations for the project.
QgsVectorLayerEditBufferGroup * editBufferGroup()
Returns the edit buffer group.
void setSelectionColor(const QColor &color)
Sets the color used to highlight selected features.
bool rollBack(QStringList &rollbackErrors, bool stopEditing=true, QgsVectorLayer *vectorLayer=nullptr)
Stops a current editing operation on vectorLayer and discards any uncommitted edits.
void snappingConfigChanged(const QgsSnappingConfig &config)
Emitted whenever the configuration for snapping has changed.
Q_DECL_DEPRECATED void setEvaluateDefaultValues(bool evaluateDefaultValues)
Defines if default values should be evaluated on provider side when requested and not when committed.
void layerWasAdded(QgsMapLayer *layer)
Emitted when a layer was added to the registry.
Qgis::AreaUnit areaUnits
Definition qgsproject.h:128
void crsChanged()
Emitted when the crs() of the project has changed.
Qgis::AreaUnit areaUnits() const
Convenience function to query default area measurement units for project.
Definition qgsproject.h:787
QgsSnappingConfig snappingConfig
Definition qgsproject.h:119
const QgsProjectGpsSettings * gpsSettings() const
Returns the project's GPS settings, which contains settings and properties relating to how a QgsProje...
void setFileName(const QString &name)
Sets the file name associated with the project.
void avoidIntersectionsLayersChanged()
Emitted whenever avoidIntersectionsLayers has changed.
void setDataDefinedServerProperties(const QgsPropertyCollection &properties)
Sets the data defined properties used for overrides in user defined server parameters to properties.
void registerTranslatableObjects(QgsTranslationContext *translationContext)
Registers the objects that require translation into the translationContext.
void layerWillBeRemoved(const QString &layerId)
Emitted when a layer is about to be removed from the registry.
void distanceUnitsChanged()
Emitted when the default distance units changes.
friend class QgsServer
void readMapLayer(QgsMapLayer *mapLayer, const QDomElement &layerNode)
Emitted after the basic initialization of a layer from the project file is done.
Q_DECL_DEPRECATED void setAutoTransaction(bool autoTransaction)
Transactional editing means that on supported datasources (postgres databases) the edit state of all ...
DataDefinedServerProperty
Data defined properties.
Definition qgsproject.h:146
bool startEditing(QgsVectorLayer *vectorLayer=nullptr)
Makes the layer editable.
void aboutToBeCleared()
Emitted when the project is about to be cleared.
void cleared()
Emitted when the project is cleared (and additionally when an open project is cleared just before a n...
QgsExpressionContext createExpressionContext() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
void metadataChanged()
Emitted when the project's metadata is changed.
QgsLayerTreeRegistryBridge * layerTreeRegistryBridge() const
Returns pointer to the helper class that synchronizes map layer registry with layer tree.
void crs3DChanged()
Emitted when the crs3D() of the project has changed.
void scaleMethodChanged()
Emitted when the project's scale method is changed.
friend class QgsApplication
QList< QgsVectorLayer * > avoidIntersectionsLayers
Definition qgsproject.h:122
QgsExpressionContextScope * createExpressionContextScope() const override
This method needs to be reimplemented in all classes which implement this interface and return an exp...
void ellipsoidChanged(const QString &ellipsoid)
Emitted when the project ellipsoid is changed.
QgsMapThemeCollection * mapThemeCollection
Definition qgsproject.h:118
Qgis::TransactionMode transactionMode
Definition qgsproject.h:130
QgsAnnotationManager * annotationManager()
Returns pointer to the project's annotation manager.
QgsProjectDisplaySettings * displaySettings
Definition qgsproject.h:129
QgsProjectMetadata metadata
Definition qgsproject.h:123
void projectColorsChanged()
Emitted whenever the project's color scheme has been changed.
QVector< T > layers() const
Returns a list of registered map layers with a specified layer type.
bool setTransactionMode(Qgis::TransactionMode transactionMode)
Set transaction mode.
QgsCoordinateTransformContext transformContext
Definition qgsproject.h:116
void transactionModeChanged()
Emitted when the transaction mode has changed.
void labelingEngineSettingsChanged()
Emitted when global configuration of the labeling engine changes.
void customVariablesChanged()
Emitted whenever the expression variables stored in the project have been changed.
QgsLayerTree * layerTreeRoot() const
Returns pointer to the root (invisible) node of the project's layer tree.
void elevationShadingRendererChanged()
Emitted when the map shading renderer changes.
QString fileName
Definition qgsproject.h:113
Q_DECL_DEPRECATED bool autoTransaction() const
Transactional editing means that on supported datasources (postgres databases) the edit state of all ...
void setMetadata(const QgsProjectMetadata &metadata)
Sets the project's metadata store.
T mapLayer(const QString &layerId) const
Retrieve a pointer to a registered layer by layerId converted to type T.
QgsMapThemeCollection * mapThemeCollection()
Returns pointer to the project's map theme collection.
void missingDatumTransforms(const QStringList &missingTransforms)
Emitted when datum transforms stored in the project are not available locally.
QgsTransactionGroup * transactionGroup(const QString &providerKey, const QString &connString)
Returns the matching transaction group from a provider key and connection string.
QgsCoordinateReferenceSystem crs
Definition qgsproject.h:115
QStringList nonIdentifiableLayers
Definition qgsproject.h:111
void setAvoidIntersectionsMode(const Qgis::AvoidIntersectionsMode mode)
Sets the avoid intersections mode.
void layerWillBeRemoved(QgsMapLayer *layer)
Emitted when a layer is about to be removed from the registry.
void transactionGroupsChanged()
Emitted whenever a new transaction group has been created or a transaction group has been removed.
void loadingLayerMessageReceived(const QString &layerName, const QList< QgsReadWriteContext::ReadWriteMessage > &messages)
Emitted when loading layers has produced some messages.
QVector< T > mapLayersByShortName(const QString &shortName) const
Retrieves a list of matching registered layers by layer shortName with a specified layer type,...
Qgis::ScaleCalculationMethod scaleMethod() const
Returns the method to use for map scale calculations for the project.
Definition qgsproject.h:803
void setAreaUnits(Qgis::AreaUnit unit)
Sets the default area measurement units for the project.
void setTitle(const QString &title)
Sets the project's title.
QMap< QPair< QString, QString >, QgsTransactionGroup * > transactionGroups()
Map of transaction groups.
Qgis::ProjectCapabilities capabilities() const
Returns the project's capabilities, which dictate optional functionality which can be selectively ena...
Definition qgsproject.h:202
void projectSaved()
Emitted when the project file has been written and closed.
void layersWillBeRemoved(const QList< QgsMapLayer * > &layers)
Emitted when one or more layers are about to be removed from the registry.
void setEllipsoid(const QString &ellipsoid)
Sets the project's ellipsoid from a proj string representation, e.g., "WGS84".
void readProject(const QDomDocument &document)
Emitted when a project is being read.
void setTransformContext(const QgsCoordinateTransformContext &context)
Sets the project's coordinate transform context, which stores various information regarding which dat...
QColor backgroundColor
Definition qgsproject.h:124
void layerLoaded(int i, int n)
Emitted when a layer from a projects was read.
void selectionColorChanged()
Emitted whenever the project's selection color has been changed.
bool topologicalEditing
Definition qgsproject.h:126
void removeAll()
Emitted when all layers are removed, before layersWillBeRemoved() and layerWillBeRemoved() signals ar...
void setDirty(bool b=true)
Flag the project as dirty (modified).
void backgroundColorChanged()
Emitted whenever the project's canvas background color has been changed.
void registerTranslatableContainers(QgsTranslationContext *translationContext, QgsAttributeEditorContainer *parent, const QString &layerId)
Registers the containers that require translation into the translationContext.
Qgis::ScaleCalculationMethod scaleMethod
Definition qgsproject.h:131
void transformContextChanged()
Emitted when the project transformContext() is changed.
void setTopologicalEditing(bool enabled)
Convenience function to set topological editing.
Qgis::AvoidIntersectionsMode avoidIntersectionsMode
Definition qgsproject.h:121
void legendLayersAdded(const QList< QgsMapLayer * > &layers)
Emitted, when a layer was added to the registry and the legend.
void setAvoidIntersectionsLayers(const QList< QgsVectorLayer * > &layers)
Sets the list of layers with which intersections should be avoided.
void layerRemoved(const QString &layerId)
Emitted after a layer was removed from the registry.
friend class TestQgsProject
void homePathChanged()
Emitted when the home path of the project changes.
void dirtySet()
Emitted when setDirty(true) is called.
friend class QgsProjectDirtyBlocker
void writeProject(QDomDocument &document)
Emitted when the project is being written.
void layersAdded(const QList< QgsMapLayer * > &layers)
Emitted when one or more layers were added to the registry.
QString homePath
Definition qgsproject.h:114
void isDirtyChanged(bool dirty)
Emitted when the project dirty status changes.
void setDistanceUnits(Qgis::DistanceUnit unit)
Sets the default distance measurement units for the project.
void setPresetHomePath(const QString &path)
Sets the project's home path.
void verticalCrsChanged()
Emitted when the verticalCrs() of the project has changed.
void topologicalEditingChanged()
Emitted when the topological editing flag has changed.
void avoidIntersectionsModeChanged()
Emitted whenever the avoid intersections mode has changed.
void loadingLayer(const QString &layerName)
Emitted when a layer is loaded.
A grouped map of multiple QgsProperty objects, each referenced by an integer key value.
A container for the context for various read/write operations on objects.
Manages a set of relations between layers.
Manages sensors.
Stores settings for use within QGIS.
Definition qgssettings.h:65
Stores configuration of snapping settings for the project.
Provides calculations for tolerance values in map units.
Represents a transaction group.
Used for the collecting of strings from projects for translation and creation of ts files.
The edit buffer group manages a group of edit buffers.
Represents a vector layer which manages a vector based dataset.
QList< QPair< QColor, QString > > QgsNamedColorList
List of colors paired with a friendly display name identifying the color.
#define SIP_TYPEHINT(type)
Definition qgis_sip.h:240
#define SIP_DEPRECATED
Definition qgis_sip.h:114
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_SKIP
Definition qgis_sip.h:134
#define SIP_MONKEYPATCH_SCOPEENUM_UNNEST(OUTSIDE_CLASS, FORMERNAME)
Definition qgis_sip.h:268
#define SIP_PYNAME(name)
Definition qgis_sip.h:89
#define SIP_PYARGREMOVE
Definition qgis_sip.h:159
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_OUT
Definition qgis_sip.h:58
#define SIP_TRANSFERBACK
Definition qgis_sip.h:48
QgsProjectVersion getVersion(const QDomDocument &doc)
Returns the version string found in the given DOM document.
QMap< int, QgsPropertyDefinition > QgsPropertiesDefinition
Definition of available properties.