QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules 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();
57 
61 
62  private:
63 
68  void prepareLabeling( QgsVectorLayer* layer, QStringList& attributeNames );
69  void prepareDiagrams( QgsVectorLayer* layer, QStringList& attributeNames );
70 
74 
78 
80  void stopRendererV2( QgsSingleSymbolRendererV2* selRenderer );
81 
82 
83  protected:
84 
86 
87  QgsFields mFields; // TODO: use fields from mSource
88 
90 
92 
94 
97 
101 
103 
104  QStringList mAttrNames;
105 
106  bool mLabeling;
107  bool mDiagrams;
108 
110  QPainter::CompositionMode mFeatureBlendMode;
111 
114 };
115 
116 
117 #endif // QGSVECTORLAYERRENDERER_H
Wrapper for iterator of features from vector data provider or vector layer.
void prepareDiagrams(QgsVectorLayer *layer, QStringList &attributeNames)
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeature.h:325
void setGeometryCachePointer(QgsGeometryCache *cache)
where to save the cached geometries
QPainter::CompositionMode mFeatureBlendMode
Container of fields for a vector layer.
Definition: qgsfield.h:163
void prepareLabeling(QgsVectorLayer *layer, QStringList &attributeNames)
Registers label and diagram layer.
GeometryType
Definition: qgis.h:155
QgsVectorSimplifyMethod mSimplifyMethod
Returns diagram settings for a feature.
void stopRendererV2(QgsSingleSymbolRendererV2 *selRenderer)
Stop version 2 renderer and selected renderer (if required)
QList< int > QgsAttributeList
QgsVectorLayerRenderer(QgsVectorLayer *layer, QgsRenderContext &context)
QgsVectorLayerFeatureSource * mSource
QgsFeatureRendererV2 * mRendererV2
Partial snapshot of vector layer's state (only the members necessary for access to features) ...
Implementation of threaded rendering for vector layers.
void drawRendererV2(QgsFeatureIterator &fit)
Draw layer with renderer V2.
This class contains information how to simplify geometries fetched from a vector layer.
Contains information about the context of a rendering operation.
void drawRendererV2Levels(QgsFeatureIterator &fit)
Draw layer with renderer V2 using symbol levels.
QGis::GeometryType mGeometryType
Base class for utility classes that encapsulate information necessary for rendering of map layers...
Represents a vector layer which manages a vector based data sets.
virtual bool render()
Do the rendering (based on data stored in the class)