QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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)
QString layerID() const
Get access to the ID of the layer rendered by this class.
QStringList errors() const
Return list of errors (problems) that happened during the rendering.
Base class for utility classes that encapsulate information necessary for rendering of map layers...