QGIS API Documentation 4.1.0-Master (60fea48833c)
Loading...
Searching...
No Matches
qgsprojectbadlayerhandler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsprojectbadlayerhandler.h - QgsProjectBadLayerHandler
3
4 ---------------------
5 begin : 22.10.2016
6 copyright : (C) 2016 by Matthias Kuhn
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSPROJECTBADLAYERHANDLER_H
17#define QGSPROJECTBADLAYERHANDLER_H
18
19#include "qgis_core.h"
20
21#include <QDomNode>
22
28{
29 public:
40 virtual void handleBadLayers( const QList<QDomNode> &layers );
41 virtual ~QgsProjectBadLayerHandler() = default;
42
43
44 protected:
52
61
62
69 DataType dataType( const QDomNode &layerNode );
70
79 QString dataSource( const QDomNode &layerNode );
80
96 ProviderType providerType( const QDomNode &layerNode );
97
102 void setDataSource( QDomNode &layerNode, const QString &dataSource );
103};
104
105#endif // QGSPROJECTBADLAYERHANDLER_H
Interface for classes that handle missing layer files when reading project files.
ProviderType
the flavors for data storage
virtual ~QgsProjectBadLayerHandler()=default
virtual void handleBadLayers(const QList< QDomNode > &layers)
This method will be called whenever the project tries to load layers which cannot be accessed.