This file is indexed.

/usr/include/okteta1/columnsview.h is in okteta-dev 4:4.8.4+dfsg-1.

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
/*
    This file is part of the Okteta Gui library, made within the KDE community.

    Copyright 2003,2007-2009 Friedrich W. H. Kossebau <kossebau@kde.org>

    This library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 2.1 of the License, or (at your option) version 3, or any
    later version accepted by the membership of KDE e.V. (or its
    successor approved by the membership of KDE e.V.), which shall
    act as a proxy defined in Section 6 of version 3 of the license.

    This library 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
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef OKTETA_COLUMNSVIEW_H
#define OKTETA_COLUMNSVIEW_H

// lib
#include "oktetagui_export.h"
#include "kadds.h"
#include "linerange.h"
// Qt
#include <QtCore/QList>
#include <QtGui/QAbstractScrollArea>


namespace Okteta
{

class AbstractColumnRenderer;
class ColumnsViewPrivate;

/** general class for widgets with columns that display different aspects of the same data
  * with the same lineheight for all lines
  *
  *@author Friedrich W. H. Kossebau
  */

class OKTETAGUI_EXPORT ColumnsView : public QAbstractScrollArea
{
   Q_OBJECT

  public:
    explicit ColumnsView( /*bool R = false,*/ QWidget* parent = 0 );
    virtual ~ColumnsView();

  public: // data-wise sizes
    /** returns the number of all lines */
    LineSize noOfLines() const;
    /** returns number of fully visible lines, at least 1 (as needed by page down/up)
      * doesn't care about the total height being smaller than the display height
      */
    LineSize noOfLinesPerPage() const;

  public: // pixel-wise sizes
    /** returns the height of each line */
    PixelY lineHeight() const;
    /** returns the width of all visible columns together */
    PixelX columnsWidth() const;
    /** returns the height of all lines together */
    PixelY columnsHeight() const;

  public: // services
    /** gives the index of the line that would include y in pixel coord.
      * y is not forced to be inside the total height.
      */
    Line lineAt( PixelY y ) const;
    /** gives the index of the first and the last line that would be visible
      * these lines might not contain anything
      */
    LineRange visibleLines() const;
    /** gives the index of the first and the last line that would be visible in the given pixel range
      * these lines might not contain anything
      */
    LineRange visibleLines( const PixelYRange& yPixels ) const;

    /** @return visible width of the current view */
    PixelX visibleWidth() const;
    /** @return visible height of the current view */
    PixelY visibleHeight() const;
    /** @return x offset of the current view */
    PixelX xOffset() const;
    /** @return y offset of the current view */
    PixelY yOffset() const;

    /** @return y offset of the current view */
    PixelY yOffsetOfLine( Line lineIndex ) const;

    /** translates the point to coordinates in the columns */
    QPoint viewportToColumns( const QPoint& point ) const;

  public:
    /**  */
    void setColumnsPos( PixelX x, PixelY y );

  protected: // QAbstractScrollArea API
    virtual bool event( QEvent* event );
    virtual void resizeEvent( QResizeEvent* event );
    virtual void paintEvent( QPaintEvent* paintEvent );
    virtual void scrollContentsBy( int dx, int dy );

  protected: // our API
    /** draws all columns in columns coordinates */
    virtual void renderColumns( QPainter* painter, int cx, int cy, int cw, int ch );
    /** draws area without columns in columns coordinates */
    virtual void renderEmptyArea( QPainter* painter, int cx, int cy, int cw, int ch );

  protected: //
    /** sets height of all lines and propagates this information to all columns
      * doesn't update the content size
      * @param lineHeight height in pixels
      */
    virtual void setLineHeight( PixelY lineHeight );
    /** sets the number of lines
      * doesn't update the content size
      * @param noOfLines new number of lines to display
      */
    virtual void setNoOfLines( LineSize noOfLines );

  protected:
    void addColumn( AbstractColumnRenderer* columnRenderer );
    void removeColumn( AbstractColumnRenderer* columnRenderer );

  protected: // recalculations
    /** recalculates the positions of the columns and the total width */
    void updateWidths();
    void updateScrollBars();
    /** calls updateContent for the Column */
    void updateColumn( AbstractColumnRenderer& columnRenderer );
    /** calls updateContent for the Column for the given lines, if needed */
    void updateColumn( AbstractColumnRenderer& columnRenderer, const LineRange& lines );

  private:
    ColumnsViewPrivate* const d;
};

}

#endif