QGIS API Documentation  2.17.0-Master (eef6f05)
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 
52 {
53  public:
56  bool mustStop() const override;
57  private:
58  const QgsRenderContext& mContext;
59 };
60 
68 {
69  public:
72 
73  virtual bool render() override;
74 
77  void setGeometryCachePointer( QgsGeometryCache* cache );
78 
79  private:
80 
85  void prepareLabeling( QgsVectorLayer* layer, QStringList& attributeNames );
86  void prepareDiagrams( QgsVectorLayer* layer, QStringList& attributeNames );
87 
90  void drawRendererV2( QgsFeatureIterator& fit );
91 
94  void drawRendererV2Levels( QgsFeatureIterator& fit );
95 
97  void stopRendererV2( QgsSingleSymbolRendererV2* selRenderer );
98 
99 
100  protected:
101 
103 
105 
108 
109  QgsFields mFields; // TODO: use fields from mSource
110 
112 
114 
116 
118 
121  int mVertexMarkerStyle, mVertexMarkerSize;
122 
124 
126 
128  bool mLabeling;
130  bool mDiagrams;
131 
138 
140  QPainter::CompositionMode mFeatureBlendMode;
141 
144 };
145 
146 
147 #endif // QGSVECTORLAYERRENDERER_H
QgsVectorLayerRendererInterruptionChecker mInterruptionChecker
Wrapper for iterator of features from vector data provider or vector layer.
QgsVectorLayer * mLayer
The rendered layer.
GeometryType
Definition: qgis.h:115
Interruption checker used by QgsVectorLayerRenderer::render()
QPainter::CompositionMode mFeatureBlendMode
Container of fields for a vector layer.
Definition: qgsfield.h:252
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
bool mustStop() const override
return true if the iterator must stop as soon as possible
QgsVectorSimplifyMethod mSimplifyMethod
bool mLabeling
used with old labeling engine (QgsPalLabeling): whether labeling is enabled
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
Interface that can be optionaly attached to an iterator so its nextFeature() implementaton can check ...
QgsVectorLayerRendererInterruptionChecker(const QgsRenderContext &context)
Constructor.
QList< int > QgsAttributeList
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.
Stores the settings for rendering of all diagrams for a layer.
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