QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
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 
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.
Definition: qgsfeatureiterator.h:139
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeature.h:325
QgsFeatureIds mSelectedFeatureIds
Definition: qgsvectorlayerrenderer.h:89
void setGeometryCachePointer(QgsGeometryCache *cache)
where to save the cached geometries
Definition: qgsvectorlayerrenderer.cpp:230
QPainter::CompositionMode mFeatureBlendMode
Definition: qgsvectorlayerrenderer.h:110
Container of fields for a vector layer.
Definition: qgsfield.h:172
QgsRenderContext & mContext
Definition: qgsvectorlayerrenderer.h:85
GeometryType
Definition: qgis.h:155
Definition: qgssinglesymbolrendererv2.h:24
QgsVectorSimplifyMethod mSimplifyMethod
Definition: qgsvectorlayerrenderer.h:112
bool mLabeling
Definition: qgsvectorlayerrenderer.h:106
Returns diagram settings for a feature.
Definition: qgsdiagramrendererv2.h:155
int mLayerTransparency
Definition: qgsvectorlayerrenderer.h:109
int mVertexMarkerStyle
Definition: qgsvectorlayerrenderer.h:100
QList< int > QgsAttributeList
Definition: qgsvectorlayerrenderer.h:29
QgsVectorLayerRenderer(QgsVectorLayer *layer, QgsRenderContext &context)
Definition: qgsvectorlayerrenderer.cpp:38
bool mVertexMarkerOnlyForSelection
Definition: qgsvectorlayerrenderer.h:99
QgsVectorLayerFeatureSource * mSource
Definition: qgsvectorlayerrenderer.h:91
QgsFeatureRendererV2 * mRendererV2
Definition: qgsvectorlayerrenderer.h:93
Partial snapshot of vector layer's state (only the members necessary for access to features) ...
Definition: qgsvectorlayerfeatureiterator.h:33
Implementation of threaded rendering for vector layers.
Definition: qgsvectorlayerrenderer.h:50
Definition: qgsdiagramrendererv2.h:39
Definition: qgsgeometrycache.h:10
This class contains information how to simplify geometries fetched from a vector layer.
Definition: qgsvectorsimplifymethod.h:24
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:39
QStringList mAttrNames
Definition: qgsvectorlayerrenderer.h:104
QgsFields mFields
Definition: qgsvectorlayerrenderer.h:87
QGis::GeometryType mGeometryType
Definition: qgsvectorlayerrenderer.h:102
int mVertexMarkerSize
Definition: qgsvectorlayerrenderer.h:100
bool mCacheFeatures
Definition: qgsvectorlayerrenderer.h:95
Base class for utility classes that encapsulate information necessary for rendering of map layers...
Definition: qgsmaplayerrenderer.h:43
Definition: qgsrendererv2.h:72
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:470
bool mDrawVertexMarkers
Definition: qgsvectorlayerrenderer.h:98
QgsGeometryCache * mCache
Definition: qgsvectorlayerrenderer.h:96
bool mDiagrams
Definition: qgsvectorlayerrenderer.h:107
~QgsVectorLayerRenderer()
Definition: qgsvectorlayerrenderer.cpp:102
bool mSimplifyGeometry
Definition: qgsvectorlayerrenderer.h:113
virtual bool render()
Do the rendering (based on data stored in the class)
Definition: qgsvectorlayerrenderer.cpp:109