QGIS/python/gui/qgsprojectbadlayerguihandler.sip

48 lines
1.4 KiB
Plaintext
Raw Normal View History

/** \ingroup gui
Handler for missing layers within project.
Gives user a chance to select path to the missing layers.
*/
class QgsProjectBadLayerGuiHandler : QObject, QgsProjectBadLayerHandler
{
%TypeHeaderCode
#include <qgsprojectbadlayerguihandler.h>
%End
public:
QgsProjectBadLayerGuiHandler();
2015-07-29 11:52:14 +02:00
/** Implementation of the handler */
2016-10-21 13:31:42 +02:00
virtual void handleBadLayers( const QList<QDomNode>& layers );
/** Flag to store the Ignore button press of MessageBox used by QgsLegend */
static bool mIgnore;
2014-05-27 23:22:50 +02:00
protected:
2015-07-29 11:52:14 +02:00
/** This is used to locate files that have moved or otherwise are missing */
2016-10-21 13:31:42 +02:00
bool findMissingFile( const QString& fileFilters, QDomNode& layerNode );
2014-05-27 23:22:50 +02:00
2016-10-21 13:31:42 +02:00
/**
* Find relocated data source for the given layer
2016-02-14 03:50:23 +01:00
*
* This QDom object represents a QgsProject node that maps to a specific layer.
*
* @param fileFilters file filters to use
* @param constLayerNode QDom node containing layer project information
*
* @todo
*
* XXX Only implemented for file based layers. It will need to be extended for
* XXX other data source types such as databases.
*/
2016-10-21 13:31:42 +02:00
bool findLayer( const QString& fileFilters, const QDomNode& constLayerNode );
2014-05-27 23:22:50 +02:00
2016-10-21 13:31:42 +02:00
/**
* Find relocated data sources for given layers
2016-02-14 03:50:23 +01:00
* These QDom objects represent QgsProject nodes that map to specific layers.
*/
2016-10-21 13:31:42 +02:00
void findLayers( const QString& fileFilters, const QList<QDomNode>& layerNodes );
2014-05-27 23:22:50 +02:00
};