QGIS API Documentation  3.24.2-Tisler (13c1a02865)
qgsstorebadlayerinfo.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsstorebadlayerinfo.h
3  ----------------------
4  begin : Jan 2019
5  copyright : (C) 2019 by Marco Hugentobler
6  email : marco dot hugentobler at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSSTOREBADLAYERINFO_H
19 #define QGSSTOREBADLAYERINFO_H
20 
22 #include "qgis_server.h"
23 #include <QStringList>
24 #include <QMap>
25 
32 {
33  public:
34 
38  QgsStoreBadLayerInfo() = default;
39 
44  void handleBadLayers( const QList<QDomNode> &layers );
45 
50  QStringList badLayers() const { return mBadLayerIds; }
51 
56  QMap<QString, QString> badLayerNames() const { return mBadLayerNames; }
57 
58  private:
59  QStringList mBadLayerIds;
60  QMap<QString, QString> mBadLayerNames;
61 };
62 
63 #endif // QGSSTOREBADLAYERINFO_H
Interface for classes that handle missing layer files when reading project file.
virtual void handleBadLayers(const QList< QDomNode > &layers)
This method will be called whenever the project tries to load layers which cannot be accessed.
Stores layer ids of bad layers.
QMap< QString, QString > badLayerNames() const
Returns names of bad layers with ids.
QStringList badLayers() const
badLayers
QgsStoreBadLayerInfo()=default
Default constructor.