This file is indexed.

/usr/include/qgis/qgsvectorlayerrenderer.h is in libqgis-dev 2.18.17+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
/***************************************************************************
  qgsvectorlayerrenderer.h
  --------------------------------------
  Date                 : December 2013
  Copyright            : (C) 2013 by Martin Dobias
  Email                : wonder dot sk at gmail dot com
 ***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef QGSVECTORLAYERRENDERER_H
#define QGSVECTORLAYERRENDERER_H

class QgsFeatureRendererV2;
class QgsRenderContext;
class QgsVectorLayer;
class QgsVectorLayerFeatureSource;

class QgsDiagramRendererV2;
class QgsDiagramLayerSettings;

class QgsGeometryCache;
class QgsFeatureIterator;
class QgsSingleSymbolRendererV2;

#include <QList>
#include <QPainter>

typedef QList<int> QgsAttributeList;

#include "qgis.h"
#include "qgsfield.h"  // QgsFields
#include "qgsfeature.h"  // QgsFeatureIds
#include "qgsfeatureiterator.h"
#include "qgsvectorsimplifymethod.h"

#include "qgsmaplayerrenderer.h"

class QgsVectorLayerLabelProvider;
class QgsVectorLayerDiagramProvider;

/** \ingroup core
 * Interruption checker used by QgsVectorLayerRenderer::render()
 * @note not available in Python bindings
 */
class QgsVectorLayerRendererInterruptionChecker: public QgsInterruptionChecker
{
  public:
    /** Constructor */
    explicit QgsVectorLayerRendererInterruptionChecker( const QgsRenderContext& context );
    bool mustStop() const override;
  private:
    const QgsRenderContext& mContext;
};

/** \ingroup core
 * Implementation of threaded rendering for vector layers.
 *
 * @note added in 2.4
 * @note not available in Python bindings
 */
class QgsVectorLayerRenderer : public QgsMapLayerRenderer
{
  public:
    QgsVectorLayerRenderer( QgsVectorLayer* layer, QgsRenderContext& context );
    ~QgsVectorLayerRenderer();

    virtual bool render() override;

    //! where to save the cached geometries
    //! @note The way how geometries are cached is really suboptimal - this method may be removed in future releases
    void setGeometryCachePointer( QgsGeometryCache* cache );

  private:

    /** Registers label and diagram layer
      @param layer diagram layer
      @param attributeNames attributes needed for labeling and diagrams will be added to the list
     */
    void prepareLabeling( QgsVectorLayer* layer, QStringList& attributeNames );
    void prepareDiagrams( QgsVectorLayer* layer, QStringList& attributeNames );

    /** Draw layer with renderer V2. QgsFeatureRenderer::startRender() needs to be called before using this method
     */
    void drawRendererV2( QgsFeatureIterator& fit );

    /** Draw layer with renderer V2 using symbol levels. QgsFeatureRenderer::startRender() needs to be called before using this method
     */
    void drawRendererV2Levels( QgsFeatureIterator& fit );

    /** Stop version 2 renderer and selected renderer (if required) */
    void stopRendererV2( QgsSingleSymbolRendererV2* selRenderer );


  protected:

    QgsRenderContext& mContext;

    QgsVectorLayerRendererInterruptionChecker mInterruptionChecker;

    /** The rendered layer */
    QgsVectorLayer* mLayer;

    QgsFields mFields; // TODO: use fields from mSource

    QgsFeatureIds mSelectedFeatureIds;

    QgsVectorLayerFeatureSource* mSource;

    QgsFeatureRendererV2 *mRendererV2;

    QgsGeometryCache* mCache;

    bool mDrawVertexMarkers;
    bool mVertexMarkerOnlyForSelection;
    int mVertexMarkerStyle, mVertexMarkerSize;

    QGis::GeometryType mGeometryType;

    QStringList mAttrNames;

    //! used with old labeling engine (QgsPalLabeling): whether labeling is enabled
    bool mLabeling;
    //! used with new labeling engine (QgsPalLabeling): whether diagrams are enabled
    bool mDiagrams;

    //! used with new labeling engine (QgsLabelingEngineV2): provider for labels.
    //! may be null. no need to delete: if exists it is owned by labeling engine
    QgsVectorLayerLabelProvider* mLabelProvider;
    //! used with new labeling engine (QgsLabelingEngineV2): provider for diagrams.
    //! may be null. no need to delete: if exists it is owned by labeling engine
    QgsVectorLayerDiagramProvider* mDiagramProvider;

    QPainter::CompositionMode mFeatureBlendMode;

    QgsVectorSimplifyMethod mSimplifyMethod;
    bool mSimplifyGeometry;
};


#endif // QGSVECTORLAYERRENDERER_H