This file is indexed.

/usr/include/qgis/qgsdetaileditemdelegate.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
/***************************************************************************
     qgsdetaileditemdelegate.h  -  A rich QItemDelegate subclass
                             -------------------
    begin                : Sat May 17 2008
    copyright            : (C) 2008 Tim Sutton
    email                : tim@linfiniti.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.                                   *
 *                                                                         *
 ***************************************************************************/
/* $Id:$ */
#ifndef QGSDETAILEDITEMDELEGATE_H
#define QGSDETAILEDITEMDELEGATE_H

#include <QAbstractItemDelegate>
#include <QString>

class QCheckBox;
class QgsDetailedItemWidget;
class QgsDetailedItemData;
class QFontMetrics;
class QFont;

/** \ingroup gui
 * A custom model/view delegate that can display an icon, heading
 * and detail sections.
 * @see also QgsDetailedItemData
 */
class GUI_EXPORT QgsDetailedItemDelegate :
    public QAbstractItemDelegate
{
    Q_OBJECT
  public:
    QgsDetailedItemDelegate( QObject * parent = 0 );
    ~QgsDetailedItemDelegate();
    /** reimplement for parent class */
    void paint( QPainter * thePainter,
                const QStyleOptionViewItem & theOption,
                const QModelIndex & theIndex ) const;
    /** reimplement for parent class */
    QSize sizeHint( const QStyleOptionViewItem & theOption,
                    const QModelIndex & theIndex ) const;

    void setVerticalSpacing( int theValue );

    int verticalSpacing() const;

    void setHorizontalSpacing( int theValue );

    int horizontalSpacing() const;

  private:
    QFont detailFont( const QStyleOptionViewItem &theOption ) const;
    QFont titleFont( const QStyleOptionViewItem &theOption ) const;
    void drawHighlight( const QStyleOptionViewItem &theOption,
                        QPainter * thepPainter,
                        int theHeight ) const;

    QStringList wordWrap( QString theString,
                          QFontMetrics theMetrics,
                          int theWidth ) const;
    void paintManually( QPainter * thePainter,
                        const QStyleOptionViewItem & theOption,
                        const QgsDetailedItemData theData ) const;
    void paintAsWidget( QPainter * thePainter,
                        const QStyleOptionViewItem & theOption,
                        const QgsDetailedItemData theData ) const;
    int height( const QStyleOptionViewItem & theOption,
                const QgsDetailedItemData theData ) const;
    QgsDetailedItemWidget * mpWidget;
    QCheckBox * mpCheckBox;
    int mVerticalSpacing;
    int mHorizontalSpacing;
};

#endif //QGSDETAILEDITEMDELEGATE_H