This file is indexed.

/usr/include/qgis/qgsvectoroverlay.h is in libqgis-dev 1.7.4+1.7.5~20120320-1.1+b1.

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
/***************************************************************************
                        qgsvectoroverlay.h  -  description
                        ------------------
   begin                : January 2007
   copyright            : (C) 2007 by Marco Hugentobler
   email                : marco dot hugentobler at karto dot baug dot ethz dot ch
***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 QGSVECTOROVERLAY_H
#define QGSVECTOROVERLAY_H

#include <QString>
#include "qgsvectorlayer.h"

class QgsOverlayObject;
class QgsRect;
class QgsRenderContext;

/**Base class for vector layer overlays (e.g. diagrams, labels, etc.). For each
 * object, the position of the bounding box is stored in a QgsOverlayObject.
 * The vector overlays are drawn on top of all layers.
 * \note This class has been added in version 1.1
 */
class CORE_EXPORT QgsVectorOverlay
{
  public:
    QgsVectorOverlay( QgsVectorLayer* vl );
    virtual ~QgsVectorOverlay();

    /**Create the overlay objects contained in a view extent. Subclasses need
     * to implement this method and assign width/height information to the
     * overlay objects
     */

    virtual void createOverlayObjects( const QgsRenderContext& renderContext ) = 0;

    /**Remove the overlay objects and release their memory*/
    void removeOverlayObjects();

    /**Draw the overlay objects*/
    virtual void drawOverlayObjects( QgsRenderContext& context ) const = 0;

    /**Gives direct access to oberlay objects*/
    QMap<int, QgsOverlayObject*>* overlayObjects() {return &mOverlayObjects;}

    /**Describes the overlay type (e.g. "diagram" or "label")*/
    virtual QString typeName() const = 0;

    /**Set attribute indices necessary to fetch*/
    void setAttributes( const QgsAttributeList& list ) {mAttributes = list;}

    bool displayFlag() const {return mDisplayFlag;}

    /**Display yes/no*/
    void setDisplayFlag( bool flag ) {mDisplayFlag = flag;}

    /**Restore from project file*/
    virtual bool readXML( const QDomNode& overlayNode ) = 0;

    /**Save to project file*/
    virtual bool writeXML( QDomNode& layer_node, QDomDocument& doc ) const = 0;

  protected:
    /**Pointer to the vector layer for this overlay*/
    QgsVectorLayer* mVectorLayer;

    /**True if overlay should be displayed*/
    bool mDisplayFlag;

    /**A list with attribute indexes that are needed for overlay rendering*/
    QgsAttributeList mAttributes;

    /**Key: feature ids, value: the corresponding overlay objects. Normally, they are created for each redraw and deleted before the next redraw*/
    QMap<int, QgsOverlayObject*> mOverlayObjects;

    /**Position constraints that may be set to be persistent after redraws. Key is the feature id, value the map point
        where the feature should be placed*/
    QMap<int, QgsPoint> mPositionConstraints;

  private:
    /**Default constructor forbidden*/
    QgsVectorOverlay();
};

#endif