This file is indexed.

/usr/include/qgis/qgscomposermapoverview.h is in libqgis-dev 2.8.6+dfsg-1build1.

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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
/***************************************************************************
                         qgscomposermapoverview.h
                         --------------------
    begin                : July 2014
    copyright            : (C) 2014 by Nyall Dawson
    email                : nyall dot dawson 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 QGSCOMPOSERMAPOVERVIEW_H
#define QGSCOMPOSERMAPOVERVIEW_H

#include "qgscomposermapitem.h"
#include <QString>
#include <QObject>
#include <QPainter>

class QDomDocument;
class QDomElement;
class QgsFillSymbolV2;
class QgsComposerMapOverview;

/**\ingroup MapComposer
 * \class QgsComposerMapOverviewStack
 * \brief A collection of overviews which are drawn above the map content in a
 * QgsComposerMap. The overview stack controls which overviews are drawn and the
 * order they are drawn in.
 * \note added in QGIS 2.5
 * \see QgsComposerMapOverview
 */
class CORE_EXPORT QgsComposerMapOverviewStack : public QgsComposerMapItemStack
{
  public:

    /**Constructor for QgsComposerMapOverviewStack.
     * @param map QgsComposerMap the overview stack is attached to
    */
    QgsComposerMapOverviewStack( QgsComposerMap* map );

    virtual ~QgsComposerMapOverviewStack();

    /**Adds a new map overview to the stack and takes ownership of the overview.
     * The overview will be added to the end of the stack, and rendered
     * above any existing map overviews already present in the stack.
     * @param overview QgsComposerMapOverview to add to the stack
     * @note after adding a overview to the stack, update()
     * should be called for the QgsComposerMap to prevent rendering artifacts
     * @see removeOverview
    */
    void addOverview( QgsComposerMapOverview* overview );

    /**Removes an overview from the stack and deletes the corresponding QgsComposerMapOverview
     * @param overviewId id for the QgsComposerMapOverview to remove
     * @note after removing an overview from the stack, update()
     * should be called for the QgsComposerMap to prevent rendering artifacts
     * @see addOverview
    */
    void removeOverview( const QString& overviewId );

    /**Moves an overview up the stack, causing it to be rendered above other overviews
     * @param overviewId id for the QgsComposerMapOverview to move up
     * @note after moving an overview within the stack, update() should be
     * called for the QgsComposerMap to redraw the map with the new overview stack order
     * @see moveOverviewDown
    */
    void moveOverviewUp( const QString& overviewId );

    /**Moves an overview down the stack, causing it to be rendered below other overviews
     * @param overviewId id for the QgsComposerMapOverview to move down
     * @note after moving an overview within the stack, update() should be
     * called for the QgsComposerMap to redraw the map with the new overview stack order
     * @see moveOverviewUp
    */
    void moveOverviewDown( const QString& overviewId );

    /**Returns a const reference to an overview within the stack
     * @param overviewId id for the QgsComposerMapOverview to find
     * @returns const reference to overview, if found
     * @see overview
    */
    const QgsComposerMapOverview* constOverview( const QString& overviewId ) const;

    /**Returns a reference to an overview within the stack
     * @param overviewId id for the QgsComposerMapOverview to find
     * @returns reference to overview if found
     * @see constOverview
    */
    QgsComposerMapOverview* overview( const QString& overviewId ) const;

    /**Returns a reference to an overview within the stack
     * @param index overview position in the stack
     * @returns reference to overview if found
     * @see constOverview
    */
    QgsComposerMapOverview* overview( const int index ) const;

    /**Returns a reference to an overview within the stack
     * @param idx overview position in the stack
     * @returns reference to overview if found
     * @see constOverview
     * @see overview
    */
    QgsComposerMapOverview &operator[]( int idx );

    /**Returns a list of QgsComposerMapOverviews contained by the stack
     * @returns list of overviews
    */
    QList< QgsComposerMapOverview* > asList() const;

    /**Sets the overview stack's state from a DOM document
     * @param elem is DOM node corresponding to a 'ComposerMap' tag
     * @param doc DOM document
     * @returns true if read was successful
     * @see writeXML
     */
    bool readXML( const QDomElement& elem, const QDomDocument& doc ) override;

};

