QGIS API Documentation  2.13.0-Master
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 
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 
46 
54 {
55  public:
58 
59  virtual bool render() override;
60 
64 
65  private:
66 
71  void prepareLabeling( QgsVectorLayer* layer, QStringList& attributeNames );
72  void prepareDiagrams( QgsVectorLayer* layer, QStringList& attributeNames );
73 
76  void drawRendererV2( QgsFeatureIterator& fit );
77 
80  void drawRendererV2Levels( QgsFeatureIterator& fit );
81 
83  void stopRendererV2( QgsSingleSymbolRendererV2* selRenderer );
84 
85 
86  protected:
87 
89 
92 
93  QgsFields mFields; // TODO: use fields from mSource
94 
96 
98 
100 
102 
106 
108 
110 
112  bool mLabeling;
114  bool mDiagrams;
115 
122 
124  QPainter::CompositionMode mFeatureBlendMode;
125 
128 };
129 
130 
131 #endif // QGSVECTORLAYERRENDERER_H
Wrapper for iterator of features from vector data provider or vector layer.
QgsVectorLayer * mLayer
The rendered layer.
GeometryType
Definition: qgis.h:111
void setGeometryCachePointer(QgsGeometryCache *cache)
where to save the cached geometries
QPainter::CompositionMode mFeatureBlendMode
Container of fields for a vector layer.
Definition: qgsfield.h:189
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
QgsVectorSimplifyMethod mSimplifyMethod
bool mLabeling
used with old labeling engine (QgsPalLabeling): whether labeling is enabled
Returns diagram settings for a feature.
QList< int > QgsAttributeList
QgsVectorLayerRenderer(QgsVectorLayer *layer, QgsRenderContext &context)
QgsVectorLayerLabelProvider * mLabelProvider
used with new labeling engine (QgsLabelingEngineV2): provider for labels.
The QgsVectorLayerDiagramProvider class implements support for diagrams within the labeling engine...
QgsVectorLayerFeatureSource * mSource
QgsFeatureRendererV2 * mRendererV2
Partial snapshot of vector layer&#39;s state (only the members necessary for access to features) ...
Implementation of threaded rendering for vector layers.
virtual bool render() override
Do the rendering (based on data stored in the class)
This class contains information how to simplify geometries fetched from a vector layer.
Contains information about the context of a rendering operation.
QGis::GeometryType mGeometryType
Base class for utility classes that encapsulate information necessary for rendering of map layers...
QgsVectorLayerDiagramProvider * mDiagramProvider
used with new labeling engine (QgsLabelingEngineV2): provider for diagrams.
Represents a vector layer which manages a vector based data sets.
bool mDiagrams
used with new labeling engine (QgsPalLabeling): whether diagrams are enabled