This file is indexed.

/usr/include/qgis/qgsfeaturelistview.h is in libqgis-dev 2.0.1-2build2.

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
/***************************************************************************
     QgsAttributeListView.h
     --------------------------------------
    Date                 : Jan 2012
    Copyright            : (C) 2013 Matthias Kuhn
    Email                : matthias dot kuhn at gmx 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 QGSATTRIBUTELISTVIEW_H
#define QGSATTRIBUTELISTVIEW_H

#include <QListView>
#include <qdebug.h>

#include "qgsfeature.h" // For QgsFeatureIds

class QgsAttributeTableFilterModel;
class QgsFeatureListModel;
class QgsFeatureSelectionModel;
class QgsAttributeTableModel;
class QgsVectorLayer;
class QgsVectorLayerCache;
class QgsFeatureListViewDelegate;
class QRect;

/**
 * Shows a list of features and renders a edit button next to each feature.
 *
 * @brief
 * Accepts a display expression to define the way, features are rendered.
 * Uses a {@link QgsFeatureListModel} as source model.
 *
 */
class GUI_EXPORT QgsFeatureListView : public QListView
{
    Q_OBJECT

  public:
    /**
     * Creates a feature list view
     *
     * @param parent   owner
     */
    explicit QgsFeatureListView( QWidget* parent = 0 );

    /**
     * Destructor
     */
    virtual ~QgsFeatureListView() {}

    /**
     * Returns the layer cache
     * @return the layer cache used as backend
     */
    QgsVectorLayerCache* layerCache();

    /**
     * Set the {@link QgsFeatureListModel} which is used to retrieve information
     *
     * @param featureListModel  The model to use
     */
    virtual void setModel( QgsFeatureListModel* featureListModel );
    /**
     * Get the featureListModel used by this view
     *
     * @return The model in use
     */
    QgsFeatureListModel* featureListModel() { return mModel; }

    /**
     * The display expression is an expression used to render the fields into a single string
     * which is displaied.
     *
     * @param displayExpression  The expression used to render the feature
     *
     * @see QgsExpression
     */
    bool setDisplayExpression( const QString displayExpression );

    /**
     * Returns the expression which is currently used to render the features.
     *
     * @return A string containing the currend display expression
     *
     * @see QgsExpression
     */
    const QString& displayExpression() const;

    /**
     * Returns a detailed message about errors while parsing a QgsExpression.
     *
     * @return A message containg information about the parser error.
     */
    QString parserErrorString();

  protected:
    virtual void mouseMoveEvent( QMouseEvent *event );
    virtual void mousePressEvent( QMouseEvent *event );
    virtual void mouseReleaseEvent( QMouseEvent *event );
    virtual void keyPressEvent( QKeyEvent *event );

  signals:
    /**
     * Is emitted, whenever the current edit selection has been changed.
     *
     * @param feat the feature, which will be edited.
     */
    void currentEditSelectionChanged( QgsFeature &feat );

    /**
     * Is emitted, whenever the display expression is successfully changed
     * @param expression The expression that was applied
     */
    void displayExpressionChanged( const QString expression );

  public slots:
    /**
     * Set the feature(s) to be edited
     *
     * @param fids  A list of features to be edited
     */
    void setEditSelection( const QgsFeatureIds &fids );

    /**
     * Select all currently visible features
     */
    virtual void selectAll();

    void repaintRequested( QModelIndexList indexes );
    void repaintRequested();

  private slots:
    void editSelectionChanged( QItemSelection deselected, QItemSelection selected );

  private:
    void selectRow( const QModelIndex &index, bool anchor );

    QgsFeatureListModel *mModel;
    QItemSelectionModel* mCurrentEditSelectionModel;
    QgsFeatureSelectionModel* mFeatureSelectionModel;
    QgsFeatureListViewDelegate* mItemDelegate;
    bool mEditSelectionDrag; // Is set to true when the user initiated a left button click over an edit button and still keeps pressing /**< TODO */
    int mRowAnchor;
    QItemSelectionModel::SelectionFlags mCtrlDragSelectionFlag;
};

#endif