87 void title(
const QString & title );
91 void setTitle(
const QString& title );
94 const QString & title()
const;
102 bool isDirty()
const;
105 void dirty(
bool b );
109 void setDirty(
bool b );
117 void setFileName(
const QString & name );
120 QString fileName()
const;
146 bool read(
const QFileInfo & file );
163 bool read( QDomNode & layerNode );
176 bool write(
const QFileInfo & file );
185 void clearProperties();
196 bool writeEntry(
const QString & scope,
const QString & key,
bool value );
199 bool writeEntry(
const QString & scope,
const QString & key,
double value );
200 bool writeEntry(
const QString & scope,
const QString & key,
int value );
201 bool writeEntry(
const QString & scope,
const QString & key,
const QString & value );
202 bool writeEntry(
const QString & scope,
const QString & key,
const QStringList & value );
214 QStringList readListEntry(
const QString & scope,
const QString & key, QStringList def = QStringList(),
bool *ok = 0 )
const;
216 QString readEntry(
const QString & scope,
const QString & key,
const QString & def = QString::null,
bool * ok = 0 )
const;
217 int readNumEntry(
const QString & scope,
const QString & key,
int def = 0,
bool * ok = 0 )
const;
218 double readDoubleEntry(
const QString & scope,
const QString & key,
double def = 0,
bool * ok = 0 )
const;
219 bool readBoolEntry(
const QString & scope,
const QString & key,
bool def =
false,
bool * ok = 0 )
const;
224 bool removeEntry(
const QString & scope,
const QString & key );
231 QStringList entryList(
const QString & scope,
const QString & key )
const;
237 QStringList subkeyList(
const QString & scope,
const QString & key )
const;
245 void dumpProperties()
const;
248 QString writePath( QString filename, QString relativeBasePath = QString::null )
const;
251 QString readPath( QString filename )
const;
254 QString error()
const;
261 QString layerIsEmbedded(
const QString&
id )
const;
266 bool createEmbeddedLayer(
const QString& layerId,
const QString& projectFilePath, QList<QDomNode>& brokenNodes,
267 QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList,
bool saveFlag =
true );
272 QgsLayerTreeGroup* createEmbeddedGroup(
const QString& groupName,
const QString& projectFilePath,
const QStringList &invisibleLayers );
276 bool avoidIntersection );
280 bool& avoidIntersection )
const;
283 void setTopologicalEditing(
bool enabled );
286 bool topologicalEditing()
const;
290 QString homePath()
const;
307 void setError( QString errorMessage );
314 bool addLayer(
const QDomElement& layerElem, QList<QDomNode>& brokenNodes, QList< QPair< QgsVectorLayer*, QDomElement > >& vectorLayerList );
317 void initializeEmbeddedSubtree(
const QString& projectFilePath,
QgsLayerTreeGroup* group );
324 void readProject(
const QDomDocument & );
327 void writeProject( QDomDocument & );
337 void readMapLayer(
QgsMapLayer *mapLayer,
const QDomElement &layerNode );
347 void writeMapLayer(
QgsMapLayer *mapLayer, QDomElement &layerElem, QDomDocument &doc );
353 void oldProjectVersionWarning( QString );
358 void layerLoaded(
int i,
int n );
360 void loadingLayer( QString );
362 void snapSettingsChanged();
373 QScopedPointer<Imp> imp_;
377 QPair< bool, QList<QDomNode> > _getMapLayers( QDomDocument
const &doc );
379 QString mErrorMessage;
386 QHash< QString, QPair< QString, bool> > mEmbeddedLayers;
388 void snapSettings( QStringList& layerIdList, QStringList& enabledList, QStringList& snapTypeList, QStringList& snapUnitList, QStringList& toleranceUnitList,
389 QStringList& avoidIntersectionList )
const;
404 virtual void handleBadLayers( QList<QDomNode> layers, QDomDocument projectDom ) = 0;
413 virtual void handleBadLayers( QList<QDomNode> layers, QDomDocument projectDom )
override;
Layer tree group node serves as a container for layers and further groups.
Base class for all map layer types.
QgsLayerTreeRegistryBridge * layerTreeRegistryBridge() const
Return pointer to the helper class that synchronizes map layer registry with layer tree...
UnitType
Type of unit of tolerance value from settings.
SnappingType
Snap to vertex, to segment or both.
Listens to the updates in map layer registry and does changes in layer tree.
Reads and writes project states.
virtual ~QgsProjectBadLayerHandler()
This class manages a set of relations between layers.
Default bad layer handler which ignores any missing layers.
Represents a vector layer which manages a vector based data sets.
Interface for classes that handle missing layer files when reading project file.
virtual void handleBadLayers(QList< QDomNode > layers, QDomDocument projectDom)=0