QGIS API Documentation 3.99.0-Master (d270888f95f)
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 <QString>
58#include <QStringList>
59#include <QTranslator>
60
61using namespace Qt::StringLiterals;
62
63class QFileInfo;
64class QDomDocument;
65class QDomElement;
66class QDomNode;
67
70class QgsMapLayer;
71class QgsPathResolver;
74class QgsTolerance;
76class QgsVectorLayer;
80class QgsLayerTree;
83class QgsMapLayer;
97
110
112{
113 Q_OBJECT
115 Q_PROPERTY( QString title READ title WRITE setTitle NOTIFY titleChanged )
116 Q_PROPERTY( QString fileName READ fileName WRITE setFileName NOTIFY fileNameChanged )
117 Q_PROPERTY( QString homePath READ homePath WRITE setPresetHomePath NOTIFY homePathChanged )
118 Q_PROPERTY( QgsCoordinateReferenceSystem crs READ crs WRITE setCrs NOTIFY crsChanged )
120 Q_PROPERTY( QString ellipsoid READ ellipsoid WRITE setEllipsoid NOTIFY ellipsoidChanged )
130 Q_PROPERTY( Qgis::DistanceUnit distanceUnits READ distanceUnits WRITE setDistanceUnits NOTIFY distanceUnitsChanged )
131 Q_PROPERTY( Qgis::AreaUnit areaUnits READ areaUnits WRITE setAreaUnits NOTIFY areaUnitsChanged )
133 Q_PROPERTY( Qgis::TransactionMode transactionMode READ transactionMode WRITE setTransactionMode NOTIFY transactionModeChanged )
134 Q_PROPERTY( Qgis::ScaleCalculationMethod scaleMethod READ scaleMethod WRITE setScaleMethod NOTIFY scaleMethodChanged )
135
136 public:
137
138 // *INDENT-OFF*
139
149 {
150 NoProperty = 0,
151 AllProperties = 1,
152 WMSOnlineResource = 2,
153 };
154 // *INDENT-ON*
155
157 static QgsProject *instance();
158
167 static void setInstance( QgsProject *project ) ;
168
177 explicit QgsProject( QObject *parent SIP_TRANSFERTHIS = nullptr, Qgis::ProjectCapabilities capabilities = Qgis::ProjectCapability::ProjectStyles );
178
179 ~QgsProject() override;
180
189 void setTitle( const QString &title );
190
197 QString title() const;
198
205 Qgis::ProjectCapabilities capabilities() const { return mCapabilities; }
206
215 Qgis::ProjectFlags flags() const { return mFlags; }
216
225 void setFlags( Qgis::ProjectFlags flags );
226
235 void setFlag( Qgis::ProjectFlag flag, bool enabled = true );
236
244 QString saveUser() const;
245
253 QString saveUserFullName() const;
254
260 QDateTime lastSaveDateTime() const;
261
267 QgsProjectVersion lastSaveVersion() const;
268
272 bool isDirty() const;
273
280 void setFileName( const QString &name );
281
288 QString fileName() const;
289
301 void setOriginalPath( const QString &path );
302
314 QString originalPath() const;
315
326 Q_DECL_DEPRECATED QFileInfo fileInfo() const SIP_DEPRECATED;
327
334 QgsProjectStorage *projectStorage() const;
335
340 QDateTime lastModified() const;
341
347 QString absoluteFilePath() const;
348
354 QString absolutePath() const;
355
360 QString baseName() const;
361
368 Qgis::FilePathType filePathStorage() const;
369
376 void setFilePathStorage( Qgis::FilePathType type );
377
391
410 QgsCoordinateReferenceSystem crs3D() const;
411
426 void setCrs( const QgsCoordinateReferenceSystem &crs, bool adjustEllipsoid = false );
427
435 QString ellipsoid() const;
436
444 void setEllipsoid( const QString &ellipsoid );
445
464 QgsCoordinateReferenceSystem verticalCrs() const;
465
485 bool setVerticalCrs( const QgsCoordinateReferenceSystem &crs, QString *errorMessage SIP_OUT = nullptr );
486
495 QgsCoordinateTransformContext transformContext() const;
496
505 void setTransformContext( const QgsCoordinateTransformContext &context );
506
511 void clear();
512
519 bool read( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
520
529 bool read( Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
530
540 bool readLayer( const QDomNode &layerNode );
541
549 bool write( const QString &filename );
550
556 bool write();
557
569 bool writeEntry( const QString &scope, const QString &key, bool value ) SIP_PYNAME( writeEntryBool );
570
582 bool writeEntry( const QString &scope, const QString &key, double value ) SIP_PYNAME( writeEntryDouble );
583
594 bool writeEntry( const QString &scope, const QString &key, int value );
595
606 bool writeEntry( const QString &scope, const QString &key, const QString &value );
607
618 bool writeEntry( const QString &scope, const QString &key, const QStringList &value );
619
630 QStringList readListEntry( const QString &scope, const QString &key, const QStringList &def = QStringList(), bool *ok SIP_OUT = nullptr ) const;
631
642 QString readEntry( const QString &scope, const QString &key, const QString &def = QString(), bool *ok SIP_OUT = nullptr ) const;
643
654 int readNumEntry( const QString &scope, const QString &key, int def = 0, bool *ok SIP_OUT = nullptr ) const;
655
666 double readDoubleEntry( const QString &scope, const QString &key, double def = 0, bool *ok SIP_OUT = nullptr ) const;
667
678 bool readBoolEntry( const QString &scope, const QString &key, bool def = false, bool *ok SIP_OUT = nullptr ) const;
679
683 bool removeEntry( const QString &scope, const QString &key );
684
693 QStringList entryList( const QString &scope, const QString &key ) const;
694
703 QStringList subkeyList( const QString &scope, const QString &key ) const;
704
705 // TODO Now slightly broken since re-factoring. Won't print out top-level key
706 // and redundantly prints sub-keys.
707
711 void dumpProperties() const;
712
717 QgsPathResolver pathResolver() const;
718
724 QString writePath( const QString &filename ) const;
725
729 QString readPath( const QString &filename ) const;
730
732 QString error() const;
733
738 void setBadLayerHandler( QgsProjectBadLayerHandler *handler SIP_TRANSFER );
739
745 QString layerIsEmbedded( const QString &id ) const;
746
755 bool createEmbeddedLayer( const QString &layerId, const QString &projectFilePath, QList<QDomNode> &brokenNodes,
756 bool saveFlag = true, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
757
764 std::unique_ptr< QgsLayerTreeGroup > createEmbeddedGroup( const QString &groupName, const QString &projectFilePath, const QStringList &invisibleLayers, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
765
767 void setTopologicalEditing( bool enabled );
768
770 bool topologicalEditing() const;
771
777 Qgis::DistanceUnit distanceUnits() const { return mDistanceUnits; }
778
784 void setDistanceUnits( Qgis::DistanceUnit unit );
785
790 Qgis::AreaUnit areaUnits() const { return mAreaUnits; }
791
797 void setAreaUnits( Qgis::AreaUnit unit );
798
806 Qgis::ScaleCalculationMethod scaleMethod() const { return mScaleMethod; }
807
815 void setScaleMethod( Qgis::ScaleCalculationMethod method );
816
829 QString homePath() const;
830
843 QString presetHomePath() const;
844
845 QgsRelationManager *relationManager() const;
846
852 const QgsLayoutManager *layoutManager() const SIP_SKIP;
853
858 QgsLayoutManager *layoutManager();
859
866 const QgsElevationProfileManager *elevationProfileManager() const SIP_SKIP;
867
873 QgsElevationProfileManager *elevationProfileManager();
874
881 const QgsMapViewsManager *viewsManager() const SIP_SKIP;
882
888 QgsMapViewsManager *viewsManager();
889
896 const QgsBookmarkManager *bookmarkManager() const SIP_SKIP;
897
903 QgsBookmarkManager *bookmarkManager();
904
911 const QgsSensorManager *sensorManager() const SIP_SKIP;
912
918 QgsSensorManager *sensorManager();
919
927 const QgsProjectViewSettings *viewSettings() const SIP_SKIP;
928
935 QgsProjectViewSettings *viewSettings();
936
944 const QgsProjectStyleSettings *styleSettings() const SIP_SKIP;
945
952 QgsProjectStyleSettings *styleSettings();
953
961 const QgsProjectTimeSettings *timeSettings() const SIP_SKIP;
962
969 QgsProjectTimeSettings *timeSettings();
970
977 const QgsProjectElevationProperties *elevationProperties() const SIP_SKIP;
978
984 QgsProjectElevationProperties *elevationProperties();
985
992 const QgsProjectDisplaySettings *displaySettings() const SIP_SKIP;
993
1000
1008
1015
1019 QgsLayerTree *layerTreeRoot() const;
1020
1024 QgsLayerTreeRegistryBridge *layerTreeRegistryBridge() const { return mLayerTreeRegistryBridge.get(); }
1025
1031
1036
1041
1046 Q_DECL_DEPRECATED void setNonIdentifiableLayers( const QList<QgsMapLayer *> &layers );
1047
1052 Q_DECL_DEPRECATED void setNonIdentifiableLayers( const QStringList &layerIds );
1053
1058 Q_DECL_DEPRECATED QStringList nonIdentifiableLayers() const;
1059
1067 Q_DECL_DEPRECATED bool autoTransaction() const SIP_DEPRECATED;
1068
1078 Q_DECL_DEPRECATED void setAutoTransaction( bool autoTransaction ) SIP_DEPRECATED;
1079
1086 Qgis::TransactionMode transactionMode() const;
1087
1097 bool setTransactionMode( Qgis::TransactionMode transactionMode );
1098
1106 QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups() SIP_SKIP;
1107
1115 QgsTransactionGroup *transactionGroup( const QString &providerKey, const QString &connString );
1116
1123
1129 Q_DECL_DEPRECATED bool evaluateDefaultValues() const SIP_DEPRECATED;
1130
1136 Q_DECL_DEPRECATED void setEvaluateDefaultValues( bool evaluateDefaultValues ) SIP_DEPRECATED;
1137
1140
1146
1152
1159 void setAvoidIntersectionsLayers( const QList<QgsVectorLayer *> &layers );
1160
1166 void setAvoidIntersectionsMode( const Qgis::AvoidIntersectionsMode mode );
1167
1173 Qgis::AvoidIntersectionsMode avoidIntersectionsMode() const { return mAvoidIntersectionsMode; }
1174
1180 QVariantMap customVariables() const;
1181
1186 void setCustomVariables( const QVariantMap &customVariables );
1187
1191 void setLabelingEngineSettings( const QgsLabelingEngineSettings &settings );
1192
1196 const QgsLabelingEngineSettings &labelingEngineSettings() const;
1197
1198 //
1199 // Functionality from QgsMapLayerRegistry
1200 //
1201
1205 QgsMapLayerStore *layerStore();
1206
1210 SIP_SKIP const QgsMapLayerStore *layerStore() const;
1211
1213 int count() const;
1214
1216 int validCount() const;
1217
1225 Q_INVOKABLE QgsMapLayer *mapLayer( const QString &layerId ) const;
1226
1227#ifndef SIP_RUN
1228
1244 template <class T>
1245 T mapLayer( const QString &layerId ) const
1246 {
1247 return qobject_cast<T>( mapLayer( layerId ) );
1248 }
1249#endif
1250
1258 Q_INVOKABLE QList<QgsMapLayer *> mapLayersByName( const QString &layerName ) const;
1259
1269 QList<QgsMapLayer *> mapLayersByShortName( const QString &shortName ) const;
1270
1271
1280 QMap<QString, QgsMapLayer *> mapLayers( const bool validOnly = false ) const;
1281
1285 bool isZipped() const;
1286
1287#ifndef SIP_RUN
1288
1299 template <typename T>
1300 QVector<T> layers() const
1301 {
1302 return mLayerStore->layers<T>();
1303 }
1304
1316 template <typename T>
1317 QVector<T> mapLayersByShortName( const QString &shortName ) const
1318 {
1319 QVector<T> layers;
1320 const auto constMapLayers { mLayerStore->layers<T>() };
1321 for ( const auto l : constMapLayers )
1322 {
1323 if ( ! l->serverProperties()->shortName().isEmpty() )
1324 {
1325 if ( l->serverProperties()->shortName() == shortName )
1326 layers << l;
1327 }
1328 else if ( l->name() == shortName )
1329 {
1330 layers << l;
1331 }
1332 }
1333 return layers;
1334 }
1335
1336#endif
1337
1362 QList<QgsMapLayer *> addMapLayers( const QList<QgsMapLayer *> &mapLayers SIP_TRANSFER,
1363 bool addToLegend = true,
1364 bool takeOwnership SIP_PYARGREMOVE = true );
1365
1393 QgsMapLayer *addMapLayer( QgsMapLayer *mapLayer SIP_TRANSFER,
1394 bool addToLegend = true,
1395 bool takeOwnership SIP_PYARGREMOVE = true );
1396
1397#ifndef SIP_RUN
1411 void removeMapLayers( const QStringList &layerIds );
1412
1413 //TODO QGIS 5.0 - add PyName alias to avoid list type conversion error
1414
1428 void removeMapLayers( const QList<QgsMapLayer *> &layers );
1429#else
1430
1444 void removeMapLayers( SIP_PYOBJECT layers SIP_TYPEHINT( Union[List[QgsVectorLayer], List[str]] ) );
1445 % MethodCode
1446 if ( !PyList_Check( a0 ) )
1447 {
1448 sipIsErr = 1;
1449 PyErr_SetString( PyExc_TypeError, "Expected a list of layers or layers IDs" );
1450 }
1451 else if ( PyList_GET_SIZE( a0 ) )
1452 {
1453 PyObject *firstLayerPyObj = PyList_GetItem( a0, 0 );
1454 if ( firstLayerPyObj )
1455 {
1456 int state;
1457 if ( sipCanConvertToType( firstLayerPyObj, sipType_QgsMapLayer, SIP_NOT_NONE ) )
1458 {
1459 const sipTypeDef *qlist_type = sipFindType( "QList<QgsMapLayer *>" );
1460 QList<QgsMapLayer *> *layersList = reinterpret_cast<QList<QgsMapLayer *> *>( sipConvertToType( a0, qlist_type, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
1461 if ( !sipIsErr )
1462 {
1463 sipCpp->removeMapLayers( *layersList );
1464 }
1465 sipReleaseType( layersList, qlist_type, state );
1466 }
1467 else if ( sipCanConvertToType( firstLayerPyObj, sipType_QString, SIP_NOT_NONE ) )
1468 {
1469 QStringList *layersId = reinterpret_cast<QStringList *>( sipConvertToType( a0, sipType_QStringList, 0, SIP_NOT_NONE, &state, &sipIsErr ) );
1470 if ( !sipIsErr )
1471 {
1472 sipCpp->removeMapLayers( *layersId );
1473 }
1474 sipReleaseType( layersId, sipType_QStringList, state );
1475 }
1476 else
1477 {
1478 sipIsErr = 1;
1479 PyErr_SetString( PyExc_TypeError, "Expected a list of layers or layers IDs" );
1480 }
1481 }
1482 }
1483 % End
1484#endif
1485
1499 void removeMapLayer( const QString &layerId );
1500
1514 void removeMapLayer( QgsMapLayer *layer );
1515
1522 QgsMapLayer *takeMapLayer( QgsMapLayer *layer ) SIP_TRANSFERBACK;
1523
1535 QgsAnnotationLayer *mainAnnotationLayer();
1536
1547 void removeAllMapLayers();
1548
1554 void reloadAllLayers();
1555
1560 QgsCoordinateReferenceSystem defaultCrsForNewLayers() const;
1561
1573 Q_DECL_DEPRECATED void setTrustLayerMetadata( bool trust ) SIP_DEPRECATED;
1574
1585 Q_DECL_DEPRECATED bool trustLayerMetadata() const SIP_DEPRECATED;
1586
1591 const QgsAuxiliaryStorage *auxiliaryStorage() const SIP_SKIP;
1592
1597 QgsAuxiliaryStorage *auxiliaryStorage();
1598
1607 QString createAttachedFile( const QString &nameTemplate );
1608
1615 QStringList attachedFiles() const;
1616
1624 bool removeAttachedFile( const QString &path );
1625
1634 QString attachmentIdentifier( const QString &attachedFile ) const;
1635
1642 QString resolveAttachmentIdentifier( const QString &identifier ) const;
1643
1650 const QgsProjectMetadata &metadata() const;
1651
1658 void setMetadata( const QgsProjectMetadata &metadata );
1659
1668 Q_DECL_DEPRECATED QSet<QgsMapLayer *> requiredLayers() const;
1669
1678 Q_DECL_DEPRECATED void setRequiredLayers( const QSet<QgsMapLayer *> &layers );
1679
1686 void setProjectColors( const QgsNamedColorList &colors );
1687
1694 void setBackgroundColor( const QColor &color );
1695
1702 QColor backgroundColor() const;
1703
1710 void setSelectionColor( const QColor &color );
1711
1718 QColor selectionColor() const;
1719
1731 Q_DECL_DEPRECATED void setMapScales( const QVector<double> &scales ) SIP_DEPRECATED;
1732
1744 Q_DECL_DEPRECATED QVector<double> mapScales() const SIP_DEPRECATED;
1745
1754 Q_DECL_DEPRECATED void setUseProjectScales( bool enabled ) SIP_DEPRECATED;
1755
1764 Q_DECL_DEPRECATED bool useProjectScales() const SIP_DEPRECATED;
1765
1770 void generateTsFile( const QString &locale );
1771
1772 QString translate( const QString &context, const QString &sourceText, const char *disambiguation = nullptr, int n = -1 ) const override;
1773
1783 bool accept( QgsStyleEntityVisitorInterface *visitor ) const;
1784
1794 bool accept( QgsObjectEntityVisitorInterface *visitor, const QgsObjectVisitorContext &context ) const;
1795
1801 QgsElevationShadingRenderer elevationShadingRenderer() const;
1802
1808 void setElevationShadingRenderer( const QgsElevationShadingRenderer &elevationShadingRenderer );
1809
1818 bool loadFunctionsFromProject( bool force = false ) SIP_SKIP;
1819
1827 void cleanFunctionsFromProject() SIP_SKIP;
1828
1829#ifdef SIP_RUN
1830 SIP_PYOBJECT __repr__();
1831 % MethodCode
1832 QString str = u"<QgsProject: '%1'%2>"_s.arg( sipCpp->fileName(),
1833 sipCpp == QgsProject::instance() ? u" (singleton instance)"_s : QString() ); // skip-keyword-check
1834 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
1835 % End
1836#endif
1837
1838 signals:
1839
1847 void cleared();
1848
1856
1860 void readProject( const QDomDocument &document );
1861
1865 void readProjectWithContext( const QDomDocument &document, QgsReadWriteContext &context );
1866
1870 void writeProject( QDomDocument &document );
1871
1880 void readMapLayer( QgsMapLayer *mapLayer, const QDomElement &layerNode );
1881
1890 void writeMapLayer( QgsMapLayer *mapLayer, QDomElement &layerElem, QDomDocument &doc );
1891
1896
1902 Q_DECL_DEPRECATED void oldProjectVersionWarning( const QString &warning ) SIP_DEPRECATED;
1903
1914 void readVersionMismatchOccurred( const QString &fileVersion );
1915
1921 void layerLoaded( int i, int n );
1922
1924 void loadingLayer( const QString &layerName );
1925
1932 void loadingLayerMessageReceived( const QString &layerName, const QList<QgsReadWriteContext::ReadWriteMessage> &messages );
1933
1938 Q_DECL_DEPRECATED void nonIdentifiableLayersChanged( QStringList nonIdentifiableLayers );
1939
1945
1948
1956
1961
1968
1973
1983
1995
2012
2019 void ellipsoidChanged( const QString &ellipsoid );
2020
2028
2036
2045
2052
2056 void missingDatumTransforms( const QStringList &missingTransforms );
2057
2063
2070
2076
2082
2094
2099
2107
2115
2123
2131
2132 //
2133 // signals from QgsMapLayerRegistry
2134 //
2135
2143 void layersWillBeRemoved( const QStringList &layerIds );
2144
2152 void layersWillBeRemoved( const QList<QgsMapLayer *> &layers );
2153
2163 void layerWillBeRemoved( const QString &layerId );
2164
2175
2182 void layersRemoved( const QStringList &layerIds );
2183
2192 void layerRemoved( const QString &layerId );
2193
2194 //TODO QGIS 5.0 - rename to past tense
2195
2203
2214 void layersAdded( const QList<QgsMapLayer *> &layers );
2215
2223
2235 void legendLayersAdded( const QList<QgsMapLayer *> &layers );
2236
2245 void layersAddedWithoutLegend( const QList<QgsMapLayer *> &layers );
2246
2254 void isDirtyChanged( bool dirty );
2255
2263 void dirtySet();
2264
2273 Q_DECL_DEPRECATED void mapScalesChanged() SIP_DEPRECATED;
2274
2281
2282 public slots:
2283
2289
2290 // TODO QGIS 5.0 - rename b to dirty
2291
2298 void setDirty( bool b = true );
2299
2308 void setPresetHomePath( const QString &path );
2309
2319 void registerTranslatableContainers( QgsTranslationContext *translationContext, QgsAttributeEditorContainer *parent, const QString &layerId );
2320
2327 void registerTranslatableObjects( QgsTranslationContext *translationContext );
2328
2335 void setDataDefinedServerProperties( const QgsPropertyCollection &properties );
2336
2344
2361 bool startEditing( QgsVectorLayer *vectorLayer = nullptr );
2362
2392 bool commitChanges( QStringList &commitErrors SIP_OUT, bool stopEditing = true, QgsVectorLayer *vectorLayer = nullptr );
2393
2410 bool rollBack( QStringList &rollbackErrors SIP_OUT, bool stopEditing = true, QgsVectorLayer *vectorLayer = nullptr );
2411
2412 private slots:
2413 void onMapLayersAdded( const QList<QgsMapLayer *> &layers );
2414 void onMapLayersRemoved( const QList<QgsMapLayer *> &layers );
2415 void cleanTransactionGroups( bool force = false );
2416 void updateTransactionGroups();
2417
2418 private:
2419
2420 static QgsProject *sProject;
2421
2422
2431 bool _getMapLayers( const QDomDocument &doc, QList<QDomNode> &brokenNodes, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2432
2437 void setError( const QString &errorMessage ) SIP_SKIP;
2438
2443 void clearError() SIP_SKIP;
2444
2454 bool addLayer( const QDomElement &layerElem,
2455 QList<QDomNode> &brokenNodes,
2456 QgsReadWriteContext &context,
2457 Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags(),
2458 QgsDataProvider *provider = nullptr ) SIP_SKIP;
2459
2463 void removeAuxiliaryLayer( const QgsMapLayer *ml );
2464
2470 void initializeEmbeddedSubtree( const QString &projectFilePath, QgsLayerTreeGroup *group, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
2471
2476 bool loadEmbeddedNodes( QgsLayerTreeGroup *group, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() ) SIP_SKIP;
2477
2479 bool readProjectFile( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2480
2482 bool writeProjectFile( const QString &filename );
2483
2485 bool unzip( const QString &filename, Qgis::ProjectReadFlags flags = Qgis::ProjectReadFlags() );
2486
2488 bool zip( const QString &filename );
2489
2491 bool saveAuxiliaryStorage( const QString &filename = QString() );
2492
2494 void loadProjectFlags( const QDomDocument *doc );
2495
2497 static QgsPropertiesDefinition &dataDefinedServerPropertyDefinitions();
2498
2500 void preloadProviders( const QVector<QDomNode> &asynchronusLayerNodes,
2501 const QgsReadWriteContext &context,
2502 QMap<QString, QgsDataProvider *> &loadedProviders,
2503 QgsMapLayer::ReadFlags layerReadFlags,
2504 int totalProviderCount );
2505
2510 void releaseHandlesToProjectArchive();
2511
2512 bool rebuildCrs3D( QString *error = nullptr );
2513
2514 Qgis::ProjectCapabilities mCapabilities;
2515
2516 std::unique_ptr< QgsMapLayerStore > mLayerStore;
2517
2518 QString mErrorMessage;
2519
2520 std::unique_ptr<QgsProjectBadLayerHandler> mBadLayerHandler;
2521
2527 QHash< QString, QPair< QString, bool> > mEmbeddedLayers;
2528
2529 QgsSnappingConfig mSnappingConfig;
2530 Qgis::AvoidIntersectionsMode mAvoidIntersectionsMode = Qgis::AvoidIntersectionsMode::AllowIntersections;
2531
2532 std::unique_ptr<QgsRelationManager> mRelationManager;
2533
2534 std::unique_ptr<QgsAnnotationManager> mAnnotationManager;
2535 std::unique_ptr<QgsLayoutManager> mLayoutManager;
2536 std::unique_ptr<QgsElevationProfileManager> mElevationProfileManager;
2537 std::unique_ptr<QgsMapViewsManager> m3DViewsManager;
2538
2539 QgsBookmarkManager *mBookmarkManager = nullptr;
2540
2541 QgsSensorManager *mSensorManager = nullptr;
2542
2543 QgsProjectViewSettings *mViewSettings = nullptr;
2544
2545 QgsProjectStyleSettings *mStyleSettings = nullptr;
2546
2547 QgsProjectTimeSettings *mTimeSettings = nullptr;
2548
2549 QgsProjectElevationProperties *mElevationProperties = nullptr;
2550
2551 QgsProjectDisplaySettings *mDisplaySettings = nullptr;
2552
2553 QgsProjectGpsSettings *mGpsSettings = nullptr;
2554
2555 std::unique_ptr<QgsLayerTree> mRootGroup;
2556
2557 std::unique_ptr<QgsLayerTreeRegistryBridge> mLayerTreeRegistryBridge;
2558
2559 QgsAnnotationLayer *mMainAnnotationLayer = nullptr;
2560
2562 QMap< QPair< QString, QString>, QgsTransactionGroup *> mTransactionGroups;
2563
2564 QgsVectorLayerEditBufferGroup mEditBufferGroup;
2565
2566 std::unique_ptr<QgsMapThemeCollection> mMapThemeCollection;
2567
2568 std::unique_ptr<QgsLabelingEngineSettings> mLabelingEngineSettings;
2569
2570 QVariantMap mCustomVariables;
2571
2572 std::unique_ptr<QgsArchive> mArchive;
2573
2574 std::unique_ptr<QgsAuxiliaryStorage> mAuxiliaryStorage;
2575
2576 QFile mFile; // current physical project file
2577
2578 QString mOriginalPath;
2579
2580 QString mSaveUser; // last saved user.
2581 QString mSaveUserFull; // last saved user full name.
2582 QDateTime mSaveDateTime;
2583 QgsProjectVersion mSaveVersion;
2584
2589 QString mHomePath;
2590 mutable QString mCachedHomePath;
2591
2592 QColor mBackgroundColor;
2593 QColor mSelectionColor;
2594
2595 Qgis::DistanceUnit mDistanceUnits = Qgis::DistanceUnit::Meters;
2596 Qgis::AreaUnit mAreaUnits = Qgis::AreaUnit::SquareMeters;
2597 Qgis::ScaleCalculationMethod mScaleMethod = Qgis::ScaleCalculationMethod::HorizontalMiddle;
2598
2599 mutable QgsProjectPropertyKey mProperties; // property hierarchy, TODO: this shouldn't be mutable
2600 Qgis::TransactionMode mTransactionMode = Qgis::TransactionMode::Disabled; // transaction grouped editing
2601
2602 Qgis::ProjectFlags mFlags;
2604 QgsCoordinateReferenceSystem mVerticalCrs;
2606
2607 bool mDirty = false; // project has been modified since it has been read or saved
2608 int mDirtyBlockCount = 0;
2609
2610 QgsPropertyCollection mDataDefinedServerProperties;
2611
2612 QgsCoordinateTransformContext mTransformContext;
2613
2614 QgsProjectMetadata mMetadata;
2615
2616 std::unique_ptr< QTranslator > mTranslator;
2617
2618 bool mIsBeingDeleted = false;
2619
2620 QgsSettings mSettings;
2621
2622 mutable std::unique_ptr< QgsExpressionContextScope > mProjectScope;
2623
2624 bool mBlockChangeSignalsDuringClear = false;
2625 int mBlockSnappingUpdates = 0;
2626
2627 QgsElevationShadingRenderer mElevationShadingRenderer;
2628
2629 friend class QgsApplication;
2630
2632
2633 // Required to avoid creating a new project in it's destructor
2635
2636 // Required by QGIS Server for switching the current project instance
2637 friend class QgsServer;
2638
2639 friend class TestQgsProject;
2640
2641 Q_DISABLE_COPY( QgsProject )
2642};
2643
2665class CORE_EXPORT QgsProjectDirtyBlocker
2666{
2667 public:
2668
2675 : mProject( project )
2676 {
2677 mProject->mDirtyBlockCount++;
2678 }
2679
2682
2684 {
2685 mProject->mDirtyBlockCount--;
2686 }
2687
2688 private:
2689 QgsProject *mProject = nullptr;
2690
2691#ifdef SIP_RUN
2693#endif
2694};
2695
2701CORE_EXPORT QgsProjectVersion getVersion( QDomDocument const &doc ) SIP_SKIP;
2702
2703
2704
2706#ifndef SIP_RUN
2707class GetNamedProjectColor : public QgsScopedExpressionFunction
2708{
2709 public:
2710 GetNamedProjectColor( const QgsProject *project );
2711
2716 GetNamedProjectColor( const QHash< QString, QColor > &colors );
2717
2718 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2719 QgsScopedExpressionFunction *clone() const override;
2720
2721 private:
2722
2723 QHash< QString, QColor > mColors;
2724};
2725
2726class GetNamedProjectColorObject : public QgsScopedExpressionFunction
2727{
2728 public:
2729 GetNamedProjectColorObject( const QgsProject *project );
2730
2735 GetNamedProjectColorObject( const QHash< QString, QColor > &colors );
2736
2737 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2738 QgsScopedExpressionFunction *clone() const override;
2739
2740 private:
2741
2742 QHash< QString, QColor > mColors;
2743};
2744
2745
2746
2747class GetSensorData : public QgsScopedExpressionFunction
2748{
2749 public:
2750 GetSensorData( const QMap<QString, QgsAbstractSensor::SensorData> &sensorData = QMap<QString, QgsAbstractSensor::SensorData>() );
2751 QVariant func( const QVariantList &values, const QgsExpressionContext *, QgsExpression *, const QgsExpressionNodeFunction * ) override;
2752 QgsScopedExpressionFunction *clone() const override;
2753
2754 private:
2755
2756 QMap<QString, QgsAbstractSensor::SensorData> mSensorData;
2757};
2758#endif
2760
2761#endif
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:59
QFlags< ProjectCapability > ProjectCapabilities
Flags which control project capabilities.
Definition qgis.h:4402
DistanceUnit
Units of distance.
Definition qgis.h:5085
@ ProjectStyles
Enable the project embedded style library. Enabling this flag can increase the time required to clear...
Definition qgis.h:4393
AreaUnit
Units of area.
Definition qgis.h:5162
ProjectFlag
Flags which control the behavior of QgsProjects.
Definition qgis.h:4151
ScaleCalculationMethod
Scale calculation logic.
Definition qgis.h:5357
QFlags< ProjectFlag > ProjectFlags
Definition qgis.h:4158
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:83
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:112
QgsRelationManager * relationManager
Definition qgsproject.h:123
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:130
void layersAddedWithoutLegend(const QList< QgsMapLayer * > &layers)
Emitted when layers were added to the registry without adding to the legend.
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:215
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:128
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:120
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:115
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:131
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:790
QgsSnappingConfig snappingConfig
Definition qgsproject.h:122
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:149
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:125
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:121
Qgis::TransactionMode transactionMode
Definition qgsproject.h:133
QgsAnnotationManager * annotationManager()
Returns pointer to the project's annotation manager.
QgsProjectDisplaySettings * displaySettings
Definition qgsproject.h:132
QgsProjectMetadata metadata
Definition qgsproject.h:126
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:119
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:116
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:118
QStringList nonIdentifiableLayers
Definition qgsproject.h:114
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:806
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:205
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:127
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:129
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:134
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:124
void legendLayersAdded(const QList< QgsMapLayer * > &layers)
Emitted when layers were 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:117
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:68
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.