QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsmaplayerrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaplayerrenderer.h
3  --------------------------------------
4  Date : December 2013
5  Copyright : (C) 2013 by Martin Dobias
6  Email : wonder dot sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSMAPLAYERRENDERER_H
17 #define QGSMAPLAYERRENDERER_H
18 
19 #include <QStringList>
20 
21 class QgsFeedback;
22 
45 class CORE_EXPORT QgsMapLayerRenderer
46 {
47  public:
48  QgsMapLayerRenderer( const QString& layerID ) : mLayerID( layerID ) {}
49  virtual ~QgsMapLayerRenderer() {}
50 
52  virtual bool render() = 0;
53 
56  virtual QgsFeedback* feedback() const { return nullptr; }
57 
59  QStringList errors() const { return mErrors; }
60 
62  QString layerID() const { return mLayerID; }
63 
64  protected:
67 };
68 
69 #endif // QGSMAPLAYERRENDERER_H
QgsMapLayerRenderer(const QString &layerID)
Base class for feedback objects to be used for cancellation of something running in a worker thread...
Definition: qgsfeedback.h:40
QString layerID() const
Get access to the ID of the layer rendered by this class.
Base class for utility classes that encapsulate information necessary for rendering of map layers...
QStringList errors() const
Return list of errors (problems) that happened during the rendering.
virtual QgsFeedback * feedback() const
Access to feedback object of the layer renderer (may be null)