QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
43 class CORE_EXPORT QgsMapLayerRenderer
44 {
45  public:
46  QgsMapLayerRenderer( const QString& layerID ) : mLayerID( layerID ) {}
47  virtual ~QgsMapLayerRenderer() {}
48 
50  virtual bool render() = 0;
51 
53  QStringList errors() const { return mErrors; }
54 
56  QString layerID() const { return mLayerID; }
57 
58  protected:
59  QStringList mErrors;
60  QString mLayerID;
61 };
62 
63 #endif // QGSMAPLAYERRENDERER_H
QgsMapLayerRenderer(const QString &layerID)
Definition: qgsmaplayerrenderer.h:46
QString layerID() const
Get access to the ID of the layer rendered by this class.
Definition: qgsmaplayerrenderer.h:56
QStringList errors() const
Return list of errors (problems) that happened during the rendering.
Definition: qgsmaplayerrenderer.h:53
virtual ~QgsMapLayerRenderer()
Definition: qgsmaplayerrenderer.h:47
QString mLayerID
Definition: qgsmaplayerrenderer.h:60
Base class for utility classes that encapsulate information necessary for rendering of map layers...
Definition: qgsmaplayerrenderer.h:43
QStringList mErrors
Definition: qgsmaplayerrenderer.h:59