This file is indexed.

/usr/include/qgis/qgslabelattributes.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
/***************************************************************************
                         qgslabelattributes.h - render vector labels
                             -------------------
    begin                : August 2004
    copyright            : (C) 2004 by Radim Blazek
    email                : blazek@itc.it
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   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 QGSLABELATTRIBUTES_H
#define QGSLABELATTRIBUTES_H

#include <QBrush>
#include <QFont>
#include <QPen>

class QString;
class QColor;

/** \ingroup core
 * A class to store attributes needed for label rendering.
 *
 *  Label attributes:
 *                         border (color, width, style)
 *                        /
 *                       /     text bounding box
 *                      /     /
 *               +-----------/--+  buffer (color, pattern)
 *               |          /   | /
 *               |    +----+    |/  --+
 *               |    |Text|    /     |--- text size
 *               |    +----+   /|   --+
 *               |              |
 *               +--------------+
 *               |         |    |
 *               |        >|----|<--- buffer width
 *               |
 *              >|<--- border width
 *
 *   Text:
 *   - font family
 *   - size type (map units, points)
 *   - size (in points - device independent)
 *   - bold
 *   - italic
 *   - underline
 *   - color
 *
 *   Position:
 *   - (coordinates)
 *   - offset type (map units, points)
 *   - x offset, y offset (measured in text coordinate system, not in map coordinate system)
 *   - angle
 *   - alignment (from a point calculated by angle and offset)
 *
 *   Buffer:
 *   - buffer size type (map units, points)
 *   - buffer size
 *   - buffer color
 *   - buffer brush
 *
 *   Border:
 *   - border width
 *   - border color
 *   - border style
 *
 *   Each attribute is either set or unset.
 */

class  CORE_EXPORT QgsLabelAttributes
{
  public:
    /** Constructor.
     *  @param def if true, defaults are set, if false all all attributes are unset
     */
    QgsLabelAttributes( bool def = true );

    ~QgsLabelAttributes();

    /* Units type */
    enum Units
    {
      MapUnits = 0,
      PointUnits
    };

    static QString unitsName( int units );
    static int unitsCode( const QString &name );

    static QString alignmentName( int alignment );
    static int alignmentCode( const QString &name );

    /* Text */
    void setText( const QString & text );
    bool textIsSet() const;
    const QString text() const;

    /* Font */
    void setFamily( const QString & family );
    bool familyIsSet() const;
    const QString family() const;

    void setBold( bool enable );
    bool boldIsSet() const;
    bool bold() const;

    void setItalic( bool enable );
    bool italicIsSet() const;
    bool italic() const;

    void setUnderline( bool enable );
    bool underlineIsSet() const;
    bool underline() const;

    void setStrikeOut( bool enable );
    bool strikeOutIsSet() const;
    bool strikeOut() const;

    void   setSize( double size, int type );
    bool   sizeIsSet() const;
    int    sizeType() const;
    double size() const;

    void  setColor( const QColor &color );
    bool  colorIsSet() const;
    const QColor & color() const;

    /* Offset */
    void   setOffset( double x, double y, int type );
    bool   offsetIsSet() const;
    int    offsetType() const;
    double xOffset() const;
    double yOffset() const;

    /* Angle */
    void   setAngle( double angle );
    bool   angleIsSet() const;
    double angle() const;

    bool   angleIsAuto() const;
    void   setAutoAngle( bool state );

    /* Alignment */
    void setAlignment( int alignment );
    bool alignmentIsSet() const;
    int  alignment() const;

    /* Buffer */
    bool   bufferEnabled() const;
    void   setBufferEnabled( bool useBufferFlag );
    void   setBufferSize( double size, int type );
    bool   bufferSizeIsSet() const;
    int    bufferSizeType() const;
    double bufferSize() const;

    void  setBufferColor( const QColor &color );
    bool  bufferColorIsSet() const;
    QColor bufferColor() const;

    void  setBufferStyle( Qt::BrushStyle style );
    bool  bufferStyleIsSet() const;
    Qt::BrushStyle bufferStyle() const;

    /* Border */
    void  setBorderColor( const QColor &color );
    bool  borderColorIsSet() const;
    QColor borderColor() const;

    void  setBorderWidth( int width );
    bool  borderWidthIsSet() const;
    int   borderWidth() const;

    void  setBorderStyle( Qt::PenStyle style );
    bool  borderStyleIsSet() const;
    Qt::PenStyle   borderStyle() const;

    bool  multilineEnabled() const;
    void  setMultilineEnabled( bool useMultiline );

    /* label only selected features */
    bool  selectedOnly() const;
    void  setSelectedOnly( bool selectedonly );

  protected:
    /* Text */
    QString mText;
    bool mTextIsSet;

    /** Font (family, weight, italic, underline, strikeout) */
    QFont mFont;
    bool mFamilyIsSet;
    bool mBoldIsSet;
    bool mItalicIsSet;
    bool mUnderlineIsSet;
    bool mStrikeOutIsSet;

    /** Font size, size type */
    int  mSizeType;
    double mSize;
    bool   mSizeIsSet;

    /** Color */
    QColor mColor;
    bool   mColorIsSet;

    /** Offset */
    int    mOffsetType;
    double mXOffset;
    double mYOffset;
    bool   mOffsetIsSet;

    /** Angle (degrees) */
    double mAngle;
    bool   mAngleIsSet;
    bool   mAngleIsAuto;

    /** Alignment */
    int  mAlignment;
    bool mAlignmentIsSet;

    /** Buffer enablement */
    bool mBufferEnabledFlag;
    /** Buffer size, size type */
    int    mBufferSizeType;
    double mBufferSize;
    bool   mBufferSizeIsSet;

    /** Buffer brush (color, style) */
    QBrush mBufferBrush;
    bool   mBufferColorIsSet;
    bool   mBufferStyleIsSet;

    /** Border pen (color, width, style) */
    QPen mBorderPen;
    bool mBorderColorIsSet;
    bool mBorderWidthIsSet;
    bool mBorderStyleIsSet;

    /** Multiline enablement */
    bool mMultilineEnabledFlag;

    /** Label only selected */
    bool mSelectedOnly;
};

#endif