This file is indexed.

/usr/include/qxt/QxtGui/qxtscheduleview_p.h is in libqxt-dev 0.6.1-4ubuntu2.

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
/****************************************************************************
 **
 ** Copyright (C) Qxt Foundation. Some rights reserved.
 **
 ** This file is part of the QxtGui module of the Qxt library.
 **
 ** This library is free software; you can redistribute it and/or modify it
 ** under the terms of the Common Public License, version 1.0, as published
 ** by IBM, and/or under the terms of the GNU Lesser General Public License,
 ** version 2.1, as published by the Free Software Foundation.
 **
 ** This file is provided "AS IS", without WARRANTIES OR CONDITIONS OF ANY
 ** KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
 ** WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR
 ** FITNESS FOR A PARTICULAR PURPOSE.
 **
 ** You should have received a copy of the CPL and the LGPL along with this
 ** file. See the LICENSE file and the cpl1.0.txt/lgpl-2.1.txt files
 ** included with the source distribution for more information.
 ** If you did not receive a copy of the licenses, contact the Qxt Foundation.
 **
 ** <http://libqxt.org>  <foundation@libqxt.org>
 **
 ****************************************************************************/

#ifndef QXTSCHEDULEVIEW_P_INCLUDED
#define QXTSCHEDULEVIEW_P_INCLUDED

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qxt API.  It exists for the convenience
// of other Qxt classes.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//


#include <QList>
#include <QLinkedList>
#include <QVector>
#include <QAbstractItemModel>
#include <QHeaderView>
#include <QPainterPath>
#include <QTimer>
#include "qxtnamespace.h"
#include "qxtscheduleitemdelegate.h"

class QxtScheduleView;
class QxtScheduleHeaderWidget;

class QxtScheduleInternalItem : public QObject
{
    Q_OBJECT
    friend class QxtScheduleView;

public:

    QxtScheduleInternalItem(QxtScheduleView *parent , QModelIndex index , QVector<QRect> geometries = QVector<QRect>());

    bool                setData(QVariant data , int role);
    QVariant            data(int role) const;

    int                 visualStartTableOffset() const;
    int                 visualEndTableOffset() const;

    int                 startTableOffset() const;
    int                 endTableOffset() const;
    void                setStartTableOffset(int iOffset);

    int                 rows() const;
    void                setRowsUsed(int rows);
    QxtScheduleView*    parentView() const;

    void                startMove();
    void                resetMove();
    void                stopMove();

    bool                contains(const QPoint &pt);
    void                setGeometry(const QVector<QRect> geo);
    QModelIndex         modelIndex() const;
    void                setDirty(bool state = true)
    {
        isDirty = state;
    }

    QVector<QRect>      geometry() const;

Q_SIGNALS:
    void                geometryChanged(QxtScheduleInternalItem * item , QVector<QRect> oldGeometry);

public:
    bool m_moving;
    bool isDirty;
    int m_iModelRow;
    QVector<QRect> m_geometries;
    QVector<QRect> m_SavedGeometries;
    QVector<QPixmap> m_cachedParts;
};

class QxtScheduleViewPrivate : public QObject, public QxtPrivate<QxtScheduleView>
{
    Q_OBJECT
public:

    QXT_DECLARE_PUBLIC(QxtScheduleView)
    QxtScheduleViewPrivate();


    int offsetToVisualColumn(const int iOffset) const;
    int offsetToVisualRow(const int iOffset) const;
    int visualIndexToOffset(const int iRow, const int iCol) const;
    int unixTimeToOffset(const uint constUnixTime, bool indexEndTime = false) const;
    int offsetToUnixTime(const int offset, bool indexEndTime = false) const;
    QVector< QRect > calculateRangeGeometries(const int iStartOffset, const int iEndOffset) const;
    int pointToOffset(const QPoint & point);
    void handleItemConcurrency(const int from, const int to);
    QList< QLinkedList<QxtScheduleInternalItem *> >findConcurrentItems(const int from, const int to) const;


    QxtScheduleInternalItem *internalItemAt(const QPoint &pt);
    QxtScheduleInternalItem *internalItemAtModelIndex(const QModelIndex &index);


    void init();
    void reloadItemsFromModel();

    QxtScheduleInternalItem * itemForModelIndex(const QModelIndex &index)const
    {
        for (int iLoop = 0; iLoop < m_Items.size(); iLoop++)
        {
            if (m_Items.at(iLoop)->modelIndex() == index)
                return m_Items.at(iLoop);
        }
        return 0;
    }

    void handleItemConcurrency(QxtScheduleInternalItem *item)
    {
        if (item)
        {
            int startOffset = item->startTableOffset();
            int endOffset = startOffset +  item->rows() - 1 ;
            handleItemConcurrency(startOffset, endOffset);
        }
    }

    QxtScheduleInternalItem *m_currentItem;
    QxtScheduleInternalItem *m_selectedItem;

    int m_lastMousePosOffset;
    int m_currentZoomDepth;
    int m_zoomStepWidth;
    int m_currentViewMode;
    uint m_startUnixTime;
    uint m_endUnixTime;

    QList<QxtScheduleInternalItem* > m_Items ;
    QList<QxtScheduleInternalItem* > m_InactiveItems; /*used for items that are not in the range of our view but we need to look if they get updates*/

    QTimer scrollTimer;

    QxtScheduleHeaderWidget *m_vHeader;
    QxtScheduleHeaderWidget *m_hHeader;

    int m_Cols;

    QAbstractItemModel *m_Model;
    bool handlesConcurrency;
    QxtScheduleItemDelegate *delegate;
    QxtScheduleItemDelegate *defaultDelegate;

public Q_SLOTS:
    void itemGeometryChanged(QxtScheduleInternalItem * item, QVector<QRect> oldGeometry);
    void scrollTimerTimeout();

};

bool qxtScheduleItemLessThan(const QxtScheduleInternalItem * item1, const QxtScheduleInternalItem * item2);

#endif