/**\ingroup MapComposer
 * \class QgsComposerMapOverview
 * \brief An individual overview which is drawn above the map content in a
 * QgsComposerMap, and shows the extent of another QgsComposerMap.
 * \note added in QGIS 2.5
 * \see QgsComposerMapOverviewStack
 */
class CORE_EXPORT QgsComposerMapOverview : public QgsComposerMapItem
{
    Q_OBJECT

  public:

    /**Constructor for QgsComposerMapOverview.
     * @param name friendly display name for overview
     * @param map QgsComposerMap the overview is attached to
    */
    QgsComposerMapOverview( const QString& name, QgsComposerMap* map );

    virtual ~QgsComposerMapOverview();

    /**Draws an overview
     * @param painter destination QPainter
     */
    void draw( QPainter* painter ) override;

    /**Stores overview state in DOM element
     * @param elem is DOM element corresponding to a 'ComposerMap' tag
     * @param doc DOM document
     * @see readXML
    */
    bool writeXML( QDomElement& elem, QDomDocument & doc ) const override;

    /**Sets overview state from a DOM document
     * @param itemElem is DOM node corresponding to a 'ComposerMapOverview' tag
     * @param doc is DOM document
     * @see writeXML
    */
    bool readXML( const QDomElement& itemElem, const QDomDocument& doc ) override;

    bool usesAdvancedEffects() const override;

    /**Sets overview frame map.
     * @param mapId source map id. -1 disables the overview frame
     * @see frameMapId
    */
    void setFrameMap( const int mapId );

    /**Returns id of source map.
     * @returns source map id, or -1 if no source map set
    */
    int frameMapId() const { return mFrameMapId; }

    /**Sets the fill symbol used for drawing the overview extent.
     * @param symbol fill symbol for overview
     * @see frameSymbol
    */
    void setFrameSymbol( QgsFillSymbolV2* symbol );

    /**Gets the fill symbol used for drawing the overview extent.
     * @returns fill symbol for overview
     * @see setFrameSymbol
    */
    QgsFillSymbolV2* frameSymbol() { return mFrameSymbol; }

    /**Gets the fill symbol used for drawing the overview extent.
     * @returns fill symbol for overview
     * @see setFrameSymbol
    */
    const QgsFillSymbolV2* frameSymbol() const { return mFrameSymbol; }

    /**Retrieves the blending mode used for drawing the overview.
     * @returns blending mode for overview
     * @see setBlendMode
    */
    QPainter::CompositionMode blendMode() const { return mBlendMode; }

    /**Sets the blending mode used for drawing the overview.
     * @param blendMode blending mode for overview
     * @see blendMode
    */
    void setBlendMode( const QPainter::CompositionMode blendMode );

    /**Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside
     * the extent of the overview map.
     * @returns true if overview frame is inverted
     * @see setInverted
    */
    bool inverted() const { return mInverted; }

    /**Sets whether the overview frame is inverted, ie, whether the shaded area is drawn outside
     * the extent of the overview map.
     * @param inverted set to true if overview frame is to be inverted
     * @see inverted
    */
    void setInverted( const bool inverted );

    /**Returns whether the extent of the map is forced to center on the overview
     * @returns true if map will be centered on overview
     * @see setCentered
    */
    bool centered() const { return mCentered; }

    /**Sets whether the extent of the map is forced to center on the overview
     * @param centered set to true if map will be centered on overview
     * @see centered
    */
    void setCentered( const bool centered );

    /**Reconnects signals for overview map, so that overview correctly follows changes to source
     * map's extent
    */
    void connectSignals();

  public slots:

    /**Handles recentering of the map and redrawing of the map's overview
    */
    void overviewExtentChanged();

  private:

    QgsComposerMapOverview(); //forbidden

    /**Id of map which displays its extent rectangle into this composer map (overview map functionality). -1 if not present*/
    int mFrameMapId;

    /**Drawing style for overview farme*/
    QgsFillSymbolV2* mFrameSymbol;

    /**Blend mode for overview*/
    QPainter::CompositionMode mBlendMode;

    /**True if overview is inverted*/
    bool mInverted;

    /**True if map is centered on overview*/
    bool mCentered;

    /**Creates default overview symbol*/
    void createDefaultFrameSymbol();

};

#endif // QGSCOMPOSERMAPOVERVIEW_H