This file is indexed.

/usr/include/KF5/mailcommon/foldertreewidget.h is in libkf5mailcommon-dev 4:16.04.2-2.

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
/*

  Copyright (c) 2009-2016 Montel Laurent <montel@kde.org>

  The program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License, version 2, as
  published by the Free Software Foundation.

  This program is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  General Public License for more details.

  You should have received a copy of the GNU General Public License along
  with this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

#ifndef MAILCOMMON_FOLDERTREEWIDGET_H
#define MAILCOMMON_FOLDERTREEWIDGET_H

#include "mailcommon_export.h"
#include "foldertreewidgetproxymodel.h"

#include <Collection>

#include <QAbstractItemView>
#include <QWidget>

namespace Akonadi
{
class StatisticsProxyModel;
}

class QLineEdit;
class KXMLGUIClient;

class QItemSelectionModel;

namespace MailCommon
{

class EntityCollectionOrderProxyModel;
class FolderTreeView;

/**
 * This is the widget that shows the main folder tree.
 *
 * It consists of the view (FolderTreeView) and a search line.
 * Internally, several proxy models are used on top of a entity tree model.
 */
class MAILCOMMON_EXPORT FolderTreeWidget : public QWidget
{
    Q_OBJECT

public:
    enum TreeViewOption {
        None = 0,
        ShowUnreadCount = 1,
        UseLineEditForFiltering = 2,
        UseDistinctSelectionModel = 4,
        ShowCollectionStatisticAnimation = 8,
        DontKeyFilter = 16
    };
    Q_DECLARE_FLAGS(TreeViewOptions, TreeViewOption)

    explicit FolderTreeWidget(
        QWidget *parent = Q_NULLPTR,
        KXMLGUIClient *xmlGuiClient = Q_NULLPTR,
        TreeViewOptions options = (TreeViewOptions)(ShowUnreadCount |
                                  ShowCollectionStatisticAnimation),
        FolderTreeWidgetProxyModel::FolderTreeWidgetProxyModelOptions optReadableProxy = FolderTreeWidgetProxyModel::None);
    ~FolderTreeWidget();

    /**
     * The possible tooltip display policies.
     */
    enum ToolTipDisplayPolicy {
        DisplayAlways,           ///< Always display a tooltip when hovering over an item
        DisplayWhenTextElided,   ///< Display the tooltip if the item text is actually elided
        DisplayNever             ///< Nevery display tooltips
    };

    /**
     * The available sorting policies.
     */
    enum SortingPolicy {
        SortByCurrentColumn,      ///< Columns are clickable, sorting is by the current column
        SortByDragAndDropKey      ///< Columns are NOT clickable, sorting is done by drag and drop
    };

    void selectCollectionFolder(const Akonadi::Collection &col);

    void setSelectionMode(QAbstractItemView::SelectionMode mode);

    QAbstractItemView::SelectionMode selectionMode() const;

    QItemSelectionModel *selectionModel() const;

    QModelIndex currentIndex() const;

    Akonadi::Collection selectedCollection() const;

    Akonadi::Collection::List selectedCollections() const;

    FolderTreeView *folderTreeView() const;

    Akonadi::StatisticsProxyModel *statisticsProxyModel() const;

    FolderTreeWidgetProxyModel *folderTreeWidgetProxyModel() const;

    EntityCollectionOrderProxyModel *entityOrderProxy() const;

    void quotaWarningParameters(const QColor &color, qreal threshold);
    void readQuotaConfig();

    QLineEdit *filterFolderLineEdit() const;
    void applyFilter(const QString &);
    void clearFilter();

    void disableContextMenuAndExtraColumn();

    void readConfig();

    void restoreHeaderState(const QByteArray &data);

protected:
    void changeToolTipsPolicyConfig(ToolTipDisplayPolicy);

protected Q_SLOTS:
    void slotChangeTooltipsPolicy(FolderTreeWidget::ToolTipDisplayPolicy);
    void slotManualSortingChanged(bool);
    void slotFilterFixedString(const QString &);
    void slotGeneralFontChanged();
    void slotGeneralPaletteChanged();

private:
    bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
    class FolderTreeWidgetPrivate;
    FolderTreeWidgetPrivate *const d;

};

}

#endif