QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsvectorlayerrenderer.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectorlayerrenderer.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 QGSVECTORLAYERRENDERER_H
17 #define QGSVECTORLAYERRENDERER_H
18 
20 class QgsRenderContext;
21 class QgsVectorLayer;
23 
26 
27 class QgsGeometryCache;
28 class QgsFeatureIterator;
30 
31 #include <QList>
32 #include <QPainter>
33 
34 typedef QList<int> QgsAttributeList;
35 
36 #include "qgis.h"
37 #include "qgsfield.h" // QgsFields
38 #include "qgsfeature.h" // QgsFeatureIds
39 #include "qgsfeatureiterator.h"
41 
42 #include "qgsmaplayerrenderer.h"
43 
44 
51 {
52  public:
55 
56  virtual bool render() override;
57 
61 
62  private:
63 
68  void prepareLabeling( QgsVectorLayer* layer, QStringList& attributeNames );
69  void prepareDiagrams( QgsVectorLayer* layer, QStringList& attributeNames );
70 
73  void drawRendererV2( QgsFeatureIterator& fit );
74 
77  void drawRendererV2Levels( QgsFeatureIterator& fit );
78 
80  void stopRendererV2( QgsSingleSymbolRendererV2* selRenderer );
81 
82 
83  protected:
84 
86 
87  QgsFields mFields; // TODO: use fields from mSource
88 
90 
92 
94 
96 
100 
102 
103  QStringList mAttrNames;
104 
105  bool mLabeling;
106  bool mDiagrams;
107 
109  QPainter::CompositionMode mFeatureBlendMode;
110 
113 };
114 
115 
116 #endif // QGSVECTORLAYERRENDERER_H